settings module
Every setting the engine, its plugins and the game declare, by path: physics/solver_iterations is [physics] solver_iterations in project.toml. define…
On this page
Every setting the engine, its plugins and the game declare, by path: physics/solver_iterations is [physics] solver_iterations in project.toml. define adds your own; [override.<platform>] tables answer per platform.
12 functions, 0 constants. Scripts reach it as settings::.
Functions
Argument kinds are the script values a call passes: node is a node handle, any a table or value of any kind, fn a callback.
| function | acts on | what it does |
|---|---|---|
all() -> any |
— | Every defined setting as { path, scope, spec }, in definition order. |
base(string) -> any |
— | What the file says, ignoring every override: what a settings screen edits. |
clear(string) -> any |
— | Forget one value, so the next write drops the key: how an override is removed. |
define(string, any) -> any |
— | Declare a setting of your own: type, default, and optionally min, max, options, help, order and applies. A path starting editor/ is kept on this machine; anything else ships with the game. |
get(string) -> any |
— | One setting's value here: the narrowest [override.<tag>] this platform answers to, else what was set, else what its definition defaults to, else nil. |
known_tags() -> any |
— | Every tag a project may write an override for: the engine's, then the project's own from [export] tags. |
merge_toml(string) -> any |
— | Read values out of a TOML text, folding them onto what is already loaded. |
overrides(string) -> any |
— | The tags this project holds an override for at path, in tag order. |
revision() -> any |
— | A count that moves whenever a setting is defined, set, cleared or loaded: a screen listing settings rebuilds its rows when it moves, not every frame. |
set(string, any) -> any |
— | Change one setting, in memory. Whether it takes effect now or on the next run is the setting's own business; all reports it as applies. |
tags() -> any |
— | The names this run answers to, broad to narrow: the kind of machine, the operating system, the architecture, the build. |
to_toml(string, string) -> any |
— | The text one scope would write, starting from existing so anything no setting describes survives. Scope is "project" or "editor". |