HowTo/WagonX - Technical Reference
(Added changes for WagonX 1.2 (still in development) and some tidy up) |
(→trigger) |
||
Line 808: | Line 808: | ||
:::*user | :::*user | ||
:::*event | :::*event | ||
+ | :::*parent | ||
:::*condition <b><i>(added in v1.2)</i></b> | :::*condition <b><i>(added in v1.2)</i></b> | ||
:::*variable <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> | ::::multiple <b><i>(added in v1.2)</i></b> | ||
:::*both <b><i>(obsolete as of v1.2)</i></b> | :::*both <b><i>(obsolete as of v1.2)</i></b> | ||
− | :::*none | + | :::*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> | </td></tr></table> | ||
<!--end trigger--> | <!--end trigger--> | ||
Line 818: | Line 828: | ||
<!--start update-events--> | <!--start update-events--> | ||
<table width=1200><tr><td> | <table width=1200><tr><td> | ||
+ | |||
====update-events==== | ====update-events==== | ||
<b><i>(added in v1.2)</i></b> | <b><i>(added in v1.2)</i></b> |
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. |