Page 1 of 1

Which file has the script for evasion/pursuit AP?

Posted: Tue Jun 15, 2021 11:46 pm
by companion
Which file governs the rule that adds/deducts 4 AP to pursuers and evaders?
I thought Assault.bsf had it but could not find the part for AP adjustments.

Re: Which file has the script for evasion/pursuit AP?

Posted: Wed Jun 16, 2021 2:02 pm
by Cronos09
companion wrote: Tue Jun 15, 2021 11:46 pm Which file governs the rule that adds/deducts 4 AP to pursuers and evaders?
I thought Assault.bsf had it but could not find the part for AP adjustments.
I tried once to figure out this moment in P&S scripts, i.e. I thought that there APs were also added when the unit was evading but failed.
At the same time, I used evading for non-light cavalry and it works fine in P&S without extra changes. The main thing is to write the evade conditions in Assault.BSF FUNCTION DoEvadeAndPursuit(me, enemy, adjacent_X, adjacent_Y) at the beginning of the function.

Re: Which file has the script for evasion/pursuit AP?

Posted: Wed Jun 16, 2021 5:34 pm
by rbodleyscott
companion wrote: Tue Jun 15, 2021 11:46 pm Which file governs the rule that adds/deducts 4 AP to pursuers and evaders?
I thought Assault.bsf had it but could not find the part for AP adjustments.
You are looking for the

VariableMoveAdjustment()

function in /Data/scripts/Tools.BSF

It is called in two places in the

DoUnitNextREPQueueStep()

function in /Data/scripts/AITools.bsf.

Re: Which file has the script for evasion/pursuit AP?

Posted: Wed Jun 16, 2021 6:24 pm
by Cronos09
rbodleyscott wrote: Wed Jun 16, 2021 5:34 pm You are looking for the

VariableMoveAdjustment()

function in /Data/scripts/Tools.BSF

It is called in two places in the

DoUnitNextREPQueueStep()

function in /Data/scripts/AITools.bsf.
Thanks for this valuable information. This function is present in P&S and works like in FoG2A/M.