Skip to content
You're reading the docs for Railroader 0.6 (the MoW Update), currently available on the Experimental branch.

Shared Scripts

The built-in rr/shared pack ships a handful of ready-made Relay scripts that any pack can reuse instead of writing its own. rr/shared always loads before every other pack, so these are safe to depend on without listing rr/shared explicitly.

Attach these via a Script component’s scriptAsset field.

ScriptPurpose
rr/EnableComponentsPropertyEqualsEnables/disables a set of components based on whether a property equals a given value. See Toggleable Components.
rr/PaintMapRendererGroupDrives a RendererGroup’s paint-map material from the car’s resolved style. See Paint Maps.
rr/PaintMapDecalDrives one or more image Decals (e.g. heralds) from the car’s resolved style. See Paint Maps.

Import these with from "rr/<name>" import <function> and call the function directly, rather than attaching them as a component.

Low-level paint-map helpers used internally by rr/PaintMapRendererGroup and rr/PaintMapDecal. Only import this directly if you need to coordinate multiple paint-map layers yourself; see Paint Maps.

  • applyPaint(group, style) — drives a RendererGroup component’s paint-map shader from a resolved style.
  • applyPaintMapDecal(decal, style) — drives a decal’s paint-map material from a resolved style.