"junction-vertices" container

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
m (1 revision)

Revision as of 22:30, 8 March 2010

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

Supported Tags

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

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

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

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?

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

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

    junction-vertex "a.track0a"
    junction-vertex "a.track2a"


Personal tools