openOMSI GitHub Discord

Docs / Reference / Content formats

Map - units mc_mapclass, mc_terrain_2, mc_chrono

9 min readEdit this pagedocs/FORMATS.md

global.cfg keywords (from the exe): name friendlyname description/end version NextIDCode worldcoordinates dynhelperactive entrypoints realrail LHT mapcam standarddepot moneysystem repair_time_min years realyearoffset ticketpack splineObjTypes scenObjList backgroundimage groundtex map addseason trafficdensity_road trafficdensity_passenger.

Calendar: Holidays.txt ([holidays] range + name, [holiday] day + name), timezone.txt ([timezone], [DST]), [location].

[entrypoints] records: index, object id, 0, x, height, y (within the tile), quaternion (x, y, z, w; heading = 2·atan2(y, w)), the index of the object's tile in the [map] list, name.

Tile indices of the map's files (entry points, [splineAttachement_repeater], timetable tracks) count every [map] entry, a tile listed twice included (Westcountry 3 lists 33 twice). Object ids are not unique across a map joined from two.

tile_x_y.map keywords: version terrain water variable_terrainlightmap variable_terrain object attachObj spline spline_h splineAttachement splineAttachement_repeater varparent spline_terrain_align spline_terrain_align_2 rule kill_rule; chrono patch files add selobject selspline delete typ relabel.

Rule kinds: speedlimit overtaking_prohib bus trucks no_cars trafficdensity priority. A [rule] belongs to the [object] or [spline] written before it, and most of them follow an object: Berlin-Spandau has 5402 trafficdensity, 693 speedlimit, 576 trucks and 64 no_cars on objects against 3114/810/284/4 on splines. Its first line is the [path] index within that element.

<map>/Chrono/<folder>/Chrono.cfg:

[startdate]
[enddate]
YYYYMMDD, enddate 0 = never
[ticketpack] [moneysystem]
[deactivate_lines]
a block of line names, one per line

The folders are taken in name order one is active when startdate ≤ date and (enddate = 0 or date < enddate), its .map patches, ailists.cfg, timetable files are laid over the map's. A line a chrono takes off does not run on any later date either - Berlin-Spandau on 2026-09-17 has 27 lines, not the "5 & 5N" that the timetable change 1000_FPW_19910602 of 1991-06-02 removed.

[object]: 0, path, IDCode, x, y, z (z relative to the terrain, except for [absheight] objects and objects that carry [splinehelper] connectors such as crossings and switches, whose z is absolute like the splines they connect to), heading, pitch, bank (degrees, heading clockwise from north), then the object's labels: a count and exactly that many lines, whatever they say (an empty one, or one that looks like a keyword, is a label too).

They are what the editor's Labels dialog edits - sign texts (@ breaks a line), line numbers, a tree's texture, height and height/width ratio, a bus stop's name and timetable data - and fill the object's string variables in order; the count is no type (trees write 3 or 4).

[attachObj]: 0, path, IDCode, the parent's IDCode, the parent's instance (only 0 loads: Omsi.exe refuses objects on later objects of a spline attachment row), the index of the parent's [new_attachment] point, heading, pitch, bank, labels.

The parent is looked up among the records ([object], [attachObj], [splineAttachement]) written before it in the tile; an attachment whose parent comes later is not loaded.

Older tile versions write shorter records (TMapKachel.loadMapFile): the leading detail level (0) only from version 9 on (an object above the detail setting is not loaded), IDCodes from 6 on (older records are numbered as they load), an [attachObj] parent by IDCode from 10 on (before: its index among the tile's records so far), its heading from 8 on, pitch and bank from 12 on, labels from 4 on.

A [spline] before version 11 has one line instead of the two neighbour IDs (-1: none, else it continues the spline written before it), cant from 5 on, skew from 14 on, the texture offset from 11 on and the mirror line from 7 on.

[spline] / [spline_h]: 0, path, IDCode, previous, next, x, height, y, heading, length, radius (0 straight, > 0 turns right), gradient start/end (%), cant start/end, skew start/end, alignment length, optional mirror. Field orders were verified by prev/next continuity and bus-stop link distances of the stock maps.

Street names are nowhere in a map but on its street name signs: a StreetSign_* object (Verkehrszeichen_MC; 670 on Berlin-Spandau, 32 on Grundorf) has type flag 1 and the name as its first string, and its heading is the named road's heading + 90° (the plate runs along the road: 1281 of 1429 pairs of same-name signs 150-700 m apart lie within 15° of that). The navigator reads them for the city map.

[splineAttachement]: 0, path, IDCode, spline index (in the tile's spline order), lateral offset, height, start distance, heading, pitch, bank, interval, range, tilt flag, string count, strings;

[splineAttachement_repeater] has two more lines after the 0: the index of the master's tile in global.cfg's [map] list (counting the tiles whose files are missing - Berlin-Spandau lists 369 and ships 329) and the index of the row's first object on its spline.

Object j of a row lies start distance + j·interval along the chain from its start (the splines before the master's, following the prev links with the direction flips where two splines meet end to end) while j·interval ≤ range: that gives 177 of the 180 repeater indices of Berlin-Spandau that can be checked (165 counting from the master's own spline) and puts the buffer stops a few metres before the ends of their tracks.

A record places its row on its own spline and on the following splines of the chain as long as they lie in its tile; where the chain enters another tile, a repeater there carries the row on.

Every one of the 169 Spandau repeaters with objects lies on the first spline of a new tile, and 413 later splines in a record's own tile carry objects without one (a car park row with a 10 m master spline has its repeater say "object 14" on the far side of a 180 m spline of the same tile).

An [attachObj] may name a row's IDCode: it hangs on the row's first object, with the row's own type (a car park's, whatever car stands there).

Tile edge = 300 m; with [worldcoordinates] in global.cfg (Berlin-Spandau) the tile grid is 1/300 degree and the edge is 371.9 m on both axes (measured on 271 cross-tile spline links, spread 0.14 m); local coordinates inside a tile then run 0..372 and objects may be saved in a neighbouring tile's file with coordinates beyond the edge.

tile.map.terrain = u32 (=60) + 61×61 f32 heights. .map.LM.bmp = 256×256 24-bit light map. .map.prt = precache list (text: sco path, min id, max id, -1). [crossing_heightdeformation] mesh.o3d (scenery) is how a junction plate meets the ground.

The plate is one flat object a couple of hundred metres across, placed at an absolute height; the named mesh is a coarse version of the same plate.

Every vertex of the object is moved by the difference between the ground under it and that base mesh, so the plate keeps its kerbs and camber while its arms come down onto the roads that run into them, and the plate's paths take their heights from it (Omsi.exe 0x7ba818).

The ground is not pressed into it at load: nothing in Omsi.exe reads that mesh for the terrain, and objects stand on the .terrain heights.

[spline_terrain_align] (no parameter) and [spline_terrain_align_2] <n> follow a [spline] in a tile file (Berlin-Spandau: 33 and 203 of 2486 splines).

The editor's "align terrain" wrote the ground's heights into the .terrain file already; at load the flag (1, or n) only makes the spline cut its outline out of the ground (Omsi.exe: tile parser 0x794e1a -> spline +0x35 -> segment +0x205 -> Generate 0x5b1178 -> GenerateTerrain, "Terrain hole cutting: Spline").

The outline is the spline type's [terrainholeprofile] extruded along the spline: right edge, far end, left edge, near end; n 2 and 4 keep the far end at the spline's end, 3 and 4 the near end at its start, otherwise each point's third value moves it past the end.

A .sli without [terrainholeprofile] gets one per string of joined [profile]s (0x5ab908): its left end and right end 3 cm in and 3 mm down, a bottom 10 cm under its lowest point reaching 0.5 m past both ends.

An outline that crosses itself cuts nothing. openOMSI does not cut this outline out of the drawn ground where the aligned spline lies in a trough: it fills the trough with solid ground instead, and cuts the outline as Omsi.exe does where the saved ground stands above the spline (a cutting) or where that fill cannot be built.

Each [terrainhole] <mesh.o3d> in a .sco or model.cfg names an object-wide cutter, including declarations before the first [mesh] and repeated commands. The cutter sits next to its declaring file or in its model folder; declarations in a .sco also apply when it references a separate model.cfg.

Explicit cutters apply even to deep excavations; the optional automatic road-cut height limit does not restrict them. Both object and spline cutters matter: without them the terrain stands over the carriageway, which from the driver's seat looks like a missing road.

[groundtex] (global.cfg) is one ground texture the map may be painted with: texture, detail texture, then three numbers - the painting mask's size as a power of two, how often the texture repeats across a tile, how often the detail texture does. The first entry is what the whole map starts as and has no mask;

each further one has a per-tile mask in texture/map/tile_x_y.map.<index>.dds, an 8-bit alpha DDS (DDPF_ALPHA, 0xff alpha mask, sometimes with mipmaps) of exactly that size, whose first row is the north edge - verified where a painted strip crosses the seam between Grundorf's tiles (0,-1) and (0,-2) at identical columns.

The detail texture is multiplied in plainly; the stock ones are bright (noise_low averages 242, gras_det 179) and doubling them like a grey-centred D3D detail map blows the ground out. Grundorf's ground then measures (86, 91, 66) against the (91, 94, 69) of the screenshot the map ships as picture.jpg.

texture/water.tga and texture/water_envmap.bmp of a map are its water: the stock swatch is 8x8 pixels of 47, 74, 83 with alpha 192.

[newanim] blocks of a mesh (model.cfg) are composed in file order, Direct3D style: the first block listed transforms the mesh first and the later ones act on the result, and every angle is used with the sign the file gives it. With column vectors that is M = origin_n·R_n·origin_n⁻¹ · … · origin_1·R_1·origin_1⁻¹.

The SD200's door leaves are the test case: each is two rotations about vertical axes (−170° about the fold, +80.5° back about the post), and composed the other way round they stand across the middle of the doorway instead of folding to its sides.

anim_rot turns about the origin frame's x axis and anim_trans slides along it; origin_from_mesh takes the pivot matrix stored in the .o3d.

Vehicle variables follow from that: Wheel_Rotation_* and Axle_Steering_* are radians (the stock model.cfg multiplies a wheel by 180/π and the SD200's steering wheel by 1450), positive steering is to the right, and n_Wheel is rpm (antrieb.osc computes power as M_Wheel · n_Wheel · π / 30000 kW).

A texture may carry a <texture>.<ext>.cfg sidecar: [terrainmapping] maps it in world coordinates, [moisture] marks a surface that darkens when it rains, [puddles] one that collects puddles, and [surface] n says what it is made of (0 asphalt, 1 concrete, 2 cobblestone, 3 dirt, 4 grass, 5 gravel, 6 snow, 7 deep snow) - the id the vehicle scripts read as Axle_SurfaceID_.

.map.water = u32 count + 4 f32: one water surface over the tile with a height at each corner (every stock file has count 1). The riverbed is ordinary terrain and the water plane sits over it, so the shoreline is wherever the terrain rises through it. .terrain_x.rdy = editor cache, ignored.

Something wrong or missing? Fix it on GitHub or open an issue.

↑↓ to move↵ to open