After so much waiting I made a patch for this. There are bugs and possible crashes at the moment, but it's doing something. I'll make a separate thread after I'll think it's good enough. Also any ideas for patch name?
RTS: Realistic Train Shunting?https://github.com/Palo123/OpenTTD-YPS/tree/Decouple
Nice! I tried it, and managed to decouple a train, sent the engine to the depot, and was not able to recouple it afterwards. Could you explain how your patch is used? A "decouple/recouple for dummies" would be helpful...
Here are conditions that should be met for succesful coupling/decoupling:
1. Decoupling and coupling works only in station due to complicated corner cases.
2. To decouple train: Train needs order with station, which is set to Decouple, it's another option for station, like FULL_LOAD
3. To couple train:
3.1 You need wagons at the station with active order WAIT_FOR_COUPLE.
3.2 Then you need Locomotive with Order GO_TO_COUPLE (6th option in GO_TO dropdown selection).
3.3 You need to use Path based signals.
3.4 Train with active GO_TO_COUPLE can pass only 1 Path based signal in it's direction.
3.5 Train with active GO_TO_COUPLE looks for first train with active WAIT_FOR_COUPLE order.
4.1 At the moment, only single simple Locomotive can decouple from/couple to wagons (Without articulated parts or dualheads).
4.2 Train length can't exceed lenth of station platform. 4.3 Train length shouldn't be too much shorter than station platform due to bug with implicit orders (fix in progress)
Steps by step guide:
1. Build a nice station "A" with rairoads around, don't forget to use PBS.
2. Build a spot "B" with waypoint next to station, where Locomotive can wait.
3. Make sure, there is one Path signal pointing from "B" to "A"
4. Create Orders: 1: station "A" with decouple option, 2: waypoint "B" 3: Go To Couple Train, 4: ???, 5: ProfitUpdate 1: for some reason it always crash with allowed 90° turns, I highly recommend forbidding 90° turns before the issue is fixed
Update 2: should be fine now
Example in the picture
decouple.png [ 174.99 KiB | Viewed 728 times ]