"mesh-table" container (interior version)

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
m
Line 1: Line 1:
The "mesh-table" container is a top-level [[config.txt file]] entry used by various [[Content Types]]. Refer to the [["mesh-table" Container]] documentation for the standard tags - this document only describes the extensions available within the mesh table when it is used in a [[KIND_Interior|cab interior]] asset.
+
The "mesh-table" container is a top-level [[config.txt file]] entry used by various [[Content_Configuration#Content_Types|Content Types]]. Refer to the [["mesh-table" Container]] documentation for the standard tags - this document only describes the extensions available within the mesh table when it is used in a [[KIND_Interior|cab interior]] asset.
  
 
=Standard Mesh Names=
 
=Standard Mesh Names=
Line 5: Line 5:
 
There are a number of standard mesh names that the trainz default cab script uses for it's controls. For a Diesel or Electric cab:
 
There are a number of standard mesh names that the trainz default cab script uses for it's controls. For a Diesel or Electric cab:
  
speedo_needle -- speedometer
+
* speedo_needle -- speedometer
speedo_needle2 -- speedometer
+
* speedo_needle2 -- speedometer
bplocomain_needle -- loco main reservoir pressure gauge
+
* bplocomain_needle -- loco main reservoir pressure gauge
bptrainbrakecylinder_needle -- locomotive brake cylinder pressure gauge
+
* bptrainbrakecylinder_needle -- locomotive brake cylinder pressure gauge
bptrainbrakecylinder_needle2 -- locomotive brake cylinder pressure gauge
+
* bptrainbrakecylinder_needle2 -- locomotive brake cylinder pressure gauge
no3pipe_needle -- brake pressure gauge (currently loco brake cylinder -- but maybe intended for something else?)
+
* no3pipe_needle -- brake pressure gauge (currently loco brake cylinder -- but maybe intended for something else?)
bptrainbrakecylinder2_needle -- brake pressure gauge (source unknown)
+
* bptrainbrakecylinder2_needle -- brake pressure gauge (source unknown)
bptrainbrakepipe_needle -- train brake pipe pressure gauge
+
* bptrainbrakepipe_needle -- train brake pipe pressure gauge
bptrainbrakepipe_needle2 -- train brake pipe pressure gauge
+
* bptrainbrakepipe_needle2 -- train brake pipe pressure gauge
bploco_equaliser -- brake equaliser pressure gauge
+
* bploco_equaliser -- brake equaliser pressure gauge
flow_needle -- brake flow rate gauge
+
* flow_needle -- brake flow rate gauge
ampmeter_needle -- traction ammeter gauge
+
* ampmeter_needle -- traction ammeter gauge
ampmeter2_needle -- traction ammeter gauge
+
* ampmeter2_needle -- traction ammeter gauge
throttle_lever -- throttle lever control
+
* throttle_lever -- throttle lever control
reverser_lever -- reverser lever control
+
* reverser_lever -- reverser lever control
trainbrake_lever -- self-lapping train brake control
+
* trainbrake_lever -- self-lapping train brake control
trainbrakelap_lever -- non self-lapping train brake control
+
* trainbrakelap_lever -- non self-lapping train brake control
independantbrake_lever -- locomotive independent brake control. Note the typo in the control name.
+
* independantbrake_lever -- locomotive independent brake control. Note the typo in the control name.
dynamicbrake_lever -- dynamic brake control
+
* dynamicbrake_lever -- dynamic brake control
wheelslip_light -- wheelslip indicator
+
* wheelslip_light -- wheelslip indicator
horn -- horn control
+
* horn -- horn control
light_switch -- light control
+
* light_switch -- light control
pantograph_lever -- pantograph control
+
* pantograph_lever -- pantograph control
throttle_brake_lever -- combined throttle/self-lapping brake lever
+
* throttle_brake_lever -- combined throttle/self-lapping brake lever
  
 
For a Steam cab:
 
For a Steam cab:
  
speedo_needle -- speedometer
+
* speedo_needle -- speedometer
bplocomain_needle -- loco main reservoir pressure gauge
+
* bplocomain_needle -- loco main reservoir pressure gauge
bptrainbrakecylinder_needle -- locomotive brake cylinder pressure gauge
+
* bptrainbrakecylinder_needle -- locomotive brake cylinder pressure gauge
no3pipe_needle -- brake pressure gauge (currently loco brake cylinder -- but maybe intended for something else?)
+
* no3pipe_needle -- brake pressure gauge (currently loco brake cylinder -- but maybe intended for something else?)
bptrainbrakecylinder2_needle -- brake pressure gauge (source unknown)
+
* bptrainbrakecylinder2_needle -- brake pressure gauge (source unknown)
bptrainbrakepipe_needle -- train brake pipe pressure gauge
+
* bptrainbrakepipe_needle -- train brake pipe pressure gauge
bploco_equaliser -- brake equaliser pressure gauge
+
* bploco_equaliser -- brake equaliser pressure gauge
flow_needle -- brake flow rate gauge
+
* flow_needle -- brake flow rate gauge
trainbrake_lever -- self-lapping train brake control
+
* trainbrake_lever -- self-lapping train brake control
trainbrakelap_lever -- non self-lapping train brake control
+
* trainbrakelap_lever -- non self-lapping train brake control
independantbrake_lever -- locomotive independent brake control. Note the typo in the control name.
+
* independantbrake_lever -- locomotive independent brake control. Note the typo in the control name.
horn -- horn control
+
* horn -- horn control
light_switch -- light control
+
* light_switch -- light control
waterglass_left -- boiler water level
+
* waterglass_left -- boiler water level
waterglass_right -- boiler water level
+
* waterglass_right -- boiler water level
firebox -- the interior of the firebox (to show fire temperature)
+
* firebox -- the interior of the firebox (to show fire temperature)
boiler_needle -- boiler pressure
+
* boiler_needle -- boiler pressure
boiler_needle1 -- boiler pressure
+
* boiler_needle1 -- boiler pressure
steam_chest_needle -- steam chest pressure
+
* steam_chest_needle -- steam chest pressure
regulator -- regulator (throttle) control
+
* regulator -- regulator (throttle) control
reverser -- cutoff (reverser) control
+
* reverser -- cutoff (reverser) control
water_injector_0 -- primary water injector control
+
* water_injector_0 -- primary water injector control
water_injector_1 -- secondary water injector control
+
* water_injector_1 -- secondary water injector control
blower -- steam blower control
+
* blower -- steam blower control
fire_plates -- the firebox door
+
* fire_plates -- the firebox door
sanding_lever -- locomotive sander control
+
* sanding_lever -- locomotive sander control
blowdown_lever -- blowdown control (releases water out of the boiler)
+
* blowdown_lever -- blowdown control (releases water out of the boiler)
  
 
=Supported Tags=
 
=Supported Tags=

Revision as of 13:45, 23 May 2011

The "mesh-table" container is a top-level config.txt file entry used by various Content Types. Refer to the "mesh-table" Container documentation for the standard tags - this document only describes the extensions available within the mesh table when it is used in a cab interior asset.

Contents

Standard Mesh Names

There are a number of standard mesh names that the trainz default cab script uses for it's controls. For a Diesel or Electric cab:

  • speedo_needle -- speedometer
  • speedo_needle2 -- speedometer
  • bplocomain_needle -- loco main reservoir pressure gauge
  • bptrainbrakecylinder_needle -- locomotive brake cylinder pressure gauge
  • bptrainbrakecylinder_needle2 -- locomotive brake cylinder pressure gauge
  • no3pipe_needle -- brake pressure gauge (currently loco brake cylinder -- but maybe intended for something else?)
  • bptrainbrakecylinder2_needle -- brake pressure gauge (source unknown)
  • bptrainbrakepipe_needle -- train brake pipe pressure gauge
  • bptrainbrakepipe_needle2 -- train brake pipe pressure gauge
  • bploco_equaliser -- brake equaliser pressure gauge
  • flow_needle -- brake flow rate gauge
  • ampmeter_needle -- traction ammeter gauge
  • ampmeter2_needle -- traction ammeter gauge
  • throttle_lever -- throttle lever control
  • reverser_lever -- reverser lever control
  • trainbrake_lever -- self-lapping train brake control
  • trainbrakelap_lever -- non self-lapping train brake control
  • independantbrake_lever -- locomotive independent brake control. Note the typo in the control name.
  • dynamicbrake_lever -- dynamic brake control
  • wheelslip_light -- wheelslip indicator
  • horn -- horn control
  • light_switch -- light control
  • pantograph_lever -- pantograph control
  • throttle_brake_lever -- combined throttle/self-lapping brake lever

For a Steam cab:

  • speedo_needle -- speedometer
  • bplocomain_needle -- loco main reservoir pressure gauge
  • bptrainbrakecylinder_needle -- locomotive brake cylinder pressure gauge
  • no3pipe_needle -- brake pressure gauge (currently loco brake cylinder -- but maybe intended for something else?)
  • bptrainbrakecylinder2_needle -- brake pressure gauge (source unknown)
  • bptrainbrakepipe_needle -- train brake pipe pressure gauge
  • bploco_equaliser -- brake equaliser pressure gauge
  • flow_needle -- brake flow rate gauge
  • trainbrake_lever -- self-lapping train brake control
  • trainbrakelap_lever -- non self-lapping train brake control
  • independantbrake_lever -- locomotive independent brake control. Note the typo in the control name.
  • horn -- horn control
  • light_switch -- light control
  • waterglass_left -- boiler water level
  • waterglass_right -- boiler water level
  • firebox -- the interior of the firebox (to show fire temperature)
  • boiler_needle -- boiler pressure
  • boiler_needle1 -- boiler pressure
  • steam_chest_needle -- steam chest pressure
  • regulator -- regulator (throttle) control
  • reverser -- cutoff (reverser) control
  • water_injector_0 -- primary water injector control
  • water_injector_1 -- secondary water injector control
  • blower -- steam blower control
  • fire_plates -- the firebox door
  • sanding_lever -- locomotive sander control
  • blowdown_lever -- blowdown control (releases water out of the boiler)

Supported Tags

Each mesh subcontainer supports the following tags. Each tag is shown here with its default value. Standard tags inherited from the normal mesh table are omitted for brevity.

tooltip-text ""
limits 0,1
angles 0,0
kind ""
mousemode ""
mousespeed 1
notches 
invert 0
notchheight 
onlight ""
value 0.0
font "swiss"
fontsize 12
fontcolor 1.0,1.0,1.0


tooltip-text

Type: String
Desc: This text will be used in the tooltip that appears when the mouse cursor hovers over a cab control.

limits

Type: Decimal Pair
Desc: Specifies the minimum and maximum values for a cab control or needle at it's two endpoints of movement.

angles

Type: Decimal Pair
Desc: Specifies the minimum and maximum extents of movement for a control or needle. For control types that rotate, these values are in radians.

kind

Type: Selection
Desc: The type of control this mesh table element represents.

Options are:

animated-lever
animated-dial
collision-proxy
digital-dial-spd
digital-dial-prs
firebox
lever
light
needle
pulllever
pullrope
switch

animated-lever Operates like a standard lever, only uses a named animation instead of the angles tag for movement.

animated-dial Operates like a standard needle, only uses a named animation to represent the gauge readout instead of the angles tag.

collision-proxy This element type defines a volume within the cab where the mouse pointer will be considered to be over the cab control. Generally used in conjunction with an animated-lever.

digital-dial-spd Digital readout for a speedometer, and using speed units.

digital-dial-prs Digital readout for a pressure gauge, using pressure units.

firebox The animated firebox in a steam locomotive.

lever A standard lever, often used for throttle and brake controls. Requires the user to click hold and move the mouse to move the lever between it's notches. This control will stay at any notch position when let go.

light A light glow / overlay - this mesh is hidden when the light is off and shown when the light is on.

needle An analogue gauge needle. Can be used to implement many different types of gauges.

pulllever Like a lever, only sprung to return to it's initial position when the user lets go of the control. Useful for horns.

pullrope Like a pulllever, only with linear (not rotational) movement.

switch This control requires only a single click to move between it's two endpoints. It is better suited than a lever to small switches and buttons.

mousemode

Type: String
Desc: If set to "exact", will require the mouse to be positioned over the geometry of the control precisely to activate it. Otherwise a bounding volume is used. This is useful for large controls which would otherwise block access to smaller controls.

notches

Type: Decimal List
Desc: Specifies the positions of the notches for this control. A typical 8 notch throttle would be 0.0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1.0.

invert

Type: Boolean
Desc: Invert mouse movement for this control. If the control moves the wrong way compared to the mouse, change this setting.

notchheight

Type: Integer List
Desc: Specifies the importance of the notches for this control. Drawn graphically in the overlay as a longer bar for more important notches. Useful for a combined brake and throttle controller, or any other control where you want to mark a specific position. Should have the same number of values as the 'notches' list. 0 is for the most important notches, and has the longest bar. 1 has a smaller bar, approximately half the length. 2 is about 1/4 the length of 0, and so on.

onlight

Type: String
Desc: Specify the name of a light kind mesh which is enabled when this switch/lever is in the on position, and disabled when it is in the off position.

value

Type: Decimal
Desc:

font

Type: String
Desc: Font name to use for the readout of a digital control. Options are:

swiss (Default option. Renders with arial in PC builds.) times_new_roman verdana century_gothic cordia courier helvetica arial comic_sans sans_serif impact console tohoma (renders using the Tahoma font on PC builds.) garamond

These roughly correspond with Windows font names. Beware - not all fonts are available on all platforms, and where a font is not available, a different font may be substituted.

fontsize

Type: Decimal
Desc: Font size for the readout of a digital control. Default is 12.

fontcolor

Type: Decimal Triplet
Desc: RGB font color for the readout of a digital control. Colors are specified within the range 0.0 to 1.0, with 0.0 being black and 1.0 being full intensity. Default is 1.0,1.0,1.0 - white.


Cab Interior Mesh-Table Example

The following is an example of a mesh-table which implements a number of cab controls

mesh-table
{
  default
  {
    mesh                                "interior.im"
    auto-create                         1
  }
  
  wheelslip_light
  {
    kind                                "light"
    mesh                                "wheelslip_light.im"
    auto-create                         0
  }
  
  bptrainbrakepipe_needle2
  {
    kind                                "digital-dial-prs"
    mesh                                "brakeneedle.im"
    att                                 "a.brakepipe2"
    limits                              0,55
    font                                "arial"
    fontsize                            0.007
    fontcolor                           80,240,120
    auto-create                         1
  }
  
  speedo_needle2
  {
    kind                                "digital-dial-spd"
    mesh                                "brakeneedle.im"
    att                                 "a.digispeedo"
    limits                              0,55
    font                                "arial"
    fontsize                            0.01
    fontcolor                           0,0,0
    auto-create                         1
  }
  
  throttle_lever
  {
    kind                                "lever"
    mesh                                "throttle.im"
    att                                 "a.throttle"
    limits                              0,8
    angles                              0,1.69
    notches                             0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1
    notchheight                         1,2,2,2,2,2,2,2,1
    radius                              0.35
    mousespeed                          -1
    auto-create                         1
  }
  
  dynamicbrake_lever
  {
    kind                                "lever"
    mesh                                "dynamic_handle.im"
    att                                 "a.dynamic"
    limits                              0,2
    angles                              0,-1.69
    notches                             0,1
    notchheight                         0.1,1
    mousespeed                          -1
    radius                              0.35
    auto-create                         1
  }
  
  trainbrakelap_lever
  {
    kind                                "lever"
    auto-create                         1
    mesh                                "trainbrake_handle.im"
    att                                 "a.trainbrake_handle"
    limits                              0,4
    angles                              0,-2
    notches                             0,0.25,0.5,0.75,1
    notchheight                         2,2,2,2,2
    mousespeed                          1
  }
  
  independantbrake_lever
  {
    kind                                "lever"
    mesh                                "indy_handle.im"
    att                                 "a.ind"
    limits                              0,32
    angles                              0.94,0
    notches                             0,0.5,1
    notchheight                         1,1,1
    radius                              0.35
    mousespeed                          1
    auto-create                         1
  }
  
  flow_needle
  {
    kind                                "needle"
    mesh                                "flowneedle.im"
    att                                 "a.bpflow"
    limits                              0,1050
    auto-create                         1
  }
  
  bplocomain_needle
  {
    kind                                "needle"
    mesh                                "brakeneedlered.im"
    att                                 "a.mainres"
    limits                              0,1240
    auto-create                         1
  }
  
  bploco_equaliser
  {
    kind                                "needle"
    mesh                                "brakeneedle.im"
    att                                 "a.eqres"
    limits                              0,1240
    auto-create                         1
  }
  
  bptrainbrakecylinder_needle
  {
    kind                                "needle"
    mesh                                "brakeneedlered.im"
    att                                 "a.brakecyl"
    limits                              -50,1390
    auto-create                         1
  }
  
  bptrainbrakepipe_needle
  {
    kind                                "needle"
    mesh                                "brakeneedle.im"
    att                                 "a.brakepipe"
    limits                              0,1240
    auto-create                         1
  }
  
  speedo_needle
  {
    kind                                "needle"
    mesh                                "speedo_pointer.im"
    att                                 "a.speedo"
    limits                              0,43
    auto-create                         1
  }
  
  ampmeter_needle
  {
    kind                                "needle"
    mesh                                "needleamps.im"
    att                                 "a.ampmeter"
    limits                              0,1700
    angles                              0,3.02058
    auto-create                         1
  }
  
  reverser_lever
  {
    kind                                "lever"
    mesh                                "reverser_handle.im"
    att                                 "a.throttle01"
    limits                              0,2
    angles                              -0.55,0.55
    notches                             0,0.5,1
    notchheight                         1,1,1
    mousespeed                          -1
    auto-create                         1
  }
  
  light_switch
  {
    kind                                "lever"
    att                                 "a.hdlt"
    mesh                                "hdltswtch.im"
    limits                              0,1
    angles                              0,2
    notches                             0,1
    notchheight                         0.1,0.1
    mousespeed                          -1
    auto-create                         1
  }
  
  horn
  {
    kind                                "pulllever"
    mesh                                "horn.im"
    att                                 "a.horn"
    auto-create                         1
    angles                              0,-0.55
    limits                              0,1
    mousespeed                          -1
    radius                              -0.02
    notches                             0,1
    notchheight                         0,0
  }

  pantograph_lever
  {
    kind                                "lever"
    mesh                                "pantograph_lever.im"
    att                                 "a.pantograph_lever"
    limits                              0,3
    angles                              1.4,0
    notches                             0,0.5,0.75,1.0
    notchheight                         0,0,1,1
    mousespeed                          -1
    onlight                             "line_power"
  }
  
  line_power
  {
    kind                                "light"
    mesh                                "line_power.im"
    att                                 "a.line_power"
  }
}
Personal tools