Difference between revisions of "TrainCarts/Signs/Mutex"

From BergerHealer Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 46: Line 46:
 
* Third line: Name (optional), multiple mutex signs with the same name form a single combined mutex zone
 
* Third line: Name (optional), multiple mutex signs with the same name form a single combined mutex zone
 
* Fourth line: [[Special:MyLanguage/TrainCarts/Signs/Statements|Statement]] (optional), each sign with the same name adds to a list of statements. Prepend & or | to switch between AND and OR logic.
 
* Fourth line: [[Special:MyLanguage/TrainCarts/Signs/Statements|Statement]] (optional), each sign with the same name adds to a list of statements. Prepend & or | to switch between AND and OR logic.
</translate>
 
  
=== Smart Mutex ===
+
=== Smart Mutex === <!--T:7-->
 
[[File:Smartmutex.png|thumb|Smart Mutex allows two trains to pass while blocking two others]]
 
[[File:Smartmutex.png|thumb|Smart Mutex allows two trains to pass while blocking two others]]
 
The Smart Mutex is a mutex sign that checks the paths trains (will) take through the mutex zones, allowing trains to pass that don't have a path intersecting with one another. This allows multiple trains to cross an intersection at the same time provided they can safely pass each other.
 
The Smart Mutex is a mutex sign that checks the paths trains (will) take through the mutex zones, allowing trains to pass that don't have a path intersecting with one another. This allows multiple trains to cross an intersection at the same time provided they can safely pass each other.
  
 +
</translate>
 
{{sign|[train]|smartmutex 2}}
 
{{sign|[train]|smartmutex 2}}
 +
<translate>
  
  
 +
</translate>
 
{{sign|[train]|smutex 5/6/8}}
 
{{sign|[train]|smutex 5/6/8}}
 +
<translate>
  
==== Prediction ====
+
==== Prediction ==== <!--T:8-->
 
When checking the path a train will take through the smart mutex zone, switchers are taken into account. The current switched state of the rails is then not important.
 
When checking the path a train will take through the smart mutex zone, switchers are taken into account. The current switched state of the rails is then not important.
  
=== Pathing Mutex ===
+
=== Pathing Mutex === <!--T:9-->
 
[[File:Pathingmutex.png|thumb|Pathing Mutex creates a path that prevents another train from crossing at the same time]]
 
[[File:Pathingmutex.png|thumb|Pathing Mutex creates a path that prevents another train from crossing at the same time]]
The pathing mutex attempts to replace the [[TrainCarts/Signs/Waiter|waiter sign]] in a more reliable fashion. When trains activate the pathing mutex sign, a path is predicted that the train will take from that point. All rails visited along this path become part of a temporary mutex zone. Other trains are blocked from entering this path, and if a train is already on it, the train is stopped in front of the pathing mutex sign.
+
The pathing mutex attempts to replace the [[Special:MyLanguage/TrainCarts/Signs/Waiter|waiter sign]] in a more reliable fashion. When trains activate the pathing mutex sign, a path is predicted that the train will take from that point. All rails visited along this path become part of a temporary mutex zone. Other trains are blocked from entering this path, and if a train is already on it, the train is stopped in front of the pathing mutex sign.
  
 +
</translate>
 
{{sign|[train]|pathmutex 100}}
 
{{sign|[train]|pathmutex 100}}
 +
<translate>
  
  
 +
</translate>
 
{{sign|[train]|pmutex 100}}
 
{{sign|[train]|pmutex 100}}
 +
<translate>
  
  
 +
</translate>
 
{{sign|[train]|spmutex 100 3}}
 
{{sign|[train]|spmutex 100 3}}
 +
<translate>
  
==== Syntax ====
+
==== Syntax ==== <!--T:10-->
 
'''pathmutex / pmutex''': Creates a standard mutex zone using the path ahead
 
'''pathmutex / pmutex''': Creates a standard mutex zone using the path ahead
  
 +
<!--T:11-->
 
'''spmutex''': Creates a smart mutex zone using the path ahead
 
'''spmutex''': Creates a smart mutex zone using the path ahead
  
 +
<!--T:12-->
 
First number is the path distance ahead to create as a mutex zone. Second number (optional) sets the width, or, distance that trains keep from the path. Setting this to a higher number avoids trains colliding with each other.
 
First number is the path distance ahead to create as a mutex zone. Second number (optional) sets the width, or, distance that trains keep from the path. Setting this to a higher number avoids trains colliding with each other.
  
== Slowing down on approach ==
+
== Slowing down on approach == <!--T:13-->
By setting the [[TrainCarts/Signs/Property#Wait_Property|train wait acceleration property]], trains will automatically slow down approaching an occupied mutex zone, instead of stopping instantly.
+
By setting the [[Special:MyLanguage/TrainCarts/Signs/Property#Wait_Property|train wait acceleration property]], trains will automatically slow down approaching an occupied mutex zone, instead of stopping instantly.
  
== Debug ==
+
== Debug == <!--T:14-->
 
[[File:Debugmutex.png|thumb|Smart Mutex boundaries displayed using the /train debug mutex command]]
 
[[File:Debugmutex.png|thumb|Smart Mutex boundaries displayed using the /train debug mutex command]]
 
Use '''/train debug mutex''' to temporarily display the exact boundaries of nearby mutex zones.
 
Use '''/train debug mutex''' to temporarily display the exact boundaries of nearby mutex zones.
 +
 +
</translate>

Latest revision as of 15:18, 23 September 2024

Other languages:
English • ‎中文 • ‎中文(中国大陆)‎

« Go back


Introduction

A mutex sign prevents a train from entering the intersection while another train is inside

The mutex sign handles mutual exclusion: it blocks trains entering a zone while another train is already inside. Once the zone is freed up again, the waiting trains are allowed to continue movement. This sign is useful in combination with switcher signs to avoid crashing trains. Levers attached to the base block are toggled while a train is inside the mutex zone.

Multiple mutex signs can be combined by naming them the same, combining the cuboid areas of effect they occupy. This way more complex zones can be created.

Syntax

Signtemplate.png
[train]
mutex


Signtemplate.png
[train]
mutex 1/2/1


Signtemplate.png
[train]
mutex 1/2


Signtemplate.png
[train]
mutex 2


Signtemplate.png
[train]
mutex 2
name
d@Station 12


  • First line: [train]. The sign does not have to be powered.
  • Second line: mutex, which without further arguments will create a cuboid zone around the sign of 1x2x1 (x/y/z). When followed by one number, the number sets all cuboid x/y/z-radius values at once. When followed by a second number, the first number sets the x/z-radius and the second number the y-radius. With 3 parameters, each x/y/z radius can be specified.
  • Third line: Name (optional), multiple mutex signs with the same name form a single combined mutex zone
  • Fourth line: Statement (optional), each sign with the same name adds to a list of statements. Prepend & or | to switch between AND and OR logic.

Smart Mutex

Smart Mutex allows two trains to pass while blocking two others

The Smart Mutex is a mutex sign that checks the paths trains (will) take through the mutex zones, allowing trains to pass that don't have a path intersecting with one another. This allows multiple trains to cross an intersection at the same time provided they can safely pass each other.

Signtemplate.png
[train]
smartmutex 2


Signtemplate.png
[train]
smutex 5/6/8

Prediction

When checking the path a train will take through the smart mutex zone, switchers are taken into account. The current switched state of the rails is then not important.

Pathing Mutex

Pathing Mutex creates a path that prevents another train from crossing at the same time

The pathing mutex attempts to replace the waiter sign in a more reliable fashion. When trains activate the pathing mutex sign, a path is predicted that the train will take from that point. All rails visited along this path become part of a temporary mutex zone. Other trains are blocked from entering this path, and if a train is already on it, the train is stopped in front of the pathing mutex sign.

Signtemplate.png
[train]
pathmutex 100


Signtemplate.png
[train]
pmutex 100


Signtemplate.png
[train]
spmutex 100 3

Syntax

pathmutex / pmutex: Creates a standard mutex zone using the path ahead

spmutex: Creates a smart mutex zone using the path ahead

First number is the path distance ahead to create as a mutex zone. Second number (optional) sets the width, or, distance that trains keep from the path. Setting this to a higher number avoids trains colliding with each other.

Slowing down on approach

By setting the train wait acceleration property, trains will automatically slow down approaching an occupied mutex zone, instead of stopping instantly.

Debug

Smart Mutex boundaries displayed using the /train debug mutex command

Use /train debug mutex to temporarily display the exact boundaries of nearby mutex zones.