Autorenew old vehicules "bug"
Moderator: OpenTTD Developers
Autorenew old vehicules "bug"
Some months ago, I already suggested to change the way the "Autorenew vehicule when it gets old" patch.
Currently, if you set "service interval" to 0, and don't schedule depots in your orders, you don't have any chance of getting you vehicule renewed when it gets old. This patch works only if the vehicule enters a depot.
Worst of all, if the autorenew patch is enabled, you aren't even warned about your vehicule gets old.
I suggest to change how it works for players like me who play with no break down, so no scheduled servicing (nor in the orders nor at intervals).
When the vehicule reachs the age it has to be renewed, if not any service is scheduled (nor in the orders nor at intervals) it should automatically head to a depot to get renewed.
Here is my old patch refreshed to fit the lastest build (and some optimizations as well...)
-- Fix : Now when we start a "autoreplace" for a newer vehicle, all the old vehicle type don't go to the depot immediately. You can choose in your vehicle list wich ones you want to send to depot by using "send to service". As this patch works with "service" disabled, it just overrides the normal action by sending only the vehicles that have a vehicle replacement.
r12059 - Refresh of the patch to fit the current version (currently, the patch was broken with the lastest trunk)
This refresh still needs some tests, especially in the "normal" settings mode (I mean, when you use breakdowns and servicing)
Currently, if you set "service interval" to 0, and don't schedule depots in your orders, you don't have any chance of getting you vehicule renewed when it gets old. This patch works only if the vehicule enters a depot.
Worst of all, if the autorenew patch is enabled, you aren't even warned about your vehicule gets old.
I suggest to change how it works for players like me who play with no break down, so no scheduled servicing (nor in the orders nor at intervals).
When the vehicule reachs the age it has to be renewed, if not any service is scheduled (nor in the orders nor at intervals) it should automatically head to a depot to get renewed.
Here is my old patch refreshed to fit the lastest build (and some optimizations as well...)
-- Fix : Now when we start a "autoreplace" for a newer vehicle, all the old vehicle type don't go to the depot immediately. You can choose in your vehicle list wich ones you want to send to depot by using "send to service". As this patch works with "service" disabled, it just overrides the normal action by sending only the vehicles that have a vehicle replacement.
r12059 - Refresh of the patch to fit the current version (currently, the patch was broken with the lastest trunk)
This refresh still needs some tests, especially in the "normal" settings mode (I mean, when you use breakdowns and servicing)
- Attachments
-
- fix_auto_replace_if_old.patch
- r12059
- (3.51 KiB) Downloaded 184 times
Last edited by MagicBuzz on 04 Feb 2008 23:54, edited 3 times in total.
hmm, well I can tell you it isn't useless
breakdowns just occur far too often in OTTD, so I turn them off by default, consequence is that my trains will visit the depots for no reason, so I turn that off too, which leaves the trains to get old!
again: great patch, it should make trunk or at least the ChrisIN

breakdowns just occur far too often in OTTD, so I turn them off by default, consequence is that my trains will visit the depots for no reason, so I turn that off too, which leaves the trains to get old!
again: great patch, it should make trunk or at least the ChrisIN

Well, when breakdowns are off, what is the point in renewing vehicles? (Except they will no longer show with red color, etc ...)
100 years old bus then works as perfectly as new one ...
Perhaps some feature to split the "warning about player vehicles" to two subcategories ("warn about old vehicles" and "warn about other problems" (train lost, not enough orders ...)) would be better
100 years old bus then works as perfectly as new one ...
Perhaps some feature to split the "warning about player vehicles" to two subcategories ("warn about old vehicles" and "warn about other problems" (train lost, not enough orders ...)) would be better
If you need something, do it yourself or it will be never done.
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
It depends on vehicle speed and ... yes, there is condition for age:MagicBuzz wrote:I thought it was something like that, but I can't find it in the source code. But I'm pretty sure I saw something about vehicule age.phil88 wrote:Correct me if I'm wrong, but the older a vehicle is, the lower the station rating is of the stations it goes to.
Code: Select all
{
byte age = ge->last_age;
(age >= 3) ||
(rating += 10, age >= 2) ||
(rating += 10, age >= 1) ||
(rating += 13, true);
}
Basically, once vehicle age is 3 years, it does not matter how old it is - whether 4 years or 140 years ...
But it is right, that by renewing the old vehicle, you get some short interval (3 years) in which you'll be receiving some bonus again ...
So it will make sense to "force" the vehicles for exchange if autoreplace is enabled (after all, it is clientside settings, so everybody can turn it off)
If you need something, do it yourself or it will be never done.
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
I just fixed my patch.
The problem is that starting a new vehicle replacement was sending all vehicles concerned by this change to go in the nearest depot.
Now, they won't, and wait you use the "send to service" button in vehicle list. Only vehicles concerned by a autoreplacement will then go to the depot.
PS : This should not impact the way the "send to service" button works if you use normal service. I'll check it tomorrow.
The problem is that starting a new vehicle replacement was sending all vehicles concerned by this change to go in the nearest depot.
Now, they won't, and wait you use the "send to service" button in vehicle list. Only vehicles concerned by a autoreplacement will then go to the depot.
PS : This should not impact the way the "send to service" button works if you use normal service. I'll check it tomorrow.
Re: Autorenew old vehicules "bug"
Small update : patch refresh in order to work correctly with the r12059 trunk.
Take care, it still needs to be tested (I did only quick tests)
Take care, it still needs to be tested (I did only quick tests)
Re: Autorenew old vehicules "bug"
Thank you for updating this patch. I really like your patches (Timetable separation, autorenew).
Who is online
Users browsing this forum: Baidu [Spider] and 1 guest