Mass orders/grouping interface

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Sleepie
Director
Director
Posts: 534
Joined: 03 Jan 2007 08:46
Location: Germany

Post by Sleepie »

You probably look for this feature to autorenew your old vehicles.
Denke nie gedacht zu haben, denn das Denken der Gedanken ist gedankenloses Denken.
Wiki Page/Talk, Member of the OpenTTD Scenarios Team
Looking for OpenTTD scenarios? - Here's a List of player-made scenarios. Please help us grow the database with your contributions.
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Post by Maedhros »

Ooh, nice work. :)

I noticed one minor bug with group counts and deleting trains though. If you delete an entire train the count seems to get decreased by the number of vehicles in the train - so if you create a group, add an engine with a carriage to it and then delete the train it claims there are 65,535 vehicles in the group rather than 0.
No-one's more important than the earthworm.
Chicago Rail Authority
Traffic Manager
Traffic Manager
Posts: 134
Joined: 09 Nov 2006 23:38

Post by Chicago Rail Authority »

Any possibility of adding the ability of manually ordering the group names? Example - "Move Up" or "Move Down" in the list?

Other than that, fantastic patch!!

EDIT [1]: Also, what about another filter on the right pane (especially when using the All Trains group) that can be set to "Grouped, Ungrouped, or ALL" - so that you can quickly determine which trains are not yet grouped, and build groups from that subset?

EDIT [2]: Is the text-limit hardcoded? It would be nice to have longer group names, if possible.
Many thanks to those who make OTTD and TTDP possible.
T-Unit
Transport Coordinator
Transport Coordinator
Posts: 368
Joined: 03 Feb 2007 18:53
Location: Leeds, England

Post by T-Unit »

Hi
I have had an idea that could fit quite well with this patch:
I find it a long and arduous job to replace one order in many trains. For example when i want to replace a conventional waypoint with a station waypoint (using TTDP non-stop) there isn't a list of trains that visit that station. So i was wondering whether it would be possible to have a replace order feature where you select the order and choose what to replace it in. You could select a group of trains to replace it in and then it would replace it automatically. I think this could fit in quite well with the group trains patch that is being developed.
ThePenguin
Engineer
Engineer
Posts: 40
Joined: 15 May 2007 16:49

Post by ThePenguin »

What about a divert to/pause command? If you are upgrading an airport or station you could have all the vehicles going into that station be paused or diverted to another station.
T-Unit
Transport Coordinator
Transport Coordinator
Posts: 368
Joined: 03 Feb 2007 18:53
Location: Leeds, England

Post by T-Unit »

That would be good. But isnt the divert to thing just like a temporary version of what i suggested. What would the pause feature entail? I don't think stopping all trains that go there whilst on the mainline is a really good idea.
nycom
Engineer
Engineer
Posts: 62
Joined: 14 Nov 2005 13:14
Location: Paris, France

Post by nycom »

Hi all,

Thanks to rubidium for committing my group patch to the trunk.
I have updated the rule patch to rev9957.
Attachments
rule_interface_r9957.diff
(88.63 KiB) Downloaded 249 times
User avatar
osai
Traffic Manager
Traffic Manager
Posts: 132
Joined: 22 Sep 2004 14:56
Location: 10.0.1.254
Contact:

Post by osai »

this is such a cool feature, I am really looking forward to see the rules function in the trunk :)
nycom
Engineer
Engineer
Posts: 62
Joined: 14 Nov 2005 13:14
Location: Paris, France

Post by nycom »

patch updated (rev9958)
- several bugs have been fixed.
Attachments
rule_interface_r9958.diff
(88.93 KiB) Downloaded 302 times
List all vehicles which have an order containing "Tombouctou" and carry only "Maize"
List all vehicles which have an order containing "Tombouctou" and carry only "Maize"
La SNCF, 13th Nov 2008 #6.png (36.18 KiB) Viewed 6425 times
List all vehicles which have an order containing "Tombouctou" and carry "Maize" and "Fruit"
List all vehicles which have an order containing "Tombouctou" and carry "Maize" and "Fruit"
La SNCF, 13th Nov 2008 #5.png (37.14 KiB) Viewed 6433 times
fabca2
Transport Coordinator
Transport Coordinator
Posts: 312
Joined: 14 Apr 2004 15:18
Location: Fr

Post by fabca2 »

nycom wrote:patch updated (rev9958)
- several bugs have been fixed.
Hello, your printscreen are very nice,
but please could you make a printscreen where you open the combobox, to let us see all criteria possibilities :
what I found so far by reading this thread,
you have :
- Reliability
- Age
- Current order - contains/is
- Orders - contains
- cargo type - is only
- Total weight

I don't know other criteria you made for rules, and I'm interrested to know it..

By the way I suggest a new one : "status", that could be
status = loading | unloading | onroad | stopped | broken | servicing

Thank you, I hope this "rule" patch will be on trunk soon.
l_Blue_l
Transport Coordinator
Transport Coordinator
Posts: 285
Joined: 29 Mar 2006 22:42
Contact:

Post by l_Blue_l »

edit: removed code as nycom posted function details


@ nycom. I don't see Percentage Full there what are you doing to me :p.

Also how about vehicle / train engine type.

On another note i think the station windows should open up to the groups window and the first group on the list could be a temporary virtual group of that station. And from these virtual groups the trains can then be moved into real groups.

Also how about virtual group of trains not in a group or virtual group.
As example of what i mean would be this

Train !in any Group
Order contains "Station A"

Or
Train !in "Group C"
Order contains "Station A"

Keep up the good work
Last edited by l_Blue_l on 28 May 2007 01:18, edited 1 time in total.
nycom
Engineer
Engineer
Posts: 62
Joined: 14 Nov 2005 13:14
Location: Paris, France

Post by nycom »

fabca2 wrote:
nycom wrote:patch updated (rev9958)
- several bugs have been fixed.
Hello, your printscreen are very nice,
but please could you make a printscreen where you open the combobox, to let us see all criteria possibilities :
what I found so far by reading this thread,
you have :
- Reliability
- Age
- Current order - contains/is
- Orders - contains
- cargo type - is only
- Total weight

I don't know other criteria you made for rules, and I'm interrested to know it..

By the way I suggest a new one : "status", that could be
status = loading | unloading | onroad | stopped | broken | servicing

Thank you, I hope this "rule" patch will be on trunk soon.
- Max speed (==, !=, >=, <=, <, >),
- Age (==, !=, >=, <=, <, >),
- Reliability (==, !=, >=, <=, <, >),
- Total weight (==, !=, >=, <=, <, >),
- Cargo type (is, isn't, is only)
- Profit this year (==, !=, >=, <=, <, >),
- Profit last year (==, !=, >=, <=, <, >),
- Orders (is, isn't, contains, doesn't contain, begins with, doesn't begin with),
- Current Order (is, isn't, contains, doesn't contain, begins with, doesn't begin with),

Nice suggestion, I will implement this new criteria this week.
l_Blue_l
Transport Coordinator
Transport Coordinator
Posts: 285
Joined: 29 Mar 2006 22:42
Contact:

Post by l_Blue_l »

I think that last order and next order would also be useful to go with current order.


And how about "last service" more then x days ago.
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Post by XeryusTC »

Your rule patch (both r9957 and r9958) fail to compile because:
a) you forgot to add your files to source.list (I fixed that myself)
b) my compiler doesn't know what to do with .lex files (or .y files) and thus can't find IsMatch().

I'm compiling with MinGW using gcc 3.4.2 but my guess is that MSVS also doesn't know how to handle .lex files (not entirely sure here).
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Post by Maedhros »

For .lex files you'll need flex and for .y files you'll need yacc or bison.
No-one's more important than the earthworm.
nycom
Engineer
Engineer
Posts: 62
Joined: 14 Nov 2005 13:14
Location: Paris, France

Post by nycom »

Hello,

Updates & bugs fixes.
I also added new criteria:
- Max speed (==, !=, >=, <=, <, >),
- Age (==, !=, >=, <=, <, >),
- Reliability (==, !=, >=, <=, <, >),
- Total weight (==, !=, >=, <=, <, >),
- Cargo type (is, isn't, is only)
- Profit this year (==, !=, >=, <=, <, >),
- Profit last year (==, !=, >=, <=, <, >),
- Orders (is, isn't, contains, doesn't contain, begins with, doesn't begin with),
- Current Order (is, isn't, contains, doesn't contain, begins with, doesn't begin with),
- Last Order (is, isn't, contains, doesn't contain, begins with, doesn't begin with),
- Next Order (is, isn't, contains, doesn't contain, begins with, doesn't begin with),
- In a depot
- In a group
- Not in a group
- last service (in days) (==, !=, >=, <=, <, >),

You need Yacc/flex to compile the patch.
Attachments
rule_r10256.diff
(87.82 KiB) Downloaded 353 times
rule.png
rule.png (98.12 KiB) Viewed 6226 times
sulai
Traffic Manager
Traffic Manager
Posts: 159
Joined: 24 Sep 2004 18:23

Re: Mass orders/grouping interface

Post by sulai »

Hi nycom!

This is really great work! I very much support your patch!

I did some research on how to combine all group types (lets call them "categories") together, creating some "faked screenshots".

In this way we would have the groups available like they are now in 0.6.0, but also "property based groups" like you have already developed.

Would be nice to hear your opinions.

Edit: This patch was rewritten: http://www.tt-forums.net/viewtopic.php?f=33&t=36648
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests