CCG/Kind: Industry Passenger Station Asset

From TrainzOnline
< CCG
Jump to: navigation, search

Contents

PASSENGER STATION ASSET

A passenger station industry asset has more attributes than normal industry assets. It allows loading and unloading of passengers, and a "spawn" and "delete" process for passengers. It relies on a script to function.

An example config.txt file is shown for the a basic two platform passenger station asset. Some similar multiple attachment point entries in the original asset have been omitted for brevity.

For more information refer to the Passenger Station and Vehicle Assets Tutorial on the TrainzDEV Wiki: HowTo/Build_Passenger_Enabled_Assets


Passenger Station Config.txt

kuid <KUID2:###:#####:1>
username Small_Station Example
kind industry
light 1
trainz-build 2.5
icon-texture icon_small_station.tga
script SmallStation
class SmallStation
passenger-height 1.204
kuid-table {
passenger     <kuid:-3:10060>
}
mesh-table {
     default {
       mesh   small_station.im
       auto-create 1
       effects {
          0{
              kind   name
              fontsize 0.08
              fontcolor 220,220,220
              att    a.name0
              name   name
              }
          1{
             kind   name
            fontsize      0.08
            fontcolor     220,220,220
            att           a.name1
            name          name
            }
         2{
            kind   name
           fontsize      0.08
           fontcolor     220,220,220
           att           a.name2
            name        name
           }
        }
    }
}
attached-track {
       track_one {
              track <kuid:-1:15>
              vertices {
                     0 a.track0a
                     1 a.track0b
                     2 a.track0c
                     3 a.track0d
              }
       }
       track_two {
              track <kuid:-1:15>
              vertices {
                     0 a.track1a
                     1 a.track1b
                     2 a.track1c
                     3 a.track1d
              }
       }
}
attached-trigger {
       trigger_track_one_a {
              att    a.track0a
              radius        2
              track track_one
       }
       trigger_track_one_b {
              att    a.trigmain
              radius        19
              track track_one
       }
       trigger_track_one_c {
              att    a.track0d
              radius       2
              track track_one
       }
       trigger_track_two_a {
              att    a.track1a
              radius        2
              track track_two
       }
       trigger_track_two_b {
              att    a.trigmain
              radius        19
              track track_two
       }
       trigger_track_two_c {
              att    a.track1d
              radius        2
              track track_two
       }
}
queues 
{
  passengers_on_0
    {
       passenger-queue 1
       size   48
       initial-count 0
       product-kuid <kuid:-3:10060>
       attachment-points
         {
           0 a.passon30
           1 a.passsit02
           2 a.passsit03
           3 a.passsit04
           4 a.passon32
           5 etc
         }
    }
  passengers_on_1
    {
       passenger-queue 1
       size   40
       initial-count 0
       product-kuid <kuid:-3:10060>
       attachment-points 
         {
           0 a.passon61
           1 a.passsit67
           2 a.passon43
           3 etc
         }
    }
  passengers_off_0
    {
       passenger-queue 1
       size   26
       initial-count 0
       product-kuid <kuid:-3:10060>
       attachment-points
         {
           0 a.passoff01
           1 a.passoff15
           2 a.passoff03
           3 etc
         }
   }
 passengers_off_1
   {
       passenger-queue 1
       size   26
       initial-count 0
       product-kuid <kuid:-3:10060>
       attachment-points
         {
           0 a.passoff27
           1 a.passoff44
           2 a.passoff29
           3 etc
         }
   }
}
processes
{
  passenger_spawn_0
   {
      start-enabled 1
      duration 20
      outputs
        {
          0
            {
               amount 1
               queue passengers_on_0
            }
        }
   }
  passenger_spawn_1
   {
      start-enabled 1
      duration 20
      outputs
        {
          0
            {
               amount 1
               queue passengers_on_1
            }
        }
   }
  passenger_delete_0
   {
      start-enabled 1
      duration 3
      inputs 
        {
          0
            {
               amount 1
               queue passengers_off_0
            }
        }
    }
  passenger_delete_1
    {
      start-enabled 1
      duration 3
      inputs
        {
          0
            {
               amount 1
               queue passengers_off_1
            }
        }
    }
}
soundscript
{
  dayloop
    {
      repeat-delay 0
      distance 8,130
      sound
        {
          station_amb_2.wav
        }
    }
}
string-table
{
    smallstation_plat1 Platform 1
    smallstation_plat2 Platform 2
}
username-fr          Gare_petite
string-table-fr
{
    smallstation_plat1 Plateforme 1
    smallstation_plat2 Plateforme 2
}
username-it          Small_Station
string-table-it
{
    smallstation_plat1 Platform 1
    smallstation_plat2 Platform 2
}
username-de          Kleiner_Bahnhof
string-table-de
{
    smallstation_plat1 Bahnsteig 1
    smallstation_plat2 Bahnsteig 2
}
username-es          Estación_Pequeña
string-table-es
{
    smallstation_plat1 Platform 1
    smallstation_plat2 Platform 2
}
Icon0 <kuid:-3:10164>


Breakdown of Passenger Station Config.txt:

Some config.txt tags are explained below. Others are covered in the general config.txt explanation, see Page 23.

icon-texture The icon for the asset, used for the "Drive To" command, the file is a 64x64 tga texture with no alpha channel.

passenger-height This value sets the height of the passenger asset in metres, to suit the platform model height.

queues The queues field defines the passenger product, the size and the initial count when placed. Passenger attachment points placed in 3dsmax/gmax are referenced, but only a limited number have been included in this example.

passenger_on_X Queue name for the passenger on platform, and must be of this form, where "X" is the platform number, starting at 0. Passenger off queues must be named similarly.

size The size of the queues must match the number of attachment points. Note the special name for the attachment points, for seated passengers the name ends in "sitNN" where NN is any two characters, usually digits.

processes The input and output settings of the passenger asset. You can specify the amount of input and output for each queue referenced product as well as the duration (or rate) in seconds for that process to take place. This asset spawns or deletes passengers from the model.

passenger_spawn_X The queue name for the passenger spawn process. The name must be of this form, where "X" is the platform number, starting at 0. Passenger off queues must be named similarly.

string_table Defines the name for each platform track.

icon0 Window preview icon - see informatioon


Back to Kind: Industry

Portal

Multi Industry New

Passenger Vehicle Asset


Return to CCG Index

Content Creator's Guide

Personal tools