Cost mod
Beschreibung
FORUMS
Train-Fever.net
Train-Fever.com
Steam
It would be great If someone could send me a German translation, thank you.
REQUIREMENTS
Train Fever 5399 or above.
PLATFORMS
Windows
Mac
Linux
DESCRIPTION
This mod allows you to adjust prices, costs and maintenance cost for all models in TF, even mods and DLC's.
Each category of vehicles, buildings and actions can be adjusted with a single factor to completely remove expenses, cut them in half, double them or whatever you chose.
This mod has been rewritten for the new mod system and no Lua console should be used at all. Just follow the instructions below.
INSTALL
The cost mod is written for the new mod system and must not be copied into the res folder, as before.
Manual install
Unzip the archive in Train Fever/mods/ folder.
Start TF and activate the mod before playing.
TFGM install
Drag & drop the archive to TFGM.
Enable the mod
Start TF and activate the mod before playing.
UNINSTALL
The good news with the new mod system is that no files are being modified. This makes it easy and safe to remove the mod at any time.
Manual uninstall
Simply delete the the Train Fever/mods/gwinda_costmod_x folder where x is the mod's major version number.
TFGM uninstall
Simply select the mod and press disable.
The mod is kept in TFGM's internal library and can be enabled again at any time. To completely remove it from library select the mod and press uninstall.
CONFIGURATION
This mod supports the new Configuration UI in TFGM. Just open the Configuration tab for the mod, adjust factors, save and start your TF game.
To edit the prices, cost and maintenance you will find the configuration file here:
Train Fever/mods/gwinda_costmod_x/config/config.lua.
The configuration file is a collection of modifiers multiplied with each models cost, price and maintenance. For example:
After any changes, save the file and create a new game or reload your save game (No need to re-enable or restart TF in between).
Kommentare 75
Neu erstellte Kommentare unterliegen der Moderation und werden erst sichtbar, wenn sie durch einen Moderator geprüft und freigeschaltet wurden.
Neu erstellte Kommentare unterliegen der Moderation und werden erst sichtbar, wenn sie durch einen Moderator geprüft und freigeschaltet wurden.
Mr.Clash
Es gibt hierfür auch schon einen von UrbanGames mitgelieferten Mod
Gwinda
The difference is that this mod was create already during Beta, way before UG included their own. Secondly, this one can be configured and scaled, UG's can't.
Mr.Clash
Okay, thanks

Gwinda
Cost_mod v3.3 for TF 7753
Gwinda
Cost_mod v3.2 for TF 5541.
Gwinda
Description and install instructions updated.
dodotrain
Is the cost-mod ok coming for USA DLC?
Gwinda
Yes, the cost mod should work with all vanilla, DLC and other mods.
dodotrain
Hmm, i have install cost_mod v3.0 but the prices of USA DLC's are the same. :O
dodotrain
How can i fixe it that the USA DLC is going see it by the cost mod?
dodotrain
Is the cost_mod ok al coming
Gwinda
Cost_mod v3.0 for the new TF mod system. Should work on all platforms, see description.
OEBB6020
which file should i downloiad cost moad zip or cost mod nw?
Gwinda
If you run windows, you should download the cost_mod.zip. If you are on Linux or Mac you must use the cost_mod_nw.zip (No Windows). If you are on Windows, I do recommend to use TFGM because it will run the script for you automatically.
OEBB6020
ok thank you very much!
Alex Paen
Great mod
Gwinda
Thanks
testsnake
i wish i could use this mod. i dont know how to use mod maniger and i got a new pc thats using windows 10, and lua dosent work on it
Gwinda
What mod manager are you using? The TFGM (http://www.train-fever.net/fil…Train-Fever-Game-Manager/) don't need the Lua console, it handles all this internally by itself. When you say that Lua doesn't work, what is not working? Is it the Lua console not starting or teh script throwing an error message?
testsnake
i found out how to use mod maniger, it works, but i cant extrack the cargo mod, but then i try to run lua 64x i get a line on the screen saying "this app is not supported" so thats a problem, but i am using a beta copy, and the main one wont do its job.
Gwinda
There are two mod managers, TFMM (Train Fever Mod Manager) and TFGM (Train Fever Game Manager). If you use TFGM, you don't need the LuaTF.exe at all, just enable the mod and TFGM will do the rest for you automatically. When you say that you can't extract the Cargo mod, what is it you are trying to do?
testsnake
when i try do disable the cargo mod in TFGM and TFMM they both say stuff about it not working. i would use it full time but it interferrs with the "sandbox mode" (cost mod + timeless mod). basicly all veicles from mods wont get effected by "Sandbox mod"
testsnake
and if you look on the timeless mod on Train-fever.com you will know how much i need the cost mod
Gwinda
Hot fix v2.10. The previous cost_mod version will be uninstalled correctly when updating.
Gwinda
Updated to v2.0 with divided maintenance costs.
Gwinda
Hopefully fixed now in v1.33
Gwinda
Quick update v1.31 fixed some broken stuff...
Gwinda
Updated! If you use TFGM there is no need for the console anymore, TFGM will run the scripts for you all by itself
Gwinda
I'm working on the updates for Build 4688.
Gwinda
Updated and tested with TF Build 4587. Fixed an issue with missing BOM character in UTF8 saved script.
Bernhardb
Kann ich auch ohne Cost-mod die Kosten einstellen?
Gwinda
You can get the older version that works with "Method 2" here: https://dl.dropboxusercontent.…/TF%20Mod/cost_mod_nw.zip
Jonathan078NL
Hi Gwinda, I cannot use the lua console, it's giving me multiple errors
Is it possible for you to make a small scriptmod which only changes the currency from dollar to euro for the english version?
Gwinda
What errors does it give you? If your Stea path isn't at the default location, you need to edit the rootdir variable in the cost_mod.lua file to your installation. Use / instead of \ and the path has to end with an /
Fohlen
ist mir zu trikki mit dem Instalieren.#
irongecko
For some very odd reason installing this (via lua console or editing the costs.lua file) seems to half my framerate.
Gwinda
I doubt it has anything to do with the mod, it's probably a coincident.
mrpwase
This happened to me as well. My framerate was fine before installing the mod, and it became intolerable on the next map I created after installation.
Gwinda
...and if you uninstall the mod the frame rate goes up again (on the same map that had problems?)
mrpwase
Sorry for the late reply. Yes, I've uninstalled the mod and played the same map, and the framerate improves massively (to what it was before). It's a shame, I hope you fix it, because while the framerate suffers, the script works perfectly and does exactly what it's supposed to!
irongecko
After uninstalling the mod the framerate goes right back up. My framerate was fine until I tried adding a few new vehicles.
gax
Please explain step by step where exactly in the lua file do i have add or change things. This:"-- Adjust the various cost and maintenance fees here ]TrackFactor = Free]", for example did not work.
Gwinda
Use the mod manager to install the Lua console and the cost mod. Go to your TrainFever/res/scripts folder, start the Lua.exe file. type require "cost_mod" cost_mod.install() and press enter. Close the Lua console. A new file has been created in your TrainFever/res/script folder: cost_mod_config.lua open this file with an text editor. It should look like the one I shove under CONFIGURATION here. As default everything is free. If you want to change something, replace the Free with the desired factor as shown in the examples above. You should not have to change anything in the cost_mod.lua file, this is only used for installation/uninstallation of the mod.
gax
Thank you for your patience. However, after " require "cost_mod" cost_mod.install(), i get the same huge text as posted below. With the addition of: "Uninstalling DepotFactor: tram_small_old.mdl......path of costmod.lua: path of ....model/depot/tram_small.old.mdl: no such file or directory
Gwinda
Indeed tram_small.old.mdl doesn't exist, but it doesn't exist in the script either. Try to download the mod, install this new downloaded file (overwriting the old one) and then install as described above.
gax
I did that anyway. I think i have a problem with the registration of the mod, seeing that tfmm always gives me "this mod has changed one file, etc.." info whenever deactivating the mod. Lua.console uninstalling didn´t change that.
Gwinda
The only thing TFMM does with this mod is to copy the script to TF's script folder (Install mod) or remove it from the folder (uninstall). This procedure works fine for mods that only replaces/add files to TF. This script have two script functions: cost_mod.install() and cost_mod.uninstall() It is these two script functions that actually installs and uninstalls the mod, not TFMM. There fore you need to use the Lua console to call these functions to install and uninstall the mod.
Maetel
this is not working for and I'm using the tfmm can you please help
Gwinda
After you have used the TFMM you need to run the script by following the instruction under Method 1 or Method 2. I find Method 1 being the easiest one.
snow_ninja67
This does not work for me? im using method 2 the lua.exe metho aka i run this require "cost_mod" cost_mod.install() and get a > require "cost_mod" > cost_mod.install() Cost mod version 4221.2 .\cost_mod.lua:350: attempt to concatenate global 'msg' (a nil value) stack traceback: .\cost_mod.lua:350: in function 'DoAction' .\cost_mod.lua:325: in function 'DoAction' .\cost_mod.lua:379: in function 'install' stdin:1: in main chunk [C]: ?
gax
I get the same. I just don´t know what it means.
Gwinda
Ehh... I have to stop to do this in the middle of the night... You are absolutely right. I have have fixed the script now.
snow_ninja67
Thanks
Gwinda
Script updated, see configuration instruction.
gax
Where exactly do i have to add the factor, free or disable? This ""Track = { Description = "Cost factor for laying railroad tracks, switches, catanery, on bridges and in tunnels", Variables = { "railroadTrack",0.00", didn´t work, neither when i used "free" instead of "0.00".
Gwinda
Read under the headline "CONFIGURATION" above here. You open the cost_mod_config.lua located in TrainFever/res/scripts/ folder. When you open it you will see a lot of variables ending in Factor = 0.00. Replace the 0.0 with the new cost factor where 0.0 is free and 1.0 is 100% (= disabled). I do see now that I have been to fast when I made the mod. The names Free Disabled and Enabled are not defined. I will fix it right away.
Gwinda
Thank you for pointing out that Free or Disable didn't work, I had forgot to add them into the script.
Gwinda
Hmm, now I see what you tried to do. After you have used the modmanager you need to activate the script one of the two methods under "INSTALL". Then you can modify the cost_mod_config.lua file.
gax
I do something wrong, but i don´t know what. I didn´t use the modmanager this time, redownloaded your file, dropped it in scripts, activated it with the lua.exe from this site, opened it with luaedit2010 and added some parameters but it had no result ingame. Either my activasion was wrong or the place within the file where i added "free" or a factor. For example, i find this in your file: " Track = { Description = "Cost factor for laying railroad tracks, switches, catenary, on bridges and in tunnels", Variables = { "railroadTrack", "railroadHighSpeedTrack", "railroadCatenary", "railroadSwitch", "railroadBridge", "railroadBridgeVol", "railroadTunnel", "railroadTunnelLen" " Where exactly do i add my parameters?
Gwinda
You are editing the wrong file. After you run the Lua console a new file has been created in teh script folder: cost_mod_config.lua This is the file you can edit to adjust the costs.
Yavianice
How do I install the plugins if I have installed Train Fever on an external hard drive? Neither method 1 or method 2 work, and the game crashes instantly when making a new game. If I do method 1, LUA says that directory cannot be found, since it searches on C:\ by default. How do I change the working directory of LUA?
Gwinda
If you open the script file you will find at the top: "INSTALL 1. Check that the rootdir points to your Train Fever/res map". Under the comments you find the rootdir variable, change it to your TrainFever/res dir.
T-S-3.net
...also bei mir funzt es einwandfre, nur die davor gespeicherten Spiele stürzen jetzt ab...
Gwinda
I'm sorry, but Google translate doesn't make sense at all. Can someone please translate?
Yavianice
He mentions that it now works, but the previously saved games crash on loading.
Gwinda
I'm not sure what is happening. It works fine for me and many other users. Maybe if your TF installation is corrupt.
Locomotor79
the game build is now 4215 your scripts is 4136 and the game crashes now constantly whit your cost mod plz do something
Gwinda
After Steam has updated TF you need to run the cost_mod.install() again because Steam will completely replace updated files and overwrite any modification made to them. I have tested the current cost_mod with Build 4215 and it works fine here.
Napoleon
bei mir funtz es nicht ich komme ins spielmenü kein probem aber wenn ich spiel starte lande ich auf den desktop keine fehler meldung nichts . kann dir daher nicht mehr sagen
Gwinda
Yes, have run the cost_mod.install() function again?
Agrartec
Also bei mir läauft das nicht !