Declares a setting the player can change in the mod menu's Settings tab. Values are saved; read them from mod.settings (always current); the setting event tells you when one changed.
Parameter
Type
key
string
default
boolean|number|string
its type sets the widget
optionsoptional
table
label, help (tooltip), min + max (a slider), options (a list of strings: a drop-down)
Returns
any
the current value (saved from earlier, or the default)
mod.setting("count", 3, {label = "Raptors per wave", min = 1, max = 20})
mod.setting("hard", false, {label = "Hard mode"})
-- later:for i = 1, mod.settings.count doworld.spawnNear("velociraptor", 2500) end