JGRennison / OpenTTD-patches

OpenTTD - http://www.openttd.org/ - with additional patches
Other
553 stars 127 forks source link

[Bug]: Speed part of the station rating seems not accurate for ships and aircraft. #645

Closed Nrgte closed 4 months ago

Nrgte commented 5 months ago

Version of OpenTTD

0.57.0

Expected result

Not 100% sure this is a bug or I'm understanding something, wrong, but this behavior seems weird.

If the max speed of the last vehicle that picked up a certain cargo type is 42 km/h, I'd expect to show up in the station rating tooltip.

Actual result

A couple of examples I noticed:

To clarify I double checked, that the last vehicle is actually the one in the report.

As far as I can tell road vehicles and trains seem accurate.

Steps to reproduce

As far as I can tell ships are consitently doubled (maybe intentional).

Aircraft just seem wonky (at least when the aircraft speed is set to half).

JGRennison commented 5 months ago

Thanks for this. I've adjusted the tooltip to convert the rating speed back into the corresponding vehicle speed for that vehicle type. There may be some cases where this doesn't quite match the original vehicle's speed due to rounding and the way the rating updates work, but for the most part it should be as expected.

JGRennison commented 4 months ago

Fixed in the most recent release

Nrgte commented 4 months ago

I hope it's okay, that I resurrect this issue. The speed part seems fixed, but the percentage still seems wrong (at least for airplanes).

https://i.imgur.com/ZfgNT1I.png

Testing on 0.58.1

Thanks!

JGRennison commented 4 months ago

This is just how the rating algorithm works, it doesn't make much sense from an objective point of view but that is how it has worked since the original TTD.

Nrgte commented 4 months ago

Ohh okay, I was just going off from the official openttd wiki, which would suggest that an aircraft with a speed over 255 km/h should get a station rating of 17%:

https://i.imgur.com/YtfHBIB.png

So I assume this is a bug in the OG game or the wiki is wrong.

Interestingly it only seems wrong for Aircrafts.

JGRennison commented 4 months ago

Aircraft use different speed units for this. You can multiply by 10/128 to get the equivalent value.

Nrgte commented 4 months ago

Ahh okay, thank you for the info. I really appreciate this and try to calculate this.