Dynamic train composition? (Decoupling/Shunting/etc..)

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
pekelnik
Engineer
Engineer
Posts: 14
Joined: 28 Feb 2008 08:21
Location: Zurich, Switzerland

Dynamic train composition? (Decoupling/Shunting/etc..)

Post by pekelnik » 17 Jun 2009 10:28

I suppose some discussion happened about this. How hard would it be to introduce it in-game? Is there any way how to do a hot-fix (such as using a invisible loco and then swapping it with the real one)?

Eddi
Tycoon
Tycoon
Posts: 7414
Joined: 17 Jan 2007 00:14

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by Eddi » 18 Jun 2009 01:07

this is a very hard project.

any kind of decoupling currently can only be done in a depot, this would have to be made more flexible (by either extending depots to something station-like, or allowing decoupling at stations. then, the collision detection must be fixed, so a shunting engine meeting up with a train does not crash.

also, a system of giving orders about shunting operations (which might be very complex) has to be introduced, and a graphical interface must be designed.
You might not exactly be interested in Ferion, but if you are, have fun :)

pekelnik
Engineer
Engineer
Posts: 14
Joined: 28 Feb 2008 08:21
Location: Zurich, Switzerland

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by pekelnik » 18 Jun 2009 08:53

So a lot of work needed, but not technically impossible due to some design constraints? I am going to check the documentation to see how hard it would be. I can possibly give this to a student as a project, as it might be nice and interesting to use openTTD as a shunting-yard simulation for instance.

davepoth
Engineer
Engineer
Posts: 120
Joined: 09 Sep 2008 19:48

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by davepoth » 19 Jun 2009 21:00

Nothing impossible I think, although it'll be a lot of work to change the way that the system works. You'd need to figure out a way of making sure there were enough carriages in the depot, or at least a way of handling it when there isn't, and then an extra custom order based on "go to depot", and then a new window to set the new consist, and then an efficient way of storing that info as an order.

The next bit, the actual shunting yard, would be a lot harder as there's nothing that OTTD does that's close to the behaviour you are looking for. It would be mighty cool though.

User avatar
SirXavius
Transport Coordinator
Transport Coordinator
Posts: 302
Joined: 28 Jun 2006 18:25
Location: Florida

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by SirXavius » 20 Jun 2009 01:48

I'm not sure if i'm understanding right what the request is (but i AM sure i'll be slapped down if i'm not! :D ), but if the issue is about trading cars in and out as you would in a depot, i thought about this workaround (still needs HC changes)....

In the depot window, each line of cars is numbered (up to, say, 255), so that when a train enters, it is placed into "Line x" (perhaps at the top as it is now). Cars can be built and moved to any of the numbered lines. When the user wishes to trade cars, there could be an order to "Send cars y - z to line x" or "Pickup all cars from line x". This seems to be the most straightforward way of directly manipulating what cars a train retrieves or decouples.

How involved would that be to accomplishing the goal? What possible problems could arise?

Eddi
Tycoon
Tycoon
Posts: 7414
Joined: 17 Jan 2007 00:14

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by Eddi » 20 Jun 2009 06:01

i do not think dealing with absolute numbers is the right approach for a generic and flexible order system.

i was more thinking in the lines of:
front engine: take [between <m> and] <n> [full|empty] wagons [of <cargo>] that go to <destination>
other engines, wagons: attach to a consist going to <destination>
You might not exactly be interested in Ferion, but if you are, have fun :)

User avatar
Leanden
Tycoon
Tycoon
Posts: 2621
Joined: 19 Mar 2009 19:25
Location: Kent

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by Leanden » 24 Jun 2009 12:56

I think some sort of shunting decoupling system would be immense, especially if wagons could sit independantly from locomotives. (But a new system would have to be integrated into the game to allow each carriage to have an individual ID so that they can sit independantly.
Image

Yexo
Tycoon
Tycoon
Posts: 3653
Joined: 20 Dec 2007 12:49

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by Yexo » 24 Jun 2009 13:00

Leanden wrote:I think some sort of shunting decoupling system would be immense, especially if wagons could sit independantly from locomotives. (But a new system would have to be integrated into the game to allow each carriage to have an individual ID so that they can sit independantly.
Just for our information, every carriage has an unique ID.

User avatar
Leanden
Tycoon
Tycoon
Posts: 2621
Joined: 19 Mar 2009 19:25
Location: Kent

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by Leanden » 24 Jun 2009 13:05

A process by which a carriage can be identified by the user ingame using a GUI while the carriage is not attached to a locomotive.
Image

User avatar
Expresso
Tycoon
Tycoon
Posts: 1736
Joined: 09 Aug 2004 00:14
Location: Gouda, the Netherlands

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by Expresso » 24 Jun 2009 15:56

A process by which a carriage can be identified by the user ingame using a GUI while the carriage is not attached to a locomotive.
Maybe an additional tab for the vehicle window; carriages waiting in depot... maybe accessed by double-clicking on the depot button? It could list parts of the train waiting in a depot and at which order number they will be switched/attached.

Currently vehicles disappear from the map when they enter a depot and a depot has its own built in signal for entry and exit. A depot can essentially contain infinite vehicles.

So, in order to get a depot which looks and works like a shunting yard, you'd effectively need to give the depot behavior like normal tracks and stop vehicles from disappearing from the map. That'll give you the shunting yard you'd want (at least in part). Vehicles bought and sold should appear in the shunting yard, as well as the depot window.

Maybe different signals could be used inside the depot to tell the trains where it is safe to stop and where not? Another useful tidbit of those signals could be to tell the game which tiles are the actual depot slots.

But... errr... such a change would require a complete rewrite of how depots work for trains... and this is lots of work.

User avatar
ashchetum
Engineer
Engineer
Posts: 108
Joined: 09 Mar 2008 20:35
Location: Smack dab in the middle of USA

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by ashchetum » 25 Jun 2009 03:53

One way to go about this (in my opinion) is to make a list of stock, then give orders to engines to "pick up car 'x' and then pick up car 'y' and take them to 'z' ". I have the feling that would take a lot of re-codeing (which i couldn't do because I code in python and have no idea what openttd is writen in) that would cause some problems in the overall program. That would also cause problems for avid ottd gamers who are used to the traditional way.
Image
Image
Image
Image
Image
Props to the devs of OpenTTD, you guys make magic!

User avatar
Leanden
Tycoon
Tycoon
Posts: 2621
Joined: 19 Mar 2009 19:25
Location: Kent

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by Leanden » 25 Jun 2009 15:02

I expect it would be an entirely optional function, as such an update would completely remake the game!
Image

User avatar
ashchetum
Engineer
Engineer
Posts: 108
Joined: 09 Mar 2008 20:35
Location: Smack dab in the middle of USA

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by ashchetum » 25 Jun 2009 23:54

A remake wouldn't be so bad would it? You could leave the orginal tracking system still there, just add the other feature and a "switch" in the options menu so you could have both in one game, and leave multilayer compatibility there.
Image
Image
Image
Image
Image
Props to the devs of OpenTTD, you guys make magic!

User avatar
Benny
Tycoon
Tycoon
Posts: 2185
Joined: 25 Aug 2007 17:03
Location: ~/

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by Benny » 26 Jun 2009 00:03

ashchetum wrote:A remake wouldn't be so bad would it
Yes it would. Especially if you don't REALLY wan the feature yourself, just ask Belugas.
Image

User avatar
ashchetum
Engineer
Engineer
Posts: 108
Joined: 09 Mar 2008 20:35
Location: Smack dab in the middle of USA

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by ashchetum » 26 Jun 2009 01:12

Hmm. I shouldn't of said "remake" I should of said "It wouldn't be bad to add a new function would it?". Excuse my ability to confuse.
Image
Image
Image
Image
Image
Props to the devs of OpenTTD, you guys make magic!

User avatar
Benny
Tycoon
Tycoon
Posts: 2185
Joined: 25 Aug 2007 17:03
Location: ~/

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by Benny » 26 Jun 2009 07:31

As Expresso wrote:

Expresso wrote:But... errr... such a change would require a complete rewrite of how depots work for trains... and this is lots of work.
Image

User avatar
Leanden
Tycoon
Tycoon
Posts: 2621
Joined: 19 Mar 2009 19:25
Location: Kent

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by Leanden » 26 Jun 2009 08:58

would that really be such a bad thing, the depots are awfully designed!!! This way we could have multitile depots and depots in stations as well.
Image

sean16
Engineer
Engineer
Posts: 61
Joined: 07 Feb 2009 21:05

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by sean16 » 26 Jun 2009 22:20

I love this idea, although I recognise the work that will have to be put in to make it a reality.

I think that what will have to happen is that trains will have to be bought on special 'depot' tiles, in stations, or even just in stations. The train will then slide out of this tile like a depot (Maybe with an animation of cars being lifted onto the track via a crane), and into the platform/out of the station. Then as part of the orders system, the train should be able to drop a number of cars to be picked up. However, for this to work properly, there will have to be a way of picking the cars back up, without blocking the 'drop off'.

I can see this working by having the depot's in the station have a button to link the pick up with a waiting bay, so this will be automatically configured in the order.

Also, to prevent the train going in too early, there will have to be a wait for min cars and a max cars to pick up part of the order. This will prevent a train taking, say 20 cars, making the length ~10 tiles (depending on the cars) when the train can only run on a 5 tile line. This should be measured in tiles to keep it simple.
Attachments
Hawthorn & Co., 25th Feb 1980.png
Example shunting yard/station for shunting orders
(70.57 KiB) Downloaded 154 times
formerly known as seandasheep

User avatar
Benny
Tycoon
Tycoon
Posts: 2185
Joined: 25 Aug 2007 17:03
Location: ~/

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by Benny » 26 Jun 2009 22:40

Uh, well, EMUs and DMUs are very rarely decoupled. :|
Image

sean16
Engineer
Engineer
Posts: 61
Joined: 07 Feb 2009 21:05

Re: Dynamic train composition? (Decoupling/Shunting/etc..)

Post by sean16 » 26 Jun 2009 22:46

welll, yh. Um, sorry about that, but I picked the first cargo type that came to my head, just imagine that they are coal trucks...
formerly known as seandasheep

Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 4 guests