LOUD Map Options Specification - LOUD-Project/Git-LOUD GitHub Wiki
The following is courtesy of Jip.
An option block is essentially a table of values. As an example:
{
default = 1,
label = "Adaptive Hydro",
help = "Enables you to remove all hydrocarbon markers.",
key = 'AdaptiveHydro',
pref = '',
values = {
{ key = 0, text = "Yes", help = "Enables the spawning of hydrocarbon markers.", },
{ key = 1, text = "No", help = "Disables the spawning of hydrocarbon markers.", },
},
},
These values represent:
default
This is the default entry in the values table. Therefore it is an index of that table, and not the value of said table. The table is 1-based. With this example the default value is set to 1 and therefore will reference: { key = 0, text = "Yes", help = "Enables the spawning of hydrocarbon markers.", }, The actual key that will be passed to the map is in this case 0.
label
The name of the option, used as the title of the combo box in the lobby / map selection.
help
The help tooltip of the option when hovering over the title of the combo box.
key
The key that will be used as an identifier to the value of this option. In a map script you can retrieve the value: local option = ScenarioInfo.Options.AdaptiveHydro or 0
pref
This value is not used as it will cludge up the preference list. However, it must be included otherwise the game becomes unstable.
values
A table with the possible values of the options table.
values.key
If chosen, this will be the value that is past along to the game under the previous key (the one that is used as an identifier).
values.text
The text that represents / explains the impact of this option.
values.help
Text that further represents / explains the impact of this option. Part of the tooltip of the combo box.