Transport Fever 2

Transport Fever 2

New vehicle pricing formulas
GordonDry 21 Jun, 2022 @ 4:42am
Bad results on multiple units with unpowered wagons
I have 2 multiple units for comparison, both with 3 units, the same capacity and top speed.

With "New vehicle pricing formulas" mod, capdis 1.5, maint 6.75:
Variant A: 1 unit with engine, 720 kW 104 kN, empty weight 134t - purchase price 11,894,803 - operating costs 1,762,191 / year Variant B: 2 units with engine, 1440 kW 208 kN, empty weight 154t - purchase price 10.131.494 - operating costs 1.500.960 / year

Without "New vehicle pricing formulas" mod:
Variant A: 1 unit with engine, 720 kW 104 kN, empty weight 134t - purchase price 23,956,702 - operating costs 3,992,784 / year Variant B: 2 units with engine, 1440 kW 208 kN, empty weight 154t - purchase price 26,746,310 - operating costs 4,457,718 / year
< >
Showing 1-15 of 21 comments
GordonDry 21 Jun, 2022 @ 5:05am 
Okay, I admit that I perhaps™ should use the capdis of 4.

The problem is that I use a mod that multiplies cargo capacity on trains with 2, but passenger capacites on all vehicles with 4 after counting the passenger seats.

So the script needs a change to differ between cargo capacity and passenger capacity.
I try to fix it.
Last edited by GordonDry; 21 Jun, 2022 @ 5:27am
GordonDry 21 Jun, 2022 @ 5:25am 
btw those values should be parameters to be chosen in the mod settings UI ingame, not by editing the mod.lua
GordonDry 21 Jun, 2022 @ 5:30am 
The script still has an issue with multiple units, either it interprets a unit as a "wagon with capacity but no engine" or as an "engine with no capacities", but there is no case for a "powered unit with passenger capacity".
Last edited by GordonDry; 21 Jun, 2022 @ 5:32am
GordonDry 21 Jun, 2022 @ 8:30am 
I just fixed it and added mod parameters to be set ingame.
There is a calculation for multiple units with engine and capacity as well.

https://www.dropbox.com/s/rwuwlw78g6a35mc/New%20vehicle%20pricing%20formulas%20%28Gordon%20Dry%20edit%29.7z?dl=1
GordonDry 2 Jul, 2022 @ 10:21am 
I added a function to get math.average, as I wrongly assumed LUA is capable of that by itself.

https://www.dropbox.com/s/rwuwlw78g6a35mc/New%20vehicle%20pricing%20formulas%20%28Gordon%20Dry%20edit%29.7z?dl=1
GordonDry 9 Jul, 2022 @ 4:51am 
The function did not really work as some[/] vehicles or even assets triggered it for some weird reason. So I removed it and made it simple:
https://www.dropbox.com/s/rwuwlw78g6a35mc/New%20vehicle%20pricing%20formulas%20%28Gordon%20Dry%20edit%29.7z?dl=1
GordonDry 12 Feb, 2023 @ 11:06am 
Another iteration to test, please check the mod options before loading your save or start a new game:
https://www.dropbox.com/s/rwuwlw78g6a35mc/New%20vehicle%20pricing%20formulas%20%28Gordon%20Dry%20edit%29.7z?dl=1
GordonDry 12 Feb, 2023 @ 4:06pm 
And even more. This iteration also includes aircraft and ships and takes the lifespan on all vehicles and the tractiveEffort on road vehicles, trams and trains into account, so check the mod options again:
https://www.dropbox.com/s/rwuwlw78g6a35mc/New%20vehicle%20pricing%20formulas%20%28Gordon%20Dry%20edit%29.7z?dl=1
GordonDry 26 Feb, 2023 @ 2:51pm 
@erscal
With the new beta versions of Tpf2 it doesn't matter if I use your original or my version of this mod - it does nothing. No errors. Just nothing. Same values as vanilla.

https://www.dropbox.com/s/rwuwlw78g6a35mc/New%20vehicle%20pricing%20formulas%20%28Gordon%20Dry%20edit%29.7z?dl=1
GordonDry 1 Mar, 2023 @ 8:02am 
I did a dumb mistake by commenting out the wrong block and so focussed on the wrong things by finding the issue, issue is sorted out and mod is even better now:
https://www.dropbox.com/s/rwuwlw78g6a35mc/New%20vehicle%20pricing%20formulas%20%28Gordon%20Dry%20edit%29.7z?dl=1
< >
Showing 1-15 of 21 comments
Per page: 1530 50