Skip to content

Scripts

Mapping

Registers ordered team-mission lists containing up to fifty mission and argument pairs.

Format
Kind
Record
File
AI.INI, AIFS.INI, map file
Registered in
[ScriptTypes]
Section
[<Script ID>]
Record form
<slot>=<mission>,<argument>

Fields

#FieldAccepted valueRequired
1MissionTeam mission indexYes
2ArgumentInteger interpreted by the selected missionYes

Each value in [ScriptTypes] is a script ID, and the section with that name holds the script. The number to the left of a [ScriptTypes] line only names the line. Give each line a distinct number: a repeated number replaces the earlier line in the same file, as INI syntax describes, so the earlier script is not loaded.

In a script section, Name= gives the display name and the numbered lines 0 through 49 hold the missions in order. The game reads those lines in number order and packs them together, so gaps in the numbering are skipped. Lines numbered 50 or higher are ignored. Each mission page says what its argument means.

AI.INI, AIFS.INI, or map file
[ScriptTypes]
0=MyAttackScript
[MyAttackScript]
Name=Attack any enemy
0=0,1 ; Attack, with argument 1 (any suitable enemy)

The game reads scripts from AI.INI, then from AIFS.INI when Firestorm is enabled, then from the map file. OPENTS.INI can rename the two AI files. When a later file lists a script ID that an earlier one already loaded, the later file’s section replaces that script’s missions. If the later file lists the ID but has no section for it, the earlier script is kept unchanged.

Accepted settings

1 of 1

KeyDescriptionValueWhen omitted
Name[<ObjectType ID>]The display name of a type definition, a scenario, a multiplayer map, or a music track.stringthe type's section name

Source files

Linked at revision 51b52aa38392.