Skip to content

Live environment settings

Environment settings let an owner tune values such as starting score, difficulty, or accent color without changing every codeblock.

  1. Open /plot environment with the required plot access.
  2. Create a named Number, String, Boolean, or Color setting and give it an initial value.
  3. Obtain its read-only Variable binding for code inputs.
  4. 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.

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.

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.

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.