command · restricted.tuning
Set tuning value
Requests one validated live tuning change from a development package.
restricted.tuning.set-value(tuning_id, value, expected_revision) -> command.receipt
- Stable ID
restricted.tuning.set-value- Owner
- app.runtime-tuning
- Authority
- restricted_request
- Timing
- fixed_tick
- Availability
- active-session
- Side effects
- may change future simulation wall-clock pace or presentation frame pacing
- Determinism
- record request and owner result in engine sequence order; effect begins next frame
- Introduced
- 1.1.0
Usage
Submit one registered tuning value with the revision returned by developer.tuning.values. The owner validates the complete request and either commits one new revision or changes nothing.
Parameters
- tuning_id: registered tuning identity.
- value: unsigned value in the registered units.
- expected_revision: current tuning-owner revision.
Returns
A command receipt. Wait for events.tuning.changed or the terminal receipt before treating the request as committed.
Cost
One bounded command submission and one constant-size owner validation at the target fixed tick.
Fields
| ID | Type | Units | Required | Description |
|---|---|---|---|---|
expected_revision | revision | none | yes | Expected runtime tuning revision. |
tuning_id | string | none | yes | Registered runtime tuning identity. |
value | unsigned-integer | none | yes | Requested value in the registered tuning unit. |
Errors
error.command-budget-exhaustederror.command-owner-rejectederror.command-queue-fullerror.invalid-commanderror.invalid-tuningerror.restricted-commanderror.stale-tuning
Examples
local receipt = restricted.command.submit("restricted.tuning.set-value", {tuning_id = "simulation.time-scale-basis-points", value = 20000, expected_revision = current.revision}, 1)
API history
- 1.1.0: Revision-checked runtime tuning command added.
Related symbols
developer.tuning.valuesevents.tuning.changederror.invalid-tuningerror.stale-tuningrestricted.command.submit