HowTo/WagonX - Technical Reference
(Draft version - checking for links,etc.) |
(→trigger) |
||
(3 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | < | + | <table width=1200><tr><td> |
− | < | + | |
− | + | ||
= Document Structure = | = 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: | |
− | + | ||
− | + | # [[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> |
− | < | + | |
__TOC__ | __TOC__ | ||
+ | <table width=1200><tr><td> | ||
= The WagonX Reference = | = 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. | |
− | </td></tr> | + | </td></tr></table> |
− | </table> | + | |
− | < | + | <table width=1200><tr valign="top"><td> |
= Restricted Characters = | = 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|display-values]]. | |
− | + | ||
− | *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 = | ||
− | + | ||
− | + | 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 | extensions | ||
{ | { | ||
Line 50: | Line 62: | ||
active-coupling-standard-60850 | active-coupling-standard-60850 | ||
{ | { | ||
− | + | ... | |
} | } | ||
wagon-x | wagon-x | ||
{ | { | ||
− | + | ... | |
} | } | ||
} | } | ||
− | </td></tr> | + | </td></tr></table> |
− | </table | + | |
− | + | ||
+ | <table width=1200><tr valign="top"><td> | ||
= WagonX Properties = | = 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. | |
− | + | </td></tr></table> | |
− | </td> | + | |
− | </tr> | + | |
− | </table> | + | |
− | + | ||
<!--start of ACS table--> | <!--start of ACS table--> | ||
− | <table width=1200> | + | <table width=1200><tr><td> |
− | For help on creating the acs extensions and setting up the acs mesh-table objects, see [[HowTo/ | + | == 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]]. | ||
<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. | ||
− | + | ||
acs | acs | ||
{ | { | ||
Line 88: | 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> <!-- | + | :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> | ||
− | |||
<!--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. | ||
− | + | ||
misc | misc | ||
{ | { | ||
Line 108: | 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 116: | 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--> | ||
− | |||
<!--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. |
− | + | ||
marker-lights | marker-lights | ||
{ | { | ||
Line 167: | Line 227: | ||
:If set to 1, the lamps will only be visible at night, otherwise they will be displayed 24/7. | :If set to 1, the lamps will only be visible at night, otherwise they will be displayed 24/7. | ||
*<b>Front/back head/tail containers</b> | *<b>Front/back head/tail containers</b> | ||
− | :These containers identify the mesh to use for the front, back, head, and tail lamps. These meshes must be in the config mesh-table | + | :These containers identify the mesh to use for the front, back, head, and tail lamps. These meshes must be in the config mesh-table. |
</td></tr></table> | </td></tr></table> | ||
<!--end of Marker-Lights table--> | <!--end of Marker-Lights table--> | ||
− | |||
<!--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 180: | 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, | ||
− | |||
− | + | 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" | |
− | + | } | |
− | + | } | |
− | + | </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--> |
− | ==== | + | <table width=1200><tr><td> |
− | :Type: | + | ====asset==== |
+ | :Type: String | ||
+ | :Example: asset "texturelib" | ||
:Compulsory: No | :Compulsory: No | ||
− | :Default: | + | :Default: None |
− | :Desc: | + | :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> | </td></tr></table> | ||
+ | <!--end asset tag--> | ||
<table width=1200><tr><td> | <table width=1200><tr><td> | ||
Line 266: | Line 313: | ||
<table width=1200><tr><td> | <table width=1200><tr><td> | ||
− | ==== | + | ====conditions==== |
− | :Type: String | + | <b><i>(added in v1.2)</i></b> |
− | :Compulsory: | + | :Type: String - (a list of strings) |
+ | :Compulsory: No | ||
:Default: None | :Default: None | ||
− | :Desc: | + | :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 278: | 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 [[ | + | :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> | ||
− | ==== | + | <!--start default-index--> |
− | :Type: | + | ====default-index==== |
+ | :Type: Integer (-1 = random) | ||
+ | :Example: default-index 0 | ||
:Compulsory: No | :Compulsory: No | ||
− | :Default: | + | :Default: 0 |
− | :Desc: The | + | :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> |
− | : | + | 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. |
+ | <!--end default-index--> | ||
</td></tr></table> | </td></tr></table> | ||
Line 299: | Line 502: | ||
<table width=1200><tr><td> | <table width=1200><tr><td> | ||
− | ==== | + | <!--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 | + | :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) |
− | :Type: String | + | :Example: display-values "Clean,Weathered,Dirty" |
:Compulsory: No | :Compulsory: No | ||
:Default: None | :Default: None | ||
− | :Desc: | + | :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> | </td></tr></table> | ||
<table width=1200><tr><td> | <table width=1200><tr><td> | ||
− | <!--start | + | <!--start duration--> |
− | ==== | + | ====duration==== |
− | :Type: | + | :Type: Float |
− | + | ||
− | + | ||
:Compulsory: No | :Compulsory: No | ||
:Default: None | :Default: None | ||
− | :Desc: | + | :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> |
− | :: | + | :Example: duration 3.2 |
− | :: | + | <!--end duration--> |
− | :: | + | </td></tr></table> |
− | ::: | + | |
− | ::* | + | <table width=1200><tr><td> |
− | ::: | + | <!--start of effects (textures)--> |
− | ::*[[ | + | ====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|kind]] fx-replacement. Use this tag, the mesh tag, or the asset tag, but not more than one. |
− | <!--end | + | <!--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 358: | Line 605: | ||
:Compulsory: No | :Compulsory: No | ||
:Default: None | :Default: None | ||
− | :Desc: The type of fx replacement effect this property will be if the [[ | + | :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 375: | Line 622: | ||
<table width=1200><tr><td> | <table width=1200><tr><td> | ||
− | + | ====kind==== | |
− | ==== | + | :Type: String |
− | :Type: | + | |
:Compulsory: No | :Compulsory: No | ||
:Default: None | :Default: None | ||
− | :Desc: For | + | :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]]. |
− | : | + | ::*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|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 392: | 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 [[ | + | :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 | + | <!--start mesh-attachment--> |
− | ==== | + | ====mesh-attachment-type==== |
− | :Type: String - ( | + | :Type: String - (kind mesh-attachment only) |
− | :Example: | + | :Example: kind "mesh-attachment" |
+ | :: mesh-attachment-type "mesh-animation-frame" | ||
:Compulsory: No | :Compulsory: No | ||
:Default: None | :Default: None | ||
− | :Desc: The | + | :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 | + | ::*[[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> | ||
− | |||
<!--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 418: | 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> | ||
− | + | ====particle-effect-type==== | |
− | ==== | + | :Type: String (kind mesh-attachment only) |
− | :Type: String | + | |
− | + | ||
:Compulsory: No | :Compulsory: No | ||
:Default: None | :Default: None | ||
− | :Desc: | + | :Desc: The type of PFX function this property will be if the [[#kind|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|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 | + | <!--THIS DOESN'T LOOK RIGHT - CHECK--> |
− | ==== | + | ====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 | ||
− | |||
:Compulsory: No | :Compulsory: No | ||
:Default: None | :Default: None | ||
− | :Desc: The | + | :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" | |
</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> | ||
− | + | ====sound-triggers==== | |
− | ==== | + | :Type: String - (a list of strings) |
− | :Type: String - (a list of | + | :Example: sound-triggers "bell_1,bell_2" |
− | :Example: | + | |
:Compulsory: No | :Compulsory: No | ||
:Default: None | :Default: None | ||
− | :Desc: | + | :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. |
− | + | ||
</td></tr></table> | </td></tr></table> | ||
+ | <!--end sound-triggers--> | ||
+ | <!--start target-asset tag--> | ||
<table width=1200><tr><td> | <table width=1200><tr><td> | ||
− | + | ====target-asset==== | |
− | + | :Type: String | |
− | ==== | + | :Example: target-asset "bogey-0" |
− | :Type: String | + | :Compulsory: No |
− | :Example: | + | |
− | :Compulsory: | + | |
:Default: None | :Default: None | ||
− | :Desc: | + | :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> |
− | < | + | |
</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 470: | 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 [[ | + | :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> |
− | + | 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 479: | 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 [[ | + | :::*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 489: | 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 | + | :::*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 498: | Line 873: | ||
::::Example: values “0,2,1” | ::::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" | |
− | + | } | |
Line 521: | Line 896: | ||
::::Example: values "congleton,burntisland,buxton,none" | ::::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 [[ | + | ::::*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 [[ | + | ::::*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 [[ | + | ::::*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. |
− | + | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</td></tr></table> | </td></tr></table> | ||
+ | <!--end values tag--> | ||
+ | <!--start variables--> | ||
<table width=1200><tr><td> | <table width=1200><tr><td> | ||
− | + | ====variables==== | |
− | ==== | + | <b><i>Added in version 1.2 (needs validation)</i></b> |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | < | + | |
− | < | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
:Type: String | :Type: String | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
:Compulsory: No | :Compulsory: No | ||
:Default: None | :Default: None | ||
− | :Desc: For trigger kind | + | :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 | |
− | + | ||
− | :: | + | |
− | + | ||
− | + | ||
− | + | ||
− | :: | + | |
− | + | ||
− | + | ||
− | + | ||
</td></tr></table> | </td></tr></table> | ||
+ | <!--end variables--> | ||
+ | <!--start copyright notice--> | ||
<table width=1200><tr><td> | <table width=1200><tr><td> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=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
[edit] Document StructureThe 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: |
[edit] The WagonX ReferenceThis page contains details of the WagonX extension container and sub-containers. Links to examples of use will be provided when available. |
[edit] Restricted CharactersThe 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.
|
[edit] Using commas and semi-colons in a listWagonX 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). |
[edit] Using the grave symbol in a listThe 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 charactersCaret - The caret/circumflex symbol (^) is a math power operator. It can be used in variables. |
[edit] WagonX PropertiesThere 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] ACSFor help on creating the acs extensions and setting up the acs mesh-table objects, see Naming ACS mesh-table attachments.
acs { animated 1 use-jbv-animation 1 duration 1.0 }
|
[edit] text-xWagonX V1.2 or greater.
(description yet to be included - ARN and/or headcodes? - validation required)
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] MiscThe 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 }
|
[edit] Marker-LightsThe 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" } } }
|
[edit] Browser-Properties
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 TagsTag explanations. Some examples are included in the definition and, for others, see above for sample of usage. |
[edit] asset
|
[edit] child-properties
|
[edit] conditions(added in v1.2)
|
[edit] consist-property-sync
|
[edit] default-index
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
|
[edit] display-type
|
[edit] display-values
|
[edit] duration
|
[edit] effects
|
[edit] enabled
|
[edit] events
|
[edit] files-path
|
[edit] fx-replacement-type
|
[edit] kind
|
[edit] meshes
|
[edit] mesh-attachment-type
|
[edit] name
|
[edit] particle-effects
|
[edit] particle-effect-type
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.
For examples see.... (tbd) |
[edit] paths
|
[edit] property-id
|
[edit] property-sync-id
|
[edit] property-visibility
|
[edit] sound-triggers
|
[edit] target-asset
|
[edit] trigger
|
[edit] update-events(added in v1.2)
|
[edit] values
Each kind has its own rules for what to put here, explained below. See the kind property for more info on these.
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" }
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" }
|
[edit] variablesAdded in version 1.2 (needs validation)
|
[edit] Copyright NoticeMuch 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. |