Difference between revisions of "NML:Town names"

From GRFSpecs
Jump to navigationJump to search
(content of nml r1625)
 
(add nav template)
Line 1: Line 1:
  +
{{NMLNavBlocksyntax}}
  +
 
To define randomly generated town names, the <tt>town_names</tt> block should be used. Such blocks can be used in two ways, as generator of (partial) town names for another block, or as top-level town names block, a starting point of town names in the grf file. You must have at least one starting point, but you can have more than one.
 
To define randomly generated town names, the <tt>town_names</tt> block should be used. Such blocks can be used in two ways, as generator of (partial) town names for another block, or as top-level town names block, a starting point of town names in the grf file. You must have at least one starting point, but you can have more than one.
   

Revision as of 16:37, 21 August 2011

Block Syntax

To define randomly generated town names, the town_names block should be used. Such blocks can be used in two ways, as generator of (partial) town names for another block, or as top-level town names block, a starting point of town names in the grf file. You must have at least one starting point, but you can have more than one.

The general syntax of a town names block is:

town_names[(<name>)] {
	[styles : <string>]
	<part> <part> ....
}

The optional <name> defines the name of the block. Such a name is used to refer to this block from another town names block. For top-level town names blocks, it is often left out. Note that in that case, you must also leave out the parentheses.

The optional <string> defines how the town names are called in the menu. It may only be defined in a top-names block. To make the name available in all languages, it is probably a good idea to at least define a menu name for the generic language.