Skip to content

Instantly share code, notes, and snippets.

@weirdandwry
Last active February 18, 2021 17:15
Show Gist options
  • Save weirdandwry/68fa2629dc59042ebc9b10a1bbc1c12a to your computer and use it in GitHub Desktop.
Save weirdandwry/68fa2629dc59042ebc9b10a1bbc1c12a to your computer and use it in GitHub Desktop.

In the TrainMultipleUnit, it will be possible to have one or more composition lines, with this syntax:

composition=translation_id,English name of composition,<unit spec 1>,<unit spec 2>,<unit spec 3>,...

Where a unit spec is defined as either just the TrainUnit ID:

unit_id1

Or a TrainUnit ID followed by a min, default and max number of duplications. 0 is allowed as the min and default number:

unit_id1 min default max

Both of the previous syntaxes can end with the word flip to flip the unit when drawing the train. Example based on the test mod:

composition=test1_car_name,Test Train,test1_head,test1_car 1 1 3,test1_head flip

Then, when the player goes to purchase a train and selects a "model" (a TMU in the ini file), they are shown a listing of all the defined compositions for that TMU, and the player can select one, then edit the counts of each variable unit. The old car_id, tail_id, head_id, min_cars and max_cars won't be supported in schema v2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment