Simutrans Object Specification

Dat File Structure Description

Description of game objects is stored in dat files (plain text files; Windows or Unix style new lines). Any line beginning with # is treated as a comment and should not be parsed. Descriptions for more objects can be together in a single file. The delimiter is any line beginning with “-“, good habit is to make this separator line 80 characters wide. Although that more delimiter lines can follow each other, it is good habit to insert exactly one between two objects. (If more lines are needed for good appearance, comment them.)

Each object is defined by a set of attributes and their values, the value of an attribute is assigned in the style: “property=value”, one assignment per line. Definitions are not in general case sensitive. The order of assignments does not matter. Good habit is to start each object definition by an assignment of properties which identify the object uniquely (obj, name). The list of the attributes is different for each object type and in some cases it even depends on the value of other properties. The only common attributes are obj (identifies object type), and name (name of the object, must be unique in whole scenario).

 

Currently Recognized Object Types (attribute obj):

  • bridge (any type of bridge)
  • building (city buildings, town halls, and monuments and tourist attractions)
  • citycar (the private cars driving in the cities)
  • crossing (level crossings)
  • cursor (mouse pointers)
  • factory (also known as industries)
  • good (any kind of good)
  • ground (basement, gras, outside, shore, water)
  • menu (game menus)
  • misc (construction site, overheadpower, PowerDest, PowerSource, sidewalk, signals)
  • pedestrian (those people walking around in cities)
  • smoke (for industries and vehicles)
  • symbol (several pictures of miscelaneous usages)
  • tree (any kind of plant)
  • tunnel (any kind of tunnel)
  • vehicle (any kind of player-owned vehicle)
  • way (road, track, powerline)
  • WindowSkin (skins of menus and game windows)

 

Including objects to Simutrans

Objects are transformed to the Simutrans readable format (.pak files) using a program called MakeObj. Pak files store the object attributes in slightly compressed way. One pak file can hold information about more objects. Simutrans will try to read all pak files in a specified scenario directory and load all objects stored in them. It will crash if more objects of the same name are found.

 
   
   
   
 



SimuTranslator: ©2004-2005 SimuTranslator Team
Documentation: ©2004-2005 Tomáš Kubeš
SimuTranslator documentation home