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.
Guide to Mod Settings
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.
ModUtil from Merk
Community created a concept for Mod Settings and a script with which mods can access them: Mod Settings.
Different types (true/false, numbers, strings and tables) can be defined, which are saved in the respective mod folder in the file settings.lua.
Change the Settings
Using the CommonAPI
The method I recommend and at the moment the most user-friendly one is to use the GUI of the CommonAPI2.
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.
Manually in the file
I only recommend this variant to experienced users who have experience in handling with the game files and modifying them. If you don’t know where the mod folder is located, you should rather use the method above.
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.
return {
capacityFactor = 2,
townDevelopInterval = 60,
logging = true,
}
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.
Be the first to comment