Jump to content

Trainz/Kinds/kind product

From Wikibooks, open books for an open world
logo
Trainz Annotated References
TOC | BeginningsFun | AM&C | Creation | InBook Refs ORP Refs:  • Index • Containers • Kinds • Tags | Appendixes  • Vers

Product data type tag

[edit | edit source]

KIND Product defines a "product type" for use with Trainz interactive industries. Products are not directly place-able within the game, but kind industry, and kind traincars each may be configured to consume, produce, or contain the various product types and interact with 'Trainz Interactive Industries' (See kind Industries), giving Trainz it's important real feel and allowing various fun scenario taskings. Individual product instances may be visible to the user in-game, and new users are cautioned that loaded trains drive differently than one which is not pulling all that additional weight.

KIND Hierarchy

[edit | edit source]

Parent Classes

[edit | edit source]

Child Classes

[edit | edit source]
  • none.


Supported Tags

[edit | edit source]

A KIND Product config.txt file supports the following tags and containers declarations and definitions. Each tag is show here with its default value.

kind "product"
instance-type "resource"
mass 0.9
product-category <NULL KUID>
product-texture ""
icon-texture ""
allows-mixing 1
Type: Enumerated String
Compulsory: Yes from 1.5 up
Desc: Identifies the asset as Kind Product.

allows-mixing

[edit | edit source]
Type: Boolean
Compulsory: Yes from 3.4 up
Desc: If set to '1', this product type may be mixed with other products in a single product queue. This is appropriate for some classes of boxed goods, for example, but not appropriate for most gases, liquids, or solid bulk loads such as gravel or coal.

icon-texture

[edit | edit source]
Type: String (image file name including path)
Compulsory: No
Desc: The icon-texture tag defines an icon which is used when referring to this product in-game, for example in a kind industry configuration panel.

instance-type

[edit | edit source]
Type: String
Compulsory: Yes from 3.4
Desc: This tag describes how products of this type are created (instanced) within a product_queue and may be one of the following values:
resource This indicates that instances of this product type are uniform, and that the software can track this product with a total number rather than a description of each instance.
  • This is by far the most efficient 'instance-type' and should be used unless there is a very strong reason to use another type.
instance This indicates that each instance of this product is of a specific sub-type. The subtype is assigned randomly when the instance is first created, but is preserved as the instance is moved from queue to queue throughout the system.
  • Queues of this instance-type are currently limited to 254 instances for performance reasons.
unique This indicates that each instance of this product is a true gamescript object. The object is preserved as the instance is moved from queue to queue throughout the system.
  • Queues of this instance-type are currently limited to 4 instances for performance reasons.


Type: Float
Compulsory: Yes from 3.4
Desc: Determines the mass (in kilograms) of a single unit (or, single instance) of this product. This is used when calculating the mass of a loaded KIND Traincar instance.

product-category

[edit | edit source]
Type: Kuid
Compulsory: Yes
Desc: Each product type may be assigned to a single KIND Product-category.

product-texture

[edit | edit source]
Type: String (image file name including path)
Compulsory: No
Desc: The product-texture tag allows the specification of a local texture file to use when this product is visible as a bulk load. (TBD: link to product queue description.)


List of Products

[edit | edit source]

This list is likely never going to be comprehensive as content creator's will play! ~:)) However the following search will likely show you most of what you may be looking for:

Search: Category Commodity OR Author #-3 AND NOT Category Rolling Stock}}. Add 'Installed True' to limit the search to local items only.

TS10 and TS12 Built-Ins

[edit | edit source]

Each Product must be declared as one of the four legal kind product-category types:

Bulk Load   	<kuid:-3:10040>
Container   	<kuid:-3:10042>
Liquid Load 	<kuid:-3:10044>
Passenger 	<kuid:-3:10091>

A quick examination shows these group products by the way they move, store, and pack. While water and gasoline and Crude Oil all pour (as do some bulk loads), the Product Kind specification of each sets them apart... particularly in their respective weights. The same is true for bulk loads. Builders sand isn't the same as Locomotive Sand and neither will most gravels have the same characteristics. Similarly Ores and Coal (types) will have differences.   The early Trainz commodity (Products) System provided just these basic products:

coal            <kuid:-1:100421>
Logs        	<kuid:-3:10001>
Woodchips   	<kuid:-3:10002>
Lumber      	<kuid:-3:10003>
Water       	<kuid:-3:10004>
Crude Oil   	<kuid:-3:10010>
Diesel Fuel 	<kuid:-3:10011>
Petrol Fuel 	<kuid:-3:10012>
General Goods	<kuid:-3:10013>

A Sub-page listing 411 combined other Built-In (TS12 with TS10's JAs—a superset of TS09's so TRS2006's—as well) products are listed here: Trainz/Kinds/kind product/List of Built-In Products.

Notes and References

[edit | edit source]