-
Notifications
You must be signed in to change notification settings - Fork 4
Home
This wiki contains some (unofficial) documentation for the binary map format of Euro Truck Simulator 2 and American Truck Simulator, using the output of the editor console command edit_save_text
as a guideline.
Nothing in this wiki is guaranteed to be 100% accurate; I'm just piecing things together as I go.
Updated for map format version 900 (game version 1.48.5–1.50).
The root of a map is the .mbd file (mapname).mbd
. It defines various global settings such as the scale of the map.
The content of a map is divided into a grid of individual sectors with a size of 4000×4000 units (1 unit = 1 meter). They are stored in a subdirectory with the same name as the .mbd file.
Each sector consists of four to six files:
- the .base, .aux and .snd files, which contain the items and nodes of the sector. The structure of all three files is identical; the only difference is which item types they contain.
- the .data file, which contains the cosmetic stuff for Road and Prefab items specifically.
- the .desc file, which describes the sector itself.
- the .layer file, which stores editor layers.
The .snd and .layer files are optional.
Strings in this format are UTF-8 Pascal strings with a uint64 length prefix (you know, in case someone needs a sign with more than four billion characters on it one day).
A token is an 8-byte type which encodes a string of up to 12 characters from a limited character set. It's used as an identifier throughout the Prism engine.
Indices of bit fields in this wiki are counted from LSB to MSB and are given as an index rather than a power of two. In other words, in the bit field 0b1000, the flag which is set to 1 has the index 3, not 8.
The other data types should be self-explanatory.
-
.base/.aux/.snd
- Animated Model
- Bezier Patch
- Buildings
- Bus Stop
- Camera Path
- Camera Point
- City
- Company
- Compound
- Curve
- Cut Plane
- Cutscene
- Far Model
- Ferry
- Fuel Pump
- Garage
- Gate
- Hinge
- Hookup
- Map Area
- Map Overlay
- Model
- Mover
- No Weather Area
- Parking
- Prefab
- Road
- Service
- Sign
- Sound
- Terrain
- Traffic Area
- Trajectory
- Trigger
- Visibility Area
- Walker