The International Simutrans Forum

 

Author Topic: Global private car percentage incorrectly reported  (Read 211 times)

0 Members and 1 Guest are viewing this topic.

Offline Matthew

  • Devotee
  • *
  • Posts: 560
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
Global private car percentage incorrectly reported
« on: January 12, 2021, 05:19:22 AM »
I noticed that the in-game interface says Bridgewater-Brunel private car ownership is ~1%:



Perhaps the chart is not reporting the data correctly. But if true, it might explain why there is less inter-city traffic than expected!

Offline freddyhayward

  • Devotee
  • *
  • Posts: 659
  • Languages: EN
Re: Global private car percentage incorrectly reported
« Reply #1 on: January 12, 2021, 07:37:04 AM »
I noticed that the in-game interface says Bridgewater-Brunel private car ownership is ~1%:



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...

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20774
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Global private car percentage incorrectly reported
« Reply #2 on: January 12, 2021, 10:37:17 AM »
I have split this from the other topic, since this appears to be a separate bug.

Offline Ranran

  • Devotee
  • *
  • Posts: 1507
  • Languages: ja
Re: Global private car percentage incorrectly reported
« Reply #3 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.

Code: [Select]
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.