<mapname>.ini

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

<mapname>.ini

Defines the name, number of players and default team settings for a map...

 

Overview

If this file is included with your map, it overrides the default settings on the Skirmish Game Screen and Multiplayer Game Screen. Additionally, it allows you to lock certain options on those screens so they can't be changed by end-users.

If the ini file isn't included with a map, things work just as they did in Warzone 3.1 and earlier with most defaults being pulled from config.

Syntax

The file uses the standard .ini file format. It should be named based on your map name. For example, if your map is 4c-fishnet.map, the .ini file would be 4c-fishnet.ini. An very basic example file is shown below:

Example: 4c-fishnet.ini
[map] name = "Fishnet" maxPlayers = 4 file = 4c-fishnet [player_0] team = 0 [player_1] team = 1 [player_2] team = 1 [player_3] team = 0

The example show above is likely the most common use for the ini file as it allows map makers to define suitable teams for players based on how they intended the map to be played.

The following sections are currently available:

  • [map] – defines map name, file and number of players

  • [defaults] – defines defaults for the settings on the Skirmish Game Screen and Multiplayer Game Screen

  • [player_N] – one section per player, defines the settings on the Players Panel

  • [scripts] – allows you to override rules.js and optionally run additional scripts for each player

  • [locked] – allows you to lock certain settings so the user can't change them

[map] section

This section is optional, it defines which map is associated with the .ini file...

Property

Type

Mandatory

Notes

Related documentation

Game version

Property

Type

Mandatory

Notes

Related documentation

Game version

name

String

Human-readable map name, shown in UI when setting up the game.

Example: "Fishnet"

Default: The map filename, excluding extension. Eg: On '4c-fishnet.map' the name property would default to "4c-fishnet".

mapName?

3.2

maxPlayers

Number

The number of player slots defined on the map.

Example: 4

Default: Determined by inspecting the structures/units pre-placed on the map (excluding scavenger player).

maxPlayers

3.2

file

Filename

The filename of the map, excluding path and extension.

Example: 4c-fishnet

Default: The name of the map file, excluding the extension. Eg: On '4c-fishnet.map' the file would default to "4c-fishnet".

 mapName?

3.2

[defaults] section

This section is optional and sets defaults to use on the Skirmish Game Screen and Multiplayer Game Screen...

Property

Type

Mandatory

Notes

Related documentation

Game version

Property

Type

Mandatory

Notes

Related documentation

Game version

alliances

Constant

What is the default alliance mode?

Note: The alliance mode affects default game Victory Conditions.

Example: 1

Default: As defined on Skirmish Game Screen or Multiplayer Game Screen, which in turn take their defaults from config.

alliancesType

Players & Alliances

allianceExistsBetween()

setAlliance()

Victory Conditions

Multiplayer Features

Images, Icons & Cursors 

3.2

bases

Constant

What is the default player base type?

Note: See Player Initialisation for full details of the effects of this setting.

Example: 2

Default: As defined on Skirmish Game Screen or Multiplayer Game Screen, which in turn take their defaults from config.

baseType

Player Initialisation

Images, Icons & Cursors 

3.2

power

Constant

What is the default power output of oil derricks?

  • 0 – low power output (400 per game minute)

  • 1 – medium power output (700 per game minute)

  • 2 – high power output (1000 per game minute)

Example: 1

Default: As defined on Skirmish Game Screen or Multiplayer Game Screen, which in turn take their defaults from config.

powerType

OIL_RESOURCE

RESOURCE_EXTRACTOR

POWER_GEN 

power

playerPower()

setPowerModifier()

setPower()

donatePower()

Images, Icons & Cursors 

3.2

scavengers

Boolean

Should scavengers be enabled by default?

  • 0 – no, disable scavengers

  • 1 – yes, enable scavengers

Note: Be sure to test your map with Ultimate Scavenger Mod if you enable scavengers.

Example: 1

Default: As defined on Skirmish Game Screen or Multiplayer Game Screen, which in turn take their defaults from config.

scavengers

scavengerPlayer

Scavenger Faction

Adding Scavengers to Maps

Player Scripts

Images, Icons & Cursors 

3.2

[player_N] sections

These sections are optional and define defaults for the players on the map such as their team, starting position and, if applicable, AI settings.

Replace "N" with the zero-referenced player ID. The human game host is always [player_0]. Currently there are a maximum of 10 players on a map so valid values of "N" range from 0 → 9. The scavenger faction is always defined separately (see [locked] and [defaults] sections for mode details).

Property

Type

Mandatory

Notes

Related documentation

Game version

Property

Type

Mandatory

Notes

Related documentation

Game version

ai

Filename

Which AI bot, if any, will control this player?

Note: This is not an .ai file, it is the filename (without path or extension) of the .js file containing the AI.

Example: semperfi.js

Default: null = No AI associated with player.

Warzone will search multiplay/skirmish/ folder for the file.

If the file isn't found, the game will crash logging the error. Keep this in mind if you use AIs that are only available via downloaded mods.

If you do not want an AI to be associated with the player specify null or simply omit the "ai" property. For example, you might have a ready-built base but don't want it to do anything other than have its automated defence structures firing at enemies.

Human players should not have an "ai" property, obviously. If you want to override the script (rules.js) associated with humans, use the "rules" property in the [scripts] section (see below).

Artificial Intelligence (.ai) Files

AI Guide

Scripting (JS API)

Player Scripts

Players Panel

3.2

difficulty

Constant

The default difficulty for the player:

  • "Easy" – use EASY difficulty

  • "Medium" – use MEDIUM difficulty

  • "Hard" – use HARD difficulty

  • "Insane" – use INSANE difficulty

Not clear what happens if you specify a difficulty for a human player (as normally human players default to MEDIUM difficulty).

Example: "Insane"

Default: "Medium" (for humans) or "Easy" (for AIs)

difficulty

AI Difficulties

AI Cheating

Players & Alliances

playerData[]

Player object

Images, Icons & Cursors 

Players Panel

3.2

team



Number

Which team is the player in?

Teams are zero-referenced, so 0 = Team A, 1 = Team B, etc.

Valid values are in the range of 0 → maxPlayers-1.

Put multiple players in the same team to create an alliance between them.

Example: 0

Default: Defaults to the value of "N" used in the section name.

Players & Alliances

playerData[]

Player object

Images, Icons & Cursors

Faction, Team & Player Colours

Players Panel

3.2

name

String

The name of the player as they will appear on the game set-up screen, in-game chat and intel screen.

Example: "Bob Hoskins"

Default: Player name (for human players) or "Nexus" for AIs.

playerData[]

Player object

Players Panel

3.2

position

Number

Which map position should this player be in?

Starting positions are zero-referenced, so the first position is 0, the second is 1, etc.

Valid values are in the range of 0 → maxPlayers-1.

Example: 2

Default: The value of "N" used in the section name. If another player then gets moved to that slot (due to having their 'position' defined), this player will swap position with the other player.

playerData[]

Player object

startPositions[]

Player Starting Positions

Players Panel

3.2

[scripts] section

This section is optional and allows you to customise the scripts associated with human players.

Property

Type

Mandatory

Notes

Related Documentation

Game Version

Property

Type

Mandatory

Notes

Related Documentation

Game Version

rules

Filename

Specify custom game rules for your map using this property.

Example: towerdefence.js

Default: rules.js

If specified, the standard rules.js will not be loaded – the specified script will be used instead.

Game Rules & SitRep

rules.js

Player Initialisation

Scripting (JS API)

3.2

extra

Filename

Specify an extra script to load for each player.

Example: chatCommands.js

Default: Do not load any extra scripts.

For example, you could use the script to define missions or send in reinforcements. In Warzone 3.2, where the JS API can interact with chat messages, you could even use the "extra" script to provide custom chat commands or status reports.

Scripting (JS API)

3.2

[locked] section

This section is optional and defines which of the game settings should be locked. Locked settings cannot be altered on the Skirmish Game Screen or Multiplayer Game Screen.

Property

Type

Mandatory

Notes

Related documentation

Game version

Property

Type

Mandatory

Notes

Related documentation

Game version

ai

Boolean

Is AI bot selection locked?

  • 0 – No

  • 1 – Yes

Example: 1

Default: 0

See "[player_N] Sections" above.

3.2

alliances

Boolean

Is alliance mode locked?

  • 0 – No

  • 1 – Yes

Example: 1

Default: 0

See "[defaults] Section" above.

3.2

bases

Boolean

Is base type setting locked?

  • 0 – No

  • 1 – Yes

Example: 1

Default: 0

See "[defaults] Section" above.

3.2

difficulty

Boolean

Are AI difficulty settings locked?

  • 0 – No

  • 1 – Yes

Example: 1

Default: 0

See "[player_N] Sections" above.

3.2