Which file has the script for evasion/pursuit AP?

Moderator: rbodleyscott

Post Reply
companion
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 71
Joined: Fri Jul 08, 2016 2:16 pm

Which file has the script for evasion/pursuit AP?

Post 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.
Cronos09
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 326
Joined: Thu Feb 22, 2018 4:28 pm

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

Post 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.
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28323
Joined: Sun Dec 04, 2005 6:25 pm

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

Post 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.
Richard Bodley Scott

Image
Cronos09
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 326
Joined: Thu Feb 22, 2018 4:28 pm

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

Post 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.
Post Reply

Return to “Field of Glory II: Medieval - Modding”