Page 1 of 1

Custom Attack/Defend stances

Posted: Sat Feb 22, 2020 12:00 am
by ineffable
Stance.bsf is a file where the player can specify an Attack/Defend stance or range of stances to be employed by the AI, regardless of which side it plays. This .bsf can be attached to any custom or stock scenario by using Notepad to add the line- SCRIPT Stance -to the end of any scenario file.

Set the desired stances for each side by opening the .bsf in Notepad and editing the Allied SetAIStance(0,0,0) and Axis SetAIStance(1,0,0). The first value between the brackets indicates side (0=Allied, 1=Axis). The second and third values are, respectively, the Attack stance and Defend stance. The Stance values are as follows: 0 = All Out Attack, 1 = Attack, 2 = Probe, 3 = Defend, 4 = Delay Hold, 5 = Delay Withdraw, 6 = Retreat. See the developer's comments below for furthher explanation of Attack/Defend stance ranges.

The edited .bsf file is placed in the \Close Combat - The Bloody First\Campaigns\MAIN\DATA\BATTLES folder. Multiple scenario files can link to the same .bsf file.
ORIGINAL: Steve McClaire
Initiative in the scenario files determines which side is on the offensive. For Operations this side will get the choose attack timings (hasty, prepared, etc.) For battles this controls what shows up in the battle briefing (Allies Attack, Axis Attack, etc,) how the AI should behave, and what your CO expects if you play the scenario as a single battle. In either case the AI decides exactly what stance to use by evaluating what it knows about the strength ratio between the two forces (basically the same ratio you see on the blue/red force balance bar in the UI.)

In a .bsf file, SetAIStance() allows you to set limits on how aggressive or passive the AI can be. The 'AttackLimit' argument must always be less than or equal to the DefendLimit argument. The two together restrict the range of options the AI can choose. So SetAIStance(1,0,2) would force the Axis AI to choose either all-out-attack, attack, or probe regardless of the situation. SetAIStance(0,3,3) would force the Allied AI to always pick defend. Scripting is the only way to use this.

RE: Custom Attack/Defend stances

Posted: Sat Feb 22, 2020 11:07 pm
by ineffable
Link to .zip added above.