Map mod format

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

  • How to package a map mod

    From Train Fever 7554 we can create maps based on height maps, but just adding the height map isn't enough.
    The first part of this guide is for basic maps without any extra mod manager support. The second part is about how to package the map so it can be handled by a mod manager.

    First off, if you haven't already a maps folder in your Train Fever root, go ahead and create one.
    To install a height map you need one folder for the map and then at least two files

      +-- Arbitrary_folder
              +-- info.lua
              +-- heightmap.png

    The Arbitrary folder can be named anything you like and is not shown anywhere in TF. However, it servers like a map ID internally in TF to keep track of what map you have selected. Just as with the mod ID, I would recommend to use the same naming convention as for mods, except the version part.


    For example:

      +-- gwinda_west_sweden
              +-- info.lua
              +-- heightmap.png

    This is a much more simple version of the mod's info.lua

    function data() return {
      description    = "The area from Bohus to Kungsbacka",
      name           = "Sweden's west coast",
      range          = { 25, 1000 },
      seed           = 'A working map seed'
    } end

    This is obviously a description of the map, but doesn't support localization at all.

    This is the map name you will find inside Train Fever and has nothing to do with the folder name (map ID). This name doesn't support localization.

    A table specifying min and max height of the map where the water level is fixed at 100.
    In the example above, pure black will be placed at 25 (-75m below the water level) and pure white at 1000m (900m above water level).

    If the height map contains a lot of water or other obstacles, there is sometimes not enough space to connect all cities and the map creation will fail. To ensure that the map will work, a tested map seed can be provided. The seed follows the same rules as any map seed in Train Fever.

    This must be a grayscale image saved in .png format. It can be either a 8bit or 16bit image. It can be one of three accepted sizes.

    Small: 2049×2049
    Medium: 3073×3073
    Large: 4097×4097

    Black is the lowest point and white the highest. The range parameter in info.lua controls the scale and water level.

    Package a map mod for use with a mod manager
    TFGM can already handle the basic map format described above, but with very little feedback. For example no author information or localization.
    Just zip or rar the map ID folder and you are ready to go.

        +-- gwinda_west_sweden
                +-- info.lua
                +-- heightmap.png

    From TFGM's point of view, a map mod is treated as any ordinary mod and can have additional files, to be used by a mod manager.

        +-- gwinda_west_sweden
                +-- info.lua
                +-- strings.lua
                +-- image_00.tga
                +-- heightmap.png

    This is pretty much the same as a mod's info.lua

    Note that the name can be localized with the strings.lua file. This localization only works in the mod manager.

    Note that the description can be localized with the strings.lua file. This localization only works in the mod manager.

    This is the minimum Train Fever version this map mod requires to run. In practice, set this to the Train Fever version you tested the map mod against.
    The variable is optional and can be excluded.

    This is a table with tags so the map mod can be categorized/grouped/sorted etc.
    The tag name itself serves as the tag identifier and should therefore be in English, preferable one word.

    tags = { "Map", "Sweden" }

    TFGM have the capability to localize tags so you can search for a tag in any of the localized tag versions and still find it.
    There is no need to put the authors or map mod name as a tag, these are included automatically in TFGM searches.

    This is a table with one or more authors to the mod. An author can have a role indicating his contribution to the mod.

    Example with 3 author:

    The name of the author, displayed on the author card and in list view.

    This is the numerical Steam profile ID. You can retrieve it from TFGM's Preferences dialog.
    The ID is used to fetch your Steam avatar image and link to your Steam Profile Page.

    There are currently 5 roles.

    This is a lead creator of the mod.
    The text field have at this point no meaning and can be freely used. You can put it inside a _(...) for translation.

    This is a Co-Creator contributing to the mod.
    The text variable specifies what he/she contributed with. You can put it inside a _(...) for translation.

    This mod was based on the work of this author.
    The text variable specifies the mod(s) this mod was based on.

    This author did mod testing.
    The text variable specifies what was tested. For example "Windows 7", "Linux", "Mac" etc...

    This creator contributed with a localization (translation) of the mod.
    The text variable specifies what language he/she contributed with.
    The language is specified with it's ISO639-1 language code (not to be confused with a country code).

    This field has different meaning depending on the role, see each role for an explanation.

    This works exactly in the save way as the mods do.

    function data() return {
      sv = {
        ["The area from Bohus to Kungsbacka"] = 'Området från Bohus ned till Kungsbacka',
        ["Sweden's west coast"] = 'Sveriges västkust'

    This is the map mod's image inside the mod manager. If this file is missing, the heightmap.png will be used instead.
    Since this image isn't used by Train Fever, it can actually be in any of the following formats: