[MOD] Cost Mod (made by Gwinda)

Home Forums Modding [MOD] Cost Mod (made by Gwinda)

Viewing 15 posts - 1 through 15 (of 40 total)
  • Author
    Posts
  • #4255
    Jonathan078NL
    Participant

    Hello there!

    Today it’s MOD day, this was just released by the same modder Gwinda that also made the ‘Cargo Mod’! With this mod it’s possible to change all costs ingame (of vehicles, rails, roads etc.). You can also use the Mod Manager for easier install. With this mod he also released the ‘Lua Console’ which is basically a script mod manager. I think this tool could also be used for other script mods.

    The Cost Mod
    All credits for making this ‘Cargo Mod’ goes to:
    Gwinda from http://www.train-fever.net

    http://www.train-fever.net/filebase/index.php/Entry/10-Cost-mod/

    ”This mod allows you to individually adjust the prices of different group of vehicles, maintenance costs, building cost of roads, tracks, bridges, tunnels and more.”

     

    Preparation
    This package supports the mod manager.
    …or
    Drop the “res” folder (from the zip archive) to your TF root folder (where TrainFever.exe” is located). Overwrite files if prompted.

    Install
    To install this mod we need to load the script and execute the cost_mod.install() function. There are more than one way to do this depending on your preferences.
    Since TF don’t have a script console (what I’m aware of) we need TF to load and execute the script somehow.

    Method 1
    This is the method I prefer because you don’t need to run TF to install the script.
    Download and install the Lua console (supports the mod manager).

    http://www.train-fever.net/filebase/index.php/Entry/9-Lua-console/

    Start Lua.exe (from trainfever/res/scripts folder) and a black console window will open.
    To install, type:

    Quellcode

    1. require “cost_mod” cost_mod.install()

    and hit enter. Done!
    You can close the window and run TF as usual.

    Method 2
    Add the following lines to the costs.lua file in trainfever/res/config.

    Quellcode

    1. require “cost_mod”
    2. cost_mod.install()

    Run TF and generate a new map (or load a game save). This will run the install function and after this is done you can comment out the lines again:

    Quellcode

    1. –require “cost_mod”
    2. –cost_mod.install()

    Uninstall
    Depending on the install method, repeat as for installation but instead of install() change to uninstall().
    If, for some reasons, TF should stop to work you can always bring it back again by “Verify integrity of game cache…” from the Steam client.

    Configuration
    After installation a new file has been created in the trainfever/res/scripts folder

    cost_mod_config.lua

    Here you can enable, disable or scale the various cost factors in the game.
    Each cost group has its own factor that can be either Disable, Free or a scale factor.
    Use Free to make it completely free of charge.
    If you use a factor instead, you can scale the cost scale.

    0.5 = 50% (half cost)
    1.0 = 100% (original cost)
    2.0 = 200% (double cost)
    0.37= 37%
    …and so on.

    To disable any feature (returning to its normal function) set it to Disable.

    Enjoy!

    Version information

    newest version
    4234.1
    Status
    Stable
    changelog
    Fixed the script error in the previous version.

    Download:

    cost_mod.zip

    876 downloads

    All credits for making this ‘Cargo Mod’ goes to:
    Gwinda from http://www.train-fever.net

    #4289
    mariodk
    Participant

    nice mod
    i was thinking if its possible to change the cost of the trains
    i was wondering
    if its possible also to change afew other things on the vehicles like:
    Speed limits on tracks & what year the vehicle gets released so you can have all vehicles you wanted in year 1850 or can still build stream trains in year like 2100 

     

    #4290
    Jonathan078NL
    Participant

    Well basically that’s possible with a scripted mod. I just don’t have a clue how to make such a thing. We’ll see this is just the beginning. Me too would like to see something like that.

    I got some ideas of mutliple versions of loc’s with different speed limit’s and power. Just like in real life alot of loc’s have had better versions over the years with more power for example.

    #4424
    Jonathan078NL
    Participant

    Moved to ‘Modding’ section.

    #4678
    Kamyk
    Participant

    Can anyone make an vid on YT how to instal this mod? I know you say how to do it, but i’ll do it as you say and not working.  Please?

    #4691
    Kamyk
    Participant

    I have instal TF on E directory.

    #4707
    lukiono
    Participant

    open the cost_mod.lua with notepad++ and change the line 19 to your directory.

    for me it was from
    C:/Program Files (x86)/Steam/steamapps/common/Train Fever/res/
    to
    H:/SteamLibrary/SteamApps/common/Train Fever/res/

    and maybe you need to create the file costs.lua in the config folder.

    it has installed, but crashes the game when i try to start a new game…

    • This reply was modified 6 years, 10 months ago by lukiono.
    #4939
    Kamyk
    Participant

    Thanks m8, that works.

    #5811
    arbitary
    Participant

    I cant get this mod to work, whenever I open lua.exe it tells me that the dll file MSVCR119.dll cannot be found. Any alternative ways to install this mod? I dont really understand method 2.

    Cheers

    #5829
    Smykel
    Participant

    I don’t know why but I can’t install this mod. I am doing everything as it says instruction. All I have is:
    “error loading module ‘cost_mode’ from file’ D:\Steam\steamapps\common\Train Fever\res\scripts\cost_mode.lua:16: invalid escape sequence near ‘\S’

     

    stack traceback:

    [C] in ?

    [C] in function ‘require’

    stdin:1: in main chubk

    [C] in ?

    Please if someone can tell me what I am doing wrong.

    I did try both methods and on second one game is crashing.

    #5838
    lukiono
    Participant

    change all \ in your path to /

    #5845
    Smykel
    Participant

    It is working. Thank You. I can’t belive that was something like this :). I did install the mod, but game is crashing anyway.  I recieved Lua error”

    File:/res/config/costs.lua

    res/config/costs.lua:16: ‘}’ expected (to close ‘{‘ at line 13) near ‘terrainRaise’.

    I checked costs.lua and it is closed.

    • This reply was modified 6 years, 10 months ago by Smykel.
    #5853
    jorgenRe
    Participant

    For anyones info it is possible to alter any vehicles capacity, speed, power, traction etc through the config folder, models, model, vehicle

     

    #5883
    Jonathan078NL
    Participant

    Updated thread with newest version 4234.1

    Changelog: Fixed the script error in the previous version.

    • This reply was modified 6 years, 10 months ago by Jonathan078NL.
    #6177
    Smykel
    Participant

    I checked and my Cost_mod it is the newest version 4234.1.

Viewing 15 posts - 1 through 15 (of 40 total)
  • The forum ‘Modding’ is closed to new topics and replies.