How to Use Driver Setup Rule

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
m (Adding Driver Commands)
m
Line 83: Line 83:
  
 
==Adding New Drivers==
 
==Adding New Drivers==
<table cellpadding="4" bgcolor=#fcbcbc> <!-- BEGIN Timeout errors -->
+
<table cellpadding="4" bgcolor=#fcbcbc width=1000> <!-- BEGIN Timeout errors -->
 
<tr valign="top">
 
<tr valign="top">
 
<td>[[file:Stop.PNG|link=]]</td>
 
<td>[[file:Stop.PNG|link=]]</td>
Line 93: Line 93:
 
</tr>
 
</tr>
 
</table> <!-- END Dot Point -->
 
</table> <!-- END Dot Point -->
Adding a large number of drivers to the Driver Setup can cause '''Timeout''' errors particularly if certain driver script libraries are being used. Exactly how many is a "large number" will depend on other factors.<br><br>
+
Adding a large number of drivers to the Driver Setup can cause '''Timeout''' errors particularly if certain driver script libraries are being used. Exactly how many is a "large number" will depend on other factors.<br>
 +
 
 
<table cellpadding="4" bgcolor=#ffffb0> <!-- BEGIN Tips -->
 
<table cellpadding="4" bgcolor=#ffffb0> <!-- BEGIN Tips -->
 
<tr valign="top">
 
<tr valign="top">
 
<td>[[file:PencilTips.PNG|link=]]</td>
 
<td>[[file:PencilTips.PNG|link=]]</td>
<td>If '''Driver Setup Timeout''' errors are reported, then split the drivers between two copies of the '''Driver Setup Rule''' and place the second copy as a child of a [[file:WikiLink.PNG|link=]] '''[[Session Rule List with Parameters#Wait Rule|Wait Rule]]''' set for a delay of just a few seconds, as shown on the right.<br><br>
+
<td>If '''Driver Setup Timeout''' errors are reported, then split the drivers between two copies of the '''Driver Setup Rule''' and place the second copy as a child of a [[file:WikiLink.PNG|link=]] '''[[Session Rule List with Parameters#Wait Rule|Wait Rule]]''' set for a delay of just a few seconds, as shown on the right.<br>
This gives '''Trainz''' enough time to process all the drivers in the first '''Driver Setup''' rule before starting on the second '''Driver Setup''' rule.<br><br>
+
 
 +
[[file:DriverSetupWait.png|link=]]<br>
 +
 
 +
This gives '''Trainz''' enough time to process all the drivers in the first '''Driver Setup''' rule before starting on the second '''Driver Setup''' rule.<br>
 +
 
 
Information on how to use Parent and Child rules can be found at [[file:WikiLink.PNG|link=]] '''[[Parent and Child Rules]]'''</td>
 
Information on how to use Parent and Child rules can be found at [[file:WikiLink.PNG|link=]] '''[[Parent and Child Rules]]'''</td>
<td>[[file:DriverSetupWait.png|link=]]</td>
 
 
</tr>
 
</tr>
 
</table> <!-- END Tips -->
 
</table> <!-- END Tips -->
Line 106: Line 110:
 
</tr>
 
</tr>
 
</table> <!-- END Timeout Errors -->
 
</table> <!-- END Timeout Errors -->
<br>
+
 
 
===Remove Existing Drivers First===
 
===Remove Existing Drivers First===
 
After selecting the '''Driver Setup Rule''' and clicking the '''Edit''' button, the Driver Setup Properties Window will be shown. The image below shows the properties window if it is opened with no locomotives placed in the layout.
 
After selecting the '''Driver Setup Rule''' and clicking the '''Edit''' button, the Driver Setup Properties Window will be shown. The image below shows the properties window if it is opened with no locomotives placed in the layout.
Line 361: Line 365:
 
</table>
 
</table>
  
<table>
+
<table width=1000>
 
<tr valign="top">
 
<tr valign="top">
 
<td>[[file:DriverSetupAddRepeat.JPG|link=]]</td>
 
<td>[[file:DriverSetupAddRepeat.JPG|link=]]</td>
Line 391: Line 395:
 
</table>
 
</table>
  
<table>
+
<table width=1000>
 
<tr valign="top">
 
<tr valign="top">
 
<td>[[file:DriverSetupRepeatIcon.JPG|link=]]</td>
 
<td>[[file:DriverSetupRepeatIcon.JPG|link=]]</td>
Line 400: Line 404:
 
<td>The '''Repeat''' icon will '''always''' be placed at the end of the '''Driver Command Bar''' after the '''Add Command''' button
 
<td>The '''Repeat''' icon will '''always''' be placed at the end of the '''Driver Command Bar''' after the '''Add Command''' button
 
</tr>
 
</tr>
</table>
 
<table cellpadding="4" bgcolor=#ffffb0>
 
 
<tr valign="top">
 
<tr valign="top">
<td>[[file:NotePad.PNG|link=]]</td>
+
<td>[[file:DotPoint.JPG|link=]]</td>
 
<td>As each command is executed by the Trainz AI system, it will be deleted from the front of the command list and added to the end of the list to create an "endless loop" of commands.</td>
 
<td>As each command is executed by the Trainz AI system, it will be deleted from the front of the command list and added to the end of the list to create an "endless loop" of commands.</td>
 
</tr>
 
</tr>
Line 411: Line 413:
 
</table>
 
</table>
  
<table>
+
<table width=1000>
 
<tr valign="top">
 
<tr valign="top">
<td>[[file:DriverSetupRemoveRepeat.JPG|link=]]</td>
+
<td width=580>[[file:DriverSetupRemoveRepeat.JPG|link=]]</td>
 
<td>
 
<td>
<table cellpadding="4" bgcolor=#ffffb0>
+
<table bgcolor="black" width=420>
 +
<tr valign="top">
 +
<td>
 +
<table bgcolor=#ffffb0 width=416>
 
<tr valign="top">
 
<tr valign="top">
 
<td>[[file:NotePad.PNG|link=]]</td>
 
<td>[[file:NotePad.PNG|link=]]</td>
Line 421: Line 426:
 
----
 
----
 
*If a '''Repeat''' command is already present, then the ''Add Command'' menu list will show '''Don't Repeat''' as its first option  
 
*If a '''Repeat''' command is already present, then the ''Add Command'' menu list will show '''Don't Repeat''' as its first option  
*Select '''Don't Repeat''' to remove the '''Repeat''' command</td>
+
*Select '''Don't Repeat''' to remove the '''Repeat''' command
 +
</td>
 
</tr>
 
</tr>
</table></td>
+
</table>
 +
</td>
 +
</tr>
 +
</table>
 +
</td>
 
</tr>
 
</tr>
 
</table>
 
</table>
Line 599: Line 609:
 
</table>
 
</table>
 
<br>
 
<br>
<table cellpadding="4" bgcolor=#ffffb0>
+
<table bgcolor="black" cellpadding=2>
 +
<tr valign="top">
 +
<td>
 +
<table bgcolor=#ffffb0 cellpadding=2>
 
<tr valign="top">
 
<tr valign="top">
 
<td>[[file:NotePad.PNG|link=]]</td>
 
<td>[[file:NotePad.PNG|link=]]</td>
Line 605: Line 618:
 
</td>
 
</td>
 
</tr>
 
</tr>
</table>
 
<table cellpadding="4" bgcolor=#ffffb0>
 
 
<tr valign="top">
 
<tr valign="top">
 
<td>[[file:PencilTips.PNG|link=]]</td>
 
<td>[[file:PencilTips.PNG|link=]]</td>
 
<td>
 
<td>
If a command that you want to use does not appear in the list, then check in '''Content Manager''' that it has been installed or downloaded and is free of errors.</td>
+
If a command that you want to use does not appear in the list, then check in '''Content Manager''' that it has been installed or downloaded and is free of errors.
 +
</td>
 
</tr>
 
</tr>
</table></td>
+
</table>
 +
</td>
 +
</tr>
 +
</table>
 +
</td>
 
</tr>
 
</tr>
 
</table>
 
</table>

Revision as of 17:30, 27 February 2022

The information in this Wiki Page applies to TANE, TRS19 and Trainz Plus.

Contents

  Top   Next Down Bottom

Driver Setup Rule

Main Points:
DotPoint.JPG The Driver Setup Rule assigns drivers to consists and issues them with Driver Commands.
DotPoint.JPG Driver Commands are lists of instructions or "orders" that drivers are tasked to complete under the control of the Trainz AI system.


LinkWiki.PNG

A list of available Driver Commands can be found on the Trainz Wiki Page at:-


The WikiLink.PNG Driver Setup Rule is automatically added to the Session Editor of every Session.

EditSessionWindow.JPG

Steps.PNG Steps:
  1. Open the WikiLink.PNG Session Editor by selecting Edit Session from the Surveyor Main Menu in TANE or the Surveyor Edit Menu in TRS19 and Trainz Plus
  2. Select the Driver Setup Rule shown left (it is usually the rule at the top of the list)
  3. Click the Edit button at the bottom of the Session Editor window


Stop.PNG If the Driver Setup Rule is not shown in the list then...
  1. Click the Add button at the bottom of the Session Editor window
  2. Scroll through the list of rules to locate and select the Driver Setup Rule
  3. Click the Tick.PNG icon on the rule list window

LinkWiki.PNG

More information on the Session Editor can be found on the Trainz Wiki Page at:-

Adding New Drivers

Stop.PNG Timeout Problem in T:ANE
DotPoint.JPG This is an issue in T:ANE. It has been FIXED in TRS19 and Trainz Plus

Adding a large number of drivers to the Driver Setup can cause Timeout errors particularly if certain driver script libraries are being used. Exactly how many is a "large number" will depend on other factors.

PencilTips.PNG If Driver Setup Timeout errors are reported, then split the drivers between two copies of the Driver Setup Rule and place the second copy as a child of a WikiLink.PNG Wait Rule set for a delay of just a few seconds, as shown on the right.

DriverSetupWait.png

This gives Trainz enough time to process all the drivers in the first Driver Setup rule before starting on the second Driver Setup rule.

Information on how to use Parent and Child rules can be found at WikiLink.PNG Parent and Child Rules

Remove Existing Drivers First

After selecting the Driver Setup Rule and clicking the Edit button, the Driver Setup Properties Window will be shown. The image below shows the properties window if it is opened with no locomotives placed in the layout.

DriverSetupStartWindow.JPG

DriverSetupRemoveExisting.JPG


Gears.PNG TRS19/Trainz Plus Settings:
  • If Checked CheckBox.PNG All existing drivers will be removed so all trains will become "empty" (no drivers). When used with the Generate new Drivers for empty trains option, it will produce a new list of randomly selected drivers for all trains.
  • If Unchecked CheckBoxOff.PNG All existing drivers will remain with their previously assigned trains.

Bug.png TANE Known Issues:
DriverSetupRemoveExisting.JPG This does not appear to have any effect in TANE
Stop.PNG If your session uses a rule that will expect to find a particular driver in charge of a train (e.g. driver Charlie in the Trigger Check Rule) then manually assign Charlie as the driver of a train and do not select the option Remove all existing Drivers first.


Generate New Drivers for Empty Trains

DriverSetupGenerateNew.JPG

DotPoint.JPG When using the Driver Setup Rule for the first time with no drivers assigned to existing trains, the Generate new Drivers for empty trains option will immediately assign drivers to each train. Each time a new train is added to the layout, it will be automatically assigned a driver.

Gears.PNG Settings:
  • If Checked CheckBox.PNG randomly selected drivers will be assigned to all newly added driveable trains. Existing drivers will not be affected unless the Remove all existing Drivers first option has been selected.
  • If Unchecked CheckBoxOff.PNG then you will have to manually assign drivers to trains by clicking the Add another Driver link


Wait For Schedule Completion

DriverSetupWaitSchedule.png


Gears.PNG Settings:
  • If Checked CheckBox.PNG then this Driver Setup Rule will not complete until all Schedule Rules (if any) have been completed.
  • If Unchecked CheckBoxOff.PNG then this Driver Setup Rule will complete as soon as all its drivers have been assigned locos and commands (if any).


Focus Camera on First Driver

DriverSetupFocus.png


Gears.PNG Settings:
  • If Checked CheckBox.PNG then the Session will start with the camera focussed on the first driver in the list.
  • If Unchecked CheckBoxOff.PNG then the Session will start with the camera focussed on the scene that last had the camera focus in Surveyor.


Editing the Driver List

When drivers and trains have been added to the rule, it will appear as shown below.

DriverSetupDriverCommandList.JPG
DotPoint.JPG If a loco name appears in red then it has been removed from the layout.

Steps.PNG Steps:
  • Click on the driver icon to select a different driver from the Session list.
  • Click on the loco name to select a different loco from the Session list (an empty loco list means no unassigned locos are available).
  • Click on the driver name to type in a new name for this driver (this will not change the driver icon).
  • Click on Autodetect to select a new owner for this driver and loco. There are four "owner" options:-
  1. AI driver - this train will be under AI control even if it has no Driver Command Bar orders to follow. This can be used to prevent a user from taking control of the train.
  2. Autodetect - if the train has Driver Command Bar orders then it will be under AI control. If it has no Driver Command Bar orders then it will be under user control.
  3. First Human Player - the train will be assigned to the user or a multiplayer, whoever selects it first.
  4. Multiplayer Driver - the train will be assigned to a multiplayer.

If you need to remove a driver:-

  • Click remove to delete this driver from the rule.

Adding Driver Commands

The grey area below the driver details (name, loco, owner) is the Driver Command Bar. This is where the driving instructions (the "train orders") used by the Trainz AI system are given to the driver.

DriverSetupAddCommand.JPG

Shown below is a Driver Command Bar after two driver commands have been added. Each command has its own icon. Move the mouse pointer onto a command icon to reveal a tooltip showing the contents of the command, as shown in the image.
DriverSetupAddedCommand.JPG


Steps.PNG Steps:
  1. Click the small "double chevron" icon shown in the image on the left. This will open a Command List menu which will show the driver commands that can be added to this drivers Command Bar.
  2. Click on a command to add it to the Driver Command Bar.

DriverSetupCommandMenu.JPG
NotePad.PNG Notes:

  • The commands that will be shown and are available for use are decided by another rule, the PageLink.PNG Driver Command Rule. If a command that you want is not in the list then open and edit the Driver Command Rule.
  • Many of the items in the menu will open sub-menus. These are indicated by the > character after the command name. For example:-
    • The Drive To Trackmark will open a sub-menu listing all the available trackmarks
    • The Navigate To will open a sub-menu of all the interactive industries
    • The Wait For will open a sub-menu of different wait times
NotePad.PNG Notes:

When a driver command has been executed in Driver Mode by the Trainz AI system, it will be deleted from the Driver Command Bar and the next command in the sequence will then be executed. This will continue until the last command has been executed and deleted. Then the AI control of the train will terminate.

Deleting Driver Commands

To remove a command from the Driver Command Bar...

DriverSetupDeleteCommand.JPG

Steps.PNG Steps:
  1. Click on the command and hold down the left mouse button
  2. Drag the command out of the Driver Command Bar area

The "Repeat" Command

DotPoint.JPG The "Repeat" command is a special built in command that allows all the driver commands to be repeated endlessly.
DriverSetupAddRepeat.JPG
DotPoint.JPG The Repeat command is only available when at least one command is present in the Driver Command Bar. Only one Repeat command can be added to a Driver Command Bar.

Steps.PNG Steps:
  1. Click the Add Command button on the Driver Command Bar
  2. Select the Repeat option

DriverSetupRepeatIcon.JPG
DotPoint.JPG The Repeat icon will always be placed at the end of the Driver Command Bar after the Add Command button
DotPoint.JPG As each command is executed by the Trainz AI system, it will be deleted from the front of the command list and added to the end of the list to create an "endless loop" of commands.
DriverSetupRemoveRepeat.JPG
NotePad.PNG Notes:

  • If a Repeat command is already present, then the Add Command menu list will show Don't Repeat as its first option
  • Select Don't Repeat to remove the Repeat command


Bug.png Known Issues:

If a Repeat command is present in the Driver Command Bar and all the other commands are then deleted, the Repeat command will remain in the Driver Command Bar and cannot be removed. Because there are no other commands to be repeated this will not cause a problem. However when later adding new commands the presence of the Repeat command can be easily overlooked.

Spanner.PNG Workaround:
Add a command (any command) to the Driver Command Bar. The Don't Repeat option will then become available and the Repeat command can be removed.
  Top Next Up Next Down Bottom

Copying the Driver Setup Rule

DotPoint.JPG The Driver Setup Rule (and other rules) can be copied between Sessions
Text 

This sub-section is also available in text only format suitable for copying and pasting at Copying Rules Between Sessions TEXT


Steps.PNG Steps:
  1. in the Session Editor right mouse click on the Driver Setup Rule
  2. select Copy from the popup menu
  3. exit the Session
  4. load the second Session (where the Rule is to be copied to) into Surveyor and open the Session Editor
  5. right mouse click after the last rule entry and select Paste


NotePad.PNG Notes:

There are some conditions that must be met for this to work.

DotPoint1.JPG Drivers, Driver Assignments and Driver Commands ONLY are Copied
Copying the Driver Setup Rule will NOT copy the actual locomotives and consists that the drivers are assigned to. These must be copied or recreated separately
DotPoint2.JPG No Duplicate Locos Allowed - this is only an issue if you keep both the original and the copied Driver Setup Rule in the Session
If the same loco is present in both Driver Setup Rules then only the first loco (in the top copy of the rule) will be active. The duplicate loco in the second copy of the rule will be ignored
DotPoint3.JPG Missing Locos will be Ignored
If a loco is listed in the copied Driver Setup Rule but does not exist in the new Session because it was not copied across then it will be ignored
  Top Next Up Next Down Bottom

Driver Command Rule

Main Points:
DotPoint.JPG The WikiLink.PNG Driver Command Rule controls which Driver Commands will be available in a Session. This applies to both:-
  • driver commands added to the WikiLink.PNG Driver Setup Rule in the WikiLink.PNG Session Editor in Surveyor Mode, and
  • driver commands for the user to manually add to the Driver Command Bar of user and AI controlled trains running in Driver Mode.
DotPoint.JPG Removing commands such as Navigate To will force players to manually drive trains when in Driver Mode instead of allowing them to use the Trainz AI system to do all the work.


The WikiLink.PNG Driver Command Rule is automatically added to the Session Editor of every Session.

EditSessionWindow.JPG
Steps.PNG Steps:
  1. Select the Driver Command Rule shown left (it is usually the rule near the top of the list)
  2. Click the Edit button at the bottom of the Session Editor window


Stop.PNG If the Driver Command Rule is not shown in the list then...
  1. Click the Add button at the bottom of the Session Editor window
  2. Scroll through the list of rules to locate and select the Driver Command Rule
  3. Click the Tick.PNG icon on the rule list window
This will add the rule to the Session Editor.


The Rule properties window will open to show all the Driver Commands that have been installed in Trainz on your system. This list includes the commands that are built in and those that have been downloaded from the DLS.

DriverCommandAddCommand.JPG

Gears.PNG Settings:
  • Commands that are CheckBox.PNG Checked ON will be available in the Driver Setup Rule Command List in the Session Editor and for the user in Driver Mode
  • Commands that are CheckBoxOff.PNG Checked OFF will NOT be available in the Driver Setup Rule Command List in the Session Editor and for the user in Driver Mode
  • To change the status of a command simply check it ON or OFF


NotePad.PNG In TANE some Driver Commands that have been checked ON will not appear in the Driver Command Bar if there is no target for their action. For example, no set triggers or interactive industries.
PencilTips.PNG

If a command that you want to use does not appear in the list, then check in Content Manager that it has been installed or downloaded and is free of errors.


  Top Next Up    


Trainz Wiki

TrainzWiki.png

More Tutorials and Guides to Using Trainz


This page was created by Trainz user pware in June 2018 and was last updated as shown below.


Personal tools