The International Simutrans Forum

Development => Extension Requests => Topic started by: kazarmy on March 17, 2018, 07:33:03 AM

Title: [120.2.2&r8387] Yearly goods stat in city list chart not in sync with city chart
Post by: kazarmy on March 17, 2018, 07:33:03 AM
Either the number of goods delivered yearly is hopelessly high or abysmally low but the numbers on the charts are not in sync and they should be in sync since there's only 1 city. I think it's the city chart (right hand side) that's off since there's quite a number of goods trucks delivering stuff:


(https://drive.google.com/uc?id=1xL9bUTSqjv2X7YAkRCvntmlD84TeK_Nd)


Appears in 120.2.2 with pak64 120.2. Also appears in r8387 nightly. Savegame attached.
Title: Re: [120.2.2&r8387] Yearly goods stat in city list chart not in sync with city chart
Post by: kazarmy on March 17, 2018, 08:20:23 AM
Forget to add, both drive_left = 1 and signals_on_left = 1.
Title: Re: [120.2.2&r8387] Yearly goods stat in city list chart not in sync with city chart
Post by: Dwachs on March 17, 2018, 09:17:53 AM
These are completely different and uncomparable numbers. The charts for 'Arrived' and 'Goods' in the city window show count how often per month a factory in the city had supplies and how often supply was checked...
Title: Re: [120.2.2&r8387] Yearly goods stat in city list chart not in sync with city chart
Post by: kazarmy on March 17, 2018, 09:25:01 AM
Shouldn't they be the same number, like for Passengers and Mail?
Title: Re: [120.2.2&r8387] Yearly goods stat in city list chart not in sync with city chart
Post by: Dwachs on March 17, 2018, 11:56:27 AM
The ration of 'Arrived' and 'Goods' shows the ratio of factories with input storage divided by the number of checks performed. Only factories that receive passengers from the city are taken into account.

The button description is completely misleading. Also the ration of supplied vs all factories is not very interesting (although city growth depends on this).
Title: Re: [120.2.2&r8387] Yearly goods stat in city list chart not in sync with city chart
Post by: prissi on March 17, 2018, 02:41:23 PM
These buttons are only for citygrowth, as Dwachs pointed out, and only for factories within the cities catchment area. So even if these would record the amount (and not activity), then numbers would deviate.

I am open to suggestions for a better translation.
Title: Re: [120.2.2&r8387] Yearly goods stat in city list chart not in sync with city chart
Post by: Dwachs on March 17, 2018, 03:56:42 PM
I would rather show the percentage of supplied factories: so one graph and button. Button name could be 'Factories supplied' or something similar.
Title: Re: [120.2.2&r8387] Yearly goods stat in city list chart not in sync with city chart
Post by: kazarmy on March 18, 2018, 06:02:10 AM
Quote from: prissi on March 17, 2018, 02:41:23 PM
I am open to suggestions for a better translation.

Based on stadt_t::city_growth_get_factors code (https://github.com/aburch/simutrans/blob/2f378136b49ebc6b4333159705b240d32875253f/simcity.cc#L1560-L1570), I prefer "Supply" and "Goods demand" for the 2 buttons in the city window, but if demand is just a constant, arbitrary number of checks per month (with adjustment for February), then it might be a waste of a graph to display it.
Title: Re: [120.2.2&r8387] Yearly goods stat in city list chart not in sync with city chart
Post by: Dwachs on March 18, 2018, 05:57:25 PM
Here is a patch: It shows the ration of the values of "arrived" and "goods" in current version. See image.
Title: Re: [120.2.2&r8387] Yearly goods stat in city list chart not in sync with city chart
Post by: prissi on March 19, 2018, 09:42:18 AM
Maybe leave the empty button out?
Title: Re: [120.2.2&r8387] Yearly goods stat in city list chart not in sync with city chart
Post by: Dwachs on March 23, 2018, 04:26:59 PM
You mean: move the button 'Supplied Factories' to the left?

What about the general idea of the patch?
Title: Re: [120.2.2&r8387] Yearly goods stat in city list chart not in sync with city chart
Post by: prissi on March 24, 2018, 12:48:44 PM
I like the general idea. Although for consistency on could also show 100% on potential (or zero without factories) and then real time producing. (Like it is done for production increase statistics in the factory charts.) Maybe player/devotees using these dialogues more than me would be the better judges ...
Title: Re: [120.2.2&r8387] Yearly goods stat in city list chart not in sync with city chart
Post by: kazarmy on March 24, 2018, 02:56:16 PM
Would be very interested in finding out why the ratio is below maximum (no matter what the maximum is or whether it's shown explicitly), but can't justify the effort to instrument the code at the moment.

Quote from: prissi on March 24, 2018, 12:48:44 PM(Like it is done for production increase statistics in the factory charts.)

Btw, aren't those Production/Boost factory charts for Passengers/Mail Generated/Departed/Arrived supposed to start from 0 every month?
Title: Re: [120.2.2&r8387] Yearly goods stat in city list chart not in sync with city chart
Post by: kazarmy on March 25, 2018, 12:07:38 AM
Quote from: kazarmy on March 24, 2018, 02:56:16 PM
Btw, aren't those Production/Boost factory charts for Passengers/Mail Generated/Departed/Arrived supposed to start from 0 every month?

Bug report at https://forum.simutrans.com/index.php?topic=18015.0 (https://forum.simutrans.com/index.php?topic=18015.0).