The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

something wrong with obsoleteness

Started by Vladki, May 02, 2020, 11:33:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


On stephenson siemens I have noticed that some vehicles are available in depot as outdated, but not yet obsolete. E.g. mk3 coaches, or EMU 317. But if you look at the details, the already have increased costs due to obsolescence. It is May 2013 in the game


I think this bug has existed for a long time. (EDIT:This seems to have been implemented around May 2010)
This can happen on vehicles where this does not describe increase_maintenance_after_years in dat file.

Since get_obsolete_year_month() does not return the correct value, is_obsolete() also does not return the correct value.
When increment_maintenance_after_years is not described in it, the default value for each waytype is used, but the judgment seems to use the default value for increase_maintenance_after_years that is irrelevant to the waytype.
I'm not sure how this is happening.  (´・ω・`)

For example, EMU class 317 does not have increment_maintenance_after_years in dat, so increase_maintenance_after_years = 20 is used and obsolete from 2007 for cost calculation thing, but get_obsolete_year_month() use  default_increase_maintenance_after_years_rail = 30, so the flag that it is obsolete stands in 2017.

The description was incorrect. (It has been edited)
The cost formula always uses the default value after 20 years regardless of the waytype. This was causing the bug. Therefore, the cost of class 317 will start increasing 20 years after the production ended in 1987.


I think I have fixed this. This seems to be a bug from the beginning of implementation.
Possibly false statements were highlighted by the color of the vehicle symbol.
I'm sorry but your company was being exploited by maintainers for excessive obsolescence costs. But statute of limitations had run out.  ::'(

@James - I threw a pull request. Check this.

This time I think I have fixed this bug. I apologize for the lack of initial confirmation. (´・ω・`)
As already explained, the cost calculation uses 20 years regardless of the waytype, so the cost calculation was different from the assumed obsolescence.
Please confirm.


I believe that I merged this a short while ago: apologies for not having updated this thread at the time.

Can I confirm whether the problem has now been fixed? Thank you to Ranran for the patch.
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.