Make Simutrans speak your language.

[Bug] Calculation of "max. comfortable journey time" when comfort is 240 or more

Started by Ranran, June 24, 2022, 12:28:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


I am currently working on updating the depot dialog for ver 15.
At that time, as the title suggests, I noticed that the calculation of "max. comfortable journey time" when comfort is 240 or more is broken.

I created a chart that plots the correlation between "max. comfortable journey time" and comfort in the goods list to organize the information for the depot dialog.
It just displays the value of max_tolerable_journey(comfort), and the numbers in this chart match what is displayed in the current depot dialog.

As this chart shows, "max. Comfortable journey time" shows outliers in more than 240 comfort.

// There is no tolerable journey below tolerable_comfort_short...
max_tolerable_journey.insert(tolerable_comfort_short - 1, 0);
max_tolerable_journey.insert(tolerable_comfort_short, tolerable_comfort_short_minutes * 60);
max_tolerable_journey.insert(tolerable_comfort_median_short, tolerable_comfort_median_short_minutes * 60);
max_tolerable_journey.insert(tolerable_comfort_median_median, tolerable_comfort_median_median_minutes * 60);
max_tolerable_journey.insert(tolerable_comfort_median_long, tolerable_comfort_median_long_minutes * 60);
max_tolerable_journey.insert(tolerable_comfort_long - 1, tolerable_comfort_long_minutes * 60);

The "max. comfortable journey time" uses a different formula for the comfort range.
It would be appreciated if you could confirm that the last formula is correct.

The chart in the image above can be tested with pull request #555. This pull request will be explained in another thread.
pak.256やpak.nipponのような複数タイル市内建築物があるpakセットはextendedではちゃんと遊べません。それどころかextendedの追い越し機能はバグまみれで修正が難しくなっており、都市機能および道路機能というゲーム土台部分を壊し、開発作業&コードメンテナンスの足かせになっている。それは最終的にプレイヤーの損失に他ならない。その原因は全て1人の日本人=ひめし@himeshi_hob(THleaderH)によるもの。再びフォーラムの先輩方のアドバイスをガン無視し、結局ほとんど修正されないままExtendedに実装されてしまった。彼は問題を認識しつつ5年以上放置して今なおOTRPの開発を続けている。あまりにも身勝手で無責任。日本の人達はそういう事実にちゃんと目を向けるべき (´・ω・`)


It makes sense that there's a discontinuity in the max. comfortable journey time when the comfort level allows sleeping on board.


Quote from: Octavius on June 26, 2022, 11:39:15 AMIt makes sense that there's a discontinuity in the max. comfortable journey time when the comfort level allows sleeping on board.
I don't think your point explains why comfort *240-255 are all the same value.
(If you edited the, you can see that this starts at 240 with the same value.)
It also doesn't seem to be at least specific to pak.britain.

Is 109:13:24 the upper limit? In any case, it is very strange that if it increases by 1, it will increase sharply.
pak.256やpak.nipponのような複数タイル市内建築物があるpakセットはextendedではちゃんと遊べません。それどころかextendedの追い越し機能はバグまみれで修正が難しくなっており、都市機能および道路機能というゲーム土台部分を壊し、開発作業&コードメンテナンスの足かせになっている。それは最終的にプレイヤーの損失に他ならない。その原因は全て1人の日本人=ひめし@himeshi_hob(THleaderH)によるもの。再びフォーラムの先輩方のアドバイスをガン無視し、結局ほとんど修正されないままExtendedに実装されてしまった。彼は問題を認識しつつ5年以上放置して今なおOTRPの開発を続けている。あまりにも身勝手で無責任。日本の人達はそういう事実にちゃんと目を向けるべき (´・ω・`)


Thank you for the report. It looks as though there may be a problem with this - it is correct that they should not all be the same value above 240.

I am currently contemplating making a number of modifications to comfort in 15.x, including allowing specifying the maximum comfortable journey time directly in .dat files (albeit retaining the old conversions for legacy compatibility), so it may be better to defer looking into this in detail until I come to that work.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.