Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Cargo-Payment-Rates-Graph has vanilla values #38

Closed
mariocvj opened this issue Jul 21, 2024 · 5 comments
Closed

[Bug]: Cargo-Payment-Rates-Graph has vanilla values #38

mariocvj opened this issue Jul 21, 2024 · 5 comments

Comments

@mariocvj
Copy link

mariocvj commented Jul 21, 2024

Version of OpenTTD

Citymania-client-14.1-windows-win64

Expected result

I attached the screenshot of the graph from Citymania v13.4 which does not have this bug, notice the Goods and Valuables dropoff is at 80 days.
image

Actual result

Lines drawn on the graph are same as official OpenTTD version despite the numbers on days-in-transit axis being doubled.
I attached the screenshot of the Citymania v14.1, notice the Goods and Valuables dropoff is at 160 days.
actualResult

Steps to reproduce

The bug occurs to me consistently every time I play on v14.1 of Citymania client.
Besides vanilla OpenTTD, I also tested using FIRS and the bug is still there with moded resources.

@mariocvj mariocvj changed the title [Bug]: Days-in-Transit axis of a Cargo-Payment-Rates-Graph has doubled numbers [Bug]: Days-in-Transit axis of a Cargo-Payment-Rates-Graph has doubled values Jul 21, 2024
@mariocvj mariocvj changed the title [Bug]: Days-in-Transit axis of a Cargo-Payment-Rates-Graph has doubled values [Bug]: Cargo-Payment-Rates-Graph has vanilla values Jul 21, 2024
@ladysadie
Copy link

cm_13 4
Even in the 13.4 version code this graph is actually pretty misleading. It is telling the user it's displaying values from 20 ticks up to 480 ticks.

The data it's actually calculating is way different. It starts at 8 ticks and goes to 192 ticks.

@ladysadie
Copy link

ladysadie commented Nov 19, 2024

Fixing the calculations isn't a hard fix. It kind of breaks the graph though:

14 1_fixed

I suspect that means the assumption of 10 units x 20 blocks is just not big enough to generate useful graph data. Increasing that should help? I'm just not sure what values the graph should use. I'll try a few though.

@ladysadie
Copy link

Okay changing the amount of cargo or the distance didn't change the data. It just scaled the Y axis labels accordingly.

@ladysadie
Copy link

Dropping the number of steps makes the differences easier to see:

maybe

@ldpl ldpl closed this as completed in 33a27f3 Nov 19, 2024
@ldpl
Copy link
Collaborator

ldpl commented Nov 19, 2024

Even in the 13.4 version code this graph is actually pretty misleading. It is telling the user it's displaying values from 20 ticks up to 480 ticks.
The data it's actually calculating is way different. It starts at 8 ticks and goes to 192 ticks.

X axis on the chart is in days and afaict it calculates them correctly. You were probably confused by GetTransportedGoodsIncome taking transfer periods which are 2.5 days each.

AdminChucky pushed a commit to n-ice-community/openttd-cmclient that referenced this issue Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants