Advanced strategy commands for BF1942 By CareyBear
![]()
Ok, we all know the basics - or I hope you do, or this tut won't mean much.
I'm assuming you can write a custom ai - that is, your own conditions, prerequisites, strategies and strategic areas, or at least be fairly familiar with the contents of all of them. These commands can also be added to existing AI strategies.\
I take no responsibility for anything untoward which may happen to… ah stuff these disclaimers. They're a waste of time. This is all correct as far as I know. Of course, you might stuff your comp and BF install, but that's your problem. Agreed? :
Deep in the game.rfa file is an ai folder, containing conditions, prerequisites and strategies .con files. The strategies.con contains:
| rem *** Create Strategies *** rem run prerequisites aiStrategy.createStrategy test1 aiStrategy.Aggression 0.8 aiStrategy.NumberOfAttacks 2 aiStrategy.NumberOfDefences 1 aiStrategy.setPrerequisite test1 aiStrategy.createStrategy assault aiStrategy.Aggression 1.0 aiStrategy.NumberOfAttacks 4 aiStrategy.NumberOfDefences 3 aiStrategy.setPrerequisite constPrereq aiStrategy.setTreeModifier TTNDefensivePos 0.75 aiStrategy.setTreeModifier TTNFriendGroundFixed 0.8 aiStrategy.setTreeModifier TTNHostileGroundFixed 1.25 aiStrategy.setStrategicObjectsModifier ControlPoint 4.0 aiStrategy.setStrategicObjectsModifier Flank 1.25 aiStrategy.setStrategicObjectsModifier Neutral 3.0 aiStrategy.createStrategy allOutAttack aiStrategy.Aggression 0.8 aiStrategy.NumberOfAttacks 4 aiStrategy.NumberOfDefences 3 aiStrategy.setPrerequisite overwhelmingPowerPrereq aiStrategy.setTreeModifier TTNDefensivePos 0.75 aiStrategy.setTreeModifier TTNFriendGroundFixed 0.8 aiStrategy.setTreeModifier TTNHostileGroundFixed 1.25 aiStrategy.createStrategy allDefence aiStrategy.Aggression 0.0 aiStrategy.NumberOfAttacks 0 aiStrategy.NumberOfDefences 1 aiStrategy.setPrerequisite loosingPrereq aiStrategy.setTreeModifier TTNDefensivePos 1.5 aiStrategy.setTreeModifier TTNFriendGroundFixed 1.2 aiStrategy.setTreeModifier TTNTransportation 0.8 aiStrategy.createStrategy default aiStrategy.Aggression 0.7 aiStrategy.NumberOfAttacks 2 aiStrategy.NumberOfDefences 2 aiStrategy.setPrerequisite constPrereq aiStrategy.setPrerequisiteWeight 5.0 aiStrategy.setStrategicObjectsModifier Base 0.5 aiStrategy.setStrategicObjectsModifier ControlPoint 4.0 aiStrategy.setStrategicObjectsModifier Flank 3.0 aiStrategy.setStrategicObjectsModifier Neutral 3.0 aiStrategy.createStrategy airToNaval aiStrategy.Aggression 0.35 aiStrategy.NumberOfAttacks 1 aiStrategy.NumberOfDefences 3 aiStrategy.setPrerequisite airToNavalPrereq aiStrategy.setTreeModifierCombatStrength TTNFriendAirMobile All 1.5 aiStrategy.setTreeModifierCombatStrength TTNFriendAirMobile NavalArmour 2.5 aiStrategy.setTreeModifier TTNHostileNaval 2.0 rem aiStrategy.setTreeModifier TTNAirField 1.5 aiStrategy.setTreeModifierCombatStrength TTNHostileNavalMobile NavalArmour 3.0 rem aiStrategy.setTreeModifier TTNFriendlyNaval 0.75 rem aiStrategy.setTreeModifier TTNFriendlyGround 0.5 |
| rem ** American ** aiStrategy.createStrategy Defend aiStrategy.Aggression 0 aiStrategy.NumberOfAttacks 0 aiStrategy.NumberOfDefences 4 aiStrategy.setPrerequisite defendPrereq aistrategy.setTreeModifierCombatStrength TTNFriendAir 5.0 aistrategy.setTreeModifierCombatStrength TTNFriendAirMobile CSTAir 5.0 aistrategy.setTreeModifierCombatStrength TTNFriendGroundFixed CSTAir 5.0 aiStrategy.setStrategicObjectsModifier Base 5 Owned aiStrategy.setStrategicObjectsModifier LandSpawner 5 Owned aiStrategy.setStrategicObjectsModifier AirField 8 Owned aiStrategy.setStrategicObjectsModifier StrongPoint 6 Owned |
| Command | aiStrategy.setTreeModifier |
| Arguments | aiStrategy.setTreeModifier TTNDefensivePos 0.75 aiStrategy.setTreeModifier TTNDefensivePos 1.5 aiStrategy.setTreeModifier TTNFriendGroundFixed 0.8 aiStrategy.setTreeModifier TTNFriendGroundFixed 1.2 aiStrategy.setTreeModifier TTNHostileGroundFixed 1.25 aiStrategy.setTreeModifier TTNTransportation 0.8 aiStrategy.setTreeModifier TTNHostileNaval 2.0 |
| Command | aistrategy.setTreeModifierCombatStrength |
| Arguments | aistrategy.setTreeModifierCombatStrength TTNFriendAir 5.0 aistrategy.setTreeModifierCombatStrength TTNFriendAirMobile CSTAir 5.0 aistrategy.setTreeModifierCombatStrength TTNFriendGroundFixed CSTAir 15.0 aiStrategy.setTreeModifierCombatStrength TTNHostileNavalMobile NavalArmour 3.0 aiStrategy.setTreeModifierCombatStrength TTNFriendAirMobile All 1.5 aiStrategy.setTreeModifierCombatStrength TTNFriendAirMobile NavalArmour 2.5 |
| aiStrategy.setTreeModifier | aistrategy.setTreeModifierCombatStrength |
| TTNDefensivePos TTNFriendGroundFixed TTNHostileGroundFixed TTNTransportation TTNHostileNaval |
TTNFriendAir TTNFriendAirMobile TTNFriendGroundFixed TTNHostileNavalMobile TTNFriendAirMobile |
| TTNDefensivePos TTNFriendGround TTNFriendGroundFixed TTNFriendGroundMobile TTNFriendNaval TTNFriendNavalMobile TTNHostileNaval TTNHostileNavalMobile TTNFriendAir TTNFriendAirMobile TTNHostileAir TTNHostileAirMobile TTNTransportation |
| CSTAir NavalArmour All |