Transport Fever 2

Transport Fever 2

Gwinda's cost mod
38 Comments
Une Pintade 11 Jul, 2023 @ 3:57pm 
same problem as other cost mods, it makes every building free such as station, tunnels and bridges
Yrol Akiyama 16 Mar, 2022 @ 12:01pm 
Lainor, many many thanks to you :o)
Yrol Akiyama 16 Mar, 2022 @ 12:00pm 
I just tested This Mod and Lainor's Fix with TPF2 Version 34983 (October 20, 2021)
and it works :o)

Make sure to precisely copy Lainor's Fix, the game is casesensitive!

Also:
If you, as i, only wanted to reduce running costs,
change in both these files
1907210983\mod.lua and
1907210983\config\config.lua
everything to 1.00 except data.metadata.maintenance.runningCostScale ( which i keep at 0.50 )
Lainor 28 Feb, 2021 @ 12:45pm 
I think, i found a way for the scaling the purchasing and maintenance costs. I change the line 32 to "data.metadata.cost.priceScale = 0.5" and line 35 to "data.metadata.maintenance.runningCostScale = 0.5" with these settings costs will be set to 50% of normal values. Hope this helps
Lainor 28 Feb, 2021 @ 12:27pm 
Hello, in the release notes for version 29372 there is a note like " Added factors to control calculated costs and maintenance". Is this the change that you were waiting?
Peter Llew 8 Jul, 2020 @ 5:07pm 
ya i think it works though will need to mess about with it more as i did try and ajust the values a bit but in game the prices for vehicles and maintenance dident seem to change even after replaceing stock so its possible that the way i changed the code just disabled the code all toghther instead of allowing it to be ajusted by %
Gwinda  [author] 8 Jul, 2020 @ 3:38pm 
@Peter of... I have been waiting for this last update so the prices can be adjusted by factors instead (not possible before this last TPF1 update). I have not yet verified that it has been fixed the way I expected it to be. There are a bunch of mods that I finally can finish if this last update have the missing pieces.
Peter Llew 7 Jul, 2020 @ 7:01pm 
hello iv found a way to fix the costs of vehicles so you can modify them by a muiltiplier instead of a fixed cost. in the mod.lua change data.metadata.cost.price = 0.0 to data.metadata.cost.priceFactor = 100.0 this will set costs to 100% of normal values and you can just change this how you wish. same for maintenace change it to data.metadata.cost.priceFactor = 100.0
Hope this helps anyone whos trying todo a bit of balenceing when using mods that change cargo capacity. im not a coder in anyway just experimenting with things to try and get something to work
Eb_TheKillerBunny 24 May, 2020 @ 2:51am 
I really want a mod like this to address what is (IMO) major balance issues in the game.

I have one problem though: by default it makes the cost of all trains 0.00 (after setting the config file to all 1.0 and 10.0 for TrackFactor).
Looking through the code I tried setting all 0.0 values to 1.0 which I assumed to be default values. After doing that it set the cost of all trains to be int(C / 10,000,000) where C is the original cost.

I'f you'd like me to run a debugging version and send you the result I'd be more than happy.
Note 1: I am running 70 other mods as well as experimental map sizes
Note 2: I do not know how to code in lua so I just guessed based on similarity in syntax to c++
Note 3: I have never modded TF2
Havan_IronOak 2 Apr, 2020 @ 9:08am 
I'm excited to try this mod. It addresses a few issues that I've had with the game from the get go. But I have a few questions... is there anyway that purchase prices can change over time? Ideally I'd like to NOT spend 70,000 for a truck stop in 1850 but in 1900 that would be a bargain. Likewise there are some maintenance costs that don't make sense to me. In particular maintenance on way-point markers seems outrageous, particularly in that I use them to address what I think are shortcomings in the AI.
MoonRacer 9 Mar, 2020 @ 12:28am 
Is there no way to leave costs/upkeep on vehicles while modifying the infrastructure costs/upkeep?
Lainor 19 Feb, 2020 @ 1:54am 
@gwinda, oh okey thanks for the reply
Gwinda  [author] 17 Feb, 2020 @ 10:01am 
@Lainor, That was the intention, but TF2 only supports auto-calculated or fixed costs for vehicles. It's on UG's ToDo list to allow modifications to costs (as it was in Train Fever). I'm still waiting for for UG to implement this change.
Lainor 17 Feb, 2020 @ 6:33am 
Hi, can you do the same thing for trains and other vehicles?
Gwinda  [author] 26 Jan, 2020 @ 11:47pm 
I have added an instruction for how to edit the mod's configuration file. You will find it pinned under "Discussions"

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/discussions/1907210983
Gwinda  [author] 26 Jan, 2020 @ 10:54pm 
@vosborne The mod itself have its own config file. All your Workshop subscriptions are stored in your Steam Workshop folder for TPF2:

C:\Program Files (x86)\Steam\steamapps\workshop\content\1066780\1907210983\config\config.lua

Open it with a text editor, edit, save and reload your game (or create a new one).
Blue Winged King Fisher 26 Jan, 2020 @ 2:03pm 
if i'm thinking right it replaces a game folder C:\Program Files (x86)\Steam\steamapps\common\Transport Fever 2\res\config then find the " base_config.lua " file save that to another location out of the game directory and replace with the new file. I'f I'm wrong some one correct me :)
Blue Winged King Fisher 26 Jan, 2020 @ 1:56pm 
open with note pad
vosborne 26 Jan, 2020 @ 7:57am 
Hi there I subscribed and I found the app in the workshop, but when I clicked on Config it wanted to know how I wanted to open this app. It was giving me options like Adobe Acrobat, which I don't think is right. Can someone help me put this app into the program. I am still pretty new to mods.
Gwinda  [author] 5 Jan, 2020 @ 1:14pm 
@tsilaicosneknurd I'm waiting for UG to expose some data in the mod system before I can make the mod more detailed (as the original one for Train Fever). I also found a bug regarding "chargeMaintenanceInterval". I'm waiting for UG's response in these matters.
tsilaicosneknurd 5 Jan, 2020 @ 6:22am 
would be nice if maintenance and building costs could be configured seperatly
Blue Winged King Fisher 24 Dec, 2019 @ 4:35pm 
@ Radziuremix where you can find this "game.config.chargeMaintenanceInterval = 720"?

is actually written as game.config.chargeMaintenanceInterval =60 its half way down the page of
the config file.

C:\Program Files (x86)\Steam\steamapps\common\Transport Fever 2\res\config\base_config.lua.

Open that file and edit the line value from 60 to a number Multiple of 60 IE: 60;120; 240;

I use 11520 every 8 years: Think of it as a Government tax write off incentive :steammocking:
Gwinda  [author] 21 Dec, 2019 @ 2:32pm 
@OperationDx I figured it out. I will implement it as a % scale in the config file.
EDIT: Seems like I found a bug. I have reported it to UG and waiting for reply.
Gwinda  [author] 20 Dec, 2019 @ 6:54am 
As of now, the cost mod doesn't do very much yet (compared to its original in Train Fever). I'm waiting for some changes to be made in the mod system before I can finish this mod. I have been told that the change I need is on the ToDo list, but there is no time frame on when it will be done. I guess they prioritize game crashes and bugs for the moment.
rklpl 20 Dec, 2019 @ 5:35am 
where you can find this "game.config.chargeMaintenanceInterval = 720"?
Blue Winged King Fisher 17 Dec, 2019 @ 4:22pm 
you can change the value of game.config.chargeMaintenanceInterval = 720 , That is every 6 month maintenance cost deduction or a 12 month cost reduction change value
game.config.chargeMaintenanceInterval = 1440
OperationDx 14 Dec, 2019 @ 3:38am 
I figured out how to lower and raise Maintenance costs by changing a number value in base_config.lua The value is game.config.chargeMaintenanceInterval = 60 By changing the value at the end (60) to say (120) you can half the maintenance cost as it charges you maintenance every 2 cycles. If you set the value to 30 you would double the cost. I just don't know how to write up the mod file to call game.config.chargeMaintenanceInterval = 60
OperationDx 13 Dec, 2019 @ 3:43pm 
I triple the notion of lowering or raising the running costs.
Eltharion 12 Dec, 2019 @ 3:31pm 
I'd like to suggest the same thing Rafn said: It would be nice to be able to change running and purchase prices of all kinds of locomotives and wagons.
Purchase prizes can be modified but as soon as I use this mod all upkeep costs are zero, that's a bit sad.
Schubii10 12 Dec, 2019 @ 10:50am 
Coole Mod danke dir:)
Rafn 12 Dec, 2019 @ 8:50am 
There were mods for Transport Fever 1 that allowed the configuration of purchase price and running cost of vehicles depending on type (steam loco, electric loco, buses, cargo wagons, etc.) - could you implement that sort of thing in this? Would be nice to have it all in one mod :)
pit-s 12 Dec, 2019 @ 6:45am 
@10thVA...
Go to the drive where u have installed TpF2 and look there for the Steamfolder and open it, from there u follow the path:
steamapps>workshop>content>1066780>1907210983>config
[1stGLI]Misaka 12 Dec, 2019 @ 4:25am 
eh,can you tell me more about how to use this mod ? like how to change it in the config file.....
Proud Wingman 12 Dec, 2019 @ 1:04am 
Looking forward for a stable version!
Cosmos 11 Dec, 2019 @ 8:03am 
Atm it causes CTD when loading with the mod
Harag 29 Nov, 2019 @ 12:18pm 
Thanks for that, sorry I miss read it as transport fever - wow train fever, that brings back memories. Many thanks.
Gwinda  [author] 29 Nov, 2019 @ 11:38am 
@Harag Train Fever didn't have Steam Workshop support. Most mods where hosted at trainfever.net . Here is the cost mod for Train Fever: https://www.transportfever.net/filebase/index.php/Entry/10-Cost-mod/
Harag 29 Nov, 2019 @ 10:11am 
Nope, don't remember the other mod. and can't find it in your library - care to link to it?