Live environment settings
Environment settings let an owner tune values such as starting score, difficulty, or accent color without changing every codeblock.
Create a setting
Section titled “Create a setting”- Open
/plot environmentwith the required plot access. - Create a named Number, String, Boolean, or Color setting and give it an initial value.
- Obtain its read-only Variable binding for code inputs.
- Compile after adding or changing the declaration.
In expressions, use the Environment scope:
Bonus: ${environment.bonus}${private.baseScore + environment.bonus}Declare baseScore separately. The environment setting supplies bonus; writing the expression does not create it.
Live edits versus schema edits
Section titled “Live edits versus schema edits”Changing a compatible setting’s value persists and applies immediately. Reads consult the live setting rather than a value frozen at compilation.
Creating, renaming, or changing a setting’s type changes the draft declaration and requires compilation. A type change accepts a new initial value while the previously active program retains its original setting schema until activation of a successful replacement.
Read-only bindings
Section titled “Read-only bindings”Use an environment Variable as an input. Do not assign to it with Set Variable. If runtime code needs to change a counter, store that counter in Private/Public/Save and use the environment only for its configurable starting value.
Practical example
Section titled “Practical example”Create Number setting bonus with value 5, then send Bonus: ${environment.bonus} on Player Join. Compile and enter Play. Edit bonus to 10 without changing its type: the next read uses 10 without recompilation. Rename it to roundBonus: fix expression references and compile before relying on the new name.