Kodak Posted April 14, 2017 Share Posted April 14, 2017 Hi, as wotreplay has battleResult structure inside one could use it to display BattleResultsWindow at the end of replay. I was able to trigger BattleResultsWindow creation using some tweaks but of course nothing shows up. For sure AS3 got stuck as python.log is clear. Any hints? def showReplayResultsWindow(): from helpers import dependency from skeletons.gui.battle_results import IBattleResultsService battleResults = dependency.instance(IBattleResultsService) battleResults.postResult( { hash with battle result }, False) from gui.Scaleform.daapi.settings.views import VIEW_ALIAS from gui.shared.utils.functions import getViewName arenaUniqueID = 2141373401651619 from gui.Scaleform.framework import g_entitiesFactories g_entitiesFactories.addSettings(GroupedViewSettings(VIEW_ALIAS.BATTLE_RESULTS, BattleResultsWindow, 'battleResults.swf', ViewTypes.WINDOW, 'BattleResultsWindow', None, ScopeTemplates.DEFAULT_SCOPE)) g_appLoader.getDefBattleApp().loaderManager.loadView(VIEW_ALIAS.BATTLE_RESULTS, getViewName(VIEW_ALIAS.BATTLE_RESULTS, str(arenaUniqueID)), {'arenaUniqueID': arenaUniqueID}) Using procmon I see that battleResults.swf with required swf files are being loaded... @ Quote Link to comment Short link Share on other sites More sharing options...
POLIROID Posted April 14, 2017 Share Posted April 14, 2017 (edited) First of all you need change the AppEntry from battle to lobby, bcs battleResult window is lobby window, and thay referer to "net.wg.gui.lobby.*" which is not in battle code base. Then you need to solve problems with battleResults dataProvider, bcs there are some parameters "*Replay" that do not fall into dumped json battle result. And no more obstacles =) Edited April 14, 2017 by POLIROID @ Quote Link to comment Short link Share on other sites More sharing options...
Kodak Posted April 15, 2017 Author Share Posted April 15, 2017 net.wg.gui.lobby.* is just a namespace; I see no functional connection between battle result and the lobby itself Are there any possibilities to debug AS3 somehow? @ Quote Link to comment Short link Share on other sites More sharing options...
POLIROID Posted April 15, 2017 Share Posted April 15, 2017 net.wg.gui.lobby.* is just a namespace; I see no functional connection between battle result and the lobby itself When replay ends,and message about the end is displayed, we still have a battle. Class which UI of battleResultsWindow refers to "net.wg.gui.lobby.battleResults.BattleResults" is not available to us (it's not included in battleEntry - battle.swf). Are there any possibilities to debug AS3 somehow? Use DebugUtils in AS3 and LOG_LEVEL.DEV in PY, or override Flash.__onLogGui @ Quote Link to comment Short link Share on other sites More sharing options...
Kodak Posted April 15, 2017 Author Share Posted April 15, 2017 ...but it is available in battleResults.swf which is being loaded during view creation; isn't that enough? Why battle.swf need to know anything about battle result window to be created? Isn't it python initiating flash object and adding it to existing battle app? @ Quote Link to comment Short link Share on other sites More sharing options...
POLIROID Posted April 15, 2017 Share Posted April 15, 2017 it is available in battleResults.swf Noup, as 5-6 patches, the entire codebase except the UI-s itself is embedded in the root flash of the current entry (lobby.swf/battle.swf) Isn't it python initiating flash object and adding it to existing battle app? Totally wrong. @ Quote Link to comment Short link Share on other sites More sharing options...
Kodak Posted April 15, 2017 Author Share Posted April 15, 2017 yes, thank you; i now see that battleResults.swf has no scripts; could i potencially try to patch battleResults.swf and copy codebase there from lobby.swf? @ Quote Link to comment Short link Share on other sites More sharing options...
POLIROID Posted April 15, 2017 Share Posted April 15, 2017 (edited) yes, thank you; i now see that battleResults.swf has no scripts; could i potencially try to patch battleResults.swf and copy codebase there from lobby.swf? No, no, no, no, this is absolutely a bad idea, never patch ingame flash files, if you can do without patching! =) All you need is just to switch from battleEntry to lobbyEntry (for example, the login window) and then run your code. Although, if you need your window during a battle, then do not patch battleResults.swf, create your own swf with all dependencies and load it before the battleResultWIndow fires. But, this is a bad idea, do not do it! Just switch AppEntry to lobby =) Edited April 15, 2017 by POLIROID @ Quote Link to comment Short link Share on other sites More sharing options...
Kodak Posted April 15, 2017 Author Share Posted April 15, 2017 But it feels attractive to see results on the battlefield :) Hmm, how about copying battleResults.swf into inBattleResults.swf and putting all necessary code there? Normal results will stay untouched and this will be just used in the replay @ Quote Link to comment Short link Share on other sites More sharing options...
POLIROID Posted April 15, 2017 Share Posted April 15, 2017 You can create your own result window with blackjack and ...Btw, use ingame window it's more simple I hope I helped you, good luck =) @ Quote Link to comment Short link Share on other sites More sharing options...
Kodak Posted April 15, 2017 Author Share Posted April 15, 2017 yes, thank you; as JPEXS AS capabilities are so limitted (I can;t export script from one file to import it in another one) I will probably look for other mod endeavours :) I highly prefer pure python ones... @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.