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

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

In Warzone 3.1 and above, most of the stats files are being converted to the .ini format.

 

Overview

As it's name suggests, the .ini file uses the same format as Windows .ini files.

Sections

An ini file is split in to one or more named sections, where the name is always enclosed in square brackets. For example:

[campaign]
name  = "Alpha Campaign"
level = "CAM_1A"

[intro]
video    = "cam1/c001.ogg"
captions = "cam1/c001.txa"

In the example above, there are two sections: campaign and intro

Notes:

  • Each section must have a unique name.
  • Section names are usually in lowercase
  • Section names should start with a letter of the alphabet
  • Section names can include numbers and underscores, eg. [foo_bar123]

Properties

Each section can contain any number of name=value pairs, for example:

[intro]
video    = "cam1/c001.ogg"
captions = "cam1/c001.txa"

In the example above, there are two named properties: video and captions

Notes:

  • Name value pairs must be within a section
  • Each name must be unique within the section
  • Whitespace within each line is ignored
  • Avoid blank lines between name value pairs
  • Property names are usually in lower case
  • Property names should start with a letter of the alphabet
  • Property names can include numbers and underscores, eg. foo_bar123
  • ...however it's more common to use camelCase format, eg: fooBar123

Data types

The value of each property should follow some conventions depending on it's data type.

Data typeExample
Boolean

A true value should be depicted as: 1

A false value should be depicted as: 0

# example
[boolean_values]
thisIsTrue  = 1
thisIsFalse = 0

Some older ini files used values such as "true" and "false" or "yes" and "no". It was decided to standardise on 1 and 0.

String

String values must be quoted.

# example
[string_values]
thisIsAString = "string value"

Comments

You can annotate ini files with comments. A comment must be on a new line starting with #, for example:

[intro]
# this is a comment
video    = "cam1/c001.ogg"
#this is another comment
captions = "cam1/c001.txa"

 

 

  • No labels