Issue with Assault.BSF script file
Posted: Mon Feb 25, 2019 7:33 am
Recently I was trying to change evasion behavior and was unable to get it to work.
I copied Assault.BSF into CustomCampaignName/Data/Scripts and edited it there.
I modified the function "DoEvadeAndPursuit", specifically this section here:
if ((IsUnitSquadType(me, "Cavalry") == 1) || (IsUnitSquadType(me, "Camelry") == 1)) // Cavalry and camelry can evade if not charged by cavalry or camelry
{
if ((IsUnitSquadType(enemy, "Cavalry") == 0) && (IsUnitSquadType(enemy, "Camelry") == 0))
{
evade = 1;
}
}
Basically I wanted to allow all cavalry/camelry to be able to evade other units, but cavalry would not be able to evade cavalry.
However I tested it in game and could not get it to work. The game didn't crash but the behavior didn't change. Do you know what might be causing this?
I tried testing this in Sengoku Jidai which has a similar file structure and ended up having to change the file in the main game directory rather than the custom campaign folder. Could there be some issue with which file takes precedence?
I copied Assault.BSF into CustomCampaignName/Data/Scripts and edited it there.
I modified the function "DoEvadeAndPursuit", specifically this section here:
if ((IsUnitSquadType(me, "Cavalry") == 1) || (IsUnitSquadType(me, "Camelry") == 1)) // Cavalry and camelry can evade if not charged by cavalry or camelry
{
if ((IsUnitSquadType(enemy, "Cavalry") == 0) && (IsUnitSquadType(enemy, "Camelry") == 0))
{
evade = 1;
}
}
Basically I wanted to allow all cavalry/camelry to be able to evade other units, but cavalry would not be able to evade cavalry.
However I tested it in game and could not get it to work. The game didn't crash but the behavior didn't change. Do you know what might be causing this?
I tried testing this in Sengoku Jidai which has a similar file structure and ended up having to change the file in the main game directory rather than the custom campaign folder. Could there be some issue with which file takes precedence?