Transport Fever 2 Mods Directory structure

Transport Fever 2 Mods Directory structure

Important notice
All text files (models, meshes, scripts etc.) should be encoded in UTF-8. Also, it is recommended to use lower-case file names to avoid problems on case-sensitive OSes / file systems.

Mod layout
The game’s installation folder (usually C:\Program Files (x86)\Steam\SteamApps\common\Transport Fever on Windows) looks something like this:

Transport Fever\
dlcs\
...
mods\
...
res\
...
...

All mods must be installed in the mods\ sub-directory. The directory structure is as follows:

Transport Fever\
mods\
urbangames_sample_mod_1 (1)
config\ (2) (optional)
...
documents\ (3) (optional)
...
res\ (4) (optional)
...
mod.lua (5)
image_00.tga (6) (optional)
strings.lua (7) (optional)
workshop_preview.jpg (8) (optional)
filesystem.lua (9) (optional)

– The directory name has the form _. The ID should be as specific as possible, so it should definitely contain the author’s name (or organization) and the mod name. The version number is an integer starting at one.
– Optionally contains mod-related config files (Lua files). These files can be “required” from other Lua files, i.e. the config directory is added to Lua’s package.path list.
– Contains user documentation like manuals or read-me files. This directory is ignored by the game.
– Most content (like models, textures etc.) goes into this directory. Everything in here can be thought of as if it had been copied (with overwrite) to the base res/ folder.
– The main file, contains metadata (like name, description etc.) and script code. See Scripting for more information.
– An image of 240×135 pixels, shown in the game.
– Contains translations of the mod’s texts.
– An image, shown in Steam workshop, when the mod is published.
– Defines files and directories to be removed/hidden from the base game.

Versions
Different versions of the same mod are independent of each other, but when starting a new game, only the latest version is shown to the user.

mod.lua
The basic structure of the file is as follows. See Scripting for more information.

function data()
return {
info = {
name = _("Sample mod"), -- (1)
description = _("modDesc"),
minorVersion = 0, -- (2)
severityAdd = "WARNING", -- (3)
severityRemove = "CRITICAL",
},
-- options = ..
-- runFn = ..
-- checkActiveFn = ..
}
end

– Mod name and description. The _(“text”) indicates that the text will be translated (see strings.lua below).
– Minor version, count up from 0.
– Defines what kind of warning to show when the mod is added to or removed from an existing savegame. Can be NONE, WARNING, or CRITICAL.

strings.lua
function data()
return {
en = {
modDesc = "This is a sample mod.",
},
de = {
["Sample mod"] = "Beispiel-Mod",
modDesc = "Dies ist eine Beispiel-Mod.",
}
}
end

This file contains translations for strings, specified as a list of key/value pairs for each language. If a key does not exist for a given language, the English text is used. If this isn’t defined neither, the key itself is displayed. For a list of possible language codes, see the directory res\strings\.

filesystem.lua
function data()
return {
hiddenDirs = {
"res/models/model/vehicle/truck/"
},
hiddenFiles = {
"res/models/model/vehicle/train/borsig_1860.mdl",
"res/models/model/vehicle/train/br75_4.mdl"
}
}
end

Allows to specify files and directories that are to be hidden from the game, i.e. it has the same effect as deleting the file(s).

Credits:
Transport Fever 2 Mods

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...


What is Transport Fever 2 mods

Are you curious how Transport Fever 2 Mods works and can improve your Transport Fever 2 game? So, Transport Fever 2 Mods file are additional features, maps, vehicles, skins and etc which improve your game with unseen options in game. Transport Fever 2 mod is the best choice when you feel stuck or even bored with the basic game. So you you are able to download Transport Fever 2 to upgrade the game and create your own game version. We have the Best Transport Fever 2 mods and Top Transport Fever 2 mods for PC, Mac, Xbox or PS4. All you need to do is browse mods categories, choose the mod for Transport Fever 2 you need and install mod in Transport Fever 2. What is more, all Transport Fever 2 mods is free and welcome to download as many mods as you want. That's way our Transport Fever 2 Community created the biggest mods database for this game.



Best Transport Fever 2 mods mods

Leave a Reply

Do you need help or to say thanks for mod author? Just leave a comment bellow!