I am going to create a guide on how to change the Mod Settings, as there are often questions about it and many mods are using them.
1 Basic idea
Everyone plays Transport Fever according to their own wishes and wants to customize the mods. Therefore, there were (and still are) some mods with several versions, although only one value is changed.
Unfortunately, there is still no official procedure to implement options for mods. (Interestingly, there is an entry options in the wiki, which apparently has no influence.)
2 modUtil from Merk
Thankfully, Merk created a concept for Mod Settings and a script with which mods can access them: Settings for Mods
Different types (true/false, numbers, strings and tables) can be defined, which are saved in the respective mod folder in the file settings.lua.
3 Change the settings
3.1 Using the CommonAPI
The method I recommend and at the moment the most user-friendly one is to use the GUI of the CommonAPI2, since most of you probably have already installed it.
To do this, follow this exact procedure, otherwise settings may not be displayed.
- Go to load game and select a savegame that has activated the mod, for which you want to change the setting or start a new game and go to the mod list and activate desired mods
- Click on Mods at the top left where CommonAPI is located. Then click Mod Settings.
- A list with all activated mods is now displayed. All who support the settings have a button in this column.
- If you click on it, another window opens for the respective mod with all available settings and corresponding descriptions.
- Change the values as desired.
- Don't forget to save.
The new values are then written to the file settings.lua, which means that they apply globally to this mod. Settings only for savegames don't exist yet.
You can change the values during the game, too. But most mods will only react to it after reloading.
3.2 With the Mod Manager
The Transport Fever Mod Manager [TPFMM] is suitable for managing mods and provides a GUI for changing the settings. This was the originally intended way to change the settings.
This variant currently only works for Transport Fever, as there is no Modmanager for Transport Fever 2 yet.
3.3 Manually in the file
I only recommend this variant to experienced users who have experience in handling with the game files and modifying them.
You open settings.lua, which is in the respective directory of the mod. It contains e.g. following LUA code. Here you can change the numbers or truth values manually.
Disadvantages:
- No protection against invalid value range
- No description/explanation
- If you accidentally enter the values incorrectly, you can generate syntax errors, which can lead to a crash or ineffective settings
4 Error / Invalid file?
If errors occur after changing the file or if you want to restore the default values, you can delete settings.lua at any time. The mod also works without it (in this case with the default values). When saving again with the CommonAPI, a new file is created.
Comments 1
Newly created comments need to be manually approved before publication, other users cannot see this comment until it has been approved.
Newly created comments need to be manually approved before publication, other users cannot see this comment until it has been approved.
VacuumTube
Feel free to link to this guide. It's also on steam: https://steamcommunity.com/sha…iledetails/?id=2052839045