CCG/Industry
Contents |
KIND: INDUSTRY
Description
A scenery asset with product processing functionality.Industry assets interact with compatible rolling stock assets through their script file and asset triggers. An Industry asset supports product queues and attached track.
Container Structure
A well formed industry kind has the following container structure:
See Chapter 7 for an example asset of this kind.
A TYPICAL ASSET OF THIS KIND MAY HAVE THE FOLLOWING TAGS:
kind "industry" kuid kuid trainz-build data category-class data category-region data category-era data username data kind data script file preview-mesh-kuid kuid icon0 kuid kuid-table coal kuid mesh-table default mesh file auto-create data attached-track out_track0 track kuid vertices 0 data attached-trigger trig0 att data radius data queues 20ft_cont_q size data initial-count data product-kuid kuid allowed-products 0 kuid processes multi_consumer_producer start-enabled data duration data inputs 0 amount data queue data outputs 0 amount data queue data string-table multi_pickupdropoff data thumbnails 0 image file width data height data 1 image file width data height data
TAGS AND CONTAINERS
The following tags are further defined in Chapter 5:
- kuid
- Generated automatically br Content Manager.
- trainz-build
- Automatically set to 2.9 for 2009 assets.
- category-class
- Should be one of the following:
- "BIN" - Industry asset with product processing functionality,
- "BPF" - Passenger Station with passenger processing functionality,
- "BPN" - Passenger Station (non-functional),
- "BB" - Buildable (Kind Buildable)
- See the "Buildings & Structures" section Category Class.
- category-region
- See Category Region for a list of valid category-region values.
- category-era
- See Category Era for a list of valid category-era values.
- username
- Asset username. This will be the name that appears in the surveyor menu.
- kind
- Must be "industry".
- class
- The name of the scenario class within the script file.
- script
- The script file (gs or gse file).
- icon0
- Kuid of the preview icon. Should be a 32x32 tga.
- preview-mesh-kuid
- The mesh to be used in the surveyor preview area. This is useful when an asset has a large bounding box. i.e. the "Airport" with it's jet animation.
- mesh-table
- Default - Contains the default mesh. Auto-create should be set to true in order to make the mesh visible.
- string-table
- The string table stores a list of text strings to be used by the industry script.
- kuid-table
- The kuid of the track\road used in the asset should be present here, as should those of any other referenced assets.
Additional Containers
As well as containing all of the common tags and containers detailed in Chapter 5 , the industry kind also contains additional containers and tags that are specialised to the requirements of the kind.
Attached Track Container
Auto-generated spline track. 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' see Page 75.
The Attached Track Container has the following tags and containers:
- track
- Kuid of the track to be used.
- useadjoiningtracktype
- Indicates whether the track type should change to match that of the first track joined to the object.
- vertex
- Attachment points at which to place track.
Attached Trigger Container
A Trigger is a point along an attached track with a specified radius. When a compatible rollingstock item enters this radius it triggers a set of commands, controlled through its script. A trigger is setup in an industries config.txt.
The Attached Trigger Container has the following tags:
- att
- The attachment point (located in the mesh file) to place the trigger.
- radius
- Radius (in metres) of the trigger.
- track
- The track name which the train must be on to trigger.
Consists Container
The consists tag stores information on consists that can be generated by the industry.
The Consists Container has the following Tags:
- show-in-consist-menu
Boolean flag that dictates whether this train appears in the consist menu (0 - false, 1 - true). The consist menu was along the bottom of the screen in the original Trainz and UTC but is no longer present. It effectively stopped a user from getting access to an AI train. Redundant for most uses except for legacy/scenario usage.
- coupling-mask
- Coupling mask that applies to the consist. 0 will block off all coupling activity while "1" will mean you can couple with a vehicle.
- decoupling-mask
- Decoupling mask that applies to the consist. 0 will mean you can't decouple vehicles in the train while 1 means you can decouple vehicles.
Consist Element(Consist subcontainer)
- vehicle
- The kuid of the vehicle to be used.
- facing
- Indicates the direction of the vehicle.
- running-number
- Running number of the vehicle.
Processes Container
Processes - 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.
The Processes Container has the following tags and containers:
- start-enabled
- Specifies whether the process starts enabled.
- duration
- Length of time (in seconds) that the process runs for.
Inputs Container (Processes subcontainer)
- amount
- Amount required as input.
- queue
- queue from which to take input.
Outputs Container(Processes subcontainer)
- amount
- Amount to output.
- queue
- queue in which to place output.
Queue Container
- size
- Size of queue.
- animated-mesh
- Animated mesh which changes as the queue becomes full.
- initial-count
- The initial number of items in the queue.
- product-kuid
- The product type used to fill `initial-count'
- allowed products
- The allowed products in this queue.
- conflicts-with-queues
- This queue and the conflicting queue(s) cannot be used simultaneously.
- attachment-points
- List of attachment points for this queue on which products are visualised. (Use this, OR animated-mesh)
- allowed-categories
- The allowed product categories in this queue.
- Notes
Perhaps the simplest examples of industry functionality are the TRS 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 its 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 on the hopper itself initiate. The animated load on 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.
Sounds events and generic events can be linked to animation key-frame to give great control over sound and script timing for industry and scenery assets.
The increasing use of scripts in TRS adds flexibility and control to assets and their functionality.
THIS KIND SUPPORTS THE FOLLOWING:
- CONTAINERS
- queues Container, Smoke Container, SoundScript Container, Mesh Table, Attached Track Container, Attached Trigger Container, String Table, Chinese String Table, Czech String Table, Dutch String Table, French String Table, German String Table, Italian String Table, Polish String Table, Russian String Table, Spanish String Table, KUID Table, Obsolete Table, Thumbnails, Privileges, Extensions, Processes Container, Consists Container.
- TAGS
- kuid, trainz-build, category-class, category-region, category-era, username, kind, alias, author, autoname, category-keyword, class, contact-email, contact-website, description, description-cn, description-cz, description-de, description-es, description-fr, description-it, descriptionpl, description-nl, description-ru, dighole, floating, height-range, icon-texture, icon0, icon1, icon2, icon3, license, light, nightmode, organisation, passenger-height, preview-mesh-kuid, preview-scale, rgb, rollstep, rotate, rotate-yz-range, rotstep, script, snapgrid, snapmod surveyor-name-label, surveyor-only, username-cn, username-cz, username-de, username-es, username-fr, username-it, username-nl, username-pl, username-ru.