View Full Version : Working The Turntable Tutorial

November 16th, 2006, 06:37 PM
A forum member asked me the other day to explain how to program AI drivers to operate turntables, so I thought I would post a short illustrated tutorial:

First...download and install atilabarut's InputTable rule <kuid:131986:1012> and MoveTurntable script <kuid:131986:180156:1>. This is for TRS2006. The InputTable rule is the same as the WorkTable rule for TRS2004, however the MoveTurntable command is TRS2006 specific (see post below).


Willie is in the Dante yard on the Clinch when he receives orders to couple to an empty coal hopper consist and take it north to Moss Mine to be loaded. His problem is that his K5b steamer is facing south and low on coal and water. There are other ways to turn around...but let's have him use the turntable.

In Surveyor, place trackmarks at each of the ends of the turntable as shown below. I've named mine Dante Turntable 1 and Dante Turntable 2.


Then add the InputTable rule to the session and edit it.



I've entered the line as shown above. It shows the type of input, the name of the turntable, and the number of stops the turntable has...seperated by commas and no spaces. To find the number of stops on your turntable find the turntable kuid in CMP, select it, and click on Edit in Explorer. Open the config.txt file and look for a line that looks something like this:

angle 0,10,20,30,35,40,50,60,180,190,200,210,215,220,230 ,240

This lists all of the angles at which the turntable can stop. This one has 16 stops. They will be numbered from 0 (0 degrees, default position) to 15 (240 degrees in this case) in the MoveTurntable driver command. Notice that stop 8 corresponds to a 180 degree rotation.

Working The Turntable Part II to follow...


November 16th, 2006, 06:46 PM
Now let's give Willy some driver commands.

First...Drive to Dante Turntable 1.


Then...Wait For 30 Seconds. I find this pause prevents error messages from appearing and makes things run smoothly. I also think it is a reasonable thing to do.


Next...after enabling the MoveTurntable driver command...MoveTurntable to stop 8.


Then...have Willie drive to the refueling station and load.



Working The Turntable Part III to follow...


November 16th, 2006, 06:53 PM
Now...let's tell Willie to couple to those empties and drive to Moss Mine.



Let's do a QuickDrive and see how Willie does...

Heading For Dante Turntable



Arriving At The Turntable


Working The Turntable Part IV to follow...


November 16th, 2006, 07:04 PM
Working The Turntable



Going For Coal and Water



On To Moss Mine


Good Job Willie!

Happy Railz!

November 16th, 2006, 07:52 PM
Zorronov, I already have the WorkTable for TRS2004, but would you, or anyone else know how to use to turn a turntable, please?

November 16th, 2006, 09:51 PM
Zorronov, I already have the WorkTable for TRS2004, but would you, or anyone else know how to use to turn a turntable, please?

I'm sorry Red_Rattler but it seems that the MoveTurntable driver command only works in TRS2006. Maybe someone else knows how to do this in TRS2004.


November 20th, 2006, 02:55 AM
Red_rattler is right I'm afraid it asked the same question Before the forum died . it is one of those things that auran goofed on in 2004 in utc you could move the tables by clicking a button in the driver panel but they took it out in trs2004 an made it harder to work the smaller tables.

hope this answers your question?

November 20th, 2006, 06:28 AM
Thanks for tutorial. Most helpful and appreciated.
Any more up your sleeve?:D

November 21st, 2006, 12:34 AM
If you have trouble getting the loco to stop in the middle of the turntable (I did) try experimenting with the placement of your trackmarks. First, its important to have the trackmarks placed on the adjoining tracks with the blunt ends facing the turntable track. The loco will stop when it hits the blunt end of the trackmark. This will make the full length of the turntable available for the AI driver to stop the loco and gives some leeway for inertia. If the loco is hanging off either side, the MoveTurntable command will not work. Nudge the trackmark back and forth until you can consistently get the loco to stop in the middle of the turntable. In the above example, I placed Dante Turntable 1 for driving onto the turntable from the south. Dante Turntable 2 is for locos entering the turntable from the default parking position in the roundhouse. Additional trackmarks can be placed as needed.


November 21st, 2006, 12:32 PM
There is alot of good info in this here thread

November 21st, 2006, 04:34 PM
I've edited the first section of this tutorial to include some corrections and a discussion of how to find the number of turntable stops and where they are located for any turntable. The stops are places where tracks can be attached. Generally, they won't all have tracks connected to them. I hope this clarifies things a bit.

Happy Railz!


November 22nd, 2006, 11:42 PM
One more thing I should add. If you plan on commanding AI drivers to perform more complicated actions, you'll probably need a bigger turntable. With a larger turntable and roundhouse (for example, a 120 foot turntable) you can get the drivers to do things like park in the roundhouse, wait for X time, then move the turntable, drive onto it, move it again, and leave on any available track you choose. It appears that the built-in turntables in Trainz don't have enough room for more complicated automated procedures than simply turning around. I'll show some examples of tricks you can do with the larger turntables in a future post.

Happy Railz!

P.S. You may be able to automate more complicated maneuvers on the small turntables with switchers and smaller locos. I'll give it a try.

November 23rd, 2006, 12:44 AM
Thank You for posting this tutorial zoronov! as we lost all the old tutorials in the forum crash, we need all the ones we can get. Will be sure to bookmark this.:)


November 24th, 2006, 10:42 AM
im still having trouble. when it gets to the trackmark its shy of the turntable itself. after moving it on the turntable it waits then i tell it to move it to position 8 and it does nothing!!!

November 24th, 2006, 11:05 AM
im still having trouble. when it gets to the trackmark its shy of the turntable itself. after moving it on the turntable it waits then i tell it to move it to position 8 and it does nothing!!!
You need to move the trackmarks. I had to move mine off the turntable onto the adjacent tracks in order to get the loco and tender in the above pics completely on the turntable consistently. Also, try rotating the trackmarks. The loco's final proximity to the trackmark depends on inertia. A loco that is moving at 20 mph will end up closer to it than one moving at 2 mph, hence maneuver's originating in the roundhouse will need a larger turntable to be successful. If any part of the loco is hanging off, either the MoveTurntable command won't work at all, or if it does, you'll witness a rather interesting derailment. Hope this helps.


December 11th, 2006, 03:23 AM
It helped me a lot by setting the speed limit to 10km/h on the approach to the turntable, then waiting for 5 seconds after the drive to trackmark but before the move turntable commands.

I have problems with the game freezing while the turntable is in motion after i have lots of engines in the roundhouse, I've found that if i move the camera away and look at the ground it works ok, but if i try and watch an engine on the turntable with 5 in the roundhouse it will take up to 30 mins to move 4 positions.

Also i've noticed a section of track either side of the turntable dissappears while the turntable is in motion, not sure what the go is there.

December 11th, 2006, 10:58 PM
Great work Zorronov!!
Thank you!!!!


December 11th, 2006, 11:58 PM
Zorronov, I've only been with Trainz for a few years, the answer to the question ask. about Turntables was the best I ever read. I know it took some time to do it. GREAT WORK.

December 12th, 2006, 12:39 AM
Really great work. Only wish that it worked in TRS04. You should be commended for such an excellent tutorial.

December 21st, 2006, 01:02 AM
I've just received an email question from a fellow Trainzer asking about the "Dante Yard Refueling Station" in the tutorial. I neglected to mention that I added that asset to my copy of the Clinch. I used LLJ's "TPR Engine track 20 m" <kuid2:30671:27233:1>, inserting it into the track in front of the refueling platform in the screenshot. Hope this helps.

Thanks to OLDNUM9 for pointing out that oversight on my part...and thanks to everyone for the kind comments. :)


December 21st, 2006, 05:03 AM
Many thanks

February 18th, 2007, 07:04 AM
Old thread but thought I'd say thanks for your time Zorronov, I tend to use Andi06's scripted turntable where possible but this tutorial has opened up a whole new world of options :D



February 18th, 2007, 10:55 PM
Thank you very much. As soon as my drivers get their heads out of their you know whats, I'll teach them how to use the turntable.:)

February 18th, 2007, 11:12 PM
i still im fiddiling with it i just cant get the trackmarks in the right place.

February 19th, 2007, 11:16 AM
Thanks everyone! You may also want to check out locoone's follow-up tutorial on "Turning the Big Boy". If you can do that you can get the A.I. to turn anything! :D It can be found here:




August 12th, 2011, 06:20 AM
Has anyone worked out how das this work in Trainz 12 because i need to use the move turntable?:) please as i am trying to use the move turntable

its best for me to have this as a video tutorial so i can see how is done the screenshots provided is not enough i am trying very hard i do have input table as well
thanks Matthew