Need bots in a good custom map

be sure to check this place out after u have a fairly good understanding of bots,or if your lucky someone will do it for u, that's of course the map is good enough, i've seen some nice maps out there, but of course nothing will be released without mappers approval http://wekickass.com


AI Dissection

by Koops

This is a copy of the thread: http://forums.bf42.com/showthread.php?s=&threadid=18103. (See this thread for more information about this topic.)

Please edit and update it here.

OK. Some people have been looking at getting AI happening in their maps.

I've also been looking at this and I have a fairly basic (ok, very basic!) understanding of how it works on the Guadalcanal map. Why this map, you ask? Because it's quite simple. The island is elongated and bots pretty much move either north or south and capture points and engage enemy.

I've just gone through all the Ai.con files and tried to put a small description of what each section is about. Most of these will be TERRIBLY wrong. But I hope to nut this out with everyone's help here.

In a nutshell, AI scripts consist of 2 parts.

1. Pathfinding maps. .raw files that can be edited using some of Rexman's wonderful AI tools. These .raw files are just black and white pictures that look very similar to the maps.

Rexman has added new a tool that will allow you to preview your Ai Pathmap ingame (or editors) by combining it with the terrain texture ... VERY HANDY ! - Arc D'Wraith

2. Con files determining behaviour in certain situations.

Then these can be made back into the normal bf AI format by using Rexman's pack script (change it if required!).

Anyway, on with the main show.

Below is are sections dealing with each file that contains AI confiruration information.

Let's all see if we can figure some of the more cryptic areas out.

If you know what a section is, please edit it here. Or if you have a better description of what a section actually does, edit also.

This is quite long, so it's not for the faint of heart! (Probably just a walk in the park for Rexman, turd-burglar, etc. :) )

A key tool in discovery: Game.ShowAIstats - turn it on and see all sorts of tidbits on what the AI is doing and why.


1. The Pathfinding .raw files.

Pathfinding

Located in the Pathfinding directory under the main map directory.

i.e. /mapmap/Pathfinding/


2. The AI con files.

Ai.con

Located in the map root directory.

i.e. /mapmap/


AIpathfinding.con

Located in the map root directory.

i.e. /mapmap/


StrategicAreas.con

Located in the AI dir in the map directory. There you specify the strategic areas coordinates and their neigbour relationships to other areas.

i.e. /mapmap/AI


Conditions.con

Located in the AI dir in the map directory.

i.e. /mapmap/AI


Prerequisites.con

Located in the AI dir in the map directory.

i.e. /mapmap/AI


Strategies.con

Located in the AI dir in the map directory.

i.e. /mapmap/AI


There are other files related to AI in the "SinglePlayer" subdirectory for the level. These are Bots.con and Skirmish.con, which pull in the bots' names, and InitPositions.con?, which sets the initial positions and classes of the bots.

From diehardDanny: (in AI\Objects.con) AiTemplatePlugIn.EquipmentType and AiTemplatePlugIn.SetStrategicStrength are essential parameters to get the AI to work on newly created vehicles and weapon systems. KitTemplate has a similar effect for setting soldiers' worth in combat.

Setting an invalid value for EquipmentType will make the bots ignore the vehicle. SetStrategicStrength is a value that sets the importance of the PCO, but higher values seem to not only attract friendly bots but also enemy fire, so be prudent with high figures and stick to the values given on the tables in the Excel reference, which can be found at http://rex3d.com/bf/ at the "AI (Bots)" link.

If you see the bots aim but they do not fire, there's something wrong with the Ai\Weapons.con or the referrer to that file in the standard Weapons.con (AiTemplate).

The ScoreManager class determines what sorts of actions the bots take, depending on the game type (Conquest, CTF, TDM). A simple example is that in TDM they don't care about flags, attacking, or defending, but just killing.


Be sure to check this place out after you have a fairly good understanding of bots: http://wekickass.com

Pathfinding .raw Files

Several ".raw" files that are normally located in the map dir name/Pathfinding?.

Pathfinding map .raw files that can be edited using some of Rexman's wonderful AI tools. These .raw files are just black and white pictures that look very similar to the maps.

Black is for areas in which bots can travel. White is for areas in which they cannot travel.

Easy enough.

Below is an example of a tank pathfinding file for a tank on Guadalcanal.

These files can be edited by Photoshop or any other program that lets you save out 8bit, single channel .raw files. In effect we could fix it so that bots only have a small corridor or area to travel down. But this would lead to very predictable paths. But it's probably a good way to start out.

Then these can be made back into the normal bf AI format by using Rexman's pack script (change it if required!).

Converting existing Pathfinding.raw files.

Get Rexman's AI tools. Run Import_Pathfind.exe.

|-----------------------------------|
| Bf1942 AImap -> 8bit Image††††††† |
| Written by Rex Hill, Version 1.0|
|-----------------------------------|
Specify Input FileName: LandingCraft3Level5Map.raw††† <-- Specify the file you want to be able to read
Specify Output FileName: LandingCraft3Level5Map8bit.raw <-- Specifiy the name you want to call the file.
Input: LandingCraft3Level5Map.raw
Output: LandingCraft3Level5Map8bit.raw
headrSegs: 1
pixelResolution: 128x128†† <--- Notice the resolution! This is different for each Level.
numSegments: 2x2
fileType: 0
Press any key to continue . . .

For reference the sizes of each level are below.

Level 0 is The same resolution of your mapís world size (Init/Terrain.con file setting)
Level 1 is Level0 res / 2
Level 2 is Level1 res / 2
Level 3 is Level2 res / 2
Level 4 is Level3 res / 2
Level 5 is Level4 res / 2

Planes seem to be exempt from pathfinding files! Maybe they just go everywhere inside of the material map id #7 area? They probably have hardcoded (stay in bound's) type stuff - Cpl Reynolds.

Note: try renaming your .raw files from infantery to infantry, most likely your bots will start to run all of a sudden -diehardDanny

--- Creation of .raw files after Photoshop editing --- To create the .raw files that the game expects use the AI pathfinding .raw tools. In particular the fnPackType?.bat file. Have a look at this file and see what it does.

In effect it converts the Infantry, Car, Boat, LandingCraft? and Tank 8bit Photoshop edited .raw files into the separate resolution Bf compatible .raw files.

This is assuming that you currently have a Level 0 resolution infantry 8bit .raw file.

Taken from the fnPackType?.bat file. %1 is the Name, %2 is the number part of the name; Example: Infantry and 1

resizeRaw %1%2Level0Map8Bit.raw %1%2Level1Map8Bit.raw
resizeRaw %1%2Level1Map8Bit.raw %1%2Level2Map8Bit.raw
copy /Y %1%2Level0Map8Bit.raw %1Info8Bit.raw
ai_map %1%2Level0Map8Bit.raw
ai_map %1%2Level1Map8Bit.raw
ai_map %1%2Level2Map8Bit.raw
ai_map %1Info8Bit.raw
smallOnePack %1%2Level0Map8Bit.raw %1.raw

So what does this do?

Well, firstly it resizes them into the different resolution files. Then it converts them into the bf format .raw files.

Easy. :)

You can go to the main AiDissection page or to the next section, Ai.con


Editing pathfinding.raw maps with photoshop

i(ranger) found an easy way to edit the pathfinding maps accurateley to your height map, first what i did was go into the

AIpathFinding?.con and change the value of game.aiPathfindingDebuggingActive ? to 1, this way once u run your map there will be some

words on the screen that shows your soldiers absolute position and you can also get 2 positions by left clicking on anything(so u

can get the position of a static object or something else) well anyways what i did was watch the bots and follow them until they

got stuck at like a mountain, then what i did was walk at begining of the mt. and at the very base of the mt you look at your

absolute position (record this down), then get more coordinates from the base of the mt. (record them down too), now game can be

exited and photoshop needs to be on, so in photoshop open the pathfinding map, then use the slice tool, then you need to right

click on the slice thing on the map and theres a place to put x/z coordinates, so u need to use the coordinates u got from in game

(makesure not to use the middle coordinate,y), so once u put those down and enter, the slice tool will point to the place on the

pathfinding map where the one point of the mountain is, so now mark the the little sqaure from the slice with white, now right

click on the slice and change the coordinates to the next absoluted position of the next base of the mountain, now repeat that by

putting a white mark, when your all done with marking the base, now its time to connect the dots to form the comple part of the

base, the rest of the mountain can be marked white too(parts past the base)

note: pathfinding maps are flipped vertically so when u first look at the map it will kind of look like the ingame, and heightmap but only things is that's its flipped, so once u have finished using the slice and marking the dots then flip the map vertically to see how it really looks then u can mark the mountain accurateley based off in game, after its completed flip it vertically once more then save, use Rexman's tools to compress, then there bots are that much smarter

and maybe ill get a pics of the process, (its not to hard though, just one day i was wondering how could edit the pathfinding map to my own then i stumbled upon the slice tool and discovered the ability to get coordinates, it works cuz pathfinding map are the same size as your height map or worldsize in my case it was 1024x1024, so in game cooridantes are exactly the same as the ones on the pathfinding map

Ai.con

AiSettings.SetWorldMapSize?
4096 4096
rem *** Init AI using current settings ****
 Ai.Init? 2
rem *** Strategic map dimension, MUST BE DONE BEFORE CREATING SAI! ***
 Ai.SaiMapXDimension? 64
 Ai.SaiMapYDimension? 64
rem *** Create Strategic AI ***
 Ai.CreateSAI?
rem *** Enabled or disabled as default ***
 Ai.SaiEnable? 1
 rem game.ShowAIstats 1

Screenshot? It's really amazing! Lots of information becomes clear. Someone want to explain it?

Run AIPathFinding?.con
 Run AI/StrategicAreas?.con
 Run ai/conditions.con
 Run ai/prerequisites.con
 Run ai/Strategies?.con
Ai.AddSAIStrategy 1 normal
 Ai.AddSAIStrategy 1 east
 Ai.AddSAIStrategy 1 west
 Ai.AddSAIStrategy 1 finalPush
 Ai.AddSAIStrategy 1 breakOut
 Ai.AddSAIStrategy 2 normal
 Ai.AddSAIStrategy 2 east
 Ai.AddSAIStrategy 2 west
 Ai.AddSAIStrategy 2 finalPush
 Ai.AddSAIStrategy 2 breakOut

You can go to the main AiDissection page or to the next section, AIpathfinding.con.

File ai.con (22 occurrences)

Required tokens:

Used once and only once in each file:

Ai.Init?
 Ai.SaiEnable?
 Ai.SaiMapXDimension?
 Ai.SaiMapYDimension?
 AiSettings.SetWorldMapSize?

Always used multiple times in each file:

Ai.AddSAIStrategy

Optional tokens:

Sometimes used once in each file:

Ai.BotStatisticUpdateSpeed? (single: 17, in 22 files)
 Ai.ShowBotStats (single: 1, in 22 files)
 Ai.ShowStrategicAreas (single: 1, in 22 files)
 AIBotManager.SetDecisionMakingInterleave? (single: 18, in 22 files)
 AIBotManager.SetLodLevelPriority? (single: 18, in 22 files)
 AIBotManager.SetLodLevelTicks? (single: 18, in 22 files)
 AIBotManager.SetPlannedDecisionMakingThreshold? (single: 18, in 22 files)
 AIBotManager.SetSensingQuotient? (single: 18, in 22 files)
 AIBotManager.SetSystemQuotient? (single: 18, in 22 files)
 AIBotManager.SetUnplannedDecisionMakingThreshold? (single: 18, in 22 files)
 AiSettings.LodEnable? (single: 2, in 22 files)
 AiSettings.SetInformationGridDimension? (single: 18, in 22 files)
 AiSettings.SetViewDistance? (single: 6, in 22 files)
 AiSettings.ViewDistance? (single: 12, in 22 files)

Sometimes used once or more in each file:

Game.ShowAIstats (single: 17, multiple: 1, in 22 files)

Runs the files: AI/StrategicAreas?.con AIPathFinding?.con ai/Conditions? ai/Conditions?.con ai/Prerequisites? ai/Prerequisites?.con ai/StrategicAreas? ai/StrategicAreas?.con ai/Strategies? ai/Strategies?.con ai/conditions ai/conditions.con ai/prerequisites ai/prerequisites.con singleplayers/bot

AIpathfinding.con

rem game.aiPathfindingDebuggingActive 1

rem *** Setup map parameters ***
 rem *** searchMap name/waterHeight/waterDepth/maxSlope/brush/lowClipLevel?/hiClipLevel?/considerAITypes/(maxMapLevel?)
 rem *** searchType name/mapNum/minSearchLevel?
 rem *** Tank ***
 Ai.AddSearchMap Tank0 0 0 25 3.0 0.3 2.5 0
Ai.AddSearchType? Tank 0 0
Ai.SetMapSpawnPoints? 0 2422.05/1245
Ai.SetSmoothing? 0 20
rem *** Infantry ***
 Ai.AddSearchMap Infantry1 0 1.5 30 1.0 0.4 2.0 1
 Ai.AddSearchType? Infantry 1 0
 Ai.SetMapSpawnPoints? 1 2422.05/1245
 Ai.SetSmoothing? 1 10
rem *** Boat ***
 Ai.AddSearchMap Boat2 1 5 0 125.0 0.3 2.5 0 2 5
 Ai.AddSearchType? Boat 2 2
 Ai.SetMapSpawnPoints? 2 100/100
Ai.SetSmoothing? 2 20
rem *** LandingCraft? ***
 Ai.AddSearchMap LandingCraft3? 1 1.4 0 4.0 0.3 2.5 0 2 5 
Ai.AddSearchType? LandingCraft? 3 2
 Ai.SetMapSpawnPoints? 3 100/100
Ai.SetSmoothing? 3 20
rem *** Car ***
 Ai.AddSearchMap Car4 0 0 20 4.0 0.3 2.5 0
 Ai.AddSearchType? Car 4 0
 Ai.SetMapSpawnPoints? 4 2422.05/1245
 Ai.SetSmoothin? 4 6
Beginrem?
rem *** Boat ***
 Ai.AddSearchType? Boat
rem *** LandingCraft? ***
 Ai.AddSearchType? LandingCraft?
rem *** Car ***
 Ai.AddSearchMap Car4 0 0 20 4.0 0.3 2.5 0
 Ai.AddSearchType? Car 2 0
 Ai.SetMapSpawnPoints? 2 2422.05/1245
 Ai.SetSmoothin? 2 6
Endrem?
rem *** Load maps ***
 Ai.loadMaps

You can go to the main AiDissection page or to the next section, StrategicAreas.con

Here is a summary of what gets used in these files:

File AIpathfinding.con (22 occurrences)

Required tokens:

Always used multiple times in each file:

Ai.AddSearchMap
 Ai.AddSearchType?
 Ai.SetMapSpawnPoints?

Optional tokens:

Sometimes used once in each file:

Ai.NumAStarResources? (single: 18, in 22 files)
 Ai.SetNSearchTypes? (single: 1, in 22 files)

Sometimes used once or more in each file:

Ai.SetSmoothin? (single: 13, multiple: 2, in 22 files)

Sometimes used multiple times in each file (never just once):

Ai.SetSmoothing? (multiple: 15, in 22 files)

 

 

StrategicAreas.con

Create groups.

Add vehicles to group

AiSettings.AddVehicleToVehicleGroup 0land
 AiSettings.AddVehicleToVehicleGroup 1any
 AiSettings.AddVehicleToVehicleGroup 2sea
 AiSettings.AddVehicleToVehicleGroup 3land
 AiSettings.AddVehicleToVehicleGroup 4any
 AiSettings.AddVehicleToVehicleGroup 5land
 AiSettings.AddVehicleToVehicleGroup 6land
 AiSettings.AddVehicleToVehicleGroup 7any
 AiSettings.AddVehicleToVehicleGroup 8any
 AiSettings.AddVehicleToVehicleGroup 9any
 AiSettings.AddVehicleToVehicleGroup 10 any
 AiSettings.AddVehicleToVehicleGroup 11 any
 AiSettings.AddVehicleToVehicleGroup 12 sea
 AiSettings.AddVehicleToVehicleGroup 13 any
 AiSettings.AddVehicleToVehicleGroup 14 land

These look like spawn point assignments.

Create strategic areas

Define an area with a label/(x/y) patrol positions?/capture value/group that should attack this point

i.e. AIStrategicArea.Create Village 2070/1880 2090/1902 250 land

for reference below is its location in controlpoints.con

Object.Create openbase4_Cpoint
 Object.AbsolutePosition 2092.45/81.6/1901.82

So this value seems to hold true.

Create areas defined above.

AIStrategicArea.SetActive? Village
AIStrategicArea.AddAllowedVehicleGroup? land
AIStrategicArea.AddAllowedVehicleGroup? any
AIStrategicArea.AddNeighbour CrossRoads?
 AIStrategicArea.AddNeighbour AxisBunker?
 AIStrategicArea.AddNeighbour AlliedBunker?
 AIStrategicArea.AddNeighbour AxisBase?
 AIStrategicArea.AddNeighbour AlliedBase?
AIStrategicArea.AddObjectTypeFlag? Centre
 AIStrategicArea.AddObjectTypeFlag? ControlPoint
 AIStrategicArea.AddObjectTypeFlag? East
 AIStrategicArea.SetOrderPosition? Tank 2090/1909
AIStrategicArea.SetOrderPosition? Infantry 2090/1909
AIStrategicArea.SetSide 0

You can go to the main AiDissection page or to the next section, Conditions.con.

File StrategicAreas.con (22 occurrences)

Required tokens:

Always used multiple times in each file:

AIStrategicArea.AddNeighbour
 AIStrategicArea.AddObjectTypeFlag?
 AIStrategicArea.Create
 AIStrategicArea.SetActive?
 AIStrategicArea.SetOrderPosition?
 AIStrategicArea.SetSide

Optional tokens:

Sometimes used once or more in each file:

AiLandingZone.CreateLandingZone? (single: 6, multiple: 4, in 22 files)
 AIStrategicArea.AddLandingZoneUnit? (single: 8, multiple: 5, in 22 files)
 AIStrategicArea.AttachLandingZone? (single: 6, multiple: 4, in 22 files)
 AIStrategicArea.VehicleSearchRadius? (single: 14, multiple: 11, in 22 files)

Sometimes used multiple times in each file (never just once):

AiSettings.AddVehicleToVehicleGroup (multiple: 9, in 22 files)
 AiSettings.CreateVehicleGroup? (multiple: 9, in 22 files)
 AIStrategicArea.AddAllowedVehicleGroup? (multiple: 9, in 22 files)
 AIStrategicArea.AddExpelledUnit? (multiple: 2, in 22 files)
 AIStrategicArea.CreateNewCategory? (multiple: 7, in 22 files)
 AIStrategicArea.SetTakeable? (multiple: 13, in 22 files)

Getting bots to capture flags

AIStrategicArea.AddObjectTypeFlag? ControlPoint

u need to put this on strategic areas made for control points that way the bots will know theres a flag and they will go to it

depending on how valuable its worth, if this line is not put then the bots will not go to and stay to capture the flag, i couldnt

figure out how to get the bots to get the flag so i tried this and it works, and if you have ShowAIstats on, it is very

useful in showing you were the strategic areas are and if u put AIStrategicArea.AddObjectTypeFlag? ControlPoint for one of the areas

then u will see a blue (whatever other color, i think blue) around the flag so it tells the bots theres a flag right there

but on some occasion the bots will not go to the flag, they will just pass it, so the value needs to be changed

AIStrategicArea.Create Village 2070/1880 2090/1902 250

the number 250 is the value of the area, usually control points need higher values, typically any value may be used as , and if the ShowAIstats is on then if u look at the big blue boxes in air then u will see text, such as the name of the strategic area along with position and temp, it shows the allies temptation and the axis, and the control point needs a higher temp and that can be done by raising the value,

 

Conditions.con

This file is found in the level (battle) in the AI subdirectory, e.g. Berlin/AI. General settings (that apply to all) are found in the Game.rfa file in its AI subdirectory. What follows is an example from the Guadalcanal level.

AiStrategy.CreateConstantCondition timeCond Fuzzy EqualSmaller? Friendly StartTime? 150
 AiStrategy.SetConditionStrength? AdvisoryNegative?
 AiStrategy.SetIsAbortCondition? 1
rem ** normal **
 AiStrategy.CreateConstantCondition constantCond Crisp Equal Enemy UnitConstant? 1
 AiStrategy.SetConditionStrength? Required
rem ** west **
 AiStrategy.CreateConstantCondition noWestCond? Crisp Equal Friendly West 0
 AiStrategy.SetConditionStrength? Required
 rem ** east **
 AiStrategy.CreateConstantCondition max2EastCond? Crisp EqualSmaller? Friendly East 2
 AiStrategy.SetConditionStrength? Required
 rem ** finalPush **
 AiStrategy.CreateConstantCondition min4CpCond? Crisp EqualGreater? Friendly ControlPoint 4
 AiStrategy.SetConditionStrength? Required
 rem ** breakOut **
 AiStrategy.CreateConstantCondition noCPCond Crisp Equal Friendly ControlPoint 0
 AiStrategy.SetConditionStrength? Required

You can go to the main AiDissection page or to the next section, Prerequisites.con.

File Conditions.con (23 occurrences)

Required tokens:

Always used multiple times in each file:

AiStrategy.CreateConstantCondition
 AiStrategy.SetConditionStrength?

Optional tokens:

Sometimes used once in each file:

AiStrategy.CreateAreaCondition? (single: 1, in 23 files)
 AiStrategy.SetIsAbortCondition? (single: 17, in 23 files)

Sometimes used once or more in each file:

AiStrategy.CreateHomogenousCondition? (single: 2, multiple: 1, in 23 files)
 AiStrategy.TargetValue? (single: 2, multiple: 1, in 23 files)

 

 

Prerequisites.con

This file is found in the level (battle) in the AI subdirectory, e.g. Berlin/AI. General settings (that apply to all) are found in the Game.rfa file in its AI subdirectory. What follows is an example from the Guadalcanal level. The Conditions.con file is closely related to this one.

AiStrategy.CreatePrerequisite? normalPrereq
 AiStrategy.AddCondition? constantCond 30.5
 rem AiStrategy.AddCondition? timeCond††††† 0.005
 AiStrategy.CreatePrerequisite? westPrereq
 AiStrategy.AddCondition? noWestCond?10.0
 rem AiStrategy.AddCondition? timeCond†††† 0.005
 AiStrategy.CreatePrerequisite? eastPrereq
 AiStrategy.AddCondition? max2EastCond? 11.0
 rem AiStrategy.AddCondition? timeCond††††† 0.005
 AiStrategy.CreatePrerequisite? finalPushPrereq?
 AiStrategy.AddCondition? min4CpCond?5.0
 AiStrategy.CreatePrerequisite? breakOutPrereq?
 AiStrategy.AddCondition? noCPCond 50.0

You can go to the main AiDissection page or to the next section, Strategies.con.

File Prerequisites.con (23 occurrences)

Required tokens:

Always used multiple times in each file:

AiStrategy.AddCondition?
 AiStrategy.CreatePrerequisite?

 

 

Strategies.con

This file is found in the level (battle) in the AI subdirectory, e.g. Berlin/AI. General settings (that apply to all) are found in the Game.rfa file in its AI subdirectory. The Game.rfa file has strategies such as "assault", "allOutAttack?", "allDefence", and "airToNaval?".

What follows is an example from the Guadalcanal level.

rem *** GuadalCanal? ***
 AiStrategy.CreateStrategy? normal
AiStrategy.Aggression 1.0
AiStrategy.NumberOfAttacks? 2
 AiStrategy.NumberOfDefences? 0
AiStrategy.TimeLimit? 300
AiStrategy.SetPrerequisite? normalPrereq
AiStrategy.SetStrategicObjectsModifier? Close†††††††† 2.0Hostile
 AiStrategy.SetStrategicObjectsModifier? AirField?††††† 0.5Hostile
AiStrategy.SetStrategicObjectsModifier? Base††††††††† 0.8Hostile
 AiStrategy.SetStrategicObjectsModifier? Close†††††††† 2.0Neutral
 AiStrategy.SetStrategicObjectsModifier? AirField?††††† 0.5Neutral
 AiStrategy.SetStrategicObjectsModifier? Base††††††††† 0.8Neutral
 AiStrategy.SetStrategicObjectsModifier? ControlPoint2.0 
AiStrategy.CreateStrategy? east
AiStrategy.Aggression 0.75
AiStrategy.NumberOfAttacks? 1
 AiStrategy.NumberOfDefences? 1
AiStrategy.TimeLimit? 200
AiStrategy.SetPrerequisite? eastPrereq
AiStrategy.SetStrategicObjectsModifier? West††††††††† 2.0Owned
 AiStrategy.SetStrategicObjectsModifier? East††††††††† 4.0Hostile
 AiStrategy.SetStrategicObjectsModifier? Close†††††††† 2.0Hostile
 AiStrategy.SetStrategicObjectsModifier? AirField?††††† 0.5Hostile
 AiStrategy.SetStrategicObjectsModifier? Base††††††††† 0.8Hostile
 AiStrategy.SetStrategicObjectsModifier? East††††††††† 4.0Neutral
 AiStrategy.SetStrategicObjectsModifier? Close†††††††† 2.0Neutral
 AiStrategy.SetStrategicObjectsModifier? AirField?††††† 0.5Neutral
 AiStrategy.SetStrategicObjectsModifier? Base††††††††† 0.8Neutral
 AiStrategy.SetStrategicObjectsModifier? ControlPoint2.0 
AiStrategy.CreateStrategy? west
AiStrategy.Aggression 0.6
 AiStrategy.NumberOfAttacks? 1
 AiStrategy.NumberOfDefences? 1
AiStrategy.TimeLimit? 200
 AiStrategy.SetPrerequisite? westPrereq
AiStrategy.SetStrategicObjectsModifier? East††††††††† 2.0Owned
AiStrategy.SetStrategicObjectsModifier? West††††††††† 4.0Hostile
 AiStrategy.SetStrategicObjectsModifier? Close†††††††† 2.0Hostile
 AiStrategy.SetStrategicObjectsModifier? AirField?††††† 0.5Hostile
 AiStrategy.SetStrategicObjectsModifier? Base††††††††† 0.8Hostile
 AiStrategy.SetStrategicObjectsModifier? West††††††††† 4.0Neutral
 AiStrategy.SetStrategicObjectsModifier? Close†††††††† 2.0Neutral
 AiStrategy.SetStrategicObjectsModifier? AirField?††††† 0.5Neutral
 AiStrategy.SetStrategicObjectsModifier? Base†††††††† 0.8Neutral
 AiStrategy.SetStrategicObjectsModifier? ControlPoint2.0 
AiStrategy.CreateStrategy? finalPush
 AiStrategy.Aggression 0.9
 AiStrategy.NumberOfAttacks? 1
 AiStrategy.NumberOfDefences? 1
AiStrategy.SetPrerequisite? finalPushPrereq?
AiStrategy.SetStrategicObjectsModifier? Base††††††† 10.0 Hostile
 AiStrategy.SetStrategicObjectsModifier? AirField?†††† 2.0 Hostile
 AiStrategy.SetStrategicObjectsModifier? Base††††††† 10.0 Neutral
 AiStrategy.SetStrategicObjectsModifier? AirField?†††† 2.0 Neutral
AiStrategy.CreateStrategy? breakOut
 AiStrategy.Aggression 0.85
 AiStrategy.NumberOfAttacks? 1
 AiStrategy.NumberOfDefences? 1
AiStrategy.SetPrerequisite? breakOutPrereq?
AiStrategy.SetStrategicObjectsModifier? Safe†††††††† 0.05 Owned
 AiStrategy.SetStrategicObjectsModifier? Front††††††† 2.0 
AiStrategy.SetStrategicObjectsModifier? ControlPoint 4.0

You can go to the main AiDissection page (this is the last subsection of that page).

File Strategies.con (23 occurrences)

Required tokens:

Always used multiple times in each file:

AiStrategy.Aggression?
 AiStrategy.CreateStrategy?
 AiStrategy.NumberOfAttacks?
 AiStrategy.NumberOfDefences?
 AiStrategy.SetPrerequisite?
 AiStrategy.SetStrategicObjectsModifier?

Optional tokens:

Sometimes used once in each file:

AiStrategy.SetPrerequisiteWeight? (single: 1, in 23 files)

Sometimes used multiple times in each file (never just once):

AiStrategy.SetTreeModifier? (multiple: 1, in 23 files)
 AiStrategy.SetTreeModifierCombatStrength? (multiple: 1, in 23 files)
 AiStrategy.TimeLimit? (multiple: 19, in 23 files)

 

 

BOTS.CON

 

This file is used ONLY in single player campaign mode. It sucks in the bot names from game.rfa. These names can be referenced from within a map by changing the file contents from :

console.useRelativePaths? 0

run bf1942/game/common/britishnames
run bf1942/game/common/germannames

console.useRelativePaths? 1

to

run botnames/australiannames
run botnames/indonesiannames

where the folder botnames is in the same folder as bots.con (i.e. bf1942/levels/yourmapname/singleplayer) and the name lists are edited versions of the game.rfa copy.

Coralon

This file is used ONLY in single player instant battle mode. It sucks in the bot names from game.rfa. These names can be referenced from within a map by changing the file contents from :

console.useRelativePaths? 0

run bf1942/game/common/britishnames
run bf1942/game/common/germannames

console.useRelativePaths? 1

to

run botnames/australiannames
run botnames/indonesiannames

where the folder botnames is in the same folder as bots.con (i.e. bf1942/levels/yourmapname/singleplayer) and the name lists are edited versions of the game.rfa copy.

Coralon

AiTemplatePlugIn

HomePage | RecentChanges | Preferences

AiTemplatePlugIn.<variable> args...

Linked from ObjectPropertiesReference.

For the AI (bots), tells them how to operate the vehicle, I believe, as well as its worth in battle (what it should best be attacking) and its strategic worth.

Also see AiDissection.

AiTemplatePlugIn.AimHorizontalControl?objects.con 
AiTemplatePlugIn.AimRollControl?†† objects.con 
AiTemplatePlugIn.AimThrottleControl?objects.con 
AiTemplatePlugIn.AimVerticalControl?objects.con 
AiTemplatePlugIn.AvoidCollisionLookAhead?objects.con 
AiTemplatePlugIn.CoverSearchRadius?objects.con 
AiTemplatePlugIn.CoverValue†††††† object.con objects.con 
AiTemplatePlugIn.Create†††††††††† object.con objects.con 
AiTemplatePlugIn.DrivePitchControl?objects.con 
AiTemplatePlugIn.DriveRollControl?objects.con 
AiTemplatePlugIn.DriveThrottleControl?objects.con 
AiTemplatePlugIn.DriveTurnControl?objects.con 
AiTemplatePlugIn.EquipmentType††† objects.con 
AiTemplatePlugIn.IsTurnable?†††††† objects.con 
AiTemplatePlugIn.LodHeight?††††††† objects.con 
AiTemplatePlugIn.LookHorizontalControl?objects.con 
AiTemplatePlugIn.LookHorizontalLookAhead?objects.con 
AiTemplatePlugIn.LookHorizontalScale?objects.con 
AiTemplatePlugIn.LookHorizontalSensitivity?objects.con 
AiTemplatePlugIn.LookVerticalControl?objects.con 
AiTemplatePlugIn.LookVerticalLookAhead?objects.con 
AiTemplatePlugIn.LookVerticalScale?objects.con 
AiTemplatePlugIn.LookVerticalSensitivity?objects.con 
AiTemplatePlugIn.MaxClimbAngle?††† objects.con 
AiTemplatePlugIn.MaxRollAngle?†††† objects.con 
AiTemplatePlugIn.MaxSpeed?†††††††† objects.con 
AiTemplatePlugIn.MaxSpeedBumpinessFallOff?objects.con 
AiTemplatePlugIn.NBattleStrengths?objects.con 
AiTemplatePlugIn.PitchLookAhead?†† objects.con 
AiTemplatePlugIn.PitchScale?†††††† objects.con 
AiTemplatePlugIn.PitchSensitivity?objects.con 
AiTemplatePlugIn.RollLookAhead?††† objects.con 
AiTemplatePlugIn.RollScale?††††††† objects.con 
AiTemplatePlugIn.RollSensitivity?objects.con 
AiTemplatePlugIn.SetAlwaysTargetSoldier?objects.con 
AiTemplatePlugIn.SetBattleStrengthobjects.con 
AiTemplatePlugIn.SetCameraRelativeMaxRotationDeg?objects.con 
AiTemplatePlugIn.SetCameraRelativeMinRotationDeg?objects.con 
AiTemplatePlugIn.SetHasExposedSoldier?objects.con 
AiTemplatePlugIn.SetHearingProbability?objects.con 
AiTemplatePlugIn.SetIsAntiAircraft?objects.con 
AiTemplatePlugIn.SetSelectKey?†††† objects.con 
AiTemplatePlugIn.SetSoundSphereRadiusobjects.con 
AiTemplatePlugIn.SetStrategicStrengthobjects.con 
AiTemplatePlugIn.SetStrType?†††††† objects.con 
AiTemplatePlugIn.SetUseNoPathfindingToGetToObject?objects.con 
AiTemplatePlugIn.ThrottleLookAhead?objects.con 
AiTemplatePlugIn.ThrottleScale?††† objects.con 
AiTemplatePlugIn.ThrottleSensitivity?objects.con 
AiTemplatePlugIn.Transparency?†††† objects.con 
AiTemplatePlugIn.TurnRadius?†††††objects.con 
AiTemplatePlugIn.VehicleNumber?††† objects.con 
AiTemplatePlugIn.YawLookAhead?†††† objects.con 
AiTemplatePlugIn.YawScale?†††††††† objects.con 
AiTemplatePlugIn.YawSensitivity?†† objects.con 

Here are the values used in BF 1942 for each argument (feel free to erase this stuff once all of these are documented), from http://www.planetbattlefield.com/intel/mod/bf1942dirstructure.txt:

aiTemplate.addPlugIn 1: AA_AlliesArmament AA_AlliesCtr AA_AlliesPhysical AA_AlliesUnit AT25Armament AT25Ctr AT25Physical AT25Unit AfrhouseCover AfrhousePhysical AichiValArms AichiValCover AichiValCtrl AichiValMobile AichiValPhysical AichiValUnit Aichival-TArms Aichival-TCover Aichival-TCtrl Aichival-TMGArms Aichival-TMGCtrl Aichival-TMGUnit Aichival-TMobile Aichival-TPhysical Aichival-TUnit AichivalMGArms AichivalMGCtrl AichivalMGUnit AirrepairCover AirrepairPhysical AmmoboxCover AmmoboxPhysical B17Arms B17Cover B17Ctrl B17MGArms B17MGCtrl B17MGUnit B17Mobile B17Physical B17Unit BF109Arms ...
 aiTemplate.addType 1: ITAir ITBiological ITCover ITFixed ITGround ITLowPriority ITMobile ITNaval ITNoChildRender ITNoRender ITNoTemperature ITObstructedView ITProduction ITSampling ITScaleRender ITSoldier ITStructure ITTransportation ITUnit
 aiTemplate.allowedTimeDiff 1: -1 0.5 1 1.5 2 3 4 5 7
 aiTemplate.basicTemp 1: 1 10 100 12 120 13 15 2 20 3 30 35 4 5 50 6 7 9 90
 aiTemplate.commonKnowledge 1: 0 1
 aiTemplate.create 1: AA_Allies AT25 Afrhouse_m1 AichiVal Aichival-T Aichival-TMGAI AichivalMGAI Ammobox_m1 B17 B17MG BF109 BF110 BF110MGAI BerlinBridge_m1 Bunker2_m1 Cass_10_m1 Cass_11_m1 Cass_12_m1 Cass_1_m1 Cass_2_m1 Cass_3_m1 Cass_4_m1 Cass_5_m1 Cass_6_m1 Cass_7_m1 Cass_8_m1 Cass_9_m1 Chi-ha Chi-ha_TopMG Corsair Daihatsu DaihatsuMG DaihatsuPassanger3 DaihatsuPassanger4 DaihatsuPassanger5 DaihatsuPassanger6 DefGun Defgun_bunker_m1 Enterprise EnterpriseAA2 EnterpriseAA3 EnterpriseAA4 EnterpriseAA5 Flak38 ...
 aiTemplate.degeneration 1: 1 10 15 180 20 25 40 5 50 60 7 8 90
 aiTemplate.secondary 1: 1 5
 
 aiTemplatePlugIn.aimHorizontalControl 1: PIMouseLookX PINone PIYaw
 aiTemplatePlugIn.aimRollControl 1: PIRoll
 aiTemplatePlugIn.aimThrottleControl 1: PIThrottle
 aiTemplatePlugIn.aimVerticalControl 1: PIMouseLookY PINone PIPitch
 aiTemplatePlugIn.avoidCollisionLookAhead 1: 15.0
 aiTemplatePlugIn.coverSearchRadius 1: 20.0 50.0
 aiTemplatePlugIn.coverValue 1: 1.0 10.0 100.0 15.0 2.0 20.0 4.0 40.0 5.0 50.0 60.0 70.0 8.0 80.0 90.0
 aiTemplatePlugIn.create 1: Armament ControlInfo ControlInfo3d Cover Mobile Physical Unit
†††††††††††††††††††††††† 2: AA_AlliesArmament AA_AlliesCtrl AA_AlliesPhysical AA_AlliesUnit AT25Armament AT25Ctrl AT25Physical AT25Unit AfrhouseCover AfrhousePhysical AichiValArms AichiValCover AichiValCtrl AichiValMobile AichiValPhysical AichiValUnit Aichival-TArms Aichival-TCover Aichival-TCtrl Aichival-TMGArms Aichival-TMGCtrl Aichival-TMGUnit Aichival-TMobile Aichival-TPhysical Aichival-TUnit AichivalMGArms AichivalMGCtrl AichivalMGUnit AirrepairCover AirrepairPhysical AmmoboxCover AmmoboxPhysical B17Arms B17Cover B17Ctrl B17MGArms B17MGCtrl B17MGUnit B17Mobile B17Physical B17Unit ...
 aiTemplatePlugIn.drivePitchControl 1: PIPitch
 aiTemplatePlugIn.driveRollControl 1: PIRoll
 aiTemplatePlugIn.driveThrottleControl 1: PINone PIThrottle
 aiTemplatePlugIn.driveTurnControl 1: PIMouseLookX PINone PIYaw
 aiTemplatePlugIn.equipmentType 1: 0 1 10 11 12 13 14 2 3 4 5 6 7 8 9
 aiTemplatePlugIn.isTurnable 1: 1
 aiTemplatePlugIn.lodHeight 1: -1.5 0.25 0.5 0.65 0.7 0.75 0.8 0.9 1.0 1.2 1.35
 aiTemplatePlugIn.lookHorizontalControl 1: PIMouseLookX PIYaw
 aiTemplatePlugIn.lookHorizontalLookAhead 1: 1.0
 aiTemplatePlugIn.lookHorizontalScale 1: 1.0
 aiTemplatePlugIn.lookHorizontalSensitivity 1: -0.21817 -0.5235988
 aiTemplatePlugIn.lookVerticalControl 1: PIMouseLookY
 aiTemplatePlugIn.lookVerticalLookAhead 1: 1.0
 aiTemplatePlugIn.lookVerticalScale 1: 1.0
 aiTemplatePlugIn.lookVerticalSensitivity 1: 0.21817 0.4363323
 aiTemplatePlugIn.maxClimbAngle 1: 0.1700 0.20 0.3050 0.3333
 aiTemplatePlugIn.maxRollAngle 1: 0.5000 0.65 0.9 0.9000 0.9900 0.9999
 aiTemplatePlugIn.maxSpeed 1: 0.0 10.0 12.0 14.5 15.0 15.5 16.0 17.0 20.0 25.0 40.0 5.0 50.0 55.0 60.0
 aiTemplatePlugIn.maxSpeedBumpinessFallOff 1: 0.001 0.01
 aiTemplatePlugIn.NBattleStrengths 1: 6
 aiTemplatePlugIn.pitchLookAhead 1: 1.0 1.2
 aiTemplatePlugIn.pitchScale 1: 0.0010 0.0110 0.0420 0.1 1.0 5.0
 aiTemplatePlugIn.pitchSensitivity 1: -0.21817 -1.0 0.21817 0.4363323
 aiTemplatePlugIn.rollLookAhead 1: 1.0 1.5
 aiTemplatePlugIn.rollScale 1: 0.0020 0.0220 0.0680 0.0750 0.1 1.0 5.0
 aiTemplatePlugIn.rollSensitivity 1: -0.21817 -0.5235988 -1.3
 aiTemplatePlugIn.setAlwaysTargetSoldier 1: 1
 aiTemplatePlugIn.setBattleStrength 1: 0 1 2 3 4 5 Air HeavyArmour Infantry LightArmour NavalArmour Submarine
††††††††††††††††††††††††††††††††††† 2: 0.0 1.0 2.0 3.0 4.0 6.0
 aiTemplatePlugIn.setCameraRelativeMaxRotationDeg 1: 0/-9/0 0/0/0 10/6/0 100/0/0 100/1/0 110/0/0 110/10/0 120/10/0 120/30/0 16/5/0 180/0/0 180/10/0 180/2/0 180/5/0 20/5/0 25/0/0 26/12/0 30/5/0 360/10/0 360/2/0 360/35/0 360/4/0 360/5/0 360/6/0 40/1/0 60/1/0 60/10/0 70/15/0 70/30/0 8/6/0 80/45/0 90/0/0 90/10/0
 aiTemplatePlugIn.setCameraRelativeMinRotationDeg 1: -10/-15/0 -100/-10/0 -100/-15/0 -110/-10/0 -110/-40/0 -110/-60/0 -120/-18/0 -120/-60/0 -16/-20/0 -180/-20/0 -180/-45/0 -180/-65/0 -180/-70/0 -180/-80/0 -20/-40/0 -25/-40/0 -26/-20/0 -30/-15/0 -360/-10/0 -360/-20/0 -360/-45/0 -360/-50/0 -360/-80/0 -40/-34/0 -60/-40/0 -70/-45/0 -70/-70/0 -8/-40/0 -80/-45/0 -90/-30/0 -90/0/0 0/0/0
 aiTemplatePlugIn.setHasExposedSoldier 1: 1
 aiTemplatePlugIn.setHearingProbability 1: 0.01
††††††††††††††††††††††††††††††††††††††† 2: 0.1
 aiTemplatePlugIn.setIsAntiAircraft 1: 1
 aiTemplatePlugIn.setSelectKey 1: PIMenuSelect1 PIMenuSelect2 PIMenuSelect3 PIMenuSelect4 PIMenuSelect5 PIMenuSelect6
 aiTemplatePlugIn.setSoundSphereRadius 1: 0.0
†††††††††††††††††††††††††††††††††††††† 2: 15.0
 aiTemplatePlugIn.setStrategicStrength 1: 0 1
†††††††††††††††††††††††††††††††††††††† 2: 0 1 10 12 13 15 2 3 4 5 6 7 8 9
 aiTemplatePlugIn.setStrType 1: Air HeavyArmour Infantry LightArmour
 aiTemplatePlugIn.setUseNoPathfindingToGetToObject 1: 1
 aiTemplatePlugIn.throttleLookAhead 1: 1.0
 aiTemplatePlugIn.throttleScale 1: 1.0
 aiTemplatePlugIn.throttleSensitivity 1: -1.0 -3.0 1.0
 aiTemplatePlugIn.transparency 1: 0.5
 aiTemplatePlugIn.turnRadius 1: 0.1 100.0 25.0 30.0 5.0 50.0 75.0 80.0
 aiTemplatePlugIn.vehicleNumber 1: 0 1 2 3
 aiTemplatePlugIn.yawLookAhead 1: 0.3 1.0
 aiTemplatePlugIn.yawScale 1: 0.0020 0.0175 0.0275 0.0750 1.0
 aiTemplatePlugIn.yawSensitivity 1: -2.5 0.3 1.0

AiTemplatePlugIn

HomePage | RecentChanges | Preferences

AiTemplatePlugIn.<variable> args...

Linked from ObjectPropertiesReference.

For the AI (bots), tells them how to operate the vehicle, I believe, as well as its worth in battle (what it should best be attacking) and its strategic worth.

Also see AiDissection.

AiTemplatePlugIn.AimHorizontalControl?objects.con 
AiTemplatePlugIn.AimRollControl?†† objects.con 
AiTemplatePlugIn.AimThrottleControl?objects.con 
AiTemplatePlugIn.AimVerticalControl?objects.con 
AiTemplatePlugIn.AvoidCollisionLookAhead?objects.con 
AiTemplatePlugIn.CoverSearchRadius?objects.con 
AiTemplatePlugIn.CoverValue†††††† object.con objects.con 
AiTemplatePlugIn.Create†††††††††† object.con objects.con 
AiTemplatePlugIn.DrivePitchControl?objects.con 
AiTemplatePlugIn.DriveRollControl?objects.con 
AiTemplatePlugIn.DriveThrottleControl?objects.con 
AiTemplatePlugIn.DriveTurnControl?objects.con 
AiTemplatePlugIn.EquipmentType††† objects.con 
AiTemplatePlugIn.IsTurnable?†††††† objects.con 
AiTemplatePlugIn.LodHeight?††††††† objects.con 
AiTemplatePlugIn.LookHorizontalControl?objects.con 
AiTemplatePlugIn.LookHorizontalLookAhead?objects.con 
AiTemplatePlugIn.LookHorizontalScale?objects.con 
AiTemplatePlugIn.LookHorizontalSensitivity?objects.con 
AiTemplatePlugIn.LookVerticalControl?objects.con 
AiTemplatePlugIn.LookVerticalLookAhead?objects.con 
AiTemplatePlugIn.LookVerticalScale?objects.con 
AiTemplatePlugIn.LookVerticalSensitivity?objects.con 
AiTemplatePlugIn.MaxClimbAngle?††† objects.con 
AiTemplatePlugIn.MaxRollAngle?†††† objects.con 
AiTemplatePlugIn.MaxSpeed?†††††††† objects.con 
AiTemplatePlugIn.MaxSpeedBumpinessFallOff?objects.con 
AiTemplatePlugIn.NBattleStrengths?objects.con 
AiTemplatePlugIn.PitchLookAhead?†† objects.con 
AiTemplatePlugIn.PitchScale? ††††††objects.con 
AiTemplatePlugIn.PitchSensitivity?objects.con 
AiTemplatePlugIn.RollLookAhead?††† objects.con 
AiTemplatePlugIn.RollScale?††††††† objects.con 
AiTemplatePlugIn.RollSensitivity?objects.con 
AiTemplatePlugIn.SetAlwaysTargetSoldier?objects.con 
AiTemplatePlugIn.SetBattleStrengthobjects.con 
AiTemplatePlugIn.SetCameraRelativeMaxRotationDeg?objects.con 
AiTemplatePlugIn.SetCameraRelativeMinRotationDeg?objects.con 
AiTemplatePlugIn.SetHasExposedSoldier?objects.con 
AiTemplatePlugIn.SetHearingProbability?objects.con 
AiTemplatePlugIn.SetIsAntiAircraft?objects.con 
AiTemplatePlugIn.SetSelectKey?†††† objects.con 
AiTemplatePlugIn.SetSoundSphereRadiusobjects.con 
AiTemplatePlugIn.SetStrategicStrengthobjects.con 
AiTemplatePlugIn.SetStrType?†††††† objects.con 
AiTemplatePlugIn.SetUseNoPathfindingToGetToObject?objects.con 
AiTemplatePlugIn.ThrottleLookAhead?objects.con 
AiTemplatePlugIn.ThrottleScale?††† objects.con 
AiTemplatePlugIn.ThrottleSensitivity?objects.con 
AiTemplatePlugIn.Transparency?†††† objects.con 
AiTemplatePlugIn.TurnRadius?†††††† objects.con 
AiTemplatePlugIn.VehicleNumber?††† objects.con 
AiTemplatePlugIn.YawLookAhead?†††† objects.con 
AiTemplatePlugIn.YawScale?†††††††† objects.con 
AiTemplatePlugIn.YawSensitivity?†† objects.con 

Here are the values used in BF 1942 for each argument (feel free to erase this stuff once all of these are documented), from http://www.planetbattlefield.com/intel/mod/bf1942dirstructure.txt:

aiTemplate.addPlugIn 1: AA_AlliesArmament AA_AlliesCtr AA_AlliesPhysical AA_AlliesUnit AT25Armament AT25Ctr AT25Physical AT25Unit AfrhouseCover AfrhousePhysical AichiValArms AichiValCover AichiValCtrl AichiValMobile AichiValPhysical AichiValUnit Aichival-TArms Aichival-TCover Aichival-TCtrl Aichival-TMGArms Aichival-TMGCtrl Aichival-TMGUnit Aichival-TMobile Aichival-TPhysical Aichival-TUnit AichivalMGArms AichivalMGCtrl AichivalMGUnit AirrepairCover AirrepairPhysical AmmoboxCover AmmoboxPhysical B17Arms B17Cover B17Ctrl B17MGArms B17MGCtrl B17MGUnit B17Mobile B17Physical B17Unit BF109Arms ...
 aiTemplate.addType 1: ITAir ITBiological ITCover ITFixed ITGround ITLowPriority ITMobile ITNaval ITNoChildRender ITNoRender ITNoTemperature ITObstructedView ITProduction ITSampling ITScaleRender ITSoldier ITStructure ITTransportation ITUnit
 aiTemplate.allowedTimeDiff 1: -1 0.5 1 1.5 2 3 4 5 7
 aiTemplate.basicTemp 1: 1 10 100 12 120 13 15 2 20 3 30 35 4 5 50 6 7 9 90
 aiTemplate.commonKnowledge 1: 0 1
 aiTemplate.create 1: AA_Allies AT25 Afrhouse_m1 AichiVal Aichival-T Aichival-TMGAI AichivalMGAI Ammobox_m1 B17 B17MG BF109 BF110 BF110MGAI BerlinBridge_m1 Bunker2_m1 Cass_10_m1 Cass_11_m1 Cass_12_m1 Cass_1_m1 Cass_2_m1 Cass_3_m1 Cass_4_m1 Cass_5_m1 Cass_6_m1 Cass_7_m1 Cass_8_m1 Cass_9_m1 Chi-ha Chi-ha_TopMG Corsair Daihatsu DaihatsuMG DaihatsuPassanger3 DaihatsuPassanger4 DaihatsuPassanger5 DaihatsuPassanger6 DefGun Defgun_bunker_m1 Enterprise EnterpriseAA2 EnterpriseAA3 EnterpriseAA4 EnterpriseAA5 Flak38 ...
 aiTemplate.degeneration 1: 1 10 15 180 20 25 40 5 50 60 7 8 90
 aiTemplate.secondary 1: 1 5
 
 aiTemplatePlugIn.aimHorizontalControl 1: PIMouseLookX PINone PIYaw
 aiTemplatePlugIn.aimRollControl 1: PIRoll
 aiTemplatePlugIn.aimThrottleControl 1: PIThrottle
 aiTemplatePlugIn.aimVerticalControl 1: PIMouseLookY PINone PIPitch
 aiTemplatePlugIn.avoidCollisionLookAhead 1: 15.0
 aiTemplatePlugIn.coverSearchRadius 1: 20.0 50.0
 aiTemplatePlugIn.coverValue 1: 1.0 10.0 100.0 15.0 2.0 20.0 4.0 40.0 5.0 50.0 60.0 70.0 8.0 80.0 90.0
 aiTemplatePlugIn.create 1: Armament ControlInfo ControlInfo3d Cover Mobile Physical Unit
†††††††††††††††††††††††† 2: AA_AlliesArmament AA_AlliesCtrl AA_AlliesPhysical AA_AlliesUnit AT25Armament AT25Ctrl AT25Physical AT25Unit AfrhouseCover AfrhousePhysical AichiValArms AichiValCover AichiValCtrl AichiValMobile AichiValPhysical AichiValUnit Aichival-TArms Aichival-TCover Aichival-TCtrl Aichival-TMGArms Aichival-TMGCtrl Aichival-TMGUnit Aichival-TMobile Aichival-TPhysical Aichival-TUnit AichivalMGArms AichivalMGCtrl AichivalMGUnit AirrepairCover AirrepairPhysical AmmoboxCover AmmoboxPhysical B17Arms B17Cover B17Ctrl B17MGArms B17MGCtrl B17MGUnit B17Mobile B17Physical B17Unit ...
 aiTemplatePlugIn.drivePitchControl 1: PIPitch
 aiTemplatePlugIn.driveRollControl 1: PIRoll
 aiTemplatePlugIn.driveThrottleControl 1: PINone PIThrottle
 aiTemplatePlugIn.driveTurnControl 1: PIMouseLookX PINone PIYaw
 aiTemplatePlugIn.equipmentType 1: 0 1 10 11 12 13 14 2 3 4 5 6 7 8 9
 aiTemplatePlugIn.isTurnable 1: 1
 aiTemplatePlugIn.lodHeight 1: -1.5 0.25 0.5 0.65 0.7 0.75 0.8 0.9 1.0 1.2 1.35
 aiTemplatePlugIn.lookHorizontalControl 1: PIMouseLookX PIYaw
 aiTemplatePlugIn.lookHorizontalLookAhead 1: 1.0
 aiTemplatePlugIn.lookHorizontalScale 1: 1.0
 aiTemplatePlugIn.lookHorizontalSensitivity 1: -0.21817 -0.5235988
 aiTemplatePlugIn.lookVerticalControl 1: PIMouseLookY
 aiTemplatePlugIn.lookVerticalLookAhead 1: 1.0
 aiTemplatePlugIn.lookVerticalScale 1: 1.0
 aiTemplatePlugIn.lookVerticalSensitivity 1: 0.21817 0.4363323
 aiTemplatePlugIn.maxClimbAngle 1: 0.1700 0.20 0.3050 0.3333
 aiTemplatePlugIn.maxRollAngle 1: 0.5000 0.65 0.9 0.9000 0.9900 0.9999
 aiTemplatePlugIn.maxSpeed 1: 0.0 10.0 12.0 14.5 15.0 15.5 16.0 17.0 20.0 25.0 40.0 5.0 50.0 55.0 60.0
 aiTemplatePlugIn.maxSpeedBumpinessFallOff 1: 0.001 0.01
 aiTemplatePlugIn.NBattleStrengths 1: 6
 aiTemplatePlugIn.pitchLookAhead 1: 1.0 1.2
 aiTemplatePlugIn.pitchScale 1: 0.0010 0.0110 0.0420 0.1 1.0 5.0
 aiTemplatePlugIn.pitchSensitivity 1: -0.21817 -1.0 0.21817 0.4363323
 aiTemplatePlugIn.rollLookAhead 1: 1.0 1.5
 aiTemplatePlugIn.rollScale 1: 0.0020 0.0220 0.0680 0.0750 0.1 1.0 5.0
 aiTemplatePlugIn.rollSensitivity 1: -0.21817 -0.5235988 -1.3
 aiTemplatePlugIn.setAlwaysTargetSoldier 1: 1
 aiTemplatePlugIn.setBattleStrength 1: 0 1 2 3 4 5 Air HeavyArmour Infantry LightArmour NavalArmour Submarine
†††††††††††††††††††† †††††††††††††††2: 0.0 1.0 2.0 3.0 4.0 6.0
 aiTemplatePlugIn.setCameraRelativeMaxRotationDeg 1: 0/-9/0 0/0/0 10/6/0 100/0/0 100/1/0 110/0/0 110/10/0 120/10/0 120/30/0 16/5/0 180/0/0 180/10/0 180/2/0 180/5/0 20/5/0 25/0/0 26/12/0 30/5/0 360/10/0 360/2/0 360/35/0 360/4/0 360/5/0 360/6/0 40/1/0 60/1/0 60/10/0 70/15/0 70/30/0 8/6/0 80/45/0 90/0/0 90/10/0
 aiTemplatePlugIn.setCameraRelativeMinRotationDeg 1: -10/-15/0 -100/-10/0 -100/-15/0 -110/-10/0 -110/-40/0 -110/-60/0 -120/-18/0 -120/-60/0 -16/-20/0 -180/-20/0 -180/-45/0 -180/-65/0 -180/-70/0 -180/-80/0 -20/-40/0 -25/-40/0 -26/-20/0 -30/-15/0 -360/-10/0 -360/-20/0 -360/-45/0 -360/-50/0 -360/-80/0 -40/-34/0 -60/-40/0 -70/-45/0 -70/-70/0 -8/-40/0 -80/-45/0 -90/-30/0 -90/0/0 0/0/0
 aiTemplatePlugIn.setHasExposedSoldier 1: 1
 aiTemplatePlugIn.setHearingProbability 1: 0.01
††††††††††††††††††††††††††††††††††††††† 2: 0.1
 aiTemplatePlugIn.setIsAntiAircraft 1: 1
 aiTemplatePlugIn.setSelectKey 1: PIMenuSelect1 PIMenuSelect2 PIMenuSelect3 PIMenuSelect4 PIMenuSelect5 PIMenuSelect6
 aiTemplatePlugIn.setSoundSphereRadius 1: 0.0
†††††††††††††††††††††††††††††††††††††† 2: 15.0
 aiTemplatePlugIn.setStrategicStrength 1: 0 1
†††††††††††††††††††††††††††††††††††††† 2: 0 1 10 12 13 15 2 3 4 5 6 7 8 9
 aiTemplatePlugIn.setStrType 1: Air HeavyArmour Infantry LightArmour
 aiTemplatePlugIn.setUseNoPathfindingToGetToObject 1: 1
 aiTemplatePlugIn.throttleLookAhead 1: 1.0
 aiTemplatePlugIn.throttleScale 1: 1.0
 aiTemplatePlugIn.throttleSensitivity 1: -1.0 -3.0 1.0
 aiTemplatePlugIn.transparency 1: 0.5
 aiTemplatePlugIn.turnRadius 1: 0.1 100.0 25.0 30.0 5.0 50.0 75.0 80.0
 aiTemplatePlugIn.vehicleNumber 1: 0 1 2 3
 aiTemplatePlugIn.yawLookAhead 1: 0.3 1.0
 aiTemplatePlugIn.yawScale 1: 0.0020 0.0175 0.0275 0.0750 1.0
 aiTemplatePlugIn.yawSensitivity 1: -2.5 0.3 1.0

 

 

KitTemplate

HomePage | RecentChanges | Preferences

KitTemplate.<variable> args...

Linked from ObjectPropertiesReference.

Used for the AI (bots), this class sets the value of each soldier. The SetBattleStrength values specify how well the type of soldier does against various vehicles and other soldiers, the SetStrategicStrength specifies the general range and effectiveness of the soldier.

This class is used in only one file, objects\Items\BaseKit?\Ai\Objects.con.

Related class: AiTemplatePlugIn.

Also see AiDissection.

KitTemplate.Create††††††††††††††† objects.con 
KitTemplate.SetBattleStrength†††† objects.con 
KitTemplate.SetStrategicStrengthobjects.con 

Here are the values used in BF 1942 for each argument, from http://www.planetbattlefield.com/intel/mod/bf1942dirstructure.txt:

kitTemplate.create 1: AT Assault Engineer Medic Scout
††††††††††††††††††† 2: AT Assault Engineer Medic Scout
 kitTemplate.setBattleStrength 1: Air HeavyArmour Infantry LightArmour NavalArmour Submarine
†††††††††††††††††††††††††††††† 2: 0.0 1.0 2.0 3.0 4.0 6.0 8.0
 kitTemplate.setStrategicStrength 1: 0 1
††††††††††††††††††††††††††††††††† 2: 1 2

EquipmentType

HomePage | RecentChanges | Preferences

AiTemplatePlugIn.EquipmentType <#>

An essential parameter to get the AI to work on newly created vehicles and weapon systems.

Setting an invalid value for EquipmentType will make the bots ignore the vehicle. See the tables in the Excel reference, which can be found at http://rex3d.com/bf/ at the "AI (Bots)" link.

SetStrategicStrength

HomePage | RecentChanges | Preferences

AiTemplatePlugIn.SetStrategicStrength <0/1> <#>
KitTemplate.
SetStrategicStrength <0/1> <#>

This is an essential property to get the AI to work on newly created vehicles and weapon systems. The first value is 0 or 1, the second ranges from 0 to 15.

SetStrategicStrength is a value that sets the importance of the PCO (player controlled object), but higher values seem to not only attract friendly bots but also enemy fire, so be prudent with high figures and stick to the values given on the tables in the Excel reference, which can be found at http://rex3d.com/bf/ at the "AI (Bots)" link.

These values are always set in pairs, the first argument being 0 or 1, e.g.

AiTemplatePlugIn.SetStrategicStrength 0 7
 AiTemplatePlugIn.SetStrategicStrength 1 5

diehardDanny writes: The first setting seems either speed or range of the vehicle or soldier, the second one seems to be some sort of firepower. This is verified by looking at the soldiers in KitTemplate, a sniper and AT soldier have a value of "0 2", (everyone else is "0 1") since they tend to have a longer range effect. The AT and engineer have a firepower value of "1 2" (everyone else is "1 1").

The list helps you compare values between vehicles and therefore helps making the right conclusions.

The example here is a powerful vehicle with long range, a destroyer.

The bots seem to prefer vehicles with a greater strategic strength, but it seems so do the enemy bots, they attack those vehicles with priority.

Weapons.con

HomePage | RecentChanges | Preferences

Weapons.con file Contents

Linked from ConFileReference.

Every Firearm you create in weapons.con needs its own section in the file Ai\weapons.con. 'ObjectTemplate.AiTemplate <AIPCOname>' must be located in the 'ObjectTemplate.Create FireArms? <name>' section of the original (non-AI) weapons.con file! I do not recommend setting the same values for the primary and secondary weapon as the AI might have a hard time to decide which one to use to engage the target. Set the values on your own preferences rather than what it might be in real life.

Note that for the hand weapons, the data normally in the weapons.con is included in the Objects.con file.

Related files: Objects.con, Physics.con

Here are some subcategories of this type of file, since there are so many:

Weapons.con/StationaryWeapons
 Weapons.con/AirVehicles
 Weapons.con/LandVehicles
 Weapons.con/SeaVehicles

File weapons.con (111 occurrences)

Optional properties used in this type of file (i.e. no properties are always present)

Sometimes used once (and only once) in each file:

FadeAtTimeToLiveAfterDeath (single: 1, in 111 files) - yes, there's really no class specified; weird
 ObjectTemplate.ExplodeNearEnemyDistance (single: 5, in 111 files)
 ObjectTemplate.ForceOnExplosion (single: 5, in 111 files)
 ObjectTemplate.Haspointphysics? (single: 1, in 111 files)
 ObjectTemplate.SetAsynchronyFire (single: 5, in 111 files)
 ObjectTemplate.SetInputFire (single: 15, in 111 files)
 ObjectTemplate.SetInputId? (single: 2, in 111 files)
 ObjectTemplate.SetVisibleDummyProjectileTemplate? (single: 1, in 111 files)
 ObjectTemplate.SetWingLift (single: 1, in 111 files)
 ObjectTemplate.StartEffectTemplate? (single: 1, in 111 files)
 ObjectTemplate.Startoneffects? (single: 2, in 111 files)
 ObjectTemplate.TimeOnEndEffect? (single: 1, in 111 files)
 ObjectTemplate.VisibleDummyProjectileTemplate (single: 3, in 111 files)
 WeaponTemplate.ExitVelocity (single: 1, in 111 files)
 WeaponTemplate.Healing (single: 2, in 111 files)
 WeaponTemplate.IsThrown (single: 2, in 111 files)
 WeaponTemplate.UseAimerOnly? (single: 1, in 111 files)

Sometimes used once or more in each file:

ObjectTemplate.AddTemplate (single: 27, multiple: 26, in 111 files)
 ObjectTemplate.AiTemplate (single: 37, multiple: 18, in 111 files)
 ObjectTemplate.AmmoType (single: 14, multiple: 9, in 111 files)
 ObjectTemplate.AutoReload (single: 23, multiple: 1, in 111 files)
 ObjectTemplate.Create (single: 42, multiple: 40, in 111 files)
 ObjectTemplate.CreateNotInGrid (single: 36, multiple: 8, in 111 files)
 ObjectTemplate.DamageType (single: 26, multiple: 3, in 111 files)
 ObjectTemplate.DetonateOnWaterCollision? (single: 2, multiple: 1, in 111 files)
 ObjectTemplate.DieAfterColl (single: 8, multiple: 2, in 111 files)
 ObjectTemplate.Drag (single: 3, multiple: 1, in 111 files)
 ObjectTemplate.EndEffectTemplate (single: 8, multiple: 1, in 111 files)
 ObjectTemplate.FireInCameraDof (single: 2, multiple: 1, in 111 files)
 ObjectTemplate.FireingForce (single: 17, multiple: 1, in 111 files)
 ObjectTemplate.Geometry (single: 31, multiple: 26, in 111 files)
 ObjectTemplate.GravityModifier (single: 27, multiple: 6, in 111 files)
 ObjectTemplate.HasCollisionEffect (single: 39, multiple: 8, in 111 files)
 ObjectTemplate.HasCollisionPhysics (single: 39, multiple: 9, in 111 files)
 ObjectTemplate.HasMobilePhysics (single: 37, multiple: 8, in 111 files)
 ObjectTemplate.HasOnTimeEffect? (single: 6, multiple: 1, in 111 files)
 ObjectTemplate.HasResponsePhysics (single: 36, multiple: 8, in 111 files)
 ObjectTemplate.HasStartEffect? (single: 2, multiple: 1, in 111 files)
 ObjectTemplate.Invisible (single: 5, multiple: 1, in 111 files)
 ObjectTemplate.InvisibleAtEndEffect? (single: 5, multiple: 1, in 111 files)
 ObjectTemplate.LoadSoundScript (single: 39, multiple: 24, in 111 files)
 ObjectTemplate.MagSize (single: 38, multiple: 19, in 111 files)
 ObjectTemplate.MagType (single: 2, multiple: 1, in 111 files)
 ObjectTemplate.Mass (single: 3, multiple: 1, in 111 files)
 ObjectTemplate.Material (single: 41, multiple: 9, in 111 files)
 ObjectTemplate.Material2 (single: 40, multiple: 6, in 111 files)
 ObjectTemplate.NumOfMag (single: 38, multiple: 19, in 111 files)
 ObjectTemplate.ProjectilePosition (single: 38, multiple: 19, in 111 files)
 ObjectTemplate.ProjectileTemplate (single: 38, multiple: 19, in 111 files)
 ObjectTemplate.Radius (single: 15, multiple: 3, in 111 files)
 ObjectTemplate.RecoilSize (single: 19, multiple: 3, in 111 files)
 ObjectTemplate.RecoilSpeed (single: 19, multiple: 3, in 111 files)
 ObjectTemplate.ReloadTime (single: 29, multiple: 9, in 111 files)
 ObjectTemplate.RoundOfFire (single: 38, multiple: 19, in 111 files)
 ObjectTemplate.SetHasPointPhysics? (single: 2, multiple: 1, in 111 files)
 ObjectTemplate.SetMinDev (single: 4, multiple: 1, in 111 files)
 ObjectTemplate.SetNetworkableInfo (single: 33, multiple: 16, in 111 files)
 ObjectTemplate.SetPosition (single: 26, multiple: 10, in 111 files)
 ObjectTemplate.SetRotation (single: 24, multiple: 8, in 111 files)
 ObjectTemplate.SetTracerTemplate (single: 14, multiple: 3, in 111 files)
 ObjectTemplate.StopAtEndEffect (single: 21, multiple: 5, in 111 files)
 ObjectTemplate.TimeToLive (single: 41, multiple: 9, in 111 files)
 ObjectTemplate.Velocity (single: 38, multiple: 19, in 111 files)
 ObjectTemplate.VisibleBarrelTemplate? (single: 14, multiple: 1, in 111 files)
 WeaponTemplate.Burst (single: 66, multiple: 20, in 111 files)
 WeaponTemplate.Create (single: 66, multiple: 20, in 111 files)
 WeaponTemplate.Indirect (single: 66, multiple: 20, in 111 files)
 WeaponTemplate.MaxRange (single: 66, multiple: 20, in 111 files)
 WeaponTemplate.MinRange (single: 66, multiple: 20, in 111 files)
 WeaponTemplate.SetSoundSphereRadius (single: 13, multiple: 2, in 111 files)
 WeaponTemplate.WeaponActivate (single: 66, multiple: 20, in 111 files)
 WeaponTemplate.WeaponFire (single: 66, multiple: 20, in 111 files)

Sometimes used multiple times in each file (never just once):

ObjectTemplate.AddFireArmsPosition (multiple: 19, in 111 files)
 ObjectTemplate.AddSkeletonIK (multiple: 2, in 111 files)
 ObjectTemplate.DistToMinDamage (multiple: 1, in 111 files)
 ObjectTemplate.DistToStartLoseDamage (multiple: 1, in 111 files)
 ObjectTemplate.MinDamage (multiple: 1, in 111 files)
 ObjectTemplate.SaveInSeparateFile (multiple: 2, in 111 files)
 ObjectTemplate.YModOnExplosion (multiple: 1, in 111 files)
 WeaponTemplate.Deviation (multiple: 2, in 111 files)
 WeaponTemplate.SetStrength (multiple: 66, in 111 files)

Also seen were:

TimeToLiveAfterDeath (single: 1, in 111 files)
 TimeToStartFadeAfterDeath (single: 1, in 111 files)

I suspect these are in error, that an ObjectTemplate should have preceded them.