HowTo/WagonX - Technical Reference

From TrainzOnline
< HowTo(Difference between revisions)
Jump to: navigation, search
(Corrected some broken links)
(trigger)
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
 +
<table width=1200><tr><td>
 
= Document Structure =
 
= Document Structure =
<table width=1200>
+
 
<tr><td>The WagonX Tutorial set is written over several pages.  This page is a base reference for using WagonX config containers, their properties and the values for those properties.  Other pages in the series are listed below:
+
The WagonX Tutorial set is written over several pages.  This page is a base reference for using WagonX config containers, their properties and the values for those properties.  Other pages in the series are:
</td></tr>
+
 
</table>
+
# [[HowTo/Use the WagonX Library|How to use the WagonX library]]<br>
# [[HowTo/Use the WagonX Library]]<br>
+
# [[HowTo/WagonX - Browser Properties Examples and Basic Tutorials|WagonX Examples and Basic Tutorials]]<br>
# [[HowTo/WagonX - Browser Properties Examples and Basic Tutorials]]<br>
+
# [[HowTo/WagonX - Traincar Tutorial|WagonX Traincar Tutorial]]<br>
# [[HowTo/WagonX - Traincar Tutorial]]<br>
+
# [[HowTo/WagonX - Locomotive Tutorial|WagonX Locomotive Tutorial]]<br>
# [[HowTo/WagonX - Locomotive Tutorial]]<br>
+
</tr></td></table>
<br>
+
  
 
__TOC__
 
__TOC__
  
 +
<table width=1200><tr><td>
 
= The WagonX Reference =
 
= The WagonX Reference =
<table width=1200>
+
 
<tr><td>This page contains details of the WagonX extension container and sub-containers.  Practical examples of usage can be found in the tutorials listed above.
+
This page contains details of the WagonX extension container and sub-containers.  Links to examples of use will be provided when available.
</td></tr>
+
</td></tr></table>  
</table>  
+
 
<br>
+
<table width=1200><tr valign="top"><td>
 
= Restricted Characters =
 
= Restricted Characters =
<table width=1200>
 
<tr valign="top">
 
<td>The characters in the list below cannot be used for some property tag values as they are used by the script to parse or identify values such as list items and other information. They can be used in name and description tags. Use of these characters in tag values is identified in the properties descriptions that follow. Tutorial sections give examples of use.  See also [[HowTo/WagonX - Technical Reference#display-values|display-values]].
 
</td>
 
</tr>
 
  
<tr>
+
The characters in the list below cannot be used for some property tag values as they are used by the script to parse or identify values such as list items and other information. They can be used in name and description tags. Use of these characters in tag values is identified in the properties descriptions that follow. See also [[#display-values|display-values]].
<td>
+
*Comma ( , )
+
*Comma ( , )  
*Semicolon ( ; )
+
*Semicolon ( ; )  
*Backtick ( ` )
+
*Backtick/Grave ( ` )
*Colon ( : )
+
*Colon ( : )
</td>
+
*Caret ( ^ )
</tr>
+
*Round brackets ( and )
</table>
+
</td></tr></table>
<br>
+
 
 +
<table width=1200><tr valign="top"><td>
 +
== Using commas and semi-colons in a list ==
 +
WagonX uses commas to identify items in a list. Some examples might be "1,2,3,4"for a list of four integers, "Rita, Rose, Ruth" of three nameboards for a Pullman car, and "0,1" for a list of booleans (false and true).<br>
 +
Semi-colons are used to items in a set, where sets are items in a list.  Le's say we have three sets each consisting of integer numbers,then we might use something like "1;2;3;4,9;3;6;5,13;12;15;16".  The first set is 1,2,3 and 4, the second set 9,3,6 and 5, and the last 13,12,15 and 16.
 +
<br>This notation is common where we might want apply some value to items in a set.  For example, our sets might each consist of four meshes for a car to which we want to apply a particular livery. List such as these are commonly used in the [[#values|values]] tag.
 +
<br>See also [[WagonX_-_Browser_Properties_Examples_and_Basic_Tutorials#Using_semicolons_to_set_multiple_values_in_one_property|Using semicolons to set multiple values in one property]].
 +
</td></tr></table>
 +
 
 +
<table width=1200><tr valign="top"><td>
 +
== Using the grave symbol in a list ==
 +
The backtick or grave symbol allows you to set multiple variables on a single function in one property. It's typically used to set the value for all the parameters in the pfx emitter functions. It's also used for mest-attachment-type mesh-translation-orientation parameters.
 +
For example, if you want to set the start color with these values (0,0,128,128,128,64), but you want each of those variables to be set in one property then use "0`0`128`128`128`64".
 +
You can also use this symbol to populate your set of parameters with variables such as "veh_velocity|/|2`veh_velocity|+2`veh_velocity|-|loc_abs_reverser".  In simple english that means the first parameter is the vehicle velocity divided by 2, the second parameter is the vehicle velocity plus 2, and the final parameter is the vehicle length minus the absolute value of the loco reverser.  Hmm, that doesn't make a lot of sense but its only an example.
 +
</td></tr></table>
 +
 
 +
<table width=1200><tr valign="top"><td>
 +
== Other special characters ==
 +
Caret - The caret/circumflex symbol (^) is a math power operator.  It can be used in variables.<br>
 +
Round Brackets - Round brackets are used to group mesh vectors translation and orientation.  In this instance, colons are used to separate the vectors.  For example, "(0`2`4):(1.2`2`2),(0`0`0):(0`0`0)".  See [[#values|values]].<br>
 +
Colon - See Round Brackets above.
 +
</td></tr></table>
 +
 
 +
<table width=1200><tr valign="top"><td><tr>
 
= General Layout =
 
= General Layout =
<table width=1200>
+
 
<tr valign="top">
+
WagonX config tags are defined in the extensions container along with other extensions such as ACS Lib. The general layout of the extensions container that also includes ACS Lib might look like this:
<td>WagonX config tags are defined in the extensions container along with other extensions such as ACS Lib. The general layout of the extensions container that also includes ACS Lib might look like this:
+
</td>
+
</tr>
+
<tr><td>
+
 
  extensions
 
  extensions
 
  {
 
  {
Line 47: Line 62:
 
   active-coupling-standard-60850
 
   active-coupling-standard-60850
 
   {
 
   {
    ...
+
    ...
 
   }
 
   }
 
   wagon-x
 
   wagon-x
 
   {
 
   {
    ...
+
    ...
 
   }
 
   }
 
  }
 
  }
</td></tr>
+
</td></tr></table>
</table>
+
<br>
+
  
 +
<table width=1200><tr valign="top"><td>
 
= WagonX Properties =
 
= WagonX Properties =
<table width=1200>
+
 
<tr valign="top">
+
There are currently four standard or "top level" WagonX containers that define properties for Marker Lights,text-x, a variation of ACSLib and Misc (miscellaneous).  In addition to the standard containers, you can define zero or more additonal property containers that are identified by integer value names starting from 0.  Each of these containers are defined below.
<td>There are currently three standard or "top level" WagonX containers that define properties for Marker Lights, a variation of ACSLib and Misc (miscellaneous).  In addition to the standard containers, you can define zero or more additonal property containers that are identified by integer value names starting from 0.  Each of these containers are defined below.
+
</td></tr></table>
</td>
+
 
</tr>
+
 
</table>
+
== ACS ==
+
 
<!--start of ACS table-->
 
<!--start of ACS table-->
<table width=1200>
+
<table width=1200><tr><td>
 +
== ACS ==
 
For help on creating the acs extensions and setting up the acs mesh-table objects, see [[HowTo/WagonX_-_Browser_Properties_Examples_and_Basic_Tutorials#Naming_ACS_mesh-table_attachments|Naming ACS mesh-table attachments]].
 
For help on creating the acs extensions and setting up the acs mesh-table objects, see [[HowTo/WagonX_-_Browser_Properties_Examples_and_Basic_Tutorials#Naming_ACS_mesh-table_attachments|Naming ACS mesh-table attachments]].
 
<br>
 
<br>
 
Each tag is shown here with sample values. There are no default values.
 
Each tag is shown here with sample values. There are no default values.
<tr><td>
+
 
 
  acs
 
  acs
 
  {
 
  {
Line 85: Line 98:
 
*<b>duration (a floating point value)</b>
 
*<b>duration (a floating point value)</b>
 
:The time, in seconds, that the mesh animation will take to move between the two states. If animated is set to 0, this will determine the fade duration when switching between meshes (fade duration on mesh objects in trainzbuild 5.0 + can get buggy)
 
:The time, in seconds, that the mesh animation will take to move between the two states. If animated is set to 0, this will determine the fade duration when switching between meshes (fade duration on mesh objects in trainzbuild 5.0 + can get buggy)
</td></tr>
+
*<b>buffer-length-front  float</b>
</table> <!--end of ACS table-->
+
:The distance between a.couple0 and a.limfront in meters. To be used with the jbv animation system. Requires the  ‘use-jbv-animation’ tag to be set to 1
<br>
+
*<b>buffer-length-back  float</b>
 +
:The distance between a.couple1 and a.limback in meters. To be used with the jbv animation system. Requires the  ‘use-jbv-animation’ tag to be set to 1
 +
</td></tr></table>
 +
 
 +
<table width=1200><tr><td>
 +
== text-x ==
 +
<!--start of ACS table-->
 +
WagonX V1.2 or greater.
 +
(description yet to be included - ARN and/or headcodes? - validation required)<br>
 +
 
 +
*<b>controller string</b>
 +
:Determines how the property will be controlled. Can be controlled by the user, the running number, or a custom range.
 +
:::*user
 +
:::*arn
 +
:::*range
 +
*<b>range  string</b>
 +
:Defines the range of values the for the text proprety. It will choose a random index to start<br>
 +
*<b>value  string</b>
 +
:The default value for the text property. This can be formated in two ways. For texture files with single-character identifiers, each character can be written together (e.g. “a12d”). For texture files with multiple-character identifiers, each identifier needs to be separated by a comma (e.g. “dot,3,dash,k”).<br>
 +
*<b>font  int</b>
 +
:The default font index for the text property, these values can be changeed by adding a “config-edit” property to the browser-properties.
 +
*<b>files-path  string</b>
 +
:An optional tag that shortens the number of characters that need to be written to the “values“ tag, assuming they all share the same path or asset library and extension. The path and extension can be specified here (e.g. files-path “images/left/.texture”), where images/left is the path, and .texture is the extension for all the files.<br>
 +
*<b>textures  string</b>
 +
:The list of texture files to use. The ‘#’ symbol is used by the script as a placeholder identifier for the value input. For example, if it is set to ‘alpha_digit-#’, each letter and number will go where the ‘#’, e.g. If the first chartcher in the value tag is ‘a’, it will look for the texture ‘images/alpha_digit-a.texture’, to use for the first texture effect digit. Each comma separated value coorispinds to the font to use at each index.<br>
 +
*<b>effects  string</b>
 +
:The texture replacement effects to use for displaying the text.<br>
 +
 
 +
Each tag is shown here with sample values.
 +
 
 +
text-x
 +
{
 +
  text-properties
 +
  {
 +
    headcode
 +
    {
 +
    controller                "user"
 +
    range                    "null"
 +
    value                    "2,5,dots,2"
 +
    font                      0
 +
    files-path                "images/,.texture"
 +
    textures                  "fd-#"
 +
    effects                  "fdigit-1,fdigit-2,fdigit-3,fdigit-4"
 +
    }
 +
  }
 +
}
 +
</td></tr></table>
  
== Misc ==
 
 
<!--start of Misc table-->
 
<!--start of Misc table-->
<table width=1200>
+
<table width=1200><tr><td>
 +
== Misc ==
 +
 
 
<!--Note for page author - is this for proper industries such as cargo or is it used for passengers at stations as well?-->
 
<!--Note for page author - is this for proper industries such as cargo or is it used for passengers at stations as well?-->
 
The misc container currently contains times, in seconds, for industry loading and unloading.  Usually, these times are used to enable animations to run before or after loading/unloading.
 
The misc container currently contains times, in seconds, for industry loading and unloading.  Usually, these times are used to enable animations to run before or after loading/unloading.
  
 
Each available tag is shown here with sample values.  There are no defaults.
 
Each available tag is shown here with sample values.  There are no defaults.
<tr><td>
+
 
 
  misc
 
  misc
 
  {
 
  {
Line 105: Line 165:
 
  }
 
  }
  
 +
*<b>mobile  float</b> <b><i>(added in v1.2)</i></b>
 +
:Setting this to 1 indicates this asset is indended for use on trainz mobile platforms. This will disable and/or compromise certain script features to reduce complexity and improve performance for mobile devices.<br>
 +
*<b>update-frequency  float</b> <b><i>(added in v1.2)</i></b>
 +
:The frequency, in seconds, at which certain event triggered browser-properties are updated. This has a huge impact on performance, and it is best kept as high as possible, ideally 5 or more secconds. The minimum allowed value is 1. If the moible tag is set to 1, the minumum allowed value is 3 secconds.
 
*<b>begin-load-time (a floating point value)</b>
 
*<b>begin-load-time (a floating point value)</b>
 
:The time it takes for the wagon to load at an industry
 
:The time it takes for the wagon to load at an industry
Line 113: Line 177:
 
*<b>end-unload-time (a floating point value)</b>
 
*<b>end-unload-time (a floating point value)</b>
 
:The time it takes for the wagon to end unloading at an industry
 
:The time it takes for the wagon to end unloading at an industry
</td></tr>
+
</td></tr></table>
</table>
+
 
<!--end of misc table-->
 
<!--end of misc table-->
  
== Marker-Lights ==
 
 
<!--start of Marker-Lights table-->
 
<!--start of Marker-Lights table-->
<table width=1200>
+
<table width=1200><tr><td>
 +
== Marker-Lights ==
 
The Marker-Lights container is used to show or hide light meshes that are identied by entries in the config mesh-table.
 
The Marker-Lights container is used to show or hide light meshes that are identied by entries in the config mesh-table.
  
 
Each tag is shown here with sample values.  There are no defaults.  
 
Each tag is shown here with sample values.  There are no defaults.  
<tr><td>
+
 
 
  marker-lights
 
  marker-lights
 
  {
 
  {
Line 168: Line 231:
 
<!--end of Marker-Lights table-->
 
<!--end of Marker-Lights table-->
  
== Browser-Properties ==
 
 
<!--start of Browser-Properties container table-->
 
<!--start of Browser-Properties container table-->
<table width=1200>
+
<table width=1200><tr><td>
<tr><td>
+
== Browser-Properties ==
 +
 
 
*The browser-properties container is a set of zero or more property containers that hold settings for a property such as a smoke effect, an attachment or even texture replacement. They are quite flexible and suitable most any traincar/loco property.
 
*The browser-properties container is a set of zero or more property containers that hold settings for a property such as a smoke effect, an attachment or even texture replacement. They are quite flexible and suitable most any traincar/loco property.
 
*A property can have sub properties that are activated with their parent.
 
*A property can have sub properties that are activated with their parent.
Line 177: Line 240:
 
*A container need not contain all available tags.
 
*A container need not contain all available tags.
 
*We start with a sample of two properties: one for a texture replacement (skin) and the second for a handbrake activation. These are representative only and may not be suitable for your asset,
 
*We start with a sample of two properties: one for a texture replacement (skin) and the second for a handbrake activation. These are representative only and may not be suitable for your asset,
</td></tr>
 
  
<tr><td>
+
  browser-properties
browser-properties
+
  {
{
+
    0
  0
+
    {
  {
+
      enabled                    1
    enabled                    1
+
      property-visibility        1
    property-visibility        1
+
      name                      "Skin: "
    name                      "Skin: "
+
      property-id                "p_skin"
    property-id                "p_skin"
+
      consist-property-sync      1
    consist-property-sync      1
+
      description                "Sets the weathering type"
    description                "Sets the weathering type"
+
      kind                      "fx-replacement"
    kind                      "fx-replacement"
+
      fx-replacement-type        "texture-replacement"
    fx-replacement-type        "texture-replacement"
+
      meshes                    "null"
    meshes                    "null"
+
      effects                    "texture-albedo,texture-parameter"
    effects                    "texture-albedo,texture-parameter"
+
      asset                      "texturelib"
    asset                      "texturelib"
+
      files-path                "null"
    files-path                "null"
+
      values                    "0;3,1;4,2;5"
    values                    "0;3,1;4,2;5"
+
      default-index              -1
    default-index              -1
+
      trigger                    "user"
    trigger                    "user"
+
      display-type              "link"
    display-type              "link"
+
      display-values            "Clean,Weathered,Dirty"
    display-values            "Clean,Weathered,Dirty"
+
    }
  }
+
    1
  1
+
    {
  {
+
      enabled                    1
    enabled                    1
+
      property-visibility        0
    property-visibility        0
+
      name                      "Handbrake State: "
    name                      "Handbrake State: "
+
      property-id                "p_handbrake"
    property-id                "p_handbrake"
+
      description                "Toggle the handbrake"
    description                "Toggle the handbrake"
+
      kind                      "mesh-attachment"
    kind                      "mesh-attachment"
+
      mesh-attachment-type      "mesh-animation-frame"
    mesh-attachment-type      "mesh-animation-frame"
+
      meshes                    "handbrake-lever,braking-system"
    meshes                    "handbrake-lever,braking-system"
+
      values                    "0;0,30;30"
    values                    "0;0,30;30"
+
      events                    "handbrake-release,handbrake-apply"
    events                    "handbrake-release,handbrake-apply"
+
      duration                  3.2
    duration                  3.2
+
      default-index              0
    default-index              0
+
      trigger                    "both"
    trigger                    "both"
+
      display-type              "link"
    display-type              "link"
+
      display-values            "release,apply"
    display-values            "release,apply"
+
    }
  }
+
  }
}
+
</td></tr></table>
</td></tr>
+
</table>
+
  
 +
<!--start supported tags-->
 
<table width=1200><tr><td>
 
<table width=1200><tr><td>
 
===Supported Tags===
 
===Supported Tags===
 
Tag explanations.  Some examples are included in the definition and, for others, see above for sample of usage.
 
Tag explanations.  Some examples are included in the definition and, for others, see above for sample of usage.
 
</td></tr></table>
 
</td></tr></table>
 +
<!--end supported tags-->
  
<table width=1200><tr><td>
+
<!--start asset tag-->
====enabled====
+
<table width=1200><tr><td>
:Type:      Boolean (1 = true, 0=false)
+
====asset====
 +
:Type:      String
 +
:Example:    asset "texturelib"
 
:Compulsory: No
 
:Compulsory: No
:Default:    No default.
+
:Default:    None
:Desc:      Whether or not this property is active. This is useful for debugging, or if you want to disable it without removing everything.
+
:Desc:      The kuid-table asset to be used by the property. Use this for cases where you need to reference another asset, such as a texture-replacement library.  Use this tag, the [[#effects|effects]] tag, the [[#meshes|meshes]] tag, or the [[#particle-effects|particle-effects]] tag, but not more than one.
</td></tr></table>
+
  
<table width=1200><tr><td>
 
====property-visibility====
 
:Type:      Integer - (0 = Hidden, 1 = Visible, 2 = Surveyor Only, 3 = Driver Only)
 
:Compulsory: No
 
:Default:    0 (hidden)
 
:Desc:      Indicates whether the property will be visible in the Properties Browser and in what mode.
 
</td></tr></table>
 
 
<table width=1200><tr><td>
 
====name====
 
:Type:      String
 
:Compulsory: Yes
 
:Default:    None
 
:Desc:      The display name of this property, as will appear on the properties page.
 
 
</td></tr></table>
 
</td></tr></table>
 +
<!--end asset tag-->
  
 
<table width=1200><tr><td>
 
<table width=1200><tr><td>
Line 263: Line 313:
  
 
<table width=1200><tr><td>
 
<table width=1200><tr><td>
====property-id====
+
====conditions====
:Type:      String
+
<b><i>(added in v1.2)</i></b>
:Compulsory: Yes
+
:Type:      String - (a list of strings)
 +
:Compulsory: No
 
:Default:    None
 
:Default:    None
:Desc:      The formal name (ID) of this property, used to identify and change this property. For example, If the name is <b>Workflow</b>, it might be a good idea to call this <b>p_workflow</b>. <div style="color: #ff0080">This must be unique for each browser-property</div>.
+
:Desc:      For trigger kind “condition”. An array of conditional event(s) that must take place for the property value at the index to activate. Can be one of the following (separated by forward slashes and commas to save space).
 +
::The format in each comma-separated condition is a basic comparison operation with a left side, an operator, and a right side. The left and right sides can either be a variable (listed below), or a number (integer or float). The three parts are separated by a vertical bar. You can add more comparison operations to the same condition by adding an “&” (and) symbol after the first condition, then adding the second comparison operator (shown in the default conditions example above in black)(this is separate from the comma separation). You can add as many “&”s as you want to the operation, however it will get very long very quickly. The operators used are “==” (equals), “>” (greater than), “<” (less than), “>=” (greater than or equal to), “<=” (less than or equal to), and “!=” (not equal to), and must follow that format.
 +
 
 +
:::*veh
 +
::::Contains functions used within Class Vehicle. Subclasses can be any of the listed ones below. All of these are derived from [[#Class_Vehicle|Class Vehicle]]. Please refer to that page for information on function behavior and usage.<br>
 +
::::<b>example 1: veh_velocity|>=|5&veh_mass>1500  -></b> in plain English this reads, “If vehicle velocity is greater than or equal to 5 m/s and the mass is greater then 1500, then…. do something.
 +
::::<b>example 2: veh_engine-param_main-reservoir-pressure|<|0.5 -></b> in plain English this reads, “If the vehicles engine parameter, ‘main-reservoir-pressure’ is greater than 0.5,  then…. do something.
 +
 
 +
:::::For float:
 +
::::::*velocity (float)
 +
::::::*abs-velocity (float)
 +
:::::::The absolute value of the velocity, this is useful because moving in reverse will give negative inputs for “velocity”, but positive for “abs-velocity”
 +
::::::*mass (float)
 +
::::::*length (float)
 +
::::::*load-time (float)
 +
::::::*odometer-distance (float)
 +
::::::*trip-meter-distance (float)
 +
::::::*track-gradient (float)
 +
::::::*maximum-tractive-effort (float)
 +
::::::*default-maximum-tractive-effort (float)
 +
::::::*wheelslip-traction-multiplier (float)
 +
::::::*traction-multiplier (float)
 +
::::::*aux-reservoir-pressure (float)
 +
::::::*brake-cylinder-pressure (float)
 +
::::::*brake-pipe-pressure (float)
 +
::::::*cabin-sway-amount (float)
 +
::::::*coupling-stress (float)
 +
::::::*default-cabin-sway-amount (float)
 +
::::::*default-maximum-coupler-compression-stress (float)
 +
::::::*default-maximum-coupler-expansion-stress (float)
 +
::::::*maximum-coupler-compression-stress (float)
 +
::::::*maximum-coupler-expansion-stress (float)
 +
::::::*maximum-couple-velocity (float)
 +
::::::*default-maximum-couple-velocity (float)
 +
:::::For bool:
 +
::::::*coupler-breakage-enabled (bool)
 +
::::::*direction-relative-to-train (bool)
 +
::::::*drain-cocks (bool)
 +
::::::*random-automatic-running-number-support (bool)
 +
::::::*automatic-running-number (bool)
 +
::::::*high-beams (bool)
 +
::::::*is-ditch-flashing (bool)
 +
::::::*automatic-fireman-state (bool)
 +
::::::*interior-light (bool)
 +
::::::*interior-light-state (bool)
 +
::::::*bell-state (bool)
 +
::::::*has-bell (bool)
 +
::::::*in-tunnel (bool)
 +
::::::*on-bridge (bool)
 +
::::::*derailed (bool)
 +
::::::*loaded-this-stop (bool)
 +
::::::*unloaded-this-stop (bool)
 +
:::::For integer:
 +
::::::*engine-type (int)
 +
::::::*vehicle-type-flags (int)
 +
:::::For string:
 +
::::::*running-number (string)
 +
:::::And the engine parameter string:
 +
::::::*engine-param
 +
:::::::The main engine parameter strings you can use with this method are:
 +
:::::::*applied-force
 +
:::::::*brake-cylinder-pressure
 +
:::::::*brake-pipe-pressure
 +
:::::::*current-drawn
 +
:::::::*equaliser-pressure
 +
:::::::*flow
 +
:::::::*horn
 +
:::::::*main-reservoir-pressure
 +
:::::::*max-te
 +
:::::::*no3-pipe-pressure
 +
:::::::*wheelslip
 +
:::::::Values that refer only to steam engines:
 +
:::::::*coal-mass
 +
:::::::*engine-force
 +
:::::::*fire-temperature
 +
:::::::*max-coal-mass
 +
:::::::*max-fire-temperature
 +
:::::::*steam-boiler-liquid-percent
 +
:::::::*steam-boiler-pressure
 +
:::::::*steam-piston-cycle
 +
:::*loc
 +
::::Contains functions used within Class Locomotive. Subclasses can be any of the listed ones below. All of these are derived for Class Locomotive. Please refer to that page for information on function behavior and usage.
 +
::::*engine-setting
 +
:::::*The engine setting, currently the only one for the parent class ‘loc’.
 +
:::::*dynamic-brake
 +
:::::*headlight
 +
:::::*horn
 +
:::::*injector
 +
:::::*loco-auto-brake
 +
:::::*pantograph
 +
:::::*regulator
 +
:::::*reverser
 +
:::::*abs-reverser
 +
:::::*steam-blower
 +
:::::*throttle
 +
:::::*train-auto-brake
 +
:::::*train-lap-brake
 +
:::::*script-brake-pressure
 +
:::*tra
 +
::::For class Train
 +
::::For float:
 +
::::*smoothed-velocity (float)
 +
::::*train-velocity (float)
 +
::::*abs-smoothed-velocity (float)
 +
::::*abs-train-velocity (float)
 +
::::*dcc-throttle (float)
 +
::::*train-brakes (float)
 +
::::*speed-limit (float)
 +
::::*advisory-limit (float)
 +
::::*advisory-limit-2 (float)
 +
::::*ai-train-max-speed (float)
 +
::::For integer:
 +
::::*autopilot-mode (int)
 +
::::*reverser (int)
 +
::::*pantograph-state (int)
 +
::::*classification-signal (int)
 +
::::*train-priority-number (int)
 +
::::*frontmost-locomotive (int-bool)
 +
::::For bool:
 +
::::*allows-user-control (bool)
 +
::::*headlight-state (bool)
 +
::::*ditchlight-state (bool)
 +
::::*bell-state (bool)
 +
::::For string:
 +
::::*train-display-name (string)
 +
::::*owning-client (string)
 +
 
 +
:::*wor
 +
::::For class World
 +
::::For float:
 +
::::*camera-yaw
 +
::::*camera-pitch
 +
::::*camera-zoom
 +
::::*game-time
 +
::::*game-season
 +
::::For integer:
 +
::::*weather-type
 +
::::*weather-changeability
 +
::::*camera-mode
 +
::::*camera-flags
 +
::::*game-time
 +
::::*game-year
 +
::::*game-month
 +
::::*game-date
 +
::::*game-session
 +
::::*current-module
 +
::::For string:
 +
::::*local-player-name (string)
 +
::::For bool:
 +
::::*restart-stuck-ai (bool)
 +
::::*asset-restriction-in-effect (bool)
 +
 
 +
<!--end conditions-->
 
</td></tr></table>
 
</td></tr></table>
  
Line 275: Line 478:
 
:Compulsory: No
 
:Compulsory: No
 
:Default:    None
 
:Default:    None
:Desc:      Whether or not to sync the property within the consist, if a tag with the same [[HowTo/WagonX - Technical Reference#property-sync-id]] exists in the other assets. Omitting or setting the tag to 0 disables this. Setting it to 1 will create a button to the right of the property that can be clicked on to sync the property. Setting it to 2 will automatically sync the property across the consist whenever a change in the property is detected.
+
:Desc:      Whether or not to sync the property within the consist, if a tag with the same [[#property-sync-id|property-sync-id]] exists in the other assets. Omitting or setting the tag to 0 disables this. Setting it to 1 will create a button to the right of the property that can be clicked on to sync the property. Setting it to 2 will automatically sync the property across the consist whenever a change in the property is detected.
 
</td></tr></table>
 
</td></tr></table>
  
 
<table width=1200><tr><td>
 
<table width=1200><tr><td>
====property-sync-id====
+
<!--start default-index-->
:Type:      String
+
====default-index====
 +
:Type:      Integer (-1 = random)
 +
:Example:    default-index  0
 
:Compulsory: No
 
:Compulsory: No
:Default:    None
+
:Default:    0
:Desc:      The ID that determines which assets will be affected when consist-property-sync is activated. Only assets that share this ID will be synced in the consist, so be sure to make it particular and unique.
+
:Desc:      The default index for the property to start at. This will be 0 if the tag is left out. If it is -1, it will choose a random index to start at.<br>
:Example:    property-sync-id "soundBell"
+
WarningIf you have a list of values such as "1,2,3,4" and you want to set a default, then you should subtract 1 from the preferred value.  For example if you want the first in the list then set the default to 0.  This is because the browser counts the list entries from 0 and not 1.
 +
<!--end default-index-->
 
</td></tr></table>
 
</td></tr></table>
  
Line 296: Line 502:
  
 
<table width=1200><tr><td>
 
<table width=1200><tr><td>
====kind====
+
<!--start display-type-->
 +
====display-type====
 
:Type:      String
 
:Type:      String
 +
:Example:    display-type              "link"
 
:Compulsory: No
 
:Compulsory: No
 
:Default:    None
 
:Default:    None
:Desc:      The type of property this will be. Can be one of the options below. Most of these are derived from [[Class MeshObject|Class_MeshObject]]. For more info on implementing these, see [[HowTo/WagonX - Technical Reference#values]].
+
:Desc:      For trigger type “user” and “event” only. The type of button this will be. It can be any of the trainz property browser value types, plus “manual”, but not map-object or asset-list. <b>For trainzbuild 5.1 and 5.0, only link is supported for the View Details page.</b> Omitting this tag in combination with property-visibility set to 0 is useful for non-user triggers, such as world or train events.
::*mesh-attachment
+
:::*string
:::Manipulate the mesh’s animation, position, visibility, etc. See mesh-attachment-type.
+
:::*int
::*fx-replacement
+
:::*float
:::Change an effect in the mesh. See [[HowTo/WagonX - Technical Reference#fx-replacement-type]].
+
:::*list
::*particle-effect
+
:::*link
:::Activate/Deactivate/Edit a particle effect (smoke0, smoke1, etc). See [[HowTo/WagonX - Technical Reference#particle-effects]] and [[HowTo/WagonX - Technical Reference#particle-effect-type]].
+
<!--end display-type-->
::*sound-script
+
</td></tr></table>
:::Used to play a sound-script sound within this asset. See [[HowTo/WagonX - Technical Reference#sound-triggers]].
+
 
::*config-edit
+
<table width=1200><tr><td>
:::Used to edit a tag in the wagon-x config soup. See paths.
+
<!--start display-values-->
<!--need to come back and check this as I don't understand how this works-->
+
====display-values====
====particle-effect-type====
+
:Type:      String - (a list of strings)
:Type:      String (kind mesh-attachment only)
+
:Example:    display-values            "Clean,Weathered,Dirty"
 
:Compulsory: No
 
:Compulsory: No
 
:Default:    None
 
:Default:    None
:Desc:      The type of PFX function this property will be if the [[HowTo/WagonX - Technical Reference#kind]] tag is set to particle-effect. Each one is hyperlinked to the corresponding trainzscript function, though it is not necessary to know them. See [[HowTo/WagonX - Technical Reference#values]] for instructions on how to implement these properties. Currently, only pfx-message is supported.
+
:Desc:      For trigger type “user” and “event” only, and required for trigger type “user” properties to work, but optional for trigger type “event”. A list of comma-separated values which will be displayed in the view details page for the respective property. The number of values here must match the number of values in the “values” tag.
:Example:    kind  "particle-effect"
+
<!--end display-values-->
:            particle-effect-type "pfx-message"
+
::*[[pfx_Message|<span style="color: #0080ff">pfx-message</span>]]
+
:::Send a message to enable/disable a particle effect.
+
 
</td></tr></table>
 
</td></tr></table>
  
 
<table width=1200><tr><td>
 
<table width=1200><tr><td>
<!--start mesh-attachment-->
+
<!--start duration-->
====mesh-attachment-type====
+
====duration====
:Type:      String - (kind mesh-attachment only)
+
:Type:      Float
:Example:    kind                      "mesh-attachment"
+
::          mesh-attachment-type      "mesh-animation-frame"
+
 
:Compulsory: No
 
:Compulsory: No
 
:Default:    None
 
:Default:    None
:Desc:      The type of mesh property this property will be if the kind tag is set to mesh-attachment. Each one is hyperlinked to the corresponding trainzscript function, though it is not necessary to know them. See values for instructions on how to implement these properties.
+
:Desc:      For kind mesh-animation and mesh-toggle. This tag determines the time to transition to the next state for the value. If it is 0, the transition will occur instantaneously. <b>(There may be issues with using this tag with mesh-toggle.)</b>
::*[[Class_MeshObject#SetMeshVisible|<span style="color: #0080ff">mesh-toggle</span>]]
+
:Example:   duration 3.2
:::Toggle between the mesh(s) being visible or hidden.
+
<!--end duration-->
::*[[Class_MeshObject#SetMeshOrientation|<span style="color: #0080ff">mesh-translation-orientation</span>]]
+
</td></tr></table>
:::Sets the translation and orientation of the mesh(es)
+
 
::*[[Class_MeshObject#SetMeshAnimationFrame|<span style="color: #0080ff">mesh-animation-frame</span>]]
+
<table width=1200><tr><td>
:::Sets the frame(s) the meshes animation will move between. Useful for door opening and closing animations, or animations that require more than 2 states.
+
<!--start of effects (textures)-->
::*[[Class_MeshObject#StartMeshAnimationLoop|<span style="color: #0080ff">mesh-animation-loop</span>]]
+
====effects====
:::Start or stop an animation-loop on the mesh.
+
:Type:      String - (a list of texture names (i.e. texture.txt names without the .txt) each separated by a comma)
::*[[Class_MeshObject#SetMeshAnimationState|<span style="color: #0080ff">mesh-animation-state</span>]]
+
:Example:    effects "texture-albedo,texture-parameter"
:::Sets the state of the mesh(s) animation.
+
:Compulsory: No
::*[[Class_MeshObject#SetMeshAnimationSpeed|<span style="color: #0080ff">mesh-animation-speed</span>]]
+
:Default:    None
:::Changes the speed of the meshes animation.
+
:Desc:      The comma-separated effect(s) to be modified by the property. Only use this tag if you are using [[#kind|kind]] fx-replacement. Use this tag, the mesh tag, or the asset tag, but not more than one.
<!--end mesh-attachment-->
+
<!--end of effects-->
 +
</td></tr></table>
 +
 
 +
<table width=1200><tr><td>
 +
====enabled====
 +
:Type:       Boolean (1 = true, 0=false)
 +
:Compulsory: No
 +
:Default:    No default.
 +
:Desc:       Whether or not this property is active. This is useful for debugging, or if you want to disable it without removing everything.
 +
</td></tr></table>
 +
 
 +
<table width=1200><tr><td>
 +
<!--start events-->
 +
====events====
 +
:Type:       String - (a list of strings)
 +
:Example:    events  "handbrake-release,handbrake-apply"
 +
:Compulsory: No
 +
:Default:    None
 +
:Desc:      For trigger kind “event” only. An array of the event(s) that must take place for the property value at the index to activate. Can be one of the following (separated by forward slashes and commas to save space).
 +
:::*begin-load/end-load/begin-unload/end-unload
 +
:::*started-moving/stopped-moving <b><i>(added in v1.2)</i></b>
 +
:::*handbrake-apply/handbrake-release
 +
:::*trainbrake-apply/trainbrake-release
 +
:::*headlight-on, headlight-off
 +
:::*throttle-changed <b><i>(added in v1.2)</i></b>
 +
:::*front-coupled/back-coupled,front-uncoupled/back-uncoupled <b><i>(added in v1.2)</i></b>
 +
:::*view-internal, view-external, view-tracking, view-roaming <b><i>(added in v1.2)</i></b>
 +
:::*horn
 +
:::*bell
 +
:::*sanding
 +
:::*pantograph-state-0/1/2/3 (see [[Class_Train#GetPantographState|<span style="color: #0080ff">GetPantographState</span>]])
 +
:::*weather-0/1/2/3/4/5/6/7 (see [[Class_World#GetWeatherType|<span style="color: #0080ff">GetWeatherType</span>]])
 +
:::*world-day/world-night
 +
:::*priority-number-(0 - ∞) (e.g. priority-number-2) <b><i>(added in v1.2)</i></b>
 +
:::*arn-(0 -∞ ) (e.g. arn-92220, arn-844) <b><i>(added in v1.2)</i></b>
 +
:::*queue-(0 - ∞)- loaded/empty (e.g. <b>queue-0-loaded, queue-1-empty</b>)
 +
<!--end events-->
 +
</td></tr></table>
 +
 
 +
<table width=1200><tr><td>
 +
<!--start files-path tag-->
 +
====files-path====
 +
:Type:       String - (a list of two strings)
 +
:Example:    files-path "images/,.texture"
 +
:Compulsory: No
 +
:Default:    None
 +
:Desc:      An optional tag that shortens the number of characters that need to be written to the “values“ tag, assuming they all share the same path or asset library and extension. The path and extension can be specified here (e.g. <b>files-path “images/left/.texture”</b>), where images/left is the path, and .texture is the extension for all the files.
 +
<!--end files-path tag-->
 
</td></tr></table>
 
</td></tr></table>
  
Line 355: Line 605:
 
:Compulsory: No
 
:Compulsory: No
 
:Default:    None
 
:Default:    None
:Desc:      The type of fx replacement effect this property will be if the [[HowTo/WagonX - Technical Reference#kind]] tag is set to fx-replacement. Each one is hyperlinked to the corresponding trainzscript function, though it is not necessary to know them. See [[HowTo/WagonX - Technical Reference#values]] for instructions on how to implement these properties.
+
:Desc:      The type of fx replacement effect this property will be if the [[#kind|kind]] tag is set to fx-replacement. Each one is hyperlinked to the corresponding trainzscript function, though it is not necessary to know them. See [[#values|values]] for instructions on how to implement these properties.
 
::*[[Class_MeshObject#SetFXTextureReplacement|<span style="color: #0080ff">texture-replacement</span>]]
 
::*[[Class_MeshObject#SetFXTextureReplacement|<span style="color: #0080ff">texture-replacement</span>]]
 
:::Replaces a texture effect in this asset to one within a texture-group asset.
 
:::Replaces a texture effect in this asset to one within a texture-group asset.
Line 372: Line 622:
  
 
<table width=1200><tr><td>
 
<table width=1200><tr><td>
<!--start duration-->
+
====kind====
====duration====
+
:Type:      String
:Type:      Float
+
 
:Compulsory: No
 
:Compulsory: No
 
:Default:    None
 
:Default:    None
:Desc:      For kind mesh-animation and mesh-toggle. This tag determines the time to transition to the next state for the value. If it is 0, the transition will occur instantaneously. <b>(There may be issues with using this tag with mesh-toggle.)</b>
+
:Desc:      The type of property this will be. Can be one of the options below. Most of these are derived from [[Class MeshObject|Class_MeshObject]]. For more info on implementing these, see [[#values|values]].
:Example:   duration 3.2
+
::*mesh-attachment
<!--end duration-->
+
:::Manipulate the mesh’s animation, position, visibility, etc. See mesh-attachment-type.
 +
::*fx-replacement
 +
:::Change an effect in the mesh. See [[#fx-replacement-type|fx-replacement-type]].
 +
::*particle-effect
 +
:::Activate/Deactivate/Edit a particle effect (smoke0, smoke1, etc). See [[#particle-effects|particle-effects]] and [[#particle-effect=type|particle-effect-type]].
 +
::*sound-script
 +
:::Used to play a sound-script sound within this asset. See [[#sound-triggers|sound-triggers]].
 +
::*config-edit
 +
:::Used to edit a tag in the wagon-x config soup. See paths.
 
</td></tr></table>
 
</td></tr></table>
  
Line 389: Line 646:
 
:Compulsory: No
 
:Compulsory: No
 
:Default:    None
 
:Default:    None
:Desc:      The comma-separated mesh-table asset(s) to be modified by the property. Use this for [[HowTo/WagonX - Technical Reference#kind]] mesh-toggle or kind mesh-animation. Use this tag, the effect tag, or the asset tag, but not more than one.
+
:Desc:      The comma-separated mesh-table asset(s) to be modified by the property. Use this for [[#kind|kind]] mesh-toggle or kind mesh-animation. Use this tag, the effect tag, or the asset tag, but not more than one.
 
<!--end meshes-->
 
<!--end meshes-->
 
</td></tr></table>
 
</td></tr></table>
  
 
<table width=1200><tr><td>
 
<table width=1200><tr><td>
<!--start of effects (textures)-->
+
<!--start mesh-attachment-->
====effects====
+
====mesh-attachment-type====
:Type:      String - (a list of texture names (i.e. texture.txt names without the .txt) each separated by a comma)
+
:Type:      String - (kind mesh-attachment only)
:Example:    effects "texture-albedo,texture-parameter"
+
:Example:    kind                      "mesh-attachment"
 +
::          mesh-attachment-type      "mesh-animation-frame"
 
:Compulsory: No
 
:Compulsory: No
 
:Default:    None
 
:Default:    None
:Desc:      The comma-separated effect(s) to be modified by the property. Only use this tag if you are using [[HowTo/WagonX - Technical Reference#kind]] fx-replacement. Use this tag, the mesh tag, or the asset tag, but not more than one.
+
:Desc:      The type of mesh property this property will be if the kind tag is set to mesh-attachment. Each one is hyperlinked to the corresponding trainzscript function, though it is not necessary to know them. See values for instructions on how to implement these properties.
<!--end of effects-->
+
::*[[Class_MeshObject#SetMeshVisible|<span style="color: #0080ff">mesh-toggle</span>]]
 +
:::Toggle between the mesh(s) being visible or hidden.
 +
::*[[Class_MeshObject#SetMeshOrientation|<span style="color: #0080ff">mesh-translation-orientation</span>]]
 +
:::Sets the translation and orientation of the mesh(es)
 +
::*[[Class_MeshObject#SetMeshAnimationFrame|<span style="color: #0080ff">mesh-animation-frame</span>]]
 +
:::Sets the frame(s) the meshes animation will move between. Useful for door opening and closing animations, or animations that require more than 2 states.
 +
::*[[Class_MeshObject#StartMeshAnimationLoop|<span style="color: #0080ff">mesh-animation-loop</span>]]
 +
:::Start or stop an animation-loop on the mesh.
 +
::*[[Class_MeshObject#SetMeshAnimationState|<span style="color: #0080ff">mesh-animation-state</span>]]
 +
:::Sets the state of the mesh(s) animation.
 +
::*[[Class_MeshObject#SetMeshAnimationSpeed|<span style="color: #0080ff">mesh-animation-speed</span>]]
 +
:::Changes the speed of the meshes animation.
 +
<!--end mesh-attachment-->
 +
</td></tr></table>
 +
 
 +
<table width=1200><tr><td>
 +
====name====
 +
:Type:      String
 +
:Compulsory: Yes
 +
:Default:    None
 +
:Desc:      The display name of this property, as will appear on the properties page.
 
</td></tr></table>
 
</td></tr></table>
  
<table width=1200><tr><td>
 
 
<!--start of particle-effects-->
 
<!--start of particle-effects-->
 +
<table width=1200><tr><td>
 
====particle-effects====
 
====particle-effects====
 
:Type:      String - (a list of integer numbers as a string)
 
:Type:      String - (a list of integer numbers as a string)
Line 415: Line 693:
 
</td></tr></table>
 
</td></tr></table>
  
 +
<!--start of particle-effect-type-->
 +
<!--need to come back and check this as I don't understand how this works-->
 
<table width=1200><tr><td>
 
<table width=1200><tr><td>
<!--start target-asset tag-->
+
====particle-effect-type====
====target-asset====
+
:Type:      String (kind mesh-attachment only)
:Type:      String
+
:Example:    target-asset "bogey-0"
+
 
:Compulsory: No
 
:Compulsory: No
 
:Default:    None
 
:Default:    None
:Desc:      This determines which assets config this property will manipulate. This tag is currently only used for manipulating a vehicles bogey (e.g. texture replacement). The name must be “bogey-” + the index of the bogey to edit. This gives you full access to the bogeys mesh-table, allowing you to set texture replacements, mesh toggles, and other properties within the bogey. This tag can be omitted if you are not doing bogey texture replacements. <b>Only properties of kind “mesh-attachment” or “fx-replacement” can be used for properties that use this tag.</b>
+
:Desc:      The type of PFX function this property will be if the [[#kind|kind]] tag is set to particle-effect.
<!--end target-asset tag-->
+
Each one is hyperlinked to the corresponding trainzscript function, though it is not necessary to know them. See [[#values|values]] for instructions on how to implement these properties. Most of these are derived for the PFXEmitter properties specified in [[MapObject|Class MapObject]], with the prefix “GetPFXEmitter” omitted. All except [[MapObject#SetPFXEmitterTexture|SetPFXEmitterTexture]] are supported.
 +
:Example:    kind  "particle-effect"
 +
:            particle-effect-type "pfx-message"
 +
:Comments:  Needs to be validated with examples!
 +
::*[[pfx_Message|pfx-message]]
 +
:::Send a message to enable/disable a particle effect.
 +
::*[[Class_MapObject#SetPFXEmitterConeSize|cone-size <b><i>(added in v1.2)</i></b>]]
 +
:::Update the cone size with x,y and z sizes in values tag.
 +
::*[[Class_MapObject#SetPFXEmitterEmitParticles|emit-particles <b><i>(added in v1.2)</i></b>]]
 +
:::Update the number of particles and time they will be created.
 +
::*[[Class_MapObject#SetPFXEmitterEndColor|end-color <b><i>(added in v1.2)</i></b>]]
 +
:::Update the end colour of the particles.
 +
::*[[Class_MapObject#SetPFXEmitterStartColor|start-color <b><i>(added in v1.2)</i></b>]]
 +
:::Update the start colour of the particles.
 +
::*[[Class_MapObject#SetPFXEmitterLifetime|lifetime <b><i>(added in v1.2)</i></b>]]
 +
:::Update the emitter lifetime using seconds.
 +
::*[[Class_MapObject#SetPFXEmitterMaxRate|max-rate <b><i>(added in v1.2)</i></b>]]
 +
:::Update the emitter maximum rate per second.
 +
::*[[Class_MapObject#SetPFXEmitterMinRate|min-rate <b><i>(added in v1.2)</i></b><b><i>(added in v1.2)</i></b>]]
 +
:::Update the emitter minimum rate per second.
 +
::*[[Class_MapObject#SetPFXEmitterMaxSize|max-size <b><i>(added in v1.2)</i></b>]]
 +
:::Update the maximum size size of particles. The size is a single float.
 +
::*[[Class_MapObject#SetPFXEmitterMinSize|min-size <b><i>(added in v1.2)</i></b>]]
 +
:::Update the minimum size of particles.  The size is a single float.
 +
::*[[Class_MapObject#SetPFXEmitterPhysicsDelay|physics-delay <b><i>(added in v1.2)</i></b>]]
 +
:::Update the physics delay for the emitter.  The delay value is in seconds.
 +
::*[[Class_MapObject#SetPFXEmitterRate|rate <b><i>(added in v1.2)</i></b>]]
 +
:::Set a new rate of particle creation per second.
 +
::*[[Class_MapObject#SetPFXEmitterVelocity|velocity <b><i>(added in v1.2)</i></b>]]
 +
:::Set the emitter velocity in metres per second along the direction vector.
 +
 
 +
For examples see.... (tbd)
 
</td></tr></table>
 
</td></tr></table>
  
 +
<!--start paths tag-->
 
<table width=1200><tr><td>
 
<table width=1200><tr><td>
<!--start asset tag-->
+
<!--THIS DOESN'T LOOK RIGHT - CHECK-->
====asset====
+
====paths====
 +
:Type:      String - (a list of two strings)
 +
:Example:    paths                      "marker-lights/night-only""
 +
:Compulsory: Yes
 +
:Default:    None
 +
:Desc:      For kind config-edit. A comma-separated list of paths that point to the tag in the wagon-x config to edit.
 +
<!--end paths tag-->
 +
</td></tr></table>
 +
 
 +
<!--start property-id tag-->
 +
<table width=1200><tr><td>
 +
====property-id====
 +
:Type:      String
 +
:Compulsory: Yes
 +
:Default:    None
 +
:Desc:      The formal name (ID) of this property, used to identify and change this property. For example, If the name is <b>Workflow</b>, it might be a good idea to call this <b>p_workflow</b>. <div style="color: #ff0080">This must be unique for each browser-property</div>.
 +
</td></tr></table>
 +
 
 +
<!--start property-sync-id tag-->
 +
<table width=1200><tr><td>
 +
====property-sync-id====
 
:Type:      String
 
:Type:      String
:Example:    asset "texturelib"
 
 
:Compulsory: No
 
:Compulsory: No
 
:Default:    None
 
:Default:    None
:Desc:      The kuid-table asset to be used by the property. Use this for cases where you need to reference another asset outside of this, such as a texture-replacement library. Use this tag, the [[HowTo/WagonX - Technical Reference#effects]] tag, the [[HowTo/WagonX - Technical Reference#meshes]] tag, or the [[HowTo/WagonX - Technical Reference#particle-effects]] tag,  but not more than one.
+
:Desc:      The ID that determines which assets will be affected when consist-property-sync is activated. Only assets that share this ID will be synced in the consist, so be sure to make it particular and unique.
<!--end asset tag-->
+
:Example:    property-sync-id  "soundBell"
 
</td></tr></table>
 
</td></tr></table>
  
 +
<!--start property-visibility tag-->
 +
<table width=1200><tr><td>
 +
====property-visibility====
 +
:Type:      Integer - (0 = Hidden, 1 = Visible, 2 = Surveyor Only, 3 = Driver Only)
 +
:Compulsory: No
 +
:Default:    0 (hidden)
 +
:Desc:      Indicates whether the property will be visible in the Properties Browser and in what mode.
 +
</td></tr></table>
 +
 +
<!--start sound-triggers-->
 
<table width=1200><tr><td>
 
<table width=1200><tr><td>
<!--start files-path tag-->
+
====sound-triggers====
====files-path====
+
:Type:      String - (a list of strings)
:Type:      String - (a list of two strings)
+
:Example:    sound-triggers            "bell_1,bell_2"
:Example:    files-path "images/,.texture"
+
 
:Compulsory: No
 
:Compulsory: No
 
:Default:    None
 
:Default:    None
:Desc:      An optional tag that shortens the number of characters that need to be written to the “values“ tag, assuming they all share the same path or asset library and extension. The path and extension can be specified here (e.g. <b>files-path “images/left/.texture”</b>), where images/left is the path, and .texture is the extension for all the files.
+
:Desc:      For kind sound-script only. This specifies the soundscript trigger(s) (comma separated) that this property will start/stop when the property is activated.
<!--end files-path tag-->
+
 
 
</td></tr></table>
 
</td></tr></table>
 +
<!--end sound-triggers-->
  
 +
<!--start target-asset tag-->
 
<table width=1200><tr><td>
 
<table width=1200><tr><td>
<!--start paths tag-->
+
====target-asset====
<!--THIS DOESN'T LOOK RIGHT - CHECK-->
+
:Type:      String
====paths====
+
:Example:    target-asset "bogey-0"
:Type:      String - (a list of two strings)
+
:Compulsory: No
:Example:    paths                      "marker-lights/night-only""
+
:Compulsory: Yes
+
 
:Default:    None
 
:Default:    None
:Desc:      For kind config-edit. A comma-separated list of paths that point to the tag in the wagon-x config to edit.
+
:Desc:      This determines which assets config this property will manipulate. This tag is currently only used for manipulating a vehicles bogey (e.g. texture replacement). The name must be “bogey-” + the index of the bogey to edit. This gives you full access to the bogeys mesh-table, allowing you to set texture replacements, mesh toggles, and other properties within the bogey. This tag can be omitted if you are not doing bogey texture replacements. <b>Only properties of kind “mesh-attachment” or “fx-replacement” can be used for properties that use this tag.</b>
<!--end paths tag-->
+
 
</td></tr></table>
 
</td></tr></table>
 +
<!--end target-asset tag-->
  
 +
<!--start trigger-->
 
<table width=1200><tr><td>
 
<table width=1200><tr><td>
 +
====trigger====
 +
:Type:      String
 +
:Example:    trigger                    "user"
 +
:Compulsory: No
 +
:Default:    Null (ignored)
 +
:Desc:      The event that will trigger/activate this property. Can be either an external event, such as a coal-loading animation, or a user-controlled event, or both. Setting it to none is useful if this is a [[#child-properties|child-properties]] property of another property. Possible values are:
 +
:::*user
 +
:::*event
 +
:::*parent
 +
:::*condition <b><i>(added in v1.2)</i></b>
 +
:::*variable <b><i>(added in v1.2)</i></b>
 +
::::multiple <b><i>(added in v1.2)</i></b>
 +
:::*both <b><i>(obsolete as of v1.2)</i></b>
 +
:::*none
 +
<br>
 +
:User:      Used when the property is updated by the user in the Properties Browser.
 +
:Event:    Used when the property is to be triggering by an event initiated by Trainz such as day to night.  These are generally the result of messages posted either by the system or other asset scripts.
 +
:Parent:    Used in a child property where the property is to be activated by a parent property.
 +
:Condition: TBA
 +
:Variable:  TBA
 +
:Multiple:  TBA
 +
:Both:      TBA
 +
:None:      No trigger.
 +
</td></tr></table>
 +
<!--end trigger-->
 +
 +
<!--start update-events-->
 +
<table width=1200><tr><td>
 +
 +
====update-events====
 +
<b><i>(added in v1.2)</i></b>
 +
:Type:      String - (a list of strings)
 +
:Compulsory: No
 +
:Default:    None
 +
:Desc:      Very similar to the ‘events’ tag, except this tag triggers a refresh of the conditional and variable events within this property based on the triggered event. By default, conditional events refresh at a certain time interval, based on the ‘update-frequency’ tag. Adding this tag will refresh the property immediately when the trigger event is activated. Can be any of the property events in the ‘events’ tag.
 +
</td></tr></table>
 +
<!--end update-events-->
 +
 
<!--start values tag-->
 
<!--start values tag-->
 +
<table width=1200><tr><td>
 
====values====
 
====values====
 
:Type:      String - (a string list separated by special characters)
 
:Type:      String - (a string list separated by special characters)
Line 467: Line 845:
 
:Compulsory: No
 
:Compulsory: No
 
:Default:    None
 
:Default:    None
:Desc:      A comma-separated (and optionally semicolon-separated) list of all the files/values to be switched between. If the files-path tag is used, only include each file’s name (exclude the path and extension). This tag is required for all properties. If it is not wanted, leave the value at “1”, but keep the tag still. For booleans, use 1 for true, and 0 for false. For animations, specify the animation frames you want to toggle through. For details on using the semicolon separator to shorten properties, see [[HowTo/WagonX - Browser Properties Examples and Basic Tutorials#Using Semicolons to set multiple values in one property]].
+
:Desc:      A comma-separated (and optionally semicolon-separated) list of all the files/values to be switched between. If the files-path tag is used, only include each file’s name (exclude the path and extension). This tag is required for all properties. If it is not wanted, leave the value at “1”, but keep the tag still. For booleans, use 1 for true, and 0 for false. For animations, specify the animation frames you want to toggle through. For details on using the semicolon separator to shorten properties, see [[WagonX_-_Browser_Properties_Examples_and_Basic_Tutorials#Using_semicolons_to_set_multiple_values_in_one_property|Examples and Basic Tutorials]].<br>
:<b>Each kind has its own rules for what to put here, explained below. See the [[HowTo/WagonX - Technical Reference#kind]] property for more info on these.</b>
+
Each kind has its own rules for what to put here, explained below. See the [[#kind|kind]] property for more info on these.<br>
 
<!--mesh-attachment-->
 
<!--mesh-attachment-->
 
:::*For kind mesh-attachment:
 
:::*For kind mesh-attachment:
Line 476: Line 854:
 
<!--mesh-attachment-type-->
 
<!--mesh-attachment-type-->
 
:::*For mesh-attachment-type mesh-animation-speed, the value is the speed of the animation for that index
 
:::*For mesh-attachment-type mesh-animation-speed, the value is the speed of the animation for that index
:::*For mesh-attachment-type mesh-animation-loop, the value will be an integer bool (0 or 1) to indicate whether to start the loop, or stop it. You can create a separate property that controls the mesh-animation-speed, and link it via a [[HowTo/WagonX - Technical Reference#child-properties]] property to control the speed of the loop.
+
:::*For mesh-attachment-type mesh-animation-loop, the value will be an integer bool (0 or 1) to indicate whether to start the loop, or stop it. You can create a separate property that controls the mesh-animation-speed, and link it via a [[#child-properties|child-properties]] property to control the speed of the loop.
 
:::*For mesh-attachment type mesh-animation-frame, the value is the frame of the animation to jump to. Setting it to -1 will put that index at the last animation frame in the mesh (see [[Class_MeshObject#GetMeshAnimationFrameCount|<span style="color: #0080ff">GetMeshAnimationFrameCount</span>]]).
 
:::*For mesh-attachment type mesh-animation-frame, the value is the frame of the animation to jump to. Setting it to -1 will put that index at the last animation frame in the mesh (see [[Class_MeshObject#GetMeshAnimationFrameCount|<span style="color: #0080ff">GetMeshAnimationFrameCount</span>]]).
 
::::Example:  values  "0,30"
 
::::Example:  values  "0,30"
Line 486: Line 864:
 
<!--particle-effect-->
 
<!--particle-effect-->
 
:::*For kind particle-effect:
 
:::*For kind particle-effect:
:::*For particle-effect-type pfx-message, the value follows the same rules for [[pfx message|<span style="color: #0080ff">pfx messages</span>]].
+
:::*For particle-effect-type pfx-message, the value follows the same rules for [[Pfx_Message|pfx message]].
 
::::*particle-effect-type      "pfx-message"
 
::::*particle-effect-type      "pfx-message"
 
::::Example:  values  "+0+1,-1-0"
 
::::Example:  values  "+0+1,-1-0"
Line 495: Line 873:
 
::::Example: values  “0,2,1”
 
::::Example: values  “0,2,1”
  
kuid          <kuid:1234:123456>
+
  kuid          <kuid:1234:123456>
username      "test texture group asset"
+
  username      "test texture group asset"
trainz-build  4.6
+
  trainz-build  4.6
description  "test texture group"
+
  description  "test texture group"
textures
+
  textures
{
+
  {
  0          "textures\0albedo.texture"
+
  0          "textures\0albedo.texture"
  1          "textures\1albedo.texture"
+
  1          "textures\1albedo.texture"
  2          "textures\2albedo.texture"
+
  2          "textures\2albedo.texture"
  3          "textures\0parameter.texture"
+
  3          "textures\0parameter.texture"
  4          "textures\1parameter.texture"
+
  4          "textures\1parameter.texture"
  5          "textures\2parameter.texture"  
+
  5          "textures\2parameter.texture"  
  6          "textures\0normal.texture"
+
  6          "textures\0normal.texture"
  7          "textures\1normal.texture"
+
  7          "textures\1normal.texture"
  8          "textures\2normal.texture"         
+
  8          "textures\2normal.texture"         
}
+
  }
  
  
Line 518: Line 896:
 
::::Example: values "congleton,burntisland,buxton,none"  
 
::::Example: values "congleton,burntisland,buxton,none"  
  
      0
+
  0
      {
+
  {
        enabled                    1
+
  enabled                    1
        property-visibility        1
+
  property-visibility        1
        name                      "Workflow Text: "
+
  name                      "Workflow Text: "
        property-id                "p_workflow"
+
  property-id                "p_workflow"
        description                "Sets the Workflow"
+
  description                "Sets the Workflow"
        kind                      "fx-replacement"
+
  kind                      "fx-replacement"
        fx-replacement-type        "texture-replacement-texture"
+
  fx-replacement-type        "texture-replacement-texture"
        consist-property-sync      1
+
  consist-property-sync      1
        meshes                    "null"
+
  meshes                    "null"
        effects                    "texture-extra"
+
  effects                    "texture-extra"
        asset                      "null"
+
  asset                      "null"
        files-path                "images/,.texture"
+
  files-path                "images/,.texture"
        values                    "congleton,burntisland,buxton,none"
+
  values                    "congleton,burntisland,buxton,none"
        default-index              0
+
  default-index              0
        trigger                    "user"
+
  trigger                    "user"
        display-type              "list"
+
  display-type              "list"
        display-values            "Congleton,Burntisland,Buxton,None"
+
  display-values            "Congleton,Burntisland,Buxton,None"
      }
+
  }
  
::::*For fx-replacement-type attachment, the values are the names of the attachment effects to be replaced by the specified [[HowTo/WagonX - Technical Reference#asset]].
+
::::*For fx-replacement-type attachment, the values are the names of the attachment effects to be replaced by the specified [[#asset|asset]].
::::*For fx-replacement-type corona, the values are the names of the corona effects to be replaced by the specified [[HowTo/WagonX - Technical Reference#asset]].
+
::::*For fx-replacement-type corona, the values are the names of the corona effects to be replaced by the specified [[#asset|asset]].
::::*For fx-replacement-type animation, the values are the names of the animation effects to be replaced by the specified [[HowTo/WagonX - Technical Reference#asset]].
+
::::*For fx-replacement-type animation, the values are the names of the animation effects to be replaced by the specified [[#asset|asset]].
 
::::*For fx-replacement-type name, the values are the names that will replace the current name of the specified name effect.
 
::::*For fx-replacement-type name, the values are the names that will replace the current name of the specified name effect.
<!--end values tag-->
 
</td></tr></table>
 
  
<table width=1200><tr><td>
 
<!--start default-index-->
 
====default-index====
 
:Type:      Integer (-1 = random)
 
:Example:    default-index  0
 
:Compulsory: No
 
:Default:    0
 
:Desc:      The default index for the property to start at. This will be 0 if the tag is left out. If it is -1, it will choose a random index to start at.
 
<!--end default-index-->
 
 
</td></tr></table>
 
</td></tr></table>
 +
<!--end values tag-->
  
 +
<!--start variables-->
 
<table width=1200><tr><td>
 
<table width=1200><tr><td>
<!--start sound-triggers-->
+
====variables====
====sound-triggers====
+
<b><i>Added in version 1.2 (needs validation)</i></b>
:Type:      String - (a list of strings)
+
:Example:    sound-triggers            "bell_1,bell_2"
+
:Compulsory: No
+
:Default:    None
+
:Desc:      For kind sound-script only. This specifies the soundscript trigger(s) (comma separated) that this property will start/stop when the property is activated.
+
<!--end sound-triggers-->
+
</td></tr></table>
+
 
+
<table width=1200><tr><td>
+
<!--start trigger-->
+
====trigger====
+
 
:Type:      String
 
:Type:      String
:Example:    trigger                    "user"
 
:Compulsory: No
 
:Default:    Null (ignored)
 
:Desc:      The event that will trigger/activate this property. Can be either an external event, such as a coal-loading animation, or a user-controlled event, or both. Setting it to none is useful if this is a [[HowTo/WagonX - Technical Reference#child-properties]] property of another property. Possible values are:
 
:::*user
 
:::*event
 
:::*both
 
:::*none
 
<!--end trigger-->
 
</td></tr></table>
 
 
<table width=1200><tr><td>
 
<!--start events-->
 
====events====
 
:Type:      String - (a list of strings)
 
:Example:    events  "handbrake-release,handbrake-apply"
 
 
:Compulsory: No
 
:Compulsory: No
 
:Default:    None
 
:Default:    None
:Desc:      For trigger kind “event” only. An array of the event(s) that must take place for the property value at the index to activate. Can be one of the following (separated by forward slashes and commas to save space).
+
:Desc:      For trigger kind “variable”. An array of variable event(s) that control the value of the property using any of the conditional values and five arithmetic operators, ‘+’ (addition), ‘-’ (subtraction), ‘*’ (multiplication), ‘/’ (division), ‘^’ (exponent). You can use as many ‘|’ separated operators as you want. The operations do not follow the standard PEMDAS order of operations but are performed in a left-to-right additive manner.
:::*begin-load/end-load/begin-unload/end-unload
+
:Example1:   a*b+c is the same as (a*b)+c,
:::*handbrake-apply/handbrake-release
+
:Example2:   c+a*b is the same as (c+a)*b, and
:::*trainbrake-apply/trainbrake-release
+
:Example3:   a*b+c/2 is the same as ((a*b)+c)/2
:::*headlight-on, headlight-off
+
:::*horn
+
:::*bell
+
:::*sanding
+
:::*pantograph-state-0/1/2/3 (see [[Class_Train#GetPantographState|<span style="color: #0080ff">GetPantographState</span>]])
+
:::*weather-0/1/2/3/4/5/6/7 (see [[Class_World#GetWeatherType|<span style="color: #0080ff">GetWeatherType</span>]])
+
:::*world-day/world-night
+
:::*queue-(0 - ?)- loaded/empty (e.g. <b>queue-0-loaded, queue-1-empty</b>)
+
<!--end events-->
+
 
</td></tr></table>
 
</td></tr></table>
 +
<!--end variables-->
  
 +
<!--start copyright notice-->
 
<table width=1200><tr><td>
 
<table width=1200><tr><td>
<!--start display-type-->
 
:Type:      String
 
:Example:    display-type              "link"
 
:Compulsory: No
 
:Default:    None
 
:Desc:      For trigger type “user” and “event” only. The type of button this will be. It can be any of the trainz property browser value types, plus “manual”, but not map-object or asset-list. <b>For trainzbuild 5.1 and 5.0, only link is supported for the View Details page.</b> Omitting this tag in combination with property-visibility set to 0 is useful for non-user triggers, such as world or train events.
 
:::*string
 
:::*int
 
:::*float
 
:::*list
 
:::*link
 
<!--end display-type-->
 
</td></tr></table>
 
 
<table width=1200><tr><td>
 
<!--start display-values-->
 
====display-values====
 
:Type:      String - (a list of strings)
 
:Example:    display-values            "Clean,Weathered,Dirty"
 
:Compulsory: No
 
:Default:    None
 
:Desc:      For trigger type “user” and “event” only, and required for trigger type “user” properties to work, but optional for trigger type “event”. A list of comma-separated values which will be displayed in the view details page for the respective property. The number of values here must match the number of values in the “values” tag.
 
<!--end display-values-->
 
</td></tr></table>
 
 
 
<table width=1200>
 
 
=Copyright Notice=
 
=Copyright Notice=
 
Much of the content on this page and child pages was derived from Dundun92's original Google Docs document.  Permission was granted to use that information here.
 
Much of the content on this page and child pages was derived from Dundun92's original Google Docs document.  Permission was granted to use that information here.
</table>
+
</td></tr></table>
 +
<!--end copyright notice-->

Latest revision as of 10:13, 5 March 2024

</td>

[edit] Document Structure

The WagonX Tutorial set is written over several pages. This page is a base reference for using WagonX config containers, their properties and the values for those properties. Other pages in the series are:

  1. How to use the WagonX library
  2. WagonX Examples and Basic Tutorials
  3. WagonX Traincar Tutorial
  4. WagonX Locomotive Tutorial

Contents


[edit] The WagonX Reference

This page contains details of the WagonX extension container and sub-containers. Links to examples of use will be provided when available.

[edit] Restricted Characters

The characters in the list below cannot be used for some property tag values as they are used by the script to parse or identify values such as list items and other information. They can be used in name and description tags. Use of these characters in tag values is identified in the properties descriptions that follow. See also display-values.

  • Comma ( , )
  • Semicolon ( ; )
  • Backtick/Grave ( ` )
  • Colon ( : )
  • Caret ( ^ )
  • Round brackets ( and )

[edit] Using commas and semi-colons in a list

WagonX uses commas to identify items in a list. Some examples might be "1,2,3,4"for a list of four integers, "Rita, Rose, Ruth" of three nameboards for a Pullman car, and "0,1" for a list of booleans (false and true).
Semi-colons are used to items in a set, where sets are items in a list. Le's say we have three sets each consisting of integer numbers,then we might use something like "1;2;3;4,9;3;6;5,13;12;15;16". The first set is 1,2,3 and 4, the second set 9,3,6 and 5, and the last 13,12,15 and 16.
This notation is common where we might want apply some value to items in a set. For example, our sets might each consist of four meshes for a car to which we want to apply a particular livery. List such as these are commonly used in the values tag.
See also Using semicolons to set multiple values in one property.

[edit] Using the grave symbol in a list

The backtick or grave symbol allows you to set multiple variables on a single function in one property. It's typically used to set the value for all the parameters in the pfx emitter functions. It's also used for mest-attachment-type mesh-translation-orientation parameters. For example, if you want to set the start color with these values (0,0,128,128,128,64), but you want each of those variables to be set in one property then use "0`0`128`128`128`64". You can also use this symbol to populate your set of parameters with variables such as "veh_velocity|/|2`veh_velocity|+2`veh_velocity|-|loc_abs_reverser". In simple english that means the first parameter is the vehicle velocity divided by 2, the second parameter is the vehicle velocity plus 2, and the final parameter is the vehicle length minus the absolute value of the loco reverser. Hmm, that doesn't make a lot of sense but its only an example.

[edit] Other special characters

Caret - The caret/circumflex symbol (^) is a math power operator. It can be used in variables.
Round Brackets - Round brackets are used to group mesh vectors translation and orientation. In this instance, colons are used to separate the vectors. For example, "(0`2`4):(1.2`2`2),(0`0`0):(0`0`0)". See values.
Colon - See Round Brackets above.

[edit] General Layout

WagonX config tags are defined in the extensions container along with other extensions such as ACS Lib. The general layout of the extensions container that also includes ACS Lib might look like this:

extensions
{
  max_permitted_speed-60850     "50mph"
  active-coupling-standard-60850
  {
   ...
  }
  wagon-x
  {
   ...
  }
}

[edit] WagonX Properties

There are currently four standard or "top level" WagonX containers that define properties for Marker Lights,text-x, a variation of ACSLib and Misc (miscellaneous). In addition to the standard containers, you can define zero or more additonal property containers that are identified by integer value names starting from 0. Each of these containers are defined below.


[edit] ACS

For help on creating the acs extensions and setting up the acs mesh-table objects, see Naming ACS mesh-table attachments.
Each tag is shown here with sample values. There are no default values.

acs
{
  animated                            1
  use-jbv-animation                   1
  duration                            1.0
}
  • animated (1 = true, 0=false)
This determines whether to use animations to move between the coupled and uncoupled state, or use individual static assets for each state.
  • use-jbv-animation (1 = true, 0=false)
An animation system the author (DunDun92) made for compressing buffers and dynamic couplings and hoses, which is now being phased out due to performance problems. leave it at 0, unless you are using the JBV BR Mesh Library or BR class 101 mesh library, or any of his other libraries.
  • duration (a floating point value)
The time, in seconds, that the mesh animation will take to move between the two states. If animated is set to 0, this will determine the fade duration when switching between meshes (fade duration on mesh objects in trainzbuild 5.0 + can get buggy)
  • buffer-length-front float
The distance between a.couple0 and a.limfront in meters. To be used with the jbv animation system. Requires the ‘use-jbv-animation’ tag to be set to 1
  • buffer-length-back float
The distance between a.couple1 and a.limback in meters. To be used with the jbv animation system. Requires the ‘use-jbv-animation’ tag to be set to 1

[edit] text-x

WagonX V1.2 or greater. (description yet to be included - ARN and/or headcodes? - validation required)

  • controller string
Determines how the property will be controlled. Can be controlled by the user, the running number, or a custom range.
  • user
  • arn
  • range
  • range string
Defines the range of values the for the text proprety. It will choose a random index to start
  • value string
The default value for the text property. This can be formated in two ways. For texture files with single-character identifiers, each character can be written together (e.g. “a12d”). For texture files with multiple-character identifiers, each identifier needs to be separated by a comma (e.g. “dot,3,dash,k”).
  • font int
The default font index for the text property, these values can be changeed by adding a “config-edit” property to the browser-properties.
  • files-path string
An optional tag that shortens the number of characters that need to be written to the “values“ tag, assuming they all share the same path or asset library and extension. The path and extension can be specified here (e.g. files-path “images/left/.texture”), where images/left is the path, and .texture is the extension for all the files.
  • textures string
The list of texture files to use. The ‘#’ symbol is used by the script as a placeholder identifier for the value input. For example, if it is set to ‘alpha_digit-#’, each letter and number will go where the ‘#’, e.g. If the first chartcher in the value tag is ‘a’, it will look for the texture ‘images/alpha_digit-a.texture’, to use for the first texture effect digit. Each comma separated value coorispinds to the font to use at each index.
  • effects string
The texture replacement effects to use for displaying the text.

Each tag is shown here with sample values.

text-x
{
 text-properties
 {
   headcode
   {
   controller                "user"
   range                     "null"
   value                     "2,5,dots,2"
   font                      0
   files-path                "images/,.texture"
   textures                  "fd-#"
   effects                   "fdigit-1,fdigit-2,fdigit-3,fdigit-4"
   }
 }
}

[edit] Misc

The misc container currently contains times, in seconds, for industry loading and unloading. Usually, these times are used to enable animations to run before or after loading/unloading.

Each available tag is shown here with sample values. There are no defaults.

misc
{
  begin-load-time                   5.0
  begin-unload-time                 5.0
  end-load-time                     1.0
  end-unload-time                   1.0
}
  • mobile float (added in v1.2)
Setting this to 1 indicates this asset is indended for use on trainz mobile platforms. This will disable and/or compromise certain script features to reduce complexity and improve performance for mobile devices.
  • update-frequency float (added in v1.2)
The frequency, in seconds, at which certain event triggered browser-properties are updated. This has a huge impact on performance, and it is best kept as high as possible, ideally 5 or more secconds. The minimum allowed value is 1. If the moible tag is set to 1, the minumum allowed value is 3 secconds.
  • begin-load-time (a floating point value)
The time it takes for the wagon to load at an industry
  • begin-unload-time (a floating point value)
The time it takes for the wagon to unloading at an industry
  • end-load-time (a floating point value)
The time it takes for the wagon end loading at an industry
  • end-unload-time (a floating point value)
The time it takes for the wagon to end unloading at an industry

[edit] Marker-Lights

The Marker-Lights container is used to show or hide light meshes that are identied by entries in the config mesh-table.

Each tag is shown here with sample values. There are no defaults.

marker-lights
{
  enabled                             1
  car-minimum-count                   1
  require-locomotive                  1
  night-only                          0
  front
  {
    head
    {
      mesh                            "null"
    }
    tail
    {
      mesh                            "lamp-front-red"
    }
  }
  back
  {
    head
    {
      mesh                            "lamp-back-white"
    }
    tail
    {
      mesh                            "lamp-back-red"
    }
  }
}


  • enabled (1 = true, 0=false)
Whether or not the marker lights are active on this asset.
  • car-minimum-count (an integer number)
The minimum number of cars that must be present in the consist for the marker-lights to activate.
  • require-locomotive (1 = true, 0=false)
If set to 1, a traincar of Class locomotive will need to be present in the consist for the marker-lights to activate.
  • night-only (1 = true, 0=false)
If set to 1, the lamps will only be visible at night, otherwise they will be displayed 24/7.
  • Front/back head/tail containers
These containers identify the mesh to use for the front, back, head, and tail lamps. These meshes must be in the config mesh-table.

[edit] Browser-Properties

  • The browser-properties container is a set of zero or more property containers that hold settings for a property such as a smoke effect, an attachment or even texture replacement. They are quite flexible and suitable most any traincar/loco property.
  • A property can have sub properties that are activated with their parent.
  • A property container has a number of tags with values. Many are common to different property types but some are unique to a property.
  • A container need not contain all available tags.
  • We start with a sample of two properties: one for a texture replacement (skin) and the second for a handbrake activation. These are representative only and may not be suitable for your asset,
 browser-properties
 {
   0
   {
     enabled                    1
     property-visibility        1
     name                       "Skin: "
     property-id                "p_skin"
     consist-property-sync      1
     description                "Sets the weathering type"
     kind                       "fx-replacement"
     fx-replacement-type        "texture-replacement"
     meshes                     "null"
     effects                    "texture-albedo,texture-parameter"
     asset                      "texturelib"
     files-path                 "null"
     values                     "0;3,1;4,2;5"
     default-index              -1
     trigger                    "user"
     display-type               "link"
     display-values             "Clean,Weathered,Dirty"
   }
   1
   {
     enabled                    1
     property-visibility        0
     name                       "Handbrake State: "
     property-id                "p_handbrake"
     description                "Toggle the handbrake"
     kind                       "mesh-attachment"
     mesh-attachment-type       "mesh-animation-frame"
     meshes                     "handbrake-lever,braking-system"
     values                     "0;0,30;30"
     events                     "handbrake-release,handbrake-apply"
     duration                   3.2
     default-index              0
     trigger                    "both"
     display-type               "link"
     display-values             "release,apply"
   }
 }

[edit] Supported Tags

Tag explanations. Some examples are included in the definition and, for others, see above for sample of usage.

[edit] asset

Type: String
Example: asset "texturelib"
Compulsory: No
Default: None
Desc: The kuid-table asset to be used by the property. Use this for cases where you need to reference another asset, such as a texture-replacement library. Use this tag, the effects tag, the meshes tag, or the particle-effects tag, but not more than one.


[edit] child-properties

Type: A string of numbers separated by commas.
Compulsory: No
Default: None
Desc: The list of properties that will activate when this property is activated. They will activate at the same index as the parent, similar to consist-property-sync. The property-visibility tag for the child properties should be set to 0. The child properties cannot have their own child-properties tag, and the property-visibility of the child-property must be 0, else it will not activate. You cannot set the child-property to yourself either.
Example: child-properties "2,4,5"

[edit] conditions

(added in v1.2)

Type: String - (a list of strings)
Compulsory: No
Default: None
Desc: For trigger kind “condition”. An array of conditional event(s) that must take place for the property value at the index to activate. Can be one of the following (separated by forward slashes and commas to save space).
The format in each comma-separated condition is a basic comparison operation with a left side, an operator, and a right side. The left and right sides can either be a variable (listed below), or a number (integer or float). The three parts are separated by a vertical bar. You can add more comparison operations to the same condition by adding an “&” (and) symbol after the first condition, then adding the second comparison operator (shown in the default conditions example above in black)(this is separate from the comma separation). You can add as many “&”s as you want to the operation, however it will get very long very quickly. The operators used are “==” (equals), “>” (greater than), “<” (less than), “>=” (greater than or equal to), “<=” (less than or equal to), and “!=” (not equal to), and must follow that format.
  • veh
Contains functions used within Class Vehicle. Subclasses can be any of the listed ones below. All of these are derived from Class Vehicle. Please refer to that page for information on function behavior and usage.
example 1: veh_velocity|>=|5&veh_mass>1500 -> in plain English this reads, “If vehicle velocity is greater than or equal to 5 m/s and the mass is greater then 1500, then…. do something.
example 2: veh_engine-param_main-reservoir-pressure|<|0.5 -> in plain English this reads, “If the vehicles engine parameter, ‘main-reservoir-pressure’ is greater than 0.5, then…. do something.
For float:
  • velocity (float)
  • abs-velocity (float)
The absolute value of the velocity, this is useful because moving in reverse will give negative inputs for “velocity”, but positive for “abs-velocity”
  • mass (float)
  • length (float)
  • load-time (float)
  • odometer-distance (float)
  • trip-meter-distance (float)
  • track-gradient (float)
  • maximum-tractive-effort (float)
  • default-maximum-tractive-effort (float)
  • wheelslip-traction-multiplier (float)
  • traction-multiplier (float)
  • aux-reservoir-pressure (float)
  • brake-cylinder-pressure (float)
  • brake-pipe-pressure (float)
  • cabin-sway-amount (float)
  • coupling-stress (float)
  • default-cabin-sway-amount (float)
  • default-maximum-coupler-compression-stress (float)
  • default-maximum-coupler-expansion-stress (float)
  • maximum-coupler-compression-stress (float)
  • maximum-coupler-expansion-stress (float)
  • maximum-couple-velocity (float)
  • default-maximum-couple-velocity (float)
For bool:
  • coupler-breakage-enabled (bool)
  • direction-relative-to-train (bool)
  • drain-cocks (bool)
  • random-automatic-running-number-support (bool)
  • automatic-running-number (bool)
  • high-beams (bool)
  • is-ditch-flashing (bool)
  • automatic-fireman-state (bool)
  • interior-light (bool)
  • interior-light-state (bool)
  • bell-state (bool)
  • has-bell (bool)
  • in-tunnel (bool)
  • on-bridge (bool)
  • derailed (bool)
  • loaded-this-stop (bool)
  • unloaded-this-stop (bool)
For integer:
  • engine-type (int)
  • vehicle-type-flags (int)
For string:
  • running-number (string)
And the engine parameter string:
  • engine-param
The main engine parameter strings you can use with this method are:
  • applied-force
  • brake-cylinder-pressure
  • brake-pipe-pressure
  • current-drawn
  • equaliser-pressure
  • flow
  • horn
  • main-reservoir-pressure
  • max-te
  • no3-pipe-pressure
  • wheelslip
Values that refer only to steam engines:
  • coal-mass
  • engine-force
  • fire-temperature
  • max-coal-mass
  • max-fire-temperature
  • steam-boiler-liquid-percent
  • steam-boiler-pressure
  • steam-piston-cycle
  • loc
Contains functions used within Class Locomotive. Subclasses can be any of the listed ones below. All of these are derived for Class Locomotive. Please refer to that page for information on function behavior and usage.
  • engine-setting
  • The engine setting, currently the only one for the parent class ‘loc’.
  • dynamic-brake
  • headlight
  • horn
  • injector
  • loco-auto-brake
  • pantograph
  • regulator
  • reverser
  • abs-reverser
  • steam-blower
  • throttle
  • train-auto-brake
  • train-lap-brake
  • script-brake-pressure
  • tra
For class Train
For float:
  • smoothed-velocity (float)
  • train-velocity (float)
  • abs-smoothed-velocity (float)
  • abs-train-velocity (float)
  • dcc-throttle (float)
  • train-brakes (float)
  • speed-limit (float)
  • advisory-limit (float)
  • advisory-limit-2 (float)
  • ai-train-max-speed (float)
For integer:
  • autopilot-mode (int)
  • reverser (int)
  • pantograph-state (int)
  • classification-signal (int)
  • train-priority-number (int)
  • frontmost-locomotive (int-bool)
For bool:
  • allows-user-control (bool)
  • headlight-state (bool)
  • ditchlight-state (bool)
  • bell-state (bool)
For string:
  • train-display-name (string)
  • owning-client (string)
  • wor
For class World
For float:
  • camera-yaw
  • camera-pitch
  • camera-zoom
  • game-time
  • game-season
For integer:
  • weather-type
  • weather-changeability
  • camera-mode
  • camera-flags
  • game-time
  • game-year
  • game-month
  • game-date
  • game-session
  • current-module
For string:
  • local-player-name (string)
For bool:
  • restart-stuck-ai (bool)
  • asset-restriction-in-effect (bool)


[edit] consist-property-sync

Type: Integer - (0 off, 1 on (button), 2 on (automatic)
Compulsory: No
Default: None
Desc: Whether or not to sync the property within the consist, if a tag with the same property-sync-id exists in the other assets. Omitting or setting the tag to 0 disables this. Setting it to 1 will create a button to the right of the property that can be clicked on to sync the property. Setting it to 2 will automatically sync the property across the consist whenever a change in the property is detected.

[edit] default-index

Type: Integer (-1 = random)
Example: default-index 0
Compulsory: No
Default: 0
Desc: The default index for the property to start at. This will be 0 if the tag is left out. If it is -1, it will choose a random index to start at.

Warning: If you have a list of values such as "1,2,3,4" and you want to set a default, then you should subtract 1 from the preferred value. For example if you want the first in the list then set the default to 0. This is because the browser counts the list entries from 0 and not 1.

[edit] description

Type: String
Compulsory: No
Default: None
Desc: The description of this attachment as it will appear in the Properties Browser.

[edit] display-type

Type: String
Example: display-type "link"
Compulsory: No
Default: None
Desc: For trigger type “user” and “event” only. The type of button this will be. It can be any of the trainz property browser value types, plus “manual”, but not map-object or asset-list. For trainzbuild 5.1 and 5.0, only link is supported for the View Details page. Omitting this tag in combination with property-visibility set to 0 is useful for non-user triggers, such as world or train events.
  • string
  • int
  • float
  • list
  • link

[edit] display-values

Type: String - (a list of strings)
Example: display-values "Clean,Weathered,Dirty"
Compulsory: No
Default: None
Desc: For trigger type “user” and “event” only, and required for trigger type “user” properties to work, but optional for trigger type “event”. A list of comma-separated values which will be displayed in the view details page for the respective property. The number of values here must match the number of values in the “values” tag.

[edit] duration

Type: Float
Compulsory: No
Default: None
Desc: For kind mesh-animation and mesh-toggle. This tag determines the time to transition to the next state for the value. If it is 0, the transition will occur instantaneously. (There may be issues with using this tag with mesh-toggle.)
Example: duration 3.2

[edit] effects

Type: String - (a list of texture names (i.e. texture.txt names without the .txt) each separated by a comma)
Example: effects "texture-albedo,texture-parameter"
Compulsory: No
Default: None
Desc: The comma-separated effect(s) to be modified by the property. Only use this tag if you are using kind fx-replacement. Use this tag, the mesh tag, or the asset tag, but not more than one.

[edit] enabled

Type: Boolean (1 = true, 0=false)
Compulsory: No
Default: No default.
Desc: Whether or not this property is active. This is useful for debugging, or if you want to disable it without removing everything.

[edit] events

Type: String - (a list of strings)
Example: events "handbrake-release,handbrake-apply"
Compulsory: No
Default: None
Desc: For trigger kind “event” only. An array of the event(s) that must take place for the property value at the index to activate. Can be one of the following (separated by forward slashes and commas to save space).
  • begin-load/end-load/begin-unload/end-unload
  • started-moving/stopped-moving (added in v1.2)
  • handbrake-apply/handbrake-release
  • trainbrake-apply/trainbrake-release
  • headlight-on, headlight-off
  • throttle-changed (added in v1.2)
  • front-coupled/back-coupled,front-uncoupled/back-uncoupled (added in v1.2)
  • view-internal, view-external, view-tracking, view-roaming (added in v1.2)
  • horn
  • bell
  • sanding
  • pantograph-state-0/1/2/3 (see GetPantographState)
  • weather-0/1/2/3/4/5/6/7 (see GetWeatherType)
  • world-day/world-night
  • priority-number-(0 - ∞) (e.g. priority-number-2) (added in v1.2)
  • arn-(0 -∞ ) (e.g. arn-92220, arn-844) (added in v1.2)
  • queue-(0 - ∞)- loaded/empty (e.g. queue-0-loaded, queue-1-empty)

[edit] files-path

Type: String - (a list of two strings)
Example: files-path "images/,.texture"
Compulsory: No
Default: None
Desc: An optional tag that shortens the number of characters that need to be written to the “values“ tag, assuming they all share the same path or asset library and extension. The path and extension can be specified here (e.g. files-path “images/left/.texture”), where images/left is the path, and .texture is the extension for all the files.

[edit] fx-replacement-type

Type: String)(kind fx-replacement only)
Example: kind "fx-replacement"
fx-replacement-type "texture-replacement"
Compulsory: No
Default: None
Desc: The type of fx replacement effect this property will be if the kind tag is set to fx-replacement. Each one is hyperlinked to the corresponding trainzscript function, though it is not necessary to know them. See values for instructions on how to implement these properties.
Replaces a texture effect in this asset to one within a texture-group asset.
Replaces a texture effect in this asset to one located within this asset.
Replaces a corona effect in the asset.
Replaces a name effect in the asset.
Replaces an attachment effect in the asset.
Plays/Stops an animation effect in the asset.

[edit] kind

Type: String
Compulsory: No
Default: None
Desc: The type of property this will be. Can be one of the options below. Most of these are derived from Class_MeshObject. For more info on implementing these, see values.
  • mesh-attachment
Manipulate the mesh’s animation, position, visibility, etc. See mesh-attachment-type.
  • fx-replacement
Change an effect in the mesh. See fx-replacement-type.
  • particle-effect
Activate/Deactivate/Edit a particle effect (smoke0, smoke1, etc). See particle-effects and particle-effect-type.
  • sound-script
Used to play a sound-script sound within this asset. See sound-triggers.
  • config-edit
Used to edit a tag in the wagon-x config soup. See paths.

[edit] meshes

Type: String - (a list of mesh names from the mesh-table separated by commas)
Example: meshes "handbrake-lever,braking-system"
Compulsory: No
Default: None
Desc: The comma-separated mesh-table asset(s) to be modified by the property. Use this for kind mesh-toggle or kind mesh-animation. Use this tag, the effect tag, or the asset tag, but not more than one.

[edit] mesh-attachment-type

Type: String - (kind mesh-attachment only)
Example: kind "mesh-attachment"
mesh-attachment-type "mesh-animation-frame"
Compulsory: No
Default: None
Desc: The type of mesh property this property will be if the kind tag is set to mesh-attachment. Each one is hyperlinked to the corresponding trainzscript function, though it is not necessary to know them. See values for instructions on how to implement these properties.
Toggle between the mesh(s) being visible or hidden.
Sets the translation and orientation of the mesh(es)
Sets the frame(s) the meshes animation will move between. Useful for door opening and closing animations, or animations that require more than 2 states.
Start or stop an animation-loop on the mesh.
Sets the state of the mesh(s) animation.
Changes the speed of the meshes animation.

[edit] name

Type: String
Compulsory: Yes
Default: None
Desc: The display name of this property, as will appear on the properties page.

[edit] particle-effects

Type: String - (a list of integer numbers as a string)
Example: particle-effects "0,1"
Compulsory: No
Default: None
Desc: For kind particle-effect. The comma-separated list of PFX effects to be modified by the property. See kind for help on implementation. There is currently no use for this tag as of yet. pfx-message doesn't need this because everything is already specified in the values tag.

[edit] particle-effect-type

Type: String (kind mesh-attachment only)
Compulsory: No
Default: None
Desc: The type of PFX function this property will be if the kind tag is set to particle-effect.

Each one is hyperlinked to the corresponding trainzscript function, though it is not necessary to know them. See values for instructions on how to implement these properties. Most of these are derived for the PFXEmitter properties specified in Class MapObject, with the prefix “GetPFXEmitter” omitted. All except SetPFXEmitterTexture are supported.

Example: kind "particle-effect"
particle-effect-type "pfx-message"
Comments: Needs to be validated with examples!
Send a message to enable/disable a particle effect.
Update the cone size with x,y and z sizes in values tag.
Update the number of particles and time they will be created.
Update the end colour of the particles.
Update the start colour of the particles.
Update the emitter lifetime using seconds.
Update the emitter maximum rate per second.
Update the emitter minimum rate per second.
Update the maximum size size of particles. The size is a single float.
Update the minimum size of particles. The size is a single float.
Update the physics delay for the emitter. The delay value is in seconds.
Set a new rate of particle creation per second.
Set the emitter velocity in metres per second along the direction vector.

For examples see.... (tbd)

[edit] paths

Type: String - (a list of two strings)
Example: paths "marker-lights/night-only""
Compulsory: Yes
Default: None
Desc: For kind config-edit. A comma-separated list of paths that point to the tag in the wagon-x config to edit.

[edit] property-id

Type: String
Compulsory: Yes
Default: None
Desc: The formal name (ID) of this property, used to identify and change this property. For example, If the name is Workflow, it might be a good idea to call this p_workflow.
This must be unique for each browser-property
.

[edit] property-sync-id

Type: String
Compulsory: No
Default: None
Desc: The ID that determines which assets will be affected when consist-property-sync is activated. Only assets that share this ID will be synced in the consist, so be sure to make it particular and unique.
Example: property-sync-id "soundBell"

[edit] property-visibility

Type: Integer - (0 = Hidden, 1 = Visible, 2 = Surveyor Only, 3 = Driver Only)
Compulsory: No
Default: 0 (hidden)
Desc: Indicates whether the property will be visible in the Properties Browser and in what mode.

[edit] sound-triggers

Type: String - (a list of strings)
Example: sound-triggers "bell_1,bell_2"
Compulsory: No
Default: None
Desc: For kind sound-script only. This specifies the soundscript trigger(s) (comma separated) that this property will start/stop when the property is activated.


[edit] target-asset

Type: String
Example: target-asset "bogey-0"
Compulsory: No
Default: None
Desc: This determines which assets config this property will manipulate. This tag is currently only used for manipulating a vehicles bogey (e.g. texture replacement). The name must be “bogey-” + the index of the bogey to edit. This gives you full access to the bogeys mesh-table, allowing you to set texture replacements, mesh toggles, and other properties within the bogey. This tag can be omitted if you are not doing bogey texture replacements. Only properties of kind “mesh-attachment” or “fx-replacement” can be used for properties that use this tag.


[edit] trigger

Type: String
Example: trigger "user"
Compulsory: No
Default: Null (ignored)
Desc: The event that will trigger/activate this property. Can be either an external event, such as a coal-loading animation, or a user-controlled event, or both. Setting it to none is useful if this is a child-properties property of another property. Possible values are:
  • user
  • event
  • parent
  • condition (added in v1.2)
  • variable (added in v1.2)
multiple (added in v1.2)
  • both (obsolete as of v1.2)
  • none


User: Used when the property is updated by the user in the Properties Browser.
Event: Used when the property is to be triggering by an event initiated by Trainz such as day to night. These are generally the result of messages posted either by the system or other asset scripts.
Parent: Used in a child property where the property is to be activated by a parent property.
Condition: TBA
Variable: TBA
Multiple: TBA
Both: TBA
None: No trigger.

[edit] update-events

(added in v1.2)

Type: String - (a list of strings)
Compulsory: No
Default: None
Desc: Very similar to the ‘events’ tag, except this tag triggers a refresh of the conditional and variable events within this property based on the triggered event. By default, conditional events refresh at a certain time interval, based on the ‘update-frequency’ tag. Adding this tag will refresh the property immediately when the trigger event is activated. Can be any of the property events in the ‘events’ tag.


[edit] values

Type: String - (a string list separated by special characters)
Example1 values "0,15,30"
Compulsory: No
Default: None
Desc: A comma-separated (and optionally semicolon-separated) list of all the files/values to be switched between. If the files-path tag is used, only include each file’s name (exclude the path and extension). This tag is required for all properties. If it is not wanted, leave the value at “1”, but keep the tag still. For booleans, use 1 for true, and 0 for false. For animations, specify the animation frames you want to toggle through. For details on using the semicolon separator to shorten properties, see Examples and Basic Tutorials.

Each kind has its own rules for what to put here, explained below. See the kind property for more info on these.

  • For kind mesh-attachment:
  • For mesh-attachment-type mesh-toggle, the value must be either 0 or 1 (visible/hidden) ???
  • For mesh-attachment-type mesh-translation-orientation, the value must be a 3-dimensional vector with values separated by backticks, enclosed with round brackets for the translation, followed by a colon, then another round bracket-enclosed 3d vector for the orientation, as shown below. 0`2`4 is the translation, and 1.2`2`2 is the orientation (we have to use backticks because the comma is already used here for separating each index value).
Example: values "(0`2`4):(1.2`2`2),(0`0`0):(0`0`0)"
  • For mesh-attachment-type mesh-animation-speed, the value is the speed of the animation for that index
  • For mesh-attachment-type mesh-animation-loop, the value will be an integer bool (0 or 1) to indicate whether to start the loop, or stop it. You can create a separate property that controls the mesh-animation-speed, and link it via a child-properties property to control the speed of the loop.
  • For mesh-attachment type mesh-animation-frame, the value is the frame of the animation to jump to. Setting it to -1 will put that index at the last animation frame in the mesh (see GetMeshAnimationFrameCount).
Example: values "0,30"
  • For mesh-attachment-type mesh-animation-loop, the value can be 0 or 1, to start/stop the loop
  • For kind sound-script, the value can be 0 or 1, to start/stop the soundscript event
  • For kind config-edit, the value is a string indicating the string value to assign to the config tag.
  • For kind particle-effect:
  • For particle-effect-type pfx-message, the value follows the same rules for pfx message.
  • particle-effect-type "pfx-message"
Example: values "+0+1,-1-0"
  • For kind fx-replacement:
  • For fx-replacement-type texture-replacement, the comma and/or. semicolon-separated values represent the index in the texture-group asset to find the texture. Setting the first value to 1 will reference the texture index 1, shown in the partial config for a textures asset below:
Values “0,2,1” will reference the textures in the texture container at indexes 0, 2, and 1, in that order when cycled through.
Example: values “0,2,1”
 kuid          <kuid:1234:123456>
 username      "test texture group asset"
 trainz-build  4.6
 description   "test texture group"
 textures
 {
 0           "textures\0albedo.texture"
 1           "textures\1albedo.texture"
 2           "textures\2albedo.texture"
 3           "textures\0parameter.texture"
 4           "textures\1parameter.texture"
 5           "textures\2parameter.texture" 
 6           "textures\0normal.texture"
 7           "textures\1normal.texture"
 8           "textures\2normal.texture"         
 }


  • For fx-replacement-type texture-replacement-texture, the comma and/or semicolon-separated values are the names of the files (ideally without the path or extension) to be referenced at that index.
Example: values "images/congleton.texture,images/burntisland.texture,images/buxton.texture,images/none.texture"
If you have the same path (and same extension) for all your files, you can greatly reduce the clutter by just specifying the path and extension once using the files-path tag. So, in this case the values entry would be:
Example: values "congleton,burntisland,buxton,none"
 0
 {
 enabled                    1
 property-visibility        1
 name                       "Workflow Text: "
 property-id                "p_workflow"
 description                "Sets the Workflow"
 kind                       "fx-replacement"
 fx-replacement-type        "texture-replacement-texture"
 consist-property-sync      1
 meshes                     "null"
 effects                    "texture-extra"
 asset                      "null"
 files-path                 "images/,.texture"
 values                     "congleton,burntisland,buxton,none"
 default-index              0
 trigger                    "user"
 display-type               "list"
 display-values             "Congleton,Burntisland,Buxton,None"
 }
  • For fx-replacement-type attachment, the values are the names of the attachment effects to be replaced by the specified asset.
  • For fx-replacement-type corona, the values are the names of the corona effects to be replaced by the specified asset.
  • For fx-replacement-type animation, the values are the names of the animation effects to be replaced by the specified asset.
  • For fx-replacement-type name, the values are the names that will replace the current name of the specified name effect.

[edit] variables

Added in version 1.2 (needs validation)

Type: String
Compulsory: No
Default: None
Desc: For trigger kind “variable”. An array of variable event(s) that control the value of the property using any of the conditional values and five arithmetic operators, ‘+’ (addition), ‘-’ (subtraction), ‘*’ (multiplication), ‘/’ (division), ‘^’ (exponent). You can use as many ‘|’ separated operators as you want. The operations do not follow the standard PEMDAS order of operations but are performed in a left-to-right additive manner.
Example1: a*b+c is the same as (a*b)+c,
Example2: c+a*b is the same as (c+a)*b, and
Example3: a*b+c/2 is the same as ((a*b)+c)/2

[edit] Copyright Notice

Much of the content on this page and child pages was derived from Dundun92's original Google Docs document. Permission was granted to use that information here.

Personal tools