CCG/Kind: Industry Multi Industry New

From TrainzOnline
< CCG
Jump to: navigation, search

Contents

MULTI INDUSTRY NEW

This is an industry object used to set up your own industry, with loading and unloading of products on attached track.


The example model consists of track with attachment points and triggers, allowing you to place your own buildings to suit. It relies on a script to function. An example config.txt file is shown for the asset.

Multi Industry New Config.txt

kuid <KUID2:###:#####:1>
kind industry
light 1
kuid-table
{
}
description "blah blah"
trainz-build 2.7
username       "Multiple_Industry_New"
obsolete-table 
{
 0 <kuid:-19:10152>
}
nightmode      "lamp"
script         "MultipleIndustryNew"
class          "MultipleIndustryNew"
icon-texture "icon_multiple.tga"
preview-mesh-kuid     <kuid:-3:10154>
kuid-table
{
         coal          <kuid:44179:60013>
         diesel        <kuid:-3:10011>
         cont20ft      <kuid:-3:10014>
         cont40ft      <kuid:-3:10041>
         gengoods      <kuid:-3:10013>
         logs          <kuid:-3:10001>
         lumber        <kuid:-3:10003>
         woodchips     <kuid:-3:10002>
         oil           <kuid:-3:10010>
         petrol        <kuid:-3:10012>
         water         <kuid:-3:10004>
         avgas         <kuid:-3:10045>
}
mesh-table
  {
    default
      {
         mesh   "Multiple_Industry.im"
         auto-create 1
         effects
            {
             arrow0
                {
                  att "a.track0a"
                  default-mesh <kuid:-3:10092>
                  surveyor-only 1
                  kind   "attachment"
                }
             arrow1
                {
                  att    "a.track0f"
                  default-mesh <kuid:-3:10092>
                  surveyor-only 1
                  kind   "attachment"
               }
           }
     }
 }
 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"
       }
    }
 }
 attached-trigger 
 {
   trig0
    {
          att    "a.track0b"
          radius 10
    }
   trig1
    {
          att    "a.track0c"
          radius 10
    }
   trig2
    {
          att    "a.track0d"
          radius 10
    }
   trig3
    {
          att    "a.track0e"
          radius 10
    }
 }
 queues
 {
   queue1
    {
         size   100
         allowed-products     
         {
         }
    }
   queue2
    {
         size   100
         allowed-products
         {
         }
    }
   queue3
    {
         size   100
         allowed-products
         {
         }
    }
   queue4
    {
         size   100
         allowed-products
         {
         }
    }
   queue5
    {
         size   100
         allowed-products
         {
         }
    }
   queue6
    {
        size   100
        allowed-products
        {
        }
    }
 }
 processes
 {
   multi_consumer_producer
    {
      start-enabled 1
      duration     30
      inputs
        {
        }
      outputs
        {
        }
    }
 }
 icon0         <kuid:-3:10164>


Breakdown of Multi Industry New Config.txt:

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


script Name of Script to be used with this asset.

class Script class.

icon-texture The in-game representation of the asset when specifying a "Drive To" command in Driver.

preview-mesh-kuid As spline tracks will not render in the Preview window a preview-mesh is needed, as a kind mesh (this example model consists of spline track only).

kuid-table A list of KUIDs required for this asset to function correctly, in this case the products to be supported.

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

mesh The 'main' 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 The effects to be attached to the model.

arrow0 The name of the effect, in this case a red arrow to be attached to the model to shows the ends of the track.

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).

default-mesh The mesh for the arrow model to be attached.

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


kind Kind attachment.

attached-track Details of the track to be attached to the model, defined by the attachment points in the 3dsmax/gmax model using the a.name convention. Note the axis orientation of the end attachment points. Refer to the Fixed Track example Page 92 .

out_track0 Name of the track.

track The track type (kuid) to be used for the attachment, in this case the red invisible track kuid.

vertices List of attachment vertices from the 3dsmax/gmax model, for track attachment.

attached-trigger A point inserted in 3dsmax/gmax, on the attached track, with a specified radius in the config.txt file. When a compatible rolling stock item enters this radius it triggers a set of commands, controlled through script.

trig0 Name of the trigger.

radius The radius of operation in metres.

queues The queues field defines the queue name, the product, the size and the initial count when placed.

size The initial size of the queue (in product units)

allowed-products The allowed products, not specified, therefore allows multiproducts listed in the kuid-table.


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.

start-enabled 1 Option is set such that this process will be running by default when the session is launched duration Duration time of the process in seconds.

inputs Input quantity (in product units) for the process.

outputs Output quantity (in product units) for the process.

icon0 Window preview icon - see information box Page 83.


Back to Kind: Industry

Portal

Passenger Station Asset

Passenger Vehicle Asset


Return to CCG Index

Content Creator's Guide

Personal tools