CCG/Kind: Industry Portal

From TrainzOnline
< CCG
Jump to: navigation, search

Contents

PORTAL

A portal is an industry object used to create and emit trains. It relies on a script to function. An example config.txt file is shown for a basic portal asset.

HTML lines have been omitted under the string-table. The working asset has extensive entries here to make it fully functional. Refer to the example Portal asset available on the Auran Content Creation Art Source CDs.

Portal Config.txt

kuid <KUID2:###:#####:1>
kind industry
light 1
kuid-table {
 }
obsolete-table {
 }
description " "
trainz-build 2.5
username Portal
script PortalTunnel
class PortalTunnel
icon-texture icon_portal.tga
category-region "AU"
category-era "2000s"
category-class BIN
kuid-table
{
 loco <kuid:-1:100861>
 wagon <kuid:-1:100048>
 guardsvan <kuid:-1:100770>
}
mesh-table
 {
   default
   {
     mesh portal.im
     auto-create 1
     effects
     {
       portalentry
       {
         kind attachment
         att a.track0g
         default-mesh <KUID:-3:10239>
         surveyor-only 1
       }
        portalend
       {
         kind attachment
         att a.track0a
         default-mesh <KUID:-3:10238>
         surveyor-only 1
       }
     }
   }
 }
     string-table
     {
     }
     attached-track
     {
       out_track0
       {
         track <KUID:-1:15>
         vertices
         {
           0 a.track0a
           1 a.track0b
           2 a.track0c
           3 a.track0d
           4 a.track0e
           5 a.track0f
           6 a.track0g
         }
       }
     }
     attached-trigger
     {
       trig_end
   {
   att a.track0d
   radius 10.0
   }
   trig_entry
  {
  att a.track0f
   radius 10.0
   }
}
icon0  <KUID:-3:10164>


Breakdown of Portal Config.txt:

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

region Surveyor region.

type Surveyor type.

light Sets lighting to be used for object to be ambient or directional. 0 sets ambient lighting and object is lit by general light value (uniform coloring), 1 sets directional light which is affected by the position of the sun (shows shadows on the object surfaces).


script Name of Script to be used with this asset.

class Script class; as designated in the script above..

icon-texture The in-game representation of the asset when specifying a drive to command in Driver.

category-class The class code for this asset. Refer to Appendices.

kuid-table KUIDs required for this asset to function correctly, sample only shown (the rolling stock listed in the consists entry).

default Default is the `main' mesh of the asset.

mesh The im mesh name.

auto-create 1 The model is generated automatically when placed, or when you load a map which includes the model. In some instances you don't want the mesh visible (as this may be controlled through script). If auto-create is 0 the mesh will not be visible when placed.


effects

kind attachment Attaching a mesh to the default mesh using the kind attachment effect. Each effect is given a name such as "portalentry".

default-mesh Kuid of the mesh to be attached.

att The mesh is inserted at a mesh attachment point rather than the origin (without this line the mesh is placed relative to the origin of the parent model).

surveyor-only 1 The attached mesh will only be visible in Surveyor.

string-table A listing of HTML options to be called by the script file to display when the properties option of the asset is used in Surveyor. H lines have been omitted in this example. Refer to the example Portal model available on the Auran Content Creation Art Source CDs.

running-number The default number for the vehicle. It is changeable in Surveyor.

attached-track Track to be attached to the model, including a name for the track (out_track0), the track KUID to be used, and attachment points, placed in the 3dsmax/gmax model.

attached-trigger A point on the attached track with a specified radius. When a compatible rolling stock item enters this radius it triggers a set of commands, controlled through script.

icon0 Window preview icon - see information on Page 83 .


Back to Kind: Industry

Multi Industry New

Passenger Station Asset

Passenger Vehicle Asset


Return to CCG Index

Content Creator's Guide

Personal tools