Win Condition File Format
A win condition file is a file used to define a win condition option selectable from the custom game options dialog as part of a win condition pack. It is a Lua file with the .win extension located in the DATA:game\winconditions\ folder. Win condition files have the following format:
-- The unique ID for this win condition (within your mod). Do not change this value after you release your mod.
name = "<name>"
-- The path to the SCAR script to run with the scenario.
scar_file = "DATA:scar/winconditions/<name>.scar"
-- The path to the SCAR script to replace the scenario's SCAR script with. Typically omitted.
scar_mission_file = "DATA:scar/winconditions/<name>.scar"
-- The name of the win condition as displayed in the game.
fe_name = "<name>"
-- The sort priority of the win condition. Ignored for mods.
fe_priority = <number>
-- The inventory item categories permitted for use in the mod. Omit to permit everything by default. Set to 0 to permit nothing. Remove commander to disable commanders.
permitted_categories = commander + intel_bulletin + skin_pack + vehicle_decal + fatality
-- The score display to use, one of:
-- none: Show nothing.
-- time: Just show the elapsed time.
-- vp_ticker: Show VPs and a per team ticker.
-- iconographic: Show icons.
-- iconographic_ticker: Show icons and a per team ticker.
-- Use WinWarning_SetTickers/WinWarning_SetMaxTickers/WinWarning_SetCritical/WinWarning_SetToolTip to set tickers.
-- Use WinWarning_ScoreDisplayIconsClear/WinWarning_ScoreDisplayIconAdd to set icons.
score_display = none | time | vp_ticker | iconographic | iconographic_ticker
-- If false, remove the elapsed time from the score display.
show_time = true | false
-- If true, replace VPs with points on the map preview image.
requires_vp_ticker = true | false
-- The name of the win condition's option as displayed in the game.
fe_option_name = "<name>"
-- List of options that appear in the dropdown.
options =
{
{
-- If true, this is the default option.
default = true,
-- The name of the option as displayed in the game.
fe_name = "<name>",
-- The value of the option (returned by Setup_GetWinConditionOption()).
value = <value>,
},
}
-- List of sector creator entities to replace.
entity_replacements =
{
-- Replaces victory_point entities with territory_point_mp entities.
{
original = "victory_point",
replacement = "territory_point_mp",
},
-- Replaces victory_point entities with custom entity <entity> in your mod <mod>.
{
original = "victory_point",
replacement = "<mod>:<entity>",
},
}
-- List of starting buildings/squads to spawn.
starting_building_replacements =
{
-- Replaces default starting building with prebuilt base.
{
original = "default_mp",
replacement = "prebuilt_mp",
},
-- Removes all bunkers.
{
original = "bunker",
replacement = "",
},
-- Replaces default starting building/squads with the specified building/squads on a per race baises.
{
original = "default_mp",
starting_buildings =
{
{
race = "<race>",
building = "<ebp_to_spawn>",
starting_squads =
{
"<sbp_to_spawn>",
},
},
},
},
}