openOMSI GitHub Discord

Docs / Reference / Content formats

The [keyword] block format (used by .bus .ovh .sco .sli .cfg .hof .ttp .ttl .ttr .owt .oop .odr .otp .osn .dsc .hum .txt …)

2 min readEdit this pagedocs/FORMATS.md

Quoting the original .bus header comment: the program ignores everything except keywords like [mesh] when they stand at the start of a line, alone on the line. The following lines are then read as the parameters, one per line. Afterwards the program searches for the next keyword.

Consequences implemented in omsi-cfg (settled on the loaders of OMSI, which compare the line they read with their keyword literals by plain Delphi string equality):

  • A keyword line is the whole line: no leading whitespace (indented [keyword] lines are the stock files' help texts and switched-off blocks - the SD202 cabin's [exit] help, the F90's second rear axle, whose mesh does not exist, the EN92's fourth door-slam sound) and no trailing whitespace.
  • The keyword is spelled as the original spells it: [matl_noZwrite], [LOD], [NightMapMode], [noDistanceCheck] (a mod's [matl_nozWrite] or [NoMapLighting] is free text). Keywords the original does not know are compared without regard to case.
  • Exceptions: .hof cuts trailing tabs, spaces, CR/LF and " off every line (the stock depot files are spreadsheet exports); ailists.cfg lower-cases its lines.
  • Sub-commands (attach_trans/attach_rot_* after [new_attachment], origin_*/anim_*/ offset/delay/maxspeed after [newanim]) are compared the same way, as lines of their own anywhere after their block (the stock Timetable_Terminus_Pole_S.sco has its attach_trans after [complexity]).
  • -<DISABLED>- … -<ENABLED>- (each alone on its line) switches blocks off in .bus/.ovh, .sco, model.cfg, passengercabin.cfg, paths.cfg, .hum and envir.cfg.
  • Parameter lines are consumed verbatim in order; an empty line is a legal (empty) parameter.
  • Free text between blocks is ignored.

File names in content files are resolved as Windows resolves them: \ and / both separate, names compare without regard to case (umlauts included), a folder name loses one trailing dot and the last name all trailing dots and spaces (Ahlheim's anz-oben.jpg.).

Content roots (openOMSI's content folder, mounted archives, the OMSI 2 installation) are searched as if they had been copied over each other, highest priority last - with one exception: a vehicle pack (Vehicles/<folder>) present in two roots in two versions does not mix.

The copy under a higher-priority root patches the one a vehicle was loaded from only when it has no .bus/.ovh/.zug of its own or only ones that pack has too;

a pack with vehicles the other lacks is another version (Ahlheim V5 bundles its own Citaro Facelift next to an installed older one), whose files are only used for what the vehicle's own pack lacks. Mixed, the Ahlheim Citaro ran the installed pack's varlists and constfiles under its own scripts and its displays stayed dark.

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

↑↓ to move↵ to open