Texture-Replacement Effect

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
m (1 revision)
(Added tag descriptions and example)
Line 1: Line 1:
The Texture-Replacement effect kind is a [["mesh-table" Container]] effect container. The following tags are supported:  
+
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:  
  
 +
==Supported Tags==
 +
Each texture-replacement subcontainer supports the following tags.
 
  kind "texture-replacement"
 
  kind "texture-replacement"
 
  name ""
 
  name ""
  texture ""
+
  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 name tag in the effect container is "load-map.texture".
 +
 
 +
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 it's default load (eg woodchips at a lumbermill), then the woodchip product texture will replace the default coal product texture.
 +
 
 +
==Example texture-replace subcontainer==
 +
    effects {
 +
      product-texture {
 +
        kind      "texture-replacement"
 +
        texture   "load_map.texture"
 +
      }
 +
    }
  
 
[[Category:Config Container]]
 
[[Category:Config Container]]

Revision as of 15:25, 31 December 2013

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 name tag in the effect container is "load-map.texture".

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 it's default load (eg woodchips at a lumbermill), then the woodchip product texture will replace the default coal product texture.

Example texture-replace subcontainer

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