Kind name

From TrainzOnline
Jump to: navigation, search

This should probably be merged into the existing document tree at Name Effect. As it stands, it is not linked to the other documentation and could easily be confused for an asset Kind.


Some assets may have editable signs. When you set an asset’s name in surveyor through the Edit Properties icon (‘?’ icon) the signage can be set-up to automatically update. The variables can be set for each sign.

Typical Kind Name mesh table set-up:


mesh-table
{
  default
  {
    mesh industry.lm
    auto-create 1
    effects
    {
      0
      {
        kind name
        font garamond
        fontsize 0.15
        fontcolor 30,30,30
        att a.name0
        name name
      }
      1
      {
        kind name
        font swiss
        fontsize 0.3
        fontcolor 30,30,30
        att a.name1
        name name
      }
    }
  }
}

You do not have to use the 0,1,2... block naming convention.

For the name effects described in the example, 0 could easily be mainsign or something more relevant to your model.

Setting unique names may be useful for script purposes, so you can easily recognize a script reference, for instance.


Contents

Breakdown of KIND NAME:

kind name

The effect kind

font

Only supported in Trainz Classics and later

The name of the font - refer to the list of names below:

arial
console
comic_sans
courier
cordia
century_gothic
garamond
helvetica
impact
sans_serif
swiss
tahoma
times_new_roman
verdana

All these fonts have a base size of 24 points. This size is varied by using the fontsize tag (a multiplying factor of the default font size) in the config.txt file.

fontsize

The size of the font as a fraction of the original default font size, eg. 0.15 is 15% of the default size of 24 points.

There is an additional larger default font size that has been used in TC which is available for use. This is referenced by the in-game name, mainmenu_titles, not by the more usual “font” name Arial. By using this larger font (80 points) and specifying a font size factor, better quality may be obtained for the name text on the created asset.

mainmenu_titles

fontcolor

The color of the sign text in r.g.b. 0,0,0 is black, 255,255,255 is white.

att

The sign text insertion point (part of the mesh). The attachment point must be orientated correctly in 3dsmax.

Points are placed in top view in 3dsmax. When aligning the point in 3dsmax, click on the Hierarchy - Affect Pivot Only option to examine the axis direction, turn off the Affect Pivot Only selection, and rotate the point itself to the correct orientation. Click on the Affect Pivot Only option again to check the new alignment. Make sure you rotate the point, not the axis.

The text is facing to the points local z-axis.

name

The default text when placed

When name name is specified, it uses the asset’s changeable name option, changed through the Edit Properties icon (the ‘?’ icon) in Surveyor.

If name Graceland (for example) were used, the sign would never be able to be changed, even though the user may have changed the asset’s name in Surveyor.

When you use the name tag, this name will appear in the minimap. In some instances the names will be hard to distinguish in a crowded map. For this reason, it may be advisable to limit the use of the name tag to objects that have a use for the attribute.

For script usage do not enter a value.

Personal tools