<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://newgrf-specs.tt-wiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=GunChleoc</id>
	<title>GRFSpecs - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://newgrf-specs.tt-wiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=GunChleoc"/>
	<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/wiki/Special:Contributions/GunChleoc"/>
	<updated>2026-05-14T06:58:14Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Town_names&amp;diff=3368</id>
		<title>NML:Town names</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Town_names&amp;diff=3368"/>
		<updated>2013-04-24T07:58:17Z</updated>

		<summary type="html">&lt;p&gt;GunChleoc: Added an example.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavBlocksyntax}}&lt;br /&gt;
&lt;br /&gt;
To define randomly generated town names, the &amp;lt;tt&amp;gt;town_names&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
The general syntax of a town names block is:&lt;br /&gt;
&lt;br /&gt;
 town_names[(&amp;amp;lt;name&amp;amp;gt;)] {&lt;br /&gt;
 	[styles : &amp;amp;lt;string&amp;amp;gt;]&lt;br /&gt;
 	&amp;amp;lt;part&amp;amp;gt; &amp;amp;lt;part&amp;amp;gt; ....&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The optional &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;&amp;amp;lt;name&amp;amp;gt;&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
The optional &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;&amp;amp;lt;string&amp;amp;gt;&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
In this example, town names are randomly constructed from two parts. Note that the top-level block is on the bottom; this is necessary so it can reference the other two blocks. Have a look at the [[NML:Town_names_parts]] section for more info on the syntax used in this example.&lt;br /&gt;
&lt;br /&gt;
 town_names(one) {&lt;br /&gt;
 	{&lt;br /&gt;
 	 	text(&amp;quot;Avon&amp;quot;, 31),&lt;br /&gt;
 	 	text(&amp;quot;Black&amp;quot;, 10),&lt;br /&gt;
 	 	...&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 town_names(two) {&lt;br /&gt;
 	{&lt;br /&gt;
 	 	text(&amp;quot; Bridge&amp;quot;, 1),&lt;br /&gt;
 	 	text(&amp;quot;ton&amp;quot;, 1),&lt;br /&gt;
 	 	...&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 town_names {&lt;br /&gt;
 	styles : string(STR_STYLES);&lt;br /&gt;
 	{&lt;br /&gt;
 	 	town_names(one,3)&lt;br /&gt;
 	}&lt;br /&gt;
 	{&lt;br /&gt;
 	 	town_names(two,1)&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This will generate:&lt;br /&gt;
&lt;br /&gt;
 Avon Bridge&lt;br /&gt;
 Avonton&lt;br /&gt;
 Black Bridge&lt;br /&gt;
 Blackton&lt;/div&gt;</summary>
		<author><name>GunChleoc</name></author>
	</entry>
</feed>