openOMSI GitHub Discord
Modding overview

Docs / Making content / Modding overview

Trolleybuses

1 min readEdit this pagedocs/MODDING.md

OMSI 2 has no overhead wire of its own. Its trolleybus add-ons ship a plugin DLL that reads Omsi.exe's memory and cannot run in openOMSI. openOMSI simulates the wire itself. A trolleybus add-on needs two things:

  1. In the vehicle's .bus: a [trolley_pole] per pole (roof hinge, boom length, spring force, mass, retriever and motor) and a drive, [trolley_rheostat] or [trolley_async].
    • A vehicle with its own scripted drive just adds the poles. Its torque then works on the wire and stops without it.
    • A model with its own pole meshes says visible 0 and rotates them by the game's Trolley_Pole<k>_Elev and _Azim variables.
  2. For the map: a trolley.txt beside its global.cfg, or in a mod's maps/<name>/ folder for a map that has none. It lists the wire spans with their sag, the sections and dead sections, the insulators and the switches.

The map's masts and hangers stay the map's own objects. Every key and variable is on the Trolleybuses page. Converting existing add-ons: Trolleybus mods.

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

↑↓ to move↵ to open