Texture-Replacement Effect

From TrainzOnline
Revision as of 11:29, 18 June 2016 by Builderbob (Talk | contribs)

Jump to: navigation, search

The Texture-Replacement effect kind is a named effect container within a "mesh-table" Container. It can be used within the load subcontainer to provide alternative textures for bulk loads in wagons. The following tags are supported:

Contents

Supported Tags

Each texture-replacement subcontainer supports the following tags.

kind "texture-replacement"
name ""
texture "<texture name>"

The name of the texture-replacement effects subcontainer is selected by the content developer. It may be used as a reference in a script file to identify a specific effect.

kind

String. Required. No default. "texture-replacement"

name

String. Not required. This tag provides an accessible name for the container that can be used by scripts. It may be left blank so that a script can use the tag for temporary storage.

texture

String. Required. No default. The name of the texture that is to be replaced. This is the name of the texture file as used in the asset's config.txt, without the .txt extension. For instance, if the texture to be replaced is identified in the 'load-map.texture.txt' file, then the texture tag in the effect container is "load-map.texture".

A texture-replacement effect is often used when the texture of an asset should be changed during game play. For instance, when the load texture is to be replaced then this texture will be replaced by the texture contained in the product referenced in the current active product queue, as defined by the allowed-categories subcontainer in the queue. For instance, if a coal hopper loads at an industry asset that produces a bulk-load other than its default load (eg woodchips at a lumbermill), then the woodchip product texture will replace the default coal product texture.

A texture-replacement effect is also used when an asset is reskinned using an alias. In this case the texture replacement occurs when the asset is created - the texture of the aliased asset is replaced with a texture from the reskin asset.

Example texture-replace subcontainer

   effects {
     product-texture {
       kind      "texture-replacement"
       texture	  "load_map.texture"
     }
   }
Personal tools