Mass orders/grouping interface
Moderator: OpenTTD Developers
I'd rather have a better interface to ordering multiple trains than shared orders. As it is, with four trains there's no easy way to verify whether they all share the same order list, or there are two pairs of trains sharing identical order lists. With 400 trains it's not manageable.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
How about that (complete explanation here):Brianetta wrote:I'd rather have a better interface to ordering multiple trains than shared orders. As it is, with four trains there's no easy way to verify whether they all share the same order list, or there are two pairs of trains sharing identical order lists. With 400 trains it's not manageable.
Last edited by gigajum on 24 Aug 2006 12:52, edited 1 time in total.
I made a little patch.Brianetta wrote:I'd rather have a better interface to ordering multiple trains than shared orders. As it is, with four trains there's no easy way to verify whether they all share the same order list, or there are two pairs of trains sharing identical order lists. With 400 trains it's not manageable.
I add a details button in the train orders windows.
When you click on details, you can see all trains which share the same order list.
- Attachments
-
- same orders.PNG (156.31 KiB) Viewed 1973 times
Sorry, I forgot to add the diff...gigajum wrote:A patch/diff file would me interest me more, nice anywaynycom wrote:I made a little patch.
I add a details button in the train orders windows.
When you click on details, you can see all trains which share the same order list.
- Attachments
-
- same_orders_r6083.diff
- (21.53 KiB) Downloaded 356 times
- mexicoshanty
- Traffic Manager
- Posts: 158
- Joined: 22 Aug 2006 13:15
- Location: Australia
- Contact:
That is the english lang file, so there is only english allowed. I don't know what language it is, looks like french. If it is french then it is wrong in the english lang file.the diff file wrote:Code: Select all
Index: lang/english.txt =================================================================== --- lang/english.txt (revision 6083) +++ lang/english.txt (working copy) @@ -2852,6 +2854,13 @@ .... .... + + +####### Nycom + +STR_SORT_BY_WAITINGCARGO :Waiting Cargo +STR_SORT_BY_RATING :Rating +STR_SORT_BY_VISITING_VEHICLE :Visiting Vehicle +STR_SORT_BY_DROPDOWN_TYPE :{BLACK}Type +STR_0198_BAD_PROFIT_THIS_YEAR_BAD_LAST_YEAR :{TINYFONT}{BLACK}Profit cette année: {RED}{CURRENCY} {BLACK}(l'an dernier: {RED}{CURRENCY}) +STR_0198_BAD_PROFIT_THIS_YEAR_GOOD_LAST_YEAR :{TINYFONT}{BLACK}Profit cette année: {RED}{CURRENCY} {BLACK}(l'an dernier: {GREEN}{CURRENCY}) +STR_0198_GOOD_PROFIT_THIS_YEAR_BAD_LAST_YEAR :{TINYFONT}{BLACK}Profit cette année: {GREEN}{CURRENCY} {BLACK}(l'an dernier: {RED}{CURRENCY}) +STR_0198_GOOD_PROFIT_THIS_YEAR_GOOD_LAST_YEAR :{TINYFONT}{BLACK}Profit cette année: {GREEN}{CURRENCY} {BLACK}(l'an dernier: {GREEN}{CURRENCY}) +STR_VEHICLE_COUNT :{BLACK}Vehicles counts : {LTBLUE}{COMMA} +####### Nycom
WTF?
the diff file wrote:Code: Select all
--- network.h (revision 6083) +++ network.h (working copy) @@ -3,7 +3,7 @@ #ifndef NETWORK_H #define NETWORK_H -#define NOREV_STRING "norev000" +#define NOREV_STRING "v6083 - Custombridgehead 20+" #ifdef ENABLE_NETWORK
- mexicoshanty
- Traffic Manager
- Posts: 158
- Joined: 22 Aug 2006 13:15
- Location: Australia
- Contact:
right on. This becomes even more problematic as we move to larger and larger maps.Brianetta wrote:I'd rather have a better interface to ordering multiple trains than shared orders. As it is, with four trains there's no easy way to verify whether they all share the same order list, or there are two pairs of trains sharing identical order lists. With 400 trains it's not manageable.
Well why won't we have both enchanced shared orders (with ability to see all trains having these orders, just like guys above proposed), AND grouping interface, where you can make groups independent from orders?mexicoshanty wrote:That's one of the main point of the routes, if we didn't have that feature we'd have to call it groups of vehicles or something. I guess this is an extension of the sharing of orders feature currently implemented but just in a way that is more informative and easier to manage.MeusH wrote:I wouldn't force all vehicles in a group to have the same orders.
- mexicoshanty
- Traffic Manager
- Posts: 158
- Joined: 22 Aug 2006 13:15
- Location: Australia
- Contact:
Because i don't just want to see which trains have those orders. I have to find a train with those orders first, which can be extremely difficult on a large map with hundreds of trains. Also when assigning orders it can be hard to find a train with orders you want to share with. A solution where groups are named and share orders would solve that.MeusH wrote:Well why won't we have both enchanced shared orders (with ability to see all trains having these orders, just like guys above proposed)
I don't particually see a reason why you would want to group of trains that don't share the same orders. Apart from seeing statistical information about how much profit or loss they make. Even in that case by dividing up the groups on a per order sequence basis you would get a more accurate indication of that routes profit and loss. Or maybe you want to group trains geographically for the sole purpose of sending them to the depo when you upgrade the track system? In which case im sure you can click more than twice to cover the groups you need to send to the depo.MeusH wrote: AND grouping interface, where you can make groups independent from orders?
nice patch, but a bit messy code and no support for planes or ships. I will clean this up, make a function for all vehicle types (avoiding dublicated code) and with a few other changes and we will see the result. I think this patch got a good chance of getting committed, but not in it's current form.nycom wrote:I made a little patch.
I add a details button in the train orders windows.
When you click on details, you can see all trains which share the same order list.
As for the grouping thing, the idea itself is still good, but not as needed anymore as it was without this patch. I will postpone groups until this patch is finished. Usage of groups will also change a bit as it's not needed to make individual lines anymore, more like train types (say 10 lines can share a group since they are the same types and can share autoreplace orders)
How about making list of routes (shared orders) accessible from vehicle list window, instead of "details" somewere in single vehicle's window?Bjarni wrote:nice patch, but a bit messy code and no support for planes or ships. I will clean this up, make a function for all vehicle types (avoiding dublicated code) and with a few other changes and we will see the result. I think this patch got a good chance of getting committed, but not in it's current form.nycom wrote:I made a little patch.
I add a details button in the train orders windows.
When you click on details, you can see all trains which share the same order list.
I think it's ok to have the button where it is so you can find all vehicles, that shares orders with the one you just selected. The question is if we should add a list/button somewhere else as well.MeusH wrote:How about making list of routes (shared orders) accessible from vehicle list window, instead of "details" somewere in single vehicle's window?
First of all, I like to get this to work with some nice code. So far I have managed to delete the profit patch (one patch at a time, thank you), removed some dublicated code and removed some unneeded calculations (but likely not enough to make the user notice the speedup). It's still far from done though.
I rewrote the patch.
Now, it woks for all vehicles. I make a function for all vehicles type.
Now, it woks for all vehicles. I make a function for all vehicles type.
- Attachments
-
- same_orders_r6134.diff
- (28.13 KiB) Downloaded 360 times
poor timing. I just finished editing your patch to handle all vehicle types and some other stuff as well.nycom wrote:I rewrote the patch.
Now, it woks for all vehicles. I make a function for all vehicles type.
It's actually interesting to see your patch since it does nearly the same as mine, but now the code is totally different.
list of changes:
- the two buttons are disabled (waiting for new functions like sending all vehicles in the list to a depot)
- windows are now numbered based on order index instead of VehicleID. This allows only one window of the same set of orders
- ability to close orders window without closing the list of vehicles with shared orders
- reused a lot of existing code, making it easier to maintain and the diff smaller (and in theory, the resulting binary will be smaller as well)
- removed the profit part of the patch. It's a nice feature, but it's a different feature and it deserves a patch of it's own
- Rewrote strings to avoid an issue where plural was set incorrectly (did you test your patch? It will set plural after unitnumber instead of number of vehicles in the shared list)
- whatever I forgot to write because it's late

btw I didn't test my diff much. Feel free to do so

- Attachments
-
- shared_orders_bjarni.diff
- My version of the patch based on nycom's patch
- (22.25 KiB) Downloaded 333 times
- mexicoshanty
- Traffic Manager
- Posts: 158
- Joined: 22 Aug 2006 13:15
- Location: Australia
- Contact:
ok, I committed version of the patch, but it ended up a lot different from the diff I uploaded here. I solved some issues in it and made the code look a lot nicer. I also changed the GUI as I got complains that it had become too long. I added the vehicle icons from the station windows (one in each window).
I'm not sure how many unchanged lines there are compared to the diff I got from nycom, but it's not many.
I'm not sure how many unchanged lines there are compared to the diff I got from nycom, but it's not many.
Hello,
There is two little bug in your patch if we choose to list all trains on a station.
- First, the caption is false, it shows "Shared orders of XXX vehicles" instead of "Station Name - XXX trains".
- Also, the "replace vehicles" and "new vehicles" are disabled.
These bugs are caused by the line code in the functions PlayerXXXWndProc
if the test (w->window_number & SHARE_FLAG) is false => station != INVALID_STATION and order != INVALID_ORDER
The fix resolves these problems.
There is two little bug in your patch if we choose to list all trains on a station.
- First, the caption is false, it shows "Shared orders of XXX vehicles" instead of "Station Name - XXX trains".
- Also, the "replace vehicles" and "new vehicles" are disabled.
These bugs are caused by the line code in the functions PlayerXXXWndProc
Code: Select all
OrderID order = GB(w->window_number, 16, 16);
StationID station = (w->window_number & SHARE_FLAG) ? INVALID_STATION : order;
if the test (w->window_number & SHARE_FLAG) is false => station != INVALID_STATION and order != INVALID_ORDER
The fix resolves these problems.
- Attachments
-
- same_orders_fix_r6179.diff
- (3.64 KiB) Downloaded 321 times
Who is online
Users browsing this forum: No registered users and 14 guests