CCG/Kind: Industry

From TrainzOnline
< CCG
Jump to: navigation, search

Contents

KIND: INDUSTRY

An industry is best described as a scenery asset with product processing functionality. Industry assets interact with compatible rolling stock assets through their script file. See note at bottom of page.

Tags that apply in a scenery asset may also apply in an industry asset. See Kind Scenery Page 80 .

Full config or script files are not included in this section because all TRS released industry config.txt files and script files (.gs) are available for download from: http://www.auran.com/TRS2004/trssp4dl/dfile.php?FileID=10

Overview

All Trainz industries have attached-tracks, attached-triggers, queues and processes to input or output products (or commodities).


Attached-track (required) Attached tracks are setup in an industries config.txt. Auto-generated spline track is generated through attachment points located within the default mesh.

Attached-tracks update automatically to the spline track connected to it. You may over-ride this auto-update feature by adding useadjoiningtracktype 0

Note. Correct track end attachment orientation is essential. The Y axis must point 'out' at the correct angle. the Z axis must point 'up'. Refer to Page 92 .

attached-track
{
  track0
  {
    track      <kuid2:xxxxx:xxxxx:x>
    useadjoiningtracktype       0
    vertices
    {
      0     "a.track0a"
      1     "a.track0b"
    }
  }
}

Attached-trigger (required) A Trigger is a point along an attached track with a specified radius. When a compatible rolling stock item enters this radius it triggers a set of commands, controlled through its script.

A trigger is setup in an industries config.txt


Queues (required) The queues field states which product or products the industry can use. It contains the size of each product, the initial count when placed, and can refer to it's visual load state whether through a load animation or attachment. Any load animations are set-up within the mesh-table.


Processes (required) The input and output settings of the industry. 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. All queues and processes are linked through the industry asset's script file.

Industry functionality

Perhaps the simplest examples of industry functionality are the Trainz released Coalmine and the Powerstation assets.

When the coal hopper enters the trigger radius of the coalmine loading bay, it's script interacts with the hoppers own script. Particle effects (pfx) from the coalmine visually display the coal entering the hopper and the hopper animated load rises to show it's full state. The coalmine's own animated load pile reduces as does it's commodity level.

Similarly, when the full hopper enters the Powerstation trigger radius, the hopper's animated load lowers, the side doors open and the pfx effects on the hopper itself initiate. The animated load pile in the Powerstation increases and it's commodity level increases.

The hopper pfx, and the animated doors are both controlled by the hopper.gs script file.

Refer: IN-GAME VISUALISATION OF PRODUCTS.

Note: Animation Events Sounds events and generic events can be linked to an animation key-frame to give great control over sound and script timing for industry and scenery assets. Refer to CCG/Modelling:_Animation_Events.


Note: The increasing use of scripts in TRS adds huge flexibility and control to assets and their functionality.

Adding scripts on a per asset basis is a logical progression in the development of Trainz. However, we do understand that most 3D modelers do not know a great deal about scripts we are really dawning on a new era in Trainz custom content creation

Because of this, we recognise there will need to be far more collaboration and group efforts for custom industry asset creation. There are several very good script writers in the Trainz content Creation community. Just ask around the forums.


Note: Preview Window Icons: Auran released Industry assets (and industry compatible assets) have an additional tag in their config:

icon0 <KUID:-3:10164>

The kuid is of a kind texture and the icon texture is a 32x32 pixel - 32 bit tga file and you may have up to 4 (icon0, icon1, icon2, icon3)

Industry Examples

Portal

Multi Industry New

Passenger Station Asset

Passenger Vehicle Asset


Return to CCG Index

Content Creator's Guide

Personal tools