Berserker, I wonder if the variable synchronization mechanism (to a remote PC) can be improved.
From my tests, there is no decent way to keep the variables synchronized. The timing of using IP/FU:D command for passing variables are strict and inconvenient.
Code for Testing:
By pressing 4, variables are sent to the other PC
By pressing 5, examine the variables that passed
Ideally, when I press 4, the variables are defined and passed to another PC, and I should be able to examine these vars by pressing 5 on another PC. However, it looks like this code
doesn't work outside of battle, which makes it inconvenient and not being able to use in some cases.
What's the ideal timing for passing and receiving variables as for now? I've done some tests with
the list of triggers by Algor, please find the result here:
Начало боя (с тактической фазой)
Хук в 7710213 [перед битвой перед BA0]
OnBeforeBattle (BA0)
OnBeforeBattleUniversal (BA52)
OnBeforeBattlefieldVisible - sending
OnBattleRound (BR) (round -1)
OnSetupBattlefield (BF)
появление поля боя
OnBattlefieldVisible
OnCombatRound
сообщение "Тактическая фаза"
выполнение действий отрядов начиная с получения хода (расстановка)
нажатие кнопки "Начать битву"
OnAfterTacticsPhase
OnCombatRound
OnBattleRound (BR) (round 0) - receiving (later than tactic phase!)
выполнение действий отрядов начиная с получения хода
Conclusion:
Earliest timing for sending variables to another PC: OnBeforeBattlefieldVisible
Earliest timing for receiving variabels: OnBattleRound & v997=0
From my tests, there is a gap between sending and receiving variables, for example, you can't send at OnBeforeBattlefieldVisible and check at the same trigger on another PC, the variables are not passed yet. The main problem I need help is:
Is there any chance to have variable received on another PC earlier than OnBattleRound & v997=0 ?
Receiving at BR is very late, which is later than Tactic Phase. The variable I wanted to pass is the stats of henchmen. With timing later than Tactic Phase, it just doesn't make sense - the henchman stack has to be generated at BR since the variables are only synced at this phase, and obviously, players won't accept popping up a new stack after they managed every stack on the battlefield.