From Pak 192 Comic
Jump to: navigation, search

No matter if car, train, ship or plane - all means of transportation in Simutrans use the same parameters

List of parameters[edit | edit source]

Parameter Example Value Meaning Format/Possible Value
obj vehicle Type of object Text
name ICE1 unique name to reference the vehicle Text
copyright John Doe Name of the artist who painted the building Text
intro_month 1 month of introduction numbers 1-12
intro_year 1989 year of introduction (won't spawn before) year
retire_month 1 month of retirement numbers 1-12
retire_year 2000 year of retirement (won't spawn after) year
waytype track way used by the vehicle Look up Waytype
engine_type electric type of power Look up #engine_type
cost 100000 how much player pays to buy number (1/100 of credits)
runningcost 1000 how much player pays per tile number (1/100 of credits)
speed 300 max speed in km/h number
power 200 performance KW number
gear 125 Percentage of power used in the game, enables changes to the vehicles in-game behaviour without changing real power, speed or weight number
weight 10 vehicle weight in metric tons number
payload 2 capacity, unit dependend on type of load number
freight none type of load Look up #freight
smoke steam emissions of this vehicle Look up #smoke
sound bell sound of the vehicle when starting/leaving station Look up #sound
length 8 Length of the vehicle - imporatant to have correct distance between vehicles in a convoi numbers 0-32, look up #length
constraint possible vehicle combinations Look up #constraint

Parameters of graphics[edit | edit source]

Each vehicle needs to have graphics in 8 directions, which are noted as such: [S],[W],[SE],[SW],[N]*,[E]*,[NW]*,[NE]* *If this direction is not defined, the opposite direction is used. Only usable for vehicles of length 8.

The loading status of a vehicle may influence what it looks like, especially with good transportation. The following table uses "S" as a placeholder for all directions:

EmptyImage[S] Graphic used when vehicle is empty. Also fallback if loaded graphics are not assigned.
FreightImage[S] Graphic used when vehicle is loaded in any way.
FreightImagetype[0] This assigns a #freight to an index. Indices must count up from zero.
FreightImage[0][S] Graphic used for a vehicle loaded with the freight associated with given index.

Image Coordinates[edit | edit source]

In each image, you usually have several graphics. This means in order to reference any given graphic, you need the image name as well as it's coordinates. The top left corner is 0.0. From there, the first number counts downwards and the second number counts to the right.

It's good practice to have the different directions placed in one row next to each other. If various loading graphics exist, those should be beneath in extra rows. This means the very first graphic is

EmptyImage[S]=image.0.0

You can write a new line for each graphic you want to define. Just for the empty images without load, this would look as such:

EmptyImage[S]=image.0.0
EmptyImage[W]=image.0.1
EmptyImage[SE]=image.0.2
EmptyImage[SW]=image.0.3
EmptyImage[N]=image.0.4
EmptyImage[E]=image.0.5
EmptyImage[NW]=image.0.6
EmptyImage[NE]=image.0.7

This causes very long graphic definitions with a high potential for having some tiny typo somewhere. Luckyli, you can use a shorthand version.

EmptyImage[S,W,SE,SW,N,E,NW,NE]=image.0.<$0>

By writing several values in the first part of the parameter (before '='), this line will be iterated several times by makeobj. $0 is the variable which counts up each iteration. It's in <> to indicate that its not constant. The same <> can be used to alter the number with basic math operations, eg. <7-$0> would be counting numbers from 7 to 0 instead of 0 to 7.

A complete dat, using shorthand notation, might looks like this:

EmptyImage[S,W,SE,SW,N,E,NW,NE]=./image/coal01.<$0>
freightimagetype[0]=coal
freightimagetype[1]=ore
freightimagetype[2]=sand
freightimagetype[3]=gravel
freightimagetype[4]=salt
FreightImage[0-4][S,W,SE,SW,N,E,NW,NE]=./image/coal01.<$0+1>.<$1>



Possible values[edit | edit source]

waytype[edit | edit source]

Look up Waytype

engine_type[edit | edit source]

The engine type does not matter to the game much, except for "electric" which requires an electrified way. The amount of smoke is also dependent on the engine type.

Wert Bedeutung
bio Animal powered (eg. horses)
sail wind-powered, like old boats
steam steam powered, smokes continuosly
diesel diesel powered, smokes when speeding up
electric overhead wire is required
hydrogen no effect
fuel_cell no effect
battery indicating an electric car that does not require wires


freight[edit | edit source]

The parameter freight shows which goods can be transported. Goods other than those in class 0 enable the whole class for transportation. An overview of all types of goods and there classes can be found in the Goods list


smoke[edit | edit source]

Any emission the vehicle produces, requires a smoke object, look up Smoke


sound[edit | edit source]

when the vehicle starts moving, it may play a sound in .wav-format. Use the name of the file or an ID assigned in the sound.tab file.


length[edit | edit source]

constraint[edit | edit source]

Example[edit | edit source]