From TTWiki

All Known Variables


auxdata[range] - Unknown
basecostfact/buildcostfact - The cost of a bridge/track
costfact - Purchase cost factor (final cost = basecost[costind]*costfact)
costind - Purchase cost index (index into a table of base costs), lower means higher final costs
trackpieces - What trackpieces this track, trackmod, roadmod or train station has
description - The description of the object in various languages
designed - Year object is designed, 0 if available from the begining
numaux01 - number of entries in aux_0 and aux_1
numaux02ent - number of aux_2 array entries
numaux03ent - number of aux_3 array entries
numaux04ent - number of aux_4 array entries
numaux05ent - number of aux_5 array entries
nummods - Number of mods required (vehicles) or buildable (for track)
obsolete - Year object becomes obsolete, 65535 if never
roadpieces - Same as trackpieces but ONLY has smallcurve, tightcurve, normalslope, steelslope and reverse (for tram), and only for roads, and road stations
salecostfact/sellcostfact - sale/sell cost factor of bridge/track (final cost = basecost[costind]*salecostfact)
sprite(range) - Inividual sprites
stringtable(range) - A range of strings, mainly used for descriptions of objects
trackmod(array) - Array of trackmods required for vehicle to run, or trackmods available in the case of tracks/roads

Class 00 - Interface

field_0[6] - Game Object Tooltip - first line: Object name.
field_0[7] - Game Object Tooltip - next lines: Object data/Action info.
field_0[8] - UI Tooltip (button info)
field_0[9] - Action popups, "Can't build/remove ...", "Screenshot saved ...".
field_0[10] - Win-Tabs: Player Items - Build New Vehicles, Vehicles, Stations, Player Status, Messages.
field_0[11] - Win-Top - most non-player related windows.
field_0[12] - Win-Tab: Map Objects - Towns, Industries, Scenario Editor - Object Selection.
field_0[13] - Win-Tab: Player Construction - Build- Tracks/Roads, Docks/Airport.
field_0[14] - Win-Tab: Map Construction - Construction -land, Scenario-Generator/Challenge.
field_0[15] - Win-Tab - Overview Map.
field_0[16] - Win-Tab: General - Options, About.
field_0[18] - main buttons 1: File, Sound.
field_0[19] - main buttons 2: Zoom, Rotate, View.
field_0[20] - main buttons 3: Construction-Land, Tracks, Roads, Docks/Airport, Build Vehicles.
field_0[21] - main buttons 4: Vehicles, Stations, Towns, Industries.
field_0[22] - main buttons 5: Player Status, Performance.
field_0[23] - main buttons 6: Time, Messages, Map.


  • Palette-numbers 0-30, those are the 31 internal used color gradient sets.
  • Other values are excepted but have no real use, and can give strange side effects.
  • Value/order of palette sets -> player-status color-picker(LR/UD)

Linked to PlayerColor 1:

  • (Win-top) Player Items & Player Construction.

Not Editable:

  • Scenario Editor: [Back to Previous] & [Forward to Next] navigation buttons.
  • Intro screen: Big green buttons.
  • Warning message windows: "Are you sure ...", "Vehicle can't ...", etc.
  • File windows: Load, Save, New game.
  • Two player connection window.

Class 02 - Currencies

shiftnum - How many times to multiply pound value by 2
zeroes - How many zeros after pound value

Class 05 - Water

Its as high as the Water-Level set in the map/scenario editor and absolutely flat in the beginning.
field_0[2] = "2" (might be default water level)
field_0[4] = "102" (might be ingame level changing price)

Class 06 - Ground

field_3[0] - The number of levels stored in the object. I.e. for grass it is the number of levels of "grassiness".
field_A[17] - The number rough tiles.

The total number of sprites stored in the file is: 82 * field_3[0] + field_A[17] + 7

The sprites are stored in groups of 19. field_3[0] groups for each zoom-level. The last zoom-level (the closest) also stores 6 plain textures in different shades after each group. Sprite index 16 within each group is often empty, as it is normally not seen.

Sprite 82 * field_3[0] is a height map color scale. Then comes three buttons or icons. Last is field_A[17] rough tiles.

Class 08 - Cargo types

decay1days - Duration of first decay rate
decay1rate - First decay rate
decay2rate - Second decay rate

bit_2 - Unknown
refitoption - Does refitting a vehicle allow it to carry this cargo type?

paymentfactor - Payment factor
paymentind - Payment index
peakdays - Days at which payment remains at maximum
unitweight - Weight per unit in 1/256 tons

Class 09 - Fences

Field_0[6] is always "15"
Field_8 is "2" or "5" (might set the height in 1/16 units)
Field_9 is always "8"

Class 0A - Signals

field_0[2] - country signal built style + ?
0 - build signal on left side of track (british style)
1 - build signal on right side of track (american/european style)
2 - ?
4 - ?

field_0[5] - number of signal frames (4,7,10) -> signal states (2,3,4), frames = (states*3)-2

input value seems to be fixed, other values where not accepted (locomotion loading lockup)
signals have 8 directional images per frame group.

Class 0B - Crossings

field_7[1] - Number of frames of closing animation.
field_7[2] - Number of frames of closed animation.
field_7[5] - Introduction year.

This is the order of sprites. If You use animation frames, add 8, 16, 24... to these numbers:


Class 0C - Street Lights

year[array] - The year the street lights get build

Class 0D - Tunnel Entrances

Class 0E - Bridges

disabledtrackcfg - Decides what types of corners and slopes the bridge can be used for
heightcostfact - Cost factor for bridge height
maxheight - Maximum height for the bridge, in feet
maxspeed - Maximum speed for the bridge, in mph
noroof - Does the bridge have a roof? (?)
pillarspacing - The space between the bridge pillars
spanlength - Length of a bridge element, the BrickBridge has 1, the Steel Arch 2, the Steel Girder 2, the WoodBridge 1, the Suspension 4 parts to have one complete bow.
field_9 - The space between the bridge columns (153 Steel Arch, 153 Steel Girder, 2550 Brick, 24 Suspension, 255 Wood Bridge )

Class 0F - Train Stations

auxdata[range] - positions of cargo icons on stations
field_0[12] - Bit 0, use company colored transparency effect (like Passenger Terminus)

auxdata: train stations (TRSTATx) (32 arrays * 57 fields)

  • positions of cargo/passenger on train stations, probably same use in road stations (RDSTATx/RDSTATLx)
  • the arrays are grouped in sets of 4, every set covers one direction (rail build-direction),
  • 1 array per station tile.
  • station cargo arrays are linked to the on-screen orientation of the track build-directions.
    aux_0[0,1,2,3] = BottomLeft -> TopRight (45')
    aux_0[4,5,6,7] = TopLeft -> BottomRight (135')
    aux_0[8,9,10,11] = TopRight -> BottomLeft (225')
    aux_0[12,13,14,15] = LowerRight -> UpperLeft (315')
    aux_0[16;31] = not sure, probably reserved for diagonal(map) stations (trains only)
  • every array contains ofset values for one station/tile
    array fields are grouped in sets of 4 fields, (57-1)/4=14 icons per station
    aux_x[0] = general icon height offset for that array (screen +Y ofset)
    aux_x[+1,+2] = X + Y offset for cargo(non passenger) icon (ofset is map orientated)
    aux_x[+3,+4] = X + Y offset for passenger icon (offset is map orientated)

Class 10 - Track mods

isoverhead - 1 for catenary like look, 0 for extra rail-like look

Class 11 - Tracks

trackst.dat and trackng.dat (the object tree for *.dat object files seems to start here, for a lot of objects being linked to in it and those link to their subobjects...)

displayoffset - Vertical offset of vehicles in list windows (e.g. train list, new vehicle list, ...)
bridge[array] - Array of bridges compatible for the track
curvespeed - Speed of vehicles in curves of track (not mph)
numbridges - Amount of bridge objects for the track
numsignals - Amount of signal objects for the track
numstations - Amount of stations objects for track
signal[array] - Array of signals available for the track
station[array] - Array of station objects for track
stationtrackpieces - What trackpieces supports a station
tunnel - Tunnel object for track
tunnelcostfact - Tunnel cost factor (final cost = basecost[costind]*tunnelcostfact)
field_3[array] - [0] has something to do with disallowing junctions

Class 12 - Road stations

Field_B[0] - Describes the function of the road station, per below.
##   Cargo      Where Built        Vehicles
--   -----      -----------        ---------
0     All        Any straight      (B)us, (T)rucks
1     All        Any straight      B,T
2     Passenger  Any straight      B,T, Trams**
3     Passenger  Any straight      B
4     Freight    Any straight      T
5     Freight    Any straight      T
6     X* 
7     X*
8     All        Ends of roads     B,T
9     All        Ends of roads     B,T
10    Passenger  Ends of roads     B
11    Passenger  Ends of roads     B
12    Freight    Ends of roads     T
13    Freight    Ends of roads     T
14    X*
15    X*
* These values cause non-fatal crashes when loading scenario
** Possibly related to field_29 of trams?

Class 13 - Road mods

Class 14 - Roads

Field_B[0&1] - Maximum speed (16-Bit)

Field_B[2] - Unknown; Is "1" in general and not set in ROADRGH or ROADTRAM
Field_B[7] - bitmask:

Bit_0 - Is one way road
Bit_1 - Appears in build-tracks menu (rather than build-roads) - used for trams, might trigger other things aswell
Bit_2 - Road-like intersections; Vehicles can turn in any direction
Bit_3 - Vehicle with the anytrack flag set can run on this road. Has other effects aswell, and Locomotion crashes if you change this for a road and load a savegame with it.
Bit_4 - Unknown; Used by all roads
Bit_5 - Unknown; Not used by original roads
Bit_6 - Vehicles can overtake one another. When not set, Terminus stations become impossible. Vehicles still change side after turning if Bit_3 is set.
Bit_7 - Unknown; Used by all roads

Field_B[8] - bitmask:

Bit_0 - Can have street lights

Field_15[7] - numstations; Amount of stations objects for road
numstations - Unknown/Unused
Field_1E[6] - bitmask, sprites related:

Bit_0 - Three tiles are overlaid (tram track - rail, sleepers and ballast)
Bit_1 - Has a direction (ROADUS1); Twice as many sprites.

Field_1E[7] - nummods
Field_29[0] - Unknown; Only used by ROADTRAM and set to "2"
Field_29[5] - Precedence; Roads with higher numbers take precedence over lower roads, that means cities may upgrade the latter with the former. Cities only build roads with Field_B[7]:Bit_3 set.

Class 15 - Airports

allowedplanetypes - What plane types are allowed to land
numspritesets - Number of sprite sets (sets of four sprites not counting the UI icon) included in the file
numtiles - Number of tile definitions
2x2tiles - Bit mask of tiles that are 2x2 (note, bit numbers are in hex!)
minx, miny, maxx, maxy - Extent of airport grid
numnodes - Number of nodes (vertices) in aircraft movement pattern
numedges - Number of edges connecting nodes in aircraft movement pattern
field_B6 - Bit mask of edges from entrance node to terminals (see Aircraft Movement Graph)

spriteheight (auxdata) - defines height of all spritesets

height[array] - Height of the spritesets

spriteanimframes (auxdata) - number of animation frames of the spritesets

frames[array] - Number of frames, must be same for all frames of an animation

tile[array] (auxdata) - tile definitions for airport Layout

spriteset[array] - list of spritesets to use on this tile

layout (auxdata) - place tiles for airport Layout
node[array] - node definitions for Aircraft Movement Graph
edge[array] - edge definitions for Aircraft Movement Graph

Class 16 - Docks

Class 17 - Vehicles

Alphabetical list of all vehicles (*.dat file names)

colourtype - Which colour set to use if e.g. passenger vehicles have different colours
cargo - The cargo the vehicle can carry
class - What does it run on, 0=rail, 1=road, 2=air, 3=water
compatible[array] - Array of all compatible objects
field_0[16] - The ID of the cargo, used in vehicles
field_10E - Position of the Smoke or Steam (value sets height).
field_4 - Number of carriages on the vehicle

type - Controls in which tab the vehicle is when you want to buy it
0 - Trains
1 - Busses
2 - Trucks
3 - Trams
4 - Planes
5 - Ships
length - Distance of the first pivot point from the start of the vehicle. For buses, trucks and trams this is the center of rotation, for trains it's the position of the front bogie. Unknown (0) for ships and planes.
field_1 - Distance of the rear bogie from the end of the vehicle.
field_2 - Index of the front bogie (255 for no bogie)
field_3 - Index of the rear bogie
field_5 - Effect position (spark, exhaust plume, etc.)
spriteind - Index of the sprites (0-3 + [128 if reversed])

field_B4[0] - Number of animation frames for bogie #0 or the shadow (planes)
field_B4[1] - Flags Array for bogie sprite #0 (see sprites(array)) or the shadow (planes)
field_B4[18] - Number of animation frames for bogie #1
field_B4[19] - Flags Array for bogie sprite #1
flags - Various flags that define the vehicles behaviour.
numcompat - Number of compatible objects, 0 if compatible with all
power - Amount of power the vehicle generates, in horsepower (doesn't seem to have any effect on planes or ships)
rackspeed - Top speed while on rack rail, or landing/holding pattern speed for planes
reliability - Reliability of the vehicle, higher values allow a longer operating lifetime
runcostfact - Running cost factor (final cost = basecost[runcostind]*runcostfact)
runcostind - Running cost index (index into a table of base costs), lower means higher final costs
speed - Top speed, in mph
sprites(array) - Sprite properties
tracktype - Track object required for the vehicle to run
visfxtype - How to draw the visual effect 'visualeffect'
visualeffect - The object used as visualeffect
wakefxtype - How to draw the wake effect 'wakeeffect' (doesn't exist in locotool 0.2)
field_113 - Distance of the two propeller screws for the wake effect
weight - Weight of the vehicle, in tons

startsndtype - Defines how the driving sound is played and how field_11A[0-63(?)] works.
startsnd - The sound the vehicle makes while driving
field_11A[0-63(?)] - Describes the driving noise

numsnd - Number of start sound effects (the kinds are set in the required object list)
soundeffect[array] - Array of start soundeffects of the vehicle

Class 18 - Trees

height - Height of the tree in 1/16th height units
field_4[2] - Number of tree viewpoint images (rotations) [1,2,4]. n1
field_4[3] - Number of tree size images (growth) [1...8]. n1
field_4[4] - (Bit-0) Tree has double season set - used for snow graphics (should realistically only go on coniferous trees)
field_4[56] – (Bit-flag) Tree states, seasons + dying

Bit 0 – Autum
Bit 1 – Winter
Bit 2 – Spring
Bit 3 – Summer (default)
Bit 4 – Dying
Bit 5/7 - (not used/ignored)

n1) locked/protected/other values disable object.

Class 1A - Climates

firstseason - The season that the year starts with, [0,1,2,3]. n1
seasonlength[array] - Number of days in the four seasons.

seasonlength[0] <- first season, set by firstseason.
seasonlength[3] -> after this one, its firstseason again until end of year.

field_7[0] - Low snow level, starts at begin of Winter season. n2
field_7[1] - High snow level, starts at begin of Spring season. n2

n1) locked/protected/other values disable object.
n2) High >= Low, or object will be disabled.


  • seasons: Autum(0) Winter(1) Spring(2) Summer(3), 3 -> Australia/Southern hemisphere climates.
  • snow traveling speed: 4 days per map level.
  • field_7 value = (Level - 1) x 4 Where level is counting up from the lowest ground level (lowest ground is 0)

Class 1B - Hill Shapes

field_0[2] - number of hill height maps
field_0[3] - number of mountain height maps


  • Last image is UI-icon for object-selection(SE)
  • hill shapes will become a selectable option in object-selection(SE), if hill-dat files > 1
  • max HF-image size 255x255. (ok, 256x256, but thats with some extra ribble effect)
  • field_0[12] - bit 1 ... looks buggy to.

Class 1C - Buildings

cargo[array] - The cargo object it produces/accepts

bit_0 = 1 Use 2x2 tile size
bit_1 = 1 Include under "Miscellaneous Buildings"
bit_2 = 1 Building cannot be demolished
ishq Is company headquarters building

clearcostfact - Cost factor to clear the building
numproduce[array] - Amount of first and second cargo produced. Maximum value of 255 = approx. 12 units/mo. Exceeding 255 is converted to mod[256], so increasing this number beyond 255 does not seem to help. Also, numproduce[0] is the amount added to the city population.
numaccept[array] - Units of 1/8 cargo acceptance for the four cargo types
useobject desc="cargo[array]" class="8"> - First two array elements are types of cargo generated. All four types are accepted.

aux_0, num=XX XX=Number of .pngs / 4
<unknown name="field_0[0]" size="1">1</unknown> not sure what this value means, but seems to increase in order of height?

<unknown name="field_0[X]" size="1">1</unknown> same as aux_0, except increments of x are 2x the aux_0 values, and the value is always 1

aux_2[X] X=Number of different appearences for this building
<unknown name="field_0[1]" size="1">1</unknown> value is the number of png tile to use for level 0, as defined in aux_0
<unknown name="field_0[2]" size="1">2</unknown> value is the number of png tile to use for level 1, as defined in aux_1
one entry for every storey of building height

Class 1E - Industries

firstyear - First year it can appear
lastyear - Last year it can appear
field_0[188] - Minimum number of buildings within industry area
costind - Index of foundingpricetable
costfactor1 - How much costs a founding (must be more then 17 or loco.exe will crash)
field_D2[4], field_D2[6] - Produces without input (only produce[array] where array=0)

bit_8 - Industry can only be built on water (Oil Rig)
bit_10 - Industry can be founded by user
bit_D,E,F,14,16,17,19,1A,1B - ****Unverified: suspected to be related to station names located near this industry (ex: "XXX Mines", "XXX Wells", etc.)
needall - If it needs all cargo types to produce
canincreaseproduction - If it can increase production
candecreaseproduction - If it can decrease production
field_E8[0,1,2,3,4] - ****Unverified: suspected to be related to industries that vary production according to season and spread out terrain (ex: forests, farms, grapes, etc.)

produces[array] - The cargo object it produces
accepts[array] - The cargo object it accepts
fence[array] - The fence object to be placed around the industry

numaux4ent = number of different building base tiles available
aux4 = groups of buildings/ 1, 23, 45, 56, etc. ************ Unverified
aux5 = range is aux4 variables, some sort of selection of aux4 to randomize industry appearence? ****** Unverified

Class 20 - Companies

spritesets - Bits 0..8 indicate to use those sprites, two each
intelligence - Intelligence
aggressiveness - Aggressiveness
competitiveness - Competitiveness