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

Common Types

Several field types appear across multiple definitions and components.

References an asset from an asset pack using an asset identifier. Serialized as a string in "domain/asset-name" format.

For example, the builtin pack rr/shared has domain rr, so its assets are referenced as "rr/asset-name".

Use . as the domain to reference an asset within the same pack:

"modelIdentifier": "./my-boxcar-model"

To reference an asset from another pack, use that pack’s domain:

"truckIdentifier": "rr/truck.buckeye.edt"

Names an animation clip listed in the model prefab’s AnimationMap. The map is what turns the name into a Unity clip at load.

FieldTypeDescription
clipNamestringAnimation clip name

Its material counterpart, MaterialReference, works the same way against the prefab’s MaterialMap.

A path array identifying a transform in the model hierarchy:

{ "path": ["ModelRoot", "Body", "Door"] }

Context references use the @context:id prefix:

{ "path": ["@engineSet:front-engine", "Wheels"] }

A reference that names nothing is written as null, and leaving the field out entirely means the same thing. Older packs spell it { "path": null }, which still loads.

Describes a group of axles on a locomotive or articulated car section. See Car Geometry for how these fields position a locomotive.

Wheel rotation animation.

diameter

float = 1

Wheel diameter (meters).

length

float = 0

Wheelbase distance (meters). 0 = single axle.

numberOfAxles

int = 1

Number of axles in this set.

offset

float = 0

Center position along the vehicle (meters from origin).

Transform of the pilot or trailing trucks. This transform will be rewritten every frame to keep the wheelset aligned to the track. For this reason this transform must not hold the body itself — this will cause it to be moved incorrectly.

For drivers, leave this empty/unset. Drivers should be parented to the car body and will thus be moved along with the body transform.