Longer "reporting period" for "Warn if vehicle income is negative" (to prevent "false alarms" on long routes)

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
jacnowak
Engineer
Engineer
Posts: 2
Joined: 19 Aug 2024 19:56

Longer "reporting period" for "Warn if vehicle income is negative" (to prevent "false alarms" on long routes)

Post by jacnowak »

First of all, thanks to all developers for constantly making this great game even greater. I've been playing it for many years and I actually got surprised that I don't have an account on this forum! So this is my first post and I would like to take this opportunity to say hello to everyone :)

After 14.x release OpenTTD is at its best and close to perfection in my opinion - unbunching is great and I use it a lot, new ship pathfinder made ships finally fun to use, not to mention the new font looking much smoother on my 4K display.

I was super excited to try the new timekeeping mode but as it only works for new games and I wanted to finish my current game first, I only tried it recently. For me the main problem with the year being too short in OpenTTD is that on long routes on large maps it can take more than a year for a train (or ship) to complete its journey. This causes "train profit last year was negative" warning message which is kind of misleading as there is nothing wrong with the train, it just never unloaded cargo in the previous year but eventually it WILL unload, it will make a ton of money, many times more than its running costs so the route is profitable but the "reporting period" for that warning message is too short. I don't want to disable "warn if vehicle income is negative" setting as sometimes the warning can indicate a legitimate problem - a messed up order list/station stopped accepting cargo/industry closed/etc. so I want to know when something like that happens but I get a ton of "false alarms". So I hoped that new timekeeping mode would solve the problem but unfortunately it does not - the reporting period for that error message is "one period" which is the same as in normal mode and it isn't longer if you increase year length.

So I wonder what is the best way to achieve what I want to achieve.
Would it make sense, in the new "wallclock" timekeeping mode, to still calculate everything as before but REPORT things "per year"? So that if you increase year length from 12 to 36 minutes for instance, the running cost of a vehicle that is normally $1000/year would be $3000/year and similarly the "reporting period" for profit/year would be one calendar year? Or that would mess up too much stuff? I'm not talking about changing anything to do with how income is calculated, etc. - only how it is REPORTED in the UI - for the purposes of "profit this year/last year". Or it would make more sense to make a separate patch that ONLY deals with the reporting period of "warn if vehicle income is negative" and allow it to set it to something larger than one year (2 years would be probably sufficient for most scenarios, more might probably be tricky as I'm not sure if the game "remembers" statics older than "current" and "previous" year)?
I would like to hear a developer opinion what would be the best way of solving the problem I mentioned. Building on the "timekeeping" feature seams the most reasonable approach but there may be something in the inner playsim code that make it not a viable approach.
I might even have a go at making a patch myself if I dust off my rusty C/C++ skills but it would be great to hear an opinion of someone familiar with the code first...

Cheers

Jacek
User avatar
2TallTyler
Director
Director
Posts: 572
Joined: 11 Aug 2019 18:15
Contact:

Re: Longer "reporting period" for "Warn if vehicle income is negative" (to prevent "false alarms" on long routes)

Post by 2TallTyler »

When developing the new wallclock timekeeping mode, I went to considerable effort (over a year of work, sometimes 20 hours a week) to keep the economic system and "game balance" separate from the calendar progression.

The way vehicles on long routes are measured could use some improvement, but tying it to existing time settings is the wrong tool for the job, in my opinion. :)

I would rather see the concept re-imagined, possibly with some rolling average or by measuring a different metric than profit alone. You might be interested in the discussion around this proposal (which unfortunately hasn't been updated in some time).
LaChupacabra
Route Supervisor
Route Supervisor
Posts: 431
Joined: 08 Nov 2019 23:54

Re: Longer "reporting period" for "Warn if vehicle income is negative" (to prevent "false alarms" on long routes)

Post by LaChupacabra »

2TallTyler wrote: 20 Aug 2024 12:40 I would rather see the concept re-imagined, possibly with some rolling average or by measuring a different metric than profit alone. You might be interested in the discussion around this proposal (which unfortunately hasn't been updated in some time).
If you talk about the profit in the last year as part of the company's evaluation, then yes, a new concept would be useful here and jfs's solution is quite interesting. :) But in its current form it could give quite perverse evaluations and as a gameplay element that would help the player, it may not be very useful. For example, if a vehicle drives around by the shortest route, fully loaded, because there is nowhere to unload, it will receive the highest possible evaluation. :lol:

Probably it can be improved, but I think that evaluating the entire company based on the result of a single "worst" vehicle will never be the best solution.


Returning to simpler™ solutions, I think it would be worth considering adding an option in the current setting that would make warnings appear when a vehicle has not brought profit not only for the last year/period, but for example for two (three?) years/periods.
Warning about negative income.png
Warning about negative income.png (104.33 KiB) Viewed 3319 times
BTW. It would be nice if these warnings didn't apply to vehicles that are stopped (e.g. as an exhibition / eyecandy)

BTW 2. There is still a terrible mess with these message/warning settings. Those that are enabled don't work, and those that are disabled still appear. Before adding/changing another setting, it would be good to do something about it. The bug is reported here: #9698. It is currently closed, although still relevant.
I am sorry for may English. I know is bed.
jacnowak
Engineer
Engineer
Posts: 2
Joined: 19 Aug 2024 19:56

Re: Longer "reporting period" for "Warn if vehicle income is negative" (to prevent "false alarms" on long routes)

Post by jacnowak »

2TallTyler wrote: 20 Aug 2024 12:40 When developing the new wallclock timekeeping mode, I went to considerable effort (over a year of work, sometimes 20 hours a week) to keep the economic system and "game balance" separate from the calendar progression.

The way vehicles on long routes are measured could use some improvement, but tying it to existing time settings is the wrong tool for the job, in my opinion. :)

I would rather see the concept re-imagined, possibly with some rolling average or by measuring a different metric than profit alone. You might be interested in the discussion around this proposal (which unfortunately hasn't been updated in some time).
Yes, after having a deeper thought (and an extremely brief look at the code) I get the idea why you implemented it this way. It was more obvious why you can't increase the length of the day/month without affecting gameplay balance but I initially thought the same logic doesn't need to apply for year as the year is mostly used for statistical purposes. But it's not entirely true as vehicle age is measured in years so you would need to replace vehicles less often which affects balance and I probably didn't think of some NewGRFs using it for a different reason. So probably the separation of calendar time from economy time was the only reasonable way to implement it in a way that doesn't break things - and I fully understand that it was a large effort to design and implement. Sorry if my initial post sounded a bit too critical - this is a great feature, it just doesn't do what I assumed it does but still is very useful to be able to use older vehicles for a longer time. Thanks for great work on this great game! :)

I think for now it makes most sense for me to disable that warning and just do a sanity check of my vehicles from time to time (just sort vehicle list by "profit last year" close to the end of the year and see if any vehicle also has negative "profit this year" and only then look closer what the vehicle does) but it would actually be good if a setting like @LaChupacabra suggested was implemented at some point.
User avatar
2TallTyler
Director
Director
Posts: 572
Joined: 11 Aug 2019 18:15
Contact:

Re: Longer "reporting period" for "Warn if vehicle income is negative" (to prevent "false alarms" on long routes)

Post by 2TallTyler »

LaChupacabra wrote: 20 Aug 2024 23:29 If you talk about the profit in the last year as part of the company's evaluation ...
Partially, but profit last year is used in a few places including showing the vehicle in lists and of course news messages as described in this thread.

I would rather rethink the calculation than simply extend it, especially if the player has to know to change it. What if someone makes a route that takes three years to complete?

I have not seriously looked into solving this (and don't plan to, to be honest), but my first thought would be "profit last trip" measured as a traversal of the vehicle's orders. Of course, conditional orders would complicate this. :wink:
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 9 guests