Transport Fever

Transport Fever

Not enough ratings
Wagon Price Adjuster
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
475.260 KB
26 Jan, 2017 @ 3:26pm
1 Change Note ( view )

Subscribe to download
Wagon Price Adjuster

Description
!UPDATE!

For all those of you who use fake wagons.
Here is the solution.
Change line 13 in mod from
"if not data.metadata.railVehicle.engines then"
to
"if not data.metadata.railVehicle.engines and data.metadata.transportVehicle.capacities and data.metadata.transportVehicle.capacities[1] then"

Abstract

This mod allows you to adjust buy and maintenance cost of wagons. To form the price mod uses its own cost formula, which is similar to vanilla formula. This means that formula in the mod
– on the one hand gives similar price for wagon as vanilla formula do (the maximum error between vanilla formula prices and mod formula prices for vanilla wagons is less then 5%)
– on the other hand it allows you to adjust prices by some multipliers.
For example, you can easily reduce buy cost of the cargo wagons by 50%, and maintenance cost of passenger wagons by 20%.

This Scriptmod is 100% Savegame compatible, it can be loaded and removed at any time.

Default values

By default mod multiplies buy cost of the cargo wagons by 0.5, and maintenance cost by 0.8. Passenger wagon for prices use vanilla formula without modifiers.

How to change price manually?

1. Find mod.lua of this mod in the game folder. The path should look like this:
X:\SteamLibrary\steamapps\workshop\content\446800\850852117
2. There you need to change price multipliers at the top of the file:
local buy = {cargo = 0.5, pass = -1.0} local OandM = {cargo = 0.8, pass = -1.0}
First tow changes buy cost of the cargo and passenger wagons respectively. Second two – changes maintenance cost.
If you want some prices to be fully vanilla-like without modifiers, you should set the proper modifier to -1.
Here are few examples:
New cargo wagon buy cost = Old cargo wagon buy cost * buy.cargo New passengers wagon maintenance cost = Old passengers wagon maintenance cost * OandM.pass
3. Save the file.
4. Restart the game, if needed.
5. ????
6. Enjoy new difficulty!

Have non-Steam game version?

Download >here<[transport-games.ru]
41 Comments
Ganliard 16 Jul, 2019 @ 7:08am 
My fix is to change line 13 of mod.lua to "if not data.metadata.railVehicle.engines and data.metadata.transportVehicle.capacities then"
Ganliard 16 Jul, 2019 @ 6:41am 
It seems this mod is incompatibile with Freight wagon bogie set
Devilhunter  [author] 25 May, 2019 @ 10:50am 
@DieselPoweredGerbil, yes, you can use it.
emmy swiff 25 May, 2019 @ 8:00am 
Hello, I am trying to create a system for altering the price of vehicles in game. At the moment it does not seem possible to get at the vanilla pricing structure. Can I use your example in my code? I would credit you.
zerghnandus 28 Jan, 2019 @ 7:19am 
@Devilhunter I tried adding the locos i couldnt use anymore (ÖBB Railjet and Seamons Train Pack) and 3 others i downloaded and it gave me that error. So apparently the mod already had a problem its just the loco one came first in the mod list and with the problem apparently solved this other one came to light. Sorry to be the bearer of bad news lol :steamhappy:
Devilhunter  [author] 28 Jan, 2019 @ 4:15am 
@zerghnandus, damn it! This happens with the same OBB Railjet? I'll try to check it.
zerghnandus 28 Jan, 2019 @ 3:01am 
Nice mod man ! But giving out a similar error to your other mod:

error: error: ...team/steamapps/workshop/content/446800/850852117/mod.lua:14 : attempt to index field 'capacities' (a nil value)
stack traceback:
[C](-1): __index
...team/steamapps/workshop/content/446800/850852117/mod.lua(14) : v
res/scripts/mod.lua(69): ?

Possibly the same reason?
Devilhunter  [author] 20 Dec, 2018 @ 3:10pm 
@kotnour.t, sure. You can do it.
kotnour.t 19 Dec, 2018 @ 1:11pm 
Hi, I have created custom "Complete rebalance mod" and I would like to use your Wagon and Locomotive Price Adjuster. Can I implement your code in my mod and add you like a co-author?
LittleMikey 20 Nov, 2018 @ 6:45pm 
Hi Devilhunter! I managed to work out the error myself and it works fine now! Thanks anyway!