News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

Pak128 cost balance, speedbonus e.t.c.

Started by obluda, March 20, 2024, 12:53:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

obluda

Hi,
I have struggled with profitability for some time and tried in vain a lot of suggestions of this otherwise excellent forum.
I have read some wild posts on profitability and I have decided to add my two cents.
So far, at least for pak128 vehicle profitability has no relation to settings in speedbonus.tab.
Let me present formula which I have so far deducted from various posts and experiments.
Speedbonus formula is not mine, and I cannot find original poster for the hell of it. If he reads it, please comment for credit.
Speedbonus based on average speed was deducted by many experiments. If there is coder who can correct me, I would be happy.

Now to actual data.

Speed bonus is computed as percentage bonus over base speed of vehicle class.
Say base speed is 100mph. Vehicle sustainable speed is 120mph. Which gives 1,2 (positive) speedbonus factor.
Base income is $0,043 per unit per mile (experimetally deducted, coders may supply more accurate value).
Transport speed premium, (fixed percentage value in goods table) is modified by speedbonus factor
With passenger speed premium 18%, base income is increased by (0,18*1,2), that is $0,043 + $0,009288 = $0,052288 per passenger per mile as long as vehicle moves at top speed whole time.

Vehicle moving with speed 1*(base speed), that is speedbonus factor = 1 or 100% on goods table, has income $(0,043 * 1,18) = $0,05074 per passenger per mile.
Vehicle with speed 2*(base speed) has gross income $(0,043 * 1,36) = $0,05848 per passenger per mile.
Of course, vehicle per mile cost must be substracted from this income

Hope this clears how the gross income is calculated. Remember that while game display values rounded to two decimals, internally it does not round or at very high precision.

Now how to compute base speed, is the trickiest of all if you want to plan investments. Current value is shown on goods table. Select mode of transport, and it will show speed needed for neutral speedbonus factor.
This speed is however changing over time. Base speed is computed as average speed of vehicle available in class as per timeline. Everytime new vehicle is introduced of obsolete removed from depot shop, base speed is recalculated for whole class - engines, cars, passenger trains, etc.

Now to ballancing issues. Above system is in my view good and well ballanced as long as there is knowledge and acceptance among vehicle designers.
For example aircrafts are reported as weird and unbalaced.
It starts OK with props. Then with lots of slow prop planes, Comet gets in with speed high above average. Premiums on Comet served lines skyrocket, until old prop planes gets retired and average speed rises. Then high per mile cost of Comet kicks in and eats away most of profits. Same is true opposite, with introduction of jets and average speed rise, props are almost instantly generating loss even with full cabin.
Next *oh crap* point is Concorde introduction. For some time (1971 - 1975) Concorde is only one profitable plane at all, until high-capacity low-cost planes are available. Even then Concorde generates triple the profit of next best plane.
Both these moments are capable of ruining surprised player within span of year.

I have created spreadsheet calculating above factors to be able to profit, and plan replacement of planes, but as it looks into future, it could be considered cheating. Before you ask, it is not fit for publishing, it is rather mess.

Remember that cost of convoi is calculated per map square crossed, income is from Manhattan distance modified by average speed of transport (loadup time to offload time). Circling above full airport is HUGE premium cut for whole flight.

Next, trains profitability. Passenger trains are same as aircraft, easy to calculate, with added cost of track maintenance. Even so, more profitable than aircraft lines, almost all the time. There are no sharp jumps in average speed so train profitability is much more predictable. With lots of low-speed cargo cars and engines in shop, average speed is kept low and express premiums high :-)
Cargo trains however have low or no speed premium, so building discrete passenger high-speed lines and budget low-speed cargo tracks is a must. Letting cargo trains on express track, means flushing premiums on passengers down the drain. Lowest per-mile cost is most profitable. Cars upgrade is almost always recommended, engine not so much. Calculation of return of investment is a wise man way. Cost of some powerful engines on low-yield cargo lines makes them net zero investment in many years, or never at all.
Winding tracks forcing deceleration or detours are thing to avoid at all cost, especially with express lines. Terraforming is expensive, but may be considered cheap when compared to missed profits.

Road transport.
All above applies, with one important addenum. City speed is limited to 50mph, which make city buses almost non-profitable at certain point. Streetcars are not subject to speed limit have separate average speed, think of it.

Ships.
QEII is one of most profitable vehicles in game, thanks to speed high above average at all times. Terraform to avoid detours and with full cabin it is moneymaker like no other.

Few notes to vehicle designers.
More attention to cost per mile in vehicle design and also careful setting of introduction and retirement date. For example Concorde profit spike can be easily offset by adding more slower but low-cost planes to same era, lowering average speed to profitable levels even for subsonic planes. At the same time, increased price and cost per mile of Concorde would keep return of investmens in line and game balanced.
737's notably, have no retirement date, lowering avg speed and possily unbalancing whole system.
There is no suitable prop plane at later date for low intensity lines where even smallest jets cannot generate profit. Fokker F-27, single prop is actually never profitable due to high cost per mile and jets offseting average speed.
Postal planes are mess until high jet age, with Ju-52 retired in 1955 and F-27 introduced in 1960. Later on there are no low-capacity postal plane at all.
Cargo planes are mostly OK.
Most importantly, introduction of new vehicle (by designer) may totally derail previously fine tuned state. Designers and maintainers should develop some mathematical model to keep vehicle design in some mantinels.

This was rather longer than anticipated, thanks to all who suffered my rants until this point.

TurfIt

Quote from: obluda on March 20, 2024, 12:53:12 PMBase speed is computed as average speed of vehicle available in class as per timeline. Everytime new vehicle is introduced of obsolete removed from depot shop, base speed is recalculated for whole class - engines, cars, passenger trains, etc.
The above is the 'legacy' calculation used only if speedbonus.tab is missing. Otherwise the values from speedbonus.tab are used which are fixed, not defendant upon available vehicles.


Quote from: obluda on March 20, 2024, 12:53:12 PMSo far, at least for pak128 vehicle profitability has no relation to settings in speedbonus.tab.
...
For example aircrafts are reported as weird and unbalaced.
I suspect you may be caught up in this bug: Bug in speedbonus.tab with air vs air_wt
As the stable release is soo old, it's not fixed there - use a nightly, or the workaround in that post.


Quote from: obluda on March 20, 2024, 12:53:12 PMLetting cargo trains on express track, means flushing premiums on passengers down the drain.
...
Winding tracks forcing deceleration or detours are thing to avoid at all cost, especially with express lines. Terraforming is expensive, but may be considered cheap when compared to missed profits.
For speedbonus purposes, the actual achieved speed is irrelevant, only the achievable speed is taken into account. e.g. If too many wagons are added to the train for the loco to pull at full speed, the reduced max speed is used. Also, if the convoi's speed is limited by a slow speed limit, the tiles reduced limit is proportionately used.  If a convoi is slowed due to traffic congestion, red lights, etc., it still counts as traveling at its max speed in the speedbonus calculation.

obluda

Quote from: TurfIt on March 21, 2024, 02:10:14 PMI suspect you may be caught up in this bug: Bug in speedbonus.tab with air vs air_wt
As the stable release is soo old, it's not fixed there - use a nightly, or the workaround in that post.


I play on stable, true. And I suspect lots of perspective players would play on stable since logic suggest, nightly builds are for devs, stable is for fun.
This is news for me and I fail to grasp what motivation might be to not fix old and known bugs, since keeping them in-game kinda chase new or casual players off. :-|

Bah, nevermind. Since my post generally address problems and mechanics of stable branch, I hope it will help someone to not write game off.



Andarix

Quote from: obluda on March 21, 2024, 02:38:49 PMI play on stable, true. And I suspect lots of perspective players would play on stable since logic suggest, nightly builds are for devs, stable is for fun.
This is news for me and I fail to grasp what motivation might be to not fix old and known bugs, since keeping them in-game kinda chase new or casual players off. :-|

Bah, nevermind. Since my post generally address problems and mechanics of stable branch, I hope it will help someone to not write game off.



I can understand your disappointment. A new release with all bug fixes is in preparation.

Simutrans is not developed commercially but for leisure purposes. And free time is scarce for many people. Unfortunately, Simutrans has very few active people at any time. People come and go when their private and professional lives no longer leave enough time for Simutrans.

And that's where we come to the pak128. There hasn't been anyone who cares about it for years. Because Simutrans as a program is one thing and the pak128 as a package is another.

And what was said for pak128 also applies to many of the other packages for Simutrans.

Wiki - List of Pakset

prissi

Fixing a stable pakset is not possible as it would break network compatibility until everyone has loaded the same fixed pakset. Also pak128 stable was too old, it required a lot of other fixes. Especially ships were broken, as you found out too. There were even ships with zero cost.

You can load a game with the nightly pakset. It should work as before, just with a different income.

Your input is still very valuable. However, I am surprised that you are ok with the trains. For me and compared to other paksets, pak128 trains are not very profitable. Especially in the early era, (before 1950) the track maintenance will kill any early networks for me.

prissi

The ships have been rebalanced. Especially the larger ships were too cheap to run. At least 50% filling is needed to turn a profit. You can check the ferries.xlsx in the github sources.

obluda

Quote from: prissi on April 02, 2024, 01:46:52 PMpak128 trains are not very profitable. Especially in the early era, (before 1950) the track maintenance will kill any early networks for me.

I consider it a challenge. Early bulk trains can be run on profit as long as cheapest track and most efficient rolling stock is used. Daisy chaining of resource tracks works rather good. Increasing mines output with electricity and workforce makes it produce stable net profit. Return of investment is acceptable then. With too dispersed resources this strategy fails of course.

SimMotive134

#7
My friend and I started a map together and we encountered the speed bonus issue for planes. I replaced air with air_wt, this fixed it in single player but not in multiplayer. I start my game with -server [port] I don't know if there may be some extra arguments for this. We are technically not using pak128, I copied it and renamed it, because I modified city growth in the configs. I think my fried is simply joining with pak128, but because the server is hosted by me the city growth modification is still applied. The air speedbonus does not work, even on new saves, and empty servers. Other speedbonuses are fine.

For me it seems as if the server uses a different speedbonus file from somewhere else, and it's still using air instead of air_wt.

Edit:
Did some more debugging. If I start a new game in singleplayer and save it with no server running the air speedbonus is correct as I said before, but if I load a save which has been created before air->air_wt change it will have the incorrect values. Interestingly if I load back the new save which had the correct values, it will now have the incorrect values.
This explains why the server had incorrect values, as the startup save already has wrong values, thus any save loaded after it will also have bad values.

Edit2:woah it also added a password to the player. The server save had some passwords. The added password on does not match with any of them. I think I might need to open a new thread if I find more stuff

prissi

The speedbonus is saved with all settings from a server game, so all client have the settings from the server. Loading a game afterward that does no have these settings, leaves the old settings. Zou can reload the defaults but starting a new game before loading.