The effect parameter vocabulary
One declaration of what an effect's parameters accept, read by the effect
asset's resolveParams and by the runtime's handle:setParam — so a value
means the same thing whether it arrives as an override at play time or is
written while the effect runs.
type: | Takes | Comes back as |
|---|---|---|
number | a number | the number, held inside the declared min/max |
range | { min, max }, or one number | { lo, hi }, both held inside the range |
color | { r, g, b } | three numbers clamped to 0..1 |
boolean | anything | true / false |
vec2 | { x, y } or { [1], [2] } | { x, y } |
vec3 | { x, y, z } or { [1], [2], [3] } | { x, y, z } |
entity | an entity proxy or an id string | the entity's id |
A beam's endpoints, a shield's impact point and an impact's surface normal are none of them scalars, which is why the vector and entity types are here.
A value that cannot be read as its declared type raises, naming what the type takes. A number outside its documented range is held at the edge and the move is warned about: the range is what the effect was authored and measured against.
A parameter name the effect does not declare raises and names the ones it does — a misspelling that silently did nothing would be indistinguishable from a parameter that has no effect.
Scoped to this part · feeds back into the world's score.