(info) Most of the information here is for Warzone 3.1 and above.

Artificial Intelligence (.ai) Files

An .ai file defines the settings for an AI bot (computer player) script.

 

File Format

Despite its .ai extension, this has nothing to do with Adobe Illustrator – it's a plan text file that you can open with any text editor.

Like many Warzone config files, the Windows .ini file format is used.

[AI]
name = "NullBot v1.32"
js = nullbot-1-32-ge.js
tip = "NullBot - an adaptive skirmish AI"

The file has just one section, "[AI]", in to which all properties are placed in "key = value" format.

Properties for new AIs based on Javascript API

PropertyRequiredTypeValueExample
name(tick)String

The name of the AI that will be shown to end-users when choosing which AI scripts they want to play against.

Must be enclosed in quotes

"NullBot v1.38"
js(tick)Filename

The filename, with path relative to the location of the .ai file.

This must be a .js file, with no quotes.

nullbot-1-38-generic.js
tip(error)String

Optionally specify a tool-tip to appear when the mouse hovers over the AI's name in the list of AIs on the game setup screen.

Must be enclosed in quotes.

"NullBot - an adaptive skirmish AI"

Properties for old AIs based on WZscript API

Older AIs use wzscript instead of Javascript. Their .ai files are slightly different as they must reference .vlo and .slo files.

PropertyRequiredTypeValueExample
name(tick)StringThe name of the AI that will be shown to end-users when choosing which AI scripts they want to play against."Nexus"
vlo(tick)Filename

The filename, with path relative to the location of the .ai file.

This must be a .vlo file.

nexus.vlo
slo(tick)Filename

The filename, with path relative to the location of the .ai file.

This must be a .slo file.

nexus.slo
tip(error)StringOptionally specify a tool-tip to appear when the mouse hovers over the AI's name in the list of AIs on the game setup screen."Default AI"

And remember...

File location

The .ai files bundled with Warzone can be found here:

mp.wz or mp

multiplay

skirmish

*.ai

If you want to define an AI in your mod, its .ai file should be here:

 <your mod>.wz or <your mod>

 multiplay

skirmish

<filename>.ai

Obviously you will also need to include the script files referenced in the .ai file. These are usually stored in the same folder.

Availability

Available for:

  • Warzone 3.1 and above.

See also

If you're using Javascript for your AIs, see:

If you're using older WZscript for your AIs, see:

You should also be familiar with:

You can use AIs elsewhere: