CCG/Kind: Scenery

From TrainzOnline
Jump to: navigation, search



The example right shows how flexible the mesh table can be. Note this asset has 2 animations. One as part of the default mesh, and another external mesh inserted into an attachment point within the default mesh (the radar).

Note: We no longer need the UTC tag "autoanimation 1" as all animations are now referenced through the mesh-table.

The night mesh (default-night) has also changed from UTC. It too is now referenced through the mesh-table.

Typical Scenery Config.txt

kuid <KUID2:###:#####:1>
kind scenery
light 1
nightmode home
username "Airport Building 1"
     anim anim.kin
     auto-create 1
     animation-loop-speed 1
         kind name
         fontsize 0.15
         fontcolor 30,30,30
         att a.name0
         name name
         kind corona
         att a.coronawhite
         frequency 1
         directional 0
         texture-kuid <KUID:-3:10111>
     night-mesh-base default
     mesh radar/
     anim radar/radar.kin
     att a.radar
     att-parent default
     animation-loop-speed 1.0
 description " "
 trainz-build 2.5
 category-class "FS"
 category-region "UK"
 category-era "1980s"

Breakdown of Scenery Config.txt:

Please refer to earlier config.txt examples for other entries not described here.

region Surveyor region.

type Surveyor type.

light Sets lighting to be used for the object to be ambient or directional. 0 sets ambient lighting and object is lit by general light value (uniform colouring), 1 sets directional light which is affected by the position of the sun (shows shadows on the object surfaces).

nightmode Only add this tag if you reference a default-night mesh in the mesh-table. Values: home, lamp or constant. 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.

corona and name effects (optional) Refer Effects - Page 26 .


snapgrid n Where n is a value in meters. This lets you specify the size of the grid the object snaps to. We recommend factors/fractions of 720 as this is the size of a base board and the positioning may do funny things across section borders. e.g. 1, 2, 5, 10, 20, 30, 40, 45, 60, 80, 90, 120, 180, 240, 360, 720.

The default snapgrid is 10. See snapmode (below) on how to enable grid snapping.

rotstep n Where n is a value in degrees. This lets you specify the step size of rotation angles for this object. Other example values are 1, 10, 20, 90, 180 etc. The default rotstep is 1.0

snapmode n Where n is either 0 (default) , 1 or 2. Use snapmode to enable snapping of a scenery object to the snap grid. 0 will disable grid snapping (default), 1 will enable grid snapping, 2 will enable an offset grid snapping.

Offset grid snapping will cause objects to be snapped to the grid but will also offset the object's position by ½ the grid size ­ essentially positioning the object in between the normal grid lines.

See snapgrid (above) on how to set the snap grid size from the default of 10 meters.

Note: In Trainz, you can now hold down the control key while moving objects to snap them to the default grid of 10 metres.

rotate n Where n is 0 or 1 (default). This lets you disable rotation on a scenery object. 0 to disable, 1 to enable (default).

rotate-yz-range min, max eg: rotate-yz-range ­90, 90 where min and max are values in degrees. This tag lets you set the roll / yz rotation range (normal object rotation is an xy rotation). If you want your scenery object to support rolling then use this tag to set the minimum and maximum roll range. By default, objects have a min/max roll range of 0 to 0.

rollstep n where n is a value in degrees. Used in conjunction with rotate-yz-range, rollstep lets you specify the step size of roll angles for this object. Other example values are 1, 5, 20 etc. The default rollstep is 1.0.

height-range min, max eg: height-range ­10, 100 where min and max are values in meters. Custom scenery objects are height adjustable, and this tag allows you to specify the minimum and maximum height ranges for changing the height with the new "Adjust Height" tool in Surveyor's `Object Tools' panel.

Adding a height range is particularly useful for ships/ buoys (placed on water) and for Station accessories.

Note: Animation Events Sounds events and generic events can be linked to an animation key-frame to give great control over sound and script timing for industry and scenery assets. Refer to Page 373.

Return to CCG Index

Content Creator's Guide

Personal tools