OPTIONS FILE FORMAT

A options file is a file used to define a scenario's lobby options. It is a Lua file with the .options extension.


An option file will be generated the first time a scenario is saved, but should be edited by hand after that. Options files have the following format:

-- If true, select winter skins.
uses_ice = false | true

-- Relative sort order of this scenario to other scenarios in a scenario pack.
sort_index = <index>

-- Extended description.
scenario_description_ext = <locstring>

-- Minimap texture width and height for aspect ratio correction.
minimap_size =
{
    <width>, <height>
}

-- Additional atmospheres to load.
atmospheres =
{
    { <locstringid>, <filename> },
}

-- Configures slot requirements per each slot.  Each index corresponds to a player index on alternating teams.  E.g.: index 1 is player 1 on team 1, index 2 is player 1 on team 2, index 3 is player 2 on team 1, etc..
-- For singleplayer_mod scenarios, the player will go into the first open slot, ai players will be added to ai slots, and all other slots should be closed.
-- For singleplayer_mod scenarios, all AI will automatically get the difficulty level selected by the player, unless a difficulty is specified for the slot.
-- For singleplayer_mod scenarios, the race will determine the slots army.  It needs to be specified here for preloading.
-- For multiplayer scenarios, slots should be omitted unless you want to limit a particular slot.
slots =
{
    { status = open | closed | friend | ai, difficulty = easy | normal | hard | expert, race = <race>, flags = flags_none | flags_race | flags_swap | flags_status | flags_difficulty | flags_all },
}

Single-Player Missions

Options files are most useful when used in conjunction with single-player scenarios as a means to setup each player's race. The following example demonstrates a single-player mission with a human soviet player and a scripted german AI player:

scenario_type = singleplayer_mod

-- If you scenario pack contains multiple missions, the sort_index defines the relative order of each mission.
sort_index = 0

start_location = fixed

win_condition = no_win_condition

has_scripted_ai = true

slots =
{
    { status = open, race = soviet, flags = flags_swap },
    { status = ai, race = german, flags = flags_none },
}