CCG/Example: Interior (Steam)

From TrainzOnline
< CCG
Jump to: navigation, search

Contents

Interior (Steam)

Directory Structure

A typical asset of this kind has the following File\Directory Structure:

CCG interior steam1 dir1.jpg . . . CCG interior steam2 dir1.jpg


CCG interior steam3 dir1.jpg


Required Files

config.txt - The config file for the asset.

thumb.jpg - The thumbnail image for this asset. A 240x180 jpeg.

firebox_glow_op.bmp, glass.bmp, glassw.bmp, black.tga, blackhead.tga, brass.tga, bumpy_blackhead.tga, coalfire.tga, copper.tga, darkmetal.tga, firebox.tga, firebox_glow.tga, flaman.tga, flame_test2.tga, glass.tga, glassw.tga, red.tga, roof.tga, waterhose.tga, black.texture.txt, blackhead.texture.txt, brass.texture.txt, bumpy_blackhead.texture.txt, coal.texture.txt, copper.texture.txt, darkmetal.texture.txt, fire.texture.txt, firebox.texture.txt, firebox_glow-firebox_glow_op.texture.txt, flaman.texture.txt, glass-glass.texture.txt, glassw-glassw.texture.txt, red.texture.txt, roof.texture.txt, waterhose.texture.txt, blackhead.texture.txt, blackhead.tga, bumpy_blackhead.texture.txt, bumpy_blackhead.tga, darkmetal.texture.txt, darkmetal.tga, water.texture.txt, water.tga, needles.tga, needles.texture.txt - The texture files used by the progressive meshes of this interior.

See the section on Texture.txt files on Page 96 for more information.

fireplates.kin, waterglass_left.kin, waterglass_right.kin - The animation files used to operate certain elements of the interior, ie the fireplate doors opening and closing.

bigsteam_interior.gs - Script file detailing some functionality of the interior asset, in this case that no animated fireman is present in the interior.

bigtap.im, coal.im, cylindercocks.im, drifter.im, fire.im, firebox.im, fireglow.im, injector.im, mallard_interior.im, regulator.im, smalltap.im, trainbrake_lever.im, watervalvea.im, watervalveb.im, window.im, selection_box.im, waterglass_left.im, waterglass_right.im, boiler_needle.im, brake_needle.im, flaman_needle.im, speedo_needle.im, fireplates.im - The indexed mesh components used to create the interior asset.

More information on modelling interior assets can be found on Page 358 of this document.

Cabin.txt - A text file mapping sounds to their respective interior elements.

air_brake2.wav, air_brake.wav, boiler_blow_down.wav, boiler_blow_down_end.wav, brakehandle.wav, brakes.wav, coal_into_firebox1.wav, coal_into_firebox2.wav, coal_into_firebox3.wav, coal_shovel1.wav, coal_shovel2.wav, coal_shovel_into_combined.wav, cylinder_cocks1.wav, cylinder_cocks2.wav, cylinder_cocks_full.wav, fire_roar.wav, firebox_close.wav, firebox_open.wav, metal_footstep_left.wav, metal_footstep_right.wav, regulator1.wav, regulator2.wav, reversing_lever_notch.wav, reversing_lever_throw.wav, rutnut.wav, sanding_lever1.wav, sanding_lever2.wav, seat_unfold.wav, shovel_hit.wav, tender_handbrake.wav, throttle.wav, whistle_end.wav, whistle_mid_loop.wav, whistle_start.wav, window_open.wav - The sound files associated with the interior elements.


Config.txt File Listing

kuid                    <kuid:56113:1015>
kind                    "interior"
username                "testSteamInterior"
trainz-build            2.5
cameradefault           0
category-class          "ZI"
description            "Test interior for a steam locomotive. Based on the Mallard interior."
category-region         "00"
category-era            "1940s;1950s;1960s;1970s;1980s"
script                  "bigsteam_interior.gs"
class                   "Bigsteam_Interior"
cameralist
{
  camera0               1,0.9,0.55,0,0
  camera1               0.5,0.9,0.55,0,0
  camera2               0,0.9,0.55,0,0
  camera3               -0.5,0.9,0.55,0,0
  camera4               -1,0.9,0.55,0,0
  camera5               1.1,0.8,0,0,0
}
  
mesh-table
{
  default
    {
      mesh              "mallard_interior.im"
      auto-create       1
    }
  regulator
    {
      kind              "lever"
      mesh              "regulator.im"
      att               "a.regulator"
      att-parent        "default"
      auto-create       1
      limits            0,1
      angles            0.24,-0.24
      radius            0.35
      mousespeed        -1
      mousemode         "exact"
    }
  trainbrakelap_lever
    {
      kind              "lever"
      mesh              "trainbrake_lever.im"
      att               "a.trainbrake_lever"
      att-parent        "default"
      auto-create       1
      limits            0,4
      angles            0,0.94
      notches           0,0.25,0.5,0.75,1
      notchheight       1,1,1,1,1
      mousespeed        1
    }
  firebox
    {
      kind              "firebox"
      mesh              "firebox.im"
      auto-create       1
      att               "a.origin"
      att-parent        "default"
      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
    }
  water_injector_0
    {
      mesh             "injector.im"
      auto-create      1
      att              "a.injector0"
      att-parent       "default"
      kind             "lever"
      mousespeed       1
    }
  water_injector_1
    {
      mesh             "injector.im"
      auto-create      1
      att              "a.injector1"
      att-parent       "default"
      kind             "lever"
      mousespeed       1
    }
  fire_plates
    {
      mesh             "fireplates/fireplates.im"
      anim             "fireplates/fireplates.kin"
      auto-create      1
      kind             "animated-lever"
      test-collisions  0
      notches          0,1
      notchheight      1,1
      limits           0,1
    }
  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"
    }
  waterglass_right
    {
      mesh             "waterglasses/waterglass_right.im"
      anim             "waterglasses/waterglass_right.kin"
      auto-create      1
      limits           0,100
      kind             "animated-dial"
    }
  waterglass_left
    {
      mesh             "waterglasses/waterglass_left.im"
      anim             "waterglasses/waterglass_left.kin"
      auto-create      1
      limits           0,100
      kind             "animated-dial"
    }
  reverser
    {
      mesh             "reverser/reverser.im"
      anim             "reverser/reverser.kin"
      auto-create      1
      kind             "animated-lever"
      test-collisions  0
      limits           -1,1
      mousespeed       -2
    }
  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"
    }
  boiler_needle
    {
      kind             "needle"
      mesh             "needles/boiler_needle.im"
      att              "a.boiler_pressure1"
      limits           0,1902
      att-parent       "default"
      auto-create      1
    }
  boiler_needle1
    {
      kind             "needle"
      mesh             "needles/boiler_needle.im"
      att              "a.boiler_pressure2"
      limits           0,1902
      att-parent       "default"
      auto-create      1
    }
  speedo_needle
    {
      kind             "needle"
      mesh             "needles/speedo_needle.im"
      att              "a.speedo"
      att-parent       "default"
      auto-create      1
      limits           0,49
    }
  bptrainbrakepipe_needle
    {
      kind             "needle"
      mesh             "needles/brake_needle.im"
      att              "a.trainbrake_needle"
      att-parent       "default"
      auto-create      1
      limits           0,1970
    }
  bplocomain_needle
    {
      kind             "needle"
      mesh             "needles/brake_needle.im"
      att              "a.mainres_needle"
      att-parent       "default"
      auto-create      1
      angles           0,-3.14
      limits           0,890
    }
  water_valve_
    {
      mesh             "watervalveA.im"
      auto-create      1
      att              "a.watervalve_0"
      att-parent       "default"
      kind             "lever"
      mousemode        "exact"
      limits           0,1
      angles           0,-0.5
    }
  water_valve__
    {
      mesh             "watervalveA.im"
      auto-create      1
      att              "a.watervalve_1"
      att-parent       "default"
      kind             "lever"
      mousemode        "exact"
      limits           0,1
      angles           0,-0.5
    }
  water_valve___
    {
      mesh             "watervalveB.im"
      auto-create      1
      att              "a.watervalve_2"
      att-parent       "default"
      kind             "lever"
      mousemode        "exact"
      limits           0,1
      angles           0,0.5
      mousespeed       -1
    }
  water_valve____
    {
      mesh             "watervalveB.im"
      auto-create      1
      att              "a.watervalve_3"
      att-parent       "default"
      kind             "lever"
      mousemode        "exact"
      limits           0,1
      angles           0,0.5
      mousespeed       -1
    }
  water_valve_____
    {
      mesh             "watervalveB.im"
      auto-create      1
      att              "a.watervalve_4"
      att-parent       "default"
      kind             "lever"
      mousemode        "exact"
      limits           0,1
      angles           0,-0.5
      mousespeed       -1
    }
  water_valve______
    {
      mesh             "watervalveB.im"
      auto-create      1
      att              "a.watervalve_5"
      att-parent       "default"
      kind             "lever"
      mousemode        "exact"
      limits           0,1
      angles           0,-0.5
      mousespeed       -1
    }
  _
    {
      mesh             "drifter.im"
      auto-create      1
      att              "a.drifter"
      att-parent       "default"
      kind             "lever"
      mousemode        "exact"
      limits           0,1
      angles           0,-0.5
      mousespeed       -1
    }
  driver_window
    {
      mesh             "window.im"
      auto-create      1
      att              "a.windowA"
      att-parent       "default"
      limits           0,1
      angles           0,-0.012
      notches          0,1
      notchheight      1,1
      kind             "lever"
    }
  fireman_window
    {
      mesh             "window.im"
      auto-create      1
      att              "a.windowB"
      att-parent       "default"
      limits           0,1
      angles           0,0.012
      notches          0,1
      notchheight      1,1
      kind             "lever"
    }
  cylinder_cocks
    {
      mesh             "cylindercocks.im"
      auto-create      1
      att              "a.cylindercocks"
      att-parent       "default"
      kind             "lever"
      mousemode        "exact"
      limits           0,1
      angles           0,-0.5
    }
  __
    {
      mesh             "watervalveA.im"
      auto-create      1
      att              "a.steamvalve"
      att-parent       "default"
      kind             "lever"
      mousemode        "exact"
      limits           0,1
      angles           0,-0.5
    }
  speedo_needle1
    {
      kind             "needle"
      mesh             "needles/flaman_needle.im"
      att              "a.flaman"
      att-parent       "default"
      auto-create      1
      limits           0,85
    }
  ___
    {
      mesh             "smalltap.im"
      auto-create      1
      att              "a.steamvalve0"
      att-parent       "default"
      kind             "lever"
      mousespeed               1
    }
  ____
    {
      mesh             "bigtap.im"
      auto-create      1
      att              "a.steamvalve1"
      att-parent       "default"
      kind             "lever"
      mousespeed       1
    }
  blower
    {
      mesh             "bigtap.im"
      auto-create      1
      att              "a.steamvalve2"
      att-parent       "default"
      kind             "lever"
      mousespeed       1
    }
  _____
    {
      mesh             "smalltap.im"
      auto-create      1
      att              "a.steamvalve3"
      att-parent       "default"
      kind             "lever"
      mousespeed       1
    }
  ______
    {
      mesh             "bigtap.im"
      auto-create      1
      att              "a.steamvalve4"
      att-parent       "default"
      kind             "lever"
      mousespeed       1
    }
 }
  
thumbnails
{
  0
    {
      image            "thumb.jpg"
      width            240
      height           180
    }
}


Script File Listing

bigsteam_interior.gs

include "DefaultSteamCabin.gs"
class Bigsteam_Interior isclass DefaultSteamCabin
{
         public void Init(void)
         {
                  inherited();
                  hasAnimatedFireman = false;
         }
};


Cabin.txt File Listing

 switch                         switch_.wav
 dynamicbrake_lever             change-notch notch_.wav
 independantbrake_lever         change-notch airbrake2.wav
 reverser lever-low             reversing_lever_notch.wav
 reverser lever-high            reversing_lever_throw.wav
 fire_plates lever-low          firebox_open.wav
 fire_plates lever-high         firebox_close.wav
 fire_plates looping            fire_roar.wav
 regulator lever-high           regulator2.wav
 regulator lever-low            throttle.wav
 sanding_lever lever-low        sanding_lever.wav
 sanding_lever lever-high       sanding_lever2.wav
 blowdown looping               boiler_blow_down.wav
 cylinder_cocks change-notch    cylinder_cocks_full.wav
 seat0 change-notch             seat_unfold.wav
 seat change-notch              seat_unfold.wav
 whistle_lever looping          whistle_mid_loop.wav
 trainbrakelap_lever change-notch air_brake2.wav
 pantograph_lever change-notch  lever_.wav
 trainbrake_lever change-notch  air_brake.wav
 driver_window change-notch     seat_unfold.wav
 fireman_window change-notch    seat_unfold.wav


Download this asset

This asset is available for download from the TRS2006 website at:

http://files.auran.com/TRS2006/Downloads/Example_Download.zip


Return to CCG Index

Content Creator's Guide

Kind Examples

Personal tools