Style Properties
Registers an editable control in a car’s Customize window for a style property. Reached via ui.registerStyleProperty().
carId string Car definition identifier this applies to, e.g. "rr/ld-f7a" — not a specific car instance selector string Style selector, e.g. "Renderer.body" — same grammar as car.getComponentsForStyle() property string Style property name under that selector, e.g. "paintColor1". Any string; not validated against a fixed set label string Player-facing label shown next to the control editor string Widget type — see Editor Types below Registers a style-property control for every car of the given definition. The control appears in that car’s Customize window whether or not the style data already has a value for selector/property. Re-registering the same (carId, selector, property) triple replaces the previous registration (a warning is logged); different triples can be registered independently, unlike commands and windows. Unknown editor values are dropped with a warning — the registration silently fails rather than throwing. Requires an asset pack context.
ui.registerStyleProperty("rr/ld-f7a", "Renderer.body", "paintColor1", "Body Color", "paint")The value a player sets is stored per car instance (as an inline style override), even though the registration itself — which control exists, and for which car definition — is shared by every car of that definition. Read it back in script with car.resolveStyle(selector)[property] (see Car → Styling).
Editor Types
Section titled “Editor Types”editor | Value stored | Widget |
|---|---|---|
"color" | Hex color string, e.g. "#a33" | Color swatch/picker. A paint-material value is accepted too: the swatch edits its color and the finish is preserved |
"text" | Plain string | Text input field |
"slider" | Float 0.0–1.0 | Slider, displayed as 0–100%. Commits on release, not on every drag frame |
"paint" | Paint-material string, e.g. "#a33" or "metallic(#a33, 0.8)" | Color swatch plus a metallic knob. Writes back in the shortest form that keeps the value, so an authored smooth(color, s) or metallic(color, m, s) survives an edit |
© 2026 Giraffe Lab LLC. All rights reserved.