Interior

Diesel:

Config

Script

Steam:

Config

Script

File location: ...\Trainz\world\custom\interiors\

Typical Directory Structure for custom Interior should be:

World
Custom
Interior
Custom_Interior
Config.TXT
Custom_interior.IM
custom_interior.TGA
Env_metal.BMP
*.tecture.TXT

This is the interior of a traincar.

Referenced by the interior tag in a traincar config.TXT file.

In TRS2004, an interior config.TXT file now has the ability to be setup using a mesh-table. This gives greater control over animations and gives the ground work for script implementation.

In the following example, the generic UP DD40 interior has scripted, animated wipers and a fan, both controlled by switches. Also, when these switches are in the ‘on’ position, a mesh is rendered to represent the switch light coming on.

Actually, the DD40 interior is a great example of what can be done using standard levers alone. The sliding windows, the retractable sun visors and the swivel chair are all ‘levers’. Sure they contain no real function... It adds a bit of fun if anything! 

Download DD40 Interior source and in-games files here: http://www.auran.com/TRS2004/downloads/contentcreation/TRS2004_dd40_interior.zip
Remember: Interiors created using a mesh-table cannot be used in pre-TRS2004 versions of Trainz.

Green is UTC additions

 

Config.TXT File Example for an Interior -- Diesel

kuid <KUID:-3:10085>
kind interior
rem DD40 

script “DD40Cabin”
class “DD40Cabin”

cameralist
{
   camera0 -0.564, 0.984, 0.987, 13.528, -0.137
   camera1 0.707, -0.333, 1.023, -6.189, -0.049
   camera2 1.317, 0.949, 1.023, -13.501, -0.122
   camera3 -1.058, 0.522, 0.887, 0.1, -0.089
   camera4 -1.382, 0.78, 0.987, 6.592, -0.194
   camera5 -1.361, 0.923, 1.137, 6.902, -0.503
   camera6 -0.618, 0.715, 1.023, -0.983, -0.234
}
cameradefault 3

mesh-table
{
   default
   {
      mesh gen_dd40_int.IM
      auto-create 1
   }
   fan_switch
   {
      kind lever
      auto-create 1
      mesh switch_red.IM
      att a.switch0
      limits 0, 1
      angles 0, -2
      notches 0, 1
      notchheight 0, 0
      mousespeed -1
      radius 0.05
      att-parent default
   }
   switchlight0
   {
      kind light
      mesh switchlight.PM
      att a.switch0
      auto-create 0
      att-parent default
   }
   wiper_switch
   {
      kind lever
      auto-create 1
      mesh switch_red.IM
      att a.switch1
      limits 0, 1
      angles 0, -2
      notches 0, 1
      notchheight 0, 0
      mousespeed -1
      radius 0.05
      att-parent default
   }
   switchlight1
   {
      kind light
      mesh switchlight.PM
      att a.switch1
      auto-create 0
      att-parent default
   }
   switch_3
   {
      kind lever
      auto-create 1
      mesh switch.PM
      att a.switch2
      limits 0, 1
      angles 0, -2
      notches 0, 1
      notchheight 0, 0
      mousespeed -1
      radius 0.05
      att-parent default
   }
   switchlight2
   {
      kind light
      mesh switchlight.PM
      att a.switch2
      auto-create 0
      att-parent default
   }
   switch_4
   {
      kind lever
      auto-create 1
      mesh switch.PM
      att a.switch3
      limits 0, 1
      angles 0, -2
      notches 0, 1
      notchheight 0, 0
      mousespeed -1
      radius 0.05
      att-parent default
   }
   switchlight3
   {
      kind light
      mesh switchlight.PM
      att a.switch3
      auto-create 0
      att-parent default
   }
   switch_5
   {
      kind lever
      auto-create 1
      mesh switch.PM
      att a.switch4
      limits 0, 1
      angles 0, -2
      notches 0, 1
      notchheight 0, 0
      mousespeed -1
      radius 0.05
      att-parent default
   }
   switchlight4
   {
      kind light
      mesh switchlight.PM
      att a.switch4
      auto-create 0
      att-parent default
   }
   switch_6
   {
      kind lever
      auto-create 1
      mesh switch.PM
      att a.switch5
      limits 0, 1
      angles 0, -2
      notches 0, 1
      notchheight 0, 0
      mousespeed -1
      radius 0.05
      att-parent default
   }
   switchlight5
   {
      kind light
      mesh switchlight.PM
      att a.switch5
      auto-create 0
      att-parent default
   }
   switch_7
   {
      kind lever
      auto-create 1
      mesh switch.PM
      att a.switch6
      limits 0, 1
      angles 0, -2
      notches 0, 1
      notchheight 0, 0
      mousespeed -1
      radius 0.05
      att-parent default
   }
   switchlight6
   {
      kind light
      mesh switchlight.PM
      att a.switch6
      auto-create 0
      att-parent default
   }
   switch_8
   {
      kind lever
      auto-create 1
      mesh switch.PM
      att a.switch7
      limits 0, 1
      angles 0, -2
      notches 0, 1
      notchheight 0, 0
      mousespeed -1
      radius 0.05
      att-parent default
   }
   switchlight7
   {
      kind light
      mesh switchlight.PM
      att a.switch7
      auto-create 0
      att-parent default
   }
   reverser_lever
   {
      kind lever
      auto-create 1
      mesh reverser_lever.PM
      att a.reverser_lever
      limits 0, 2
      angles 0.55, -0.55
      notches 0, 0.5, 1
      notchheight 1, 1, 1
      att-parent default
   }
   independantbrake_lever
   {
      kind lever
      auto-create 1
      mesh ind_brake_lever.PM
      att a.ind_brake_lever
      limits 0, 32
      angles 0, -2.1
      notches 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1
      notchheight 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1
      radius 0.15
      att-parent default
   }
   trainbrake_lever
   {
      kind lever
      auto-create 1
      mesh train_brake_lever.PM
      att a.train_brake_lever
      limits 0, 4
      angles 0, -2.4
      notches 0, 0.25, 0.27, 0.29, 0.31, 0.33, 0.35, 0.37, 0.39, 0.41, 0.43, 0.45, 0.47, 0.49, 0.5, 0.75, 1
      notchheight 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1
      radius 0.15
      att-parent default
   }
   throttle_lever
   {
      kind lever
      auto-create 1
      mesh throttle_lever.PM
      att a.thottle_lever
      limits 0, 8
      angles 1.2, 0
      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
      att-parent default
   }
   dynamicbrake_lever
   {
      kind lever
      auto-create 1
      mesh dynamic_lever.PM
      att a.dynamic_brake
      limits 0, 2
      angles 0, -1.2
      notches 0, 0.5, 1
      notchheight 1, 1, 1
      radius 0.35
      att-parent default
   }
   light_switch
   {
      kind lever
      auto-create 1
      att a.light_switch
      mesh dial.PM
      limits 0, 1
      angles 0, 4.5
      notches 0, 0.5, 1
      notchheight 0, 0, 0
      att-parent default
   }
   ampmeter_needle
   {
      kind needle
      auto-create 1
      mesh ampmeter_needle.PM
      att a.ammeter
      limits 0, 1500
      angles 0, 1.9
      att-parent default
   }
   bploco_equaliser
   {
      kind needle
      auto-create 1
      mesh whitepress_needle.PM
      att a.equaliser_pressure
      limits 0, 1000
      att-parent default
   }
   bplocomain_needle
   {
      kind needle
      auto-create 1
      mesh redpress_needle.PM
      att a.main_res_pressure
      limits 0, 1000
      att-parent default
   }
   bptrainbrakecylinder_needle
  {
      kind needle
      auto-create 1
      mesh redpress_needle.PM
      att a.brake_cyl_pressure
      limits 0, 1000
      att-parent default
   }
   bptrainbrakepipe_needle
   {
      kind needle
      auto-create 1
      mesh whitepress_needle.PM
      att a.brake_pipe_pressure
      limits 0, 1000
      att-parent default
   }
   speedo_needle
   {
      kind needle
      auto-create 1
      mesh whitepress_needle.PM
      att a.speedo
      limits 0, 48
      att-parent default
   }
   horn
   {
      kind lever
      auto-create 1
      mesh horn.PM
      att a.horn
      limits 0, 1
      angles 0, -0.6
      notches 0, 1
      notchheight 3, 3
      radius 0.16
      mousespeed -2
      att-parent default
   }
   wheelslip_light
   {
      kind light
      auto-create 0
      mesh wheelslip.PM
   }
   swivel_chair
   {
      kind
lever
      auto-create 1
      mesh chair.IM
      att a.chair1
      limits 0, 8
      angles 6.8, -6.8
      radius 0.5
      mousespeed 0.2
      att-parent default
   }
   dial0
   {
      kind
lever
      auto-create 1
      att a.dial0
      mesh dial.PM
      limits 0, 1
      angles 0, 3.8
      notches 0, 1
      notchheight 0, 0
      att-parent default
   }
   dial1
   {
      kind
lever
      auto-create 1
      att a.dial1
      mesh dial.PM
      limits 0, 1
      angles 0, 3.8
      notches 0, 1
      notchheight 0, 0
      att-parent default
   }
   fan
   {
      mesh
fan.IM
      anim fan.KIN
      auto-create 1
      att a.fan
      att-parent default
   }
   visor0
   {
      mesh
visor.IM
      auto-create 1
      att a.visor0
      att-parent default
      kind lever
      mousespeed -1
      limits 0, 1
      angles 0, 1.7
      notches 0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1
      notchheight 0, 0, 0, 0, 0, 0, 0, 0, 0
   }
   visor1
   {
      mesh
visor.IM
      auto-create 1
      att a.visor1
      att-parent default
      kind lever
      mousespeed -1
      limits 0, 1
      angles 0, 1.7
      notches 0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1
      notchheight 0, 0, 0, 0, 0, 0, 0, 0, 0
   }
   sl_wind_r_fr
   {
      mesh
sliding_wind_r_fr.IM
      auto-create 1
      att a.sliding_wind_r_fr
      att-parent default
      limits 0, 1.0
      angles 0, 0.011
      notches 0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1
      notchheight 0, 0, 0, 0, 0, 0, 0, 0, 0
      kind lever
   }
   sl_wind_r_bk
   {
      mesh
sliding_wind_r_bk.IM
      auto-create 1
      att a.sliding_wind_r_bk
      att-parent default
      limits 0, 1.0
      angles 0, -0.011
      notches 0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1
      notchheight 0, 0, 0, 0, 0, 0, 0, 0, 0
      mousespeed -1
      kind lever
   }
   sl_wind_l_fr
   {
      mesh
sliding_wind_l_fr.IM
      auto-create 1
      att a.sliding_wind_l_fr
      att-parent default
      limits 0, 1.0
      angles 0, -0.011
      notches 0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1
      notchheight 0, 0, 0, 0, 0, 0, 0, 0, 0
      kind lever
   }
   sl_wind_l_bk
   {
      mesh
sliding_wind_l_bk.IM
      auto-create 1
      att a.sliding_wind_l_bk
      att-parent default
      limits 0, 1.0
      angles 0, 0.011
      notches 0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1
      notchheight 0, 0, 0, 0, 0, 0, 0, 0, 0
      mousespeed -1
      kind lever
   }
   wipers
   {
      mesh
wipers.IM
      anim wipers.KIN
      auto-create 1
      att a.wipers
      att-parent default
   }
}

description ""
trainz-build 2.0

This is the DD40 interior script file. This sets up the fan and wiper animations to be switch controlled and controls the visibility of switchlights.

Cabin.GS Script File Example for an Interior -- Diesel

include “defaultlocomotivecabin.gs”

class DD40CabinData isclass CabinData
{
public bool animatingFan;
public bool animatingWiper;
public bool switchOn3;
public bool switchOn4;
public bool switchOn5;
public bool switchOn6;
public bool switchOn7;
public bool switchOn8;
};

class DD40Cabin isclass DefaultLocomotiveCabin
{
// Switches
CabinControl cabin_fan_switch;
CabinControl window_wipers;
CabinControl switch3;
CabinControl switch4;
CabinControl switch5;
CabinControl switch6;
CabinControl switch7;
CabinControl switch8;

// Lights
CabinControl cabin_fan_light;
CabinControl window_wipers_light;
CabinControl light3;
CabinControl light4;
CabinControl light5;
CabinControl light6;
CabinControl light7;
CabinControl light8;

thread void SlowFanDown(void);
thread void SpeedFanUp(void);

void UpdateFan(void);
void UpdateWipers(void);
thread void RunAnimation(void);

float fanSpeed;
bool isFanSpeedingUp;
bool isFanSlowingDown;

//! Attach this cabin to a game object (i.e. a locomotive).
//
// Param: obj Game object to attach this cabin to (usually a Locomotive).
//
void Attach(GameObject obj)
{
inherited(obj);

// get cabin data
CabinData cd = loco.GetCabinData();
if(cd)
{
// reset the controls from saved values
DD40CabinData ddcd = cast<DD40CabinData>cd;
float value = 0.0;

// ANIMATING FAN
if (ddcd.animatingFan)
{
fanSpeed = 1.0;
SetMeshAnimationSpeed(“fan”, 1.0);
StartMeshAnimationLoop(“fan”);
value = 1.0;
}
else
value = 0.0;

cabin_fan_switch.SetValue(value);
cabin_fan_light.SetValue(value);

// ANIMATING WIPER
if (ddcd.animatingWiper)
{
value = 1.0;
SetMeshAnimationSpeed(“wipers”, 1.0);
StartMeshAnimationLoop(“wipers”);
}
else
value = 0.0;

window_wipers.SetValue(value);
window_wipers_light.SetValue(value);

// SWITCH 3
if (ddcd.switchOn3)
value = 1.0;
else
value = 0.0;
switch3.SetValue(value);
light3.SetValue(value);

// SWITCH 4
if (ddcd.switchOn4)
value = 1.0;
else
value = 0.0;
switch4.SetValue(value);
light4.SetValue(value);

// SWITCH 5
if (ddcd.switchOn5)
value = 1.0;
else
value = 0.0;
switch5.SetValue(value);
light5.SetValue(value);

// SWITCH 6
if (ddcd.switchOn6)
value = 1.0;
else
value = 0.0;
switch6.SetValue(value);
light6.SetValue(value);

// SWITCH 7
if (ddcd.switchOn7)
value = 1.0;
else
value = 0.0;
switch7.SetValue(value);
light7.SetValue(value);

// SWITCH 8
if (ddcd.switchOn8)
value = 1.0;
else
value = 0.0;
switch8.SetValue(value);
light8.SetValue(value);
}
else
{
DD40CabinData ddd = new DD40CabinData();
loco.SetCabinData(ddd);
}
}

void UserPressKey(string s)
{
if(s == “cabin-fans”)
{
DD40CabinData cd = cast<DD40CabinData>loco.GetCabinData();
cd.animatingFan = !cd.animatingFan;

float value;
if (cd.animatingFan)
value = 1.0;
else
value = 0.0;

cabin_fan_switch.SetValue(value);
cabin_fan_light.SetValue(value);

UpdateFan();
}
if(s == “wipers”)
{
DD40CabinData cd = cast<DD40CabinData>loco.GetCabinData();
cd.animatingWiper = !cd.animatingWiper;

float value;
if (cd.animatingWiper)
value = 1.0;
else
value = 0.0;

window_wipers.SetValue(value);
window_wipers_light.SetValue(value);

UpdateWipers();
}
}

public void Init(void)
{
inherited();

cabin_fan_switch = GetNamedControl(“fan_switch”);
window_wipers = GetNamedControl(“wiper_switch”);
switch3 = GetNamedControl(“switch_3”);
switch4 = GetNamedControl(“switch_4”);
switch5 = GetNamedControl(“switch_5”);
switch6 = GetNamedControl(“switch_6”);
switch7 = GetNamedControl(“switch_7”);
switch8 = GetNamedControl(“switch_8”);

cabin_fan_light = GetNamedControl(“switchlight0”);
window_wipers_light = GetNamedControl(“switchlight1”);
light3 = GetNamedControl(“switchlight2”);
light4 = GetNamedControl(“switchlight3”);
light5 = GetNamedControl(“switchlight4”);
light6 = GetNamedControl(“switchlight5”);
light7 = GetNamedControl(“switchlight6”);
light8 = GetNamedControl(“switchlight7”);

RunAnimation();

}

void UserSetControl(CabinControl p_control, float p_value)
{
DD40CabinData cd = cast<DD40CabinData>loco.GetCabinData();

if (p_control == cabin_fan_switch)
{
bool wantFanAnimation = p_value > 0.5;
if (wantFanAnimation != cd.animatingFan)
{
cd.animatingFan = wantFanAnimation;
UpdateFan();
}

if (wantFanAnimation)
cabin_fan_light.SetValue(1.0);
else
cabin_fan_light.SetValue(0.0);
}

else if (p_control == window_wipers)
{
bool wantWiperAnimation = p_value > 0.5;
if (wantWiperAnimation != cd.animatingWiper)
{
cd.animatingWiper = wantWiperAnimation;
UpdateWipers();
}

if (wantWiperAnimation)
window_wipers_light.SetValue(1.0);
else
window_wipers_light.SetValue(0.0);

}

else if (p_control == switch3)
{
bool isOn = p_value > 0.5;
float value = 0.0;
if (isOn)
value = 1.0

light3.SetValue(value);
cd.switchOn3 = value;
}
else if (p_control == switch4)
{
bool isOn = p_value > 0.5;
float value = 0.0;
if (isOn)
value = 1.0;

light4.SetValue(value);
cd.switchOn4 = value;
}
else if (p_control == switch5)
{
bool isOn = p_value > 0.5; float value = 0.0;
if (isOn)
value = 1.0;

light5.SetValue(value);
cd.switchOn5 = value;
}

else if (p_control == switch6)
{
bool isOn = p_value > 0.5;
float value = 0.0;
if (isOn)
value = 1.0;

light6.SetValue(value);
cd.switchOn6 = value;
}

else if (p_control == switch7)
{
bool isOn = p_value > 0.5;
float value = 0.0;
if (isOn)
value = 1.0;
light7.SetValue(value);
cd.switchOn7 = value;
}

else if (p_control == switch8)
{
bool isOn = p_value > 0.5;
float value = 0.0;
if (isOn)
value = 1.0;

light8.SetValue(value);
cd.switchOn8 = value;
}

else
inherited(p_control, p_value);

}

thread void SlowFanDown(void)
{
DD40CabinData cd = cast<DD40CabinData>loco.GetCabinData();

if (isFanSlowingDown)
return;

isFanSlowingDown = true;
isFanSpeedingUp = false;

// Slow it down...
while (fanSpeed > 0.1)
{
fanSpeed = fanSpeed - 0.1;
SetMeshAnimationSpeed(“fan”, fanSpeed);

Sleep(0.5);
if (!isFanSlowingDown)
return;
}

fanSpeed = 0.0;
StopMeshAnimation(“fan”);
}

thread void SpeedFanUp(void)
{
DD40CabinData cd = cast<DD40CabinData>loco.GetCabinData();

if (isFanSpeedingUp)
return;

isFanSpeedingUp = true;
isFanSlowingDown = false;

// Speed it up...
while (fanSpeed < 1.0)
{
fanSpeed = fanSpeed + 0.1;
SetMeshAnimationSpeed(“fan”, fanSpeed);
StartMeshAnimationLoop(“fan”);

Sleep(0.5);
if (!isFanSpeedingUp)
return;
}

fanSpeed = 1.0;
SetMeshAnimationSpeed(“fan”, fanSpeed);
//isFanSpeedingUp = false;
}

void UpdateFan(void)
{
DD40CabinData cd = cast<DD40CabinData>loco.GetCabinData();

if (cd.animatingFan)
SpeedFanUp();
else
SlowFanDown();
}

void UpdateWipers(void)
{
DD40CabinData cd = cast<DD40CabinData>loco.GetCabinData();

// Don’t need to worry about else, as it will be handled when the loop is done.
if (cd.animatingWiper)
{
SetMeshAnimationSpeed(“wipers”, 1.0);
StartMeshAnimationLoop(“wipers”);
}
}

thread void RunAnimation(void)
{
DD40CabinData cd = cast<DD40CabinData>loco.GetCabinData();

wait()
{
on “Animation-Event”, “wiperstop”:
if (!cd.animatingWiper)
StopMeshAnimation(“wipers”);
continue;
}

}

};

Overview
TRS2004
steam cab interiors have been set-up in generally the same way as diesel and electric cabs with a few additional steam specific features.

Many of the levers and fireplates have several moving objects and required mouse controlled animations. This differed from the usual lever types with only one object, set to rotate around an attachment point.

Not only did the levers need reviewing, but the cab firebox itself had to produce fire and glow variations and the coal shoveller needed to be controlled and linked to the coal requirements also.

Dowload PB15 Interior source and in-games files here: http://www.auran.com/TRS2004/downloads/contentcreation/TRS2004_PB15_interior.zip

See PB15 interior Config.TXT on the following page.

 

Config.TXT File Example for an Interior -- Steam

kuid <KUID:-3:10191>
kind interior

script “PB15Cabin”
class “PB15Cabin”

camera -0.769, 0.566, 0.617
cameralist
{
   camera0 0.817, 0.026, 0.654, 0.026, -0.146
   camera1 -0.808, 0.474, 0.694, 0.214, -0.773
   camera2 -1.429, 0.461, 0.617, 0.162, -0.075
   camera3 -0.769, 0.566, 0.617,0.157, -0.125
   camera4 0.703, 0.831, 0.694, -0.715, -0.561
   camera5 1.344, 0.305, 0.617, -0.015, -0.049
}
cameradefault 3

obsolete-table
{
   0 <KUID:44179:55003>
}

soundscript
{
   coal_on
   {
      trigger coal_on
      attachment a.coalman
      ambient 1
      nostartdelay 1
      repeat-delay 0,0.001
      distance 5,200
      sound
      {
         Sound/coal_shovel2.WAV
      }
   }
   shovel_againstmetal
   {
      trigger shovel_againstmetal
      attachment a.coalman
      ambient 1
      nostartdelay 1
      repeat-delay 0,0.001
      distance 5,200
      sound
      {
         Sound/shovel_hit.WAV
      }
   }
   step_metal
   {
      trigger step_metal
      attachment a.coalman
      ambient 1
      nostartdelay 1
      repeat-delay 0,0.001
      distance 5,200
      sound
      {
         Sound/metal_footstep_left.WAV
      }
   }
   coal_off
   {
      trigger coal_off
      attachment a.coalman
      ambient 1
      nostartdelay 1
      repeat-delay 0,0.001
      distance 5,200
      sound
      {
         Sound/coal_into_firebox1.WAV
      }
   }
}

mesh-table
{
   default
   {
      mesh pb_interior_main.IM
      auto-create 1
   }
   trainbrake_lever
   {
      mesh Brake_Lever/brake_lever.IM
      auto-create 1
      att a.brake
      limits 0, 4
      angles -0.75, 0.35
      notches 0, 0.5,1.0
      notchheight 1, 1, 1
      radius 0.16
      att-parent default
      kind lever
   }
   left_window
   {
      mesh window_sides.IM
      auto-create 1
      limits 0, 1.0
      angles 0, -1
      notches 0, 1.0
      notchheight 1,1
      att a.window_l
      att-parent default
      kind lever
   }
   right_window
   {
      mesh window_sides.IM
      auto-create 1
      att a.window_r
      att-parent default
      limits 0, 1.0
      angles 0, -1
      notches 0, 1.0
      notchheight 1,1
      kind lever
   }
   left_sliding_window
   {
      mesh window_sliding.IM
      auto-create 1
      att a.windowsliding_l
      att-parent default
      limits 0, 1.0
      angles 0, -0.009
      notches 0, 1.0
      notchheight 1,1
      kind lever
   }
   right_sliding_window
   {
      mesh window_sliding.IM
      auto-create 1
      att a.windowsliding_r
      att-parent default
      limits 0, 1
      angles 0, -0.009
      notches 0, 1.0
      notchheight 1,1
      kind lever
   }
   cylinder_drain
   {
      limits 0,4
      angles 0,-0.3
      mesh Cylinder_Clean/cylinder_clean.IM
      auto-create 1
      limits 0, 1.0
      notches 0, 1.0
      notchheight 1, 1
      att a.cylinderclean
      att-parent default
      kind lever
   }
   regulator
   {
      mesh Regulator/regulator.IM
      anim Regulator/regulator.KIN
      auto-create 1
      att a.regulator
      limits 0, 1.0
      x-notches 0, 0.25, 0.5, 0.75, 1.0
      x-notchheight 1, 1, 1, 1, 1
      att-parent default
      kind animated-lever
      test-collisions 0
      mousespeed -1.0
   }
   regulator-collision-box
   {
      mesh Regulator/Selection_Box/selection_box.IM
      att-parent regulator
      att a.selection_box
      auto-create 1
      kind collision-proxy
      opacity 0
      collision-parent regulator
   }
   seat0
   {
      mesh Seat/seat.IM
      anim Seat/seat.KIN
      auto-create 1
      limits 0, 1.0
      notches 0, 1.0
      notchheight 1, 1
      att a.seat0
      att-parent default
      kind animated-lever
      test-collisions 0
   }
   seat0-collision-box
   {
      mesh Seat/Selection_Box/selection_box.IM
      att-parent seat0
      att a.selection_box
      auto-create 1
      kind collision-proxy
      opacity 0
      collision-parent seat0
   }
   seat1
   {
      mesh Seat/seat.IM
      anim Seat/seat.KIN
      auto-create 1
      limits 0, 1.0
      notches 0, 1.0
      notchheight 1, 1
      att a.seat1
      att-parent default
      kind animated-lever
      test-collisions 0
   }
   seat1-collision-box
   {
      mesh Seat/Selection_Box/selection_box.IM
      att-parent seat1
      att a.selection_box
      auto-create 1
      kind collision-proxy
      opacity 0
      collision-parent seat1
   }
   water_injector_0
   {
      mesh Injector/injector.IM
      anim Injector/injector.KIN
      auto-create 1
      limits 0, 1.0
      notches 0, 1.0
      notchheight 1, 1
      att a.injector0
      att-parent default
      kind animated-lever
      test-collisions 0
      mousespeed -1.0
   }
   water_injector_0-collision-box
   {
      mesh Injector/Selection_Box/selection_box.IM
      att-parent water_injector_0
      att a.selection_box
      auto-create 1
      kind collision-proxy
      opacity 0
      collision-parent water_injector_0
   }
   water_injector_1
   {
      mesh Injector/injector.IM
      anim Injector/injector.KIN
      auto-create 1
      limits 0, 1.0
      notches 0, 1.0
      notchheight 1, 1
      att a.injector1
      att-parent default
      kind animated-lever
      test-collisions 0
      mousespeed -1.0
   }
   water_injector_1-collision-box
   {
      mesh Injector/Selection_Box/selection_box.IM
      att-parent water_injector_1
      att a.selection_box
      auto-create 1
      kind collision-proxy
      opacity 0
      collision-parent water_injector_1
   }
   fire_plates
   {
      mesh Fireplates/fireplates.IM
      anim Fireplates/fireplates.KIN
      auto-create 1
      kind animated-lever
      test-collisions 0
      notches 0, 1.0
      notchheight 1,1
      limits 0, 1.0
   }
   fire_plates-collision-box
   {
      mesh Fireplates/Selection_Box/selection_box.IM
      att-parent fire_plates
      att a.selection_box
      auto-create 1
      kind collision-proxy
      opacity 0
      collision-parent fire_plates
   }
   water_valve0
   {
      mesh Water_Valve/water_valve.IM
      auto-create 1
      att a.water_valve0
      att-parent default
      kind lever
   }
   water_valve1
   {
      mesh Water_Valve/water_valve.IM
      auto-create 1
      att a.water_valve1
      att-parent default
      kind lever
   }
   water_valve2
   {
      mesh Water_Valve/water_valve.IM
      auto-create 1
      att a.water_valve2
      att-parent default
      kind lever
   }
   water_valve3
   {
      mesh Water_Valve/water_valve.IM
      auto-create 1
      att a.water_valve3
      att-parent default
      kind lever
   }
   water_valve4
   {
      mesh Water_Valve/water_valve.IM
      auto-create 1
      att a.water_valve4
      att-parent default
      kind lever
   }
   water_valve5
   {
      mesh Water_Valve/water_valve.IM
      auto-create 1
      att a.water_valve5
      att-parent default
      kind lever
   }
   blowdown
   {
      kind lever
      mesh Blowdown/blowdown.IM
      auto-create 1
      limits 0, 1.0
      notches 0, 1.0
      notchheight 1, 1
      angles 0, 0.01
      att a.blowdown
      att-parent default
      mousespeed -1.0
   }
   sanding_lever
   {
      kind lever
      mesh Sanding_Lever/sanding_lever.IM
      auto-create 1
      limits 0, 1.0
      notches 0, 1.0
      notchheight 1, 1
      angles 0, 0.2
      att a.sanding_lever
      att-parent default
      mousespeed -1.0
   }
   whistle_lever
   {
      kind lever
      mesh Whistle_Lever/whistle_lever.IM
      auto-create 1
      limits 0, 1.0
      notches 0, 1.0
      notchheight 1, 1
      angles 0, 0.3
      att a.whistle
      att-parent default
   }
   bplocomain_needle
   {

      kind needle
      mesh Main_Res_Needle/main_res_needle.IM
      auto-create 1
      att a.reservoir_press_red
      att-parent default
      limits 0, 3600
   }
   bptrainbrakepipe_needle
   {
      kind needle
      mesh Trainline_Needle_Black/trainline_needle_black.IM
      auto-create 1
      att a.brake_press_black
      att-parent default
      limits 0, 3600
   }
   boiler_needle
   {
      kind needle
      mesh Boiler_Needle/boiler_needle.IM
      att a.boiler_pressure
      limits 0, 1570
      auto-create 1
   }
   reverser
   {
      mesh Reverser/reverser.PM
      anim Reverser/reverser.KIN
      auto-create 1
      kind animated-lever
      test-collisions 0
      limits -1.0, 1.0
   }
   reverser-collision-box
   {
      mesh Reverser/Selection_Box/selection_box.IM
      att-parent reverser
      att a.selection_box
      auto-create 1
      kind collision-proxy
      opacity 0
      collision-parent reverser
   }
   waterglass_right
   {
      mesh waterglass_right.IM
      anim waterglass_right.KIN
      auto-create 1
      limits 0, 100
      kind animated-dial
   }
   waterglass_left
   {
      mesh waterglass_left.IM
      anim waterglass_left.KIN
      auto-create 1
      limits 0, 100
      kind animated-dial
   }
   firebox
   {
      mesh firebox.IM
      auto-create 1
      kind firebox
      light 0
      test-collisions 0
   }
   fire
   {
      mesh fire.IM
      auto-create 1
      light 0
      test-collisions 0
   }
   coal
   {
      mesh coal.IM
      auto-create 1
      light 0
      test-collisions 0
   }
   fireglow
   {
      mesh fireglow.IM
      auto-create 1
      light 0
      test-collisions 0
   }
   coalman
   {
      mesh Coalman/coalman.IM
      auto-create 1
      att-parent default
      att a.coalman
      effects
      {
         shovel
         {
            kind animation
            anim Coalman/coalman_shovel.KIN
         }
         wave
         {
            kind animation
            anim Coalman/coalman_wave.KIN
         }
         idle1
         {
            kind animation
            anim Coalman/coalman_loop1.KIN
         }
         idle2
         {
            kind animation
            anim Coalman/coalman_loop2.KIN
         }
         loop2shovel
         {
            kind animation
            anim Coalman/coalman_loop2shovel.KIN
         }
         shovel2loop
         {
            kind animation
            anim Coalman/coalman_shovel2loop.KIN
         }
         wipebrow
         {
            kind animation
            anim Coalman/coalman_wipebrow.KIN
         }
      }
   }
}

description ""
trainz-build 2.0

 

This is the PB15 steam interior script file. This script is responsible for mapping all the steam-specific controls to the physics system, and for handling PB-15 specific functions such as the coal shoveling dude.

Cabin.GS Script File Example for an Interior -- Steam

include “train.gs”
include “locomotive.gs”
include “cabin.gs”

class PB15CabinData isclass CabinData
{
public float fire_plates_val;
public float left_window_val;
public float right_window_val;
public float left_sliding_window_val;
public float right_sliding_window_val;
public float seat0_val;
public float seat1_val;
public float sanding_lever_val;
public float whistle_lever_val;
public float regulator_lever_val;
public float blowdown_lever_val;
public bool fireboxDoorOpen;
};

class PB15Cabin isclass Cabin
{
Locomotive loco;

CabinControl speedometer;
CabinControl main_reservoir_needle;
CabinControl brake_cylinder0_needle;
CabinControl brake_cylinder1_needle;
CabinControl no3_pipe_needle;
CabinControl brake_pipe_needle;
CabinControl equaliser_needle;
CabinControl flow_needle;
CabinControl ampmeter_needle0;
CabinControl ampmeter_needle1;
//CabinControl throttle_lever;
CabinControl reverser_lever;
CabinControl train_brake_lever;
CabinControl train_lapbrake_lever;
CabinControl loco_brake_lever;
CabinControl dynamic_brake_lever;
CabinControl wheelslip_light;
CabinControl horn_rope;
CabinControl pantograph_lever;
CabinControl light_switch;
CabinControl waterGlassLeft_dial, waterGlassRight_dial;
CabinControl firebox;
CabinControl boiler_needle;
CabinControl regulator_lever;
CabinControl fire_plates;
CabinControl left_window;
CabinControl right_window;
CabinControl left_sliding_window;
CabinControl right_sliding_window;
CabinControl seat0;
CabinControl seat1;
CabinControl sanding_lever;
CabinControl whistle_lever;
CabinControl blowdown_lever;
CabinControl waterInjector0, waterInjector1;

bool shovellingCoal;
bool waving;

thread void RunAnimation(void);

public void Init(void)
{
speedometer = GetNamedControl(“speedo_needle”);
main_reservoir_needle = GetNamedControl(“bplocomain_needle”);
brake_cylinder0_needle = GetNamedControl(“bptrainbrakecylinder_needle”);
brake_cylinder1_needle = GetNamedControl(“no3pipe_needle”);
no3_pipe_needle = GetNamedControl(“bptrainbrakecylinder2_needle”);
brake_pipe_needle = GetNamedControl(“bptrainbrakepipe_needle”);
equaliser_needle = GetNamedControl(“bploco_equaliser”);
flow_needle = GetNamedControl(“flow_needle”);
ampmeter_needle0 = GetNamedControl(“ampmeter_needle”);
ampmeter_needle1 = GetNamedControl(“ampmeter2_needle”);
//throttle_lever = GetNamedControl(“throttle_lever”);
train_brake_lever = GetNamedControl(“trainbrake_lever”);
train_lapbrake_lever = GetNamedControl(“trainbrakelap_lever”);
loco_brake_lever = GetNamedControl(“independantbrake_lever”);
dynamic_brake_lever = GetNamedControl(“dynamicbrake_lever”);
wheelslip_light = GetNamedControl(“wheelslip_light”);
horn_rope = GetNamedControl(“horn”);
light_switch = GetNamedControl(“light_switch”);

waterGlassLeft_dial = GetNamedControl(“waterglass_left”);
waterGlassRight_dial = GetNamedControl(“waterglass_right”);

firebox = GetNamedControl(“firebox”);
boiler_needle = GetNamedControl(“boiler_needle”);
regulator_lever = GetNamedControl(“regulator”);
reverser_lever = GetNamedControl(“reverser”);

waterInjector0 = GetNamedControl(“water_injector_0”);
waterInjector1 = GetNamedControl(“water_injector_1”);

fire_plates = GetNamedControl(“fire_plates”);
left_window = GetNamedControl(“left_window”);
right_window = GetNamedControl(“right_window”);
left_sliding_window = GetNamedControl(“left_sliding_window”);
right_sliding_window = GetNamedControl(“right_sliding_window”);
seat0 = GetNamedControl(“seat0”);
seat1 = GetNamedControl(“seat1”);
sanding_lever = GetNamedControl(“sanding_lever”);
whistle_lever = GetNamedControl(“whistle_lever”);
blowdown_lever = GetNamedControl(“blowdown_lever”);

RunAnimation();
}

//! Attach this cabin to a game object (i.e. a locomotive).
//
// Param: obj Game object to attach this cabin to (usually a Locomotive).
//
public void Attach(GameObject obj)
{
loco = cast<Locomotive>(obj);

// get cabin data
CabinData cd = loco.GetCabinData();
if(cd)
{
// reset the controls from saved values
PB15CabinData pbcd = cast<PB15CabinData>cd;
if(fire_plates)
fire_plates.SetValue(pbcd.fire_plates_val);
if(left_window)
left_window.SetValue(pbcd.left_window_val);
if(right_window)
right_window.SetValue(pbcd.right_window_val);
if(left_sliding_window)
left_sliding_window.SetValue(pbcd.left_sliding_window_val);
if(right_sliding_window)
right_sliding_window.SetValue(pbcd.right_sliding_window_val);
if(seat0)
seat0.SetValue(pbcd.seat0_val);
if(seat1)
seat1.SetValue(pbcd.seat1_val);
if(sanding_lever)
sanding_lever.SetValue(pbcd.sanding_lever_val);
if(whistle_lever)
whistle_lever.SetValue(pbcd.whistle_lever_val);
if(regulator_lever)
regulator_lever.SetValue(pbcd.regulator_lever_val);
if(blowdown_lever)
blowdown_lever.SetValue(pbcd.blowdown_lever_val);
}
else
{
PB15CabinData pbd = new PB15CabinData();
loco.SetCabinData(pbd);
}
}

// the default locomotive config uses kPa to describe pressure dial ranges
// this function converts from g/m^3 into kPa-above-atmospheric
public float GetPressureParam(string param)
{
float pressureMultiplier = 1.0 / (0.145 * 0.0000703);
float pressureBase = 14.7 * 0.0000703;
return pressureMultiplier * (loco.GetEngineParam(param) - pressureBase);
}

public void Update(void)
{
float value;
Train train = loco.GetMyTrain();

//
// Update Needles
//

if (speedometer)
speedometer.SetValue(train.GetVelocity());

if (main_reservoir_needle)
main_reservoir_needle.SetValue(GetPressureParam(“main-reservoir-pressure”));

value = GetPressureParam(“brake-cylinder-pressure”);
if (brake_cylinder0_needle)
brake_cylinder0_needle.SetValue(value);
if (brake_cylinder1_needle)
brake_cylinder1_needle.SetValue(value);

if (no3_pipe_needle)
no3_pipe_needle.SetValue(GetPressureParam(“no3-pipe-pressure”));

if (brake_pipe_needle)
brake_pipe_needle.SetValue(GetPressureParam(“brake-pipe-pressure”));

if (equaliser_needle)
equaliser_needle.SetValue(GetPressureParam(“equaliser-pressure”));

if (flow_needle)
flow_needle.SetValue(GetPressureParam(“flow”));

value = loco.GetEngineParam(“current-drawn”);
if (ampmeter_needle0)
ampmeter_needle0.SetValue(value);
if (ampmeter_needle1)
ampmeter_needle1.SetValue(value);

//
// Update Levers
//
// This is done in case the game logic has changed any of the settings from what
// the user selected.
//
//if (throttle_lever)
// throttle_lever.SetValue(loco.GetEngineSetting(“throttle”));// * 8.0);

if (reverser_lever)
reverser_lever.SetValue(loco.GetEngineSetting(“reverser”));

if (train_brake_lever)
train_brake_lever.SetValue(loco.GetEngineSetting(“train-auto-brake”));

if (train_lapbrake_lever)
train_lapbrake_lever.SetValue(loco.GetEngineSetting(“train-lap-brake”));

if (loco_brake_lever)
loco_brake_lever.SetValue(loco.GetEngineSetting(“loco-auto-brake”));

if (dynamic_brake_lever)
dynamic_brake_lever.SetValue(loco.GetEngineSetting(“dynamic-brake”));

if (wheelslip_light)
wheelslip_light.SetValue(loco.GetEngineParam(“wheelslip”));

if (horn_rope)
horn_rope.SetValue(loco.GetEngineParam(“horn”));

if (pantograph_lever)
pantograph_lever.SetValue(loco.GetEngineSetting(“pantograph”));

if (light_switch)
light_switch.SetValue(loco.GetEngineSetting(“headlight”));

if (waterGlassLeft_dial)
waterGlassLeft_dial.SetValue(loco.GetEngineParam(“steam-boiler-liquid-percent”));

if (waterGlassRight_dial)
waterGlassRight_dial.SetValue(loco.GetEngineParam(“steam-boiler-liquid-percent”));

// update cabin data
PB15CabinData cd = cast<PB15CabinData>loco.GetCabinData();
if(left_window)
cd.left_window_val = left_window.GetValue();
if(right_window)
cd.right_window_val = right_window.GetValue();
if(left_sliding_window)
cd.left_sliding_window_val = left_sliding_window.GetValue();
if(right_sliding_window)
cd.right_sliding_window_val = right_sliding_window.GetValue();
if(seat0)
cd.seat0_val = seat0.GetValue();
if(seat1)
cd.seat1_val = seat1.GetValue();
if(sanding_lever)
cd.sanding_lever_val = sanding_lever.GetValue();
if(whistle_lever)
cd.whistle_lever_val = whistle_lever.GetValue();
if(regulator_lever)
cd.regulator_lever_val = regulator_lever.GetValue();
if(fire_plates)
cd.fire_plates_val = fire_plates.GetValue();
if(blowdown_lever)
cd.blowdown_lever_val = blowdown_lever.GetValue();

cd.fireboxDoorOpen = fire_plates.GetValue() > 0.9;

if (firebox)
{
firebox.SetNamedValue(“amount-burning-coal”, 0.5);

if(fire_plates)
{
firebox.SetNamedValue(“door-open”, fire_plates.GetValue());
}

firebox.SetNamedValue(“fire-life”, loco.GetEngineParam(“fire-temperature”) / 1600.0);
firebox.SetNamedValue(“steam-piston-cycle”, loco.GetEngineParam(“steam-piston-cycle”));
}

if (boiler_needle)
{
boiler_needle.SetValue(GetPressureParam(“steam-boiler-pressure”));
}

if (waterInjector0)
waterInjector0.SetValue(loco.GetEngineSetting(“injector”));

if (waterInjector1)
waterInjector1.SetValue(loco.GetEngineSetting(“injector”));
}

void UserSetControl(CabinControl p_control, float p_value)
{
Interface.Log(“control: “ + p_control.GetName() + “ value: “ + p_value);

if (p_control == reverser_lever)
loco.SetEngineSetting(“reverser”, p_value);

// else if (p_control == throttle_lever)
// loco.SetEngineSetting(“throttle”, p_value);

else if (p_control == train_brake_lever)
loco.SetEngineSetting(“train-auto-brake”, p_value);

else if (p_control == train_lapbrake_lever)
loco.SetEngineSetting(“train-lap-brake”, p_value);

else if (p_control == loco_brake_lever)
loco.SetEngineSetting(“loco-auto-brake”, p_value);

else if (p_control == dynamic_brake_lever)
loco.SetEngineSetting(“dynamic-brake”, p_value);

else if (p_control == horn_rope)
; // todo

else if (p_control == pantograph_lever)
loco.SetEngineSetting(“pantograph”, p_value);

else if (p_control == light_switch)
loco.SetEngineSetting(“headlight”, p_value);

else if (p_control == regulator_lever)
loco.SetEngineSetting(“regulator”, p_value);

else if (p_control == waterInjector0 or p_control == waterInjector1)
loco.SetEngineSetting(“injector”, p_value);
}

void UserPressKey(string s)
{
if(s == “shovel-coal”)
{
PB15CabinData cd = cast<PB15CabinData>loco.GetCabinData();
// if(cd.fireboxDoorOpen)
{
if(FireAddCoal())
{
if(!shovellingCoal)
{
if(!waving)
{
if(fire_plates)
fire_plates.SetValue(1.0f);

shovellingCoal = true;
SetFXAnimationState(“idle1”, false);
SetFXAnimationState(“idle2”, false);
SetFXAnimationState(“loop2shovel”, false);
SetFXAnimationState(“loop2shovel”, true);
}
}
}
}
}
else if(s == “wave”)
{
if(!shovellingCoal)
{
if(!waving)
{
waving = true;
SetFXAnimationState(“wave”, false);
SetFXAnimationState(“wave”, true);
}
}
}
}

thread void RunAnimation(void)
{
SetFXAnimationState(“idle1”, true);

wait()
{
on “Animation-Event”, “Coalman_loop1_end”:
SetFXAnimationState(“idle1”, false);
SetFXAnimationState(“idle2”, true);
continue;

on “Animation-Event”, “Coalman_loop2_end”:
SetFXAnimationState(“idle2”, false);
SetFXAnimationState(“idle1”, true);
continue;

on “Animation-Event”, “Coalman_loop2shovel_end”:
SetFXAnimationState(“loop2shovel”, false);
SetFXAnimationState(“shovel”, true);
continue;

on “Animation-Event”, “Coalman_shovel_end”:
SetFXAnimationState(“shovel”, false);
SetFXAnimationState(“wipebrow”, true);
continue;

on “Animation-Event”, “Coalman_wipebrow_end”:
SetFXAnimationState(“wipebrow”, false);
SetFXAnimationState(“shovel2loop”, true);
continue;

on “Animation-Event”, “Coalman_shovel2loop_end”:
SetFXAnimationState(“shovel2loop”, false);
SetFXAnimationState(“idle1”, true);
shovellingCoal = false;
continue;

on “Animation-Event”, “Coalman_wave_end”:
SetFXAnimationState(“wave”, false);
SetFXAnimationState(“idle1”, true);
waving = false;
continue;

}
}

};

 

TAGS DESCRIPTIONS
script This refers to the name of the script file and the class of asset it is (the class must match that stated within the script file).
class
mesh Mesh model file (*.IM or *.PM)
camera Camera position relative to a.cabfront (0,0,0 = left/right, front/back, up/down)
cameralist

Multiple in-cab camera positions relative to a.cabfront. This section ignored by SP3.

0,0,0,0,0 =left/right, front/back, up/down, yaw, pitch

To  determine these variables add -freeintcam to the trainzoptions.TXT. Pan around the interior using arrow keys and mouse. Co-ordinates at bot./left of screen..

cameradefault

The in-cab camera view Trainz defaults to when entering the cab. (Generally should be the same as that of camera). This section ignored by SP3.

attachment Start of attachments section. Specifies additional meshes and types inserted at specified attachment points within the main *.IM model.
Interior Attachment Types:
pantograph_lever Pantograph lever/switch. For raising and lowering pantographs on electric locos.
horn Locomotive's horn
independantbrake_lever Independent (Loco) brake lever
reverser_lever Reverser lever (Forward/Neutral/Reverse)
throttle_lever Throttle/power handle
trainbrake_lever Train brake lever - self lapping
trainbrakelap_lever Train brake lever with lap position
dynamicbrake_lever For selecting dynamic brake
bplocomain_needle Main reservoir pressure needle
bploco_equalizer Equalizing reservoir pressure needle
bptrainbrakepipe_needle Brake pipe pressure needle
bptrainbrakecylinder_needle Brake cylinder pressure needle
speedo_needle Speedometer needle
ampmeter_needle Power meter needle
flow_needle Flow gauge needle
windows Textured mesh with low opacity (semi-transparent) to give impression of refection. This mesh has the same 3D origin point as the main *.IM (or *.PM) model, therefore does not require an attachment point
wheelslip_light A warning light mesh that is only visible when the locomotive loses traction. This mesh has the same 3D origin point as the main *.PM model, therefore does not require an attachment point
switch0, switch1 etc. Switches
light_switch Light switch
You can also attach miscellaneous meshes to attachment points. They have no current function in Trainz but they look pretty groovy.

E.g. a swivel chair

swivel_chair
   {

      kind lever
       mesh chair.PM
       att a.chair1
       limits 0, 8
       angles 6.8, -6.8
    }

Interior Attachment variables:
Kinds: lever Levers, switches, dials, etc.
needle Gauge needles
animated-lever Animated Levers etc E.g. in steam cabs
collision-proxy Mouse collisions for animated levers
pullrope Pull rope horn as in the F7
light Wheelslip light
mesh Mesh file to be inserted
att Attachment point where mesh is inserted. If no attachment point is specified the mesh will be inserted at a.cabfront (the same insertion point as main mesh)
limits Mathematical boundaries Trainz uses determine the objects function. These values vary as different objects use different mathematical units. Generally use the default values used in the config.TXT files provided.
angles Rotational boundaries in radians relative to its attachment point. Refer to the radian/degree circle diagram below to help you out.
notches The position of notches within the angle boundaries. These are represented as decimal points between and including 0 and 1.
notchheight The size of the notches specified.
radius The notch position relative to the attachment point.
mousespeed This controls the use of the mouse on screen. Use this to adjust the push/pull functioning of levers and dials.
2. Doubles mouse speed in default direction
-0.5 Inverts mouse direction and halves the speed.

-1

Inverts mouse direction.
test-collisions 0 Mouse cannot be used for this mesh. Collision mesh used instead. E.g. animated-levers
opacity Used for the window mesh to give transparency (and the impression of reflectivity).

 

 

Content Creation Guide Table of Content

Paint Shed Guide

  .