CCG/Kind: Traincar

From TrainzOnline
< CCG
Revision as of 12:20, 6 July 2013 by Fabartus (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents


KIND: TRAINCAR

A traincar is a Locomotive or Rolling stock asset. One of the main features of TRS is that traincars, (namely rolling stock), have the ability to transport commodities (products) and to interact with compatible industry assets.

As there are a range of products and product categories, each rolling stock type is set up differently to accommodate the load type both visual representation and through it's config. For this reason we have made available individual downloads for the various rolling stock types.

Refer to KIND: PRODUCT & KIND: PRODUCT-CATEGORY for further information.

The following example is a config.txt file from a locomotive. Note the mesh-table and animation setup.

kuid <KUID2:####:#####.#>
category-class   "AC"
category-region  "AU"
category-era     "1970s;1980s;1990s;2000s"
trainz-build     2.9 
kuid-table
{
}
obsolete-table
{
}
      
mesh-table
{
  default
  {
    mesh loco_body/loco_body.lm
    auto-create 1
  }
  shadow
  {
    mesh loco_shadow/loco_shadow.im
  }
   
  fan1
  {
    mesh loco_body/fan/fan.im
    anim loco_body/fan/fan.kin
    auto-create 1
    att a.fan0
    att-parent default
    animation-loop-speed 1.0
  }
  fan2
  {
    mesh loco_body/fan/fan.im
    anim loco_body/fan/fan.kin
    auto-create 1
    att a.fan2
    att-parent default
    animation-loop-speed 1.0
  }
  default-night-forward
  {
    mesh loco_body/night/night.im
    auto-create 0
    att a.bog0
    att-parent default
  }
}
bogeys
  0
  {
    bogey    <KUID:####:#####>
  {
  1
  {
    bogey    <KUID:####:#####>
  }
  2
  {
    bogey    <KUID:####:#####>
    reversed   1
  )
{
      
pantograph <KUID:###:#####>
   
interior <KUID:####:#####>
engine 1
name Electric Loco
mass 37000
company Queensland Rail
origin AU
kind traincar
fonts 2
cabinsway 0
enginespec <KUID:####:#####>
enginesound <KUID:####:#####>
hornsound <KUID:####:#####>
smoke_shade 0.3
smoke_random 2
smoke_slowlife 1
smoke_fastlife 6
smoke_height 7
smoke_fastspeed 4
smoke0
{
  attachment a.exhaust0
  mode speed
  enabled 1
  maxspeedkph 120
  file "lospeed.tfx"
}
smoke1
{
  attachment a.exhaust1
  mode speed
  enabled 1
  maxspeedkph 120
  file "hispeed.tfx"
}
description " "



TRAINCAR CONFIG.TXT BREAKDOWN

Some config.txt tags are not explained below, but are covered in the general config.txt explanation.


default-night-forward
The name for a submesh attached to a locomotive, to show a beam of light for example, in the direction of movement of the locomotive. Trainz recognises the name and turns on the correct mesh depending on the running direction.
Note in the example the use of auto-create 0 to make the mesh invisible when placed. The mesh will be visible when the light switch is activated.


bogey
The bogey KUID number (default for a.bog0 and a.bog1)
Reversing a bogey
Reversing the bogey orientation is accomplished by ticking the reverse box in CCP, a boolean choice.

The bogey will have reversed orientation. Note: This will cause bogey animation to play in reverse unless the attachment point for the bogey is also rotated 180 degrees in 3dmax/Blender.


pantograph
The pantograph KUID number inserted at a.pant0, a.pant1, etc. Use this tag only when needed.
interior
Kuid number of the required interior. Inserted at a.cabfront or a.cabback. Use this tag only when needed e.g. locomotives.
engine
States type of traincar. 0 = Rolling stock, 1 = Locomotive
mass
Mass in kilograms
company
The Locomotive or car owner
kind traincar
must be traincar for any rollingstock
fonts
Indicates how many types of numbering fonts used,
0 = no fonts used
1 = one font ... Digit textures (digit_1.tga to digit_6.tga) replaced automatically with alphanumber textures (alphanumber_0 to alphanumber_9 as numbers are changes via the Surveyor Trains tab - `Edit Properties' icon (the `?' icon).
2 = two fonts ... Digit textures (digit_1a.tga to digit_6a.tga and digit_1b.tga to digit_6b.tga) replaced automatically with alphanumber textures (alphanumber_0a to alphanumber_9a and alphanumber_0b to alphanumber_9b) as numbers are changed via the Surveyor Trains tab - `Edit Properties' icon (the `?' icon).


enginespec
References the engine KUID number. This specifies the driver physics boundaries for the traincar. Refer Kind: Engine.
enginesound
References the KUID number for the traincar's sound. Refer to KIND: ENGINESOUND.
hornsound

"References the KUID number for the traincar horn sound. Refer to KIND: HORNSOUND.

cabinsway strength
where strength is a floating point number. This controls the magnitude of the random roll in internal view. The roll is also affected by the speed of the train. Negative numbers are not used. 0 = no sway... larger numbers (2, 6 etc) = larger sway.
smoke0
Sets boundaries for smoke, steam, vapor and similar effects. Refer: Smoke Effects Chapter 10 on Page 391.
description "blah blah blah"
Description of the model for Railyard information and display on the DLS (Download Station) with the model.
light_color
RGB headlight colour. eg. 255,255,255 This is the color of the train headlight corona, not the lighting itself.


Operating ditch lights now function for locomotives. The usual attachment point conventions apply for a point placed in the mesh in 3DSMax or GMax.

a.ditch0, a.ditch1 etc The odd numbered light points flash together, alternating with the even numbered light points.

The flashing rate can be changed in the traincar config.txt file, by adding the following tag:

flash-scale

1 = (default) 1 normal speed,
0.5 = half speed,
2 = double speed

Ditch lights are toggled in Driver using the ; key

TRAINCAR EXAMPLES

The following models were developed for TRS2004, and are still useful as examples. These contain mesh files as well as in-game files. Download the following rolling stock descriptions and examples for reference.


COAL HOPPER

A Coal Hopper is a typical example of a rolling stock item that uses an animated load representation. This asset also has animated opening doors and particle effects, each controlled by a script. Download a zipped pack containing a PDF description, in-game files and source 3dsmax 4 and gmax files of the TRS asset `Coal hopper'. http://www.auran.com/TRS2004/downloads/contentcreation/TRS2004_Coal_Hopper.zip


TANK CAR

A Tank Car is a typical example of a rolling stock item that can take a liquid load. Download a zipped pack containing a PDF description, in-game files and source 3dsmax 4 and gmax files of the TRS asset `GATX Oilco Tank Car'. http://www.auran.com/TRS2004/downloads/contentcreation/TRS2004_Tank_Car.zip


CONTAINER FLATCAR

The Container Flat is a typical example of a rolling stock item that can take a variety of loads by attachment. Download a zipped pack containing a PDF description, in-game files and source 3dsmax 4 and gmax files of the TRS asset `Container Flat' Car. http://www.auran.com/TRS2004/downloads/contentcreation/TRS2004_Container_Flat.zip


BOX CAR

The Box Car is a typical example of a rolling stock item that can take the General Goods Product without having attachments. Download a zipped pack containing a PDF description, in-game files and source 3dsmax 4 and gmax files of theTRS asset `PRR 40ft Box Car'. http://www.auran.com/TRS2004/downloads/contentcreation/TRS2004_Box_Car.zip


PASSENGER STATION AND VEHICLE TUTORIAL

The Passenger Asset Tutorial gives information on passenger stations and vehicles compatible with the new passenger supported features. The information has been included in this document, but the download includes useful in-game files. http://files.auran.com/TRS2004/downloads/contentcreation/SP2-Passenger_Asset_Tutorial.zip


Return to CCG Index

Content Creator's Guide

Personal tools