mod.lua and strings.lua - Explaining the content and requirements

Willkommen in der Transport Fever Community

Welcome to the fan community of Transport Fever and Train Fever, the economic simulators of Urban Games. The community is free for you to share and inform yourself about the game. We cultivate a friendly and objective interaction with each other and our team will be happy to answer any questions you may have.


Registration and use is of course free for you.


We wish you a lot of fun and hope for active participation.

The Team of the Transport-Fever Community

  • Based on examples, all required and optional field for the mod.lua and strings.lua files are explained in this article.

    [Blocked Image:] Die Deutsche Version gibt es hier: mod.lua und strings.lua - Erklärung und Inhalt

    1 Official Format by Urban Games (mod.lua)

    The basic format of the mod.lua file that is required for each mod in the root directory

    2 Additional Information for TPFMM

    Basic Information

    tfnetId = 0,                 -- optional, entry id
    steamId = 0,                 -- optional, steam workshop file id
    url = ""  -- optional, url to mod homepage


    authors = {              -- optional, information about authors
      {                      -- add one or multiple authors
        name = "Author 1",   -- author name
        tfnetId = 00000,     -- optional, id at
        steamId = 0000,      -- optional, steam id
      },                     -- optional, add more authors


    tags = { "tag1", "tag2", "tag3" },    --optional, list of tags

    Define dependencies to other mods that are required in order for the mod to function as desired, not evaluated by the game but informs mod managers which other mods to download. For the download, at least one online source has to be defined

    dependencies = { "other_mod_1", "another_mod_1", "third_mod_1" },

    3 Translations (strings.lua)

    All strings put in _("") will be translated based on the strings.lua file:

    If a variable is passed to the _() function, the content of the variable, not the variable name itself is passed to the function. This, in combination with global variables in lua lead to the scenario in which description and name of multiple mods where overwritten by each other in a beta patch of Transport Fever. Although this is fixed by now, Urban Games and strongly advises to only use local variables. Pesonally, I advice to not use variables for the translation function.[/box]

    4 Example Files

    Very simple file with single author

    A repaint mod, that requires the mod defined above