"junction-vertices" container

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
(Supported Tags)
m (Format change)
Line 1: Line 1:
The [["junction-vertices" Container]] is a top-level [[config.txt file]] entry used by [[KIND SceneryWithTrack]] assets.
+
The junction-vertices container is a list of junction subcontainers with no standalone tags and is used by [[KIND FixedTrack]] assets. Each junction subcontainer uses the following format. Each junction derives its name from the subcontainer's tag name. These names are used to refer to specific junctions from script.
  
The [["junction-vertices" Container]] is a list of junction subcontainers with no standalone tags. Each junction subcontainer uses the following format. Each junction derives its name from the subcontainer's tag name. These names are used to refer to specific junctions from script.
 
  
 +
==Junction subcontainer==
 +
Each junction subcontainer supports the following tags. Each tag is shown here with its default value.
  
==Supported Tags==
 
Each junction subcontainer supports the following tags. Each tag is shown here with its default value.
 
 
junction-vertex ""
 
 
  junction-lever-mesh ""
 
  junction-lever-mesh ""
 
  junction-mutex ""
 
  junction-mutex ""
junction-mutex-sharing-left 0
 
 
  junction-mutex-sharing-forward 0
 
  junction-mutex-sharing-forward 0
 +
junction-mutex-sharing-left 0
 
  junction-mutex-sharing-right 0
 
  junction-mutex-sharing-right 0
 +
junction-vertex ""
 +
 +
 +
=== junction-lever-mesh ===
 +
:Type: String
 +
:Desc: The "junction-lever-mesh" tag optionally specifies the name of a [["mesh-table" Container]] entry to use for the junction lever. ''TBD: Animation? Multiple-state junction support?''
  
 +
=== junction-mutex ===
 +
:Type: String
 +
:Desc: The "junction-mutex" tag optionally specifies the name of a [["mutexes" Container]] entry to use for the junction's mutex. This allows sharing a single mutex between multiple junctions, and requires a detailed understanding of the trainz [[Permit]] system. If ommitted, the junction will use a unqiue mutex.
  
The "junction-vertex" tag is compulsory and determines the track vertex at which this junction is to be create. This name must correspond to one of the vertices specified in the [[Attached-track_container|"attached-track" Container]] and the vertex specified should form a valid junction (ie. should have more than two track stretches attached.)
+
=== junction-mutex-sharing-forward ===
 +
=== junction-mutex-sharing-left ===
 +
=== junction-mutex-sharing-right ===
 +
:Type: Integer
 +
:Desc: The "junction-mutex-sharing-left", "junction-mutex-sharing-forward", and "junction-mutex-sharing-right" tags describe sharing masks for the junction's mutex. Two or more permits may be granted for a junction simultaneously if a ''bitwise and'' of their sharing masks gives a non-zero result. When a permit is requested by script for this junction's mutex, the appropriate sharing masks is selected based on the requested direction. If no direction is specified (eg. a legacy script is in use) then a sharing mask of zero is used.
  
The "junction-lever-mesh" tag optionally specifies the name of a [["mesh-table" Container]] entry to use for the junction lever. ''TBD: Animation? Multiple-state junction support?''
+
=== junction-vertex ===
 +
:Type: Attachment point
 +
:Desc: The "junction-vertex" tag is compulsory and determines the track vertex at which this junction is to be create. This name must correspond to one of the vertices specified in the [[Attached-track_container|"attached-track" Container]] and the vertex specified should form a valid junction (ie. should have more than two track stretches attached.)
  
The "junction-mutex" tag optionally specifies the name of a [["mutexes" Container]] entry to use for the junction's mutex. This allows sharing a single mutex between multiple junctions, and requires a detailed understanding of the trainz [[Permit]] system. If ommitted, the junction will use a unqiue mutex.
 
  
The "junction-mutex-sharing-left", "junction-mutex-sharing-forward", and "junction-mutex-sharing-right" tags describe sharing masks for the junction's mutex. Two or more permits may be granted for a junction simultaneously if a ''bitwise and'' of their sharing masks gives a non-zero result. When a permit is requested by script for this junction's mutex, the appropriate sharing masks is selected based on the requested direction. If no direction is specified (eg. a legacy script is in use) then a sharing mask of zero is used.
 
  
 
==Junction-vertices Example==
 
==Junction-vertices Example==
Line 40: Line 50:
  
 
==Categories==
 
==Categories==
[[Category:Config Container]]
+
[[Category:Config Container|J]]

Revision as of 13:52, 5 February 2014

The junction-vertices container is a list of junction subcontainers with no standalone tags and is used by KIND FixedTrack assets. Each junction subcontainer uses the following format. Each junction derives its name from the subcontainer's tag name. These names are used to refer to specific junctions from script.


Contents

Junction subcontainer

Each junction subcontainer supports the following tags. Each tag is shown here with its default value.

junction-lever-mesh ""
junction-mutex ""
junction-mutex-sharing-forward 0
junction-mutex-sharing-left 0
junction-mutex-sharing-right 0
junction-vertex ""


junction-lever-mesh

Type: String
Desc: The "junction-lever-mesh" tag optionally specifies the name of a "mesh-table" Container entry to use for the junction lever. TBD: Animation? Multiple-state junction support?

junction-mutex

Type: String
Desc: The "junction-mutex" tag optionally specifies the name of a "mutexes" Container entry to use for the junction's mutex. This allows sharing a single mutex between multiple junctions, and requires a detailed understanding of the trainz Permit system. If ommitted, the junction will use a unqiue mutex.

junction-mutex-sharing-forward

junction-mutex-sharing-left

junction-mutex-sharing-right

Type: Integer
Desc: The "junction-mutex-sharing-left", "junction-mutex-sharing-forward", and "junction-mutex-sharing-right" tags describe sharing masks for the junction's mutex. Two or more permits may be granted for a junction simultaneously if a bitwise and of their sharing masks gives a non-zero result. When a permit is requested by script for this junction's mutex, the appropriate sharing masks is selected based on the requested direction. If no direction is specified (eg. a legacy script is in use) then a sharing mask of zero is used.

junction-vertex

Type: Attachment point
Desc: The "junction-vertex" tag is compulsory and determines the track vertex at which this junction is to be create. This name must correspond to one of the vertices specified in the "attached-track" Container and the vertex specified should form a valid junction (ie. should have more than two track stretches attached.)


Junction-vertices Example

The following is an example of a simple "junction-vertices" Container which declares two named junctions.

junction-vertices
{
  one-junction
  {
    junction-vertex "a.track0a"
  }
  another-junction
  {
    junction-vertex "a.track2a"
  }
}


Categories

Personal tools