Page 2 of 11

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

Posted: 26 Jun 2009 22:52
by Benny
We got the point, but I am obessed with nitpicking.. :P

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

Posted: 28 Jun 2009 01:53
by audigex
I love the idea - so often I want the option to run 10car trains between A and B, then split it into two to go to C and D.

I can imagine it's a fairly large system to put in place, but here's some "I hope you get this made, it sounds fantastic" to anyone who's thinking of taking it up.

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

Posted: 28 Jun 2009 07:27
by rail_insane
because more people play in the us, how about swich yards for shunting, like a small stations, and a big main yard for building the trains, have a big workshop or something- cheaper trains if you supplie with stuff(a bit like an old idea of mine)- then you could have a fueling plant in the yard too and stuf of that type?

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

Posted: 03 Jul 2009 16:31
by sean16
I think to get this started, decoupling and recoupling in depots should be made possible via an order, instead of it being manual. 2 new orders in the drop down list for service is whre I think would be the best place for it to go.

Also, ths way waiting for cars won't be an issue as the train could just go into the depot.

For the gui it could look like:

service v
service if needed
always go
decouple
couple
stop

Then a box, like the refit box could pop up that the user types the number of cars that are to be dropped off/picked up. Also, a button for all should be in this box too.



so something like:

Decouple []
Couple []
All []
(enter number here) []

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

Posted: 04 Jul 2009 07:41
by Leanden
The number thing would be far too vague, simply because some trains dont simply carry just one cargo. Imagine a UKRS Steam Train. (Decouple 3 Wagons) You've just dumped off the brake van where you should have been removing passenger carriages.
And what if you want to couple something different to what the train is already carrying. I think a GUI is definately required for this sort of thing.

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

Posted: 04 Jul 2009 13:14
by sean16
I did say to get this started. It will only be a very basic starting point. Also I can imagine problems with double ended locos like the asiastar. Maybe only count it as removed if it is a succesful removal of the car.

I don't know what cold stop the brake vans coming off the end and being picked up by a different train.
Maybe an option to keep a brake van attached to an engine. So once an engine is assigned one, it can't be emoved. Obviously an optional extra.

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

Posted: 06 Jul 2009 19:53
by ostlandr
Wow! There are some really good ideas on this thread!

One feature mentioned here would be a special order telling a vehicle (outside of its regular schedule) to go to "X" tile. For trains, that would have to be a valid piece of track or a depot. The current behavior of "go to depot" is pretty random, and the pathfinder may send the train someplace you don't want it to go. :x That would be very useful for things like sorting out traffic jams- not that I ever have to do that. . . :roll: It would also allow for moving locomotives and cars from one depot to another.
I also like the idea of having each "row" in a depot numbered. This would work with the "special order" button, or even the regular orders.
The default behavior would have the train "go to" the first empty row in a depot. The train could also be ordered to "go to" the depot and "couple to" a row number. In that case, the train will drop its current consist and then couple to the front of the row of cars on the selected row. If a train occupies that row, the current engine will give up its train number and become part of the new train. (Possibly have this behavior selectable so that it takes over the train number instead?)

Currently, if you remove an engine from a string of cars, they stay there in the depot, so the game is storing that data somewhere. And a "go to "X" order sounds reasonable to me- would like to hear what folks who know more about the order system and pathfinder have to say about that.

Here are the benefits for players I see if this is implemented:

1. Better use of motive power and rolling stock. No more selling cars or locomotives at one depot (at the depreciated price) then buying the same ones new somewhere else.

2. Helper Engines/Banking: Train A runs across the flats, then runs into a depot and couples to line 1, which has a helper engine on it. Then on the other side of the hill it uncouples the helper (still working on how that will work.)

3. Expanded gameplay. Besides just watching trains run, players will now have the option of sending trains of empty cars from where they aren’t needed to where they are, “light engine” moves to send motive power where it is wanted, etc. Just like on real railroads, I can see players gradually buying new locomotives for main lines, and pushing the older ones off on secondary and branch lines, displacing still older equipment.

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

Posted: 09 Jul 2009 23:42
by 2007Alain2007
I think at frist players would want to see this with there trains siting on the rails

But it would be easyer i think to have it as a long depot/station what could use some thing like were we keep lorry in the Industrial Stations Renewal GRF use train cars and railway wagons of all tpyes or any types deponing if it could be prograbed to rember what good are drop at the depot/station

with working out the drop and pick up of wagons we could store them in

all empty coal wagons
all full coal wagons
all emtpy wood wagons
all full wood wagons

and you can say to the loco thats just droped of its empty coal and wood wagons to pick up X amount of coal and wood wagons

This will only work with out cargodest but i have an idea for it to work for that
Insteend of useing empty and full grouping we could try and find out were the wagons are heading and pick up x amont of wagons to there

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

Posted: 17 Sep 2009 14:11
by crakinshot
(small bump).

Hi,

In reply to last post: I think it could work with cargodest, but you'd have to assign a destination to each wagon. i.e a wagon is going from A-B-C. During B, however, it is decoupled, waits, coupled, and then continues to C.

General comment: I like the idea of shunting and coupling, and by implication bigger depo's. Personally, I've been following OpenTTD for a while, and I've been wanting a reason (task) to join in, and this seems to be it. Here are my views. There are two problems here: Shunting and Train Composition; they are different in practice, but can be combined. Personally, once you have Shunting you can do the rest far more easily.

The basics of shunting is that a train needs to transfer from one track to another, like so.
Image

This requires
  • Remove train 'flipping' - current mechanism to change direction
  • Train Reversing - a train at least appears to be reversing
  • Correct Path Finding - given that Yafp might not find a path if it requires stopping and reversing, some work might be needed.
Once you have that mechanism you can go onto the more complex stuff. Specifically, like in reality, if shunting train wants to pass a Danger signal (red) it needs permission from the signal box. Similarly, in OTTD, you'd need an update of the signaling system or at least the train mechanics so that a train could enter into a block already occupied, without the trains crashing. Anther feature which would be nice would be track labelling. So, in the order you'd have "Goto STATION, on PLATFORM 3" OR "Goto STATION, on any pratform" OR "Goto STATION, use platforms 3-to-5". You'd then derive that so you'd have "Goto TARGET, use TRACK CONDITION"... so then you can apply it to stations or depo yards. The general idea here being, rather than break the track mechanics you'd simply use the already (high customisable) station mechanic for the 'shunting Yards'.

Dynamic train composition is very different. You could essentially add the feature in pretty quick if everything happens in the existing depos. The main difficulty is the wagon labelling and making it easy to use. Also, I can imagine how it could go very wrong if designed incorrectly. For instance, do you explicitly reference the wagons, or do you go with a more implicit method. For instance, you can have a train leave 4 coal wagons at a Station/depo and then have another train pickup ANY/AMOUNT coal wagons from said station and take them to a destination. This way you're not breaking the CargoDest mechanic, just expanding upon it. Rather than the cargo being left at a station/depo you've left the wagons. Almost exactly the same thing, especially if its all done in a depo. Of course, it would get complicated if you actually had a huge shunting yard, where the wagons are real. BUT, given what I've already mentioned about the shunting yards being stations, once the wagons have stopped and have been decoupled, they are 'in the station' as cargo ready to be taken to a destination.

Not a good solution, but one that probably would make it easier (for the user) to have several trains transfer wagons to a destination.

Well just some thoughts. I'll definiatly have a go at getting the OpenTTD code compiling and play around to see how it all works. Anyone else seriously thinking or working on shunting/decoupling?

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

Posted: 17 Sep 2009 14:29
by railwayman
The best ideas are very simple. Jou need to make an invisible 2 entry depot. :D

Maybe its harder than i imagine. I dont know anything about it.

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

Posted: 17 Sep 2009 14:40
by crakinshot
For shunting? Well the whole idea is that its done visually, so its aesthetically pleasing to watch a train reverse, change track, decouple, etc...

Using 2-entry depo to move a train onto another track seems to defeat the purpose. In reality, shunting would just make the game more difficult, so yeah its more for aesthetics. ;)

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

Posted: 17 Sep 2009 15:25
by Leanden
Obviously for aesthetics, personally this is something id love to see! Having a truly realistic train network but be the best thing for me to see on the game.

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

Posted: 17 Sep 2009 15:46
by 2007Alain2007
you could base a bit on the More conditonal orders patch to set a path to were you want things

your have to have wargons as cargo what i think Cargo Distribution has added in a bit with saying this cargo in this wagon has to go from here to here

The only thing i think would need doing is decoupling

But what if bay for coal is full of wagons what happons then?

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

Posted: 17 Sep 2009 15:54
by Leanden
2007Alain2007 wrote:you could base a bit on the More conditonal orders patch to set a path to were you want things

your have to have wargons as cargo what i think Cargo Distribution has added in a bit with saying this cargo in this wagon has to go from here to here

The only thing i think would need doing is decoupling

But what if bay for coal is full of wagons what happons then?
Then the new wagons cant go there obviously, you need to set up your networks so that that doesnt happen. if you dont set it up properly, then you lock up the tracks, just like any other non properly set up track and orders.

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

Posted: 17 Sep 2009 17:01
by crakinshot
Well I'm a C++ programmer and I've wanted an excuse to make something for OTTD, so I'll give it a try. I'm more used to raytracing these days, so I'll have to analyse how this game works first.

I'm more interested in shunting and 'Shunting Yards' so I'll be starting there. Specifically: A) Platforms, B) Shunting (movement only). So with platforms a method to direct trains to specific platforms (either forced platforms or 'preferred' platforms) and a method (probably GUI) to define platforms and what they can be used for. That on its own would be useful as standalone. I'm thinking the platforms themselves would weight the speed by which the cargo could be loaded/unloaded. Thus, you'd have specific mail platforms (as you used to during the BR days). And for example, a mail train on a passenger line would load/unload very slow.

But thereafter (customisable platforms) making depos out of stations and finally updating the path-finding to allow the shunting behaviour to work. It makes sense to make depo yards out of stations, as technically the only difference would be the graphics. Obviously, some work to make stations into depos. ;)

If no one has done any work on train composition by that point I'll give that a try; because it would be a direct extension to the others.

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

Posted: 17 Sep 2009 21:22
by 2007Alain2007
We all hope the best for you

Its been a patch that i have wanted to see done for years

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

Posted: 18 Sep 2009 14:01
by sean16
I remember reading something about a route markers patch that told trains to either take that route or not. This may be able to be used to label tracks, if it could be dragged along a line or shunting yard. Like station placement, but on existing rails and junctions.

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

Posted: 18 Sep 2009 14:21
by 2007Alain2007
I think this should be bronked down in to small tasks and patchs becuse i know all this will end up as one big patch with no change of getting in to trunk

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

Posted: 18 Sep 2009 14:57
by crakinshot
Aye, I was already thinking about that. I've broken it down into two initial patches to work on.

Extended Platforms
Train Platform Orders

The extended platforms would literally just add on the information to the station tile for platform Id, Cargo loading/unloading speed weights. Plus a method (GUI or overlay) to define platforms and what they can be used for, all of which can be initialised automatically so that it doesn't break the original functionality. Should be small enough to allow it in. Then another patch to update the pathfinder's costs based on train cargo and platform cargo weights. Thereafter another patch to direct trains to platforms (in various forms), defaulting to ANY (existing behaviour).

Then derive a ServiceYard from the station functionality, etc, etc...

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

Posted: 18 Sep 2009 17:34
by 2007Alain2007
There is a seting to change what train carrys if u send it to depots could that code be of help


all so heres a picture how it could look in my dream
New Bitmap Image.png
Make depots only have one loco in at a time

The small steam loco pick up a small train load off coal from the mine and drops them of in a depot at the monet it drops in bay 2
uncoupleds and comes out gos to the shunt head and then gos to bay 1 to pick up some empty coal wagons and back to the mine for that train

The biger steam loco will pick up A LOT of full wagons from bay 2 to after droping off more empty wargons in bay 1

and so on

That would proble be part one off the patch to get that

If we want to use mixed trains were have to break them down with a shunting loco the 08 shunter and this will be used as

Pick up all wargons from any bay, sorts wagrons drop full coal argons in bay 2 drop empty wargons in bay 1 and full wood in bay 3 and so on

That proble be part 2

And the last bit i think would proble be to make the depots longer biger and niceer to look at

This is all a dream in my eyes and i hope some one will make it come ture