The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: Matthew on January 12, 2021, 05:19:22 AM

Title: Global private car percentage incorrectly reported
Post by: Matthew on January 12, 2021, 05:19:22 AM
I noticed that the in-game interface says Bridgewater-Brunel private car ownership is ~1%:

(https://i.imgur.com/y1kXMMr.png)

Perhaps the chart is not reporting the data correctly. But if true, it might explain why there is less inter-city traffic than expected!
Title: Re: Global private car percentage incorrectly reported
Post by: freddyhayward on January 12, 2021, 07:37:04 AM
Quote from: Matthew on January 12, 2021, 05:19:22 AM
I noticed that the in-game interface says Bridgewater-Brunel private car ownership is ~1%:

(https://i.imgur.com/y1kXMMr.png)

Perhaps the chart is not reporting the data correctly. But if true, it might explain why there is less inter-city traffic than expected!
There is still quite a lot of local traffic for 1% ownership...
Title: Re: Global private car percentage incorrectly reported
Post by: jamespetts on January 12, 2021, 10:37:17 AM
I have split this from the other topic, since this appears to be a separate bug.
Title: Re: Global private car percentage incorrectly reported
Post by: Ranran(retired) on January 12, 2021, 11:01:49 AM
I looked into this and it was just a display bug. I set it to PERCENT because the suffix can be selected with incorporating from the standard, but it displays 1/100 value because the value recorded is not the unit for normal percentage display to be used.

We can choose not to display "%" on the chart, or increment to the new save version and multiply by 100 when loading from the old save. In the latter case, the value read from dat needs to be multiplied by 100, or the value of dat needs to be multiplied by 100, so the former is easy.

const uint8 citylist_frame_t::hist_type_type[karte_t::MAX_WORLD_COST] =
{
STANDARD,
STANDARD,
STANDARD,
STANDARD,
STANDARD,
STANDARD,
STANDARD,
STANDARD,
PERCENT,
STANDARD,
PERCENT,
STANDARD,
PERCENT,
STANDARD,
STANDARD
};

In the former case, just change the end to STANDARD as above.
Title: Re: Global private car percentage incorrectly reported
Post by: Ranran(retired) on February 13, 2022, 10:21:49 PM
I believe this bug has already been fixed.