[FS#5299][Patch] Cargo type orders

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

Post Reply
User avatar
sbr
Engineer
Engineer
Posts: 13
Joined: 13 Apr 2008 18:35

[FS#5299][Patch] Cargo type orders

Post by sbr »

This patch defines a new kind of load/unload option in OrdersWindow: Load/Unload by cargo type.
When selected a new window is open and allow to choose which load/unload option to use per cargo type.
For loading orders, available options are 'Load if available', 'Full load' and 'No loading'.
For unloading orders, available options are 'Unload if available', 'Unload all', 'Transfer' and 'No unloading'.
Attachments
CargoTypeOrdersWindow to edit a loading order; new entry in the unload dropdown.
CargoTypeOrdersWindow to edit a loading order; new entry in the unload dropdown.
cto_screenshot.png (99.89 KiB) Viewed 9429 times
cto_r24526.diff
Big svn diff against r24526.
(50.08 KiB) Downloaded 316 times
cto_r24526.patch.zip
HG patch queue against r24526/7faa124a192f, apply with -p1.
(20.21 KiB) Downloaded 269 times
User avatar
roadrunner
Engineer
Engineer
Posts: 20
Joined: 20 Sep 2012 20:54
Location: Arkansas USA

Re: [FS#5299][Patch] Cargo type orders

Post by roadrunner »

Hello,

This is my first post here. I've been lurking and reading for awhile, and have learned a lot from the things you guys have written.

Thank you for making this patch. I would like to see this as a standard feature of openttd. This feature is necessary with the game that I am playing now. I have a food processing plant located in a small town that is used to supply food to the local towns by road vehicle, as well as some farther away towns via train. For the remote towns, I send several mixed trains, containing food wagons, and a few passenger and mail wagons. I also send a whole trainload of food to the same station, and use transfer and leave empty orders, so that road vehicles can deliver the food to neighboring towns. This patch/feature prevents the mixed trains from unloading, and then picking up the food dropped off by the train with the transfer orders, and prevents me from having to use a separate train for only a few passengers.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: [FS#5299][Patch] Cargo type orders

Post by Alberth »

It's indeed an interesting direction, but the order system is becoming fragmented. I mean, you have the order window, with order lines.
So far so good. Then you can set the place at the platform in the line itself. You can have all sorts of options from the buttons below, where for conditional orders you get a set of completely new options. There are more options possible there, but the room is so limited.
Now we have a second window added...

It is starting to look like a Christmas tree to me.


I am wondering whether it could be more unified in some way.
(I realize all previous things were not made by you, but with dramatic extensions like this, it may be useful to do a step back and re-think things.)
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [FS#5299][Patch] Cargo type orders

Post by planetmaker »

I wonder whether orders could be made in a somewhat more tabular manner with possibly table entries like
Travel Place Unloading Service Loading Destination
where
Travel = Goto / Goto Non-Stop
Place = near end / middle / far end
Unloading = no unloading / unload all / unload special (as suggested here)
Service = service / service if needed / autorefit / refit / ...(?)
Loading = load if available / full load any / full load all / no loading / load special (as suggested here)
Destination = destination

It would also allow to modify orders in a quicker manner in that you would not first have to select the order but could click directly to change. The different options in the entries could (except destination) be drop-downs or just cycle through by clicking on them
User avatar
sbr
Engineer
Engineer
Posts: 13
Joined: 13 Apr 2008 18:35

Re: [FS#5299][Patch] Cargo type orders

Post by sbr »

  • Bump patches to r24555.
  • Fix: new patch 'cto_13add-assign-order-cargo-type-orders-support_r24555.patch': copy cargo type flags in Order::AssignOrder().
Attachments
cto_r24555.diff
svn diff against r24555.
(50.44 KiB) Downloaded 293 times
cto_r24555.patch.zip
HQ patch queue against r24555/a43deb6abd1f
(68.72 KiB) Downloaded 214 times
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Re: [FS#5299][Patch] Cargo type orders

Post by Hyronymus »

This is a very interesting patch that allows very realistic train movements: you can make 1 train act as a feeder on the first half of a route after which it continues with the remaining cargo as a normal train.

And I agree with Alberth that a more unified order window will help. Is that something to discuss sepereately though?
User avatar
sbr
Engineer
Engineer
Posts: 13
Joined: 13 Apr 2008 18:35

Re: [FS#5299][Patch] Cargo type orders

Post by sbr »

Thank you for your interest in this patch.

I wrote this patch to be able to run mixed trains in a small infrastructure. Multiple trains can share the same station and load or unload cargoes in different manner.
For example, you can run a Pax/Mail train that will unload/load passengers at each station while collecting mail all along its travel and only deliver it at the end station.

The GUI part of this patch is voluntary simple and try to interfere the less with the orders window (you need to open the cargo type orders window to know which cargo will be loaded/unloaded or not).

I also agree that OrdersWindow is becoming less and less clear. Timetable data are on another window; load/unload options, platform stop position and auto-refit generate very long strings.
I attached some mockups presenting my view of the next orders window; we could discuss about them (and other's proposal/ideas) on a new topic.
Attachments
next-orders-window.png
(42.42 KiB) Downloaded 8 times
next-orders-window_legended.png
next-orders-window_legended.png (41.13 KiB) Viewed 1593 times
next-orders-window-timetable_legended.png
next-orders-window-timetable_legended.png (33.3 KiB) Viewed 1593 times
User avatar
Core Xii
Traffic Manager
Traffic Manager
Posts: 228
Joined: 08 Apr 2008 09:47
Location: Finland

Re: [FS#5299][Patch] Cargo type orders

Post by Core Xii »

That's the most exciting development since signals on tunnels and bridges! Fantastic job, there!
Tester5
Engineer
Engineer
Posts: 3
Joined: 17 Jun 2015 20:12

Re: [FS#5299][Patch] Cargo type orders

Post by Tester5 »

This feature (separate type of cargo loading/unloading) is a very urgently needed feature in OpenTTD.
Without this feature you cannot create long and realistic chains of transportation and trains.
In real life most cargo trains have vagons of different type!
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 37 guests