AI debug
Posted: Sat Mar 09, 2013 7:24 pm
Hi,
I am debugging AI actions to improve their effectiveness. I am using this right now:
Log("VP0",GetScriptGlobal("Slith_VictoryPoints", "VP_Team#0"));
Took it from the wiki, btw there is typo: http://www.slitherinebravo.net/GameWiki ... ing_ui_hot VPTeam#0 missing the underscore.
The thing is that this return a 1 if some team is targeting the VP, but I would prefer if it returned the list of team numbers attacking it.
Is there any other way to easily check what are the current orders of each team? I am using also GetTeamDestinationX(side, team) but would like to have a faster way of checking it. Is there a translation from coordinates to VP number?
Edit: Not sure if I am doing correctly the VP_Team call. Also I noticed a strange thing, I am changing the orders in turn7 for example, and after I write the log, the AI target does not change until its next turn (turn9). Why is this? Even setting the orders at the prebattlesetup I get a -1 for GetTeamDestinationX on turn1, in the StartTurn function, on turn3 it is then returned correctly.
I am debugging AI actions to improve their effectiveness. I am using this right now:
Log("VP0",GetScriptGlobal("Slith_VictoryPoints", "VP_Team#0"));
Took it from the wiki, btw there is typo: http://www.slitherinebravo.net/GameWiki ... ing_ui_hot VPTeam#0 missing the underscore.
The thing is that this return a 1 if some team is targeting the VP, but I would prefer if it returned the list of team numbers attacking it.
Is there any other way to easily check what are the current orders of each team? I am using also GetTeamDestinationX(side, team) but would like to have a faster way of checking it. Is there a translation from coordinates to VP number?
Edit: Not sure if I am doing correctly the VP_Team call. Also I noticed a strange thing, I am changing the orders in turn7 for example, and after I write the log, the AI target does not change until its next turn (turn9). Why is this? Even setting the orders at the prebattlesetup I get a -1 for GetTeamDestinationX on turn1, in the StartTurn function, on turn3 it is then returned correctly.