AI Params file

Contents of AIPARAMS.CSV File:
&&BUILDSEQUENCE - the equipment classes which will be built by the AI and Ministers, with options for Offense/Mixed/Defense preference

&&UNITWEIGHTING - the weights given to different unit stats when the minister is considering building new units. There is an offensive and defensive preference (mixed will average the two)

&&MISSILEWEIGHTING - same format as &&UNITWEIGHTING

&&AIREQRESPONSE - the classes of units used when responding to different unit requests (such as garrison, attack, air support, etc)

&&AIBUILDARRAY - list of facilities the AI will use when building bases or production

How the file gets loaded:
AIPARAMS.CSV is loaded by the ALLLOAD.INI file. This has two different ways of being loaded: "1) For scenarios, sandboxes and campaigns that ship with the game, it is specified in the .scenario file.""2) For Modded games, it is loaded based on the file name specified in an 'inclfile:' line in the .scenario file. All of our .scenario files do not have this line, and so the default - 'ALLLOAD.INI' is used."If you replace the ALLLOAD.INI or the AIPARAMS.CSV with a custom version that has values for additional regions, the file will be used for ALL the existing sandbox/scenario/campaign games and save games the player starts. The data in this file is NOT stored in a cache or save game. This means that you need to take extra steps to make sure it is loaded with save games - and if a save game file is emailed to someone else, they will use the default file if they don't have your file on their system.

For Multiplayer Games, this data *should not* be sync critical - that means different players can use different AIPARAMS files without causing sync errors. This has not been well tested, and may not in fact be true. In Multiplayer games, each local player uses their own AIPARAM files, and all the AI regions use the file of the host machine.

How to specify a different file in your sandbox/scenario:
You will need to provide your own custom file to replace ALLLOAD.INI. I suggest you don't overwrite the existing one, unless your intention is to change all the existing sandboxes/scenarios/campaigns that ship with the game. Otherwise, to use a different file, simply add the following to the bottom of your .scenario file for your custom game:

inclfile: "MYFILE"

By default, this file will be loaded from the \INI directory. There is a limit of 18 characters to this file name, so it is not feasible to add a directory override to the file name. This file is a list of non-cached data files, one of which is "AIPARAMS.CSV". If you create a custom MYFILE.INI, make sure you still load all the other elements that are in the default file !

In this file you can specify a full path for your stuff, so you can do something like:


 * 1) include "MYAIPARAMS.CSV", "SCENARIO\\CUSTOM\\MYMOD\\"

How to specify AIPARAMS for different regions
First of all, every game MUST have those sections for default regions - which means the region number is 0 or blank. Any region without its own custom section will use the default section.

To add new custom sections per region, just do it the same way as the default sections but add the region number at the end of the && line, for example:

&&AIREQRESPONSE 1188

That specifies region 1188, SR1936 Germany

Again this data is not stored in a cache or save game, and so these sections cannot be included in the Region Data (CVP) file, they must be added to the existing AIPARAMS or added to the ALLLOAD or 'inclfile'.

The AI Parameters File (AIParams.csv) is stored in the \INI\ directory and contains the following sections:

&&BUILDSEQUENCE
This determines the AI's sequence of building different classes of units when Ministers or AI Rulers use 'Autobuild' at military bases. Each cell refers to the Unit Class to be built, with the following values added to the class number to specify additional features:


 * + 128 : 'mobile preference' (avoid walking or towed units)
 * + 64 : 'missile preference' (prefer units with missile capacity)
 * + 32 : 'engineer preference' (prefer units with engineering capabilities)

There are three lines each for Land, Air, and Naval, with the first line of each group being Defense priority, the middle being mixed, and the last being Offense priority. This priority is set by the human player or the AI ruler.

&&UNITWEIGHTING
For each Unit Class this provides the weighting of different specs to determine what unit should be built from the available designs.

&&MISSILEWEIGHTING
As above except for this is for the production of missiles; the lines refer to the types of missile targets being prioritized.

&&AIREQRESPONSE
This section specifies the units to be used by the AI or Minister to respond to situations and hotspots on the map. The lines, in order, represent the type of AI military request. The first ten of these are also an exact match to the Hotspot-Request types that the human player can issue; the last six are used by the AI only.


 * 0 AIREQGARRISON Request to Garrison a hex for defense
 * 1 AIREQDEFENSE Request defensive-oriented units for area
 * 2 AIREQASSISTANCE Request 'assistance', for instance if a battle is going badly
 * 3 AIREQSUPPLIES Request resupply
 * 4 AIREQAIRSUPPORT Request air support for ground units
 * 5 AIREQLANDTRANSPORT Request transport units to be dispatched
 * 6 AIREQSEASUPPLY Request Sea resupply
 * 7 AIREQSEAATTACK Request Naval attack units
 * 8 AIREQATTACK Request (on land) attack units
 * 9 AIREQBATTLESUPPORT Request support for a land battle (not used by AI at present)

AI (both minister and AI-player) use only:


 * 10 AIREQCITYRESCUE Requested by Cities taken over if loyalty is to us
 * 11 AIREQAIRINTERCEPT Request intercept of airspace violation
 * 12 AIREQCITYLOST City was lost, request attempt to retake it
 * 13 AIREQBASELOST Base was lost
 * 14 AIREQINDUSTRYLOST Industrial complex was lost
 * 15 AIREQLANDLOST Land in general was lost

For Galactic Ruler, the following additional AI Request Types are implement for SPACE Levels (System / Galaxy)


 * 16 AIREQSGARRISON Request to Garrison a hex for defense
 * 17 AIREQSDEFENSE Request defensive-oriented units for area
 * 18 AIREQSASSISTANCE Request 'assistance', for instance if a battle is going badly
 * 19 AIREQSSUPPLIES Request resupply
 * 20 AIREQSSUPPORT Request support (tbd)
 * 21 AIREQSTRANSPORT Request transport units to be dispatched
 * 22 AIREQSSURVEY Request Survey of Planet/location
 * 23 AIREQSCOLONIZE Request Colonization uni9ts
 * 24 AIREQSATTACK Request attack units
 * 25 AIREQSBATTLESUPPORT Request support for a battle (not used by AI at present)

AI (both minister and AI-player) use only:


 * 26 AIREQSPLANETRESCUE Requested by Planets taken over if loyalty is to us
 * 27 AIREQSINTERCEPT Request intercept of owned space violation
 * 28 AIREQSPLANETLOST Planet was lost, request attempt to retake it
 * 29 AIREQSBASELOST Base was lost
 * 30 AIREQSRESVD30
 * 31 AIREQSSPACELOST Space ownership in general was lost

Each request has an importance attached to it by the AI (or the human in case of hotspots), which determines how many units will respond to a request; units are requested in column order, after all 8 columns are done it loops back to column 1.

Note: the contents of the AIParams file were edited and updated as part of recent updates, so when modding it make sure you start from the latest version.

&&AIBUILDARRAY
This is a list of facility/upgrade ID numbers that the AI will use when building facilities.

36 entries:

resv/resv/resv/resv, resv/resv/resv/resv, land/air/sea/mis production, 12x Terrain Prod, 12x Synth Prod