Introduction to 'kind scenery'
editKIND Scenery provides the basis for all surveyor-placeable assets covering especially those that have no relationship to rails or railroad assets, and is the class of objects which can individually be laid down, rotated, height adjusted, and if capable, tilted. Examples of everyday scenery objects are virtually anything which is not part of a railroad, but includes many assets which indeed are. Individual buildings, trees and other sorts of foliage assets (cactii, shrubs, lichen, grasses), animals (dogs to exotic zoo critters) and since in some task cases Trainz supports doing the same thing in multiple ways (i.e. using a different Kinds to get to the same goal.), surprisingly even sound effects.
Kind scenery objects by and large DO NOT have interactivity, though increasingly some provide animations to lend verisimilitude; this is particularly true especially for those which are child classed.
A basic scenery asset that supports night mode lighting (windows, exterior lighting come on at night), smoke (particle) effects (e.g. chimneys, water spraying as log hits water), sound effects (sound FX, s.a. a dog barking, industry machinery, wind blowing) and animation. It is height adjustable and forms the majority of map objects used. Only a minority are configured too allow a tilting of the object, but quite a few could be altered with added parameters to allow such—such would be useful in a lot more standard trees for example to place near tracks in the so called 'tree tunnels' of a route.
KIND Hierarchy
edit- Parent Classes
- Child Classes
Supported Tags
edit- Each scenery asset supports the following tags.
- Note: Each tag is shown here with its default value, meaning the value Trainz CM/CMP will insert should the tag be left undefined.
Remember: Other usual and common tags & containers legal in all Kinds are listed in the TrainzBaseSpec
autoname 0 backdrop 0 collate-meshes 0 random-color-low-hsb 0,0,100 random-color-high-hsb 0,0,100 nightmode "none" rgb 0,0.5,0 snapmode 0 snapgrid 0 dighole 0,0 interior "" soundscript container { } smoke container, smoke{NN:0...NN} { } floating 0 height-range 0,0 rotate 1 rotate-yz-range 0,0 surveyor-only 0 icon-texture "" queues container { } rotstep 1 rollstep 1 decal container { }
autoname
edit- Type: Boolean
- Desc: Will cause the object to be automatically named when placed in Surveyor. Objects are auto-named with their localised languages' asset name followed by a number (eg. "Tree 10").
backdrop
edit- Type: Boolean
- Desc: If true then this signifies that the asset is a "backdrop". Backdrops are used to create the illusion of distant terrain in a route. To achieve this a backdrop has a much greater draw distance than other scenery assets so that it is visible from much farther away. Also, backdrops are not z-sorted, meaning that they will always appear 'behind' other scenery regardless of their actual position in the world. For this reason, backdrop objects should never be placed near the track.
camera-collidable
edit- Type: Integer
- Desc: This tag is not used in Trainz.
collate-meshes
edit- Type: Boolean
- Desc: The 'collate-meshes' tag allowed for rapid rendering (a primitive form of stitching) in older versions of Trainz. There were significant limitations on how they could be used. The tag allowed the ability to add random color variation to scenery objects via the 'random-color-low-hsb' and 'random-color-high-hsb' tags. Collated mesh coloring is not currently supported in TS2009 but is expected to be revived in future Trainz versions.
decal
edit- Type: Decal Container
- Desc: Specifies a decal to attach to the scenery object. Decals are effectively textures attached to the asset that are drawn on the ground rather than the asset itself. Decals are ideal for the creation of object shadows, or adding ground detail such as cracks, oil stains, etc. Decals should be used sparingly, as there is a runtime cost to creating and updating decals.
dighole
edit- Type: Integer Pair
- Desc: This tag allows objects to be sunk into the terrain by specifying a hole size to dig at the objects location. The ground underneath the object will not be drawn where there is a hole. This value is specified as an integer pair in 10 meter grid squares (ie. 5,2 = 50 x 20m) regardless of the actual terrain grid size, where the first value is the size in the N-S direction and the second value is the size in the E-W direction. Note that the size of a hole cannot exceed 64 (where "dighole = a,b", a * b <= 64). Also note that the hole position will be snapped to the terrain grid so the asset should generally have the 'snapgrid' tag specified. Typical usage for the 'dighole' tag is to allow for turntable pits.
floating
editType: Decimal
- Desc: If specified the 'floating' tag specifies a vertical offset, in meters, for the assets position. This allows you to create an asset which 'floats' a certain distance of the ground.
height-range
editType: Decimal Pair
- Desc: Allows you to specify a range, in meters, for Surveyors height adjustment tool, this is handy when creating assets that may be placed on uneven ground.
icon-texture
edit- Type: Image File
- Desc: Specifies an icon texture for the asset. Icons are used as thumbnails in various asset lists in Surveyor and can alternatively be specified using a thumbnail container.
interior
edit
nightmode
edit- Type: Selection
- Desc: Specifies how/when to use a night mesh specified in the mesh table. Requires one or more night meshes to be added to the mesh-table, which are identified by the 'night-mesh-base' tag. 'nightmode' must be one of the following values:
- home - switches on night effect at dusk and off sometime during the night
- lamp - switches the night effect on from dusk to dawn
- constant - lights are on day and night
- none - no lights (default)
queues
edit- Type: Queues Container
- Desc: A queue container is used by certain asset types (such as stations, industries and rolling stock) to 'hold' product. Passengers are 'product' for queue purposes. Queue containers can make use of animated meshes or custom attachments to visually represent the amount of product they hold in game.
random-color-high-hsb
edit- Type: Color (HSB)
- Desc: This value requires 'collate-meshes' to be turned on and specifies the high point of the random color variation of an asset. Random color variations are specified as hue-saturation-brightness colors to allow meaningful interpolation between values.
random-color-low-hsb
edit- Type: Color (HSB)
- Desc: This value requires 'collate-meshes' to be turned on and specifies the low point of the random color variation of an asset. Random color variations are specified as hue-saturation-brightness colors to allow meaningful interpolation between values.
rgb
edit- Type: Color (RGB, 0 to 255); 'Sometimes'... Newer Trainz generate a fault unless the (older format, typically three) CSL Values are made into four numbers (so include an opacity value).
- Desc: Specifies the color that this object will appear on the Minimap. Defaults to (0, 0.5, 0).
rotate
edit- Type: Boolean
- Desc: Used to allow rotation to be disabled for an asset. If added and set to false the object rotation tool in Surveyor will not work for this asset. Rotation is enabled if this tag is not supplied.
rotate-yz-range
editType: Decimal Pair
- Desc: Allows 'rolling' of the asset along its Y axis where the first and second values reflect the number of degrees from normal orientation. For example, if the first value is -20 and the second is 20 then the asset can be rolled anywhere within 40 degrees of arc. By default, objects have a roll range of 0 to 0 (i.e. no roll). Rolling is performed in Surveyor by holding 'shift' while using the object rotate tool.
rollstep
editType: Decimal
- Desc: Specifies the step size of roll in degrees and is used in conjunction with rotate-yz-range. For example, if rotate-yz-range is (-10, 10), and rollstep is 5, then the allowable roll is -10, 5, 0, 5, and 10. The default rollstep is 1.0
rotstep
editType: Decimal
- Desc: Specifies the amount of each rotation step (in degrees) when rotating an asset in Surveyor
smoke
edit- Type: Smoke Container
- Desc: A smoke container is effectively a PFX (particle effects) emitter that allows your scenery object to produce smoke and similar effects. Smoke tags take the form smokeX where X is a number. There is no maximum number of smoke tags but they must be numbered sequentially (i.e. smoke0,smoke1,smoke2,etc).
snapgrid
edit- Type: Integer
- Desc: This tag specifies the size, in meters, of the snap grid for the 'snapmode' tag, default 10 meters.
snapmode
edit- Type: Boolean
- Desc: If true then this objects position will be constrained to a grid location on the ground. When placed or moved in Surveyor the object will 'snap' to the nearest grid location, the size of the grid is set using the snapgrid tag.
soundscript
edit- Type: SoundScript Container
- Desc: Details sounds that a scenery object produces. Sound should be used sparingly - objects that appear in large numbers throughout a scene should not contain a soundscript, to prevent an unnecessary performance hit.
surveyor-only
edit- Type: Boolean
- Desc: Enables the creation of Surveyor only objects. Surveyor only objects will not exist in Driver.
Example Config.txt
editSample config.txt file for a scenery asset, with the Standard Tags excluded for brevity:
kind scenery nightmode home mesh-table { default { mesh scenery_asset.im anim anim.kin auto-create 1 animation-loop-speed 1 effects { 0 { kind name fontsize 0.15 fontcolor 30,30,30 att a.name0 name name } 1 { kind corona att a.coronawhite frequency 1 directional 0 texture-kuid <KUID:-3:10111> } } } default-night { mesh night.im night-mesh-base default } radar { mesh radar/radar.im anim radar/radar.kin att a.radar att-parent default animation-loop-speed 1.0 } }
Examples with comments
edit This Trainz/Kinds/kind scenery section is a stub placeholder, an outline or marker that this section of the book is otherwise incomplete. You can help the Wikibooks Trainz project by expanding it with fuller discussion of the topic. Work needed: Attach sample files here? or more likely... add lists of links to subpage examples with various structures and discussion points |
Notes, Footnotes & References
editConfig.txt files are endemic and ever present in Trainz assets, for no asset can be defined without this type of Computer Science container. The keyword-value_of_key pairing must always be kept in mind in editing or creating Trainz content. The TrainzBaseSpec contains values and containers which are most common in asset defining config.txt files.
Notes
Footnotes
References
- Trainz printed or pdf file Manuals, applicable version - usually in the ..\extras or ..\extras\manuals folder
- TrainzOnline Wiki Config.txt file page and various other pages
- TrainzOnline Wiki: Content Creator's Guide pages (various)
- Various CCG and Auran websites