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

Definitions

Definitions describe the types of objects in Railroader — cars, locomotives, props, loads, and more. Each definition specifies the properties and components that make up an object type.

Definitions are declared in a Definitions.json file inside an asset pack. The file contains an array of definition entries:

[
{
"identifier": "my-pack/my-boxcar",
"metadata": {
"name": "My Boxcar",
"description": "A custom boxcar.",
"tags": ["freight"],
"credits": "Author Name"
},
"definition": {
"kind": "Car",
"modelIdentifier": "./my-boxcar-model",
"carType": "XM",
...
}
}
]

Each entry has:

FieldTypeDescription
identifierstringUnique ID in domain/name format
metadataobjectDisplay information (see below)
definitionobjectThe definition object, distinguished by kind
FieldTypeDescription
namestringDisplay name
descriptionstringShort description
tagsstring[]Categorization tags
creditsstringAttribution

All definitions share these fields:

FieldTypeDefaultDescription
kindstring—Discriminator that selects the definition type
componentsComponent[][]Components attached to this definition

Every other field comes from the kind — see each kind’s own page for its full field list.

KindDescription
CarFreight and non-powered rolling stock
SteamLocomotiveSteam-powered locomotive
ArticulatedSteamLocomotiveArticulated (Mallet) steam locomotive
DieselLocomotiveDiesel-electric locomotive
PropScenery object placed in the world (buildings, masks)
TruckWheel truck / bogie
LoadFreight or cargo type
StaticLoadModelVisual model for a load (static placement)
LinearLoadModelVisual model for a load (linear repeating)
MaterialMaterial override
TextureTexture asset reference (e.g. builder photos)
CarStyleCar paint scheme
ReportingMarkDeclares that a railroad exists
WhistleSteam whistle audio/model
HornDiesel horn audio/model
BellLocomotive bell audio

Some definitions extend others, inheriting all of their fields:

ObjectDefinition
├── Car
│ ├── SteamLocomotive
│ │ └── ArticulatedSteamLocomotive
│ └── DieselLocomotive
├── Prop
├── Truck
├── Load
├── StaticLoadModel
├── LinearLoadModel
├── Material
├── Texture
├── CarStyle
├── ReportingMark
├── Whistle
├── Horn
└── Bell

For field types like AssetReference, AnimationReference, and TransformReference that appear across multiple definitions, see Common Types.