Developer Info

Overview

Train Fever can be modified and extended by Mods. From a file system perspective, a Mod is simply a directory containing all the necessary data and script files. The directory name serves as the Mod’s unique identifier and also contains a version number (see Directory structure for details).

Basically, there are two ways to modify game functionality and content:

  • File-based: Allows to add, replace or remove (hide) content on the file level. The general idea is that the files in a Mod directory are seen by the game just like the game’s own files. If there are two files with the same name, the file from the Mod directory takes precedence.
  • Script-based: Allows to modify the game’s configuration and content by means of a Lua script. This way, it’s e.g. possible to adjust the capacities of all vehicles without copying all the files and changing the values individually.

In Train Fever, Mods are not enabled globally, but on a per-game basis. In other words, every savegame remembers which Mods are active. This has the advantage that multiple games with different sets of active Mods can be played without hassle. However, it also means that content that is loaded outside of the actual game (e.g. main menu backgrounds) can’t be modded at this time.

Reference

Examples

The best way to learn is probably to study existing Mods.

  • urbangames_no_costs_1: sets all cost related variables to zero (script-based)
  • urbangames_no_main_conns_1: disables “main connections” (one line of script)
  • urbangames_vehicles_no_end_year_1: sets the “end year” of each vehicle to zero, making them available forever (script-based)
  • Get more Mods on http://www.train-fever.net or http://transport-games.ru

14 thoughts on “Developer Info

  1. Pingback: Improved game version and mod specification released | Train Fever

  2. Hallo,
    Ich habe ein Problem, ich wollte, um die Auflösung des Spiels auf meinem Bildschirm gesetzt, und ich wählen Sie eine zu hohe Auflösung. Da kann ich Sie auf die Registerkarte “Optionen” Ich habe versucht neu zu installieren, das Spiel nicht mehr zu erreichen, aber es ist das gleiche

    Können Sie mir helfen, indem Sie die Homepage des Spiels?

    Bis eine Antwort erhalten meine herzlichen Grüße

    Alois Blaser

    (I mit Google Translate, weil ich Französisch sprechen)

  3. come si disattivato i collegamenti stradali tra citta’grazie.

  4. it would not open because it said my driver needed a software upgrade so i did that and it still wont open

  5. Why is an error opengl? the latest drivers installed, update all the latest versions, full compliance with the minimum requirements and still talking about the error that it is necessary to update the drivers on the video card, may be necessary instead of opengl direktx to move, it still stable?

  6. Dear developer team,

    thanks for a wonderful game. While playing I had some ideas and saw that it is possible to mod your game, unfortunately the modding API doesn’t allow for too much. Would it be possible at some point to get the following APIs:

    * UI hookups (creation of new windows, modification of existing ones, …)
    * input hookups (modify key/mouse button assignments, set new ones, etc.)
    * behaviour hookups (override, extend, add new behaviour)

    The last part should also include building mechanisms, e.g. I would like to add a mod for finer control over building rotation (either overwrite m,n keys or add something like “while building mode is active, drag with right click controls the rotation”).

    That’s only a suggestion, hopefully it’ll get added at some point in the future. (? ) 🙂

    Best wishes

    • Hi, in the game you have the frech TGV, but you call it the TFV. Do you may can change that.
      beside that i love this game, thanks for made it.

  7. Hello, I’m interested in the possibility of modifying the cargo/passenger distribution algorithm, I’ve taken a quick look through the lua scripts but haven’t found anything promising, I’m guessing that this would be somewhat beyond the scope of current modding infrastructure.

    If there were a way to get at these algorithms I think there would be scope for some really interesting modding, I have a couple of ideas I’dd like to try out.

  8. Ich habe ein zu hohe Auflösung des Bildschirms und möchte auf 1920 x 1080 (16:9) umstellen. Leider sehe ich unter Einstellungen zwar die Auflösung aber nicht den den Button für die Freigabe. Was kann ich jetzt machen?

    • Am schnellsten lässt sich das Problem so lösen: Mit ALT+Return in den Fenstermodus wechseln und anschließend nochmals mit ALT+Return wieder zurück in den Vollbildmodus. Das Spiel stellt dann die native Bildschirmauflösung wieder her!

  9. buenas, tengo una lap y ahí me descarge el juego , pero le cambie la congifuracion y ya no me deja hacer nada … que tengo que hacer?

  10. Just wondering… how does one develop rolling stock mods? I can’t find any information on how to make “object” mods, like trains and upcoming planes and ships.

  11. Dear Urban games.

    Dont you think there should be at least small price downgrade for Train Fever owners?
    We believed in you, when the game was in diapers, and we got awesome game, but i want to play also with boats and planes… Do I need to spend money for same game, but as addon content?
    (I will buy the game anyway probably, but you get the point)

    • Hello Denis!

      Owners of Train Fever get a 15% discount when buying Transport Fever on Steam or GOG.

      Best Regards

Comments are closed.