Transport Fever

Transport Fever

Wagon Price Adjuster
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!
Devilhunter  [author] 20 Nov, 2018 @ 11:45am 
@LittleMikey, sorry for month late response with no fix. I tried to run this with New Industry (NI) and ...everything is ok. Do you use other mods? What is your version of (NI)? Any other tips? Screenshot of an error?
LittleMikey 21 Oct, 2018 @ 7:43pm 
Hey DevilHunter. Not sure if you're still around, but when I try and activate this mod the game crashes. The Locomotive Price Adjuster works fine but this one doesn't. I am using the New Industry mod, is that not compatible?
Devilhunter  [author] 21 Jul, 2018 @ 11:35am 
Though increased capacity will influence total price.
Devilhunter  [author] 21 Jul, 2018 @ 11:33am 
I dunno. This mod should work if loaded after those other mods.
dave 20 Jul, 2018 @ 11:39am 
I think that the problem must be with the Capacity 100% mod. If I run a game without it active, I get a reduction in price on both passenger and cargo wagons.
However, if I run that mod I don't get the reduction on passenger wagons, and only get a reduction with cargo wagons if I set WPA to load first.
It looks like I am just going to have to get used to running longer and more frequent trains ((chuckles))
dave 20 Jul, 2018 @ 11:27am 
OK, so I have set both the local buy cargo and Pass values to 0.1 and both OandM values to 0.1
I have had a reduction in the price of cargo wagons, to $111 per wagon. But the passenger wagon is still coming in at $524 per wagon. These are the opening 1850 US starting wagons.
However, I am wondering if there is a clash with another Mod as I have to set the WPA Mod to the first to load because if it is in another position then I am being charged $222 per cargo wagon.
I will try a clean mod free (with the exception of WPA,) game to see if that works.
Devilhunter  [author] 20 Jul, 2018 @ 8:12am 
Dave, all the negative numbers won't change the price at all, so they'll be vanilla. Positive numbers are fraction of the vanilla price. For example if you provide a number from 0.0 to 1.0, then prices will be reduced comparing to vanilla. Let's say the number is 0.25 then all those prices will be four times smaller (1.0/0.25). If you provide a number bigger than 1.0, then prices will be increased, where 3.5 means that you increase prices 3.5 times.
dave 19 Jul, 2018 @ 4:18am 
First I would like to say Thankyou for a great little mod.
However. Yup, there is also an however. ((grins))
I can't get it to take with passenger wagons. When setting the new value, do I need to leave the values for passenger wagons as a negative number, or do they need changing to a positive fraction?
I play with a +100% capacity mod which makes prices extortionate, we are talking about half a million for basic US passenger carrages. I'd like to reduce that by a fifth, to say around the 100k mark for each carrage.
As I say, it has worked fine with the cargo types, I just cannot get it to change the passenger side of things.
Thanks in advance
Dave
kaatrav 7 Mar, 2018 @ 3:40am 
->>>Но это не то... Хотелось бы чтобы всю технику можно было обслуживать скажем за полцены (это позволит сделать выгодными даже диллижансы в городах в начале игры)...
P.S. Подобное сообщение/пожелание я написала вам в личку на другом сайте, где выложены ваши моды.
С уважением и благодарностью за Ваш труд, Аня.
kaatrav 7 Mar, 2018 @ 3:40am 
Огромное спасибо за Ваши моды (этот и "парный" к нему - LocoAdjuster).
Пожелание: Есть ли возможность сделать подобный мод и для всей другой техники начиная с самого начала (дилижансы, повозки, автобусы, трамваи и др.техника)?
Мод NoCost, конечно, хорош, но... Если его использовать всю игру, то весь интерес в зарабатывании денег быстро пропадет... Я обычно использую его при генерации новой карты, смотрю карту, заранее строю туннели/мосты в сложных местах (которые обошлись бы слишком дорого при обычной игре), сохраняюсь и отключаю... ->>>
chillybmf 17 Jul, 2017 @ 3:06am 
Oh how very simple! Many thanks to you sir! It's working perfect, just have to balance it!
Great mods, thanks!
Devilhunter  [author] 17 Jul, 2017 @ 12:17am 
chillybmf, you need to set positive (>0) value. Every negative (<0) value has no effect at all. Positive value of 0.4 (for example) reduces price by 60% and you get your 40% of the original price. Value 2.5 (for example) means that you increase price by 150% or multiply it by 2.5.

So, in general. Positive values from 0.0 to 1.0 reduce prices. Positive values, that are higher than 1.0, increase prices.
chillybmf 16 Jul, 2017 @ 6:50pm 
Hmmm not working for me. No matter what adjustments i make, the price does not change in game. I have set pass levels to, buy - pass = -0.25 and OandM pass = -0.5
I see no changes in game......
I do have an extensive list of mods active and am playing on the custom Whiplash map.

Not sure if any of that would be overriding this mod.

I'll keep messing with it and get a list of my active mods...
Devilhunter  [author] 13 Jul, 2017 @ 9:10am 
-1 означает, что цена будет строго ванильной. Если убрать мину и поставить своё число, то соответственно изменится стоимость, где 1 - это 100%. Т.е. неизменная стоимость. От нуля до 1 это снижение стоимости. Больше 1 - увеличение.
nagana 13 Jul, 2017 @ 9:04am 
pass = -1.0} А минус нужно убирать или нет?
ApolloChewbacca 27 Apr, 2017 @ 4:48pm 
ok ill check them and see. i was doing one at a time that way i always know which mod is causing me issues
Devilhunter  [author] 26 Apr, 2017 @ 9:42pm 
Don't know. It depends on the problem. You can give me a link to one of those locomotives which doesn't work with that mod.
ApolloChewbacca 26 Apr, 2017 @ 6:38pm 
thanks it works like a charm. would the same fix work for the locomotive price adjuster, or is that something that has already been addressed orignially?
Devilhunter  [author] 26 Apr, 2017 @ 10:16am 
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"
ApolloChewbacca 25 Apr, 2017 @ 7:47pm 
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=891223733 here you go i know this was one that for sure causes issues, since it was the one in my crash error message
Devilhunter  [author] 25 Apr, 2017 @ 12:55am 
Oh! I got. That's what I forgot to fix. Previous commentators also have noticed this problem. Could give me a link to one of the skinned mod, please?
ApolloChewbacca 24 Apr, 2017 @ 5:47am 
when i try to load this mod while having skinned versions of regular freight wagons loaded. my game crashes. if i takew out the skinned wagons this loads in no problem
Devilhunter  [author] 24 Apr, 2017 @ 2:18am 
Please, describe the problem more precisely.
ApolloChewbacca 23 Apr, 2017 @ 1:47pm 
im having some issues with this mod working with some of the skins for vanilla wagons. do you know of a solution to this?
Twothreenine 10 Mar, 2017 @ 6:58am 
Perhaps it is easier to add something like capacity=0 in the Vmax mod?
Devilhunter  [author] 8 Mar, 2017 @ 2:18am 
I got it. Don't have time to test it right now, but I think the problem is capacities. speed120.mdl and others don't have capacity field. You could try to change row 13 in my mod
from
[code] if not data.metadata.railVehicle.engines then [/code]
to
[code] if not data.metadata.railVehicle.engines and data.metadata.transportVehicle.capacities then [/code]
Twothreenine 7 Mar, 2017 @ 5:34pm 
Great mod! But it clashes with the Vmax mod (id 774375759).
The error message reads:
File: [...]/774375759/res/models/model/vehicle/waggon/speed120.mdl [if I remove the 120 one, it mentions another one from the folder]
error: ...[...]/850852117/mod.lua:14: attempt to index field '?' (a nil value)
stack traceback:
[C](-1): __index
...[...]/850852117/mod.lua(14): v
res/scripts/mod.lua(69): ?
Devilhunter  [author] 27 Feb, 2017 @ 10:50pm 
Yes. Though I must admit that if you use fake wagons, this mod will change their prices too. Therefore some adjustment is required.
Alexander 27 Feb, 2017 @ 4:41pm 
does this work with mods?
ylij174 27 Jan, 2017 @ 5:22am 
То что нужно. А то полный бред . Например, пассажирский вагон на 14 мест, но чуть с большей скоростью стоит чуть меньше цены тепловоза. ( где это видано ??? в жизни ))) такого нет). Или грузовой . Поэтому очень подойдет для тех, кто играет на больших картах , где все очень не просто раскурчивается и экономика вгоняет в минус.... Спасибо!
Mulligan 26 Jan, 2017 @ 10:00pm 
Thanks for this grandiose Work... u my hero