FS#4540 - Orders: toggle display of implicit orders

Attached to Project: OpenTTD
Opened by Pavel Grund (Razmir) - Thursday, 03 March 2011, 17:02 GMT
Last edited by andythenorth (andythenorth) - Monday, 04 September 2017, 07:03 GMT
Type Feature Request
Category Interface
Status With patch   Reopened
Assigned To andythenorth (andythenorth)
Operating System All
Severity Medium
Priority Normal
Reported Version 1.1.1
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No


Hi, sometimes I use some track designs, where the trains are navigated by some other ways than just orders (for example two-way EOL). But in this case I find this new feature of automatic orders extremely annoying. They make such a mess in orders list (see screenshot)! Since they do not affect pathfinding, they could be hidden by "per client" setting. Could we have option not to display them? I would be very happy for this one item in Advanced settings, but if there would be some problem with that, one item in openttd.cfg would do the same.
Pretty please :)
Thank you.
This task depends upon

Comment by LMB (LMB) - Monday, 07 March 2011, 16:10 GMT
I second your opinion. I have exactly the same problem.
Comment by fonsinchen (fonsinchen) - Sunday, 10 April 2011, 19:59 GMT
This little patch gives you a config option to turn off automatic orders. It's available in the "order" section in openttd.cfg and it's called "add_auto". I don't provide a GUI entry for it as I don't want cargodist players to switch it off and nag me about cargo not going where it's supposed to.
Comment by LMB (LMB) - Sunday, 10 April 2011, 20:17 GMT
Comment by Pavel Grund (Razmir) - Tuesday, 12 April 2011, 13:07 GMT
Thanks very much. I understand your point about CargoDist. GUI is not necessary. Will the patched 1.1.0 version be able to connect to regular 1.1.0 stable servers? Hope so. If I will be able to try it before the answer comes, I add it later myself...
Comment by Pavel Grund (Razmir) - Thursday, 14 April 2011, 09:30 GMT
um, I was not able to patch the 1.1.0 sources. I must say I don't really understand the matter, I just follow guides found on internet. Can you help me please? I gave the output to the pastebin:
Comment by fonsinchen (fonsinchen) - Thursday, 14 April 2011, 14:10 GMT
No, you cannot use the patch with unpatched servers. That is, maybe you can, but it's dangerous and might desync. The patch is intended as resolution to the above problem and thus it is directed at the OpenTTD developers who may or may not accept it in trunk. It's not intended to be applied to 1.1.0.

The point about compatibility is still valid, though. In fact the patch should increment the savegame version and declare a "from" version for the new setting. I forgot about that. The attached new patch is updated accordingly.
Comment by Francis G (blup) - Friday, 01 July 2011, 20:54 GMT
I think the request was more about not listing the automatic orders, but you are actually disabling them. Since you are completely disabling the automatic order, yes you need to sync save-games and the network. On the other hands, as Pavel asked for, is only a per-user/per-client configuration option to hide the automatic order, thus avoid drawing them, which do not requires any sync with the network nor the save-games.

Comment by LMB (LMB) - Friday, 01 July 2011, 21:01 GMT
For me it's OK to have an option *not to display automatic orders*. With 20 or 40 stops on the timetable I'm having problems managing vehicles. It is ok to have each stop show passing vehicles.
Comment by Francis G (blup) - Saturday, 02 July 2011, 08:13 GMT
The patches to display/hide implicit orders. Add Advanced Settings->Vehicles->Hide implicit orders (bool). Can be changed at any time, patch force a refresh of all WC_VEHICLE_ORDERS window already opened. I could maybe add a hotkey in a following patch if I have the time.

DO NOT USE THESE PATCHES! They are bugged and may cause a de-sync when networked. The reason is that the order's window code use the location of the order in the list as a vehicle order identifier and seem to send that on the wire. I'm currently working on a fix that will be added into #4668.
Comment by LMB (LMB) - Saturday, 02 July 2011, 08:15 GMT
Thanks. Hotkey is maybe not necessary, but the patch applied to the trunk would be kinda useful. Not everybody wants to recompile.
Comment by fonsinchen (fonsinchen) - Saturday, 02 July 2011, 08:48 GMT
There are two problems with this patch:
1. You don't have to change all the language files. If no translation is available english will be displayed by default.
2. If you disable the display of implicit orders and an order list grows to 255 entries (implicit or explicit), you can't add any more explicit orders as the order list is full. Furthermore you can't delete any implicit orders as you don't see them and so you're in a confusing situation then. That's why my patch disables implicit orders altogether instead of hiding them.
Comment by Francis G (blup) - Saturday, 02 July 2011, 17:40 GMT
Thank you for (1), I wasn't aware of that.
As of (2), if you try the patch, you will see that it does not change the numbering of the orders, it only prevents the draw. This mean that order may jump from 1 to 4 to 11 to 20 to then come back to 1. That is also why I proposed to add an hotkey to allow the player to quickly redisplay the implicit orders globally and a button in the window could do the same locally.
Comment by 3298 (3298) - Friday, 25 August 2017, 16:36 GMT
I've written my own patch for this feature. I think most of the concerns about hidden orders are solved by putting the switch that hides and reveals them directly into the window. The order numbers are another hint that there are some orders which are not shown. That may be situational, but it was enough of a reason to keep this instead of an <#explicit>.<#implicit> numbering scheme as shown in (which is where I got the toggle button idea, by the way).
There's also a patch for the timetable window. I find it a little inelegant, mostly due to some ancient design decision that the last timetable line should actually be part of the first order, but I think it works, so it's attached.
A hotkey patch for the timetable window is also included because I have it. I won't mind if it's discarded, but because the implicit order patches come after it in my local feature branch, omitting the hotkeys may result in (small, easily resolved) rejected hunks.