A question on AI coupling and uncoupling


Active member
Train one comes in from the portal and stops at a track mark. Locomotive uncouples from the first car. The locomotive pulls away to park at a different track mark. A second locomotive backs up to the train at the trackmark. Since the train came from a portal the card a couple to isn't listed, will "Couple at Trackmark" work? I know I can use the "uncouplez from" command, for the locomotive to pull off with two cars and head to its destination. I'm unsure how to get the second locomotive to the front of the consist. Any help would be appreciated.
What version of Trainz are you using?

"Couple at Trackmark" should work as the consist was stopped at the trackmark before its loco was uncoupled. The best way to find out is to try it and see.

I don't know why a consist coming from a portal should be missing a driver command (if that is what you mean by "the card a couple to") if that command is in the allowed list - check the Driver Command Rule in the Session Rule Editor to see that it has been ticked. But then it has been years since I used portals.
If you notice when you use an active asset such as a loco or wagon it assumes the next available highest number of that asset in its name as it is used. Hence if you have quantity 5 'Pink Coal Wagon' in use, the next you use will be called 'Pink Coal Wagon 6', 'Pink Coal Wagon 7' and so forth. When assets leave a portal they by default in a similar way take the next available number. Therefore to overcome your problem you first need to know or predict the the wagon number of the next wagon to leave the portal and you wish to couple to. Place a similar wagon on any track and rename it to that number. Complete your session programming, then remove the wagon again freeing up the number to be used by the portal.

However if you are creating a repeat scenario it get a little more tricky because the portal uses the next highest number, not the next free number. Hence if you have 20 of a wagon in use the next from the portal will be 21, and should wagons numbered 4-8 get removed it will still be 21. But should 17-20 be removed the next will be 17.

Thanks, I solved the problem by creating the consist to come out of the portal to have the car I want directly behind the locomotive. Now the locomotive uncouples, and the new locomotive connects and takes off with just the one car.

Try "CDE Decouple DLX" by author "Christopher824" Kuid2:647907:100949:2

You only need to know the position in the train for the vehicle that you want to uncouple. Remember numbering starts at 0.


I've a session in my TANE/SP4 Sydney Metro route where the standard 'couple' & 'Uncouple' commands works as desired.
1. A shunter separately collects an auto carrier wagon then two 8 car indian pacific sets at Everleigh yard delivering them to Central platforms - (Car loading dock, and platforms 1 & 2). Each 8 car IP set has to be uncoupled, coupled at the other end and shunted to the correct part of the central platform.
2. Once step 1 is complete a trigger initiates activity at Flemington yard where 3 IP locos are waiting.
3. IP Loco 1 coulples with loco 2 then loco 3 then proceeds via the main up line to Central just near the Mortuary station.
4. IP Loco set couples with the auto carrier wagon, then IP carriage set 1 then set 2, then waits for a scheduled time to depart west.
This sequence of commands takes about 1 hour and runs alongside several other command schedules. Each basic step is covered by schedules from the Schedule library and includes several 'drive to trackmark' and 'drive via trackmark' commands to control activity and routing.
It took a few days to set up and several hours to debug but it works so all I can say is persist and don't let the game win.

good luck with your efforts.