A guide on how to make your existing or new mods work with the new in-game mod manager that came with the USA DLC patch.
[url='http://www.train-fever.net/index.php/Thread/2793-Prepare-your-mod-for-the-new-in-game-mod-manager/'][b]FORUM THREAD FOR DISCUSSIONS HERE[/b][/url]
I'm sure a lot of you modders have asked yourself how to get your (or your favorite) mod working from the get go.
I politely asked for guidance, and got some info on it.
Your mod need its own folder. The folder needs to be named like this: [font='courier new,courier,monospace'][color=#0099ff][b]yourname_modname_majorVersionNumber[/b][/color][/font]
[b]Example[/b]
[code]olahaldor_nsbstadlerflirt_1[/code]
If you make a major version of your mod, and it's become version 2.1, you should name the folder like this
[code]olahaldor_nsbstadlerflirt_2[/code]
In this folder it's the same hierarchy as before, with a [color=#0099ff][b][font='courier new,courier,monospace']res[/color][/b][/font] folder, [color=#0099ff][b][font='courier new,courier,monospace']config [/color][/b][/font] (needed for multiple units), [color=#0099ff][b][font='courier new,courier,monospace']models[/color][/b][/font], [b][color=#0099ff][font='courier new,courier,monospace']textures[/color][/font][/b] and so on.
[b]Preview image
[/b]To make the user experience better you should make a screenshot of your mod, so it's easier to see what mod the user is about to activate. This screenshot must be [b]320x180 pixels[/b], and saved as uncompressed [font='courier new,courier,monospace'][color=#0099ff][b]image_00.tga[/b][/color]
[/font]This image file needs to be placed in the root of your mod folder. So it'll be something like this
[code]olahaldor_nsbstadlerflirt_1
\-- res
\-- image_00.tga [/code]
[b]Getting the mod to show up in the menus
[/b]In order to get the mod to appear in the list of possible mods to activate, you will need another file, [b][color=#0099ff][font='courier new,courier,monospace']info.lua[/color][/font][/b]. The file will be placed in the root folder of your mod.
[code]olahaldor_nsbstadlerflirt_1
\-- res
\-- image_00.tga
\-- info.lua[/code]
Here's an example of what the [color=#0099ff][b][font='courier new,courier,monospace']info.lua[/color][/b][/font] file looks like in my NSB Stadler Flirt mod.
[code]
function data()
return {
minorVersion = 61, -- minor version, count up from 0
severityAdd = "WARNING", -- OPTIONAL "NONE", "WARNING" or "CRITICAL"
severityRemove = "CRITICAL", -- OPTIONAL "NONE", "WARNING" or "CRITICAL"
name = _("NSB Stadler Flirt"), -- OPTIONAL mod name
description = _("NSB Stadler Flirt v1.6.1"), -- OPTIONAL description
authors = { -- OPTIONAL one or multiple authors
{
name = "Ola Haldor Voll", -- author name
role = "CREATOR", -- OPTIONAL "CREATOR", "CO_CREATOR", "TESTER" or "BASED_ON" or "OTHER"
text = "I made this", -- OPTIONAL contribution description
steamProfile = "76561197961659177", -- OPTIONAL steam profile
tfnetId = 18378 -- OPTIONAL train-fever-net author id
}
},
tags = { "vehicle", "train" }, -- OPTIONAL "vehicle", "bus", "tram", "train", "steam", "diesel", "electric", "railcar", "wagon", "passenger", "goods", "building", "station", "deco", "town", "depot", "signal", "tool", "pack" or similar tags
tfnetId = 0, -- OPTIONAL train-fever.net download id
minGameVersion = 5112, -- OPTIONAL minimal required train fever game version
dependencies = { }, -- OPTIONAL list of dependent mod ids
url = "http://www.train-fever.net/filebase/index.php/Entry/74-NSB-Stadler-Flirt" -- OPTIONAL mod url
}
end
[/code]
Notice the [font='courier new,courier,monospace'][b][color=#0099ff]minorVersion[/color][/b][/font]. This is where you place your dot point release number. So in my case, [font='courier new,courier,monospace'][color=#0099ff][b]6[/b][/color][/font]. But because of the new way of handling mods in Train Fever but no significant update to the mod itself, I didn't think it was necessary to bump it up to 1.7, thus I wrote [color=#0099ff][font='courier new,courier,monospace'][b]61[/b][/color][/font] to indicate 1.6.1 as it will say on the download page.
The rest will speak for itself.
In the end, here's what it will look like in the Train Fever mod activation. Notice how the major and minor version names appear next to the [font='courier new,courier,monospace'][color=#0099ff]name[/color][/font] tag from the [font='courier new,courier,monospace'][b][color=#0099ff]info.lua[/color][/b][/font] file while the [font='courier new,courier,monospace'][color=#0099ff][b]description[/b][/color][/font] appears below the preview image.
[img]http://puu.sh/ggdaU/1662bcfb8e.jpg[/img]
I hope this will get you going to update your mods![font='courier new,courier,monospace'][/font]