Working The Turntable Tutorial

Zorronov

Envelope Pusher
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).

Then...

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.

turntable3aff4.jpg


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

turntable1aen3.jpg


turntable19ni7.jpg


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...

Zorronov
 
Last edited:
Working The Turntable Part II

Now let's give Willy some driver commands.

First...Drive to Dante Turntable 1.

turntable4amf0.jpg


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.

turntable5awo3.jpg


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

turntable6ach3.jpg


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

turntable7azf0.jpg


turntable8awb0.jpg


Working The Turntable Part III to follow...

Zorronov
 
Last edited:
Working The Turntable III

Now...let's tell Willie to couple to those empties and drive to Moss Mine.

turntable9ail6.jpg


turntable10acz7.jpg


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

Heading For Dante Turntable

turntable11aig1.jpg


turntable12ave3.jpg


Arriving At The Turntable

turntable13aus8.jpg


Working The Turntable Part IV to follow...

Zorronov
 
Last edited:
Working The Turntable Part IV

Working The Turntable

turntable14aop2.jpg


turntable15aau2.jpg


Going For Coal and Water

turntable16avs8.jpg


turntable17akb1.jpg


On To Moss Mine

turntable18aqd8.jpg


Good Job Willie!

Happy Railz!
Zorronov
 
Zorronov, I already have the WorkTable for TRS2004, but would you, or anyone else know how to use to turn a turntable, please?
 
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.

Zorronov
 
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?
 
Placement Of Trackmarks

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.

Zorronov
 
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!

Zorronov
 
Turntable Size and Advanced Turntable Tricks

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!
Zorronov

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.
 
Last edited:
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.:)

thanks,
john
 
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!!!
 
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.

Z
 
Last edited:
Stopping Position

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.
 
Working the turntable tutorial

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.
Max
 
Really great work. Only wish that it worked in TRS04. You should be commended for such an excellent tutorial.
 
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. :)

Zorronov
 
Last edited:
Back
Top