<?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=Rubidium</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=Rubidium"/>
	<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/wiki/Special:Contributions/Rubidium"/>
	<updated>2026-05-12T10:33:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Language_IDs&amp;diff=5101</id>
		<title>Language IDs</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Language_IDs&amp;diff=5101"/>
		<updated>2025-08-26T18:54:51Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: Add Maori&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently, the scheme is to use international phone codes as language IDs, unless they&#039;re out of range. When creating a new translation for OpenTTD pick a number vaguely related in some way. Or something else. &lt;br /&gt;
&lt;br /&gt;
Valid language IDs are listed in the table below. The cases, genders and the type of [[StringCodes#Using_plural_forms|plural form]] is only given as reference.&lt;br /&gt;
Authorative are the definitions in OpenTTD&#039;s language file for each language. A complete list of these exact definitions is available [https://translator.openttd.org/language-list here (generated page)].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! ID&lt;br /&gt;
! language&lt;br /&gt;
! cases&lt;br /&gt;
! genders&lt;br /&gt;
! [[StringCodes#Using_plural_forms|plural form]]&lt;br /&gt;
|-&lt;br /&gt;
| 00&lt;br /&gt;
| English (US)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 01&lt;br /&gt;
| English (GB)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 02&lt;br /&gt;
| German&lt;br /&gt;
|&lt;br /&gt;
| m w n p&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 03&lt;br /&gt;
| French&lt;br /&gt;
|&lt;br /&gt;
| m m2 f&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| 04&lt;br /&gt;
| Spanish&lt;br /&gt;
|&lt;br /&gt;
| m f&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 05&lt;br /&gt;
| Esperanto&lt;br /&gt;
|&lt;br /&gt;
| n&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 06&lt;br /&gt;
| Ido&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 07&lt;br /&gt;
| Russian&lt;br /&gt;
| m f n p nom gen dat acc abl pre&lt;br /&gt;
| m f n p&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| 08&lt;br /&gt;
| Irish&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| 09&lt;br /&gt;
| Maltese&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 12&lt;br /&gt;
|-&lt;br /&gt;
| 0A&lt;br /&gt;
| Tamil&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0B&lt;br /&gt;
| Chuvash&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0C&lt;br /&gt;
| Chinese (Traditional)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 0D&lt;br /&gt;
| Serbian&lt;br /&gt;
| nom big gen dat aku vok lok ins&lt;br /&gt;
| muški ženski srednji&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| 0E&lt;br /&gt;
| Norwegian (Nynorsk)&lt;br /&gt;
| small&lt;br /&gt;
| masculine feminine neuter&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0F&lt;br /&gt;
| Welsh&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Belarusian&lt;br /&gt;
| m f n p nom gen dat acc abl pre&lt;br /&gt;
| m f n p&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Marathi&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| Faroese&lt;br /&gt;
|&lt;br /&gt;
| m f n&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| Scottish Gaelic&lt;br /&gt;
| dat gen nom voc&lt;br /&gt;
| m f&lt;br /&gt;
| 13&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| Arabic (Egypt)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| Czech&lt;br /&gt;
| nom gen dat acc voc loc ins big small&lt;br /&gt;
| m f n map mnp fp np&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| Slovak&lt;br /&gt;
| g&lt;br /&gt;
| m z s&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| Hindi&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 18&lt;br /&gt;
| Bulgarian&lt;br /&gt;
| m f n p&lt;br /&gt;
| m f n p&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 1B&lt;br /&gt;
| Afrikaans&lt;br /&gt;
|&lt;br /&gt;
| male&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 1E&lt;br /&gt;
| Greek&lt;br /&gt;
| subs date geniki&lt;br /&gt;
| m f n&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| 1F&lt;br /&gt;
| Dutch&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 21&lt;br /&gt;
| Basque&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 22&lt;br /&gt;
| Catalan&lt;br /&gt;
|&lt;br /&gt;
| Masculin Femenin&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 23&lt;br /&gt;
| Luxembourgish&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 24&lt;br /&gt;
| Hungarian&lt;br /&gt;
| t ba&lt;br /&gt;
|&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| 26&lt;br /&gt;
| Macedonian&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 27&lt;br /&gt;
| Italian&lt;br /&gt;
| ms mp fs fp&lt;br /&gt;
| m ma f&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 28&lt;br /&gt;
| Romanian&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 29&lt;br /&gt;
| Icelandic&lt;br /&gt;
|&lt;br /&gt;
| karlkyn kvenkyn hvorugkyn&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2A&lt;br /&gt;
| Latvian&lt;br /&gt;
| kas&lt;br /&gt;
| m f&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| 2B&lt;br /&gt;
| Lithuanian&lt;br /&gt;
| kas ko kam ka kuo kur kreip&lt;br /&gt;
| vyr mot&lt;br /&gt;
| 5&lt;br /&gt;
|-&lt;br /&gt;
| 2C&lt;br /&gt;
| Slovenian&lt;br /&gt;
| r d t&lt;br /&gt;
|&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| 2D&lt;br /&gt;
| Danish&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2E&lt;br /&gt;
| Swedish&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2F&lt;br /&gt;
| Norwegian (Bokmal)&lt;br /&gt;
| small&lt;br /&gt;
| masculine feminine neuter&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 30&lt;br /&gt;
| Polish&lt;br /&gt;
| d c b n m w&lt;br /&gt;
| m f n&lt;br /&gt;
| 7&lt;br /&gt;
|-&lt;br /&gt;
| 31&lt;br /&gt;
| Galician&lt;br /&gt;
|&lt;br /&gt;
| m f n&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| Frisian&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 33&lt;br /&gt;
| Ukrainian&lt;br /&gt;
| r d z&lt;br /&gt;
| m f s mn&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| 34&lt;br /&gt;
| Estonian&lt;br /&gt;
| g in sü&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 35&lt;br /&gt;
| Finnish&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 36&lt;br /&gt;
| Portuguese&lt;br /&gt;
|&lt;br /&gt;
| n m f mp fp&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 37&lt;br /&gt;
| Brazilian Portuguese&lt;br /&gt;
|&lt;br /&gt;
| m f&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| 38&lt;br /&gt;
| Croatian&lt;br /&gt;
| nom gen dat aku vok lok ins&lt;br /&gt;
| male female middle&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| 39&lt;br /&gt;
| Japanese&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 3A&lt;br /&gt;
| Korean&lt;br /&gt;
|&lt;br /&gt;
| m f&lt;br /&gt;
| 11&lt;br /&gt;
|-&lt;br /&gt;
| 3C&lt;br /&gt;
| Malay&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3D&lt;br /&gt;
| English (AU)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3E&lt;br /&gt;
| Turkish&lt;br /&gt;
| tamlanan&lt;br /&gt;
|&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 40&lt;br /&gt;
| Maori (New Zealand)&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 42&lt;br /&gt;
| Thai&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 54&lt;br /&gt;
| Vietnamese&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 55&lt;br /&gt;
| Mexican Spanish&lt;br /&gt;
|&lt;br /&gt;
| m f&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 56&lt;br /&gt;
| Chinese (Simplified)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 5A&lt;br /&gt;
| Indonesian&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 5C&lt;br /&gt;
| Urdu&lt;br /&gt;
|&lt;br /&gt;
| m f&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 61&lt;br /&gt;
| Hebrew&lt;br /&gt;
| singular plural gen&lt;br /&gt;
| m f&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 62&lt;br /&gt;
| Persian&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 66&lt;br /&gt;
| Latin&lt;br /&gt;
| gen acc abl dat&lt;br /&gt;
| m f n mp fp np&lt;br /&gt;
|&lt;br /&gt;
|-}&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Features&amp;diff=4946</id>
		<title>Features</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Features&amp;diff=4946"/>
		<updated>2025-02-22T08:37:44Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: Add road stops and badges&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==List of features and feature-specific Actions==&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Feature || [[Action0]] || [[Action1]] || [[Action2]] || [[VariationalAction2 | VarAction2]] || [[RandomAction2]] || [[Callbacks]] || [[Action3]] || [[Action4]]&lt;br /&gt;
|-&lt;br /&gt;
|00 || Trains || [[Action0/Vehicles/Trains | yes]] || [[Action1 | yes]] || [[Action2/Vehicles | yes]] || [[VariationalAction2/Vehicles | yes]] || [[RandomAction2#Vehicles | yes]] || [[Callbacks | yes]] || [[Action3 | yes]] || [[Action4 | yes]]&lt;br /&gt;
|-&lt;br /&gt;
|01 || Road Vehicles || [[Action0/Vehicles/RoadVehicles | yes]] || [[Action1 | yes]] || [[Action2/Vehicles | yes]] || [[VariationalAction2/Vehicles | yes]] || [[RandomAction2#Vehicles | yes]] || [[Callbacks | yes]] || [[Action3 | yes]] || [[Action4 | yes]]&lt;br /&gt;
|-&lt;br /&gt;
|02 || Ships || [[Action0/Vehicles/Ships | yes]] || [[Action1 | yes]] || [[Action2/Vehicles | yes]] || [[VariationalAction2/Vehicles | yes]] || [[RandomAction2#Vehicles | yes]] || [[Callbacks | yes]] || [[Action3 | yes]] || [[Action4 | yes]]&lt;br /&gt;
|-&lt;br /&gt;
|03 || Aircraft || [[Action0/Vehicles/Planes | yes]] || [[Action1 | yes]] || [[Action2/Vehicles | yes]] || [[VariationalAction2/Vehicles | yes]] || [[RandomAction2#Vehicles | yes]] || [[Callbacks | yes]] || [[Action3 | yes]] || [[Action4 | yes]]&lt;br /&gt;
|-&lt;br /&gt;
|04 || Stations || [[Action0/Stations | yes]] || [[Action1 | yes]] || [[Action2/Stations | yes]] || [[VariationalAction2/Stations | yes]] || [[RandomAction2#Stations | yes]] || [[Callbacks | yes]] || [[Action3 | yes]] || [[Action4 | yes]]&lt;br /&gt;
|-&lt;br /&gt;
|05 || Canals || [[Action0/Canals | yes]] || [[Action1 | yes]] || [[Action2/Single Set | yes]] || [[VariationalAction2/Canals | yes]] || [[RandomAction2#Canals | yes]] || [[Callbacks | yes]] || [[Action3 | yes]] || &#039;&#039;no&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|06 || Bridges || [[Action0/Bridges | yes]] || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || [[VariationalAction2/Bridges | no-ish]] || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || [[Action0/Bridges#Purchase_text_.2810.29 | yes-ish]]&lt;br /&gt;
|-&lt;br /&gt;
|07 || Houses || [[Action0/Houses | yes]] || [[Action1 | yes]] || [[Action2/Sprite Layout | yes]] || [[VariationalAction2/Houses | yes]] || [[RandomAction2#Town_building_triggers | yes]] || [[Callbacks | yes]] || [[Action3 | yes]] || [[Action4 | yes]]&lt;br /&gt;
|-&lt;br /&gt;
|08 || Global Settings || [[Action0/Global Settings | yes]] || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|09 || Industry Tiles || [[Action0/Industry Tiles | yes]] || [[Action1 | yes]] || [[Action2/Sprite Layout | yes]] || [[VariationalAction2/Industry Tiles | yes]] || [[RandomAction2#Industry_tile_triggers | yes]] || [[Callbacks | yes]] || [[Action3 | yes]] || &#039;&#039;no&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0A || Industries || [[Action0/Industries | yes]] || [[Action1 | yes]] || [[Action2/Industries | yes]] || [[VariationalAction2/Industries | yes]] || [[RandomAction2#Industry_tile_triggers | yes]] || [[Callbacks | yes]] || [[Action3 | yes]] || [[Action4 | yes]]&lt;br /&gt;
|-&lt;br /&gt;
|0B || Cargos || [[Action0/Cargos | yes]] || [[Action1 | yes]] || [[Action2/Single Set | yes]] || [[VariationalAction2 | yes-ish]] &amp;lt;ref name=&amp;quot;novars&amp;quot;&amp;gt;No feature specific variables though&amp;lt;/ref&amp;gt; || &#039;&#039;no&#039;&#039; || [[Callbacks | yes]] || [[Action3 | yes]] || [[Action4 | yes]]&lt;br /&gt;
|-&lt;br /&gt;
|0C || Sound Effects || [[Action0/Sound Effects | yes]] || &#039;&#039;no&#039;&#039; || [[Action2/Only Callback Failure | yes-ish]] &amp;lt;ref name=&amp;quot;failonly&amp;quot;&amp;gt;Callback failure only&amp;lt;/ref&amp;gt; || [[VariationalAction2 | yes-ish]] &amp;lt;ref name=&amp;quot;novars&amp;quot;/&amp;gt; || &#039;&#039;no&#039;&#039; || [[Callbacks | yes]] || [[Action3 | yes]] || &#039;&#039;no&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0D || Airports || [[Action0/Airports | yes]] || [[Action1 | yes]] || [[Action2/Single Set | yes]] || [[VariationalAction2/Airports | yes]] || [[RandomAction2#Stations | yes]] || [[Callbacks | yes]] || [[Action3 | yes]] || [[Action4 | yes]]&lt;br /&gt;
|-&lt;br /&gt;
|0E || Signals || &#039;&#039;no&#039;&#039; || [[Action5#0E_New_Signals | Action5]] || [[Action2/Only Callback Failure | yes-ish]] &amp;lt;ref name=&amp;quot;failonly&amp;quot;/&amp;gt; || [[VariationalAction2/Signals | yes]] || &#039;&#039;no&#039;&#039; || [[Callbacks | yes]] || [[Action3 | yes]] || &#039;&#039;no&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0F || Objects || [[Action0/Objects | yes]] || [[Action1 | yes]] || [[Action2/Sprite Layout | yes]] || [[VariationalAction2/Objects | yes]] || [[RandomAction2#Objects | yes]] || [[Callbacks | yes]] || [[Action3 | yes]] || [[Action4 | yes]]&lt;br /&gt;
|-&lt;br /&gt;
|10 || Railtypes || [[Action0/Railtypes | yes]] || [[Action1 | yes]] || [[Action2/Single Set | yes]] || [[VariationalAction2/Railtypes | yes]] || [[RandomAction2#Rail_types | yes]] || &#039;&#039;no&#039;&#039; || [[Action3 | yes]] || [[Action4 | yes]]&lt;br /&gt;
|-&lt;br /&gt;
|11 || Airport Tiles || [[Action0/Airport Tiles | yes]] || [[Action1 | yes]] || [[Action2/Sprite Layout | yes]] || [[VariationalAction2/Airport Tiles | yes]] || [[RandomAction2#Stations | yes]] || [[Callbacks | yes]] || [[Action3 | yes]] || &#039;&#039;no&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|12 || Roadtypes || [[Action0/Roadtypes | yes]] || [[Action1 | yes]] || [[Action2/Single Set | yes]] || [[VariationalAction2/Roadtypes | yes]] || [[RandomAction2#Road_types | yes]] || &#039;&#039;no&#039;&#039; || [[Action3 | yes]] || [[Action4 | yes]]&lt;br /&gt;
|-&lt;br /&gt;
|13 || Tramtypes || [[Action0/Tramtypes | yes]] || [[Action1 | yes]] || [[Action2/Single Set | yes]] || [[VariationalAction2/Tramtypes | yes]] || [[RandomAction2#Tram_types | yes]] || &#039;&#039;no&#039;&#039; || [[Action3 | yes]] || [[Action4 | yes]]&lt;br /&gt;
|-&lt;br /&gt;
|14 || Road Stops || [[Action0/Road Stops | yes]] || [[Action1 | yes]] || [[Action2/Sprite Layout | yes]] || [[VariationalAction2/Road Stops | yes]] || [[RandomAction2#Road Stops | yes]] || &#039;&#039;no&#039;&#039; || [[Action3 | yes]] || [[Action4 | yes]]&lt;br /&gt;
|-&lt;br /&gt;
|15 || Badges || [[Action0/Badges | yes]] || [[Action1 | yes]] || [[Action2/Single Set | yes]] || [[VariationalAction2/Badges | no-ish]] || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || [[Action3 | yes]] || [[Action4 | yes]]&lt;br /&gt;
|-&lt;br /&gt;
|N/A &amp;lt;!-- Towns have no feature. NML and OTTD assign a pseudo feature number, but this does not mean there is an actual feature number --&amp;gt;&lt;br /&gt;
| Towns || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || [[VariationalAction2/Towns | yes]] || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || [[ActionF]]&lt;br /&gt;
|-&lt;br /&gt;
|48 || Original Strings &amp;lt;ref&amp;gt;This is a pseudo-feature only used in Action4 to assign original strings. The value 0x48 originates from the way old TTDPatch versions checked for switches enabling/disabling features. NewTrains (feature 0x00) are activated by [[TTDPatchFlags | switch 0x37]]. Adding 0x48 to that results in 0x7F - a switch which is always set when TTDPatch is active. Thus feature 0x48 was not disabled by any switch. (today TTDPatch does not depend on the switches being in order of the features)&amp;lt;/ref&amp;gt; || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || &#039;&#039;no&#039;&#039; || [[Action4 | yes]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0&amp;diff=4945</id>
		<title>Action0</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0&amp;diff=4945"/>
		<updated>2025-02-22T08:27:02Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: Add badges&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
Action 0 allows to change the feature properties of &#039;features&#039;, i.e. vehicles, stations, bridges, houses and more.&lt;br /&gt;
Each feature has its own very specific properties. These are explained in detail in their separate pages.&lt;br /&gt;
&lt;br /&gt;
You will also find the minimum version requirements for properites on the pages.&lt;br /&gt;
Note, that due to the nature of Action 0 unknown properties cannot be ignored. Only a whole Action 0 can be skipped.&lt;br /&gt;
OpenTTD and TTDPatch will disable GRFs once they encounter an unknown property. So, if you use some properties for optional features, which you want to disable for older versions of OpenTTD or TTDPatch, you have to skip the Action 0 using [[Action9|Action 9]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
The data for Action 0 looks as follows:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Sprite-number&amp;gt; * &amp;lt;Length&amp;gt; 00 &amp;lt;Feature&amp;gt; &amp;lt;Num-props&amp;gt; &amp;lt;Num-info&amp;gt; &amp;lt;Id&amp;gt; (&amp;lt;Property &amp;lt;New-info&amp;gt;)...&lt;br /&gt;
&lt;br /&gt;
Here is a short overview of what every term means:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Element!![[GRFActionsDetailed|Size]]!!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;Sprite-number&amp;gt; ||dec||A sequential sprite number&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;Length&amp;gt; ||dec||The total number of bytes in the action&lt;br /&gt;
|-&lt;br /&gt;
|00 ||B||Action type. In this case, 00&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;Feature&amp;gt; ||B||Which type of feature you would like to change&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;Num-props&amp;gt; ||B||How many properties you would like to change per vehicle or station&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;Num-info&amp;gt; ||B||How many vehicles/stations you would like to change&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;Id&amp;gt; ||B*||The ID of the first vehicle/station to change&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;Property&amp;gt; ||B||What property to change for each vehicle/station&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;New-info&amp;gt; ||V||The new value of the property&lt;br /&gt;
|}&lt;br /&gt;
You can put an Action 0 anywhere after [[Action8|Action 8]] in the GRF file.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|0.6|2.5|ttdprev=2.0.1 alpha 61}} The &amp;lt;Id&amp;gt; is an extended byte since TTDPatch 2.0.1 alpha 61, to support the definition of &amp;gt;255 sound effects.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|0.7|ottdrev=r13482}} {{grf|7|&amp;lt;7}} In OpenTTD since r13482, extended IDs (up to 65535) can be used for vehicles as well. However there is currently a caveat that articulated parts must be below 128.&lt;br /&gt;
{{ottdp|1.2}} {{grf|8}} In OpenTTD 1.2, extended IDs (up to 65535) can be used for vehicles as well. The ID for articulated vehicles must be below 16384.&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Sprite-number ===&lt;br /&gt;
&lt;br /&gt;
Action 0 can appear anywhere in the GRF file, so set it to the sprite number you are currently at.&lt;br /&gt;
&lt;br /&gt;
=== Length ===&lt;br /&gt;
&lt;br /&gt;
The total number of bytes in Action 0. Start counting from &amp;lt;Action&amp;gt;, the bit that sets the pseudo-sprite to act as the specified action.&lt;br /&gt;
&lt;br /&gt;
=== Action ===&lt;br /&gt;
&lt;br /&gt;
The type of action this pseudo-sprites defines. It should be 00 here because we want this pseudo-sprite to act as Action 0.&lt;br /&gt;
&lt;br /&gt;
=== Feature ===&lt;br /&gt;
&lt;br /&gt;
This sets the type of [[Features|feature]] that you wish to change. Set it to:&lt;br /&gt;
{|&lt;br /&gt;
!Value&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|[[Features|Feature]]&lt;br /&gt;
|-&lt;br /&gt;
|00 || [[Action0/Vehicles/Trains|Trains]]&lt;br /&gt;
|rowspan=&amp;quot;4&amp;quot;|[[Action0/Vehicles|Common vehicle properties]]&lt;br /&gt;
|-&lt;br /&gt;
|01 || [[Action0/Vehicles/RoadVehicles|Road Vehicles]]&lt;br /&gt;
|-&lt;br /&gt;
|02 || [[Action0/Vehicles/Ships|Ships]]&lt;br /&gt;
|-&lt;br /&gt;
|03 || [[Action0/Vehicles/Planes|Aircraft]]&lt;br /&gt;
|-&lt;br /&gt;
|04&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| [[Action0/Stations|Stations]]&lt;br /&gt;
|-&lt;br /&gt;
|05 &lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| [[Action0/Canals|Canals]]&lt;br /&gt;
|-&lt;br /&gt;
|06 &lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| [[Action0/Bridges|Bridges]]&lt;br /&gt;
|-&lt;br /&gt;
|07 &lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| [[Action0/Houses|Houses]] (see [[DefaultHouseProps|defaults]])&lt;br /&gt;
|-&lt;br /&gt;
|08 &lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| [[Action0/Global Settings|Global Settings]]&lt;br /&gt;
|-&lt;br /&gt;
|09 &lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| [[Action0/Industry Tiles|Industry Tiles]] (see [[IndustryTileDefaultProps|defaults]])&lt;br /&gt;
|-&lt;br /&gt;
|0A &lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| [[Action0/Industries|Industries]] (see [[IndustryDefaultProps|defaults]])&lt;br /&gt;
|-&lt;br /&gt;
|0B &lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| [[Action0/Cargos|Cargos]] (see [[CargoDefaultProps|defaults]])&lt;br /&gt;
|-&lt;br /&gt;
|0C &lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| [[Action0/Sound Effects|Sound Effects]]&lt;br /&gt;
|-&lt;br /&gt;
|0D &lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| [[Action0/Airports|Airports]]&lt;br /&gt;
|-&lt;br /&gt;
|0F &lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| [[Action0/Objects|Objects]]&lt;br /&gt;
|-&lt;br /&gt;
|10 &lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| {{ottdp|1.0|no|ottdrev=r18969}} [[Action0/Railtypes|Railtypes]]&lt;br /&gt;
|-&lt;br /&gt;
|11 &lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| {{ottdp|1.1|no|ottdrev=r19204}} [[Action0/Airport Tiles|Airport Tiles]]&lt;br /&gt;
|-&lt;br /&gt;
|12 &lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| {{ottdp|1.10|no|ottdrev=gc02ef3e456}} [[Action0/Roadtypes|Roadtypes]]&lt;br /&gt;
|-&lt;br /&gt;
|13 &lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| {{ottdp|1.10|no|ottdrev=gc02ef3e456}} [[Action0/Tramtypes|Tramtypes]]&lt;br /&gt;
|-&lt;br /&gt;
|14 &lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| {{ottdp|14|no|ottdrev=g4c1406a4b5}} [[Action0/Road Stops|Road Stops]]&lt;br /&gt;
|-&lt;br /&gt;
|15 &lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| {{ottdp|15|no|ottdrev=g8f14894024}} [[Action0/Badges|Badges]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Num-props ===&lt;br /&gt;
&lt;br /&gt;
This is the number of properties that you wish to change per vehicle or station. Note: even if you wish to set the same properties to the same value for different vehicles then you must still repeat the properties and their values for each vehicle.&lt;br /&gt;
&lt;br /&gt;
=== Num-info ===&lt;br /&gt;
&lt;br /&gt;
Simply the number of vehicles that you will change using this action 0.&lt;br /&gt;
&lt;br /&gt;
=== Id ===&lt;br /&gt;
The [[VehicleIDs|Vehicle ID]] of the first vehicle or station to change. If num-info is greater than one, this vehicle/station and the following vehicles/stations will be changed.&lt;br /&gt;
&lt;br /&gt;
=== Property ===&lt;br /&gt;
&lt;br /&gt;
The number of the property that will be changed. This and the New-info section are repeated as many times as there are properties to set; in total, there are &amp;lt;&lt;br /&gt;
num-props&amp;gt; property bytes.&lt;br /&gt;
&lt;br /&gt;
See relevant sub-section (links at the bottom) for more details.&lt;br /&gt;
&lt;br /&gt;
=== New-info ===&lt;br /&gt;
&lt;br /&gt;
The new information that will replace the previous information for the specified property. This is a variable size; dependent upon the property. Each property byte is followed by &amp;lt;num-info&amp;gt; new-info sections.&lt;br /&gt;
The appropriate \b, \w, and \d escape sequences can be quite useful for most &amp;lt;&lt;br /&gt;
new-info&amp;gt;s. See [[GRFActionsDetailed#Byte order|the discussion of escape sequences]] for further information.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/Ships&amp;diff=4707</id>
		<title>Action0/Vehicles/Ships</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/Ships&amp;diff=4707"/>
		<updated>2024-01-28T14:08:04Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: Add Ship properties 23 and 24&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right; padding-left:12px; background:none;&amp;quot;&amp;gt;{{NFONavVehicles}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Defining properties of ships.&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||B||{{ottdp|0.6|2.0}}||Sprite (FF for new graphics)&lt;br /&gt;
|-&lt;br /&gt;
|09||B||{{ottdp|0.6|2.0}}||Refittable (0 no, 1 yes)&lt;br /&gt;
|-&lt;br /&gt;
|0A||B||{{ottdp|0.6|2.0}}||Cost factor&lt;br /&gt;
|-&lt;br /&gt;
|0B||B||{{ottdp|0.6|2.0}}||Speed in mph*3.2, use property 23 for speeds &amp;gt; 255&lt;br /&gt;
|-&lt;br /&gt;
|0C||B||{{ottdp|0.6|2.0}}||Cargo type, see [[CargoTypes]]&amp;lt;br/&amp;gt;&lt;br /&gt;
{{grfTill|7}} For GRF version 7 and below: Type B &#039;cargo slot&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
{{grfFrom|8}} For GRF version 8 and above: Type A &#039;(translated) cargo bit&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0D||W||{{ottdp|0.6|2.0}}||Capacity&lt;br /&gt;
|-&lt;br /&gt;
|0F||B||{{ottdp|0.6|2.0}}||Running cost factor&lt;br /&gt;
|-&lt;br /&gt;
|10||B||{{ottdp|0.6|2.0}}||Sound effect type (4=cargo ship, 5=passenger ship)&amp;lt;br/&amp;gt;{{ottdp|1.6|no|ottdrev=r27507}} Since OpenTTD r27507 also custom sound effects from Action11 are allowed here.&lt;br /&gt;
|-&lt;br /&gt;
|11||D||{{ottdp|0.6|2.0}} {{grfFrom|1}}||Bit mask of cargo types available for refitting, see column 2 (bit values) in [[CargoTypes]]&lt;br /&gt;
|-&lt;br /&gt;
|12||B||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Callback flags bit mask, see below&lt;br /&gt;
|-&lt;br /&gt;
|13||B||{{ottdp|0.6|2.5|ttdprev=alpha 30}}||Refit cost, using 1/32 of the default refit cost base&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|1.2|2.5|ttdprev=alpha 44|ottdrev=r22639}}||Ocean speed fraction, sets fraction of top speed available in the ocean; e.g. 00=100%, 80=50%, FF=0.4%&lt;br /&gt;
|-&lt;br /&gt;
|15||B||{{ottdp|1.2|2.5|ttdprev=alpha 44|ottdrev=r22639}}||Canal speed fraction, same as above but for canals and rivers&lt;br /&gt;
|-&lt;br /&gt;
|16||B||{{ottdp|0.6|2.5|ttdprev=alpha 44}}||Retire vehicle early, this many years before the end of phase 2 (see [[Action0General]])&lt;br /&gt;
|-&lt;br /&gt;
|17||B||{{ottdp|0.6|2.5|ttdprev=alpha 55}}||Miscellaneous vehicle flags&lt;br /&gt;
|-&lt;br /&gt;
|18||W||{{ottdp|0.6|2.5|ttdprev=alpha 55}}||Refittable cargo classes, see [[Action0Trains#Cargo_classes_.2828.2C_29.29|train prop. 28]]&lt;br /&gt;
|-&lt;br /&gt;
|19||W||{{ottdp|0.6|2.5|ttdprev=alpha 55}}||Non-refittable cargo classes, see [[Action0Trains#Cargo_classes_.2828.2C_29.29|train prop. 29]]&lt;br /&gt;
|-&lt;br /&gt;
|1A||D||{{ottdp|0.6|2.6|ttdprev=r1210|ottdrev=r7191}}||Long format introduction date&lt;br /&gt;
|-&lt;br /&gt;
|1B||B*||{{ottdp|0.7|no|ottdrev=r13831}}||Sort the purchase list&lt;br /&gt;
|-&lt;br /&gt;
|1C||B||{{ottdp|1.1|no|ottdrev=r21240}}||Visual effect&lt;br /&gt;
|-&lt;br /&gt;
|1D||W||{{ottdp|1.2|no|ottdrev=r22713}}||Custom cargo ageing period&lt;br /&gt;
|-&lt;br /&gt;
|1E||B n*B||{{ottdp|1.2|no|ottdrev=r23291}}||List of always refittable cargo types, see [[Action0/Vehicles/Trains#List_of_always_refittable_cargo_types_.282C.2C_2D.29|train property 2C]]&lt;br /&gt;
|-&lt;br /&gt;
|1F||B n*B||{{ottdp|1.2|no|ottdrev=r23291}}||List of never refittable cargo types, see [[Action0/Vehicles/Trains#List_of_always_refittable_cargo_types_.282C.2C_2D.29|train property 2D]]&lt;br /&gt;
|-&lt;br /&gt;
|20||W||{{ottdp|13|no}}||Vehicle variant group, see [[Action0/Vehicles/Trains#Vehicle_variant_group_.282F.29|train property 2F]]&lt;br /&gt;
|-&lt;br /&gt;
|21||D||{{ottdp|13|no}}||Extra flags, see [[Action0/Vehicles/Trains#Extra_flags_.2830.29|train property 30]]&lt;br /&gt;
|-&lt;br /&gt;
|22||B||{{ottdp|14|no|ottdrev=g2d73076056}}||Additional callback flags bit mask, see below&lt;br /&gt;
|-&lt;br /&gt;
|23||W||{{ottdp|14|no|ottdrev=g5a55c4a934}}||Speed in mph*3.2&lt;br /&gt;
|-&lt;br /&gt;
|24||B||{{ottdp|14|no|ottdrev=g5a55c4a934}}||Acceleration in mph*3.2/h (0.5 km-ish/h). Minimum 1, defaults to 1 when omitted&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Callbacks (12, 22) ===&lt;br /&gt;
For ships, the following [[callbacks]] have to be enabled by setting the corresponding bit in properties 12 and 22 (certain other, not as frequently used callbacks are available without setting a bit here):&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Variable 0C value!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|2||4||12||Load amount&lt;br /&gt;
|-&lt;br /&gt;
|3||8||15||Set refitted capacity&lt;br /&gt;
|-&lt;br /&gt;
|5||20||19||show a suffix after the cargo type name&lt;br /&gt;
|-&lt;br /&gt;
|6||40||2D||Select color mapping for vehicle&lt;br /&gt;
|-&lt;br /&gt;
|7||80||33||Sound effect callbacks&lt;br /&gt;
|-&lt;br /&gt;
|8||100||161||{{ottd|14|ottdrev=gf5394ed2ef}}Engine name&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Bit is the bit you have to set, you do this by adding all the values for all the bits. Variable 0C value is what variable 0C will be set to, for checking it in the VarAction2 for callbacks.&lt;br /&gt;
&lt;br /&gt;
=== Refit cost (13) ===&lt;br /&gt;
&lt;br /&gt;
Refit cost, using 1/32 of the default refit cost base. This property can be overridden by callback 15E.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.2|no|ottdrev=r23087}} If the refit cost factor is set to zero and bit 4 of the miscellaneous flags (17) is set, auto-refitting is allowed.&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous flags (17) ===&lt;br /&gt;
&lt;br /&gt;
This is a bit mask, with the following bits:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||reserved, do not use&lt;br /&gt;
|-&lt;br /&gt;
|1||2||Uses two company colors&lt;br /&gt;
|-&lt;br /&gt;
|2||4||reserved, do not use&lt;br /&gt;
|-&lt;br /&gt;
|3||8||reserved, do not use&lt;br /&gt;
|-&lt;br /&gt;
|4||10||{{ottdp|1.2|no|ottdrev=r23087}} Auto-refitting is enabled for refits where callback 15E allows it or prop 13 specifies zero cost.&lt;br /&gt;
|-&lt;br /&gt;
|5||   20||{{ottdp|1.2|no|ottdrev=r23861}} Use cargo multiplier for default cargo. See page about [[VehicleRefitting#Misc._vehicle_flag_5_.27use_of_capacity_multiplier_for_default_cargo.27_set|vehicle refitting]].&lt;br /&gt;
|-&lt;br /&gt;
|6||   40||{{ottdp|1.3|no|ottdrev=r24124}} Disable breakdown smoke effect.&lt;br /&gt;
|-&lt;br /&gt;
|7||   80||{{ottdp|1.7|no|ottdrev=r27668}} [[Action2/Vehicles#Composing_vehicles_from_multiple_sprites|Compose vehicle from multiple sprites.]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Long format introduction date (1A) ===&lt;br /&gt;
&lt;br /&gt;
Set the vehicle introduction date, in days since the year 0. This takes account of leap years; dividable by 4, but not 100 unless 400. A start date of 1920-01-01 is obtained with a value of 701265 (51 B3 0A 00). This property must be set after property 00 to take effect.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no|}} In TTDPatch, dates after 2044 will be limited to 2044.&lt;br /&gt;
&lt;br /&gt;
=== Sort vehicle list (1B) ===&lt;br /&gt;
See sort vehicle list for [[Action0Trains#Sort_vehicle_list_.281A.29|trains]] for details.&lt;br /&gt;
&lt;br /&gt;
=== Visual effect (1C) ===&lt;br /&gt;
See the equivalent [[Action0Trains#Visual_effects_and_wagon_power_.2822.29|train property]] for information about the meaning of all bits. There is no default effect for ships, therefore values of 00..0F will show no visual effect. Bit 7 (disable wagon power) currently has no meaning and should be left at 0.&lt;br /&gt;
&lt;br /&gt;
=== Custom cargo ageing period (1D) ===&lt;br /&gt;
See custom cargo ageing period for [[Action0Trains#Custom_cargo_ageing_period_.282B.29|trains]] for details.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
To be written&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=ActionA&amp;diff=4694</id>
		<title>ActionA</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=ActionA&amp;diff=4694"/>
		<updated>2023-12-29T09:34:04Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: Mention Action A should not be used for non-original TTD sprites&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modify TTD&#039;s sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unlike actions 1 and 5, which add new sprites for new features or vehicles, action A modifies TTD&#039;s built-in sprites.&lt;br /&gt;
&lt;br /&gt;
This means only sprites with a number up to (and including) 4895 may be replaced by action A. Sprites with higher numbers should not be replaced by action A, but rather action 5. It is technically possible to replace sprites with higher numbers, but the higher numbers are not stable. For example, whenever a new GUI sprite gets added to OpenTTD the canal sprite numbers will change, and a NewGRF using action A to replace the canal sprites will replace the wrong sprites.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
The data looks as follows:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Sprite-number&amp;gt; * &amp;lt;Length&amp;gt; 0A &amp;lt;num-sets&amp;gt; ( &amp;lt;num-sprites&amp;gt; &amp;lt;first-sprite&amp;gt; )...&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Element!![[GRFActionsDetailed|Size]]!!Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;Sprite-number&amp;gt;||dec||A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;length&amp;gt;||dec||The total number of bytes used in this action&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|0A||B||Defines action 0A&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;num-sets&amp;gt;||B||How many sets of sprites to replace&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;num-sprites&amp;gt;||B||How many consecutive sprites in this set&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;first-sprite&amp;gt;||W||Number of first sprite in this set&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The set of &amp;lt;num-sprites&amp;gt; and &amp;lt;first-sprite&amp;gt; is repeated as often as &amp;lt;num-sets&amp;gt; specifies.&lt;br /&gt;
&lt;br /&gt;
The following sprites will be RealSprites or RecolorSprites that replace the given TTD sprites. There must be as many of them as num-sprites of all sets added up.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Sprite-number ===&lt;br /&gt;
&lt;br /&gt;
This is just the number you are at.&lt;br /&gt;
&lt;br /&gt;
=== Length ===&lt;br /&gt;
&lt;br /&gt;
Count the number of bytes in this action.&lt;br /&gt;
&lt;br /&gt;
=== num-sets ===&lt;br /&gt;
&lt;br /&gt;
This sets how many different sets of sprites to replace. Each set are a number of consecutive sprites.&lt;br /&gt;
&lt;br /&gt;
=== num-sprites ===&lt;br /&gt;
&lt;br /&gt;
How many consecutive sprites to replace in this particular set.&lt;br /&gt;
&lt;br /&gt;
=== first-sprite ===&lt;br /&gt;
&lt;br /&gt;
The first sprite number to replace in this set.&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
&lt;br /&gt;
You can find the sprite numbers by looking in trg1.pcx, they&#039;re the little numbers above each sprite, except for the climate-specific sprites which are more complicated.&lt;br /&gt;
&lt;br /&gt;
Unlike actions 1 and 5, the real sprites of action A do not count towards the sprite limit.&lt;br /&gt;
&lt;br /&gt;
To replace sprites in other climates, you first need to find out what the sprite number is trg1.grf.&lt;br /&gt;
&lt;br /&gt;
You set it to replace that number and add an Action7 which turns it off if it is not in the right climate.&lt;br /&gt;
&lt;br /&gt;
In OpenTTD you can use the sprite aligner to get the sprite number, but be aware that only sprites with a number up to (and including) 4895 may be replaced by action A. For more information see the introduction.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Below is an example of what a real Action A pseudo-sprite could look like with the sprite entries under it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;3 * 5     0A 01 0C 3A 08&lt;br /&gt;
&lt;br /&gt;
4 c:\ttd\sprites\farmset.pcx 66 8 09 31 64 -31 0&lt;br /&gt;
&lt;br /&gt;
5 c:\ttd\sprites\farmset.pcx 146 8 09 31 64 -31 0&lt;br /&gt;
&lt;br /&gt;
6 c:\ttd\sprites\farmset.pcx 226 8 09 45 48 -15 -11&lt;br /&gt;
&lt;br /&gt;
7 c:\ttd\sprites\farmset.pcx 290 8 09 33 22 1 -10&lt;br /&gt;
&lt;br /&gt;
8 c:\ttd\sprites\farmset.pcx 322 8 09 31 64 -31 0&lt;br /&gt;
&lt;br /&gt;
9 c:\ttd\sprites\farmset.pcx 402 8 09 29 57 -26 -4&lt;br /&gt;
&lt;br /&gt;
10 c:\ttd\sprites\farmset.pcx 466 8 09 31 64 -31 0&lt;br /&gt;
&lt;br /&gt;
11 c:\ttd\sprites\farmset.pcx 546 8 09 31 39 -19 -6&lt;br /&gt;
&lt;br /&gt;
12 c:\ttd\sprites\farmset.pcx 594 8 09 31 64 -31 0&lt;br /&gt;
&lt;br /&gt;
13 c:\ttd\sprites\farmset.pcx 674 8 09 49 28 -6 -28&lt;br /&gt;
&lt;br /&gt;
14 c:\ttd\sprites\farmset.pcx 722 8 09 31 64 -31 0&lt;br /&gt;
&lt;br /&gt;
15 c:\ttd\sprites\farmset.pcx 2 72 09 30 55 -29 0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Byte!!Meaning&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|3||&amp;lt;sprite-number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|5||&amp;lt;length&amp;gt; of the action in bytes; start counting at 0A (&amp;lt;action&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|0A||&amp;lt;action&amp;gt;: sets this pseudo-sprite to function as action A&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01||&amp;lt;num-sets&amp;gt;: sets it to 1 set to replace&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|0C||&amp;lt;num-sprites&amp;gt;: sets it to 12 sprites in this set.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|3A 08||&amp;lt;first-sprite&amp;gt;: First Sprite of the set (3A 08 - Farms)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action5&amp;diff=3563</id>
		<title>Action5</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action5&amp;diff=3563"/>
		<updated>2014-09-21T07:58:08Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: Extra type&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Define base graphics specific sets&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Action 5 is used to define graphics for several new features of OpenTTD and TTDPatch. This is similar to action 1.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
The data looks as follows:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Sprite-number&amp;gt; * &amp;lt;Length&amp;gt; 05 &amp;lt;type&amp;gt; &amp;lt;num-sprites&amp;gt; [&amp;lt;offset&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Element!![[GRFActionsDetailed|Size]]!!Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;Sprite-number&amp;gt;||dec||A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;length&amp;gt;||dec||The total number of bytes used in this action&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05||B||Defines action 05&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;type&amp;gt;||B||What type of graphics follow&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;num-sprites&amp;gt;||B*||How many regular sprites follow&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;offset&amp;gt;||B*||Offset in the Action 5 assignable block of sprites&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following num-sprites sprites in the .nfo file have to be RealSprites that will be used as graphics for the given TTDPatch feature, except for type 0A, which requires RecolorSprites.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|0.7|2.5|ttdprev=alpha 19}}Action 5 entries in a .grf file which has a regular GRFID (not FFFFFFFF) will always override those from .grf files with a GRFID of FFFFFFFF.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Sprite-number ===&lt;br /&gt;
&lt;br /&gt;
This is just the number you are at.&lt;br /&gt;
&lt;br /&gt;
=== Length ===&lt;br /&gt;
&lt;br /&gt;
Count the number of bytes in this action.&lt;br /&gt;
&lt;br /&gt;
=== type ===&lt;br /&gt;
&lt;br /&gt;
This sets the type of feature that the graphics are for. If bit 7 is set, the offset variable needs to be set. Bit 7 may only be set if the type supports it. The type can be one of:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Type!!Version!!Feature!!num-sprites (decimal)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04||{{ottdp|0.6|2.0}}||Pre-signal graphics||48&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04||{{ottdp|0.6|2.0}}||Pre-signal and semaphore graphics||112&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04,84&amp;lt;ref name=&amp;quot;offset&amp;quot;&amp;gt;Offset allowed since {{ottdp|1.2|no|ottdrev=r23005}}&amp;lt;/ref&amp;gt;||{{ottdp| |2.5|ttdprev=alpha 41}}||Pre-signal, semaphore, and [[PathBasedSignalling|PBS]] graphics||240&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05,85&amp;lt;ref name=&amp;quot;offset&amp;quot; /&amp;gt;||{{ottdp|0.6|2.0}}||Overhead wires and pylon graphics||48&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06 ||{{ottdp|0.6| }}||Foundations (retaining walls) for BuildOnSlopes ||74&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06,86&amp;lt;ref name=&amp;quot;offset&amp;quot; /&amp;gt;||{{ottdp|0.6|no|ottdrev=r11321}}||Foundations for BuildOnSlopes and half tiles (NS and EW foundations) ||90&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07||{{ottdp|no|2.5|ttdprev=alpha 43}}||TTDPatch GUI sprites||93 &amp;lt;ref&amp;gt;Type 07 only requires 73 sprites in the stable (2.5 branch); the extra sprites are the clone train and build canal cursors.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08,88&amp;lt;ref name=&amp;quot;offset&amp;quot; /&amp;gt;||{{ottdp|0.6|no}}&amp;lt;ref&amp;gt;TTDPatch supported canals via Action5 from 2.0.1 alpha 17 up to alpha 25. In alpha 26 it was removed again in favour of an action-1-2-3 method; see [[Action3/Canals|Action3]]. The method via Action5 is no longer supported by TTDpatch 2.0.1 alpha 26 and newer.&amp;lt;/ref&amp;gt;||Canals||65&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09,89&amp;lt;ref name=&amp;quot;offset&amp;quot; /&amp;gt;||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||One-way road arrows||6&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|0A,8A&amp;lt;ref name=&amp;quot;offset&amp;quot; /&amp;gt;||{{ottdp|0.6|2.5|ttdprev=alpha 67}}||Two company color translation maps||256&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|0B,8B&amp;lt;ref name=&amp;quot;offset&amp;quot; /&amp;gt;||{{ottdp|0.6|2.5|ttdprev=alpha 68}}||Tram tracks||113&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|0C||{{ottdp|no|2.5|ttdprev=alpha 74}}||Snowy temperate trees||133&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|0D||{{ottdp|0.6|2.5|ottdrev=r7325 (r11726)|ttdprev=beta 5}}||Coast Tile graphics||16 (18)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|0E||{{ottdp|no|2.6|ttdprev=r1247}}||New Signals||Any&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|0F,8F&amp;lt;ref name=&amp;quot;offset&amp;quot; /&amp;gt;||{{ottdp|0.7|2.6|ottdrev=r13469|ttdprev=r1487}}||Sprites for marking tracks on slopes (for track reservation systems like PBS or YAPP)||Up to 12&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|10,90&amp;lt;ref name=&amp;quot;offset&amp;quot; /&amp;gt;||{{ottdp|0.6|no|ottdrev=r9645}}||Additional airport graphics||15&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|11,91&amp;lt;ref name=&amp;quot;offset&amp;quot; /&amp;gt;||{{ottdp|0.6|2.6|ottdrev=r9645|ttdprev=r1589}}||Road stop graphics||8&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|12,92&amp;lt;ref name=&amp;quot;offset&amp;quot; /&amp;gt;||{{ottdp|0.7|2.6|ottdrev=r13464|ttdprev=r1498}}||Aqueduct graphics||8&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|13,93&amp;lt;ref name=&amp;quot;offset&amp;quot; /&amp;gt;||{{ottdp|0.6|no|ottdrev=r11433}}||Autorail sprites||55&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|14,94||{{ottdp|0.6|no|ottdrev=11433}}||Flag sprites||Up to 36&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|15,95||{{ottdp|0.6|no|ottdrev=r11433}}||OpenTTD GUI sprites||Up to 175&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|16,96||{{ottdp|1.1|no|ottdrev=r20370}}||Airport preview sprites||Up to 9&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|17,97||{{ottdp|1.2|no|ottdrev=r23952}}||Railtype tunnel base sprites||16&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|18,98||{{ottdp|1.5|no|ottdrev=r26869}}||Extra all black palette||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 04 Signal graphics. ====&lt;br /&gt;
&lt;br /&gt;
Signal graphics come in groups of 16. These groups contain sprites in the same order as sprites 1275-1290 in trg1[r].grf; red, then green, for each of: SW-facing, NE-facing, NW-facing, SE-facing, E-facing, W-facing, S-facing, N-facing.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Group(s)!!Contents&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|0||lighted entrance signals&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|1||lighted exit signals&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|2||lighted combo signals&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|3||standard (non-pre-signal) semaphore signals&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|4..6||repeat 0..2 for semaphores&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|7||standard lighted PBS signals&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|8..14||repeat 0..6 for PBS signals&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== 0C Snowy temperate trees ====&lt;br /&gt;
&lt;br /&gt;
If the temperate snow line is enabled, you can use this to specify the snowy versions of temperate trees. The sprites must be the snowy versions of sprites 1576-1708 from TRG1.GRF, in the same order as they appear there.&lt;br /&gt;
&lt;br /&gt;
==== 0D Coast tile sprites ====&lt;br /&gt;
&lt;br /&gt;
===== In NewGRFs =====&lt;br /&gt;
If diagonal flooding is enabled then due to new corner coasts, you can use this to give a complete set of replacement coast tile sprites. There are 16 in total, 8 original Transport Tycoon Deluxe sprites and 8 for the corner slopes. Order of the sprites&amp;lt;ref name=numbers&amp;gt;Sprite numbers from trg1(r).pcx.&amp;lt;/ref&amp;gt; is as follows:&lt;br /&gt;
&lt;br /&gt;
 3997, 4063, 4064, 4068, 4062, 3998, 4066, 3988,&lt;br /&gt;
 4065, 4069, 3996, 3992, 4067, 3994, 3995, 3999.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Action5Coast16Sprites.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The 16 sprites for feature 0D&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===== In Base Set&#039;s extra grf =====&lt;br /&gt;
Additionally, OpenTTD (since r11726) supports another method of supplying all additional coast tile sprites, but this is only allowed in the &#039;&#039;extra&#039;&#039; NewGRF of [http://wiki.openttd.org/Base_graphics Base Graphic Sets]. In this, only 10 sprites are supplied in the same order as the 16 sprites above, but without the coast sprites already in the base grf. Note that the 10 sprites version supplies two additional slopes, but they are not used, and are currently unlikely to be ever used.&lt;br /&gt;
&lt;br /&gt;
[[File:Action5Coast10Sprites.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Only 10 sprites are required for OpenTTD base graphic sets&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In OpenTTD 10 sprites for type 0D is enough in base graphic sets. The 16 sprites version should not be used for base graphics.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The reason for the existence of a 10 sprite version is to remove the need for including original graphics, and to keep compatibility with old NewGRFs that replace the original shore graphics using Action A without adding new shores using Action 5: When a NewGRF uses the 16 sprites version it takes precedence above any NewGRF replacing the shore graphics using Action A; when a NewGRF uses Action A to replace shore graphics it takes precedence above a 10-sprite Action 5, effectively disabling diagonal flooding. Also due to compatibility the 10 sprites version is invalid for normal NewGRFs, which are not the &amp;quot;extra&amp;quot; NewGRF of some Base Graphics Set.&lt;br /&gt;
&lt;br /&gt;
==== 0E New Signals ====&lt;br /&gt;
&lt;br /&gt;
Any number of real and recolour sprites can be specified in the action in any order.&lt;br /&gt;
&lt;br /&gt;
Sprites are referenced by their offset into the action5 block by a [[VarAction2NewSignals]], hence a logically easily calculable order is advised.&lt;br /&gt;
&lt;br /&gt;
As of TTDPatch 2.6 alpha 0 r1346, the action 5 block defined in the same GRF file as the varaction2, will be used as the base sprite block for the offsets returned by the callback even if it is overridden by a higher priority GRF action 5 definition of the same feature (0E).&lt;br /&gt;
&lt;br /&gt;
==== 0F Tracks for Slopes ====&lt;br /&gt;
&lt;br /&gt;
This should be in the same order as sprites 1031 to 1035 (1). These should only be the rails, basically the same format as sprites 1005 to 1010 (1). There should be 3 groups of these sprites, one for each rail type (railroad, monorail, maglev).&lt;br /&gt;
&lt;br /&gt;
(1) Sprite numbers from trg1r.pcx / ogfx1_base.grf&lt;br /&gt;
&lt;br /&gt;
==== 11 Road stop graphics ====&lt;br /&gt;
&lt;br /&gt;
Road stop graphics consist of 2 groups of 4 sprites. The first group contains graphics for bus stops, second for truck stops. In each group, the sprites are in the following order: SW, NE, NW, SE.&lt;br /&gt;
&lt;br /&gt;
SW and NE sprites are used with road going along the Y axis ( .\&#039; ), NW and SE with road along the X axis( &#039;/. ).&lt;br /&gt;
&lt;br /&gt;
Internally, the stations are defined using the following station layouts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;\d1313&lt;br /&gt;
&lt;br /&gt;
\b13 \b0 \b0 \b3 \b16 \b16 &amp;lt;SW sprite&amp;gt;&lt;br /&gt;
&lt;br /&gt;
\b0 \b0 \b0 \b3 \b16 \b16 &amp;lt;NE sprite&amp;gt;&lt;br /&gt;
&lt;br /&gt;
80&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;\d1314&lt;br /&gt;
&lt;br /&gt;
\b0 \b0 \b0 \b16 \b3 \b16 &amp;lt;NW sprite&amp;gt;&lt;br /&gt;
&lt;br /&gt;
\b0 \b13 \b0 \b16 \b3 \b16 &amp;lt;SE sprite&amp;gt;&lt;br /&gt;
&lt;br /&gt;
80&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where 1313 and 1314 are town road sprites.&lt;br /&gt;
&lt;br /&gt;
[[File:roadstops.png]]&lt;br /&gt;
&lt;br /&gt;
Further sprites can be found in &#039;&#039;&#039;openttd.grf&#039;&#039;&#039; (OpenTTD), &#039;&#039;&#039;ogfxe_extra.grf&#039;&#039;&#039; (OpenGFX) or &#039;&#039;&#039;ttdpbase(w).grf&#039;&#039;&#039; (TTDPatch).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: As of OpenTTD r10185, the behaviour of this feature is identical in both games.&lt;br /&gt;
&lt;br /&gt;
==== 12 Aqueducts ====&lt;br /&gt;
&lt;br /&gt;
8 real sprites should be given. Firstly: 4 bridge end sprites in the order: SW, SE, NE, NW, where the direction is that heading onto the aqueduct. Then 2 middle part sprites for the X and Y directions. Followed by two pillar sprites for the X and Y directions. For examples of where the division between middle sprites and pillars should be made see sprites 2437 to 2592 (1), or an existing aqueduct GRF. Note, that for higher bridges to work effectively, pillars should be approximately 8px in height.&lt;br /&gt;
&lt;br /&gt;
[[File:aqueduct.png]]&lt;br /&gt;
&lt;br /&gt;
==== 15 / 95 OpenTTD GUI sprites ====&lt;br /&gt;
&lt;br /&gt;
OpenTTD defines 162 GUI sprites. Additional sprites not needed by an OpenTTD are simply ignored, so that new(er) base sets can be used by old OpenTTD versions. One can (re-)define a subset of the GUI sprites by giving an offset into the GUI sprites. The sprites are:&lt;br /&gt;
{|&lt;br /&gt;
!Offset !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0 .. 11|| Halftile selections&lt;br /&gt;
|-&lt;br /&gt;
|12 .. 13 || Title screen letters E and D&lt;br /&gt;
|-&lt;br /&gt;
|14 .. 37 || Bridge piers colours 1 .. 4&lt;br /&gt;
|-&lt;br /&gt;
|38 || square indicating NewGRF compatibility&lt;br /&gt;
|-&lt;br /&gt;
|39 || blob indicating server compatibility&lt;br /&gt;
|-&lt;br /&gt;
|40 || lock icon&lt;br /&gt;
|-&lt;br /&gt;
|41 || empty check box&lt;br /&gt;
|-&lt;br /&gt;
|42 || checked check box&lt;br /&gt;
|-&lt;br /&gt;
|43 || warning sign&lt;br /&gt;
|-&lt;br /&gt;
|44 || window resize right&lt;br /&gt;
|-&lt;br /&gt;
|45 .. 48|| arrows&lt;br /&gt;
|-&lt;br /&gt;
|49 || house&lt;br /&gt;
|-&lt;br /&gt;
|50 || shared orders&lt;br /&gt;
|-&lt;br /&gt;
|51 .. 52 || pin / pinned&lt;br /&gt;
|-&lt;br /&gt;
|53 .. 62 || rail build icons and cursors&lt;br /&gt;
|-&lt;br /&gt;
|63 .. 68 || monorail build icons and cursors&lt;br /&gt;
|-&lt;br /&gt;
|69 .. 74 || maglev build icons and cursors&lt;br /&gt;
|-&lt;br /&gt;
|75 || ??&lt;br /&gt;
|-&lt;br /&gt;
|76 .. 77 || waypoint toolbar and cursor icon&lt;br /&gt;
|-&lt;br /&gt;
|78 .. 81 || waypoint buildings&lt;br /&gt;
|-&lt;br /&gt;
|82 .. 85 || autoroad toobar and cursor for road and trams&lt;br /&gt;
|-&lt;br /&gt;
|86 || helipad&lt;br /&gt;
|-&lt;br /&gt;
|87 || build ship lift cursor&lt;br /&gt;
|-&lt;br /&gt;
|88 .. 89 || build canal toolbar and cursor&lt;br /&gt;
|-&lt;br /&gt;
|90 || fast forward&lt;br /&gt;
|-&lt;br /&gt;
|91 .. 92 || level land toolbar and cursor&lt;br /&gt;
|-&lt;br /&gt;
|93 .. 96 || sell vehicle&lt;br /&gt;
|-&lt;br /&gt;
|97 .. 100 || sell all vehicles&lt;br /&gt;
|-&lt;br /&gt;
|101 .. 104 || replace vehicle&lt;br /&gt;
|-&lt;br /&gt;
|105 || sell chain of rail vehicles&lt;br /&gt;
|-&lt;br /&gt;
|106 .. 113 || clone vehicles button and cursors&lt;br /&gt;
|-&lt;br /&gt;
|114 .. 117 || create vehicle group button&lt;br /&gt;
|-&lt;br /&gt;
|118 .. 121 || delete vehicle group button&lt;br /&gt;
|-&lt;br /&gt;
|122 .. 125 || rename vehicle group button&lt;br /&gt;
|-&lt;br /&gt;
|126 .. 133 || group replace on / off button&lt;br /&gt;
|-&lt;br /&gt;
|134 || road toolbar: build one-way roads&lt;br /&gt;
|-&lt;br /&gt;
|135 || signal toolbar: convert signals&lt;br /&gt;
|-&lt;br /&gt;
|136 .. 137|| build rivers toolbar and cursor&lt;br /&gt;
|-&lt;br /&gt;
|138 .. 143 || OSK&lt;br /&gt;
|-&lt;br /&gt;
|144 || switch toolbar&lt;br /&gt;
|-&lt;br /&gt;
|145 .. 146 || build aqueduct toolbar and cursor&lt;br /&gt;
|-&lt;br /&gt;
|147 .. 148 || (+) and (-) icon&lt;br /&gt;
|-&lt;br /&gt;
|149 || window resize left&lt;br /&gt;
|-&lt;br /&gt;
|150 || play music right-to-left languages&lt;br /&gt;
|-&lt;br /&gt;
|151 .. 152 || shade / unshade&lt;br /&gt;
|-&lt;br /&gt;
|153 || debug&lt;br /&gt;
|-&lt;br /&gt;
|154 .. 157 || vehicle profit icons&lt;br /&gt;
|-&lt;br /&gt;
|158 || unread news&lt;br /&gt;
|-&lt;br /&gt;
|159 || exclusive transport rights&lt;br /&gt;
|-&lt;br /&gt;
|160 || autoreplace protection&lt;br /&gt;
|-&lt;br /&gt;
|161 || autoreplace defined&lt;br /&gt;
|-&lt;br /&gt;
|162 .. 165 || Town happiness indicator: N/A, appalling, mediocre and good&lt;br /&gt;
|-&lt;br /&gt;
|166 .. 167 || Icons for delete to the left resp. right&lt;br /&gt;
|-&lt;br /&gt;
|168 || Default window size&lt;br /&gt;
|-&lt;br /&gt;
|169 .. 173 || Story book: Main toolbar icon, goto place, unfinished goal, finished goal, broken goal&lt;br /&gt;
|-&lt;br /&gt;
|174 || Smallmap cargoflow button&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== 16 / 96 Airport preview sprites ====&lt;br /&gt;
[[File:airport_preview_commuter.png|right]]&lt;br /&gt;
Preview sprites for the airports in the order&lt;br /&gt;
# Small airport&lt;br /&gt;
# City airport&lt;br /&gt;
# Heliport&lt;br /&gt;
# Metropolitan airport&lt;br /&gt;
# International airport&lt;br /&gt;
# Commuter airport&lt;br /&gt;
# Heli depot&lt;br /&gt;
# Intercontinental airport&lt;br /&gt;
# Heli station&lt;br /&gt;
&lt;br /&gt;
Sprites are without any offsets and should all be the same size. Make sure so by using the forbid cropping.&lt;br /&gt;
&lt;br /&gt;
==== 17 / 97 Tunnel overlay sprites ====&lt;br /&gt;
[[File:tunnel_overlays.png|right]]&lt;br /&gt;
The sprites provide the ground for the tunnel sprites to be used by railtype NewGRFs which only need to provide the tunnel portals. They must be provided for both terrain types which could be used in any given climate (grass; grass+snow; grass+desert; grass).&lt;br /&gt;
&lt;br /&gt;
=== num-sprites ===&lt;br /&gt;
&lt;br /&gt;
The number of sprites that follow.&lt;br /&gt;
&lt;br /&gt;
Since TTDPatch 2.0.1 alpha 49, this value is an extended byte.&lt;br /&gt;
&lt;br /&gt;
Note that it is not generally an error to provide more sprites than required, but this does expend sprite slots unnecessarily.&lt;br /&gt;
&lt;br /&gt;
=== offset ===&lt;br /&gt;
&lt;br /&gt;
The offset in the Action 5 assignable block of sprites. This term is only read when bit 7 of the type has been set. It can be used to only replace a subset of sprites from a set.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; When creating a TTDPatch compatible grf, you have to skip the OpenTTD specific Action 05&#039;s using an Action 09 rather than an Action 07. Using the latter will result in an error on your Action 05 when using the grf in TTDPatch.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; NFORenum distinguishes Action5 with no offset and Action5 with offset 0. While they have technically the same effect, NFORenum assumes an Action5 with no offset has the intention to replace all sprites and checks the number of sprites accordingly. An Action5 with offset is considered to only replace a subset of the sprites, so the sprites are not checked for completeness.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Replace the piers for the aqueduct&lt;br /&gt;
 1457 * 3        05 12 02 06 // action5, type 12, 2 sprites, at offset 6 into that type&lt;br /&gt;
    9 sprites/png/terrain/waterfeatures.png 546 8 09 23 33 -26 0&lt;br /&gt;
   10 sprites/png/terrain/waterfeatures.png 594 8 09 23 33 -5 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action8&amp;diff=3519</id>
		<title>Action8</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action8&amp;diff=3519"/>
		<updated>2014-06-23T19:20:17Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: Add andy&amp;#039;s list&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
Define GRFID, Name and Description&lt;br /&gt;
&lt;br /&gt;
There are many new graphic sets available to TTD players. Of course, we need to make sure that we never get sets mixed up. To make sure this will never happen you can set an ID. Another useful feature of Action 8 is the ability to include useful information into the final .grf file. Here, we explain how Action 8 works.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
Like all other pseudo-sprites, Action 8 consists of hexadecimal bits. There is no limitation in the total amount of hexadecimal bits you can use in Action 8. One term does have a limit though. Let&#039;s give an example of what an Action 8 line looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;sprite-number&amp;gt; * &amp;lt;length&amp;gt; 08 &amp;lt;version&amp;gt; &amp;lt;grf-id&amp;gt; &amp;lt;name&amp;gt; &amp;lt;description&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a short overview of what every term means:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Element&#039;&#039;&#039;!![[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]!!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;sprite-number&amp;gt;||dec||A sequential sprite number&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;length&amp;gt;||dec||The total number of bytes in the action&lt;br /&gt;
|-&lt;br /&gt;
|08||B||Action 08&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;version&amp;gt;||B||GRF version&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;grf-id&amp;gt;||4*B||A unique ID for your .grf file&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;name&amp;gt;||S||A short text containing the name of this set&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;description&amp;gt;||S||A longer description of this set&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Sprite-number ===&lt;br /&gt;
&lt;br /&gt;
The number of this sprite.&lt;br /&gt;
&lt;br /&gt;
Action 8 has to be one of the first pseudosprites in the .NFO file. It is however valid to have other actions before it, except those that define new sprites or vehicle (etc.) properties.&lt;br /&gt;
&lt;br /&gt;
Actions 6, 7, 9, B, C, D (except [[GRFResourceManagement|resource management]] sprites), 10 and 14 are valid before an action 8.&lt;br /&gt;
&lt;br /&gt;
=== Length ===&lt;br /&gt;
&lt;br /&gt;
The total number of bytes in Action 8.&lt;br /&gt;
&lt;br /&gt;
=== GRF Version ===&lt;br /&gt;
&lt;br /&gt;
This should be the graphics version that your file is written for. This is the version of the [[Version_numbers#GRF_version|GRF format]], not the [[Version_numbers#Version_of_a_specific_NewGRF|version of your GRF]]!&lt;br /&gt;
It is also not the &amp;quot;[[Version_numbers#NFO_version|NFO version]]&amp;quot; you put at the top of &amp;quot;.nfo&amp;quot; files to announce the used syntax for GRFCodec.&lt;br /&gt;
&lt;br /&gt;
Valid values are:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;!!&#039;&#039;&#039;Compatibility&#039;&#039;&#039;!!&#039;&#039;&#039;[[Version_numbers#TTDPatch_version|TTDPatch version]]&#039;&#039;&#039;!!&#039;&#039;&#039;[[Version_numbers#OpenTTD_version|OpenTTD support]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|08||02..08|| - || {{ottd|1.2|r23159}}&lt;br /&gt;
|-&lt;br /&gt;
|07||02..07||2.5 beta 1 or higher|| {{ottd|0.6}}&lt;br /&gt;
|-&lt;br /&gt;
|06||02..06||2.0.1 alpha 13 or higher|| {{ottd|0.6}}&lt;br /&gt;
|-&lt;br /&gt;
|05||02..05||2.0r1 Stable TTDPatch + TTDPatch 2.0.1 alphas up to 12|| {{ottd|0.6}}&lt;br /&gt;
|-&lt;br /&gt;
|04||02..04||2.0 Stable TTDPatch||{{ottd|0.6}}&lt;br /&gt;
|-&lt;br /&gt;
|01||00..01||1.9.1 alpha 28 or higher||{{ottd|no}}&lt;br /&gt;
|-&lt;br /&gt;
|00||00||1.9.1 alphas up to 27||{{ottd|no}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Entries for 00 and 01 are included only for completeness, and to aid with updating existing graphics. They should not be used with new graphics, because they will be incompatible with current TTDPatch and OpenTTD versions. OpenTTD 1.1.0 and later will disable NewGRFs with non-supported GRF versions.&lt;br /&gt;
&lt;br /&gt;
Make sure to set a version number no lower than the minimum version that supports all features which are used by your file.&lt;br /&gt;
&lt;br /&gt;
The compatibility column means how low a version number is supported by the given TTDPatch version, e.g. TTDPatch 2.0r1 supports graphics files with any version from 02 to 05, but not for example 01 or 06.&lt;br /&gt;
&lt;br /&gt;
Version 07 and 08 introduce a few minor semantic changes to some graphics features, i.e. the file will behave slightly differently depending on whether it&#039;s declared as version 06, 07 or 08. These changes are described in more detail in the pages for the features they affect.&lt;br /&gt;
&lt;br /&gt;
=== GRFID ===&lt;br /&gt;
&lt;br /&gt;
This is a series of 4 bytes. It&#039;s a convention to use the first three bytes for the creator&#039;s initials in ASCII code, e.g. 54 57 48 for &amp;quot;TWH&amp;quot;. The last byte typically identies which of the author&#039;s sets this is. See the next subsection for grfID ranges that are already in use. Version numbers for NewGRFs are communicated via preceeding [[Action14]]. &lt;br /&gt;
&lt;br /&gt;
In principle, you are free what to use for the GRFID as long as you are sure it is unique, but generally it is best to follow the above guidelines. See the last subsection for locations where to find already used GRFIDs.&lt;br /&gt;
&lt;br /&gt;
Note that GRFIDs starting with FF (i.e. the first byte is FF, such as in FF123456) are reserved for internal purposes and should not be used by regular .grf files. These GRFs can&#039;t be disabled; TTDPatch displays them with a blue flag in the GRF Status Window.&lt;br /&gt;
&lt;br /&gt;
The extra newgrf file, part of OpenTTD base sets, have to have a GRFID starting with FF &amp;quot;OT&amp;quot;.&lt;br /&gt;
See the table below:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!GRFID!!purposes&lt;br /&gt;
|-&lt;br /&gt;
|00 00 00 00||n/a&lt;br /&gt;
|-&lt;br /&gt;
|00 00 00 01 .. FE FF FF FF||normal NewGRFs&lt;br /&gt;
|-&lt;br /&gt;
|FF 00 00 00 .. FF FF FF FF||reserved&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OT&amp;quot; 00 .. FF &amp;quot;OT&amp;quot; FF||extra base GRFs&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OT&amp;quot; 01|| OpenGFX&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OTD&amp;quot;|| OpenTTD (extra) base graphics: openttdd.grf (OpenTTD 0.6 - 1.0)&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OTT&amp;quot;|| OpenTTD (extra) base graphics: openttd.grf (OpenTTD &amp;gt;= 1.1)&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OTW&amp;quot;|| OpenTTD (extra) base graphics: openttdw.grf (OpenTTD 0.6 - 1.0)&lt;br /&gt;
|-&lt;br /&gt;
|FF FF FF FF|| TTDPatch (extra) base graphics&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Used ranges ====&lt;br /&gt;
&lt;br /&gt;
The following table shows ranges of GRFIDs that are in use by several authors of NewGRFs. People choosing new GRFIDs are asked to not use a GRFID that falls within the ranges of one of the following. This list is in no way exhaustive; if you want to claim your own range, please update the table. For legacy reasons there are some broader ranges of GRFIDs reserved by some people, but when you want to reserve a broader range than a variation in only the last byte, consider how long it will take you to write 255 sensible completely different NewGRFs.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Range (hex)!!ASCII!!Usage&lt;br /&gt;
|-&lt;br /&gt;
|41 4E XX XX||A N _ _||FISH ship set&lt;br /&gt;
|-&lt;br /&gt;
|41 50 XX XX||A P _ _||HEQS (Heavy Equipment Set)&lt;br /&gt;
|-&lt;br /&gt;
|43 41 XX XX||C A _ _||OzTrans; older versions of Canadian and some North American sets&lt;br /&gt;
|-&lt;br /&gt;
|43 48 XX XX||C H _ _||CHIPS Has Improved Players&#039; Stations&lt;br /&gt;
|-&lt;br /&gt;
|44 44 XX XX||D D _ _||Pikkabird; UKRS, NARS, Av8&lt;br /&gt;
|-&lt;br /&gt;
|4A 56 XX XX||J V _ _||juzza1; Various Finnish sets&lt;br /&gt;
|-&lt;br /&gt;
|4F 47 2B XX||O G + _||OpenGFX+ sets&lt;br /&gt;
|-&lt;br /&gt;
|4D 65 XX XX||M e _ _||George; ECS, Long vehicles&lt;br /&gt;
|-&lt;br /&gt;
|6D 62 XX XX||m b _ _||Michael Blunck; DBsetXL, NewStations, MariCo&lt;br /&gt;
|-&lt;br /&gt;
|97 87 XX XX||? ? _ _||OzTrans; newer versions of Canadian sets&lt;br /&gt;
|-&lt;br /&gt;
|F1 25 XX XX||? ? _ _||FIRS Industry Replacement Set&lt;br /&gt;
|-&lt;br /&gt;
|FB FB XX XX||? ? _ _||FooBar; Dutch sets, Transrapid/metro tracks&lt;br /&gt;
|-&lt;br /&gt;
|FF XX XX XX||? _ _ _||System reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Used GRFIDs ====&lt;br /&gt;
&lt;br /&gt;
There are several places that have/show lists of GRFIDs that are definitely in use by someone. Absence of a GRFID in any of these lists is not proof that it is not used though.&lt;br /&gt;
&lt;br /&gt;
* [http://bananas.openttd.org/en/newgrf/] Bananas shows the GRFIDs of all currently active NewGRFs that are distributed by the system&lt;br /&gt;
* [http://grfcrawler.tt-forums.net/index.php?do=search&amp;amp;mode=advanced] GRFCrawler allows one to search on GRFIDs of NewGRFs in its system&lt;br /&gt;
* [http://devs.openttd.org/~rubidium/newgrf.html] OpenTTD generates a list that shows all NewGRFs that were ever used in a multiplayer game&lt;br /&gt;
&lt;br /&gt;
=== Name ===&lt;br /&gt;
This short field should contain the name of the set. See [[GRFActionsDetailed#Strings|GRFActionsDetailed]] for instructions to generate the necessary byte codes, and for restrictions on what characters you may use.&lt;br /&gt;
The name must be short because it should fit on one line of the [[GRFStatusWindow|GRF Status window]].&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
This is a longer description of the set. Typically it contains the name of the author and a copyright notice or other attribution. See [[GRFActionsDetailed#Strings|GRFActionsDetailed]] for instructions to generate the necessary byte codes, and for restrictions on what characters you may use.&lt;br /&gt;
The description may be quite long, but should be short enough to fit in the description part of the [[GRFStatusWindow|GRF Status window]], or a part of it may be cut off.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Below is an example of what a real Action 8 pseudo-sprite could look like.&lt;br /&gt;
&lt;br /&gt;
 1 * 43 &#039;&#039;&#039;08&#039;&#039;&#039; 07 &amp;quot;TW&amp;quot; 01 06 &amp;quot;Tutorial Example&amp;quot; 00 &amp;quot;Changes nothing. Author: A kind person&amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
Let&#039;s clarify it bit by bit. In order to understand what the bits say you could use a hexadecimal editor.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Byte&#039;&#039;&#039;!!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||&amp;lt;sprite-number&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|43||&amp;lt;length&amp;gt; of the action in bytes; start counting at 08 (&amp;lt;action&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|08||&amp;lt;action&amp;gt;: sets this pseudo-sprite to function as action 8&lt;br /&gt;
|-&lt;br /&gt;
|07||&amp;lt;version&amp;gt;: GRF format version 7 (this is the version of the used GRF format, not of your GRF)&lt;br /&gt;
|-&lt;br /&gt;
|54 57 01 06||&amp;lt;-grf-id&amp;gt;: ASCII code for TW, then the numbers 1 and 6 to indicate version 6 of TW&#039;s first set&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;Tutorial...&amp;quot; 00||&amp;lt;name&amp;gt;: Name of the NewGRF&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;Changes...&amp;quot; 00||&amp;lt;description&amp;gt;: Description of the NewGRF&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action8&amp;diff=3516</id>
		<title>Action8</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action8&amp;diff=3516"/>
		<updated>2014-06-23T17:50:05Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: Some more additions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
Define GRFID, Name and Description&lt;br /&gt;
&lt;br /&gt;
There are many new graphic sets available to TTD players. Of course, we need to make sure that we never get sets mixed up. To make sure this will never happen you can set an ID. Another useful feature of Action 8 is the ability to include useful information into the final .grf file. Here, we explain how Action 8 works.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
Like all other pseudo-sprites, Action 8 consists of hexadecimal bits. There is no limitation in the total amount of hexadecimal bits you can use in Action 8. One term does have a limit though. Let&#039;s give an example of what an Action 8 line looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;sprite-number&amp;gt; * &amp;lt;length&amp;gt; 08 &amp;lt;version&amp;gt; &amp;lt;grf-id&amp;gt; &amp;lt;name&amp;gt; &amp;lt;description&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a short overview of what every term means:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Element&#039;&#039;&#039;!![[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]!!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;sprite-number&amp;gt;||dec||A sequential sprite number&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;length&amp;gt;||dec||The total number of bytes in the action&lt;br /&gt;
|-&lt;br /&gt;
|08||B||Action 08&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;version&amp;gt;||B||GRF version&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;grf-id&amp;gt;||4*B||A unique ID for your .grf file&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;name&amp;gt;||S||A short text containing the name of this set&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;description&amp;gt;||S||A longer description of this set&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Sprite-number ===&lt;br /&gt;
&lt;br /&gt;
The number of this sprite.&lt;br /&gt;
&lt;br /&gt;
Action 8 has to be one of the first pseudosprites in the .NFO file. It is however valid to have other actions before it, except those that define new sprites or vehicle (etc.) properties.&lt;br /&gt;
&lt;br /&gt;
Actions 6, 7, 9, B, C, D (except [[GRFResourceManagement|resource management]] sprites), 10 and 14 are valid before an action 8.&lt;br /&gt;
&lt;br /&gt;
=== Length ===&lt;br /&gt;
&lt;br /&gt;
The total number of bytes in Action 8.&lt;br /&gt;
&lt;br /&gt;
=== GRF Version ===&lt;br /&gt;
&lt;br /&gt;
This should be the graphics version that your file is written for. This is the version of the [[Version_numbers#GRF_version|GRF format]], not the [[Version_numbers#Version_of_a_specific_NewGRF|version of your GRF]]!&lt;br /&gt;
It is also not the &amp;quot;[[Version_numbers#NFO_version|NFO version]]&amp;quot; you put at the top of &amp;quot;.nfo&amp;quot; files to announce the used syntax for GRFCodec.&lt;br /&gt;
&lt;br /&gt;
Valid values are:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;!!&#039;&#039;&#039;Compatibility&#039;&#039;&#039;!!&#039;&#039;&#039;[[Version_numbers#TTDPatch_version|TTDPatch version]]&#039;&#039;&#039;!!&#039;&#039;&#039;[[Version_numbers#OpenTTD_version|OpenTTD support]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|08||02..08|| - || {{ottd|1.2|r23159}}&lt;br /&gt;
|-&lt;br /&gt;
|07||02..07||2.5 beta 1 or higher|| {{ottd|0.6}}&lt;br /&gt;
|-&lt;br /&gt;
|06||02..06||2.0.1 alpha 13 or higher|| {{ottd|0.6}}&lt;br /&gt;
|-&lt;br /&gt;
|05||02..05||2.0r1 Stable TTDPatch + TTDPatch 2.0.1 alphas up to 12|| {{ottd|0.6}}&lt;br /&gt;
|-&lt;br /&gt;
|04||02..04||2.0 Stable TTDPatch||{{ottd|0.6}}&lt;br /&gt;
|-&lt;br /&gt;
|01||00..01||1.9.1 alpha 28 or higher||{{ottd|no}}&lt;br /&gt;
|-&lt;br /&gt;
|00||00||1.9.1 alphas up to 27||{{ottd|no}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Entries for 00 and 01 are included only for completeness, and to aid with updating existing graphics. They should not be used with new graphics, because they will be incompatible with current TTDPatch and OpenTTD versions. OpenTTD 1.1.0 and later will disable NewGRFs with non-supported GRF versions.&lt;br /&gt;
&lt;br /&gt;
Make sure to set a version number no lower than the minimum version that supports all features which are used by your file.&lt;br /&gt;
&lt;br /&gt;
The compatibility column means how low a version number is supported by the given TTDPatch version, e.g. TTDPatch 2.0r1 supports graphics files with any version from 02 to 05, but not for example 01 or 06.&lt;br /&gt;
&lt;br /&gt;
Version 07 and 08 introduce a few minor semantic changes to some graphics features, i.e. the file will behave slightly differently depending on whether it&#039;s declared as version 06, 07 or 08. These changes are described in more detail in the pages for the features they affect.&lt;br /&gt;
&lt;br /&gt;
=== GRFID ===&lt;br /&gt;
&lt;br /&gt;
This is a series of 4 bytes. It&#039;s a convention to use the first two bytes for the creator&#039;s initials in ASCII code, e.g. 54 57 for &amp;quot;TW&amp;quot;. The last two bytes should be numbers, typically the first number identifying which of the author&#039;s sets this is, and the second number being a version number. See the next subsection for ranges that are already in use.&lt;br /&gt;
&lt;br /&gt;
In principle, you are free what to use for the GRFID as long as you are sure it is unique, but generally it is best to follow the above guidelines. See the last subsection for locations where to find already used GRFIDs.&lt;br /&gt;
&lt;br /&gt;
Note that GRFIDs starting with FF (i.e. the first byte is FF, such as in FF123456) are reserved for internal purposes and should not be used by regular .grf files. These GRFs can&#039;t be disabled; TTDPatch displays them with a blue flag in the GRF Status Window.&lt;br /&gt;
&lt;br /&gt;
The extra newgrf file, part of OpenTTD base sets, have to have a GRFID starting with FF &amp;quot;OT&amp;quot;.&lt;br /&gt;
See the table below:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!GRFID!!purposes&lt;br /&gt;
|-&lt;br /&gt;
|00 00 00 00||n/a&lt;br /&gt;
|-&lt;br /&gt;
|00 00 00 01 .. FE FF FF FF||normal NewGRFs&lt;br /&gt;
|-&lt;br /&gt;
|FF 00 00 00 .. FF FF FF FF||reserved&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OT&amp;quot; 00 .. FF &amp;quot;OT&amp;quot; FF||extra base GRFs&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OT&amp;quot; 01|| OpenGFX&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OTD&amp;quot;|| OpenTTD (extra) base graphics: openttdd.grf (OpenTTD 0.6 - 1.0)&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OTT&amp;quot;|| OpenTTD (extra) base graphics: openttd.grf (OpenTTD &amp;gt;= 1.1)&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OTW&amp;quot;|| OpenTTD (extra) base graphics: openttdw.grf (OpenTTD 0.6 - 1.0)&lt;br /&gt;
|-&lt;br /&gt;
|FF FF FF FF|| TTDPatch (extra) base graphics&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Used ranges ====&lt;br /&gt;
&lt;br /&gt;
The following table shows ranges of GRFIDs that are in use by several authors of NewGRFs. People choosing new GRFIDs are asked to not use a GRFID that falls within the ranges of one of the following. This list is in no way exhaustive; if you want to claim your own range, please update the table.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Range (hex)!!ASCII!!Usage&lt;br /&gt;
|-&lt;br /&gt;
|43 41 XX XX||C A _ _||OzTrans; older versions of Canadian and some North American sets&lt;br /&gt;
|-&lt;br /&gt;
|44 44 XX XX||D D _ _||Pikkabird; UKRS, NARS, Av8&lt;br /&gt;
|-&lt;br /&gt;
|4F 47 2B XX||O G + _||OpenGFX+ sets&lt;br /&gt;
|-&lt;br /&gt;
|4D 65 XX XX||M e _ _||George; ECS, Long vehicles&lt;br /&gt;
|-&lt;br /&gt;
|6D 62 XX XX||m b _ _||Michael Blunck; DBsetXL, NewStations, MariCo&lt;br /&gt;
|-&lt;br /&gt;
|97 87 XX XX||? ? _ _||OzTrans; newer versions of Canadian sets&lt;br /&gt;
|-&lt;br /&gt;
|F1 25 XX XX||? ? _ _||FIRS Industry Replacement Set&lt;br /&gt;
|-&lt;br /&gt;
|FB FB XX XX||? ? _ _||FooBar; Dutch sets, Transrapid/metro tracks&lt;br /&gt;
|-&lt;br /&gt;
|FF XX XX XX||? _ _ _||System reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Used GRFIDs ====&lt;br /&gt;
&lt;br /&gt;
There are several places that have/show lists of GRFIDs that are definitely in use by someone. Absence of a GRFID in any of these lists is not proof that it is not used though.&lt;br /&gt;
&lt;br /&gt;
* [http://bananas.openttd.org/en/newgrf/] Bananas shows the GRFIDs of all currently active NewGRFs that are distributed by the system&lt;br /&gt;
* [http://grfcrawler.tt-forums.net/index.php?do=search&amp;amp;mode=advanced] GRFCrawler allows one to search on GRFIDs of NewGRFs in its system&lt;br /&gt;
* [http://devs.openttd.org/~rubidium/newgrf.html] OpenTTD generates a list that shows all NewGRFs that were ever used in a multiplayer game&lt;br /&gt;
&lt;br /&gt;
=== Name ===&lt;br /&gt;
This short field should contain the name of the set. See [[GRFActionsDetailed#Strings|GRFActionsDetailed]] for instructions to generate the necessary byte codes, and for restrictions on what characters you may use.&lt;br /&gt;
The name must be short because it should fit on one line of the [[GRFStatusWindow|GRF Status window]].&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
This is a longer description of the set. Typically it contains the name of the author and a copyright notice or other attribution. See [[GRFActionsDetailed#Strings|GRFActionsDetailed]] for instructions to generate the necessary byte codes, and for restrictions on what characters you may use.&lt;br /&gt;
The description may be quite long, but should be short enough to fit in the description part of the [[GRFStatusWindow|GRF Status window]], or a part of it may be cut off.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Below is an example of what a real Action 8 pseudo-sprite could look like.&lt;br /&gt;
&lt;br /&gt;
 1 * 43 &#039;&#039;&#039;08&#039;&#039;&#039; 07 &amp;quot;TW&amp;quot; 01 06 &amp;quot;Tutorial Example&amp;quot; 00 &amp;quot;Changes nothing. Author: A kind person&amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
Let&#039;s clarify it bit by bit. In order to understand what the bits say you could use a hexadecimal editor.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Byte&#039;&#039;&#039;!!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||&amp;lt;sprite-number&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|43||&amp;lt;length&amp;gt; of the action in bytes; start counting at 08 (&amp;lt;action&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|08||&amp;lt;action&amp;gt;: sets this pseudo-sprite to function as action 8&lt;br /&gt;
|-&lt;br /&gt;
|07||&amp;lt;version&amp;gt;: GRF format version 7 (this is the version of the used GRF format, not of your GRF)&lt;br /&gt;
|-&lt;br /&gt;
|54 57 01 06||&amp;lt;-grf-id&amp;gt;: ASCII code for TW, then the numbers 1 and 6 to indicate version 6 of TW&#039;s first set&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;Tutorial...&amp;quot; 00||&amp;lt;name&amp;gt;: Name of the NewGRF&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;Changes...&amp;quot; 00||&amp;lt;description&amp;gt;: Description of the NewGRF&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action8&amp;diff=3515</id>
		<title>Action8</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action8&amp;diff=3515"/>
		<updated>2014-06-23T17:39:05Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: Add OzTrans&amp;#039; new range&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
Define GRFID, Name and Description&lt;br /&gt;
&lt;br /&gt;
There are many new graphic sets available to TTD players. Of course, we need to make sure that we never get sets mixed up. To make sure this will never happen you can set an ID. Another useful feature of Action 8 is the ability to include useful information into the final .grf file. Here, we explain how Action 8 works.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
Like all other pseudo-sprites, Action 8 consists of hexadecimal bits. There is no limitation in the total amount of hexadecimal bits you can use in Action 8. One term does have a limit though. Let&#039;s give an example of what an Action 8 line looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;sprite-number&amp;gt; * &amp;lt;length&amp;gt; 08 &amp;lt;version&amp;gt; &amp;lt;grf-id&amp;gt; &amp;lt;name&amp;gt; &amp;lt;description&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a short overview of what every term means:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Element&#039;&#039;&#039;!![[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]!!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;sprite-number&amp;gt;||dec||A sequential sprite number&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;length&amp;gt;||dec||The total number of bytes in the action&lt;br /&gt;
|-&lt;br /&gt;
|08||B||Action 08&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;version&amp;gt;||B||GRF version&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;grf-id&amp;gt;||4*B||A unique ID for your .grf file&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;name&amp;gt;||S||A short text containing the name of this set&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;description&amp;gt;||S||A longer description of this set&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Sprite-number ===&lt;br /&gt;
&lt;br /&gt;
The number of this sprite.&lt;br /&gt;
&lt;br /&gt;
Action 8 has to be one of the first pseudosprites in the .NFO file. It is however valid to have other actions before it, except those that define new sprites or vehicle (etc.) properties.&lt;br /&gt;
&lt;br /&gt;
Actions 6, 7, 9, B, C, D (except [[GRFResourceManagement|resource management]] sprites), 10 and 14 are valid before an action 8.&lt;br /&gt;
&lt;br /&gt;
=== Length ===&lt;br /&gt;
&lt;br /&gt;
The total number of bytes in Action 8.&lt;br /&gt;
&lt;br /&gt;
=== GRF Version ===&lt;br /&gt;
&lt;br /&gt;
This should be the graphics version that your file is written for. This is the version of the [[Version_numbers#GRF_version|GRF format]], not the [[Version_numbers#Version_of_a_specific_NewGRF|version of your GRF]]!&lt;br /&gt;
It is also not the &amp;quot;[[Version_numbers#NFO_version|NFO version]]&amp;quot; you put at the top of &amp;quot;.nfo&amp;quot; files to announce the used syntax for GRFCodec.&lt;br /&gt;
&lt;br /&gt;
Valid values are:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;!!&#039;&#039;&#039;Compatibility&#039;&#039;&#039;!!&#039;&#039;&#039;[[Version_numbers#TTDPatch_version|TTDPatch version]]&#039;&#039;&#039;!!&#039;&#039;&#039;[[Version_numbers#OpenTTD_version|OpenTTD support]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|08||02..08|| - || {{ottd|1.2|r23159}}&lt;br /&gt;
|-&lt;br /&gt;
|07||02..07||2.5 beta 1 or higher|| {{ottd|0.6}}&lt;br /&gt;
|-&lt;br /&gt;
|06||02..06||2.0.1 alpha 13 or higher|| {{ottd|0.6}}&lt;br /&gt;
|-&lt;br /&gt;
|05||02..05||2.0r1 Stable TTDPatch + TTDPatch 2.0.1 alphas up to 12|| {{ottd|0.6}}&lt;br /&gt;
|-&lt;br /&gt;
|04||02..04||2.0 Stable TTDPatch||{{ottd|0.6}}&lt;br /&gt;
|-&lt;br /&gt;
|01||00..01||1.9.1 alpha 28 or higher||{{ottd|no}}&lt;br /&gt;
|-&lt;br /&gt;
|00||00||1.9.1 alphas up to 27||{{ottd|no}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Entries for 00 and 01 are included only for completeness, and to aid with updating existing graphics. They should not be used with new graphics, because they will be incompatible with current TTDPatch and OpenTTD versions. OpenTTD 1.1.0 and later will disable NewGRFs with non-supported GRF versions.&lt;br /&gt;
&lt;br /&gt;
Make sure to set a version number no lower than the minimum version that supports all features which are used by your file.&lt;br /&gt;
&lt;br /&gt;
The compatibility column means how low a version number is supported by the given TTDPatch version, e.g. TTDPatch 2.0r1 supports graphics files with any version from 02 to 05, but not for example 01 or 06.&lt;br /&gt;
&lt;br /&gt;
Version 07 and 08 introduce a few minor semantic changes to some graphics features, i.e. the file will behave slightly differently depending on whether it&#039;s declared as version 06, 07 or 08. These changes are described in more detail in the pages for the features they affect.&lt;br /&gt;
&lt;br /&gt;
=== GRFID ===&lt;br /&gt;
&lt;br /&gt;
This is a series of 4 bytes. It&#039;s a convention to use the first two bytes for the creator&#039;s initials in ASCII code, e.g. 54 57 for &amp;quot;TW&amp;quot;. The last two bytes should be numbers, typically the first number identifying which of the author&#039;s sets this is, and the second number being a version number. See the next subsection for ranges that are already in use.&lt;br /&gt;
&lt;br /&gt;
In principle, you are free what to use for the GRFID as long as you are sure it is unique, but generally it is best to follow the above guidelines. See the last subsection for locations where to find already used GRFIDs.&lt;br /&gt;
&lt;br /&gt;
Note that GRFIDs starting with FF (i.e. the first byte is FF, such as in FF123456) are reserved for internal purposes and should not be used by regular .grf files. These GRFs can&#039;t be disabled; TTDPatch displays them with a blue flag in the GRF Status Window.&lt;br /&gt;
&lt;br /&gt;
The extra newgrf file, part of OpenTTD base sets, have to have a GRFID starting with FF &amp;quot;OT&amp;quot;.&lt;br /&gt;
See the table below:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!GRFID!!purposes&lt;br /&gt;
|-&lt;br /&gt;
|00 00 00 00||n/a&lt;br /&gt;
|-&lt;br /&gt;
|00 00 00 01 .. FE FF FF FF||normal NewGRFs&lt;br /&gt;
|-&lt;br /&gt;
|FF 00 00 00 .. FF FF FF FF||reserved&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OT&amp;quot; 00 .. FF &amp;quot;OT&amp;quot; FF||extra base GRFs&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OT&amp;quot; 01|| OpenGFX&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OTD&amp;quot;|| OpenTTD (extra) base graphics: openttdd.grf (OpenTTD 0.6 - 1.0)&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OTT&amp;quot;|| OpenTTD (extra) base graphics: openttd.grf (OpenTTD &amp;gt;= 1.1)&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OTW&amp;quot;|| OpenTTD (extra) base graphics: openttdw.grf (OpenTTD 0.6 - 1.0)&lt;br /&gt;
|-&lt;br /&gt;
|FF FF FF FF|| TTDPatch (extra) base graphics&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Used ranges ====&lt;br /&gt;
&lt;br /&gt;
The following table shows ranges of GRFIDs that are in use by several authors of NewGRFs. People choosing new GRFIDs are asked to not use a GRFID that falls within the ranges of one of the following. This list is in no way exhaustive; if you want to claim your own range, please update the table.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Range (hex)!!ASCII!!Usage&lt;br /&gt;
|-&lt;br /&gt;
|43 41 XX XX||C A _ _||OzTrans; older versions of Canadian and some North American sets&lt;br /&gt;
|-&lt;br /&gt;
|44 44 XX XX||D D _ _||Pikkabird; UKRS, NARS, Av8&lt;br /&gt;
|-&lt;br /&gt;
|4D 65 XX XX||M e _ _||George; ECS, Long vehicles&lt;br /&gt;
|-&lt;br /&gt;
|6D 62 XX XX||m b _ _||Michael Blunck; DBsetXL&lt;br /&gt;
|-&lt;br /&gt;
|97 87 XX XX||? ? _ _||OzTrans; newer versions of Canadian sets&lt;br /&gt;
|-&lt;br /&gt;
|FF XX XX XX||? _ _ _||System reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Used GRFIDs ====&lt;br /&gt;
&lt;br /&gt;
There are several places that have/show lists of GRFIDs that are definitely in use by someone. Absence of a GRFID in any of these lists is not proof that it is not used though.&lt;br /&gt;
&lt;br /&gt;
* [http://bananas.openttd.org/en/newgrf/] Bananas shows the GRFIDs of all currently active NewGRFs that are distributed by the system&lt;br /&gt;
* [http://grfcrawler.tt-forums.net/index.php?do=search&amp;amp;mode=advanced] GRFCrawler allows one to search on GRFIDs of NewGRFs in its system&lt;br /&gt;
* [http://devs.openttd.org/~rubidium/newgrf.html] OpenTTD generates a list that shows all NewGRFs that were ever used in a multiplayer game&lt;br /&gt;
&lt;br /&gt;
=== Name ===&lt;br /&gt;
This short field should contain the name of the set. See [[GRFActionsDetailed#Strings|GRFActionsDetailed]] for instructions to generate the necessary byte codes, and for restrictions on what characters you may use.&lt;br /&gt;
The name must be short because it should fit on one line of the [[GRFStatusWindow|GRF Status window]].&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
This is a longer description of the set. Typically it contains the name of the author and a copyright notice or other attribution. See [[GRFActionsDetailed#Strings|GRFActionsDetailed]] for instructions to generate the necessary byte codes, and for restrictions on what characters you may use.&lt;br /&gt;
The description may be quite long, but should be short enough to fit in the description part of the [[GRFStatusWindow|GRF Status window]], or a part of it may be cut off.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Below is an example of what a real Action 8 pseudo-sprite could look like.&lt;br /&gt;
&lt;br /&gt;
 1 * 43 &#039;&#039;&#039;08&#039;&#039;&#039; 07 &amp;quot;TW&amp;quot; 01 06 &amp;quot;Tutorial Example&amp;quot; 00 &amp;quot;Changes nothing. Author: A kind person&amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
Let&#039;s clarify it bit by bit. In order to understand what the bits say you could use a hexadecimal editor.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Byte&#039;&#039;&#039;!!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||&amp;lt;sprite-number&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|43||&amp;lt;length&amp;gt; of the action in bytes; start counting at 08 (&amp;lt;action&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|08||&amp;lt;action&amp;gt;: sets this pseudo-sprite to function as action 8&lt;br /&gt;
|-&lt;br /&gt;
|07||&amp;lt;version&amp;gt;: GRF format version 7 (this is the version of the used GRF format, not of your GRF)&lt;br /&gt;
|-&lt;br /&gt;
|54 57 01 06||&amp;lt;-grf-id&amp;gt;: ASCII code for TW, then the numbers 1 and 6 to indicate version 6 of TW&#039;s first set&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;Tutorial...&amp;quot; 00||&amp;lt;name&amp;gt;: Name of the NewGRF&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;Changes...&amp;quot; 00||&amp;lt;description&amp;gt;: Description of the NewGRF&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action8&amp;diff=3514</id>
		<title>Action8</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action8&amp;diff=3514"/>
		<updated>2014-06-23T17:36:59Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: Add several known ranges of GRFIDs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
Define GRFID, Name and Description&lt;br /&gt;
&lt;br /&gt;
There are many new graphic sets available to TTD players. Of course, we need to make sure that we never get sets mixed up. To make sure this will never happen you can set an ID. Another useful feature of Action 8 is the ability to include useful information into the final .grf file. Here, we explain how Action 8 works.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
Like all other pseudo-sprites, Action 8 consists of hexadecimal bits. There is no limitation in the total amount of hexadecimal bits you can use in Action 8. One term does have a limit though. Let&#039;s give an example of what an Action 8 line looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;sprite-number&amp;gt; * &amp;lt;length&amp;gt; 08 &amp;lt;version&amp;gt; &amp;lt;grf-id&amp;gt; &amp;lt;name&amp;gt; &amp;lt;description&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a short overview of what every term means:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Element&#039;&#039;&#039;!![[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]!!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;sprite-number&amp;gt;||dec||A sequential sprite number&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;length&amp;gt;||dec||The total number of bytes in the action&lt;br /&gt;
|-&lt;br /&gt;
|08||B||Action 08&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;version&amp;gt;||B||GRF version&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;grf-id&amp;gt;||4*B||A unique ID for your .grf file&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;name&amp;gt;||S||A short text containing the name of this set&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;description&amp;gt;||S||A longer description of this set&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Sprite-number ===&lt;br /&gt;
&lt;br /&gt;
The number of this sprite.&lt;br /&gt;
&lt;br /&gt;
Action 8 has to be one of the first pseudosprites in the .NFO file. It is however valid to have other actions before it, except those that define new sprites or vehicle (etc.) properties.&lt;br /&gt;
&lt;br /&gt;
Actions 6, 7, 9, B, C, D (except [[GRFResourceManagement|resource management]] sprites), 10 and 14 are valid before an action 8.&lt;br /&gt;
&lt;br /&gt;
=== Length ===&lt;br /&gt;
&lt;br /&gt;
The total number of bytes in Action 8.&lt;br /&gt;
&lt;br /&gt;
=== GRF Version ===&lt;br /&gt;
&lt;br /&gt;
This should be the graphics version that your file is written for. This is the version of the [[Version_numbers#GRF_version|GRF format]], not the [[Version_numbers#Version_of_a_specific_NewGRF|version of your GRF]]!&lt;br /&gt;
It is also not the &amp;quot;[[Version_numbers#NFO_version|NFO version]]&amp;quot; you put at the top of &amp;quot;.nfo&amp;quot; files to announce the used syntax for GRFCodec.&lt;br /&gt;
&lt;br /&gt;
Valid values are:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;!!&#039;&#039;&#039;Compatibility&#039;&#039;&#039;!!&#039;&#039;&#039;[[Version_numbers#TTDPatch_version|TTDPatch version]]&#039;&#039;&#039;!!&#039;&#039;&#039;[[Version_numbers#OpenTTD_version|OpenTTD support]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|08||02..08|| - || {{ottd|1.2|r23159}}&lt;br /&gt;
|-&lt;br /&gt;
|07||02..07||2.5 beta 1 or higher|| {{ottd|0.6}}&lt;br /&gt;
|-&lt;br /&gt;
|06||02..06||2.0.1 alpha 13 or higher|| {{ottd|0.6}}&lt;br /&gt;
|-&lt;br /&gt;
|05||02..05||2.0r1 Stable TTDPatch + TTDPatch 2.0.1 alphas up to 12|| {{ottd|0.6}}&lt;br /&gt;
|-&lt;br /&gt;
|04||02..04||2.0 Stable TTDPatch||{{ottd|0.6}}&lt;br /&gt;
|-&lt;br /&gt;
|01||00..01||1.9.1 alpha 28 or higher||{{ottd|no}}&lt;br /&gt;
|-&lt;br /&gt;
|00||00||1.9.1 alphas up to 27||{{ottd|no}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Entries for 00 and 01 are included only for completeness, and to aid with updating existing graphics. They should not be used with new graphics, because they will be incompatible with current TTDPatch and OpenTTD versions. OpenTTD 1.1.0 and later will disable NewGRFs with non-supported GRF versions.&lt;br /&gt;
&lt;br /&gt;
Make sure to set a version number no lower than the minimum version that supports all features which are used by your file.&lt;br /&gt;
&lt;br /&gt;
The compatibility column means how low a version number is supported by the given TTDPatch version, e.g. TTDPatch 2.0r1 supports graphics files with any version from 02 to 05, but not for example 01 or 06.&lt;br /&gt;
&lt;br /&gt;
Version 07 and 08 introduce a few minor semantic changes to some graphics features, i.e. the file will behave slightly differently depending on whether it&#039;s declared as version 06, 07 or 08. These changes are described in more detail in the pages for the features they affect.&lt;br /&gt;
&lt;br /&gt;
=== GRFID ===&lt;br /&gt;
&lt;br /&gt;
This is a series of 4 bytes. It&#039;s a convention to use the first two bytes for the creator&#039;s initials in ASCII code, e.g. 54 57 for &amp;quot;TW&amp;quot;. The last two bytes should be numbers, typically the first number identifying which of the author&#039;s sets this is, and the second number being a version number. See the next subsection for ranges that are already in use.&lt;br /&gt;
&lt;br /&gt;
In principle, you are free what to use for the GRFID as long as you are sure it is unique, but generally it is best to follow the above guidelines. See the last subsection for locations where to find already used GRFIDs.&lt;br /&gt;
&lt;br /&gt;
Note that GRFIDs starting with FF (i.e. the first byte is FF, such as in FF123456) are reserved for internal purposes and should not be used by regular .grf files. These GRFs can&#039;t be disabled; TTDPatch displays them with a blue flag in the GRF Status Window.&lt;br /&gt;
&lt;br /&gt;
The extra newgrf file, part of OpenTTD base sets, have to have a GRFID starting with FF &amp;quot;OT&amp;quot;.&lt;br /&gt;
See the table below:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!GRFID!!purposes&lt;br /&gt;
|-&lt;br /&gt;
|00 00 00 00||n/a&lt;br /&gt;
|-&lt;br /&gt;
|00 00 00 01 .. FE FF FF FF||normal NewGRFs&lt;br /&gt;
|-&lt;br /&gt;
|FF 00 00 00 .. FF FF FF FF||reserved&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OT&amp;quot; 00 .. FF &amp;quot;OT&amp;quot; FF||extra base GRFs&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OT&amp;quot; 01|| OpenGFX&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OTD&amp;quot;|| OpenTTD (extra) base graphics: openttdd.grf (OpenTTD 0.6 - 1.0)&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OTT&amp;quot;|| OpenTTD (extra) base graphics: openttd.grf (OpenTTD &amp;gt;= 1.1)&lt;br /&gt;
|-&lt;br /&gt;
|FF &amp;quot;OTW&amp;quot;|| OpenTTD (extra) base graphics: openttdw.grf (OpenTTD 0.6 - 1.0)&lt;br /&gt;
|-&lt;br /&gt;
|FF FF FF FF|| TTDPatch (extra) base graphics&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Used ranges ====&lt;br /&gt;
&lt;br /&gt;
The following table shows ranges of GRFIDs that are in use by several authors of NewGRFs. People choosing new GRFIDs are asked to not use a GRFID that falls within the ranges of one of the following. This list is in no way exhaustive; if you want to claim your own range, please update the table.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Range (hex)!!ASCII!!Usage&lt;br /&gt;
|-&lt;br /&gt;
|43 41 XX XX||C A _ _||OzTrans; older versions of Canadian and some North American sets&lt;br /&gt;
|-&lt;br /&gt;
|44 44 XX XX||D D _ _||Pikkabird; UKRS, NARS, Av8&lt;br /&gt;
|-&lt;br /&gt;
|4D 65 XX XX||M e _ _||George; ECS, Long vehicles&lt;br /&gt;
|-&lt;br /&gt;
|6D 62 XX XX||m b _ _||Michael Blunck; DBsetXL&lt;br /&gt;
|-&lt;br /&gt;
|FF XX XX XX||? _ _ _||System reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Used GRFIDs ====&lt;br /&gt;
&lt;br /&gt;
There are several places that have/show lists of GRFIDs that are definitely in use by someone. Absence of a GRFID in any of these lists is not proof that it is not used though.&lt;br /&gt;
&lt;br /&gt;
* [http://bananas.openttd.org/en/newgrf/] Bananas shows the GRFIDs of all currently active NewGRFs that are distributed by the system&lt;br /&gt;
* [http://grfcrawler.tt-forums.net/index.php?do=search&amp;amp;mode=advanced] GRFCrawler allows one to search on GRFIDs of NewGRFs in its system&lt;br /&gt;
* [http://devs.openttd.org/~rubidium/newgrf.html] OpenTTD generates a list that shows all NewGRFs that were ever used in a multiplayer game&lt;br /&gt;
&lt;br /&gt;
=== Name ===&lt;br /&gt;
This short field should contain the name of the set. See [[GRFActionsDetailed#Strings|GRFActionsDetailed]] for instructions to generate the necessary byte codes, and for restrictions on what characters you may use.&lt;br /&gt;
The name must be short because it should fit on one line of the [[GRFStatusWindow|GRF Status window]].&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
This is a longer description of the set. Typically it contains the name of the author and a copyright notice or other attribution. See [[GRFActionsDetailed#Strings|GRFActionsDetailed]] for instructions to generate the necessary byte codes, and for restrictions on what characters you may use.&lt;br /&gt;
The description may be quite long, but should be short enough to fit in the description part of the [[GRFStatusWindow|GRF Status window]], or a part of it may be cut off.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Below is an example of what a real Action 8 pseudo-sprite could look like.&lt;br /&gt;
&lt;br /&gt;
 1 * 43 &#039;&#039;&#039;08&#039;&#039;&#039; 07 &amp;quot;TW&amp;quot; 01 06 &amp;quot;Tutorial Example&amp;quot; 00 &amp;quot;Changes nothing. Author: A kind person&amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
Let&#039;s clarify it bit by bit. In order to understand what the bits say you could use a hexadecimal editor.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Byte&#039;&#039;&#039;!!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1||&amp;lt;sprite-number&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|43||&amp;lt;length&amp;gt; of the action in bytes; start counting at 08 (&amp;lt;action&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|08||&amp;lt;action&amp;gt;: sets this pseudo-sprite to function as action 8&lt;br /&gt;
|-&lt;br /&gt;
|07||&amp;lt;version&amp;gt;: GRF format version 7 (this is the version of the used GRF format, not of your GRF)&lt;br /&gt;
|-&lt;br /&gt;
|54 57 01 06||&amp;lt;-grf-id&amp;gt;: ASCII code for TW, then the numbers 1 and 6 to indicate version 6 of TW&#039;s first set&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;Tutorial...&amp;quot; 00||&amp;lt;name&amp;gt;: Name of the NewGRF&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;Changes...&amp;quot; 00||&amp;lt;description&amp;gt;: Description of the NewGRF&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Language_files&amp;diff=3434</id>
		<title>NML:Language files</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Language_files&amp;diff=3434"/>
		<updated>2013-09-07T11:05:32Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: Semicolon -&amp;gt; colon&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavNoSubpages}}&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Language files are usually found in the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;lang&amp;lt;/code&amp;gt; sub-folder of the project, but the place NML looks for the language files can be changed via command line parameter to any directory desired:&lt;br /&gt;
&lt;br /&gt;
 nmlc -l path/to/lang-dir path/to/nml-source-file.nml&lt;br /&gt;
 nmlc --lang-dir=path/to/lang-dir path/to/nml-source-file.nml&lt;br /&gt;
&lt;br /&gt;
Language files MUST have the extension &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;.lng&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt; The language files themselves follow a certain structure:&lt;br /&gt;
&lt;br /&gt;
 ##grflangid &amp;amp;lt;number&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;string-name&amp;amp;gt;                                                   :&amp;amp;lt;text&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;string-name&amp;amp;gt;                                                   :&amp;amp;lt;text&amp;amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
where the first line must give the language code for the language this file describes (see below). The following lines each describe a string. The translated string follows immediately the colon. An NML project has exactly one fallback language, by default this is english.lng. You can change this with the command line parameter --default-lang. Example for a valid language file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=example&amp;gt;&lt;br /&gt;
 ##grflangid 0x01&lt;br /&gt;
 STR_GRF_NAME                                                    :{TITLE} 0.1.0 - {VERSION}&lt;br /&gt;
 STR_GRF_DESCRIPTION                                             :{TITLE} contains pimped ground tiles.&lt;br /&gt;
 STR_NAME_MYVEHICLE                                              :General Robotics Anti-Grav UFO Mark X&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== String codes ==&lt;br /&gt;
&lt;br /&gt;
Strings may contain a number of special string codes which control how the string is being printed or which values to insert into the string. Custom replacements can be stored in the plain text file &amp;lt;code&amp;gt;custom_tags.txt&amp;lt;/code&amp;gt; (for example a newgrf version which is written by your build script). In the case above the &amp;lt;code&amp;gt;custom_tags.txt&amp;lt;/code&amp;gt; could, for example read&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=example&amp;gt;&lt;br /&gt;
 VERSION  :alpha-r88&lt;br /&gt;
 TITLE    :Example NewGRF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally to custom-defined tags, NML comes with a number of default tags:&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;150pt&amp;quot;|Tag&lt;br /&gt;
!width=&amp;quot;600pt&amp;quot;|Meaning&lt;br /&gt;
!Example&lt;br /&gt;
|-&lt;br /&gt;
|              ||empty tag, written as {} is used to create a newline&lt;br /&gt;
|-&lt;br /&gt;
|NBSP          || non-breaking space&lt;br /&gt;
|-&lt;br /&gt;
|{             || Display a left curly bracket. You write this as {{}. If you&#039;d include it without surrounding it by { and } it&#039;d be seen as the start of a tag and the rest of the string would be read as name of the tag.&lt;br /&gt;
|-&lt;br /&gt;
|COPYRIGHT     || copyright symbol            || ©&lt;br /&gt;
|-&lt;br /&gt;
|TRAIN         || display train symbol&lt;br /&gt;
|-&lt;br /&gt;
|LORRY         || display lorry symbol&lt;br /&gt;
|-&lt;br /&gt;
|BUS           || display bus symbol&lt;br /&gt;
|-&lt;br /&gt;
|PLANE         || display plane symbol&lt;br /&gt;
|-&lt;br /&gt;
|SHIP          || display ship symbol&lt;br /&gt;
|-&lt;br /&gt;
|TINYFONT      || switch to small font&lt;br /&gt;
|-&lt;br /&gt;
|BIGFONT       || switch to big font&lt;br /&gt;
|-&lt;br /&gt;
|BLUE          || switch to blue text&lt;br /&gt;
|-&lt;br /&gt;
|SILVER        || switch to silver text&lt;br /&gt;
|-&lt;br /&gt;
|GOLD          || switch to golden text&lt;br /&gt;
|-&lt;br /&gt;
|RED           || switch to red text&lt;br /&gt;
|-&lt;br /&gt;
|PURPLE        || switch to purple text&lt;br /&gt;
|-&lt;br /&gt;
|LTBROWN       || switch to light brown text&lt;br /&gt;
|-&lt;br /&gt;
|ORANGE        || switch to orange text&lt;br /&gt;
|-&lt;br /&gt;
|GREEN         || switch to green text&lt;br /&gt;
|-&lt;br /&gt;
|YELLOW        || switch to yellow text&lt;br /&gt;
|-&lt;br /&gt;
|DKGREEN       || switch to dark green text&lt;br /&gt;
|-&lt;br /&gt;
|CREAM         || switch to cream-coloured text&lt;br /&gt;
|-&lt;br /&gt;
|BROWN         || switch to brown text&lt;br /&gt;
|-&lt;br /&gt;
|WHITE         || switch to white text&lt;br /&gt;
|-&lt;br /&gt;
|LTBLUE        || switch to light blue text&lt;br /&gt;
|-&lt;br /&gt;
|GRAY          || switch to gray text&lt;br /&gt;
|-&lt;br /&gt;
|DKBLUE        || switch to dark blue text&lt;br /&gt;
|-&lt;br /&gt;
|BLACK         || switch to black text&lt;br /&gt;
|}&lt;br /&gt;
== String parameters ==&lt;br /&gt;
The above tags can be used in almost all strings. There are also a number of tags that need an argument they&#039;ll read from the textstack. The textstack is only available for certain callbacks an properties.&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;150pt&amp;quot;|Tag&lt;br /&gt;
!width=&amp;quot;600pt&amp;quot;|Meaning&lt;br /&gt;
!Size (number of bytes read from stack)&lt;br /&gt;
!Example&lt;br /&gt;
|-&lt;br /&gt;
|COMMA         || signed number with decimal separator between 1000&#039;s.   || 4&lt;br /&gt;
|-&lt;br /&gt;
|SIGNED_WORD   || signed number with decimal separator between 1000&#039;s.   || 2&lt;br /&gt;
|-&lt;br /&gt;
|UNSIGNED_WORD || unsigned number with decimal separator between 1000&#039;s. || 2&lt;br /&gt;
|-&lt;br /&gt;
|CURRENCY      || money in proper currency units                         || 4 || 24,492 €&lt;br /&gt;
|-&lt;br /&gt;
|VELOCITY      || velocity in proper units                               || 2 || 35 km/h&lt;br /&gt;
|-&lt;br /&gt;
|VOLUME        || volume in proper units                                 || 2 || 29,000 litres&lt;br /&gt;
|-&lt;br /&gt;
|VOLUME_SHORT  || volume in proper units in short form                   || 2 || 29,000l&lt;br /&gt;
|-&lt;br /&gt;
|POWER         || power in proper units                                  || 2 || 2,030 kW&lt;br /&gt;
|-&lt;br /&gt;
|WEIGHT        || weight in proper units                                 || 2 || 5 tonnes&lt;br /&gt;
|-&lt;br /&gt;
|WEIGHT_SHORT  || weight in proper units in short form                   || 2 || 5t&lt;br /&gt;
|-&lt;br /&gt;
|HEX           || hexadecimal presentation                               || 4 || F0 3D D4 33&lt;br /&gt;
|-&lt;br /&gt;
|STRING        || include other string                                   || 2&lt;br /&gt;
|-&lt;br /&gt;
|DATE1920_LONG || days since 1920 as long date                           || 2 || 12 August 1935&lt;br /&gt;
|-&lt;br /&gt;
|DATE1920_SHORT|| days since 1920 as short date                          || 2 || 12 Aug 1935&lt;br /&gt;
|-&lt;br /&gt;
|DATE_LONG     || days since 0 as long date                              || 4 || 12 August 1610&lt;br /&gt;
|-&lt;br /&gt;
|DATE_SHORT    || days since 0 as short date                             || 4 || 12 Aug 3049&lt;br /&gt;
|-&lt;br /&gt;
|POP_WORD      || Remove 2 bytes from the top of the stack               || 2&lt;br /&gt;
|-&lt;br /&gt;
|STATION       || Station name of station with given ID                  || 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In case you don&#039;t want to use the first 2 (or 4) bytes from the stack but rather another variable, you can prefix the tag name with the number, like {1:COMMA} to use the second (indexing starts at 0) argument from the stack. You can also use this in translations that require a different order, for example (in english.lng):&lt;br /&gt;
&lt;br /&gt;
 STR_SOME_STRING    :{COMMA} items cost {CURRENCY}&lt;br /&gt;
&lt;br /&gt;
And the same string in dutch.lng:&lt;br /&gt;
&lt;br /&gt;
 STR_SOME_STRING    :{1:CURRENCY} is de prijs van {0:COMMA} items.&lt;br /&gt;
&lt;br /&gt;
The string parameters itself are assigned in units of dwords (4 bytes), starting with temporary storage 256, up to 259 or 261. Thus if you use parameters which are not of dword size (e.g. strings or word-sized numbers), you have to construct the text stack via bit arithmetic:&lt;br /&gt;
&amp;lt;pre class=example&amp;gt;&lt;br /&gt;
switch(FEAT_INDUSTRIES, SELF, extra_text_switch, [&lt;br /&gt;
			STORE_TEMP(&lt;br /&gt;
				(    (LOAD_PERM(var_supply_efficiency_factor) == 1) * string(STR_EXTRA_PRIMARY_EFFICIENT1)    ) +&lt;br /&gt;
				(    (LOAD_PERM(var_supply_efficiency_factor) == 2) * string(STR_EXTRA_PRIMARY_EFFICIENT2)    ) +&lt;br /&gt;
				(    (LOAD_PERM(var_supply_efficiency_factor) == 3) * string(STR_EXTRA_PRIMARY_EFFICIENT3)    ) +&lt;br /&gt;
				(    (LOAD_PERM(var_supply_efficiency_factor) == 4) * string(STR_EXTRA_PRIMARY_EFFICIENT4)    ) |&lt;br /&gt;
				LOAD_PERM(var_supply_requirement) &amp;lt;&amp;lt; 16,&lt;br /&gt;
				256&lt;br /&gt;
			),&lt;br /&gt;
	return string(STR_EXTRA_PRIMARY);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for a language file which reads&lt;br /&gt;
&amp;lt;pre class=example&amp;gt;&lt;br /&gt;
STR_EXTRA_PRIMARY_EFFICIENT1 :{YELLOW}very efficient{BLACK}ly&lt;br /&gt;
STR_EXTRA_PRIMARY_EFFICIENT2 :{YELLOW}efficient{BLACK}ly&lt;br /&gt;
STR_EXTRA_PRIMARY_EFFICIENT3 :in a {YELLOW}normal{BLACK} way&lt;br /&gt;
STR_EXTRA_PRIMARY_EFFICIENT4 :{YELLOW}wasteful{BLACK}ly&lt;br /&gt;
STR_EXTRA_PRIMARY            :{BLACK}This industry needs {YELLOW}supplies{BLACK}.{}They use them {STRING}{}{}Monthly demand: {YELLOW}{UNSIGNED_WORD} crate{P &amp;quot;&amp;quot; s} of engineering supplies{BLACK}.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Defining cases ==&lt;br /&gt;
Similar to OpenTTD&#039;s language files, NML can also make use of cases, genders and plural forms. In order to utilize them, they have to be defined in the language file&#039;s header and have to match the definition as used in OpenTTD&#039;s language files:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
##case pragma&lt;br /&gt;
&lt;br /&gt;
STR_NAME                                     :Utas&lt;br /&gt;
STR_NAME.pragma                              :utast&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
e.g. for Hungarian you&#039;d have&lt;br /&gt;
&amp;lt;pre class=example&amp;gt;&lt;br /&gt;
##case t ba&lt;br /&gt;
&lt;br /&gt;
STR_CARGO_PLURAL_PASSENGERS                  :Utas&lt;br /&gt;
STR_CARGO_PLURAL_PASSENGERS.t                :utast&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In case the name of a case changes in the OpenTTD language file, your language file will have to follow that change. To keep compatible with older OpenTTD versions you can use the ##map_case pragma, like this:&lt;br /&gt;
&amp;lt;pre class=example&amp;gt;##map_case t t_old&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Defining genders ==&lt;br /&gt;
Genders just like cases are defined in the header of the language file and have to match the definition as found within OpenTTD&#039;s language files. The gender of a word or expression is declared within the string&#039;s text itself by a tag of the form &amp;lt;code&amp;gt;{G=gendername}&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
##gender pragma&lt;br /&gt;
&lt;br /&gt;
STR_NAME                                      :{G=gendername}String which requires gender &#039;gendername&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
where the string with the defined gender then will trigger the correct usage in a string which includes it and which has to take provisions to show the proper gender:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
STR_OTHER                                     :Some text {G gender1 gender2 ...} {STRING}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
for example in German&lt;br /&gt;
&amp;lt;pre class=example&amp;gt;&lt;br /&gt;
##gender m w n p&lt;br /&gt;
&lt;br /&gt;
STR_CARGO_NAME_BAUXITE                        :{G=n}Bauxit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
which then will be used with the correct gender by a string which includes it:&lt;br /&gt;
&amp;lt;pre class=example&amp;gt;&lt;br /&gt;
STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO                        :{WHITE}{STATION} akzeptiert kein{G &amp;quot;en&amp;quot; &amp;quot;e&amp;quot; &amp;quot;&amp;quot; &amp;quot;e&amp;quot;} {STRING} mehr.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In case the name of a gender changes in the OpenTTD language file, your language file will have to follow that change. To keep compatible with older OpenTTD versions you can use the ##map_gender pragma, like this:&lt;br /&gt;
&amp;lt;pre class=example&amp;gt;##gender m f&lt;br /&gt;
##map_gender m male&lt;br /&gt;
##map_gender f female&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== LanguageIDs ==&lt;br /&gt;
&lt;br /&gt;
Valid language IDs are listed in the table below. The cases, genders and the type of plural form is only given as reference. Authorative are the definitions in OpenTTD&#039;s language file for each language.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! ID&lt;br /&gt;
! language&lt;br /&gt;
! cases&lt;br /&gt;
! genders&lt;br /&gt;
! plurals&lt;br /&gt;
|-&lt;br /&gt;
| 00&lt;br /&gt;
| English (US)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 01&lt;br /&gt;
| English (GB)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 02&lt;br /&gt;
| German&lt;br /&gt;
|&lt;br /&gt;
| m w n p&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 03&lt;br /&gt;
| French&lt;br /&gt;
|&lt;br /&gt;
| m m2 f&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| 04&lt;br /&gt;
| Spanish&lt;br /&gt;
|&lt;br /&gt;
| m f&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 05&lt;br /&gt;
| Esperanto&lt;br /&gt;
|&lt;br /&gt;
| n&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 06&lt;br /&gt;
| Ido&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 07&lt;br /&gt;
| Russian&lt;br /&gt;
| m f n p nom gen dat acc abl pre&lt;br /&gt;
| m f n p&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| 08&lt;br /&gt;
| Irish&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| 09&lt;br /&gt;
| Maltese&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 12&lt;br /&gt;
|-&lt;br /&gt;
| 0A&lt;br /&gt;
| Tamil&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0B&lt;br /&gt;
| Chuvash&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0C&lt;br /&gt;
| Chinese (Traditional)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 0D&lt;br /&gt;
| Serbian&lt;br /&gt;
| nom big gen dat aku vok lok ins&lt;br /&gt;
| muški ženski srednji&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| 0E&lt;br /&gt;
| Norwegian (Nynorsk)&lt;br /&gt;
| small&lt;br /&gt;
| masculine feminine neuter&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0F&lt;br /&gt;
| Welsh&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Belarusian&lt;br /&gt;
| m f n p nom gen dat acc abl pre&lt;br /&gt;
| m f n p&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Marathi&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| Faroese&lt;br /&gt;
|&lt;br /&gt;
| m f n&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| Arabic (Egypt)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| Czech&lt;br /&gt;
| nom gen dat acc voc loc ins big small&lt;br /&gt;
| m f n map mnp fp np&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| Slovak&lt;br /&gt;
| g&lt;br /&gt;
| m z s&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| 18&lt;br /&gt;
| Bulgarian&lt;br /&gt;
| m f n p&lt;br /&gt;
| m f n p&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 1B&lt;br /&gt;
| Afrikaans&lt;br /&gt;
|&lt;br /&gt;
| male&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 1E&lt;br /&gt;
| Greek&lt;br /&gt;
| subs date geniki&lt;br /&gt;
| m f n&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| 1F&lt;br /&gt;
| Dutch&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 21&lt;br /&gt;
| Basque&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 22&lt;br /&gt;
| Catalan&lt;br /&gt;
|&lt;br /&gt;
| Masculin Femenin&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 23&lt;br /&gt;
| Luxembourgish&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 24&lt;br /&gt;
| Hungarian&lt;br /&gt;
| t ba&lt;br /&gt;
|&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| 26&lt;br /&gt;
| Macedonian&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 27&lt;br /&gt;
| Italian&lt;br /&gt;
| ms mp fs fp&lt;br /&gt;
| m ma f&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 28&lt;br /&gt;
| Romanian&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 29&lt;br /&gt;
| Icelandic&lt;br /&gt;
|&lt;br /&gt;
| karlkyn kvenkyn hvorugkyn&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2A&lt;br /&gt;
| Latvian&lt;br /&gt;
| kas&lt;br /&gt;
| m f&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| 2B&lt;br /&gt;
| Lithuanian&lt;br /&gt;
| kas ko kam ka kuo kur kreip&lt;br /&gt;
| vyr mot&lt;br /&gt;
| 5&lt;br /&gt;
|-&lt;br /&gt;
| 2C&lt;br /&gt;
| Slovenian&lt;br /&gt;
| r d t&lt;br /&gt;
|&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| 2D&lt;br /&gt;
| Danish&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2E&lt;br /&gt;
| Swedish&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2F&lt;br /&gt;
| Norwegian (Bokmal)&lt;br /&gt;
| small&lt;br /&gt;
| masculine feminine neuter&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 30&lt;br /&gt;
| Polish&lt;br /&gt;
| d c b n m w&lt;br /&gt;
| m f n&lt;br /&gt;
| 7&lt;br /&gt;
|-&lt;br /&gt;
| 31&lt;br /&gt;
| Galician&lt;br /&gt;
|&lt;br /&gt;
| m f n&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| Frisian&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 33&lt;br /&gt;
| Ukrainian&lt;br /&gt;
| r d z&lt;br /&gt;
| m f s mn&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| 34&lt;br /&gt;
| Estonian&lt;br /&gt;
| g in sü&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 35&lt;br /&gt;
| Finnish&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 36&lt;br /&gt;
| Portuguese&lt;br /&gt;
|&lt;br /&gt;
| n m f mp fp&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 37&lt;br /&gt;
| Brazilian Portuguese&lt;br /&gt;
|&lt;br /&gt;
| m f&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| 38&lt;br /&gt;
| Croatian&lt;br /&gt;
| nom gen dat aku vok lok ins&lt;br /&gt;
| male female middle&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| 39&lt;br /&gt;
| Japanese&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 3A&lt;br /&gt;
| Korean&lt;br /&gt;
|&lt;br /&gt;
| m f&lt;br /&gt;
| 11&lt;br /&gt;
|-&lt;br /&gt;
| 3C&lt;br /&gt;
| Malay&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3D&lt;br /&gt;
| English (AU)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3E&lt;br /&gt;
| Turkish&lt;br /&gt;
| tamlanan&lt;br /&gt;
|&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 42&lt;br /&gt;
| Thai&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 54&lt;br /&gt;
| Vietnamese&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 56&lt;br /&gt;
| Chinese (Simplified)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 5A&lt;br /&gt;
| Indonesian&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 5C&lt;br /&gt;
| Urdu&lt;br /&gt;
|&lt;br /&gt;
| m f&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 61&lt;br /&gt;
| Hebrew&lt;br /&gt;
| singular plural gen&lt;br /&gt;
| m f&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 62&lt;br /&gt;
| Persian&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In case a language is not in this list, check the [[Action4#language IDs|master language list]] (for GRFv7) in the NewGRF Specs. This master list is always leading. NFO language ID 7F has no meaning in NML (set --default-lang instead) and setting bit 8 will break your language file.&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action4&amp;diff=3367</id>
		<title>Action4</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action4&amp;diff=3367"/>
		<updated>2013-04-23T15:40:33Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: /* language IDs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Define strings, e.g vehicle, house or industry names&lt;br /&gt;
&lt;br /&gt;
When making new vehicle graphics, you also need to name the new vehicles, or they&#039;ll show up with their original name from TTD.&lt;br /&gt;
However, custom vehicle names assigned by the player in-game (or for TTDPatch also via TTD&#039;s vehicle.dat) will always take precendence.&lt;br /&gt;
&lt;br /&gt;
In TTDPatch you can also use this action to change most of TTD&#039;s text strings.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
The data looks as follows:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; &#039;&#039;&#039;04&#039;&#039;&#039; &amp;amp;lt;feature&amp;amp;gt; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;lt;num-ent&amp;amp;gt; &amp;amp;lt;offset&amp;amp;gt; &amp;amp;lt;text&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Element!![[GRFActionsDetailed|Size]]!!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;Sprite-number&amp;amp;gt;||dec||A sequential sprite number&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;length&amp;amp;gt;||dec||The total number of bytes used in this action.&lt;br /&gt;
|-&lt;br /&gt;
|04||B||Defines action 04&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;feature&amp;amp;gt;||B||For what type of vehicle/station should this definition be used?&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;language-id&amp;amp;gt;||B||Which of TTD&#039;s languages this name is for&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;num-ent&amp;amp;gt;||B||Number of consecutive strings to change&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;offset&amp;amp;gt;||B/W||First ID to change&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;text&amp;amp;gt;||S||New text strings&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Whether &amp;amp;lt;offset&amp;amp;gt; is a &#039;&#039;&#039;BYTE&#039;&#039;&#039; (extended byte in openttd for vehicles) or a &#039;&#039;&#039;WORD&#039;&#039;&#039; is decided by bit 7 of &amp;amp;lt;language-id&amp;amp;gt;, see below.&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Sprite-number ===&lt;br /&gt;
&lt;br /&gt;
This is just the number you are at.&lt;br /&gt;
&lt;br /&gt;
=== Length ===&lt;br /&gt;
&lt;br /&gt;
Count the number of bytes in this action.&lt;br /&gt;
&lt;br /&gt;
=== Feature ===&lt;br /&gt;
&lt;br /&gt;
This sets the type of [[Features|feature]] that you wish to change. Set it to:&lt;br /&gt;
&lt;br /&gt;
{|- |&lt;br /&gt;
!Value!![[Features|Feature]]&lt;br /&gt;
|-&lt;br /&gt;
|00||Trains&lt;br /&gt;
|-&lt;br /&gt;
|01||Road Vehicles&lt;br /&gt;
|-&lt;br /&gt;
|02||Ships&lt;br /&gt;
|-&lt;br /&gt;
|03||Aircraft&lt;br /&gt;
|-&lt;br /&gt;
|04||Stations&lt;br /&gt;
|-&lt;br /&gt;
|07||Houses&lt;br /&gt;
|-&lt;br /&gt;
|0A||Industries&lt;br /&gt;
|-&lt;br /&gt;
|0B||Cargos&lt;br /&gt;
|-&lt;br /&gt;
|0D||Airports&lt;br /&gt;
|-&lt;br /&gt;
|0F||Objects&lt;br /&gt;
|-&lt;br /&gt;
|10||Railtypes&lt;br /&gt;
|-&lt;br /&gt;
|48||Original strings; see [[TextIDs]] for a list of TTD&#039;s text IDs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== language IDs ===&lt;br /&gt;
The meaning of this byte depends on the GRF version of the .grf file as set in [[Action8#version|action 8]].&lt;br /&gt;
&lt;br /&gt;
{{grfTill|6}} Up to version 6, this is a bit mask of the following bits:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||01||American or &amp;quot;other&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|1||02||English&lt;br /&gt;
|-&lt;br /&gt;
|2||04||German&lt;br /&gt;
|-&lt;br /&gt;
|3||08||French&lt;br /&gt;
|-&lt;br /&gt;
|4||10||Spanish&lt;br /&gt;
|-&lt;br /&gt;
|7||80||Flag for 16 bit string IDs&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Add the bits of all languages for which the following strings apply. Bit 7 controls, whether the following string ID consists of 16 or 8 bit. Unknown languages will use the American strings as fallback. Otherwise the string would remain undefined for these languages. To actually define strings for any new language, you must use grf version 7.&lt;br /&gt;
&lt;br /&gt;
{{grfFrom|7}} For version 7 and higher, it is a simple language ID from the list below. (This has changed with TTDPatch 2.5 beta 4). Bit 7 has the same meaning as in the earlier versions above.&lt;br /&gt;
&lt;br /&gt;
In either scheme, you can use the value 7F or FF, respectively, to define strings shown for languages that you do not provide translation for. First set all strings to a default value using this, and later override the language specific ones if they exist.&lt;br /&gt;
&lt;br /&gt;
Currently, the scheme is to use international phone codes as language IDs, unless they&#039;re out of range, in which case pick a number vaguely related in some way. Or something else.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!ID (hex)!!Language!!Plural form &amp;lt;ref&amp;gt;For a list of plural forms see [[StringCodes]]. As the assignment of plural forms to languages is in fact not as fixed as one might expect, the used plural form is defined by each GRF separately for its strings using [[Action0/Global Settings]] property 15.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|00||American / English (US)||0&lt;br /&gt;
|-&lt;br /&gt;
|01||English / English (UK)||0&lt;br /&gt;
|-&lt;br /&gt;
|02||German||0&lt;br /&gt;
|-&lt;br /&gt;
|03||French||2&lt;br /&gt;
|-&lt;br /&gt;
|04||Spanish||0&lt;br /&gt;
|-&lt;br /&gt;
|05||Esperanto||0&lt;br /&gt;
|-&lt;br /&gt;
|06||Ido||0&lt;br /&gt;
|-&lt;br /&gt;
|07||Russian||6&lt;br /&gt;
|-&lt;br /&gt;
|08||Irish||4&lt;br /&gt;
|-&lt;br /&gt;
|09||Maltese||12&lt;br /&gt;
|-&lt;br /&gt;
|0A||Tamil||0&lt;br /&gt;
|-&lt;br /&gt;
|0B||Chuvash||0&lt;br /&gt;
|-&lt;br /&gt;
|0C||Chinese (Traditional)||1&lt;br /&gt;
|-&lt;br /&gt;
|0D||Serbian||6&lt;br /&gt;
|-&lt;br /&gt;
|0E||Norwegian (Nynorsk)||0&lt;br /&gt;
|-&lt;br /&gt;
|0F||Welsh||0&lt;br /&gt;
|-&lt;br /&gt;
|10||Belarusian||6&lt;br /&gt;
|-&lt;br /&gt;
|11||Marathi||0&lt;br /&gt;
|-&lt;br /&gt;
|12||Faroese||0&lt;br /&gt;
|-&lt;br /&gt;
|13||Scottish Gaelic||13&lt;br /&gt;
|-&lt;br /&gt;
|14||Arabic (Egypt)||1&lt;br /&gt;
|-&lt;br /&gt;
|15||Czech||10&lt;br /&gt;
|-&lt;br /&gt;
|16||Slovak||10&lt;br /&gt;
|-&lt;br /&gt;
|18||Bulgarian||0&lt;br /&gt;
|-&lt;br /&gt;
|1B||Afrikaans||0&lt;br /&gt;
|-&lt;br /&gt;
|1E||Greek||2&lt;br /&gt;
|-&lt;br /&gt;
|1F||Dutch||0&lt;br /&gt;
|-&lt;br /&gt;
|21||Basque||0&lt;br /&gt;
|-&lt;br /&gt;
|22||Catalan||0&lt;br /&gt;
|-&lt;br /&gt;
|23||Luxembourgish||0&lt;br /&gt;
|-&lt;br /&gt;
|24||Hungarian||2&lt;br /&gt;
|-&lt;br /&gt;
|26||Macedonian||0&lt;br /&gt;
|-&lt;br /&gt;
|27||Italian||0&lt;br /&gt;
|-&lt;br /&gt;
|28||Romanian||0&lt;br /&gt;
|-&lt;br /&gt;
|29||Icelandic||0&lt;br /&gt;
|-&lt;br /&gt;
|2A||Latvian||3&lt;br /&gt;
|-&lt;br /&gt;
|2B||Lithuanian||5&lt;br /&gt;
|-&lt;br /&gt;
|2C||Slovenian||8&lt;br /&gt;
|-&lt;br /&gt;
|2D||Danish||0&lt;br /&gt;
|-&lt;br /&gt;
|2E||Swedish||0&lt;br /&gt;
|-&lt;br /&gt;
|2F||Norwegian (Bokmal)||0&lt;br /&gt;
|-&lt;br /&gt;
|30||Polish||7&lt;br /&gt;
|-&lt;br /&gt;
|31||Galician||0&lt;br /&gt;
|-&lt;br /&gt;
|32||Frisian||0&lt;br /&gt;
|-&lt;br /&gt;
|33||Ukrainian||6&lt;br /&gt;
|-&lt;br /&gt;
|34||Estonian||0&lt;br /&gt;
|-&lt;br /&gt;
|35||Finnish||0&lt;br /&gt;
|-&lt;br /&gt;
|36||Portuguese||0&lt;br /&gt;
|-&lt;br /&gt;
|37||Brazilian Portuguese||2&lt;br /&gt;
|-&lt;br /&gt;
|38||Croatian||6&lt;br /&gt;
|-&lt;br /&gt;
|39||Japanese||1&lt;br /&gt;
|-&lt;br /&gt;
|3A||Korean||11&lt;br /&gt;
|-&lt;br /&gt;
|3C||Malay||0&lt;br /&gt;
|-&lt;br /&gt;
|3D||Australian / English (AU)||0&lt;br /&gt;
|-&lt;br /&gt;
|3E||Turkish||1&lt;br /&gt;
|-&lt;br /&gt;
|42||Thai||1&lt;br /&gt;
|-&lt;br /&gt;
|54||Vietnamese||1&lt;br /&gt;
|-&lt;br /&gt;
|56||Chinese (Simplified)||1&lt;br /&gt;
|-&lt;br /&gt;
|5A||Indonesian||1&lt;br /&gt;
|-&lt;br /&gt;
|5C||Urdu||0&lt;br /&gt;
|-&lt;br /&gt;
|61||Hebrew||0&lt;br /&gt;
|-&lt;br /&gt;
|62||Persian||0&lt;br /&gt;
|-&lt;br /&gt;
|80||Flag 16 bit string IDs (added to language ID)||&lt;br /&gt;
|-&lt;br /&gt;
|7F||any (will be applied no matter what language is active)||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When translating for a new language, please simply edit this document and add the new definition here.&lt;br /&gt;
&lt;br /&gt;
=== num-ent ===&lt;br /&gt;
&lt;br /&gt;
How many consecutive entries to change.&lt;br /&gt;
&lt;br /&gt;
=== offset ===&lt;br /&gt;
&lt;br /&gt;
The ID of the first string to change.&lt;br /&gt;
&lt;br /&gt;
When language-id bit 7 is clear, this is a byte value; For OpenTTD since r13482, where it is an extended byte value for vehicles.&lt;br /&gt;
&lt;br /&gt;
When language-id bit 7 is set, this is a word value in little endian notation, e.g. 8134 becomes 34 81.&lt;br /&gt;
&lt;br /&gt;
The 8 bit version is only allowed for vehicles to set their name, in which case the text ID is just the vehicle ID.&lt;br /&gt;
To replace original texts, or to define texts for usage in callbacks or properties of vehicles, stations, houses or industries you have to use the 16 bit version. However, town names are changed with [[ActionF|Action F]].&lt;br /&gt;
&lt;br /&gt;
For the usable 16 bit text IDs see the table below, resp. for feature 48 see [[TextIDs]].&lt;br /&gt;
&lt;br /&gt;
Though these ranges are shared across all features, you should still set the proper feature you are using them for.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!ID!!Content&lt;br /&gt;
|-&lt;br /&gt;
|C4xx||Set name of station class associated with station ID xx; this is the text above the preview (where otherwise TTD shows &amp;quot;Orientation&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
|C5xx||New station names, this changes the text &amp;quot;number of platforms&amp;quot; into the given text when the station with this ID from the current set is selected (i.e. xx=station-id from action 3 and 0)&lt;br /&gt;
|-&lt;br /&gt;
|C9xx||Name of the house type of this ID. If both property 12 and this is set, the latest definition is used always. You should prefer setting [[Action0/Houses#Building name ID (12)|property 12]] instead of this, so executables translated with TTD Translator will show the name in the current language. However, if you can&#039;t find any suitable old TTD texts, this can be used to specify your custom name. Don&#039;t forget to set the same text for all parts of a multi-tile building.&lt;br /&gt;
|-&lt;br /&gt;
|D0xx||Miscellaneous graphics texts, unique to each .grf file. Used for newobjects and several callbacks. Some callbacks as well as newobjects support IDs up to D3FF.&lt;br /&gt;
|-&lt;br /&gt;
|D4xx||&#039;&#039;&#039;Never use in Action4&#039;&#039;&#039;, only for displaying textids in range D000-D3FF (grf specific), see [[TextIDs]]&lt;br /&gt;
|-&lt;br /&gt;
|D8xx||&#039;&#039;&#039;Never use in Action4&#039;&#039;&#039;, only usable in Action0 features, see [[TextIDs]]&lt;br /&gt;
|-&lt;br /&gt;
|DCxx||Set miscellaneous persistent GRF texts. Unlike the D0xx GRF texts, these IDs can be used to set properties. The text ID must be set before any [[Action0/Houses|action 0]] references it.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The DCxx IDs are allocated internally when defined, and are persistent in the savegame data. Each .grf file gets its own separate map of these internal IDs and thus may set all 256 of them. &amp;amp;nbsp;However, only 1024 IDs are available in total, to be shared by all .grf files ever activated in the savegame. This means these IDs should be used as sparingly as possible. But use them when they are useful!&lt;br /&gt;
&lt;br /&gt;
=== text ===&lt;br /&gt;
&lt;br /&gt;
This is a list of zero-terminated strings, there must be as many strings as num-ent specifies.&lt;br /&gt;
&lt;br /&gt;
Grfcodec version 0.9.6 or later accepts literal strings in the .nfo. These are encoded exactly as written, in whatever encoding your text editor uses; if you need a 00, put it immediately after the literal string.&lt;br /&gt;
For the supported encodings, format, and restrictions on what characters you may use, please see [[GRFActionsDetailed#Strings|GRFActionsDetailed]] and StringCodes.&lt;br /&gt;
&lt;br /&gt;
A large number of original TTD strings require a colour code in front of the actual string. You can also use these colour codes in most of your custom strings. Use them wisely! In case a string requires a colour code, the string will have the code displayed in front of the default text as listed in [[TextIDs]].Typically, a colour coded string starts with the escape character (backslash), followed by hex byte and then the actual text string itself. I.e. string 0001 (&amp;quot;\94Off edge of map&amp;quot;) has colour code 0x94 in front of the text string, which will colour it white. You can also put the plain hex byte outside the quoted string without having to escape it. &#039;&#039;94 &amp;quot;Off edge of map&amp;quot;&#039;&#039; would be the same as &#039;&#039;&amp;quot;\94Off edge of map&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The following 16 colour codes are available for use:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Code&#039;&#039;&#039;!!&#039;&#039;&#039;Colour&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|88||Blue&lt;br /&gt;
|-&lt;br /&gt;
|89||Light Grey&lt;br /&gt;
|-&lt;br /&gt;
|8A||Yellow&lt;br /&gt;
|-&lt;br /&gt;
|8B||Red&lt;br /&gt;
|-&lt;br /&gt;
|8C||Light Purple&lt;br /&gt;
|-&lt;br /&gt;
|8D||Beige&lt;br /&gt;
|-&lt;br /&gt;
|8E||Light Orange&lt;br /&gt;
|-&lt;br /&gt;
|90||Light Yellow&lt;br /&gt;
|-&lt;br /&gt;
|91||Light Green&lt;br /&gt;
|-&lt;br /&gt;
|92||Light Pink&lt;br /&gt;
|-&lt;br /&gt;
|93||Brown&lt;br /&gt;
|-&lt;br /&gt;
|94||White&lt;br /&gt;
|-&lt;br /&gt;
|95||Light Blue&lt;br /&gt;
|-&lt;br /&gt;
|96||Grey&lt;br /&gt;
|-&lt;br /&gt;
|97||Purple&lt;br /&gt;
|-&lt;br /&gt;
|98||Black&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action4&amp;diff=2946</id>
		<title>Action4</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action4&amp;diff=2946"/>
		<updated>2012-01-03T16:11:45Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: add Australian&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Define strings, e.g vehicle, house or industry names&lt;br /&gt;
&lt;br /&gt;
When making new vehicle graphics, you also need to name the new vehicles, or they&#039;ll show up with their original name from TTD.&lt;br /&gt;
However, custom vehicle names assigned by the player in-game (or for TTDPatch also via TTD&#039;s vehicle.dat) will always take precendence.&lt;br /&gt;
&lt;br /&gt;
In TTDPatch you can also use this action to change most of TTD&#039;s text strings.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
The data looks as follows:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; &#039;&#039;&#039;04&#039;&#039;&#039; &amp;amp;lt;feature&amp;amp;gt; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;lt;num-ent&amp;amp;gt; &amp;amp;lt;offset&amp;amp;gt; &amp;amp;lt;text&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Element!![[GRFActionsDetailed|Size]]!!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;Sprite-number&amp;amp;gt;||dec||A sequential sprite number&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;length&amp;amp;gt;||dec||The total number of bytes used in this action.&lt;br /&gt;
|-&lt;br /&gt;
|04||B||Defines action 04&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;feature&amp;amp;gt;||B||For what type of vehicle/station should this definition be used?&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;language-id&amp;amp;gt;||B||Which of TTD&#039;s languages this name is for&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;num-ent&amp;amp;gt;||B||Number of consecutive strings to change&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;offset&amp;amp;gt;||B/W||First ID to change&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;text&amp;amp;gt;||S||New text strings&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Whether &amp;amp;lt;offset&amp;amp;gt; is a &#039;&#039;&#039;BYTE&#039;&#039;&#039; (extended byte in openttd for vehicles) or a &#039;&#039;&#039;WORD&#039;&#039;&#039; is decided by bit 7 of &amp;amp;lt;language-id&amp;amp;gt;, see below.&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Sprite-number ===&lt;br /&gt;
&lt;br /&gt;
This is just the number you are at.&lt;br /&gt;
&lt;br /&gt;
=== Length ===&lt;br /&gt;
&lt;br /&gt;
Count the number of bytes in this action.&lt;br /&gt;
&lt;br /&gt;
=== Feature ===&lt;br /&gt;
&lt;br /&gt;
This sets the type of [[Features|feature]] that you wish to change. Set it to:&lt;br /&gt;
&lt;br /&gt;
{|- |&lt;br /&gt;
!Value!![[Features|Feature]]&lt;br /&gt;
|-&lt;br /&gt;
|00||Trains&lt;br /&gt;
|-&lt;br /&gt;
|01||Road Vehicles&lt;br /&gt;
|-&lt;br /&gt;
|02||Ships&lt;br /&gt;
|-&lt;br /&gt;
|03||Aircraft&lt;br /&gt;
|-&lt;br /&gt;
|04||Stations&lt;br /&gt;
|-&lt;br /&gt;
|07||Houses&lt;br /&gt;
|-&lt;br /&gt;
|0A||Industries&lt;br /&gt;
|-&lt;br /&gt;
|0B||Cargos&lt;br /&gt;
|-&lt;br /&gt;
|0D||Airports&lt;br /&gt;
|-&lt;br /&gt;
|0F||Objects&lt;br /&gt;
|-&lt;br /&gt;
|10||Railtypes&lt;br /&gt;
|-&lt;br /&gt;
|48||Original strings; see [[TextIDs]] for a list of TTD&#039;s text IDs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== language IDs ===&lt;br /&gt;
The meaning of this byte depends on the GRF version of the .grf file as set in [[Action8#version|action 8]].&lt;br /&gt;
&lt;br /&gt;
{{grf|6}} Up to version 6, this is a bit mask of the following bits:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||01||American or &amp;quot;other&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|1||02||English&lt;br /&gt;
|-&lt;br /&gt;
|2||04||German&lt;br /&gt;
|-&lt;br /&gt;
|3||08||French&lt;br /&gt;
|-&lt;br /&gt;
|4||10||Spanish&lt;br /&gt;
|-&lt;br /&gt;
|7||80||Flag for 16 bit string IDs&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Add the bits of all languages for which the following strings apply. Bit 7 controls, whether the following string ID consists of 16 or 8 bit. Unknown languages will use the American strings as fallback. Otherwise the string would remain undefined for these languages. To actually define strings for any new language, you must use grf version 7.&lt;br /&gt;
&lt;br /&gt;
{{grf|7}} For version 7 and higher, it is a simple language ID from the list below. (This has changed with TTDPatch 2.5 beta 4). Bit 7 has the same meaning as in the earlier versions above.&lt;br /&gt;
&lt;br /&gt;
In either scheme, you can use the value 7F or FF, respectively, to define strings shown for languages that you do not provide translation for. First set all strings to a default value using this, and later override the language specific ones if they exist.&lt;br /&gt;
&lt;br /&gt;
Currently, the scheme is to use international phone codes as language IDs, unless they&#039;re out of range, in which case pick a number vaguely related in some way. Or something else.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!ID (hex)!!Language!!Plural form &amp;lt;ref&amp;gt;For a list of plural forms see [[StringCodes]]. As the assignment of plural forms to languages is in fact not as fixed as one might expect, the used plural form is defined by each GRF separately for its strings using [[Action0/Global Settings]] property 15.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|00||American / English (US)||0&lt;br /&gt;
|-&lt;br /&gt;
|01||English / English (UK)||0&lt;br /&gt;
|-&lt;br /&gt;
|02||German||0&lt;br /&gt;
|-&lt;br /&gt;
|03||French||2&lt;br /&gt;
|-&lt;br /&gt;
|04||Spanish||0&lt;br /&gt;
|-&lt;br /&gt;
|05||Esperanto||0&lt;br /&gt;
|-&lt;br /&gt;
|06||Ido||0&lt;br /&gt;
|-&lt;br /&gt;
|07||Russian||6&lt;br /&gt;
|-&lt;br /&gt;
|08||Irish||4&lt;br /&gt;
|-&lt;br /&gt;
|09||Maltese||12&lt;br /&gt;
|-&lt;br /&gt;
|0A||Tamil||0&lt;br /&gt;
|-&lt;br /&gt;
|0B||Chuvash||0&lt;br /&gt;
|-&lt;br /&gt;
|0C||Chinese (Traditional)||1&lt;br /&gt;
|-&lt;br /&gt;
|0D||Serbian||6&lt;br /&gt;
|-&lt;br /&gt;
|0E||Norwegian (Nynorsk)||0&lt;br /&gt;
|-&lt;br /&gt;
|0F||Welsh||0&lt;br /&gt;
|-&lt;br /&gt;
|10||Belarusian||6&lt;br /&gt;
|-&lt;br /&gt;
|11||Marathi||0&lt;br /&gt;
|-&lt;br /&gt;
|12||Faroese||0&lt;br /&gt;
|-&lt;br /&gt;
|14||Arabic (Egypt)||1&lt;br /&gt;
|-&lt;br /&gt;
|15||Czech||10&lt;br /&gt;
|-&lt;br /&gt;
|16||Slovak||10&lt;br /&gt;
|-&lt;br /&gt;
|18||Bulgarian||0&lt;br /&gt;
|-&lt;br /&gt;
|1B||Afrikaans||0&lt;br /&gt;
|-&lt;br /&gt;
|1E||Greek||2&lt;br /&gt;
|-&lt;br /&gt;
|1F||Dutch||0&lt;br /&gt;
|-&lt;br /&gt;
|21||Basque||0&lt;br /&gt;
|-&lt;br /&gt;
|22||Catalan||0&lt;br /&gt;
|-&lt;br /&gt;
|23||Luxembourgish||0&lt;br /&gt;
|-&lt;br /&gt;
|24||Hungarian||2&lt;br /&gt;
|-&lt;br /&gt;
|26||Macedonian||0&lt;br /&gt;
|-&lt;br /&gt;
|27||Italian||0&lt;br /&gt;
|-&lt;br /&gt;
|28||Romanian||0&lt;br /&gt;
|-&lt;br /&gt;
|29||Icelandic||0&lt;br /&gt;
|-&lt;br /&gt;
|2A||Latvian||3&lt;br /&gt;
|-&lt;br /&gt;
|2B||Lithuanian||5&lt;br /&gt;
|-&lt;br /&gt;
|2C||Slovenian||8&lt;br /&gt;
|-&lt;br /&gt;
|2D||Danish||0&lt;br /&gt;
|-&lt;br /&gt;
|2E||Swedish||0&lt;br /&gt;
|-&lt;br /&gt;
|2F||Norwegian (Bokmal)||0&lt;br /&gt;
|-&lt;br /&gt;
|30||Polish||7&lt;br /&gt;
|-&lt;br /&gt;
|31||Galician||0&lt;br /&gt;
|-&lt;br /&gt;
|32||Frisian||0&lt;br /&gt;
|-&lt;br /&gt;
|33||Ukrainian||6&lt;br /&gt;
|-&lt;br /&gt;
|34||Estonian||0&lt;br /&gt;
|-&lt;br /&gt;
|35||Finnish||0&lt;br /&gt;
|-&lt;br /&gt;
|36||Portuguese||0&lt;br /&gt;
|-&lt;br /&gt;
|37||Brazilian Portuguese||2&lt;br /&gt;
|-&lt;br /&gt;
|38||Croatian||6&lt;br /&gt;
|-&lt;br /&gt;
|39||Japanese||1&lt;br /&gt;
|-&lt;br /&gt;
|3A||Korean||11&lt;br /&gt;
|-&lt;br /&gt;
|3C||Malay||0&lt;br /&gt;
|-&lt;br /&gt;
|3D||Australian / English (AU)||0&lt;br /&gt;
|-&lt;br /&gt;
|3E||Turkish||1&lt;br /&gt;
|-&lt;br /&gt;
|42||Thai||1&lt;br /&gt;
|-&lt;br /&gt;
|54||Vietnamese||1&lt;br /&gt;
|-&lt;br /&gt;
|56||Chinese (Simplified)||1&lt;br /&gt;
|-&lt;br /&gt;
|5A||Indonesian||1&lt;br /&gt;
|-&lt;br /&gt;
|5C||Urdu||0&lt;br /&gt;
|-&lt;br /&gt;
|61||Hebrew||0&lt;br /&gt;
|-&lt;br /&gt;
|62||Persian||0&lt;br /&gt;
|-&lt;br /&gt;
|80||Flag 16 bit string IDs (added to language ID)||&lt;br /&gt;
|-&lt;br /&gt;
|7F||any (will be applied no matter what language is active)||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When translating for a new language, please simply edit this document and add the new definition here.&lt;br /&gt;
&lt;br /&gt;
=== num-ent ===&lt;br /&gt;
&lt;br /&gt;
How many consecutive entries to change.&lt;br /&gt;
&lt;br /&gt;
=== offset ===&lt;br /&gt;
&lt;br /&gt;
The ID of the first string to change.&lt;br /&gt;
&lt;br /&gt;
When language-id bit 7 is clear, this is a byte value; For OpenTTD since r13482, where it is an extended byte value for vehicles.&lt;br /&gt;
&lt;br /&gt;
When language-id bit 7 is set, this is a word value in little endian notation, e.g. 8134 becomes 34 81.&lt;br /&gt;
&lt;br /&gt;
The 8 bit version is only allowed for vehicles to set their name, in which case the text ID is just the vehicle ID.&lt;br /&gt;
To replace original texts, or to define texts for usage in callbacks or properties of vehicles, stations, houses or industries you have to use the 16 bit version. However, town names are changed with [[ActionF|Action F]].&lt;br /&gt;
&lt;br /&gt;
For the usable 16 bit text IDs see the table below, resp. for feature 48 see [[TextIDs]].&lt;br /&gt;
&lt;br /&gt;
Though these ranges are shared across all features, you should still set the proper feature you are using them for.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!ID!!Content&lt;br /&gt;
|-&lt;br /&gt;
|C4xx||Set name of station class associated with station ID xx; this is the text above the preview (where otherwise TTD shows &amp;quot;Orientation&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
|C5xx||New station names, this changes the text &amp;quot;number of platforms&amp;quot; into the given text when the station with this ID from the current set is selected (i.e. xx=station-id from action 3 and 0)&lt;br /&gt;
|-&lt;br /&gt;
|C9xx||Name of the house type of this ID. If both property 12 and this is set, the latest definition is used always. You should prefer setting property 12 instead of this, so executables translated with TTD Translator will show the name in the current language. However, if you can&#039;t find any suitable old TTD texts, this can be used to specify your custom name. Don&#039;t forget to set the same text for all parts of a multi-tile building.&lt;br /&gt;
|-&lt;br /&gt;
|D0xx||Miscellaneous graphics texts, unique to each .grf file. Used for newobjects and several callbacks. Some callbacks as well as newobjects support IDs up to D3FF.&lt;br /&gt;
|-&lt;br /&gt;
|D4xx||&#039;&#039;&#039;Never use in Action4&#039;&#039;&#039;, only for displaying textids in range D000-D3FF (grf specific), see [[TextIDs]]&lt;br /&gt;
|-&lt;br /&gt;
|D8xx||&#039;&#039;&#039;Never use in Action4&#039;&#039;&#039;, only usable in Action0 features, see [[TextIDs]]&lt;br /&gt;
|-&lt;br /&gt;
|DCxx||Set miscellaneous persistent GRF texts. Unlike the D0xx GRF texts, these IDs can be used to set properties. The text ID must be set before any action 0 references it.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The DCxx IDs are allocated internally when defined, and are persistent in the savegame data. Each .grf file gets its own separate map of these internal IDs and thus may set all 256 of them. &amp;amp;nbsp;However, only 1024 IDs are available in total, to be shared by all .grf files ever activated in the savegame. This means these IDs should be used as sparingly as possible. But use them when they are useful!&lt;br /&gt;
&lt;br /&gt;
=== text ===&lt;br /&gt;
&lt;br /&gt;
This is a list of zero-terminated strings, there must be as many strings as num-ent specifies.&lt;br /&gt;
&lt;br /&gt;
Grfcodec version 0.9.6 or later accepts literal strings in the .nfo. These are encoded exactly as written, in whatever encoding your text editor uses; if you need a 00, put it immediately after the literal string.&lt;br /&gt;
For the supported encodings, format, and restrictions on what characters you may use, please see [[GRFActionsDetailed#Strings|GRFActionsDetailed]] and StringCodes.&lt;br /&gt;
&lt;br /&gt;
A large number of original TTD strings require a colour code in front of the actual string. You can also use these colour codes in most of your custom strings. Use them wisely! In case a string requires a colour code, the string will have the code displayed in front of the default text as listed in [[TextIDs]].Typically, a colour coded string starts with the escape character (backslash), followed by hex byte and then the actual text string itself. I.e. string 0001 (&amp;quot;\94Off edge of map&amp;quot;) has colour code 0x94 in front of the text string, which will colour it white. You can also put the plain hex byte outside the quoted string without having to escape it. &#039;&#039;94 &amp;quot;Off edge of map&amp;quot;&#039;&#039; would be the same as &#039;&#039;&amp;quot;\94Off edge of map&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The following 16 colour codes are available for use:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Code&#039;&#039;&#039;!!&#039;&#039;&#039;Colour&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|88||Blue&lt;br /&gt;
|-&lt;br /&gt;
|89||Light Grey&lt;br /&gt;
|-&lt;br /&gt;
|8A||Yellow&lt;br /&gt;
|-&lt;br /&gt;
|8B||Red&lt;br /&gt;
|-&lt;br /&gt;
|8C||Light Purple&lt;br /&gt;
|-&lt;br /&gt;
|8D||Beige&lt;br /&gt;
|-&lt;br /&gt;
|8E||Light Orange&lt;br /&gt;
|-&lt;br /&gt;
|90||Light Yellow&lt;br /&gt;
|-&lt;br /&gt;
|91||Light Green&lt;br /&gt;
|-&lt;br /&gt;
|92||Light Pink&lt;br /&gt;
|-&lt;br /&gt;
|93||Brown&lt;br /&gt;
|-&lt;br /&gt;
|94||White&lt;br /&gt;
|-&lt;br /&gt;
|95||Light Blue&lt;br /&gt;
|-&lt;br /&gt;
|96||Grey&lt;br /&gt;
|-&lt;br /&gt;
|97||Purple&lt;br /&gt;
|-&lt;br /&gt;
|98||Black&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action13&amp;diff=2889</id>
		<title>Action13</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action13&amp;diff=2889"/>
		<updated>2011-12-01T19:43:04Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: Translation of multiple languages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
{{ottdp|0.6|2.6|ttdprev=r857}}&lt;br /&gt;
Translating regular strings is easy by just overwriting them with an [[Action4|action 4]], however this is not possible for translating GRF-specific strings in the D000 or DC00 range of IDs. Instead, these must be translated with this action 13.&lt;br /&gt;
&lt;br /&gt;
{{ottd|}}Usage of this action with OpenTTD is troublesome in multiplayer. The action does not specify a language code for the translation, but forces the translation on every player. However, GRFs with only action 13 can be loaded as [[OpenTTD static NewGRF]]. {{grf|8}} GRF version 8 alleviates this problem by providing the language that is overridden.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The data looks as follows:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;sprite-number&amp;gt; * &amp;lt;length&amp;gt; 13 &amp;lt;feature&amp;gt; &amp;lt;GRFID&amp;gt; &amp;lt;num-ent&amp;gt; &amp;lt;offset&amp;gt; &amp;lt;text...&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Element&#039;&#039;&#039;&lt;br /&gt;
![[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]&lt;br /&gt;
!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;sprite-number&amp;amp;gt;&lt;br /&gt;
|dec&lt;br /&gt;
|A sequential sprite number&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;length&amp;amp;gt;&lt;br /&gt;
|dec&lt;br /&gt;
|The total number of bytes in the action&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|B&lt;br /&gt;
|Action 13&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;GRFID&amp;gt;&lt;br /&gt;
|4*B&lt;br /&gt;
|The GRFID of the file whose texts are to be translated&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;language-id&amp;gt;&lt;br /&gt;
|B&lt;br /&gt;
|{{grf|8}} Which of TTD&#039;s languages these strings are for (only for GRF version 8 an higher)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;num-ent&amp;gt;&lt;br /&gt;
|B&lt;br /&gt;
|Number of strings&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;offset&amp;gt;&lt;br /&gt;
|W&lt;br /&gt;
|First text ID&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;text...&amp;gt;&lt;br /&gt;
|S&lt;br /&gt;
|Zero-terminated strings&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For action 13, &amp;lt;num-ent&amp;gt;, &amp;lt;offset&amp;gt; and &amp;lt;text...&amp;gt; work exactly as for [[Action4|action 4]], but the offset may only refer to a text ID in the D000 or DC00 range of IDs.&lt;br /&gt;
&lt;br /&gt;
Action 13 is skipped if the given GRFID cannot be found or if the file is inactive; action 13 generates an error message and disables the current file if it appears before the GRF that it is translating.&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action12&amp;diff=2863</id>
		<title>Action12</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action12&amp;diff=2863"/>
		<updated>2011-11-20T11:57:04Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: non-proportional font&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
{{ottdp|0.6|2.5|ttdprev=2.0.1 alpha 73}}&lt;br /&gt;
This action allows loading and defining glyphs for any [http://www.unicode.org/ Unicode] character in the BMP (Basic Multilingual Plane), i.e. up to U+FFFF.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note&#039;&#039;: If any .grf file containing an action 12 is loaded (even if it is inactive), TTDPatch is put into UTF-8 mode. This changes how character input is processed and how custom strings are stored in the savegame (they are converted to UTF-8 encoding). It is not possible to prevent this, and because of possible bugs in UTF-8 mode it is therefore preferable to put all font glyphs in separate .grf files to allow them to not be loaded in the case of problems.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The data looks as follows:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;sprite-number&amp;gt; * &amp;lt;length&amp;gt; 12 &amp;lt;num-def&amp;gt; &amp;lt;nowiki&amp;gt;(&amp;lt;font&amp;gt; &amp;lt;num-char&amp;gt; &amp;lt;base-char&amp;gt;){n}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Element&#039;&#039;&#039;!![[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]!!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;sprite-number&amp;gt;||dec||A sequential sprite number&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;length&amp;gt;||dec||The total number of bytes in the action&lt;br /&gt;
|-&lt;br /&gt;
|12||B||Action 12&lt;br /&gt;
|-&lt;br /&gt;
|num-def||B||Number of definitions&lt;br /&gt;
|-&lt;br /&gt;
|font||B||Font for which to provide glyphs&lt;br /&gt;
|-&lt;br /&gt;
|num-char||B||Number of consecutive glyphs&lt;br /&gt;
|-&lt;br /&gt;
|base-char||W||First Unicode character for which to provide glyphs&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Following the action 12 must be the real sprites for all glyphs, as many sprites as all &amp;lt;num-char&amp;gt; added up.&lt;br /&gt;
&lt;br /&gt;
Glyphs sprites may only use colors 00 (transparent), 01 (foreground) and 02 (shadow). A sprite that uses the shadow color MUST NOT use the [[RealSprites#compression|chunked data format]].&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== sprite-number ===&lt;br /&gt;
&lt;br /&gt;
The current sprite number.&lt;br /&gt;
&lt;br /&gt;
=== length ===&lt;br /&gt;
&lt;br /&gt;
The total number of bytes in this action 12.&lt;br /&gt;
&lt;br /&gt;
=== num-def ===&lt;br /&gt;
&lt;br /&gt;
This specifies how many definitions follow, each having &amp;lt;nowiki&amp;gt;&amp;lt;font&amp;gt;&amp;lt;/nowiki&amp;gt;, &amp;lt;num-char&amp;gt; and &amp;lt;base-char&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== font ===&lt;br /&gt;
&lt;br /&gt;
The font to define glyphs for. The value can be 0 for the normal size proportional font, 1 for the small size proportional font, 2 for the large size proportional font, or {{ottdp|1.2|no|ottdrev=23274}} 3 for the normal size non-proportional font.&lt;br /&gt;
&lt;br /&gt;
=== num-char ===&lt;br /&gt;
&lt;br /&gt;
The number of characters in the range.&lt;br /&gt;
&lt;br /&gt;
=== base-char ===&lt;br /&gt;
&lt;br /&gt;
The first Unicode character in a range to provide glyphs for. &amp;amp;nbsp;This can be any Unicode character in the BMP.&lt;br /&gt;
&lt;br /&gt;
Note that all characters of a definition (i.e., &amp;lt;nowiki&amp;gt;&amp;lt;font&amp;gt;&amp;lt;/nowiki&amp;gt; &amp;lt;num-char&amp;gt; &amp;lt;base-char&amp;gt; triplet) must fit within a &amp;quot;block&amp;quot; of 128 characters, i.e. you cannot define characters U+00E0..U+011F with one definition; instead you must split it into U+00E0..U+00FF and U+0100..U+011F because those are two different blocks.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
 583 * 10 12 02 00 08 F8 00 00 0C 00 01&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Byte&#039;&#039;&#039;!!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|583||&amp;lt;sprite-number&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|10||&amp;lt;length&amp;gt; of the action in bytes; start counting at 12 (&amp;lt;action&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|12||&amp;lt;action&amp;gt;: sets this pseudo-sprite to function as action 12&lt;br /&gt;
|-&lt;br /&gt;
|02||&amp;lt;num-def&amp;gt;: we&#039;re defining two ranges of characters&lt;br /&gt;
|-&lt;br /&gt;
|00||&amp;lt;nowiki&amp;gt;&amp;lt;font&amp;gt;&amp;lt;/nowiki&amp;gt;: first range, defining font 0 (normal size)&lt;br /&gt;
|-&lt;br /&gt;
|08||&amp;lt;num-char&amp;gt;: defining 8 characters in a row&lt;br /&gt;
|-&lt;br /&gt;
|F8 00||&amp;lt;base-char&amp;gt;: character U+00F8 is the first character&lt;br /&gt;
|-&lt;br /&gt;
|00||&amp;lt;nowiki&amp;gt;&amp;lt;font&amp;gt;&amp;lt;/nowiki&amp;gt;: second range, also defining font 0 (normal size)&lt;br /&gt;
|-&lt;br /&gt;
|0C||&amp;lt;num-char&amp;gt;: defining another 12 characters&lt;br /&gt;
|-&lt;br /&gt;
|00 01||&amp;lt;base-char&amp;gt;: character U+0100 is the first character&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Therefore, this action 12 defines glyphs for Unicode characters U+00F8..U+010B. They are split into two definitions because a definition cannot cross a block boundary.&lt;br /&gt;
&lt;br /&gt;
After this action 12 follow 20 real sprites containing the glyphs for the above characters.&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action3/Canals&amp;diff=2666</id>
		<title>Action3/Canals</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action3/Canals&amp;diff=2666"/>
		<updated>2011-10-02T20:31:03Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: Allow replacing the buoy&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Action 3 assigns graphics sets (referenced to by (chains of) [[Action2|action 2(s]]) to feature IDs. &lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The format of the data is feature-dependent, canals use specific ids which define the graphics being provided.&lt;br /&gt;
&lt;br /&gt;
The data is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 03 05 01 &amp;amp;lt;id&amp;amp;gt; 00 &amp;amp;lt;set-ID&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Element&#039;&#039;&#039;&lt;br /&gt;
![[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]&lt;br /&gt;
!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;Sprite-number&amp;amp;gt;&lt;br /&gt;
|dec&lt;br /&gt;
|A sequential sprite number&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;length&amp;amp;gt;&lt;br /&gt;
|dec&lt;br /&gt;
|The total number of bytes used in this action&lt;br /&gt;
|-&lt;br /&gt;
|03&lt;br /&gt;
|B&lt;br /&gt;
|Defines action 03&lt;br /&gt;
|-&lt;br /&gt;
|05&lt;br /&gt;
|B&lt;br /&gt;
|Feature 05 &amp;quot;Canals&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|01&lt;br /&gt;
|B&lt;br /&gt;
|Canals and rivers can only provide one &amp;quot;ID&amp;quot; at a time&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;id&amp;amp;gt;&lt;br /&gt;
|B/B*&lt;br /&gt;
|IDs of the current feature this action 3 associates graphics with. There must be as many IDs as &amp;amp;lt;n-id&amp;amp;gt; specifies&lt;br /&gt;
|-&lt;br /&gt;
|00&lt;br /&gt;
|B&lt;br /&gt;
|Canals support no cargo types&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;set-ID&amp;amp;gt;&lt;br /&gt;
|W&lt;br /&gt;
|Default set-ID to use if none of the above matches&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Sprite-number ===&lt;br /&gt;
&lt;br /&gt;
This is just the number you are at.&lt;br /&gt;
&lt;br /&gt;
=== Length ===&lt;br /&gt;
&lt;br /&gt;
Count the number of bytes in this action.&lt;br /&gt;
&lt;br /&gt;
=== Feature ===&lt;br /&gt;
&lt;br /&gt;
This sets the type of [[Features|feature]] that you wish to change, 05 for canals in this case&lt;br /&gt;
&lt;br /&gt;
=== id ===&lt;br /&gt;
&lt;br /&gt;
In the case of canals or rivers this differs by the type of sprites provided in the real sprite:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;ID&#039;&#039;&#039;!!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&#039;&#039;&#039;Sprites&#039;&#039;&#039;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&#039;&#039;&#039;Sprites when [[Action0/Canals#Graphic flags (09)| prop. 09 Bit 0]] is set&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|00||Watercliffs||{{ottdp|0.6|2.5}}||4 slope sprites||{{ottdp|1.1|2.6|ottdrev=r20352|ttdprev=r1573}}||1 flat ground sprite followed by 4 slope sprites&lt;br /&gt;
|-&lt;br /&gt;
|01||Locks||{{ottdp|0.6|2.5}}||24||{{ottdp|no|no}}||undefined&lt;br /&gt;
|-&lt;br /&gt;
|02||Dikes||{{ottdp|0.6|2.5}}||12||{{ottdp|no|no}}||undefined&lt;br /&gt;
|-&lt;br /&gt;
|03||Canal GUI||{{ottdp|no|2.5}}||1||{{ottdp|no|no}}||undefined&lt;br /&gt;
|-&lt;br /&gt;
|04||Flat docks||{{ottdp|no|2.5}}||4||{{ottdp|no|no}}||undefined&lt;br /&gt;
|-&lt;br /&gt;
|05||River Slope||{{ottdp|0.6|2.6}}||4||{{ottdp|1.1|2.6|ottdrev=r20352|ttdprev=r1573}}||1 flat ground sprite followed by 4 slope sprites&lt;br /&gt;
|-&lt;br /&gt;
|06||Riverbanks ||{{ottdp|0.6|2.6}}||12*5 (Last 4 for slopes)||{{ottdp|no|no}}||undefined&lt;br /&gt;
|-&lt;br /&gt;
|07||River GUI||{{ottdp|no|2.6}}||2||{{ottdp|no|no}}||undefined&lt;br /&gt;
|-&lt;br /&gt;
|08||Buoy||{{ottdp|1.2|no|ottdrev=r22973}}||1||{{ottdp|no|no}}||undefined&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Watercliffs (00) ====&lt;br /&gt;
[[File:riversprites_00.png]]&lt;br /&gt;
&lt;br /&gt;
==== Dikes (Canals) (02) ====&lt;br /&gt;
[[File:riversprites_02.png]]&lt;br /&gt;
&lt;br /&gt;
==== River slopes (05) ====&lt;br /&gt;
When property 09, bit 0 is NOT set, the required sprites are&lt;br /&gt;
[[File:riversprites_05.png]]&lt;br /&gt;
&lt;br /&gt;
if the bit is set, the sprites are preceeded by a flat water tile which then represents the water used exclusively for rivers.&lt;br /&gt;
&lt;br /&gt;
==== Riverbanks (06) ====&lt;br /&gt;
&lt;br /&gt;
This contains 5 times sprites as shown for id2 (dikes). The first 12 sprites are for level land, the following ones are for sloped rivers where slopes follow the same order as for id5 (river slopes).&lt;br /&gt;
&lt;br /&gt;
==== Buoy (08) ====&lt;br /&gt;
&lt;br /&gt;
This contains the buoy sprite without water to be shown on the map. This will be overlaid on the appropriate water for the tile.&lt;br /&gt;
&lt;br /&gt;
=== set-ID ===&lt;br /&gt;
&lt;br /&gt;
set-ID (or Action2 ID)&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action4&amp;diff=412</id>
		<title>Action4</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action4&amp;diff=412"/>
		<updated>2011-03-13T08:36:28Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Define vehicle names or other texts&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 4=&lt;br /&gt;
&lt;br /&gt;
Define vehicle names or other texts&lt;br /&gt;
&lt;br /&gt;
-=Introduction=-&lt;br /&gt;
&lt;br /&gt;
When making new vehicle graphics, you also need to name the new vehicles, or they&#039;ll show up with their original name from TTD.&lt;br /&gt;
&lt;br /&gt;
In addition, you can change most of TTD&#039;s text strings.&lt;br /&gt;
&lt;br /&gt;
Note that changes of vehicles names can be overridden by using TTD&#039;s vehicle.dat custom vehicle names. &amp;amp;nbsp;There is no way to bypass the custom vehicle names, other than turning them off or deleting vehicle.dat.&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
The data looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 04 &amp;amp;lt;feature&amp;amp;gt; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;lt;num-ent&amp;amp;gt; &amp;amp;lt;offset&amp;amp;gt; &amp;amp;lt;text&amp;amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes used in this action.&lt;br /&gt;
&lt;br /&gt;
04|B|Defines action 04&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;feature&amp;amp;gt;|B|For what type of vehicle/station should this definition be used?&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;language-id&amp;amp;gt;|B|Which of TTD&#039;s languages this name is for&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;num-ent&amp;amp;gt;|B|Number of consecutive strings to change&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;offset&amp;amp;gt;|B/W|First ID to change&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;text&amp;amp;gt;|S|New text strings||&lt;br /&gt;
&lt;br /&gt;
Whether &amp;amp;lt;offset&amp;amp;gt; is a &#039;&#039;&#039;BYTE&#039;&#039;&#039; or a &#039;&#039;&#039;WORD&#039;&#039;&#039; is decided by bit 7 of &amp;amp;lt;language-id&amp;amp;gt;, see below.&lt;br /&gt;
&lt;br /&gt;
-=Filling in the terms=-&lt;br /&gt;
&lt;br /&gt;
===Sprite-number===&lt;br /&gt;
&lt;br /&gt;
This is just the number you are at.&lt;br /&gt;
&lt;br /&gt;
===Length===&lt;br /&gt;
&lt;br /&gt;
Count the number of bytes in this action.&lt;br /&gt;
&lt;br /&gt;
===feature===&lt;br /&gt;
&lt;br /&gt;
This sets the type of feature that you wish to change. Set it to:&lt;br /&gt;
&lt;br /&gt;
00 for trains&lt;br /&gt;
&lt;br /&gt;
01 for road vehicles&lt;br /&gt;
&lt;br /&gt;
02 for ships&lt;br /&gt;
&lt;br /&gt;
03 for planes&lt;br /&gt;
&lt;br /&gt;
04 for stations&lt;br /&gt;
&lt;br /&gt;
05 for canals&lt;br /&gt;
&lt;br /&gt;
06 for bridges&lt;br /&gt;
&lt;br /&gt;
07 for houses&lt;br /&gt;
&lt;br /&gt;
0A for industries&lt;br /&gt;
&lt;br /&gt;
0B for cargos&lt;br /&gt;
&lt;br /&gt;
48 for original strings; see [[TextIDs]] for a list of TTD&#039;s text IDs.&lt;br /&gt;
&lt;br /&gt;
===language-id===&lt;br /&gt;
&lt;br /&gt;
The meaning of this byte depends on the GRF version of the .grf file as set in [[Action8#version|action 8]].&lt;br /&gt;
&lt;br /&gt;
Up to version 6, this is a bit mask of the following bits:&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Meaning&lt;br /&gt;
&lt;br /&gt;
0|01|American or &amp;amp;quot;other&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
1|02|English&lt;br /&gt;
&lt;br /&gt;
2|04|German&lt;br /&gt;
&lt;br /&gt;
3|08|French&lt;br /&gt;
&lt;br /&gt;
4|10|Spanish&lt;br /&gt;
&lt;br /&gt;
7|80|Flag for 16 bit string IDs||&lt;br /&gt;
&lt;br /&gt;
Add the bits of all languages for which the following strings apply. Bit 7 controls, whether the following string ID consists of 16 or 8 bit. Since TTDPatch now supports languages other than the standard ones, unknown languages will use the American strings as fallback. Otherwise the string would remain undefined for these languages. To actually define strings for any new language, you must use grf version 7.&lt;br /&gt;
&lt;br /&gt;
For version 7 and higher, it is a simple language ID from the list below. (This has changed with 2.5 beta 4). Bit 7 has the same meaning as in the earlier versions above.&lt;br /&gt;
&lt;br /&gt;
In either scheme, you can use the value 7F or FF, respectively, to define strings shown for languages that you do not provide translation for. First set all strings to a default value using this, and later override the language specific ones if they exist.&lt;br /&gt;
&lt;br /&gt;
Currently, the scheme is to use international phone codes as language IDs, unless they&#039;re out of range, in which case pick a number vaguely related in some way. Or something else.&lt;br /&gt;
&lt;br /&gt;
||ID (hex)|Language|Plural form (*)&lt;br /&gt;
&lt;br /&gt;
00|American|0&lt;br /&gt;
&lt;br /&gt;
01|English|0&lt;br /&gt;
&lt;br /&gt;
02|German|0&lt;br /&gt;
&lt;br /&gt;
03|French|2&lt;br /&gt;
&lt;br /&gt;
04|Spanish|0&lt;br /&gt;
&lt;br /&gt;
05|Esperanto|0&lt;br /&gt;
&lt;br /&gt;
06|Ido|0&lt;br /&gt;
&lt;br /&gt;
07|Russian|6&lt;br /&gt;
&lt;br /&gt;
08|Irish|4&lt;br /&gt;
&lt;br /&gt;
09|Maltese|12&lt;br /&gt;
&lt;br /&gt;
0A|Tamil|0&lt;br /&gt;
&lt;br /&gt;
0B|Chuvash|0&lt;br /&gt;
&lt;br /&gt;
0C|Chinese (Traditional)|1&lt;br /&gt;
&lt;br /&gt;
0D|Serbian|6&lt;br /&gt;
&lt;br /&gt;
0E|Norwegian (Nynorsk)|0&lt;br /&gt;
&lt;br /&gt;
0F|Welsh|0&lt;br /&gt;
&lt;br /&gt;
10|Belarusian|6&lt;br /&gt;
&lt;br /&gt;
11|Marathi|0&lt;br /&gt;
&lt;br /&gt;
12|Faroese|0&lt;br /&gt;
&lt;br /&gt;
14|Arabic (Egypt)|1&lt;br /&gt;
&lt;br /&gt;
15|Czech|10&lt;br /&gt;
&lt;br /&gt;
16|Slovak|10&lt;br /&gt;
&lt;br /&gt;
18|Bulgarian|0&lt;br /&gt;
&lt;br /&gt;
1B|Afrikaans|0&lt;br /&gt;
&lt;br /&gt;
1E|Greek|2&lt;br /&gt;
&lt;br /&gt;
1F|Dutch|0&lt;br /&gt;
&lt;br /&gt;
21|Basque|0&lt;br /&gt;
&lt;br /&gt;
22|Catalan|0&lt;br /&gt;
&lt;br /&gt;
23|Luxembourgish|0&lt;br /&gt;
&lt;br /&gt;
24|Hungarian|2&lt;br /&gt;
&lt;br /&gt;
26|Macedonian|0&lt;br /&gt;
&lt;br /&gt;
27|Italian|0&lt;br /&gt;
&lt;br /&gt;
28|Romanian|0&lt;br /&gt;
&lt;br /&gt;
29|Icelandic|0&lt;br /&gt;
&lt;br /&gt;
2A|Latvian|3&lt;br /&gt;
&lt;br /&gt;
2B|Lithuanian|5&lt;br /&gt;
&lt;br /&gt;
2C|Slovenian|8&lt;br /&gt;
&lt;br /&gt;
2D|Danish|0&lt;br /&gt;
&lt;br /&gt;
2E|Swedish|0&lt;br /&gt;
&lt;br /&gt;
2F|Norwegian (Bokmal)|0&lt;br /&gt;
&lt;br /&gt;
30|Polish|7&lt;br /&gt;
&lt;br /&gt;
31|Galician|0&lt;br /&gt;
&lt;br /&gt;
32|Frisian|0&lt;br /&gt;
&lt;br /&gt;
33|Ukrainian|6&lt;br /&gt;
&lt;br /&gt;
34|Estonian|0&lt;br /&gt;
&lt;br /&gt;
35|Finnish|0&lt;br /&gt;
&lt;br /&gt;
36|Portuguese|0&lt;br /&gt;
&lt;br /&gt;
37|Brazilian Portuguese|2&lt;br /&gt;
&lt;br /&gt;
38|Croatian|6&lt;br /&gt;
&lt;br /&gt;
39|Japanese|1&lt;br /&gt;
&lt;br /&gt;
3A|Korean|11&lt;br /&gt;
&lt;br /&gt;
3C|Malay|0&lt;br /&gt;
&lt;br /&gt;
3E|Turkish|1&lt;br /&gt;
&lt;br /&gt;
42|Thai|1&lt;br /&gt;
&lt;br /&gt;
54|Vietnamese|1&lt;br /&gt;
&lt;br /&gt;
56|Chinese (Simplified)|1&lt;br /&gt;
&lt;br /&gt;
5A|Indonesian|1&lt;br /&gt;
&lt;br /&gt;
5C|Urdu|0&lt;br /&gt;
&lt;br /&gt;
61|Hebrew|0&lt;br /&gt;
&lt;br /&gt;
62|Persian|0&lt;br /&gt;
&lt;br /&gt;
80|Flag 16 bit string IDs (added to language ID)&lt;br /&gt;
&lt;br /&gt;
7F|any (will be applied no matter what language is active)||&lt;br /&gt;
&lt;br /&gt;
(*) For a list of plural forms see [[StringCodes]]. As the assignment of plural forms to languages is in fact not as fixed as one might expect, the used plural form is defined by each GRF separately for its strings using [[Action0GeneralVariables]] property 15.&lt;br /&gt;
&lt;br /&gt;
When translating for a new language, please simply edit this document and add the new definition here.&lt;br /&gt;
&lt;br /&gt;
===num-ent===&lt;br /&gt;
&lt;br /&gt;
How many consecutive entries to change.&lt;br /&gt;
&lt;br /&gt;
===offset===&lt;br /&gt;
&lt;br /&gt;
The ID of the first string to change.&lt;br /&gt;
&lt;br /&gt;
When language-id bit 7 is clear, this is a byte value; except for OpenTTD since r13482, where it is an extended byte value for vehicles.&lt;br /&gt;
&lt;br /&gt;
When language-id bit 7 is set, this is a word value in little endian notation, e.g. 8134 becomes 34 81.&lt;br /&gt;
&lt;br /&gt;
The 8 bit version is only allowed for vehicles to set their name, in which case the text ID is just the vehicle ID.&lt;br /&gt;
&lt;br /&gt;
To replace original texts, or to define texts for usage in callbacks or properties of vehicles, stations, houses or industries you have to use the 16 bit version. However, town names are changed with [[ActionF|Action F]].&lt;br /&gt;
&lt;br /&gt;
For the usable 16 bit text IDs see the table below, resp. for feature 48 see [[TextIDs]].&lt;br /&gt;
&lt;br /&gt;
Though these ranges are shared across all features, you should still set the proper feature you are using them for.&lt;br /&gt;
&lt;br /&gt;
||ID|Content&lt;br /&gt;
&lt;br /&gt;
C4xx|Set name of station class associated with station ID xx; this is the text above the preview (where otherwise TTD shows &amp;amp;quot;Orientation&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
C5xx|New station names, this changes the text &amp;amp;quot;number of platforms&amp;amp;quot; into the given text when the station with this ID from the current set is selected (i.e. xx=station-id from action 3 and 0)&lt;br /&gt;
&lt;br /&gt;
C9xx|Name of the house type of this ID. If both property 12 and this is set, the latest definition is used always. You should prefer setting property 12 instead of this, so executables translated with TTD Translator will show the name in the current language. However, if you can&#039;t find any suitable old TTD texts, this can be used to specify your custom name. Don&#039;t forget to set the same text for all parts of a multi-tile building.&lt;br /&gt;
&lt;br /&gt;
D0xx|Miscellaneous graphics texts, unique to each .grf file. Used for newobjects and several callbacks. Some callbacks as well as newobjects support IDs up to D3FF.&lt;br /&gt;
&lt;br /&gt;
D4xx|&#039;&#039;&#039;Never use in Action4&#039;&#039;&#039;, only for displaying textids in range D000-D3FF (grf specific), see [[TextIDs]]&lt;br /&gt;
&lt;br /&gt;
D8xx|&#039;&#039;&#039;Never use in Action4&#039;&#039;&#039;, only usable in Action0 features, see [[TextIDs]]&lt;br /&gt;
&lt;br /&gt;
DCxx|Set miscellaneous persistent GRF texts. Unlike the D0xx GRF texts, these IDs can be used to set properties. The text ID must be set before any action 0 references it.||&lt;br /&gt;
&lt;br /&gt;
The DCxx IDs are allocated internally when defined, and are persistent in the savegame data. Each .grf file gets its own separate map of these internal IDs and thus may set all 256 of them. &amp;amp;nbsp;However, only 1024 IDs are available in total, to be shared by all .grf files ever activated in the savegame. This means these IDs should be used as sparingly as possible. But use them when they are useful!&lt;br /&gt;
&lt;br /&gt;
===text===&lt;br /&gt;
&lt;br /&gt;
This is a list of zero-terminated strings, there must be as many strings as num-ent specifies.&lt;br /&gt;
&lt;br /&gt;
You can use the [http://www.ttdpatch.net/cgi-bin/str2hex.pl|str2hex converter] to generate the proper hex values.&lt;br /&gt;
&lt;br /&gt;
Alternatively, use grfcodec version 0.9.6 or later, which accepts literal strings in the .nfo. These are encoded exactly as written, in whatever encoding your text editor uses; if you need a 00, put it immediately after the literal string.&lt;br /&gt;
&lt;br /&gt;
For the supported encodings, format, and restrictions on what characters you may use, please see [[GRFActionsDetailed#Strings|GRFActionsDetailed]] and StringCodes.&lt;br /&gt;
&lt;br /&gt;
A large number of original TTD strings require a colour code in front of the actual string. You can also use these colour codes in most of your custom strings. Use them wisely! In case a string requires a colour code, the string will have the code displayed in front of the default text as listed in [[TextIDs]].Typically, a colour coded string starts with the escape character (backslash), followed by hex byte and then the actual text string itself. I.e. string 0001 (&amp;amp;quot;\94Off edge of map&amp;amp;quot;) has colour code 0x94 in front of the text string, which will colour it white. You can also put the plain hex byte outside the quoted string without having to escape it. &#039;&#039;94 &amp;amp;quot;Off edge of map&amp;amp;quot;&#039;&#039; would be the same as &#039;&#039;&amp;amp;quot;\94Off edge of map&amp;amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The following 16 colour codes are available for use:&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Code&#039;&#039;&#039;|&#039;&#039;&#039;Colour&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
88|Blue&lt;br /&gt;
&lt;br /&gt;
89|Light Grey&lt;br /&gt;
&lt;br /&gt;
8A|Yellow&lt;br /&gt;
&lt;br /&gt;
8B|Red&lt;br /&gt;
&lt;br /&gt;
8C|Light Purple&lt;br /&gt;
&lt;br /&gt;
8D|Beige&lt;br /&gt;
&lt;br /&gt;
8E|Light Orange&lt;br /&gt;
&lt;br /&gt;
90|Light Yellow&lt;br /&gt;
&lt;br /&gt;
91|Light Green&lt;br /&gt;
&lt;br /&gt;
92|Light Pink&lt;br /&gt;
&lt;br /&gt;
93|Brown&lt;br /&gt;
&lt;br /&gt;
94|White&lt;br /&gt;
&lt;br /&gt;
95|Light Blue&lt;br /&gt;
&lt;br /&gt;
96|Grey&lt;br /&gt;
&lt;br /&gt;
97|Purple&lt;br /&gt;
&lt;br /&gt;
98|Black||&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&#039;color:#808080&#039;&amp;gt;Something to go here&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=TTDPatchFlags&amp;diff=751</id>
		<title>TTDPatchFlags</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=TTDPatchFlags&amp;diff=751"/>
		<updated>2011-02-06T21:29:46Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;TTDPatch Flags for Action 7/9 Variable 85&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=TTDPatch Flags for Action 7/9 Variable 85=&lt;br /&gt;
&lt;br /&gt;
Additional Information&lt;br /&gt;
&lt;br /&gt;
In the table below you find all the TTDPatch flags that belong to &amp;amp;lt;-+Param-num+-&amp;amp;gt; = 85 in Action 7 &amp;amp; Action 9.&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Bit&#039;&#039;&#039;|&#039;&#039;&#039;Switch (bit set = switch on)&#039;&#039;&#039;|&#039;&#039;&#039;Correspondence in OpenTTD&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
0C|keepsmallairport|station.never_expire_airports&lt;br /&gt;
&lt;br /&gt;
0D|newairports|1&lt;br /&gt;
&lt;br /&gt;
0E|largestations|1&lt;br /&gt;
&lt;br /&gt;
0F|longbridges|construction.longbridges&lt;br /&gt;
&lt;br /&gt;
10|loadtime|0&lt;br /&gt;
&lt;br /&gt;
12|presignals|1&lt;br /&gt;
&lt;br /&gt;
13|extpresignals|1&lt;br /&gt;
&lt;br /&gt;
16|enginespersist|vehicles.never_expire_vehicles&lt;br /&gt;
&lt;br /&gt;
1B|multihead|1&lt;br /&gt;
&lt;br /&gt;
1D|lowmemory|1&lt;br /&gt;
&lt;br /&gt;
1E|generalfixes|1&lt;br /&gt;
&lt;br /&gt;
27|moreairports|economy.station_noise_level&lt;br /&gt;
&lt;br /&gt;
28|mammothtrains|1&lt;br /&gt;
&lt;br /&gt;
29|trainrefit|1&lt;br /&gt;
&lt;br /&gt;
2B|subsidiaries|0&lt;br /&gt;
&lt;br /&gt;
2C|gradualloading|order.gradual_loading&lt;br /&gt;
&lt;br /&gt;
32|(Set to bit 0 of unifiedmaglev mode)|1 (n/a)&lt;br /&gt;
&lt;br /&gt;
33|(Set to bit 1 of unifiedmaglev mode)|1 (n/a)&lt;br /&gt;
&lt;br /&gt;
34|bridgespeedlimits|1&lt;br /&gt;
&lt;br /&gt;
36|eternalgame|1&lt;br /&gt;
&lt;br /&gt;
37|newtrains|1&lt;br /&gt;
&lt;br /&gt;
38|newrvs|1&lt;br /&gt;
&lt;br /&gt;
39|newships|1&lt;br /&gt;
&lt;br /&gt;
3A|newplanes|1&lt;br /&gt;
&lt;br /&gt;
3B|signalsontrafficside|construction.signal_side&lt;br /&gt;
&lt;br /&gt;
3C|electrifiedrailway|vehicle.disable_elrails&lt;br /&gt;
&lt;br /&gt;
41 *|loadallgraphics|1&lt;br /&gt;
&lt;br /&gt;
43|semaphores|1&lt;br /&gt;
&lt;br /&gt;
4A|newobjects (since r2364)|1&lt;br /&gt;
&lt;br /&gt;
4B|enhancegui|0&lt;br /&gt;
&lt;br /&gt;
4C|newagerating|0&lt;br /&gt;
&lt;br /&gt;
4D|buildonslopes|construction.build_on_slopes&lt;br /&gt;
&lt;br /&gt;
4E|fullloadany|1&lt;br /&gt;
&lt;br /&gt;
4F|planespeed|1&lt;br /&gt;
&lt;br /&gt;
50 *|moreindustriesperclimate|0&lt;br /&gt;
&lt;br /&gt;
51|moretoylandfeatures|0&lt;br /&gt;
&lt;br /&gt;
52|newstations|1&lt;br /&gt;
&lt;br /&gt;
53|tracktypecostdiff|1&lt;br /&gt;
&lt;br /&gt;
54|manualconvert|1&lt;br /&gt;
&lt;br /&gt;
55|buildoncoasts|construction.build_on_slopes&lt;br /&gt;
&lt;br /&gt;
56|canals|1&lt;br /&gt;
&lt;br /&gt;
57|newstartyear|1&lt;br /&gt;
&lt;br /&gt;
58|freighttrains|vehicle.freight_trains &amp;amp;gt; 1&lt;br /&gt;
&lt;br /&gt;
59|newhouses|1&lt;br /&gt;
&lt;br /&gt;
5A|newbridges|1&lt;br /&gt;
&lt;br /&gt;
5B|newtownnames|1&lt;br /&gt;
&lt;br /&gt;
5C|moreanimation|1&lt;br /&gt;
&lt;br /&gt;
5D|wagonspeedlimits|vehicle.wagon_speed_limits&lt;br /&gt;
&lt;br /&gt;
5E|newshistory|1&lt;br /&gt;
&lt;br /&gt;
5F|custombridgeheads|0&lt;br /&gt;
&lt;br /&gt;
60|newcargodistribution|0&lt;br /&gt;
&lt;br /&gt;
61|windowsnap|1&lt;br /&gt;
&lt;br /&gt;
62|townbuildnoroads|not (economy.allow_town_roads or _generating_world)&lt;br /&gt;
&lt;br /&gt;
63|pathbasedsignalling|1&lt;br /&gt;
&lt;br /&gt;
64|aichoosechances|0&lt;br /&gt;
&lt;br /&gt;
65|resolutionwidth|1&lt;br /&gt;
&lt;br /&gt;
66|resolutionheight|1&lt;br /&gt;
&lt;br /&gt;
67|newindustries|1&lt;br /&gt;
&lt;br /&gt;
68|fifoloading|order.improved_load&lt;br /&gt;
&lt;br /&gt;
69|townroadbranchprob|0&lt;br /&gt;
&lt;br /&gt;
6A|tempsnowline|0&lt;br /&gt;
&lt;br /&gt;
6B|newcargos|1&lt;br /&gt;
&lt;br /&gt;
6C|enhancemultiplayer|1&lt;br /&gt;
&lt;br /&gt;
6D|onewayroads|1&lt;br /&gt;
&lt;br /&gt;
6E|irregularstations|1&lt;br /&gt;
&lt;br /&gt;
6F|morestatistics|1&lt;br /&gt;
&lt;br /&gt;
70|newsounds|1&lt;br /&gt;
&lt;br /&gt;
71|autoreplace|1&lt;br /&gt;
&lt;br /&gt;
72|autoslope|1&lt;br /&gt;
&lt;br /&gt;
73|followvehicle|0&lt;br /&gt;
&lt;br /&gt;
74|trams|1&lt;br /&gt;
&lt;br /&gt;
75|enhancetunnels|0&lt;br /&gt;
&lt;br /&gt;
76|shortrvs|1&lt;br /&gt;
&lt;br /&gt;
77|articulatedrvs|1&lt;br /&gt;
&lt;br /&gt;
78|dynamicengines|vehicle.dynamic_engines, since r12924&lt;br /&gt;
&lt;br /&gt;
7E|variablerunningcosts (since r1421)|1&lt;br /&gt;
&lt;br /&gt;
7F|set if any switches are on|1||&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;* loadallgraphics is obsolete (and its bit unused) since revision 401. The next official versions were the 5/Jun/2006 nightly (402) and 2.5 beta 6 (472)&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; moreindustriesperclimate is obsolete (and its bit unused) since 2.5 beta 2.&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/Trains&amp;diff=229</id>
		<title>Action0/Vehicles/Trains</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/Trains&amp;diff=229"/>
		<updated>2011-02-04T19:28:31Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Action 0 properties for trains&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 0 - Properties for train vehicles=&lt;br /&gt;
&lt;br /&gt;
Defining properties of train vehicles.&lt;br /&gt;
&lt;br /&gt;
{maketoc}&lt;br /&gt;
&lt;br /&gt;
-=Properties=-&lt;br /&gt;
&lt;br /&gt;
||Number|Version|Size|Description|Available for articulated parts&lt;br /&gt;
&lt;br /&gt;
05| |B|Track type (see below)|should be same as front&lt;br /&gt;
&lt;br /&gt;
08| |B|AI special flag: set to 1 if engine is &#039;optimized&#039; for passenger service (AI won&#039;t use it for other cargo), 0 otherwise|no&lt;br /&gt;
&lt;br /&gt;
09| |W|Speed in mph*1.6 (see below)|no&lt;br /&gt;
&lt;br /&gt;
0B| |W|Power (0 for wagons)|should be zero&lt;br /&gt;
&lt;br /&gt;
0D| |B|Running cost factor (0 for wagons)|should be zero&lt;br /&gt;
&lt;br /&gt;
0E| |D|Running cost base, see below|should be zero&lt;br /&gt;
&lt;br /&gt;
12| |B|Sprite ID (FD for new graphics)|yes&lt;br /&gt;
&lt;br /&gt;
13| |B|Dual-headed flag; 1 if dual-headed engine, 0 otherwise|should be zero also for front&lt;br /&gt;
&lt;br /&gt;
14| |B|Cargo capacity|yes&lt;br /&gt;
&lt;br /&gt;
15| |B|Cargo type, see column 3 (type B) in [[CargoTypes]]|yes&lt;br /&gt;
&lt;br /&gt;
16| |B|Weight in tons|should be zero&lt;br /&gt;
&lt;br /&gt;
17| |B|Cost factor|should be zero&lt;br /&gt;
&lt;br /&gt;
18| |B|Engine rank for the AI (AI selects the highest-rank engine of those it can buy)|no&lt;br /&gt;
&lt;br /&gt;
19|1|B|Engine traction type (see below)|no&lt;br /&gt;
&lt;br /&gt;
1A|1/(f)|B/B*|Not a property, but an action: sort the purchase list.|no&lt;br /&gt;
&lt;br /&gt;
1B|6|W|Power added by each wagon connected to this engine, see below|should be zero&lt;br /&gt;
&lt;br /&gt;
1C|6|B|Refit cost, using 50% of the [[BaseCosts|purchase price cost base]]|yes&lt;br /&gt;
&lt;br /&gt;
1D|6|D|Bit mask of cargo types available for refitting, see column 2 (bit value) in [[CargoTypes]]|yes&lt;br /&gt;
&lt;br /&gt;
1E|6|B|Callback flags bit mask, see below|yes&lt;br /&gt;
&lt;br /&gt;
1F|(a)|B|Coefficient of tractive effort|should be zero&lt;br /&gt;
&lt;br /&gt;
20|(b)|B|Coefficient of air drag|should be zero&lt;br /&gt;
&lt;br /&gt;
21|2|B|Make vehicle shorter by this amount, see below|yes&lt;br /&gt;
&lt;br /&gt;
22|6|B|Set visual effect type (steam/smoke/sparks) as well as position, see below|yes&lt;br /&gt;
&lt;br /&gt;
23|6|B|Set how much weight is added by making wagons powered (i.e. weight of engine), see below|should be zero&lt;br /&gt;
&lt;br /&gt;
24|(c)|B|High byte of vehicle weight, weight will be prop.24*256+prop.16|should be zero&lt;br /&gt;
&lt;br /&gt;
25|(c)|B|User-defined bit mask to set when checking veh. var. 42|yes&lt;br /&gt;
&lt;br /&gt;
26|(c)|B|Retire vehicle early, this many years before the end of phase 2 (see [[Action0General]])|no&lt;br /&gt;
&lt;br /&gt;
27|(d)|B|Miscellaneous flags|partly&lt;br /&gt;
&lt;br /&gt;
28|(d)|W|Refittable cargo classes|yes&lt;br /&gt;
&lt;br /&gt;
29|(d)|W|Non-refittable cargo classes|yes&lt;br /&gt;
&lt;br /&gt;
2A|(e)|D|Long format introduction date|no||&lt;br /&gt;
&lt;br /&gt;
Version codes:&lt;br /&gt;
&lt;br /&gt;
||Code|Version&lt;br /&gt;
&lt;br /&gt;
(a)|2.0.1 alpha 19&lt;br /&gt;
&lt;br /&gt;
(b)|2.0.1 alpha 27&lt;br /&gt;
&lt;br /&gt;
(c)|2.0.1 alpha 44&lt;br /&gt;
&lt;br /&gt;
(d)|2.0.1 alpha 58&lt;br /&gt;
&lt;br /&gt;
(e)|2.5 r1210, OpenTTD r7191&lt;br /&gt;
&lt;br /&gt;
(f)|OpenTTD r13831||&lt;br /&gt;
&lt;br /&gt;
-=Comments=-&lt;br /&gt;
&lt;br /&gt;
==Track type (05)==&lt;br /&gt;
&lt;br /&gt;
Set track type of vehicle: 0 = rail, 1 = monorail, 2 = maglev. For setting the appropriate traction type, see [[Action0Trains#Engine_traction_type_19_|prop19]].&lt;br /&gt;
&lt;br /&gt;
In OpenTTD, if a [[Action0Railtypes|rail type]] translation table is loaded, this property is an index into the table instead.&lt;br /&gt;
&lt;br /&gt;
==Speed (09)==&lt;br /&gt;
&lt;br /&gt;
Train speed is in units of mph*1.6, i.e. approximately km/h.&lt;br /&gt;
&lt;br /&gt;
For wagons, this value is only used if the &amp;amp;quot;wagonspeedlimit&amp;amp;quot; switch is on, and it limits the speed of the train to that of the lowest wagon speed. &amp;amp;nbsp;This limit is ignored for wagons with a livery override for the current train, so that train sets always get their max speed from the engine&#039;s max speed.&lt;br /&gt;
&lt;br /&gt;
For wagons, a value of 0 means &amp;amp;quot;default&amp;amp;quot; (which depends on cargo type and date of introduction), and FFFF means no limit.&lt;br /&gt;
&lt;br /&gt;
==Power (0B)==&lt;br /&gt;
&lt;br /&gt;
The power of the engine, in HP.&lt;br /&gt;
&lt;br /&gt;
A value of 0 means that the vehicle will be a wagon, otherwise it will be an engine.&lt;br /&gt;
&lt;br /&gt;
==Running cost base (0E) and factor (0D)==&lt;br /&gt;
&lt;br /&gt;
TTD calculates all costs by multiplying a 32-bit [[BaseCosts|base amount]] with an 8-bit factor. &amp;amp;nbsp;The base amount is changed according to inflation, whereas the factor remains constant.&lt;br /&gt;
&lt;br /&gt;
For the running costs of train vehicles, the following base amounts are available depending on the vehicle type (the value here is a pointer into TTD&#039;s memory where the actual amount is stored):&lt;br /&gt;
&lt;br /&gt;
||Type|Value|in little-endian notation&lt;br /&gt;
&lt;br /&gt;
Steam engines|4C30|30 4C 00 00&lt;br /&gt;
&lt;br /&gt;
Diesel engines|4C36|36 4C 00 00&lt;br /&gt;
&lt;br /&gt;
Electric engines|4C3C|3C 4C 00 00&lt;br /&gt;
&lt;br /&gt;
Wagons|0|00 00 00 00||&lt;br /&gt;
&lt;br /&gt;
Theoretically, you could use pointers to other base amounts available in TTD, but these are the numbers TTD uses for train vehicles.&lt;br /&gt;
&lt;br /&gt;
The following are some real values for maintenance costs depending on the setting of the above two factors. &amp;amp;nbsp;This value is correct for medium difficulty, but increases and decreases for hard and easy difficulties respectively. &amp;amp;nbsp;These are the costs of a new game starting in 1921, because they obviously increase with inflation over time (unless noinflation is turned on).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running cost base 4C30 (steam)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
||Running cost factor|Maintenance cost&lt;br /&gt;
&lt;br /&gt;
01|$ 42&lt;br /&gt;
&lt;br /&gt;
10|$ 700&lt;br /&gt;
&lt;br /&gt;
20|$ 1.400&lt;br /&gt;
&lt;br /&gt;
80|$ 5.600&lt;br /&gt;
&lt;br /&gt;
A0|$ 7.000&lt;br /&gt;
&lt;br /&gt;
FF|$ 11.112||&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running cost base 4C36 (diesel)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
||Running cost factor|Maintenance cost&lt;br /&gt;
&lt;br /&gt;
01|$ 40&lt;br /&gt;
&lt;br /&gt;
10|$ 650&lt;br /&gt;
&lt;br /&gt;
20|$ 1.300&lt;br /&gt;
&lt;br /&gt;
80|$ 5.200&lt;br /&gt;
&lt;br /&gt;
A0|$ 6.500&lt;br /&gt;
&lt;br /&gt;
FF|$ 10.318||&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running cost base 4C3C (electric)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
||Running cost factor|Maintenance cost&lt;br /&gt;
&lt;br /&gt;
01|$ 36&lt;br /&gt;
&lt;br /&gt;
10|$ 600&lt;br /&gt;
&lt;br /&gt;
20|$ 1.200&lt;br /&gt;
&lt;br /&gt;
80|$ 4.800&lt;br /&gt;
&lt;br /&gt;
A0|$ 6.000&lt;br /&gt;
&lt;br /&gt;
FF|$ 9.524||&lt;br /&gt;
&lt;br /&gt;
==Cost factor (17)==&lt;br /&gt;
&lt;br /&gt;
The cost factor is a bit-coded value which determines how expensive an engine is. There is no distinction between steam, diesel or electric engines, they all use the same cost factor. The table below gives you some values to use for finding the right price for your engines.&lt;br /&gt;
&lt;br /&gt;
||Cost factor|Price&lt;br /&gt;
&lt;br /&gt;
01|$ 3.124&lt;br /&gt;
&lt;br /&gt;
10|$ 50.000&lt;br /&gt;
&lt;br /&gt;
20|$ 100.000&lt;br /&gt;
&lt;br /&gt;
80|$ 400.000&lt;br /&gt;
&lt;br /&gt;
A0|$ 500.000&lt;br /&gt;
&lt;br /&gt;
FF|$ 796.874||&lt;br /&gt;
&lt;br /&gt;
==Engine traction type (19)==&lt;br /&gt;
&lt;br /&gt;
This sets the traction type of a train engine, i.e. whether it is powered by steam, diesel, electric, monorail or maglev technology. &amp;amp;nbsp;It also sets the corresponding sound effect of the engine, and if property 22 is not set, the visual effect as well.&lt;br /&gt;
&lt;br /&gt;
The following ranges are available (and it does not matter which value you pick):&lt;br /&gt;
&lt;br /&gt;
||Values|Traction type&lt;br /&gt;
&lt;br /&gt;
00..07|Steam&lt;br /&gt;
&lt;br /&gt;
08..27|Diesel&lt;br /&gt;
&lt;br /&gt;
28..31|Electric&lt;br /&gt;
&lt;br /&gt;
32..37|Monorail&lt;br /&gt;
&lt;br /&gt;
38..41|Maglev||&lt;br /&gt;
&lt;br /&gt;
Default value is 00, i.e. steam. For setting the appropriate track type, see [[Action0Trains#Track_type_05_|prop05]].&lt;br /&gt;
&lt;br /&gt;
In OpenTTD, if a [[Action0Railtypes|rail type]] translation table is loaded, setting this property does NOT alter the track type.&lt;br /&gt;
&lt;br /&gt;
==Sort vehicle list (1A)==&lt;br /&gt;
&lt;br /&gt;
This property is an extended byte in OpenTTD since r13831!&lt;br /&gt;
&lt;br /&gt;
This is not a property as such, but an action. &amp;amp;nbsp;It forces TTDPatch to shuffle the vehicle this &amp;amp;quot;property&amp;amp;quot; is being set for in front of the vehicle with the given value of the property. &amp;amp;nbsp;The order of this list is only used in the train purchase window.&lt;br /&gt;
&lt;br /&gt;
For example, setting prop. 1A for vehicle 09 to a value of 07 would lead to the following internal list: ... 05 06 09 07 08 0A 0B ...&lt;br /&gt;
&lt;br /&gt;
This property can not simply be overwritten, because the list is already shuffled when trying to do so. &amp;amp;nbsp;It is possible to reset the list to its original order with a special action 0 that has num-info set to 0, and only sets property 1A for trains:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+00 00 01 00 00 1A+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resetting the list should however only be done by sets that contain replacements for all train vehicles.&lt;br /&gt;
&lt;br /&gt;
==Powered train wagons (1B and 23, see also 22)==&lt;br /&gt;
&lt;br /&gt;
Normally, train wagons are unpowered in TTD, and if you set property 0B to a non-zero value, they become engines instead. &amp;amp;nbsp;Therefore, to model real-life trains where wagons have power, a different mechanism is needed.&lt;br /&gt;
&lt;br /&gt;
To make train wagons powered, you set property 1B of the &#039;&#039;&#039;engine&#039;&#039;&#039; instead of the wagon. This determines how much power each wagon adds to the train when attached to this engine. This only applies to wagons with a [[Action3|graphics override]] for this engine as well. &amp;amp;nbsp;This means that for example passenger wagons (with an override) will add power, but coal wagons (with no override) will not.&lt;br /&gt;
&lt;br /&gt;
In addition to adding power, these wagons are also heavier by the amount set in property 23.&lt;br /&gt;
&lt;br /&gt;
==Callbacks (1E)==&lt;br /&gt;
&lt;br /&gt;
For trains, the following [[Callbacks|callbacks]] have to be enabled by setting the corresponding bit in property 1E (certain other, not as frequently used callbacks are available without setting a bit here):&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Variable 0C value|Callback&lt;br /&gt;
&lt;br /&gt;
0|1|10|Powered wagons and visual effect&lt;br /&gt;
&lt;br /&gt;
1|2|11|Wagon length&lt;br /&gt;
&lt;br /&gt;
2|4|12|Load amount&lt;br /&gt;
&lt;br /&gt;
3|8|15|Set refitted capacity&lt;br /&gt;
&lt;br /&gt;
4|10|16|Build articulated engines&lt;br /&gt;
&lt;br /&gt;
5|20|19|show a suffix after the cargo type name&lt;br /&gt;
&lt;br /&gt;
6|40|2D|Select color mapping for vehicle&lt;br /&gt;
&lt;br /&gt;
7|80|33|Sound effect callbacks||&lt;br /&gt;
&lt;br /&gt;
Bit is the bit you have to set, you do this by adding all the values for all the bits. Variable 0C value is what variable 0C will be set to, for checking it in the variational action 2 for callbacks.&lt;br /&gt;
&lt;br /&gt;
Callbacks 1D (Can wagon be attached?), 23 (Additional text in purchase screen), 31 (Start/stop check), 32 &amp;amp;nbsp; &amp;amp;nbsp;(32-day callback), 34 &amp;amp;nbsp; &amp;amp;nbsp; (Autoreplace vehicle selection) and 36 (Change Vehicle Properties) do not need a bit to activate them, they are always active and will be used if defined in the action 3/action 2 chain.&lt;br /&gt;
&lt;br /&gt;
==Coefficient of tractive effort (1F)==&lt;br /&gt;
&lt;br /&gt;
This cofficient sets what fraction of the vehicle weight is equal to the maximum tractive effort. &amp;amp;nbsp;This includes the effect of having some unpowered axles, as well as the coefficient of friction that is available.&lt;br /&gt;
&lt;br /&gt;
Theoretically, this value should be calculated by taking the ratio of adhesive weight W{SUB()}adh{SUB} (i.e. the vehicle weight that rests on powered axles) times the coefficient of friction &amp;amp;micro; between the wheels and the rails to the total vehicle weight W, times 255, and convert to hex:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;prop. 1F = HEX &lt;br /&gt;
&lt;br /&gt;
[[Action0Cargos#Cargo_classes_16_|action0 cargos]] page for bits and classes defined so far.&lt;br /&gt;
&lt;br /&gt;
Note that cargo types may belong to several classes. This is the reason for making two properties, an additive and a subtractive one, because this way a vehicle can be specified to be refittable to, for example, all express cargo that does not require refrigeration (i.e., from the default cargos, no food).&lt;br /&gt;
&lt;br /&gt;
For the cargo types added in this way, the vehicle will probably have no specific graphics (in [[Action3|action 3]]) to show the cargo load. &amp;amp;nbsp;In this case, the default will be used, which should therefore be sufficiently generic-looking if possible. However, using [[VarAction2Vehicles#Vehicle_cargo_info_47_|vehicle variable 47]] you can at least select the graphics most appropriate for the cargo type&#039;s class.&lt;br /&gt;
&lt;br /&gt;
About the interaction with other properties take a look at the summary page about &amp;amp;nbsp;[[VehicleRefitting|vehicle refitting]].&lt;br /&gt;
&lt;br /&gt;
==Long format introduction date (2A)==&lt;br /&gt;
&lt;br /&gt;
Set the vehicle introduction date, in days since the year 0. This takes account of leap years; dividable by 4, but not 100 unless 400. A start date of 1920-01-01 is obtained with a value of 701265 (51 B3 0A 00). This property must be set after property 00 to take effect. In TTDPatch, dates after 2044 will be limited to 2044.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
Below is an example of what a real Action 0 pseudo-sprite could look like for a train engine.&lt;br /&gt;
&lt;br /&gt;
(A basic version)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;10 * 14 &amp;amp;nbsp;00 00 03 01 02 09 C0 00 0B D8 0E 12 FD&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Bytes&#039;&#039;&#039;|&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
10|&amp;amp;lt;Sprite-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
14|&amp;amp;lt;Length&amp;amp;gt;: of the action in bytes; start counting at 0 (&amp;amp;lt;action&amp;amp;gt;)&lt;br /&gt;
&lt;br /&gt;
00|&amp;amp;lt;action&amp;amp;gt;: sets this pseudo-sprite to function as action 0&lt;br /&gt;
&lt;br /&gt;
00|&amp;amp;lt;Feature&amp;amp;gt;: In this case Train&lt;br /&gt;
&lt;br /&gt;
03|&amp;amp;lt;Num-props&amp;amp;gt;: 3 Properties to change&lt;br /&gt;
&lt;br /&gt;
01|&amp;amp;lt;Num-info&amp;amp;gt;: 1 vehicle ID to make changes to&lt;br /&gt;
&lt;br /&gt;
02|&amp;amp;lt;ids...&amp;amp;gt;: vehcile ID (02 - Ploddyphut Choo-Choo)&lt;br /&gt;
&lt;br /&gt;
|&#039;&#039;&#039;Properties&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
09|&amp;amp;lt;Speed&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
C0 00|&amp;amp;lt;Value&amp;amp;gt;: Value for Speed (192 Km/h)&lt;br /&gt;
&lt;br /&gt;
0B|&amp;amp;lt;Power&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
D8 0E|&amp;amp;lt;value&amp;amp;gt;: value for Power (3800 HP)&lt;br /&gt;
&lt;br /&gt;
12|&amp;amp;lt;Sprite ID&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
FD|&amp;amp;lt;value&amp;amp;gt;: FD for new graphics||&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Railtypes&amp;diff=162</id>
		<title>Action0/Railtypes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Railtypes&amp;diff=162"/>
		<updated>2011-01-20T12:26:59Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Action 0 properties for rail types&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 0 - Properties for rail types=&lt;br /&gt;
&lt;br /&gt;
Defining properties of rail types.&lt;br /&gt;
&lt;br /&gt;
Note: This feature is only available in OpenTTD &amp;amp;gt; r18969&lt;br /&gt;
&lt;br /&gt;
{maketoc}&lt;br /&gt;
&lt;br /&gt;
-=Properties=-&lt;br /&gt;
&lt;br /&gt;
||Number|Version|Size|Description&lt;br /&gt;
&lt;br /&gt;
08| |4*B|Rail type label&lt;br /&gt;
&lt;br /&gt;
09| |W|StringID: Build rail toolbar caption&lt;br /&gt;
&lt;br /&gt;
0A| |W|StringID: Rail construction dropdown text&lt;br /&gt;
&lt;br /&gt;
0B| |W|StringID: Build vehicle window caption&lt;br /&gt;
&lt;br /&gt;
0C| |W|StringID: Autoreplace text&lt;br /&gt;
&lt;br /&gt;
0D| |W|StringID: New engine text&lt;br /&gt;
&lt;br /&gt;
0E| |B n*D |Compatible rail type list&lt;br /&gt;
&lt;br /&gt;
0F| |B n*D |Powered rail type list&lt;br /&gt;
&lt;br /&gt;
10| |B|Rail type flags&lt;br /&gt;
&lt;br /&gt;
11| |B|Curve speed advantage multiplier&lt;br /&gt;
&lt;br /&gt;
12| |B|Station graphics&lt;br /&gt;
&lt;br /&gt;
13| |W (a)|Construction costs&lt;br /&gt;
&lt;br /&gt;
14| |W|Speed limit&lt;br /&gt;
&lt;br /&gt;
15| |B|Acceleration model&lt;br /&gt;
&lt;br /&gt;
16|r19307|B|Minimap colour&lt;br /&gt;
&lt;br /&gt;
17|r21842|D|Introduction date&lt;br /&gt;
&lt;br /&gt;
18|r21842|B n*D |Introduction required rail type list&lt;br /&gt;
&lt;br /&gt;
19|r21841|B n*D |Introduced rail type list&lt;br /&gt;
&lt;br /&gt;
1A|r21866|B|Sort order||&lt;br /&gt;
&lt;br /&gt;
(a) In r18969 to 19306 this property was byte-sized.&lt;br /&gt;
&lt;br /&gt;
In NFO, rail type IDs will be GRF local, with an ID to label mapping. Therefore to modify an existing rail type, specify its label in property 08. To create a new rail type, again just specify its label in property 08. This way there is no need for complex GRM mechanisms to allocate IDs. If a label &#039;clashes&#039; with another GRF, then one GRF will end up modifying the properties instead of creating a new rail type.&lt;br /&gt;
&lt;br /&gt;
When a new rail type is created, it is populated with the information from the first rail type, except that the compatible and powered list contain only the rail type being created. However, no default values should be assumed, as the first rail type may have been modified.&lt;br /&gt;
&lt;br /&gt;
-=Comments=-&lt;br /&gt;
&lt;br /&gt;
==Rail type label (08)==&lt;br /&gt;
&lt;br /&gt;
These are globally unique four-letter identifiers for specific rail types (analoguous to [[Action0Cargos#Cargo_label_17_|cargo labels]]), used to make various rail types accessible from train vehicle grfs. Reserved labels for default rail types are:&lt;br /&gt;
&lt;br /&gt;
||Label|rail type&lt;br /&gt;
&lt;br /&gt;
RAIL | Normal rail&lt;br /&gt;
&lt;br /&gt;
ELRL | electrified rail&lt;br /&gt;
&lt;br /&gt;
MONO | mono rail&lt;br /&gt;
&lt;br /&gt;
MGLV | maglev rail||&lt;br /&gt;
&lt;br /&gt;
Rail type sets may use up to 16 railtypes and have to specify their own [[RailtypeLabels|labels]].&lt;br /&gt;
&lt;br /&gt;
See also [[Action0GeneralVariables#Rail_type_translation_table_12_| rail type translation table]] for further info.&lt;br /&gt;
&lt;br /&gt;
==Build rail toolbar caption (09)==&lt;br /&gt;
&lt;br /&gt;
String ID of the name of the rail type as shown in the toolbar caption.&lt;br /&gt;
&lt;br /&gt;
OpenTTD before r20342 and 1.0.3 require the string to start with the white control code. Later versions of OpenTTD will automatically default to white.&lt;br /&gt;
&lt;br /&gt;
==Rail construction dropdown text (0A)==&lt;br /&gt;
&lt;br /&gt;
String ID for text in the dropdown of all rail types.&lt;br /&gt;
&lt;br /&gt;
This string must never start with a colour control code.&lt;br /&gt;
&lt;br /&gt;
==Build vehicle window caption (0B)==&lt;br /&gt;
&lt;br /&gt;
String ID for build vehicle window caption.&lt;br /&gt;
&lt;br /&gt;
OpenTTD before r20342 and 1.0.3 require the string to start with the white control code. Later versions of OpenTTD will automatically default to white.&lt;br /&gt;
&lt;br /&gt;
==Autoreplace text (0C)==&lt;br /&gt;
&lt;br /&gt;
String ID for rail type shown in autoreplace window.&lt;br /&gt;
&lt;br /&gt;
==New engines (0D)==&lt;br /&gt;
&lt;br /&gt;
StringID to use for showing texts of the type &amp;amp;quot;We have invented a new &amp;amp;lt;rail type&amp;amp;gt; engine&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Compatible rail type list (0E)==&lt;br /&gt;
&lt;br /&gt;
List of rail types on which trains of this rail type can run, even though they might not be powered. E.g. wagons/engines of &amp;amp;quot;eletrified rail&amp;amp;quot;-type are also compatible to &amp;amp;quot;normal rail&amp;amp;quot; and &amp;amp;quot;third rail&amp;amp;quot; type, but they are not powered (there need to be an other powered engine in the consist to move the train).&lt;br /&gt;
&lt;br /&gt;
The format is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+0E &amp;amp;lt;nvar&amp;amp;gt; (&amp;amp;lt;rail type label&amp;amp;gt;){n}+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That is you give the number of compatible rail types in a single byte followed by a list of that length of rail type labels. A rail type is automatically compatible (and powered) with itself, so you don&#039;t need to list the current rail type.&lt;br /&gt;
&lt;br /&gt;
Note that these properties apply to trains of this rail type, not the track. If you want trains of other rail types to be able to run on your rail types, you must set the compatible rail types property for each rail type. Setting these properties behaves always incremental, so you only need to the set additional bits for each other rail type, you cannot remove compatibility/poweredness once it is set (by some other grf).&lt;br /&gt;
&lt;br /&gt;
==Powered rail type list (0F)==&lt;br /&gt;
&lt;br /&gt;
List of rail types on which trains of this rail type are powered. E.g. engines of &amp;amp;quot;normal rail&amp;amp;quot;-type are powered on &amp;amp;quot;electrified rail&amp;amp;quot;- and &amp;amp;quot;third-rail&amp;amp;quot;-type as well.&lt;br /&gt;
&lt;br /&gt;
Same format as for property 0E above.&lt;br /&gt;
&lt;br /&gt;
==Rail type flags (10)==&lt;br /&gt;
&lt;br /&gt;
Flags to define properties related to the rail type:&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Meaning&lt;br /&gt;
&lt;br /&gt;
0|1|Draw catenary for this rail&lt;br /&gt;
&lt;br /&gt;
1|2|Disallow level crossings for this rail (OpenTTD since r20049)||&lt;br /&gt;
&lt;br /&gt;
==Curve Speed advantage multiplier (11)==&lt;br /&gt;
&lt;br /&gt;
This property sets the multiplier to the curve speed advantage which all trains running on this track type get. The base curve speed advantage is given by the multiplication of the value of this property with the base speed advantage - which depends on the curve length in wagons:&lt;br /&gt;
&lt;br /&gt;
||curve length | base speed adv.&lt;br /&gt;
&lt;br /&gt;
0 (90&amp;amp;deg; turn) |30&lt;br /&gt;
&lt;br /&gt;
1 (2x45&amp;amp;deg; turn) |44&lt;br /&gt;
&lt;br /&gt;
2| 55&lt;br /&gt;
&lt;br /&gt;
3| 66&lt;br /&gt;
&lt;br /&gt;
4| 75&lt;br /&gt;
&lt;br /&gt;
5| 84&lt;br /&gt;
&lt;br /&gt;
6| 91&lt;br /&gt;
&lt;br /&gt;
7| 98&lt;br /&gt;
&lt;br /&gt;
8| 103&lt;br /&gt;
&lt;br /&gt;
9| 108&lt;br /&gt;
&lt;br /&gt;
10| 111&lt;br /&gt;
&lt;br /&gt;
11| 114&lt;br /&gt;
&lt;br /&gt;
12+| 115||&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;Curve length&amp;amp;quot; is the average number of wagons of the train between turns. However, very sharp turns (values 0 and 1) are not averaged out in longer trains.&lt;br /&gt;
&lt;br /&gt;
The maximum speed for a train in a curve is defined by &amp;amp;quot;base speed advantage&amp;amp;quot; * (2 + &amp;amp;quot;property 11&amp;amp;quot;). Tilting trains get an additional bonus of 20% to this value.&lt;br /&gt;
&lt;br /&gt;
For the default rail types this property is 0 for normal rail and electrified rail, 1 for monorail, and 2 for maglev.&lt;br /&gt;
&lt;br /&gt;
==Station graphics (12)==&lt;br /&gt;
&lt;br /&gt;
This property defines the default graphics for the stations. There are three kind of default stations, usually associated with rail, monorail and maglev tracks. Valid values are:&lt;br /&gt;
&lt;br /&gt;
||Value|Meaning&lt;br /&gt;
&lt;br /&gt;
0|normal rail&lt;br /&gt;
&lt;br /&gt;
1|monorail&lt;br /&gt;
&lt;br /&gt;
2|maglev||&lt;br /&gt;
&lt;br /&gt;
==Speed limit (14)==&lt;br /&gt;
&lt;br /&gt;
Speed limit in mph*1.6 (approx. km/h). Set to &amp;amp;quot;0&amp;amp;quot; for no limit at all.&lt;br /&gt;
&lt;br /&gt;
==Acceleration model (15)==&lt;br /&gt;
&lt;br /&gt;
This property defines the acceleration model used. Valid values range from 0 to 2:&lt;br /&gt;
&lt;br /&gt;
||Value|Meaning&lt;br /&gt;
&lt;br /&gt;
0|normal rail&lt;br /&gt;
&lt;br /&gt;
1|monorail&lt;br /&gt;
&lt;br /&gt;
2|maglev||&lt;br /&gt;
&lt;br /&gt;
There is currently no difference between normal rail and monorail.&lt;br /&gt;
&lt;br /&gt;
==Map colour (16)==&lt;br /&gt;
&lt;br /&gt;
This property defines the colour this track type is drawn in the minimap view. The byte value specifies the colour entry in the [[PalettesAndCoordinates| DOS palette]].&lt;br /&gt;
&lt;br /&gt;
==Introduction date (17)==&lt;br /&gt;
&lt;br /&gt;
This property defines the long date formatted introduction date of this rail type. With this property set the rail type will be introduced at (or after) this date when all of the introduction required rail types are available to the company of the player, or whenever a vehicle using this rail type gets introduced whichever is first.&lt;br /&gt;
&lt;br /&gt;
==Introduction required rail type list (18)==&lt;br /&gt;
&lt;br /&gt;
List of rail types on that need to be available to the company of the player for this rail type to be introduced at (or after) the introduction date. This limit does not apply when the rail type is introduced by the introduction of a vehicle.&lt;br /&gt;
&lt;br /&gt;
Same format as for property 0E above.&lt;br /&gt;
&lt;br /&gt;
This can, for example, be used to introduce a third rail with catenary track type when both third rail and catenary rail types are available.&lt;br /&gt;
&lt;br /&gt;
==Introduced rail type list (19)==&lt;br /&gt;
&lt;br /&gt;
List of rail types that get introduced when this rail type is introduced. For example, to make sure that when a fast rail type is introduced the slow variant exists.&lt;br /&gt;
&lt;br /&gt;
Same format as for property 0E above.&lt;br /&gt;
&lt;br /&gt;
==Sort order (1A)==&lt;br /&gt;
&lt;br /&gt;
Property for influencing the sort order of the drop down lists with rail types. Default values are as follows:&lt;br /&gt;
&lt;br /&gt;
||Value|Meaning&lt;br /&gt;
&lt;br /&gt;
07|normal rail&lt;br /&gt;
&lt;br /&gt;
17|electrified rail&lt;br /&gt;
&lt;br /&gt;
27|monorail&lt;br /&gt;
&lt;br /&gt;
37|maglev&lt;br /&gt;
&lt;br /&gt;
n7|railtype #n||&lt;br /&gt;
&lt;br /&gt;
Thus the rail type that (internally) gets index 8 will get a default value of 87. These defaults are to keep the ordering when this property is not supported as they were.&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Railtypes&amp;diff=164</id>
		<title>Action0/Railtypes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Railtypes&amp;diff=164"/>
		<updated>2011-01-18T21:41:14Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Action 0 properties for rail types&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 0 - Properties for rail types=&lt;br /&gt;
&lt;br /&gt;
Defining properties of rail types.&lt;br /&gt;
&lt;br /&gt;
Note: This feature is only available in OpenTTD &amp;amp;gt; r18969&lt;br /&gt;
&lt;br /&gt;
{maketoc}&lt;br /&gt;
&lt;br /&gt;
-=Properties=-&lt;br /&gt;
&lt;br /&gt;
||Number|Version|Size|Description&lt;br /&gt;
&lt;br /&gt;
08| |4*B|Rail type label&lt;br /&gt;
&lt;br /&gt;
09| |W|StringID: Build rail toolbar caption&lt;br /&gt;
&lt;br /&gt;
0A| |W|StringID: Rail construction dropdown text&lt;br /&gt;
&lt;br /&gt;
0B| |W|StringID: Build vehicle window caption&lt;br /&gt;
&lt;br /&gt;
0C| |W|StringID: Autoreplace text&lt;br /&gt;
&lt;br /&gt;
0D| |W|StringID: New engine text&lt;br /&gt;
&lt;br /&gt;
0E| |B n*D |Compatible rail type list&lt;br /&gt;
&lt;br /&gt;
0F| |B n*D |Powered rail type list&lt;br /&gt;
&lt;br /&gt;
10| |B|Rail type flags&lt;br /&gt;
&lt;br /&gt;
11| |B|Curve speed advantage multiplier&lt;br /&gt;
&lt;br /&gt;
12| |B|Station graphics&lt;br /&gt;
&lt;br /&gt;
13| |W (a)|Construction costs&lt;br /&gt;
&lt;br /&gt;
14| |W|Speed limit&lt;br /&gt;
&lt;br /&gt;
15| |B|Acceleration model&lt;br /&gt;
&lt;br /&gt;
16|r19307|B|Minimap colour&lt;br /&gt;
&lt;br /&gt;
17|r21842|W|Introduction date&lt;br /&gt;
&lt;br /&gt;
18|r21842|B n*D |Introduction required rail type list&lt;br /&gt;
&lt;br /&gt;
19|r21841|B n*D |Introduced rail type list||&lt;br /&gt;
&lt;br /&gt;
(a) In r18969 to 19306 this property was byte-sized.&lt;br /&gt;
&lt;br /&gt;
In NFO, rail type IDs will be GRF local, with an ID to label mapping. Therefore to modify an existing rail type, specify its label in property 08. To create a new rail type, again just specify its label in property 08. This way there is no need for complex GRM mechanisms to allocate IDs. If a label &#039;clashes&#039; with another GRF, then one GRF will end up modifying the properties instead of creating a new rail type.&lt;br /&gt;
&lt;br /&gt;
When a new rail type is created, it is populated with the information from the first rail type, except that the compatible and powered list contain only the rail type being created. However, no default values should be assumed, as the first rail type may have been modified.&lt;br /&gt;
&lt;br /&gt;
-=Comments=-&lt;br /&gt;
&lt;br /&gt;
==Rail type label (08)==&lt;br /&gt;
&lt;br /&gt;
These are globally unique four-letter identifiers for specific rail types (analoguous to [[Action0Cargos#Cargo_label_17_|cargo labels]]), used to make various rail types accessible from train vehicle grfs. Reserved labels for default rail types are:&lt;br /&gt;
&lt;br /&gt;
||Label|rail type&lt;br /&gt;
&lt;br /&gt;
RAIL | Normal rail&lt;br /&gt;
&lt;br /&gt;
ELRL | electrified rail&lt;br /&gt;
&lt;br /&gt;
MONO | mono rail&lt;br /&gt;
&lt;br /&gt;
MGLV | maglev rail||&lt;br /&gt;
&lt;br /&gt;
Rail type sets may use up to 16 railtypes and have to specify their own [[RailtypeLabels|labels]].&lt;br /&gt;
&lt;br /&gt;
See also [[Action0GeneralVariables#Rail_type_translation_table_12_| rail type translation table]] for further info.&lt;br /&gt;
&lt;br /&gt;
==Build rail toolbar caption (09)==&lt;br /&gt;
&lt;br /&gt;
String ID of the name of the rail type as shown in the toolbar caption.&lt;br /&gt;
&lt;br /&gt;
OpenTTD before r20342 and 1.0.3 require the string to start with the white control code. Later versions of OpenTTD will automatically default to white.&lt;br /&gt;
&lt;br /&gt;
==Rail construction dropdown text (0A)==&lt;br /&gt;
&lt;br /&gt;
String ID for text in the dropdown of all rail types.&lt;br /&gt;
&lt;br /&gt;
This string must never start with a colour control code.&lt;br /&gt;
&lt;br /&gt;
==Build vehicle window caption (0B)==&lt;br /&gt;
&lt;br /&gt;
String ID for build vehicle window caption.&lt;br /&gt;
&lt;br /&gt;
OpenTTD before r20342 and 1.0.3 require the string to start with the white control code. Later versions of OpenTTD will automatically default to white.&lt;br /&gt;
&lt;br /&gt;
==Autoreplace text (0C)==&lt;br /&gt;
&lt;br /&gt;
String ID for rail type shown in autoreplace window.&lt;br /&gt;
&lt;br /&gt;
==New engines (0D)==&lt;br /&gt;
&lt;br /&gt;
StringID to use for showing texts of the type &amp;amp;quot;We have invented a new &amp;amp;lt;rail type&amp;amp;gt; engine&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Compatible rail type list (0E)==&lt;br /&gt;
&lt;br /&gt;
List of rail types on which trains of this rail type can run, even though they might not be powered. E.g. wagons/engines of &amp;amp;quot;eletrified rail&amp;amp;quot;-type are also compatible to &amp;amp;quot;normal rail&amp;amp;quot; and &amp;amp;quot;third rail&amp;amp;quot; type, but they are not powered (there need to be an other powered engine in the consist to move the train).&lt;br /&gt;
&lt;br /&gt;
The format is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+0E &amp;amp;lt;nvar&amp;amp;gt; (&amp;amp;lt;rail type label&amp;amp;gt;){n}+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That is you give the number of compatible rail types in a single byte followed by a list of that length of rail type labels. A rail type is automatically compatible (and powered) with itself, so you don&#039;t need to list the current rail type.&lt;br /&gt;
&lt;br /&gt;
Note that these properties apply to trains of this rail type, not the track. If you want trains of other rail types to be able to run on your rail types, you must set the compatible rail types property for each rail type. Setting these properties behaves always incremental, so you only need to the set additional bits for each other rail type, you cannot remove compatibility/poweredness once it is set (by some other grf).&lt;br /&gt;
&lt;br /&gt;
==Powered rail type list (0F)==&lt;br /&gt;
&lt;br /&gt;
List of rail types on which trains of this rail type are powered. E.g. engines of &amp;amp;quot;normal rail&amp;amp;quot;-type are powered on &amp;amp;quot;electrified rail&amp;amp;quot;- and &amp;amp;quot;third-rail&amp;amp;quot;-type as well.&lt;br /&gt;
&lt;br /&gt;
Same format as for property 0E above.&lt;br /&gt;
&lt;br /&gt;
==Rail type flags (10)==&lt;br /&gt;
&lt;br /&gt;
Flags to define properties related to the rail type:&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Meaning&lt;br /&gt;
&lt;br /&gt;
0|1|Draw catenary for this rail&lt;br /&gt;
&lt;br /&gt;
1|2|Disallow level crossings for this rail (OpenTTD since r20049)||&lt;br /&gt;
&lt;br /&gt;
==Curve Speed advantage multiplier (11)==&lt;br /&gt;
&lt;br /&gt;
This property sets the multiplier to the curve speed advantage which all trains running on this track type get. The base curve speed advantage is given by the multiplication of the value of this property with the base speed advantage - which depends on the curve length in wagons:&lt;br /&gt;
&lt;br /&gt;
||curve length | base speed adv.&lt;br /&gt;
&lt;br /&gt;
0 (90&amp;amp;deg; turn) |30&lt;br /&gt;
&lt;br /&gt;
1 (2x45&amp;amp;deg; turn) |44&lt;br /&gt;
&lt;br /&gt;
2| 55&lt;br /&gt;
&lt;br /&gt;
3| 66&lt;br /&gt;
&lt;br /&gt;
4| 75&lt;br /&gt;
&lt;br /&gt;
5| 84&lt;br /&gt;
&lt;br /&gt;
6| 91&lt;br /&gt;
&lt;br /&gt;
7| 98&lt;br /&gt;
&lt;br /&gt;
8| 103&lt;br /&gt;
&lt;br /&gt;
9| 108&lt;br /&gt;
&lt;br /&gt;
10| 111&lt;br /&gt;
&lt;br /&gt;
11| 114&lt;br /&gt;
&lt;br /&gt;
12+| 115||&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;Curve length&amp;amp;quot; is the average number of wagons of the train between turns. However, very sharp turns (values 0 and 1) are not averaged out in longer trains.&lt;br /&gt;
&lt;br /&gt;
The maximum speed for a train in a curve is defined by &amp;amp;quot;base speed advantage&amp;amp;quot; * (2 + &amp;amp;quot;property 11&amp;amp;quot;). Tilting trains get an additional bonus of 20% to this value.&lt;br /&gt;
&lt;br /&gt;
For the default rail types this property is 0 for normal rail and electrified rail, 1 for monorail, and 2 for maglev.&lt;br /&gt;
&lt;br /&gt;
==Station graphics (12)==&lt;br /&gt;
&lt;br /&gt;
This property defines the default graphics for the stations. There are three kind of default stations, usually associated with rail, monorail and maglev tracks. Valid values are:&lt;br /&gt;
&lt;br /&gt;
||Value|Meaning&lt;br /&gt;
&lt;br /&gt;
0|normal rail&lt;br /&gt;
&lt;br /&gt;
1|monorail&lt;br /&gt;
&lt;br /&gt;
2|maglev||&lt;br /&gt;
&lt;br /&gt;
==Speed limit (14)==&lt;br /&gt;
&lt;br /&gt;
Speed limit in mph*1.6 (approx. km/h). Set to &amp;amp;quot;0&amp;amp;quot; for no limit at all.&lt;br /&gt;
&lt;br /&gt;
==Acceleration model (15)==&lt;br /&gt;
&lt;br /&gt;
This property defines the acceleration model used. Valid values range from 0 to 2:&lt;br /&gt;
&lt;br /&gt;
||Value|Meaning&lt;br /&gt;
&lt;br /&gt;
0|normal rail&lt;br /&gt;
&lt;br /&gt;
1|monorail&lt;br /&gt;
&lt;br /&gt;
2|maglev||&lt;br /&gt;
&lt;br /&gt;
There is currently no difference between normal rail and monorail.&lt;br /&gt;
&lt;br /&gt;
==Map colour (16)==&lt;br /&gt;
&lt;br /&gt;
This property defines the colour this track type is drawn in the minimap view. The byte value specifies the colour entry in the [[PalettesAndCoordinates| DOS palette]].&lt;br /&gt;
&lt;br /&gt;
==Introduction date (17)==&lt;br /&gt;
&lt;br /&gt;
This property defines the long date formatted introduction date of this rail type. With this property set the rail type will be introduced at (or after) this date when all of the introduction required rail types are available to the company of the player, or whenever a vehicle using this rail type gets introduced whichever is first.&lt;br /&gt;
&lt;br /&gt;
==Introduction required rail type list (18)==&lt;br /&gt;
&lt;br /&gt;
List of rail types on that need to be available to the company of the player for this rail type to be introduced at (or after) the introduction date. This limit does not apply when the rail type is introduced by the introduction of a vehicle.&lt;br /&gt;
&lt;br /&gt;
Same format as for property 0E above.&lt;br /&gt;
&lt;br /&gt;
This can, for example, be used to introduce a third rail with catenary track type when both third rail and catenary rail types are available.&lt;br /&gt;
&lt;br /&gt;
==Introduced rail type list (19)==&lt;br /&gt;
&lt;br /&gt;
List of rail types that get introduced when this rail type is introduced. For example, to make sure that when a fast rail type is introduced the slow variant exists.&lt;br /&gt;
&lt;br /&gt;
Same format as for property 0E above.&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=VariationalAction2&amp;diff=708</id>
		<title>VariationalAction2</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=VariationalAction2&amp;diff=708"/>
		<updated>2010-12-08T18:17:00Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Variational Action 2&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Variational Action 2=&lt;br /&gt;
&lt;br /&gt;
Defining a choice between several action 2 entries&lt;br /&gt;
&lt;br /&gt;
-=Introduction=-&lt;br /&gt;
&lt;br /&gt;
To support changes in graphics based on other factors than just the load states, you use a variational action 2. This provides a sophisticated way of deciding what graphics to use.&lt;br /&gt;
&lt;br /&gt;
A variational action 2 can be used like any other action 2, but it provides an additional step in-between: instead of defining the action 1 sets right away, it instead specifies a list of additional action 2 entry, one of which is used depending on the kind of variation that is defined. These action 2 entries that are referred can in turn be variational or random (to provide chains of decisions), or they can be the final element, that is a regular action 2 which contains definitions of action 1 sets, or a callback result.&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
The data looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 02 &amp;amp;lt;feature&amp;amp;gt; &amp;amp;lt;set-id&amp;amp;gt; &amp;amp;lt;type&amp;amp;gt; &amp;amp;lt;variable&amp;amp;gt; &amp;amp;lt;varadjust&amp;amp;gt; &amp;amp;lt;nvar&amp;amp;gt; (&amp;amp;lt;set-id&amp;amp;gt; &amp;amp;lt;low-range&amp;amp;gt; &amp;amp;lt;high-range&amp;amp;gt;){n} &amp;amp;lt;default&amp;amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes used in this action.&lt;br /&gt;
&lt;br /&gt;
02|B|Defines action 02&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;feature&amp;amp;gt;|B|For what type of vehicle/station should this definition be used?&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;set-id&amp;amp;gt;|B|The ID of this action 2 (used like a cargo ID)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;type&amp;amp;gt;|B|Type of variational action 2, see below&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;variable&amp;amp;gt;|B|Which variable we base the decision on&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;varadjust&amp;amp;gt;|V|How to manipulate the value before deciding.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;nvar&amp;amp;gt;|B|Number of different ranges of the value (not counting the default)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;set-id&amp;amp;gt;|W|Action 2 set-id to use for the following range.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;low-range&amp;amp;gt;|B/W/D|Minimum (inclusive) of the range for which to use the above set-id&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;high-range&amp;amp;gt;|B/W/D|Maximum (inclusive) of the range&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;default&amp;amp;gt;|W|Action 2 set-id to use if no range matches||&lt;br /&gt;
&lt;br /&gt;
You repeat the sequence of &amp;amp;lt;set-id&amp;amp;gt; &amp;amp;lt;low-range&amp;amp;gt; &amp;amp;lt;high-range&amp;amp;gt; as often as &amp;amp;lt;nvar&amp;amp;gt; specifies.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;low-range&amp;amp;gt; and &amp;amp;lt;high-range&amp;amp;gt; have a size of B, W, or D, depending on &amp;amp;lt;type&amp;amp;gt;. See that entry for more information.&lt;br /&gt;
&lt;br /&gt;
-=Filling in the terms=-&lt;br /&gt;
&lt;br /&gt;
===Sprite-number===&lt;br /&gt;
&lt;br /&gt;
This is just the number you are at.&lt;br /&gt;
&lt;br /&gt;
===Length===&lt;br /&gt;
&lt;br /&gt;
Count the number of bytes in this action.&lt;br /&gt;
&lt;br /&gt;
===feature===&lt;br /&gt;
&lt;br /&gt;
This sets the type of feature that you wish to change. Set it to:&lt;br /&gt;
&lt;br /&gt;
00 for trains&lt;br /&gt;
&lt;br /&gt;
01 for road vehicles&lt;br /&gt;
&lt;br /&gt;
02 for ships&lt;br /&gt;
&lt;br /&gt;
03 for planes&lt;br /&gt;
&lt;br /&gt;
04 for stations&lt;br /&gt;
&lt;br /&gt;
05 for canals&lt;br /&gt;
&lt;br /&gt;
06 for bridges&lt;br /&gt;
&lt;br /&gt;
07 for houses&lt;br /&gt;
&lt;br /&gt;
09 for industry tiles&lt;br /&gt;
&lt;br /&gt;
0A for industries&lt;br /&gt;
&lt;br /&gt;
0B for cargos&lt;br /&gt;
&lt;br /&gt;
0E for signals&lt;br /&gt;
&lt;br /&gt;
0F for objects&lt;br /&gt;
&lt;br /&gt;
10 for railtypes&lt;br /&gt;
&lt;br /&gt;
===Set-ID===&lt;br /&gt;
&lt;br /&gt;
This defines the number of this action 2. &amp;amp;nbsp;The ID can then be used as target in an action 3 or another variational/random action 2.&lt;br /&gt;
&lt;br /&gt;
===type===&lt;br /&gt;
&lt;br /&gt;
The access type specifies both the size of the variable access, and selects between general variables and the object&#039;s innate variables, or variables of a specific &amp;amp;quot;related&amp;amp;quot; object.&lt;br /&gt;
&lt;br /&gt;
Use 81/85/89 to decide upon a general variable, or a variable of the object in question.&lt;br /&gt;
&lt;br /&gt;
Use 82/86/8A to refer to the &amp;amp;quot;related&amp;amp;quot; object:&lt;br /&gt;
&lt;br /&gt;
||Feature|Related object&lt;br /&gt;
&lt;br /&gt;
Vehicles (00-03)|First vehicle of consist&lt;br /&gt;
&lt;br /&gt;
Stations (04)|Town to which station belongs&lt;br /&gt;
&lt;br /&gt;
Canals (05)|N/A&lt;br /&gt;
&lt;br /&gt;
Bridges (06)|Town of bridge&lt;br /&gt;
&lt;br /&gt;
Houses (07)|Town of building&lt;br /&gt;
&lt;br /&gt;
Generic (08)|(no action 2 support)&lt;br /&gt;
&lt;br /&gt;
Industry tiles (09)|Industry containing tile&lt;br /&gt;
&lt;br /&gt;
Industries (0A)|Town to which industry belongs&lt;br /&gt;
&lt;br /&gt;
Cargos (0B)|N/A&lt;br /&gt;
&lt;br /&gt;
Sounds (0C)|(no action 2 support)&lt;br /&gt;
&lt;br /&gt;
Airports (0D)|Town of airport&lt;br /&gt;
&lt;br /&gt;
Signals (0E)|N/A&lt;br /&gt;
&lt;br /&gt;
Objects (0F)|Town of object&lt;br /&gt;
&lt;br /&gt;
Railtypes (10)|N/A||&lt;br /&gt;
&lt;br /&gt;
This number also tells what size the checked variable is:&lt;br /&gt;
&lt;br /&gt;
For 81/82, the lowest byte of the value is accessed&lt;br /&gt;
&lt;br /&gt;
For 85/86, the lowest word is accessed&lt;br /&gt;
&lt;br /&gt;
For 89/8A, the lowest doubleword is accessed.&lt;br /&gt;
&lt;br /&gt;
If the accessed variable is smaller than the size given here, the extra bits may contain junk, and should probably be &amp;amp;lt;and-masked&amp;amp;gt; out.&lt;br /&gt;
&lt;br /&gt;
On this page, the size B/W/D means the field is byte-sized for types 81 and 82, word-sized for types 85 and 86, and doubleword-sized for types 89 and 8A.&lt;br /&gt;
&lt;br /&gt;
===Variable===&lt;br /&gt;
&lt;br /&gt;
Which variable to use for this decision. The following variables are always available:&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Number&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
00|W|current date (counted as days from 1920)&lt;br /&gt;
&lt;br /&gt;
01|B|current year (count from 1920, max. 2175 even with eternalgame)&lt;br /&gt;
&lt;br /&gt;
02|B/D|current month (0-11) in bits 0-7; the higher bytes contain unusable junk. Since OTTD r13594 &#039;day of month&#039; (0-30) is stored in bits 8-12, bit 15 is set in leapyears and &#039;day of year&#039;(0-364 resp. 365) is stored in bits 16-24. All other bits are reserved and should be masked.&lt;br /&gt;
&lt;br /&gt;
03|B|current climate, 0=temp, 1=arctic, 2=trop, 3=toyland&lt;br /&gt;
&lt;br /&gt;
09|W|date fraction, incremented by 0x375 every engine tick&lt;br /&gt;
&lt;br /&gt;
0A|W|animation counter, incremented every tick&lt;br /&gt;
&lt;br /&gt;
0C|W|current [[Callbacks|callback]] ID (feature-specific), set to 00 when not in a callback&lt;br /&gt;
&lt;br /&gt;
10|D|extra callback info 1, as described in the callback specs&lt;br /&gt;
&lt;br /&gt;
11|B|current rail tool type (for station callbacks)&lt;br /&gt;
&lt;br /&gt;
12|B|Game mode, 0 in title screen, 1 in game and 2 in editor&lt;br /&gt;
&lt;br /&gt;
18|D|extra callback info 2, as described in the callback specs&lt;br /&gt;
&lt;br /&gt;
1A|D|always -1 (that is, all bits are set). Useful to create constants (see [[VarAction2Advanced]])&lt;br /&gt;
&lt;br /&gt;
1B|B|display options; bit 0=town names, 1=station names, 2=signs, 3=animation, 4=transparency, 5=full detail&lt;br /&gt;
&lt;br /&gt;
1C|D|result from most recent variational action 2&lt;br /&gt;
&lt;br /&gt;
20|B|snow line height, FFh if snow isn&#039;t present at all&lt;br /&gt;
&lt;br /&gt;
23|D|current date; long format, since OpenTTD r13376, 2.6 r2049&lt;br /&gt;
&lt;br /&gt;
24|D|current year; long format, year zero based since OpenTTD r13376, 2.6 r2049&lt;br /&gt;
&lt;br /&gt;
25|D|GrfID of the grf that contains the corresponding Action3. Useful when accessing the &amp;amp;quot;related&amp;amp;quot; object. Currently only supported for vehicles (OpenTTD r15739)&lt;br /&gt;
&lt;br /&gt;
40+x|D|specially calculated feature-specific variable, see following feature-specific pages&lt;br /&gt;
&lt;br /&gt;
5F|D|Feature-specific random data: triggers in low byte, bits in other three bytes. Bits of the variable not associated with random or trigger bits are reserved. (2.5 r1927, 2.6 r1928)&lt;br /&gt;
&lt;br /&gt;
60+x|D|similar to 40+x variables, but the variable number must be followed by a byte, which will be given to the variable handler as parameter.&lt;br /&gt;
&lt;br /&gt;
7C|D|A special 60+x variable that contains persistent data written by [[VarAction2Advanced#operator|operator 10]], for the features that support it. (The list of supported features can be found on that page.) Available since 2.6 r1315. Should not be read if the current feature doesn&#039;t support it. If the given slot hasn&#039;t been written yet, it contains zero.&lt;br /&gt;
&lt;br /&gt;
7D|D|A special 60+x variable that contains up to 256 values stored by [[VarAction2Advanced#operator|operator 0E]]. Available since 2.6 r1246. Available in the purchase list. These values are undefined unless written by a var2 earlier in the same chain.&lt;br /&gt;
&lt;br /&gt;
7E|D|A special 60+x variable indicating a [[VarAction2Advanced#Using_procedures|procedure call]]. Available in the purchase list.&lt;br /&gt;
&lt;br /&gt;
7F|D|A special 60+x variable that reads GRF parameter whose number is given by the 60+x parameter. Available in the purchase list.&lt;br /&gt;
&lt;br /&gt;
80+x| |feature-specific variable, see following feature-specific pages||&lt;br /&gt;
&lt;br /&gt;
The definition of variable 1B is slightly feature-dependent. For features that can be drawn transparently (stations, bridges, houses, industry tiles and objects) bit 4 is set if the current feature will be drawn normally, and clear if the current feature will be drawn transparently. For these purposes, airports are stations. For all other features, bit 4 is undefined.&lt;br /&gt;
&lt;br /&gt;
For all features, the 80+x variables are offsets into the corresponding structure in TTD&#039;s game data. &amp;amp;nbsp;The 40+x and 60+x variables are special variables that are computed on-the-fly, and aren&#039;t actually stored anywhere in memory, unless stated otherwise. Therefore they should be used as little as necessary so as not to slow down the game too much with the calculation of these variables (which can be called thousands of times per second, whenever any vehicle moves).&lt;br /&gt;
&lt;br /&gt;
When displaying a vehicle (etc.) in the purchase list, the game will show those variations based on external variables (dates etc.) correctly, but variations based on vehicle variables (variables 40+x, 60+x and 80+x) will always show the first (not the default) cargo-ID unless otherwise specified for the given variable. If you do a calculation, the first cargo-ID will be selected if any of the needed variables is inaccessible.&lt;br /&gt;
&lt;br /&gt;
The lists of 80+x variables on the following pages are not exhaustive; only the useful variables are listed there. For a full list check the definition of corresponding structures in TTD. Marcin Grzegorczyk has a pretty good list of the structure definitions on his [http://marcin.ttdpatch.net/sv1codec/TTD-locations.html|savegame internals page].&lt;br /&gt;
&lt;br /&gt;
{toc}&lt;br /&gt;
&lt;br /&gt;
===varadjust===&lt;br /&gt;
&lt;br /&gt;
Adjust variable to a more useful range. It has the following format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+ &amp;amp;lt;shift-num&amp;amp;gt; &amp;amp;lt;and-mask&amp;amp;gt; &amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;[&amp;amp;lt;add-val&amp;amp;gt; &amp;amp;lt;divide-val&amp;amp;gt;/&amp;amp;lt;modulo-val&amp;amp;gt;]&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
shift-num|B|value to right-shift the variable, and some special bits. See below.&lt;br /&gt;
&lt;br /&gt;
and-mask|B/W/D|value with which to AND the variable after shifting. Return this value if neither bit 6 nor bit 7 of shift-num are set.&lt;br /&gt;
&lt;br /&gt;
add-val|B/W/D|value to add to the variable after ANDing. Only present if bits 6 or 7 are set in shift-num.&lt;br /&gt;
&lt;br /&gt;
divide-val|B/W/D|return the sum divided by this value. Only present if bit 6 is set in shift-num.&lt;br /&gt;
&lt;br /&gt;
modulo-val|B/W/D|return the sum modulo (remainder of division by) this value. Only present if bit 7 is set in shift-num.||&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;shift-num&amp;amp;gt; is a partial bit-mask; its bits have the following meanings:&lt;br /&gt;
&lt;br /&gt;
||Bit(s)|value|meaning&lt;br /&gt;
&lt;br /&gt;
0..4|0..1F|number of bits to right shift &amp;amp;lt;variable&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
5|20|This is an [[VarAction2Advanced|advanced var.action 2]]&lt;br /&gt;
&lt;br /&gt;
6|40|This is a shift-and-add-divide adjustment.&lt;br /&gt;
&lt;br /&gt;
7|80|This is a shift-and-add-modulo adjustment.||&lt;br /&gt;
&lt;br /&gt;
Bits 6 and 7 may not both be set. If neither are set, this varadjust is a shift-and adjustment.&lt;br /&gt;
&lt;br /&gt;
Note that for the add and divide operations, both the variable and the divisor are taken to be signed numbers. This means that if the high bit is set, the number is taken to be negative, so you may need to mask out the most significant bit to do an unsigned division.&lt;br /&gt;
&lt;br /&gt;
===nvar===&lt;br /&gt;
&lt;br /&gt;
Here you set how many different ranges to check for. If the value of the variable, after the above manipulations, is not within one of these ranges, the default will be used. &amp;amp;nbsp;When displayed in the purchase window, the game will always show the first range if the variable is of the 40+x or 80+x type (because the variable is undefined since the vehicle doesn&#039;t exist yet).&lt;br /&gt;
&lt;br /&gt;
Since 2.0.1 alpha 57, nvar=0 is a special case. Instead of using ranges, nvar=0 means that the result of an [[VarAction2Advanced|advanced]] calculation (or, if no calculation is performed, the adjusted variable value itself) is returned as callback result, with bit 15 set. &amp;amp;nbsp;This is useful for those callbacks where many different return values are possible and it is easier to calculate them than list them in ranges. &amp;amp;nbsp;The default value must still be specified, and will be used in case the variable(s) used are not available.&lt;br /&gt;
&lt;br /&gt;
===sets and ranges===&lt;br /&gt;
&lt;br /&gt;
For each of the ranges to check, you give the set-id as a &#039;&#039;&#039;WORD&#039;&#039;&#039; value (i.e. with a 00 following, e.g. set-id 5 becomes -+05 00+-, or - in case of a callback result - by setting the high bit, e.g. -+05 80+-), followed by the low and high limits of this range. &amp;amp;nbsp;The first range that matches will be used.&lt;br /&gt;
&lt;br /&gt;
The various \b, \w, and \d escape sequences can be useful for &amp;amp;lt;min-range&amp;amp;gt; and &amp;amp;lt;max-range&amp;amp;gt;. See [[GRFActionsDetailed#Byte_order|the discussion of escape sequences]] for further information.&lt;br /&gt;
&lt;br /&gt;
===default===&lt;br /&gt;
&lt;br /&gt;
The set-id to use if none of the ranges matches.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&#039;color:#808080&#039;&amp;gt;Something to go here&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=RandomAction2&amp;diff=720</id>
		<title>RandomAction2</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=RandomAction2&amp;diff=720"/>
		<updated>2010-12-08T17:42:11Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Randomized Action 2&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Randomized Action 2=&lt;br /&gt;
&lt;br /&gt;
Defining a randomized choice between several action 2 entries&lt;br /&gt;
&lt;br /&gt;
-=Introduction=-&lt;br /&gt;
&lt;br /&gt;
Unlike variational action 2, whose results are always determined by a predictable decision, one can also use randomized results to pick one of several graphics sets.&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
The data looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 02 &amp;amp;lt;feature&amp;amp;gt; &amp;amp;lt;set-id&amp;amp;gt; &amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;[80|83]&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt; &amp;amp;lt;random-triggers&amp;amp;gt; &amp;amp;lt;randbit&amp;amp;gt; &amp;amp;lt;nrand&amp;amp;gt; &amp;amp;lt;set-ids&amp;amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From 2.6 r1850 and OpenTTD r12452, and &#039;&#039;&#039;for vehicles only&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 02 &amp;amp;lt;feature&amp;amp;gt; &amp;amp;lt;set-id&amp;amp;gt; 84 &amp;amp;lt;count&amp;amp;gt; &amp;amp;lt;random-triggers&amp;amp;gt; &amp;amp;lt;randbit&amp;amp;gt; &amp;amp;lt;nrand&amp;amp;gt; &amp;amp;lt;set-ids&amp;amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes used in this action.&lt;br /&gt;
&lt;br /&gt;
02|B|Defines action 02&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;feature&amp;amp;gt;|B|For what type of vehicle/station/... should this definition be used?&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;set-id&amp;amp;gt;|B|The ID of this action 2 (used like a cargo ID)&lt;br /&gt;
&lt;br /&gt;
80&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;83&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;84|B|Type of random action, see below.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;count&amp;amp;gt;|B|(when present) Location of controlling vehicle.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;random-triggers&amp;amp;gt;|B|When to re-randomize&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;randbit&amp;amp;gt;|B|What random bit to use for this action 2&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;nrand&amp;amp;gt;|B|Number of set-ids to choose from, must be a power of 2&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;set-ids&amp;amp;gt;|W|Action 2 set-ids to choose from.||&lt;br /&gt;
&lt;br /&gt;
-=Filling in the terms=-&lt;br /&gt;
&lt;br /&gt;
===Sprite-number===&lt;br /&gt;
&lt;br /&gt;
This is just the number you are at.&lt;br /&gt;
&lt;br /&gt;
===Length===&lt;br /&gt;
&lt;br /&gt;
Count the number of bytes in this action.&lt;br /&gt;
&lt;br /&gt;
===feature===&lt;br /&gt;
&lt;br /&gt;
This sets the type of feature that you wish to change. Set it to:&lt;br /&gt;
&lt;br /&gt;
00 for trains&lt;br /&gt;
&lt;br /&gt;
01 for road vehicles&lt;br /&gt;
&lt;br /&gt;
02 for ships&lt;br /&gt;
&lt;br /&gt;
03 for planes&lt;br /&gt;
&lt;br /&gt;
04 for stations&lt;br /&gt;
&lt;br /&gt;
05 for canals&lt;br /&gt;
&lt;br /&gt;
07 for houses&lt;br /&gt;
&lt;br /&gt;
09 for industry tiles&lt;br /&gt;
&lt;br /&gt;
0A for industries&lt;br /&gt;
&lt;br /&gt;
0F for objects&lt;br /&gt;
&lt;br /&gt;
10 for rail types (available in OpenTTD &amp;amp;gt; r18969)&lt;br /&gt;
&lt;br /&gt;
===set-ID===&lt;br /&gt;
&lt;br /&gt;
This defines the number of this action 2. &amp;amp;nbsp;The ID can then be used as target in an action 3 or another variational/random action 2.&lt;br /&gt;
&lt;br /&gt;
===80/83/84===&lt;br /&gt;
&lt;br /&gt;
Use 80 to randomize the object (vehicle, station, building, industry, object) based on its own triggers and bits.&lt;br /&gt;
&lt;br /&gt;
Use 83 to randomize the object based on its &amp;amp;quot;related&amp;amp;quot; object (s.b.).&lt;br /&gt;
&lt;br /&gt;
Use 84 to randomize the vehicle based on any vehicle in the consist.&lt;br /&gt;
&lt;br /&gt;
||Feature|Related object&lt;br /&gt;
&lt;br /&gt;
Vehicles (00-03)|First vehicle of consist&lt;br /&gt;
&lt;br /&gt;
Stations (04)|N/A&lt;br /&gt;
&lt;br /&gt;
Houses (07)|N/A&lt;br /&gt;
&lt;br /&gt;
Industry tiles (09)|Industry containing tile&lt;br /&gt;
&lt;br /&gt;
Industries (0A)|N/A&lt;br /&gt;
&lt;br /&gt;
Objects (0F)|N/A||&lt;br /&gt;
&lt;br /&gt;
===count===&lt;br /&gt;
&lt;br /&gt;
For type 84, this specifies which vehicle&#039;s random bits this vehicle will be using and/or modifying.&lt;br /&gt;
&lt;br /&gt;
The low nibble (bits 0-3) specifies how far to count from the starting vehicle. If it is zero, the count will be read from GRF register 100h instead.&lt;br /&gt;
&lt;br /&gt;
The high nibble (bits 6-7, actually) specifies which vehicle is the starting vehicle, and which direction to count:&lt;br /&gt;
&lt;br /&gt;
||0|count back (away from the engine), starting at this vehicle&lt;br /&gt;
&lt;br /&gt;
4|count forward (toward the engine), starting at this vehicle.&lt;br /&gt;
&lt;br /&gt;
8|count back, starting at the engine&lt;br /&gt;
&lt;br /&gt;
C|count back, starting at the first vehicle in this chain of vehicles with the same ID, as for vehicle variable 41||&lt;br /&gt;
&lt;br /&gt;
Bits 4-5 are reserved and must be zero, so other values of the high nibble are not allowed.&lt;br /&gt;
&lt;br /&gt;
===random-triggers===&lt;br /&gt;
&lt;br /&gt;
This is a bit mask of triggers which cause re-randomizing. Normally, any matching trigger causes the graphics to be randomized again, but if you add 80 to the bitmask, the re-randomizing only happens if &#039;&#039;&#039;all&#039;&#039;&#039; triggers have occurred.&lt;br /&gt;
&lt;br /&gt;
Trigger bits are feature-specific, see below.&lt;br /&gt;
&lt;br /&gt;
===randbit===&lt;br /&gt;
&lt;br /&gt;
For versions before 2.0.1 alpha 30, leave this at 00. It doesn&#039;t quite work the way intended (it was supposed to allow independent random chains, but currently everything is re-randomized at the same time, thereby defeating this mechanism).&lt;br /&gt;
&lt;br /&gt;
Since 2.0.1 alpha 30, only those bits that actually get triggered will be re-randomized. &amp;amp;nbsp;Prior versions always re-randomized all bits. &amp;amp;nbsp;This will make it possible to have independent sets of bits for independent triggers (or untriggered bits, set only at the time of purchase). Setting randbit determines the first bit to be re-randomized, as well as basing the random graphics on. The total number of bits used is the 2-logarithm of nrand below (e.g., for nrand=16, 4 bits are used).&lt;br /&gt;
&lt;br /&gt;
===nrand===&lt;br /&gt;
&lt;br /&gt;
Number of different sets to choose from. &amp;amp;nbsp;This must be a power of 2, i.e. 2, 4, 8, 16 etc.&lt;br /&gt;
&lt;br /&gt;
===set-ids===&lt;br /&gt;
&lt;br /&gt;
Action 2 IDs to randomly choose from&lt;br /&gt;
&lt;br /&gt;
-=Triggers=-&lt;br /&gt;
&lt;br /&gt;
==Vehicles==&lt;br /&gt;
&lt;br /&gt;
Vehicles have 8 random bits, and the following triggers:&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Trigger&lt;br /&gt;
&lt;br /&gt;
0|01|Vehicle gets new load of cargo (only after it was empty)&lt;br /&gt;
&lt;br /&gt;
1|02|Vehicle enters a depot and is serviced&lt;br /&gt;
&lt;br /&gt;
2|04|The consist has unloaded all cargo&lt;br /&gt;
&lt;br /&gt;
3|08|Any vehicle of the consist receives cargo&lt;br /&gt;
&lt;br /&gt;
4|10|Callback 32 returned 1||&lt;br /&gt;
&lt;br /&gt;
The consist trigger bits 2 and 3 allow re-randomizing whenever the consist receives cargo after fully unloading. They should be used with action 2 type 80, not 83, and the random-triggers variable should have 80 added to it, to make the re-randomizing happen only if the consist was empty and &#039;&#039;&#039;then&#039;&#039;&#039; received new cargo.&lt;br /&gt;
&lt;br /&gt;
==Stations==&lt;br /&gt;
&lt;br /&gt;
Stations have 16+4 random bits. Bits 0 to 15 are a property of the station as a whole, and bits 16 to 19 are different for each tile. &amp;amp;nbsp;To get tile-based randomness, therefore use randbit=10 and nrand of no more than 16 (since only 4 random bits are available per tile).&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Trigger&lt;br /&gt;
&lt;br /&gt;
0|01|new cargo waiting&lt;br /&gt;
&lt;br /&gt;
1|02|no more cargo&lt;br /&gt;
&lt;br /&gt;
2|04|train arrives (starts unloading/loading)&lt;br /&gt;
&lt;br /&gt;
3|08|train leaves (done unloading &amp;amp; loading)&lt;br /&gt;
&lt;br /&gt;
4|10|train loads or unloads cargo&lt;br /&gt;
&lt;br /&gt;
5|20|train reserves platform (using PBS)||&lt;br /&gt;
&lt;br /&gt;
Also note that none of the above triggers will actually trigger unless prop. 12 has at least one bit set. &amp;amp;nbsp;Triggers 01 will be triggered for any of the cargo types set in prop. 12, but trigger 02 will only be triggered if all of those cargo types have no more cargo waiting. Triggers 04, 08 and 20 are triggered no matter what cargo types the train transports, as long as prop. 12 is not zero.&lt;br /&gt;
&lt;br /&gt;
Triggers 04, 08, 10 and 20 only affect the platform on which they occur, as well as the random bits of the station, but not other platforms.&lt;br /&gt;
&lt;br /&gt;
==Town building triggers==&lt;br /&gt;
&lt;br /&gt;
Town buildings have 8 random bits.&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Trigger&lt;br /&gt;
&lt;br /&gt;
0|01|the building tile is processed in the periodic tile processing loop&lt;br /&gt;
&lt;br /&gt;
1|02|the top tile of the building is processed in the periodic tile processing loop||&lt;br /&gt;
&lt;br /&gt;
The periodic tile processing loop constantly processes the tiles of the map, processing any given tile in every 256 ticks (approx. 3.5 TTD days). Since no &amp;amp;quot;real&amp;amp;quot; event happens to town buildings, you have only this opportunity to re-randomize the look of your building.&lt;br /&gt;
&lt;br /&gt;
If every 3.5 days is too fast for you, you can multiply the time-out by setting property 16 for the given tile. The time-out is 256 ticks*(prop. 16+1), so 0 means every 3.5 days, 1 means every 7 days, 2 means every 10.5 days and so on.&lt;br /&gt;
&lt;br /&gt;
If trigger 02 is activated, all parts of the building that has this trigger set will get the same random bits, allowing you to randomize a multi-tile building as one unit. On the other hand, if the tiles of a multi-tile building have trigger 1 set, all tiles will be randomized individually. Note that all tiles of a multi-tile building get the same value when building the building.&lt;br /&gt;
&lt;br /&gt;
==Industry tile triggers==&lt;br /&gt;
&lt;br /&gt;
Industry tiles have 8+16 random bits. &amp;amp;nbsp;Accessed through random action 2 type 80, you get 8 tile-specific bits, and accessed through random action 2 type 83, you get 16 industry-specific bits. &amp;amp;nbsp;The triggers are the same for both:&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Trigger&lt;br /&gt;
&lt;br /&gt;
0|01|the building tile is processed in the periodic tile processing loop&lt;br /&gt;
&lt;br /&gt;
1|02|triggers simultaneously for all tiles of the industry every 256 ticks. If the industry is a primary one, output cargo is generated at the same time.&lt;br /&gt;
&lt;br /&gt;
2|04|cargo is delivered to the industry. If the industry is a processing one, output cargo is generated at the same time.||&lt;br /&gt;
&lt;br /&gt;
Trigger 1 works similarly to trigger 1 for houses except that you cannot multiply the timeout: it&#039;s always 256 ticks.&lt;br /&gt;
&lt;br /&gt;
==Canals==&lt;br /&gt;
&lt;br /&gt;
Canals / Rivers have 8 random bits.&lt;br /&gt;
&lt;br /&gt;
There is currently no way to influence the random byte creation via triggers, internally the bits are feed from VarAction2Canals var 83 that is set when building a canal. Feature ids not supported by VarAction2Canals are undefined and should never be used.&lt;br /&gt;
&lt;br /&gt;
==Objects==&lt;br /&gt;
&lt;br /&gt;
Objects have around 8 random bits per tile of the object.&lt;br /&gt;
&lt;br /&gt;
There are no triggers for objects however.&lt;br /&gt;
&lt;br /&gt;
Also note that the random bits are unique to each tile in the object, and are not shared across the whole object.&lt;br /&gt;
&lt;br /&gt;
==Rail types==&lt;br /&gt;
&lt;br /&gt;
Rail tiles have 2 pseudo random bits, based on tile location.&lt;br /&gt;
&lt;br /&gt;
There are no triggers.&lt;br /&gt;
&lt;br /&gt;
==Other features==&lt;br /&gt;
&lt;br /&gt;
All features not mentioned in the list above have neither random bits nor triggers, including cities (which would be accessed using random action 2 type 83 for stations and industries).&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&#039;color:#808080&#039;&amp;gt;Something to go here&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Objects&amp;diff=137</id>
		<title>Action0/Objects</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Objects&amp;diff=137"/>
		<updated>2010-11-19T19:39:32Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Action 0 properties for new objects&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 0 - Properties for new objects=&lt;br /&gt;
&lt;br /&gt;
Defining properties of new objects.&lt;br /&gt;
&lt;br /&gt;
{maketoc}&lt;br /&gt;
&lt;br /&gt;
Unlike vehicles or new stations, most new objects have no real equivalent in TTD.&lt;br /&gt;
&lt;br /&gt;
The IDs are therefore free to be chosen and will in fact be allocated automatically by the patch. In action 0, you only specify IDs relative to the set, i.e. the ID of the first object type is 00, the second object type is 01 and so on. In total, each game can only have 255 object IDs for all active grf files.&lt;br /&gt;
&lt;br /&gt;
The property you &#039;&#039;&#039;must&#039;&#039;&#039; set for each object ID is 08 (in addition to defining an action 3 for it). Also, all object IDs must get their classes in the right order, starting from ID 00 onwards.&lt;br /&gt;
&lt;br /&gt;
-=Properties=-&lt;br /&gt;
&lt;br /&gt;
||Number|Version|Size|Description&lt;br /&gt;
&lt;br /&gt;
08|a|D|Class ID, see below&lt;br /&gt;
&lt;br /&gt;
09|a|W|Text ID for class&lt;br /&gt;
&lt;br /&gt;
0A|a|W|Text ID for this object&lt;br /&gt;
&lt;br /&gt;
0B|a|B|[[Action0General#Climate_availability|Climate availability]]&lt;br /&gt;
&lt;br /&gt;
0C|a|B|Byte representing size, see below&lt;br /&gt;
&lt;br /&gt;
0D|a|B|Object build cost factor (sets object removal cost factor as well)&lt;br /&gt;
&lt;br /&gt;
0E|a|D|Introduction date, see below&lt;br /&gt;
&lt;br /&gt;
0F|a|D|End of life date, see below&lt;br /&gt;
&lt;br /&gt;
10|a|W|Object flags, see below&lt;br /&gt;
&lt;br /&gt;
11|b|W|Animation information&lt;br /&gt;
&lt;br /&gt;
12|b|B|Animation speed&lt;br /&gt;
&lt;br /&gt;
13|b|W|Animation triggers&lt;br /&gt;
&lt;br /&gt;
14|b|B|Object removal cost factor (set after object build cost factor)&lt;br /&gt;
&lt;br /&gt;
15|b|W|Callback flags, see below&lt;br /&gt;
&lt;br /&gt;
16|b|B|Height of the building||&lt;br /&gt;
&lt;br /&gt;
Check [http://pics.lakie.net/newObject-ActionStructure.png|Lakie&#039;s Graphical Representation of the newObject Specifications|nocache]&lt;br /&gt;
&lt;br /&gt;
The specifications of NewObjects are available since OpenTTD r20670 in TTDPatch since r2340&lt;br /&gt;
&lt;br /&gt;
-=Comments=-&lt;br /&gt;
&lt;br /&gt;
==Object class (08)==&lt;br /&gt;
&lt;br /&gt;
Unlike station classes, there is currently no default yet, planned are TRNS for transmitters and LTHS for lighthouses. &#039;&#039;&#039;You have to set the class ID before any other property.&#039;&#039;&#039; Characters allowed in the IDs are A-Z, 0-9.&lt;br /&gt;
&lt;br /&gt;
1. The following is a &#039;&#039;&#039;Recommendation&#039;&#039;&#039; for Object Class Labels.&lt;br /&gt;
&lt;br /&gt;
2. It is possible to have a label for each object. This would make for a very ungainly menu.&lt;br /&gt;
&lt;br /&gt;
3. A labeling system allows a coder/author to make their works much more user friendly.&lt;br /&gt;
&lt;br /&gt;
4. To keep the numbers more manageable, the classes are as generic as possible.&lt;br /&gt;
&lt;br /&gt;
5. While being generic, assigning objects to a label should be intuitive.&lt;br /&gt;
&lt;br /&gt;
6. Assuming that there will be special circumstances where a coder/author needs to deviate from the norm, &#039;&#039;&#039;the Recommendation is not mandatory&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
||&amp;lt;center&amp;gt;RECOMMENDATIONS&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Label|&amp;lt;center&amp;gt;Action4 Text&amp;lt;/center&amp;gt;|&amp;lt;center&amp;gt;Description&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
TTDX|&amp;lt;center&amp;gt;Default*TTDX&amp;lt;/center&amp;gt;|Transport Tycoon&#039;s copywritten objects - lighthouse, communication tower, rocks, etc.&lt;br /&gt;
&lt;br /&gt;
OTTD|&amp;lt;center&amp;gt;Default*OpenTTD&amp;lt;/center&amp;gt;|OpenGFX objects - lighthouse, communication tower, rocks, etc.&lt;br /&gt;
&lt;br /&gt;
STRU|&amp;lt;center&amp;gt;Structures&amp;lt;/center&amp;gt;|Multitile engineered objects that don&#039;t quite fit in as industries, houses or stations - dams etc.&lt;br /&gt;
&lt;br /&gt;
INFR|&amp;lt;center&amp;gt;Infrastructure&amp;lt;/center&amp;gt;| - lightpoles, communication towers, transmission towers, road signs, etc.&lt;br /&gt;
&lt;br /&gt;
BLDG|&amp;lt;center&amp;gt;Buildings&amp;lt;/center&amp;gt;|Normally accomodated by industries, houses or stations but the author feels there are limiting circumstances.&lt;br /&gt;
&lt;br /&gt;
NATR|&amp;lt;center&amp;gt;Natural objects&amp;lt;/center&amp;gt;| - caves, coral reefs, swamps, etc.&lt;br /&gt;
&lt;br /&gt;
PARK|&amp;lt;center&amp;gt;Public areas&amp;lt;/center&amp;gt;|Normally accomodated by towns or industries (tourist stuff ...) but the author feels there are limiting circumstances - Parks, statues, etc.&lt;br /&gt;
&lt;br /&gt;
ARTF|&amp;lt;center&amp;gt;Artifacts&amp;lt;/center&amp;gt;|They really don&#039;t fit under any of the above - shipwrecks, etc.&lt;br /&gt;
&lt;br /&gt;
MISC|&amp;lt;center&amp;gt;Miscellaneous&amp;lt;/center&amp;gt;|For the author who is unable to accommodate his/her object under any of the previous labels.||&lt;br /&gt;
&lt;br /&gt;
==Object class text ID (09)==&lt;br /&gt;
&lt;br /&gt;
The text ID for this class (word value). This textid should be either a TTD textid or a D4xx textid (set via D0xx in action4).&lt;br /&gt;
&lt;br /&gt;
When specifying an object, you don&#039;t need to set a class name again if you already did for another one with the same class.&lt;br /&gt;
&lt;br /&gt;
==Object text ID (0A)==&lt;br /&gt;
&lt;br /&gt;
The text ID for the object for query and selection (word value). Same requirements as for property09.&lt;br /&gt;
&lt;br /&gt;
==Object size (0C)==&lt;br /&gt;
&lt;br /&gt;
The object size up to 15x15 tiles.&lt;br /&gt;
&lt;br /&gt;
This byte value is divided into two nibbles. The first defines the size in y direction and the second defines the size in x (i.e., stored as YX).&lt;br /&gt;
&lt;br /&gt;
Note that any value lower than 0x11 will be rejected.&lt;br /&gt;
&lt;br /&gt;
==Build Cost (0D)==&lt;br /&gt;
&lt;br /&gt;
The build cost multiplier. This is multiplied by the number of tiles for evaluation of construction and removal costs of an object.&lt;br /&gt;
&lt;br /&gt;
==Introduction date (0E)==&lt;br /&gt;
&lt;br /&gt;
Introduction date of an object, in days since the year 0. This takes account of leap years; divisible by 4, but not 100 unless 400. A start date of 1920-01-01 is obtained with a value of 701265 (51 B3 0A 00). In TTDPatch anything before 1920 is considered to be always available, and it should allow for objects to work past 2044, the date is also the very first date you can build the object.&lt;br /&gt;
&lt;br /&gt;
==End of life date (0F)==&lt;br /&gt;
&lt;br /&gt;
Last year an object can be build, in days since the year 0. Same requirements as above. Also note that it must be a minimum of a year (365 days) after the introduction date or TTDPatch will ignore it.&lt;br /&gt;
&lt;br /&gt;
==Object flags (10)==&lt;br /&gt;
&lt;br /&gt;
The following flags control object behaviour and are cached for built objects, so changing these flags will have no effect on already constructed objects.&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Version|Meaning&lt;br /&gt;
&lt;br /&gt;
0|1|a|Only Available in the scenario editor (1)&lt;br /&gt;
&lt;br /&gt;
1|2|a|Irremovable (2)&lt;br /&gt;
&lt;br /&gt;
2|4|a|Anything Can Remove (owned land behaviour)&lt;br /&gt;
&lt;br /&gt;
3|8|a|Allow construction of the object on water&lt;br /&gt;
&lt;br /&gt;
4|16|a|Removal cost is actually income (owned land behaviour)&lt;br /&gt;
&lt;br /&gt;
5|32|a|Do not display foundations if on a slope&lt;br /&gt;
&lt;br /&gt;
6|64|a|Object has animation (3)&lt;br /&gt;
&lt;br /&gt;
7|128|a|Only available during game play (1)&lt;br /&gt;
&lt;br /&gt;
8|256|b|Allows 2cc mapping for objects instead of the default 1cc&lt;br /&gt;
&lt;br /&gt;
9|512|c|Disallows construction on land (also has bit 3 behaviour)&lt;br /&gt;
&lt;br /&gt;
10|1024|c|Draws the water under the object (4)&lt;br /&gt;
&lt;br /&gt;
11|2048|d|Allow bridge over the object taking the building height into account (5)&lt;br /&gt;
&lt;br /&gt;
12|4096|d|Random bits in the &amp;amp;quot;next animation frame&amp;amp;quot; callback||&lt;br /&gt;
&lt;br /&gt;
c - TTDPatch r2331&lt;br /&gt;
&lt;br /&gt;
(1) - Note that bits 0 and 7 are incompatible and setting both will make an object completely unavailable.&lt;br /&gt;
&lt;br /&gt;
(2) - Object cannot be removed through normal dynamite, control must be held and the removal cost will be multiplied by 25 (this is the usual behaviour for most class A objects in TTDPatch).&lt;br /&gt;
&lt;br /&gt;
(3) - Setting this flag will allow the object&#039;s animation counter to be increased, must be set if you plan to make use of animations. Like stations you must enable animation on a per tile basis by means of the &amp;amp;quot;built tile&amp;amp;quot; trigger and callback 159.&lt;br /&gt;
&lt;br /&gt;
(4) - Only applies when built on top of a water tile, also replaces the ground tile of the object completely. (Does not work when object built on sloped water tiles).&lt;br /&gt;
&lt;br /&gt;
(5) - Only applies to OpenTTD. TTDPatch does not support bridges over objects yet.&lt;br /&gt;
&lt;br /&gt;
==Animation information (11)==&lt;br /&gt;
&lt;br /&gt;
The low byte specifies the number of animation frames minus one, so 00 means 1 frame, 01 means 2 frames etc. The maximum number of frames is 256, although you can have some problems if your animation exceeds FD (253) frames. The high byte must be 0 for non-looping animations and 01 for looping animations. Every other value is reserved for future use. In addition, if the whole word contains FFFF, animation is turned off for this object (this is the default value).&lt;br /&gt;
&lt;br /&gt;
Since you can&#039;t have properties for individual object tiles, this property applies for every tile of the object. If you don&#039;t want to animate some tiles, you should check the current position during [[Callbacks#Animation_control_1B_25_140_|callback 159]] and return FD if the current tile doesn&#039;t need to be animated. If you also need animations of different length per tile, you&#039;ll have to use [[Callbacks#Next_animation_frame_1A_26_141_|callback 158]] for that.&lt;br /&gt;
&lt;br /&gt;
==Animation speed (12)==&lt;br /&gt;
&lt;br /&gt;
The meaning is the same as for [[Action0Houses#Animation_Speed_1B_|house property 1B]], but the lower limit is 0 instead of 2, so the fastest possible animation changes frames every game tick (27ms). The default value is 0.&lt;br /&gt;
&lt;br /&gt;
==Animation triggers (13)==&lt;br /&gt;
&lt;br /&gt;
This is a bit mask of events that should trigger [[Callbacks#Animation_control_1B_25_140_|callback 159]], allowing to change the animation state&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Meaning|Happens on&lt;br /&gt;
&lt;br /&gt;
0|1|Object is built|all tiles&lt;br /&gt;
&lt;br /&gt;
1|2|Periodic tile loop|single tile&lt;br /&gt;
&lt;br /&gt;
2|4|Synchronised periodic tile loop|all tiles||&lt;br /&gt;
&lt;br /&gt;
The synchronised periodic tile loop is called directly after the (unsynchronised) periodic tile loop of the northern tile.&lt;br /&gt;
&lt;br /&gt;
==Object removal cost factor (14)==&lt;br /&gt;
&lt;br /&gt;
Cost factor for the removal of an object. This must be set after property 0D (object build cost factor) as that overwrites this value.&lt;br /&gt;
&lt;br /&gt;
==Callback flags (15)==&lt;br /&gt;
&lt;br /&gt;
For objects, the following [[Callbacks|callbacks]] can be defined by setting the corresponding bit in property 15:&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Variable 0C value|Callback&lt;br /&gt;
&lt;br /&gt;
0|1|157|Custom slope check&lt;br /&gt;
&lt;br /&gt;
1|2|158|Decide next animation frame&lt;br /&gt;
&lt;br /&gt;
2|4|15A|Decide animation speed&lt;br /&gt;
&lt;br /&gt;
3|8|15B|Decide colour of building&lt;br /&gt;
&lt;br /&gt;
4|16|15C|Show additional text in the build object window&lt;br /&gt;
&lt;br /&gt;
5|32|15D|Allow/disallow autosloping||&lt;br /&gt;
&lt;br /&gt;
==Building height (16)==&lt;br /&gt;
&lt;br /&gt;
Set the height of the building in heightlevels (8 pixels). For example if the structure is 16 pixels high you set this property to 2.&lt;br /&gt;
&lt;br /&gt;
In OpenTTD this property is used to determine the height of the build object window; the height for the object preview is set to 32 + &amp;amp;quot;value of property 16&amp;amp;quot; * 8. The property is also uses to determine how high a bridge must be if it is allowed by the bit in property 10.&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/Trains&amp;diff=232</id>
		<title>Action0/Vehicles/Trains</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/Trains&amp;diff=232"/>
		<updated>2010-11-18T13:53:42Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Action 0 properties for trains&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 0 - Properties for train vehicles=&lt;br /&gt;
&lt;br /&gt;
Defining properties of train vehicles.&lt;br /&gt;
&lt;br /&gt;
{maketoc}&lt;br /&gt;
&lt;br /&gt;
-=Properties=-&lt;br /&gt;
&lt;br /&gt;
||Number|Version|Size|Description|Available for articulated parts&lt;br /&gt;
&lt;br /&gt;
05| |B|Track type (see below)|should be same as front&lt;br /&gt;
&lt;br /&gt;
08| |B|AI special flag: set to 1 if engine is &#039;optimized&#039; for passenger service (AI won&#039;t use it for other cargo), 0 otherwise|no&lt;br /&gt;
&lt;br /&gt;
09| |W|Speed in mph*1.6 (see below)|no&lt;br /&gt;
&lt;br /&gt;
0B| |W|Power (0 for wagons)|should be zero&lt;br /&gt;
&lt;br /&gt;
0D| |B|Running cost factor (0 for wagons)|should be zero&lt;br /&gt;
&lt;br /&gt;
0E| |D|Running cost base, see below|should be zero&lt;br /&gt;
&lt;br /&gt;
12| |B|Sprite ID (FD for new graphics)|yes&lt;br /&gt;
&lt;br /&gt;
13| |B|Dual-headed flag; 1 if dual-headed engine, 0 otherwise|should be zero also for front&lt;br /&gt;
&lt;br /&gt;
14| |B|Cargo capacity|yes&lt;br /&gt;
&lt;br /&gt;
15| |B|Cargo type, see column 3 (type B) in [[CargoTypes]]|yes&lt;br /&gt;
&lt;br /&gt;
16| |B|Weight in tons|should be zero&lt;br /&gt;
&lt;br /&gt;
17| |B|Cost factor|should be zero&lt;br /&gt;
&lt;br /&gt;
18| |B|Engine rank for the AI (AI selects the highest-rank engine of those it can buy)|no&lt;br /&gt;
&lt;br /&gt;
19|1|B|Engine traction type (see below)|no&lt;br /&gt;
&lt;br /&gt;
1A|1/(f)|B/B*|Not a property, but an action: sort the purchase list.|no&lt;br /&gt;
&lt;br /&gt;
1B|6|W|Power added by each wagon connected to this engine, see below|should be zero&lt;br /&gt;
&lt;br /&gt;
1C|6|B|Refit cost, using 50% of the [[BaseCosts|purchase price cost base]]|yes&lt;br /&gt;
&lt;br /&gt;
1D|6|D|Bit mask of cargo types available for refitting, see column 2 (bit value) in [[CargoTypes]]|yes&lt;br /&gt;
&lt;br /&gt;
1E|6|B|Callback flags bit mask, see below|yes&lt;br /&gt;
&lt;br /&gt;
1F|(a)|B|Coefficient of tractive effort|should be zero&lt;br /&gt;
&lt;br /&gt;
20|(b)|B|Coefficient of air drag|should be zero&lt;br /&gt;
&lt;br /&gt;
21|2|B|Make vehicle shorter by this amount, see below|yes&lt;br /&gt;
&lt;br /&gt;
22|6|B|Set visual effect type (steam/smoke/sparks) as well as position, see below|yes&lt;br /&gt;
&lt;br /&gt;
23|6|B|Set how much weight is added by making wagons powered (i.e. weight of engine), see below|should be zero&lt;br /&gt;
&lt;br /&gt;
24|(c)|B|High byte of vehicle weight, weight will be prop.24*256+prop.16|should be zero&lt;br /&gt;
&lt;br /&gt;
25|(c)|B|User-defined bit mask to set when checking veh. var. 42|yes&lt;br /&gt;
&lt;br /&gt;
26|(c)|B|Retire vehicle early, this many years before the end of phase 2 (see [[Action0General]])|no&lt;br /&gt;
&lt;br /&gt;
27|(d)|B|Miscellaneous flags|partly&lt;br /&gt;
&lt;br /&gt;
28|(d)|W|Refittable cargo classes|yes&lt;br /&gt;
&lt;br /&gt;
29|(d)|W|Non-refittable cargo classes|yes&lt;br /&gt;
&lt;br /&gt;
2A|(e)|D|Long format introduction date|no||&lt;br /&gt;
&lt;br /&gt;
Version codes:&lt;br /&gt;
&lt;br /&gt;
||Code|Version&lt;br /&gt;
&lt;br /&gt;
(a)|2.0.1 alpha 19&lt;br /&gt;
&lt;br /&gt;
(b)|2.0.1 alpha 27&lt;br /&gt;
&lt;br /&gt;
(c)|2.0.1 alpha 44&lt;br /&gt;
&lt;br /&gt;
(d)|2.0.1 alpha 58&lt;br /&gt;
&lt;br /&gt;
(e)|2.5 r1210, OpenTTD r7191&lt;br /&gt;
&lt;br /&gt;
(f)|OpenTTD r13831||&lt;br /&gt;
&lt;br /&gt;
-=Comments=-&lt;br /&gt;
&lt;br /&gt;
==Track type (05)==&lt;br /&gt;
&lt;br /&gt;
Set track type of vehicle: 0 = rail, 1 = monorail, 2 = maglev. For setting the appropriate traction type, see [[Action0Trains#Engine_traction_type_19_|prop19]].&lt;br /&gt;
&lt;br /&gt;
In OpenTTD, if a [[Action0Railtypes|rail type]] translation table is loaded, this property is an index into the table instead.&lt;br /&gt;
&lt;br /&gt;
==Speed (09)==&lt;br /&gt;
&lt;br /&gt;
Train speed is in units of mph*1.6, i.e. approximately km/h.&lt;br /&gt;
&lt;br /&gt;
For wagons, this value is only used if the &amp;amp;quot;wagonspeedlimit&amp;amp;quot; switch is on, and it limits the speed of the train to that of the lowest wagon speed. &amp;amp;nbsp;This limit is ignored for wagons with a livery override for the current train, so that train sets always get their max speed from the engine&#039;s max speed.&lt;br /&gt;
&lt;br /&gt;
For wagons, a value of 0 means &amp;amp;quot;default&amp;amp;quot; (which depends on cargo type and date of introduction), and FFFF means no limit.&lt;br /&gt;
&lt;br /&gt;
==Power (0B)==&lt;br /&gt;
&lt;br /&gt;
The power of the engine, in HP.&lt;br /&gt;
&lt;br /&gt;
A value of 0 means that the vehicle will be a wagon, otherwise it will be an engine.&lt;br /&gt;
&lt;br /&gt;
==Running cost base (0E) and factor (0D)==&lt;br /&gt;
&lt;br /&gt;
TTD calculates all costs by multiplying a 32-bit [[BaseCosts|base amount]] with an 8-bit factor. &amp;amp;nbsp;The base amount is changed according to inflation, whereas the factor remains constant.&lt;br /&gt;
&lt;br /&gt;
For the running costs of train vehicles, the following base amounts are available depending on the vehicle type (the value here is a pointer into TTD&#039;s memory where the actual amount is stored):&lt;br /&gt;
&lt;br /&gt;
||Type|Value|in little-endian notation&lt;br /&gt;
&lt;br /&gt;
Steam engines|4C30|30 4C 00 00&lt;br /&gt;
&lt;br /&gt;
Diesel engines|4C36|36 4C 00 00&lt;br /&gt;
&lt;br /&gt;
Electric engines|4C3C|3C 4C 00 00&lt;br /&gt;
&lt;br /&gt;
Wagons|0|00 00 00 00||&lt;br /&gt;
&lt;br /&gt;
Theoretically, you could use pointers to other base amounts available in TTD, but these are the numbers TTD uses for train vehicles.&lt;br /&gt;
&lt;br /&gt;
The following are some real values for maintenance costs depending on the setting of the above two factors. &amp;amp;nbsp;This value is correct for medium difficulty, but increases and decreases for hard and easy difficulties respectively. &amp;amp;nbsp;These are the costs of a new game starting in 1921, because they obviously increase with inflation over time (unless noinflation is turned on).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running cost base 4C30 (steam)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
||Running cost factor|Maintenance cost&lt;br /&gt;
&lt;br /&gt;
01|$ 42&lt;br /&gt;
&lt;br /&gt;
10|$ 700&lt;br /&gt;
&lt;br /&gt;
20|$ 1.400&lt;br /&gt;
&lt;br /&gt;
80|$ 5.600&lt;br /&gt;
&lt;br /&gt;
A0|$ 7.000&lt;br /&gt;
&lt;br /&gt;
FF|$ 11.112||&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running cost base 4C36 (diesel)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
||Running cost factor|Maintenance cost&lt;br /&gt;
&lt;br /&gt;
01|$ 40&lt;br /&gt;
&lt;br /&gt;
10|$ 650&lt;br /&gt;
&lt;br /&gt;
20|$ 1.300&lt;br /&gt;
&lt;br /&gt;
80|$ 5.200&lt;br /&gt;
&lt;br /&gt;
A0|$ 6.500&lt;br /&gt;
&lt;br /&gt;
FF|$ 10.318||&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running cost base 4C3C (electric)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
||Running cost factor|Maintenance cost&lt;br /&gt;
&lt;br /&gt;
01|$ 36&lt;br /&gt;
&lt;br /&gt;
10|$ 600&lt;br /&gt;
&lt;br /&gt;
20|$ 1.200&lt;br /&gt;
&lt;br /&gt;
80|$ 4.800&lt;br /&gt;
&lt;br /&gt;
A0|$ 6.000&lt;br /&gt;
&lt;br /&gt;
FF|$ 9.524||&lt;br /&gt;
&lt;br /&gt;
==Cost factor (17)==&lt;br /&gt;
&lt;br /&gt;
The cost factor is a bit-coded value which determines how expensive an engine is. There is no distinction between steam, diesel or electric engines, they all use the same cost factor. The table below gives you some values to use for finding the right price for your engines.&lt;br /&gt;
&lt;br /&gt;
||Cost factor|Price&lt;br /&gt;
&lt;br /&gt;
01|$ 3.124&lt;br /&gt;
&lt;br /&gt;
10|$ 50.000&lt;br /&gt;
&lt;br /&gt;
20|$ 100.000&lt;br /&gt;
&lt;br /&gt;
80|$ 400.000&lt;br /&gt;
&lt;br /&gt;
A0|$ 500.000&lt;br /&gt;
&lt;br /&gt;
FF|$ 796.874||&lt;br /&gt;
&lt;br /&gt;
==Engine traction type (19)==&lt;br /&gt;
&lt;br /&gt;
This sets the traction type of a train engine, i.e. whether it is powered by steam, diesel, electric, monorail or maglev technology. &amp;amp;nbsp;It also sets the corresponding sound effect of the engine, and if property 22 is not set, the visual effect as well.&lt;br /&gt;
&lt;br /&gt;
The following ranges are available (and it does not matter which value you pick):&lt;br /&gt;
&lt;br /&gt;
||Values|Traction type&lt;br /&gt;
&lt;br /&gt;
00..07|Steam&lt;br /&gt;
&lt;br /&gt;
08..27|Diesel&lt;br /&gt;
&lt;br /&gt;
28..31|Electric&lt;br /&gt;
&lt;br /&gt;
32..37|Monorail&lt;br /&gt;
&lt;br /&gt;
38..41|Maglev||&lt;br /&gt;
&lt;br /&gt;
Default value is 00, i.e. steam. For setting the appropriate track type, see [[Action0Trains#Track_type_05_|prop05]].&lt;br /&gt;
&lt;br /&gt;
In OpenTTD, if a [[Action0Railtypes|rail type]] translation table is loaded, setting this property does NOT alter the track type.&lt;br /&gt;
&lt;br /&gt;
==Sort vehicle list (1A)==&lt;br /&gt;
&lt;br /&gt;
This property is an extended byte in OpenTTD since r13831!&lt;br /&gt;
&lt;br /&gt;
This is not a property as such, but an action. &amp;amp;nbsp;It forces TTDPatch to shuffle the vehicle this &amp;amp;quot;property&amp;amp;quot; is being set for in front of the vehicle with the given value of the property. &amp;amp;nbsp;The order of this list is only used in the train purchase window.&lt;br /&gt;
&lt;br /&gt;
For example, setting prop. 1A for vehicle 09 to a value of 07 would lead to the following internal list: ... 05 06 09 07 08 0A 0B ...&lt;br /&gt;
&lt;br /&gt;
This property can not simply be overwritten, because the list is already shuffled when trying to do so. &amp;amp;nbsp;It is possible to reset the list to its original order with a special action 0 that has num-info set to 0, and only sets property 1A for trains:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+00 00 01 00 00 1A+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resetting the list should however only be done by sets that contain replacements for all train vehicles.&lt;br /&gt;
&lt;br /&gt;
==Powered train wagons (1B and 23, see also 22)==&lt;br /&gt;
&lt;br /&gt;
Normally, train wagons are unpowered in TTD, and if you set property 0B to a non-zero value, they become engines instead. &amp;amp;nbsp;Therefore, to model real-life trains where wagons have power, a different mechanism is needed.&lt;br /&gt;
&lt;br /&gt;
To make train wagons powered, you set property 1B of the &#039;&#039;&#039;engine&#039;&#039;&#039; instead of the wagon. This determines how much power each wagon adds to the train when attached to this engine. This only applies to wagons with a [[Action3|graphics override]] for this engine as well. &amp;amp;nbsp;This means that for example passenger wagons (with an override) will add power, but coal wagons (with no override) will not.&lt;br /&gt;
&lt;br /&gt;
In addition to adding power, these wagons are also heavier by the amount set in property 23.&lt;br /&gt;
&lt;br /&gt;
==Callbacks (1E)==&lt;br /&gt;
&lt;br /&gt;
For trains, the following [[Callbacks|callbacks]] have to be enabled by setting the corresponding bit in property 1E (certain other, not as frequently used callbacks are available without setting a bit here):&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Variable 0C value|Callback&lt;br /&gt;
&lt;br /&gt;
0|1|10|Powered wagons and visual effect&lt;br /&gt;
&lt;br /&gt;
1|2|11|Wagon length&lt;br /&gt;
&lt;br /&gt;
2|4|12|Load amount&lt;br /&gt;
&lt;br /&gt;
3|8|15|Set refitted capacity&lt;br /&gt;
&lt;br /&gt;
4|10|16|Build articulated engines&lt;br /&gt;
&lt;br /&gt;
5|20|19|show a suffix after the cargo type name&lt;br /&gt;
&lt;br /&gt;
6|40|2D|Select color mapping for vehicle&lt;br /&gt;
&lt;br /&gt;
7|80|33|Sound effect callbacks||&lt;br /&gt;
&lt;br /&gt;
Bit is the bit you have to set, you do this by adding all the values for all the bits. Variable 0C value is what variable 0C will be set to, for checking it in the variational action 2 for callbacks.&lt;br /&gt;
&lt;br /&gt;
Callbacks 1D (Can wagon be attached?), 23 (Additional text in purchase screen), 31 (Start/stop check), 32 &amp;amp;nbsp; &amp;amp;nbsp;(32-day callback), 34 &amp;amp;nbsp; &amp;amp;nbsp; (Autoreplace vehicle selection) and 36 (Change Vehicle Properties) do not need a bit to activate them, they are always active and will be used if defined in the action 3/action 2 chain.&lt;br /&gt;
&lt;br /&gt;
==Coefficient of tractive effort (1F)==&lt;br /&gt;
&lt;br /&gt;
This cofficient sets what fraction of the vehicle weight is equal to the maximum tractive effort. &amp;amp;nbsp;This includes the effect of having some unpowered axles, as well as the coefficient of friction that is available.&lt;br /&gt;
&lt;br /&gt;
Theoretically, this value should be calculated by taking the ratio of adhesive weight W{SUB()}adh{SUB} (i.e. the vehicle weight that rests on powered axles) times the coefficient of friction &amp;amp;micro; between the wheels and the rails to the total vehicle weight W, times 255, and convert to hex:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;prop. 1F = HEX &lt;br /&gt;
&lt;br /&gt;
[[Action0Cargos#Cargo_classes_16_|action0 cargos]] page for bits and classes defined so far.&lt;br /&gt;
&lt;br /&gt;
Note that cargo types may belong to several classes. This is the reason for making two properties, an additive and a subtractive one, because this way a vehicle can be specified to be refittable to, for example, all express cargo that does not require refrigeration (i.e., from the default cargos, no food).&lt;br /&gt;
&lt;br /&gt;
For the cargo types added in this way, the vehicle will probably have no specific graphics (in [[Action3|action 3]]) to show the cargo load. &amp;amp;nbsp;In this case, the default will be used, which should therefore be sufficiently generic-looking if possible. However, using [[VarAction2Vehicles#Vehicle_cargo_info_47_|vehicle variable 47]] you can at least select the graphics most appropriate for the cargo type&#039;s class.&lt;br /&gt;
&lt;br /&gt;
About the interaction with other properties take a look at the summary page about &amp;amp;nbsp;[[VehicleRefitting|vehicle refitting]].&lt;br /&gt;
&lt;br /&gt;
==Long format introduction date (2A)==&lt;br /&gt;
&lt;br /&gt;
Set the vehicle introduction date, in days since the year 0. This takes account of leap years; dividable by 4, but not 100 unless 400. A start date of 1920-01-01 is obtained with a value of 701265 (51 B3 0A 00). This property must be set after property 00 to take effect. In TTDPatch, dates after 2044 will be limited to 2044.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
Below is an example of what a real Action 0 pseudo-sprite could look like for a train engine.&lt;br /&gt;
&lt;br /&gt;
(A basic version)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;10 * 14 &amp;amp;nbsp;00 00 03 01 02 09 C0 00 0B D8 0E 12 FD&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Bytes&#039;&#039;&#039;|&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
10|&amp;amp;lt;Sprite-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
14|&amp;amp;lt;Length&amp;amp;gt;: of the action in bytes; start counting at 0 (&amp;amp;lt;action&amp;amp;gt;)&lt;br /&gt;
&lt;br /&gt;
00|&amp;amp;lt;action&amp;amp;gt;: sets this pseudo-sprite to function as action 0&lt;br /&gt;
&lt;br /&gt;
00|&amp;amp;lt;Feature&amp;amp;gt;: In this case Train&lt;br /&gt;
&lt;br /&gt;
03|&amp;amp;lt;Num-props&amp;amp;gt;: 3 Properties to change&lt;br /&gt;
&lt;br /&gt;
01|&amp;amp;lt;Num-info&amp;amp;gt;: 1 vehicle ID to make changes to&lt;br /&gt;
&lt;br /&gt;
02|&amp;amp;lt;ids...&amp;amp;gt;: vehcile ID (02 - Ploddyphut Choo-Choo)&lt;br /&gt;
&lt;br /&gt;
|&#039;&#039;&#039;Properties&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
09|&amp;amp;lt;Speed&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
C0 00|&amp;amp;lt;Value&amp;amp;gt;: Value for Speed (192 Km/h)&lt;br /&gt;
&lt;br /&gt;
0B|&amp;amp;lt;Power&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
D8 0E|&amp;amp;lt;value&amp;amp;gt;: value for Power (3800 HP)&lt;br /&gt;
&lt;br /&gt;
12|&amp;amp;lt;Sprite ID&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
FD|&amp;amp;lt;value&amp;amp;gt;: FD for new graphics||&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=StringCodes&amp;diff=881</id>
		<title>StringCodes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=StringCodes&amp;diff=881"/>
		<updated>2010-11-17T18:37:19Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Description of characters in TTD&#039;s character set&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=String Codes=&lt;br /&gt;
&lt;br /&gt;
Texts in TTD are mostly in the Latin-1 (ISO-8859-1) character set (except when using UTF-8 encoding; see below), however a few characters are different. &amp;amp;nbsp;Also, some characters have special meaning. These are explained in the following table.&lt;br /&gt;
&lt;br /&gt;
||Range, hex|Meaning&lt;br /&gt;
&lt;br /&gt;
00..1F|Control characters, unused except for the following:&lt;br /&gt;
&lt;br /&gt;
|01 X offset in next byte of string (variable space)&lt;br /&gt;
&lt;br /&gt;
|0D New line&lt;br /&gt;
&lt;br /&gt;
|0E Set small font size&lt;br /&gt;
&lt;br /&gt;
|0F Set large font size&lt;br /&gt;
&lt;br /&gt;
|1F X and Y offsets in next two bytes of string&lt;br /&gt;
&lt;br /&gt;
20..7A| Latin-1 characters, from space &amp;amp;quot; &amp;amp;quot; up to lower case &amp;amp;quot;z&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
7B..87| Formatting instructions, all take their argument from the stack if not otherwise specified&lt;br /&gt;
&lt;br /&gt;
|7B Print dword&lt;br /&gt;
&lt;br /&gt;
|7C Print signed word&lt;br /&gt;
&lt;br /&gt;
|7D Print signed byte&lt;br /&gt;
&lt;br /&gt;
|7E Print unsigned word&lt;br /&gt;
&lt;br /&gt;
|7F Print dword in currency units&lt;br /&gt;
&lt;br /&gt;
|80 Print substring (text ID from stack)&lt;br /&gt;
&lt;br /&gt;
|81 Print substring (text ID in next 2 bytes of string)&lt;br /&gt;
&lt;br /&gt;
|82 Print date (day, month, year)&lt;br /&gt;
&lt;br /&gt;
|83 Print month and year&lt;br /&gt;
&lt;br /&gt;
|84 Print signed word in speed units&lt;br /&gt;
&lt;br /&gt;
|85 Discard next word from stack&lt;br /&gt;
&lt;br /&gt;
|86 Rotate down top 4 words on stack&lt;br /&gt;
&lt;br /&gt;
|87 Print signed word in litres&lt;br /&gt;
&lt;br /&gt;
88..98|Colour codes&lt;br /&gt;
&lt;br /&gt;
|88 Blue&lt;br /&gt;
&lt;br /&gt;
|89 Light Gray&lt;br /&gt;
&lt;br /&gt;
|8A Light Orange (&amp;amp;quot;Gold&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
|8B Red&lt;br /&gt;
&lt;br /&gt;
|8C Purple&lt;br /&gt;
&lt;br /&gt;
|8D ))Gray-Green[[]]Gray-Green[[&lt;br /&gt;
&lt;br /&gt;
|8E Orange&lt;br /&gt;
&lt;br /&gt;
|8F Green&lt;br /&gt;
&lt;br /&gt;
|90 Yellow&lt;br /&gt;
&lt;br /&gt;
|91 Light Green&lt;br /&gt;
&lt;br /&gt;
|92 ))Red-Brown[[]]Red-Brown[[&lt;br /&gt;
&lt;br /&gt;
|93 Brown&lt;br /&gt;
&lt;br /&gt;
|94 White&lt;br /&gt;
&lt;br /&gt;
|95 Light Blue&lt;br /&gt;
&lt;br /&gt;
|96 Dark Gray&lt;br /&gt;
&lt;br /&gt;
|97 Mauve (grayish purple)&lt;br /&gt;
&lt;br /&gt;
|98 Black&lt;br /&gt;
&lt;br /&gt;
99|Switch to company colour that follows in next byte (enabled by enhancegui)&lt;br /&gt;
&lt;br /&gt;
9A|Extended format code in next byte:&lt;br /&gt;
&lt;br /&gt;
|00 -or- 01 Display 64-bit value from stack in currency units&lt;br /&gt;
&lt;br /&gt;
|02 Ignore next colour byte. Multiple instances will skip multiple colour bytes.&lt;br /&gt;
&lt;br /&gt;
|03 WORD Push WORD onto the textref stack&lt;br /&gt;
&lt;br /&gt;
|04 BYTE Un-print the previous BYTE characters.&lt;br /&gt;
&lt;br /&gt;
|05 For internal use only. Not valid in GRF files.&lt;br /&gt;
&lt;br /&gt;
|06 Print byte in hex (since TTDPatch r2007)&lt;br /&gt;
&lt;br /&gt;
|07 Print word in hex (since TTDPatch r2007)&lt;br /&gt;
&lt;br /&gt;
|08 Print dword in hex (since TTDPatch r2007)&lt;br /&gt;
&lt;br /&gt;
|09 For internal use only. Usage in NewGRFs will most likely crash TTDPatch. (since TTDPatch r2128)&lt;br /&gt;
&lt;br /&gt;
|0A For internal use only. Usage in NewGRFs will most likely crash TTDPatch. (since TTDPatch r2128)&lt;br /&gt;
&lt;br /&gt;
|0B Print 64-bit value in hex (since TTDPatch r2178)&lt;br /&gt;
&lt;br /&gt;
|0C Print name of station with id in next textrefstack word (since TTDPatch r2178)&lt;br /&gt;
&lt;br /&gt;
|0D Print signed word in tonnes (since OpenTTD r21086)&lt;br /&gt;
&lt;br /&gt;
|0E Set gender of string, NewGRF internal ID in next byte. Must be first in a string (since OpenTTD r21209) (*)&lt;br /&gt;
&lt;br /&gt;
|0F Select case for next substring, NewGRF internal ID in next byte (since OpenTTD r21209) (*)&lt;br /&gt;
&lt;br /&gt;
|10 Begin choice list value, NewGRF internal ID in next byte (since OpenTTD r21211) (**)&lt;br /&gt;
&lt;br /&gt;
|11 Begin choice list default (since OpenTTD r21211) (**)&lt;br /&gt;
&lt;br /&gt;
|12 End choice list (since OpenTTD r21211) (**)&lt;br /&gt;
&lt;br /&gt;
|13 Begin gender choice list, stack offset of substring to get gender from in next byte (since OpenTTD r21211) (**)&lt;br /&gt;
&lt;br /&gt;
|14 Begin case choice list (since OpenTTD r21211) (**)&lt;br /&gt;
&lt;br /&gt;
|15 Begin plural choice list, stack offset of value to get plural for in next byte (since OpenTTD r21216) (***)&lt;br /&gt;
&lt;br /&gt;
9B..9D|Reserved&lt;br /&gt;
&lt;br /&gt;
9E..FF|Latin-1 characters, except for the following:&lt;br /&gt;
&lt;br /&gt;
|9E Euro character &amp;amp;quot;&amp;amp;euro;&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
|9F Capital Y umlaut &amp;amp;quot;&amp;amp;Yuml;&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
|A0 Scroll button up&lt;br /&gt;
&lt;br /&gt;
|AA Scroll button down&lt;br /&gt;
&lt;br /&gt;
|AC Tick mark&lt;br /&gt;
&lt;br /&gt;
|AD X mark&lt;br /&gt;
&lt;br /&gt;
|AF Scroll button right&lt;br /&gt;
&lt;br /&gt;
|B4 Train symbol&lt;br /&gt;
&lt;br /&gt;
|B5 Truck symbol&lt;br /&gt;
&lt;br /&gt;
|B6 Bus symbol&lt;br /&gt;
&lt;br /&gt;
|B7 Plane symbol&lt;br /&gt;
&lt;br /&gt;
|B8 Ship symbol&lt;br /&gt;
&lt;br /&gt;
|B9 Superscript -1&lt;br /&gt;
&lt;br /&gt;
|BC Small scroll button up&lt;br /&gt;
&lt;br /&gt;
|BD Small scroll button down||&lt;br /&gt;
&lt;br /&gt;
The formatting instructions must not be used except in strings that expect them, and then they may not be out of order (with the possible exception of code 86 shuffling the internal stack). When used improperly, they will most likely crash TTD. Code 81 is always safe to use (provided that the referenced text ID uses no unsafe formatting instructions either), and will insert the given text ID (e.g. &amp;amp;quot;\81\3D\A0&amp;amp;quot; will insert text ID A03D, &amp;amp;quot;\98Refit Aircraft&amp;amp;quot;). Note however that if you want to include e.g. ID D000/D400, the 00 byte will be considered the end of string, and this will therefore break if additional texts are supposed to follow in the action 4. DCxx IDs must not be included; neither codes 80 nor 81 correctly access DCxx IDs.&lt;br /&gt;
&lt;br /&gt;
Each formatting instructions removes its argument from the stack, so that the next one will receive the following bytes as arguments. Code 86 takes the top four words from the stack, let&#039;s call them W1 through W4, and reorders them as W4 W1 W2 W3. This is used for languages in which industries or stations should be named not &amp;amp;quot;Flinfingbury Power Plant&amp;amp;quot; but &amp;amp;quot;Power Plant Flinfingbury&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(*) Maps a NewGRF internal gender or case ID to an OpenTTD gender or case. The internal ID is resolved to the appropriate OpenTTD gender or case at load time by means of the mapping. The first internal ID in the mapping that matches the ID from the string and has an existing OpenTTD gender or case is taken, i.e. the list of mappings is filtered by internal ID and existance of the OpenTTD gender/case and then the top element is used. When the gender or case ID is not known, or there is no existing OpenTTD gender or case with the mapped names the whole mapping is ignored and the default gender or case is taken.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~// Gender translation table&lt;br /&gt;
&lt;br /&gt;
// Current OpenTTD German translation uses m, w, n and p but&lt;br /&gt;
&lt;br /&gt;
// support a (fictitious) previous version that used masculine,&lt;br /&gt;
&lt;br /&gt;
// feminine, neuter and plural as gender names.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;0 * 56 &amp;amp;nbsp; &amp;amp;nbsp; 00 08 01 01 02&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; 13&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;01 &amp;amp;quot;m&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;01 &amp;amp;quot;masculine&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;02 &amp;amp;quot;w&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;02 &amp;amp;quot;feminine&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;03 &amp;amp;quot;n&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;03 &amp;amp;quot;neuter&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;04 &amp;amp;quot;p&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;04 &amp;amp;quot;plural&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
// Brauerei is a female word in German; this sets it as female.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;1 * 40 &amp;amp;nbsp; &amp;amp;nbsp; 04 0A 82 01 73 DC C3 9E 9A 0E 02 &amp;amp;quot;Brauerei&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case OpenTTD would look for NewGRF internal ID 2 in the gender table. This would yield &amp;amp;quot;w&amp;amp;quot; and &amp;amp;quot;feminine&amp;amp;quot; as OpenTTD gender names. In current OpenTTD this would match &amp;amp;quot;w&amp;amp;quot;, in the fictitious older version of OpenTTD it will match &amp;amp;quot;feminine&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(**) Maps an OpenTTD gender or case to the NewGRF internal gender or case ID. The mapping is resolved at load time by going through all cases or genders OpenTTD&#039;s translation knows an mapping these to NewGRF internal IDs. If mapping is found the default choice list item is chosen. This happens by filtering the mapping on the gender or case name and then the NewGRF internal ID of the top element is used.&lt;br /&gt;
&lt;br /&gt;
The choice list string codes are related and must be used in a specific manner:&lt;br /&gt;
&lt;br /&gt;
Genders: 9A 13 &amp;amp;lt;offset&amp;amp;gt; (9A 10 &amp;amp;lt;index&amp;amp;gt; &amp;amp;lt;string&amp;amp;gt;)+ 9A 11 &amp;amp;lt;default&amp;amp;gt; 9A 12&lt;br /&gt;
&lt;br /&gt;
Cases: 9A 14 (9A 10 &amp;amp;lt;ndex&amp;amp;gt; &amp;amp;lt;string&amp;amp;gt;)+ 9A 11 &amp;amp;lt;default&amp;amp;gt; 9A 12&lt;br /&gt;
&lt;br /&gt;
Plurals: 9A 13 &amp;amp;lt;offset&amp;amp;gt; (9A 10 &amp;amp;lt;index&amp;amp;gt; &amp;amp;lt;string&amp;amp;gt;)+ 9A 11 &amp;amp;lt;default&amp;amp;gt; 9A 12&lt;br /&gt;
&lt;br /&gt;
The offset is the stack location of the substring/value you want to get the gender/plural for. This is the real offset plus 80, i.e. an offset of 0 becomes 80 and an offset of 1 becomes 81 in the NFO.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~// Assuming the translation table of the previous example&lt;br /&gt;
&lt;br /&gt;
// A string with a gender choice list and a stack item that gets resolved&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;2 * 29 &amp;amp;nbsp; &amp;amp;nbsp; 04 0A FF 01 1A DC &amp;amp;quot;D&amp;amp;quot; 9A 13 80 9A 10 1 &amp;amp;quot;er&amp;amp;quot; 9A 10 3 &amp;amp;quot;as&amp;amp;quot; 9A 11 &amp;amp;quot;ie&amp;amp;quot; 9A 12 &amp;amp;quot; &amp;amp;quot; 80 00&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Imagine the &amp;amp;quot;Brauerei&amp;amp;quot; from the previous example being, as substring, on the stack. Then this string would resolve to &amp;amp;quot;Die Brauerei&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What happens in OpenTTD is that whenever the &amp;amp;quot;begin gender choice list&amp;amp;quot; string code is found it will resolve the string at the given stack location. Of that resolved string the first character is compared to the &amp;amp;quot;set gender&amp;amp;quot; string code and if that is the case the (mapped) OpenTTD gender is retrieved. When there is &amp;amp;quot;set gender&amp;amp;quot; string code the first OpenTTD gender is used. After resolving the OpenTTD gender that gender is reverse mapped to a NewGRF internal ID. If that NewGRF internal ID exists in one of the &amp;amp;quot;choice list values&amp;amp;quot; that (sub)string is taken (up till the next choice list value/default). If there is no reverse mapping the string at the &amp;amp;quot;choice list default&amp;amp;quot; string code is used up till the &amp;amp;quot;end choice list&amp;amp;quot; string code. Further processing of the string happens after the choice list, i.e. the (sub)strings in the choice list may not contain any special string codes except colour codes.&lt;br /&gt;
&lt;br /&gt;
Case choice lists work in a similar matter, except that instead of resolving a case from a (sub)string we &amp;amp;quot;are&amp;amp;quot; the substring; the string that includes this substring has set a case using the &amp;amp;quot;select case&amp;amp;quot; string code. As such no offset has to be given to the choice list, but the rest works in the same way as gender choice lists.&lt;br /&gt;
&lt;br /&gt;
(***) The plural list works like a gender list, however you have to choose one &amp;amp;quot;mapping&amp;amp;quot; from value to plural index by setting the plural form using [[Action0GeneralVariables]] property 15.&lt;br /&gt;
&lt;br /&gt;
If, for example, plural form 0 is chosen using the [[Action0GeneralVariables]] property 15, then there are 2 plural indices. If the value at the stack with the given offset equals 1 you get plural index 1, otherwise plural index 2. These plural indices are the indices that are used in the choice lists.&lt;br /&gt;
&lt;br /&gt;
||Plural form|Plural index|Description&lt;br /&gt;
&lt;br /&gt;
0|Two forms:&lt;br /&gt;
&lt;br /&gt;
|1|1&lt;br /&gt;
&lt;br /&gt;
|2|rest&lt;br /&gt;
&lt;br /&gt;
1|Only one form:&lt;br /&gt;
&lt;br /&gt;
|1|every form&lt;br /&gt;
&lt;br /&gt;
2|Two forms:&lt;br /&gt;
&lt;br /&gt;
|1|0 or 1&lt;br /&gt;
&lt;br /&gt;
|2|rest&lt;br /&gt;
&lt;br /&gt;
3|Three forms:&lt;br /&gt;
&lt;br /&gt;
|1|ending in 1, but not ending in 11&lt;br /&gt;
&lt;br /&gt;
|2|0&lt;br /&gt;
&lt;br /&gt;
|3|rest&lt;br /&gt;
&lt;br /&gt;
4|Five forms:&lt;br /&gt;
&lt;br /&gt;
|1|1&lt;br /&gt;
&lt;br /&gt;
|2|2&lt;br /&gt;
&lt;br /&gt;
|3|3-6&lt;br /&gt;
&lt;br /&gt;
|4|7-10&lt;br /&gt;
&lt;br /&gt;
|5|rest&lt;br /&gt;
&lt;br /&gt;
5|Three forms:&lt;br /&gt;
&lt;br /&gt;
|1|ending in 1, but not ending in 11&lt;br /&gt;
&lt;br /&gt;
|2|ending in 2-9, but not ending in 1~91~2-9~93~&lt;br /&gt;
&lt;br /&gt;
|3|rest&lt;br /&gt;
&lt;br /&gt;
6|Three forms:&lt;br /&gt;
&lt;br /&gt;
|1|ending in 1, but not ending in 11&lt;br /&gt;
&lt;br /&gt;
|2|ending in 2-4, but not ending in 1~91~2-4~93~&lt;br /&gt;
&lt;br /&gt;
|3|rest&lt;br /&gt;
&lt;br /&gt;
7|Three forms:&lt;br /&gt;
&lt;br /&gt;
|1|0&lt;br /&gt;
&lt;br /&gt;
|2|ending in 2-4, but not ending in 1~91~2-4~93~&lt;br /&gt;
&lt;br /&gt;
|3|rest&lt;br /&gt;
&lt;br /&gt;
8|Four forms:&lt;br /&gt;
&lt;br /&gt;
|1|ending in 01&lt;br /&gt;
&lt;br /&gt;
|2|ending in 02&lt;br /&gt;
&lt;br /&gt;
|3|ending in 03 or ending in 04&lt;br /&gt;
&lt;br /&gt;
|4|rest&lt;br /&gt;
&lt;br /&gt;
9|Two forms:&lt;br /&gt;
&lt;br /&gt;
|1|ending in 1, but not ending in 11&lt;br /&gt;
&lt;br /&gt;
|2|ret&lt;br /&gt;
&lt;br /&gt;
10|Three forms:&lt;br /&gt;
&lt;br /&gt;
|1|1&lt;br /&gt;
&lt;br /&gt;
|2|2-4&lt;br /&gt;
&lt;br /&gt;
|3|rest&lt;br /&gt;
&lt;br /&gt;
11|Two forms:&lt;br /&gt;
&lt;br /&gt;
|1|ending in 0, 1, 3, 6, 7 and 8&lt;br /&gt;
&lt;br /&gt;
|2|ending in 2, 4, 5 and 9&lt;br /&gt;
&lt;br /&gt;
12|Four forms:&lt;br /&gt;
&lt;br /&gt;
|1|1&lt;br /&gt;
&lt;br /&gt;
|2|0 or ending in 02-10&lt;br /&gt;
&lt;br /&gt;
|3|ending in 11-19&lt;br /&gt;
&lt;br /&gt;
|4|rest||&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~// Gender translation table&lt;br /&gt;
&lt;br /&gt;
// Set the plural type to type 0&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;0 * 7 &amp;amp;nbsp; &amp;amp;nbsp; 00 08 01 01 02 15 00&lt;br /&gt;
&lt;br /&gt;
// In case of the first stack item being 1 use &amp;amp;quot;Tonne&amp;amp;quot;, otherwise use &amp;amp;quot;Tonnen&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;1 * 34 &amp;amp;nbsp; &amp;amp;nbsp; 04 0B 82 01 1A DC C3 9E &amp;amp;quot;\UE07C Tonne&amp;amp;quot; 9A 15 80 9A 10 01 &amp;amp;quot;&amp;amp;quot; 9A 11 &amp;amp;quot;n&amp;amp;quot; 9A 12 &amp;amp;quot; Sand&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=UTF-8 support=&lt;br /&gt;
&lt;br /&gt;
Since 2.0.1 alpha 68, TTDPatch supports UTF-8 encoded input strings. Use [[Action12|action 12]] to define glyphs for the characters which do not exist in TTD&#039;s .grf files (possible since 2.0.1 alpha 73).&lt;br /&gt;
&lt;br /&gt;
To indicate that a given string is in UTF-8 encoding, start it with a capital thorn (U+00DE, &amp;amp;quot;&amp;amp;THORN;&amp;amp;quot;), encoded in UTF-8 as usual with the bytes C3 9E. &amp;amp;nbsp;Everything in that string is then assumed to be in UTF-8 encoding, with the following exception: if characters appear that are not valid UTF-8 sequences, they are assumed to be one of the above control codes. This way, it is still possible to write, e.g. &amp;amp;quot;&amp;amp;THORN;Capacity: &amp;amp;quot; 87 &amp;amp;quot;litres&amp;amp;quot;, without encoding the 87 in UTF-8 (which would instead refer to a character installed at codepoint U+0087).&lt;br /&gt;
&lt;br /&gt;
In addition, this allows using the non-Unicode characters 9E, 9F, A0, AA, AC, AD, AF, B4..B9, BC and BD from the above list, which when encoded with UTF-8 would refer to their respective Unicode characters instead. To use the TTD characters, simply do not encode them using UTF-8 but enter them directly as bytes. This causes them to be an invalid UTF-8 sequence and allows TTDPatch to use the correct symbol from TTD&#039;s fonts.&lt;br /&gt;
&lt;br /&gt;
Alternatively, these symbols (in fact, the TTD character set from 20 to FF) are also mapped into the Unicode Private Use Area at U+E0xx, so to encode the truck symbol, you may use character U+E0B5 as well, although this will probably be an unprintable character in most text editors.&lt;br /&gt;
&lt;br /&gt;
Finally, characters 7B..7F no longer function as the above formatting instructions, but will display regular glyphs instead (provided they are installed; by default TTD has none at these codepoints). Instead, to use these formatting instructions in UTF-8 mode, you need to use their Private Use Area codepoint at U+E0xx.&lt;br /&gt;
&lt;br /&gt;
Basically there are three possibilities:&lt;br /&gt;
# Characters U+E020..U+E0FF &amp;amp;nbsp;in the E0xx Private Use Area do what their respective character xx would do in TTD, as do the control characters below U+0020&lt;br /&gt;
# All other valid UTF-8 sequences display actual glyphs, if they are available&lt;br /&gt;
# All invalid UTF-8 sequences do what their individual bytes would do in TTD&lt;br /&gt;
&lt;br /&gt;
To summarize, here&#039;s a handy table:&lt;br /&gt;
&lt;br /&gt;
||Character|Encoding in UTF-8 mode|Meaning&lt;br /&gt;
&lt;br /&gt;
7E|7E|Unicode Character &#039;TILDE&#039; (~)&lt;br /&gt;
&lt;br /&gt;
82|82 (invalid UTF-8)|Print date (day, month, year)&lt;br /&gt;
&lt;br /&gt;
82|C2 82|Display glyph for U+0082&lt;br /&gt;
&lt;br /&gt;
AC|AC (invalid UTF-8)|Tick mark&lt;br /&gt;
&lt;br /&gt;
AC|C2 AC|Unicode Character &#039;NOT SIGN&#039; (&amp;amp;not;)&lt;br /&gt;
&lt;br /&gt;
E07E|EE 81 BE|Print unsigned word&lt;br /&gt;
&lt;br /&gt;
E082|EE 82 82|Print date (day, month, year)&lt;br /&gt;
&lt;br /&gt;
E0AC|EE 82 AC|Tick mark||&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Cargos&amp;diff=46</id>
		<title>Action0/Cargos</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Cargos&amp;diff=46"/>
		<updated>2010-11-17T18:36:01Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Action 0 properties for cargo types&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 0 - Properties for cargo types=&lt;br /&gt;
&lt;br /&gt;
Defining properties of cargo types&lt;br /&gt;
&lt;br /&gt;
{maketoc}&lt;br /&gt;
&lt;br /&gt;
The [[NewCargos]] switch of TTDPatch allows modifying the existing 12 cargos per climate, and allows adding 20 new cargos per climate as well. These cargo slots are numbered from 0 to 31, where slots 0-11 are used by default TTD cargos and slots 12-31 contain uninitialized garbage by default (so you can&#039;t trust them having meaningful information, you must set all of their properties).&lt;br /&gt;
&lt;br /&gt;
-=Properties=-&lt;br /&gt;
&lt;br /&gt;
||Number|Size|Description&lt;br /&gt;
&lt;br /&gt;
08|B|Bit number for bitmasks&lt;br /&gt;
&lt;br /&gt;
09|W|TextID for the cargo type name&lt;br /&gt;
&lt;br /&gt;
0A|W|TextID for the name of one unit from the cargo type&lt;br /&gt;
&lt;br /&gt;
0B|W|TextID to be displayed for 1 unit of cargo&lt;br /&gt;
&lt;br /&gt;
0C|W|TextID to be displayed for multiple units of cargo&lt;br /&gt;
&lt;br /&gt;
0D|W|TextID for cargo type abbreviation&lt;br /&gt;
&lt;br /&gt;
0E|W|Sprite number for the icon of the cargo&lt;br /&gt;
&lt;br /&gt;
0F|B|Weight of one unit of the cargo&lt;br /&gt;
&lt;br /&gt;
10,11|B|Penalty times&lt;br /&gt;
&lt;br /&gt;
12|D|Base price&lt;br /&gt;
&lt;br /&gt;
13|B|Color for the station list window&lt;br /&gt;
&lt;br /&gt;
14|B|Color for the cargo payment list window&lt;br /&gt;
&lt;br /&gt;
15|B|Freight status (for [[FreightTrains]] switch); 0=not freight, 1=is freight&lt;br /&gt;
&lt;br /&gt;
16|W|Cargo classes&lt;br /&gt;
&lt;br /&gt;
17|D|Cargo label&lt;br /&gt;
&lt;br /&gt;
18|B|Substitute type for town growth&lt;br /&gt;
&lt;br /&gt;
19|W|Multiplier for town growth&lt;br /&gt;
&lt;br /&gt;
1A|B|Callback flags&lt;br /&gt;
&lt;br /&gt;
1B|W|TextID for displaying the units of a cargo&lt;br /&gt;
&lt;br /&gt;
1C|W|TextID for displaying the amount of cargo||&lt;br /&gt;
&lt;br /&gt;
-=Comments=-&lt;br /&gt;
&lt;br /&gt;
==Bit number for bitmasks (08)==&lt;br /&gt;
&lt;br /&gt;
This value must be used in [[Action3]] and in cargo bit mask properties such as refit masks. Values 1C-1F should be safe to use (if they aren&#039;t already taken, of course) if you intend to maintain compatibility with GRFs unaware of the newcargos switch. Further assuming that no active GRFs support the toyland climate, you can use values 11-1A as well.&lt;br /&gt;
&lt;br /&gt;
Additionally, you can use the value FFh to disable the given cargo slot. This way, it won&#039;t appear in cargo type lists, but it won&#039;t be removed from things already on the map. If you disable a cargo, you&#039;ll probably want to zero out the cargo label (property 17) as well.&lt;br /&gt;
&lt;br /&gt;
==TextID for the cargo type name (09)==&lt;br /&gt;
&lt;br /&gt;
This textID should refer to the name of the cargo, capitalized, to match the TTD style (e.g. &amp;amp;quot;Passengers&amp;amp;quot;, &amp;amp;quot;Coal&amp;amp;quot;, &amp;amp;quot;Gold Ore&amp;amp;quot;, &amp;amp;quot;Milk&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
You can reuse existing [[TextIDs]] or create custom strings using [[Action4]] with an offset in the DCxx range. Note that you need to set language-id bit 7 as well in the Action4 for a custom string. (Also applies to properties 0A to 0D)&lt;br /&gt;
&lt;br /&gt;
==TextID for one unit of the type (0A)==&lt;br /&gt;
&lt;br /&gt;
This textID should refer to the cargo type name in the singular. Currently, this ID is used only in subsidy messages (&amp;amp;quot;First Passenger service...&amp;amp;quot; instead of &amp;amp;quot;First Passengers service...&amp;amp;quot;, for example)&lt;br /&gt;
&lt;br /&gt;
==TextID for 1 unit of cargo (0B)==&lt;br /&gt;
&lt;br /&gt;
This textID will be used to display the amount of the cargo if there&#039;s exactly 1 unit waiting. Although there&#039;s only one unit waiting, you&#039;ll still have to use either the special character 7C (print signed word) or 87 (print amount in litres and add suffix &amp;amp;quot; litres&amp;amp;quot;) so TTD removes the amount from its internal reference stack. For example, if you have a new cargo named &amp;amp;quot;gold ore&amp;amp;quot;, this should be &amp;amp;quot;\7C ton of gold ore&amp;amp;quot;, which will expand to &amp;amp;quot;1 ton of gold ore&amp;amp;quot;. On the other hand, a liquid cargo named &amp;amp;quot;milk&amp;amp;quot; should be something like &amp;amp;quot;\87 of milk&amp;amp;quot;, which will expand to either &amp;amp;quot;100 litres of milk&amp;amp;quot; or &amp;amp;quot;1,000 litres of milk&amp;amp;quot; (The multiplier for liquid cargos depends on miscmods.dontfixlitres. If it&#039;s on, the multiplier is 100, otherwise it&#039;s 1000)&lt;br /&gt;
&lt;br /&gt;
==TextID for multiple units of cargo (0C)==&lt;br /&gt;
&lt;br /&gt;
This textID will be used to display the amount of cargo if the amount waiting isn&#039;t exactly 1. You&#039;ll need the same special characters as above, but now they will be expanded according to the actual cargo waiting. Sticking to the example above, you&#039;ll need &amp;amp;quot;\7C tons of gold ore&amp;amp;quot; and &amp;amp;quot;\87 of milk&amp;amp;quot;, which can expand to &amp;amp;quot;42 tons of gold ore&amp;amp;quot; and &amp;amp;quot;42,000 litres of milk&amp;amp;quot;, accordingly. You will note that liquid cargos can have the same textID for both property 0B and 0C since they always use the plural form.&lt;br /&gt;
&lt;br /&gt;
==TextID for cargo type abbreviation (0D)==&lt;br /&gt;
&lt;br /&gt;
This textID will be used in the station list window to represent the cargo waiting. It should be a two-letter abbreviation prefixed by the special character 0E to switch to the microscopic font. The microscopic font has every letter capitalized, so capitalization isn&#039;t important here. Continuing the above example, gold ore could have this as &amp;amp;quot;GO&amp;amp;quot; and milk as &amp;amp;quot;MK&amp;amp;quot; (&amp;amp;quot;ML&amp;amp;quot; is already taken by mail).&lt;br /&gt;
&lt;br /&gt;
==Sprite number for icon (0E)==&lt;br /&gt;
&lt;br /&gt;
This is a sprite number of an old TTD sprite to be displayed in the station window for this cargo, or FFFFh if the icon should be found by following the action 3 associated with this cargo. The icon must not be bigger than 10x10 pixels. One icon will be shown for every 10 units of the cargo waiting, up to 23 icons, which is the maximum.&lt;br /&gt;
&lt;br /&gt;
==Weight of one unit of the cargo (0F)==&lt;br /&gt;
&lt;br /&gt;
This property defines the weight of 1 unit from the cargo, which will be used to calculate the weight of the vehicles when loaded. The unit is 1/16 ton (which is 62.5 kg). With the examples above, gold ore should have this as 16 (since 1 ton of gold ore should weigh exactly 1 ton), while milk should have this slightly above 16 (milk is denser than water).&lt;br /&gt;
&lt;br /&gt;
==Penalty times and price factor (10,11,12)==&lt;br /&gt;
&lt;br /&gt;
These three values define how much is paid for the delivery of the cargo type. The price factor is subject to inflation, but GRFs needn&#039;t care about this, TTDPatch will adjust the price for them.&lt;br /&gt;
&lt;br /&gt;
The income generated from cargo delivery is calculated as:&lt;br /&gt;
&lt;br /&gt;
income=[[Action0Trains#Cargo_classes_28_29_|train prop. 28/29]] for a description of the utility of this property.&lt;br /&gt;
&lt;br /&gt;
This is a bit mask of all cargo classes to which this cargo belongs, out of the following:&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Cargo class&lt;br /&gt;
&lt;br /&gt;
0|1|Passengers&lt;br /&gt;
&lt;br /&gt;
1|2|Mail&lt;br /&gt;
&lt;br /&gt;
2|4|Express cargo (any prioritised cargo)&lt;br /&gt;
&lt;br /&gt;
3|8|Armored cargo (needing security measures, e.g. valuables or gold)&lt;br /&gt;
&lt;br /&gt;
4|10|Bulk freight (any non-packaged cargo suitable for pouring, e.g. coal, grain, ore, cement, ...)&lt;br /&gt;
&lt;br /&gt;
5|20|Piece goods (any unitised cargo, packed or unpacked)&lt;br /&gt;
&lt;br /&gt;
6|40|Liquids (any liquid or gaseous cargo, food or chemical)&lt;br /&gt;
&lt;br /&gt;
7|80|Refrigerated cargo (any goods needing temperature-controlling, e.g. perishable goods, food, or chemicals needing cooling/heating)&lt;br /&gt;
&lt;br /&gt;
8|100|Hazardous cargo (explosives, acids, radioactive material, ...)&lt;br /&gt;
&lt;br /&gt;
9|200|covered/sheltered freight (any cargo needing moisture protection, i.e. transportation in box vans, silo wagons or containers required)&lt;br /&gt;
&lt;br /&gt;
10|400|Oversized and/or overweight cargo (any cargo needing special means of transportation, e.g. industrial equipment, machinery, large format glass, ... )&lt;br /&gt;
&lt;br /&gt;
15|8000|Special (used for livery refit tricks rather than actual cargos)||&lt;br /&gt;
&lt;br /&gt;
Only cargos which are in class 0 (passengers) will appear in bus stations. &amp;amp;nbsp;Only cargos which are &#039;&#039;not&#039;&#039; in class 0 will appear in truck stations.&lt;br /&gt;
&lt;br /&gt;
==Cargo label (17)==&lt;br /&gt;
&lt;br /&gt;
Cargo labels are globally [[CargoTypes#Cargo_Labels| unique identifiers]] for a cargo type. They are used to allow vehicle grfs to easily support many cargo types, whether they are active or not and no matter what slot or bit they are using.&lt;br /&gt;
&lt;br /&gt;
Read about the [[Action0GeneralVariables#Cargo_translation_table_09_|cargo translation table]] for further info.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The following properties exist for TTDPatch 2.0.1 alpha 72 and above only&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Substitute type and multiplier for town growth (18, 19)==&lt;br /&gt;
&lt;br /&gt;
These properties allow you to modify how a cargo type affects town growth. Property 18 can contain one of the following values:&lt;br /&gt;
&lt;br /&gt;
||Value|Meaning|Details (*)&lt;br /&gt;
&lt;br /&gt;
00|Affect towns as passengers do|Cargo produced by houses is added to the statistics in the town GUI.&lt;br /&gt;
&lt;br /&gt;
02|Affect towns as mail does|Cargo produced by houses is added to the statistics in the town GUI.&lt;br /&gt;
&lt;br /&gt;
05|Affect towns as goods/candy does|See note about subsidies below.&lt;br /&gt;
&lt;br /&gt;
09|Affect towns as water does|Second required cargo for towngrowth in the desert&lt;br /&gt;
&lt;br /&gt;
0B|Affect towns as food/fizzy drinks do|First required cargo for towngrowth in desert/above snowline. Alse see note about subsidies below.&lt;br /&gt;
&lt;br /&gt;
FF|Don&#039;t affect town growth (default)| ||&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;(*)&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt; This is the interpretation of OpenTTD. For TTDPatch see [[NewTownGrowthMechanism]], which is quite different/unrelated.&lt;br /&gt;
&lt;br /&gt;
The incoming cargo amount is multiplied by property 19, then divided by 256 before it is added to the town statistics. This allows you to have smaller or bigger impact than original cargoes do. Please note that cargoes accepted by industries affect the closest town as well; for example, if you have an industry that accepts passengers, every passenger brought to the industry affects the town just like if they were transported to the town directly. Usually, it&#039;s not a good idea to have industries that process such cargoes; they should be accepted by towns only.&lt;br /&gt;
&lt;br /&gt;
Note: In OpenTTD property 18 also affects the creation of subsidies. Usually subsidies apply to cargo transportation between two industries. For cargos with substitution-type 05 or 0B the destination will be a town instead. Independent of property 18 subsidies from town to town are only created for cargo slot 0 (Passengers).&lt;br /&gt;
&lt;br /&gt;
==Callback flags (1A)==&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Var. 0C|Callback&lt;br /&gt;
&lt;br /&gt;
0|1|39|Custom profit calculation&lt;br /&gt;
&lt;br /&gt;
1|2|145|Custom station rating calculation||&lt;br /&gt;
&lt;br /&gt;
==TextID for displaying the units of a cargo (1B)==&lt;br /&gt;
&lt;br /&gt;
This textID is used by OpenTTD to show the &amp;amp;quot;short cargo&amp;amp;quot; form for cargo units, e.g. &amp;amp;quot;10 litres&amp;amp;quot; or &amp;amp;quot;10 tonnes&amp;amp;quot;. This textID must be set after property 0B. The text this textID refers to should properly handle plurals, e.g. &amp;amp;quot;\7B item\9A\15\80\9A\10\9A\11s\9A\12&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The default for this textID depends on the default for property 0B; if the default 0B string has &amp;amp;quot;litre&amp;amp;quot;, then the default for this textID will be the unit for litres. OpenTTD maps the following textIDs so you don&#039;t need to provide translations:&lt;br /&gt;
&lt;br /&gt;
||textID|String&lt;br /&gt;
&lt;br /&gt;
004f|&amp;amp;lt;num&amp;amp;gt; passenger(s)&lt;br /&gt;
&lt;br /&gt;
0050|&amp;amp;lt;num&amp;amp;gt; tonne(s)&lt;br /&gt;
&lt;br /&gt;
0051|&amp;amp;lt;num&amp;amp;gt; bag(s)&lt;br /&gt;
&lt;br /&gt;
0052|&amp;amp;lt;num&amp;amp;gt; litre(s)&lt;br /&gt;
&lt;br /&gt;
0053|&amp;amp;lt;num&amp;amp;gt; item(s)&lt;br /&gt;
&lt;br /&gt;
0054|&amp;amp;lt;num&amp;amp;gt; crate(s)||&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;tonne&amp;amp;quot; and &amp;amp;quot;litre&amp;amp;quot; strings (textID 0050 and 0052) are automatically updated based on the user settings of unit display, e.g. they &amp;amp;quot;tonne&amp;amp;quot; might become &amp;amp;quot;kg&amp;amp;quot;. The &amp;amp;quot;(s)&amp;amp;quot; is for display purposes; in reality that is a choice list.&lt;br /&gt;
&lt;br /&gt;
Supported by OpenTTD since r21224.&lt;br /&gt;
&lt;br /&gt;
==TextID for displaying the amount of cargo (1C)==&lt;br /&gt;
&lt;br /&gt;
This textID is used by OpenTTD to show the &amp;amp;quot;long cargo&amp;amp;quot; form for cargo units, e.g. &amp;amp;quot;10 litres of water&amp;amp;quot; or &amp;amp;quot;10 tonnes of coal&amp;amp;quot;. This textID must be set after property 0c. The text this textID refers to should properly handle plurals, e.g. &amp;amp;quot;\7B item\9A\15\80\9A\10\9A\11s\9A\12 of livestock&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The default for this textID depends on the default for property 0C, but with support for plurals. For &amp;amp;quot;X litre(s)&amp;amp;quot; or &amp;amp;quot;X tonne(s)&amp;amp;quot; you should respectively use string codes 87 and 9A 0D.&lt;br /&gt;
&lt;br /&gt;
Supported by OpenTTD since r21224.&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=StringCodes&amp;diff=882</id>
		<title>StringCodes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=StringCodes&amp;diff=882"/>
		<updated>2010-11-16T21:32:23Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Description of characters in TTD&#039;s character set&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=String Codes=&lt;br /&gt;
&lt;br /&gt;
Texts in TTD are mostly in the Latin-1 (ISO-8859-1) character set (except when using UTF-8 encoding; see below), however a few characters are different. &amp;amp;nbsp;Also, some characters have special meaning. These are explained in the following table.&lt;br /&gt;
&lt;br /&gt;
||Range, hex|Meaning&lt;br /&gt;
&lt;br /&gt;
00..1F|Control characters, unused except for the following:&lt;br /&gt;
&lt;br /&gt;
|01 X offset in next byte of string (variable space)&lt;br /&gt;
&lt;br /&gt;
|0D New line&lt;br /&gt;
&lt;br /&gt;
|0E Set small font size&lt;br /&gt;
&lt;br /&gt;
|0F Set large font size&lt;br /&gt;
&lt;br /&gt;
|1F X and Y offsets in next two bytes of string&lt;br /&gt;
&lt;br /&gt;
20..7A| Latin-1 characters, from space &amp;amp;quot; &amp;amp;quot; up to lower case &amp;amp;quot;z&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
7B..87| Formatting instructions, all take their argument from the stack if not otherwise specified&lt;br /&gt;
&lt;br /&gt;
|7B Print dword&lt;br /&gt;
&lt;br /&gt;
|7C Print signed word&lt;br /&gt;
&lt;br /&gt;
|7D Print signed byte&lt;br /&gt;
&lt;br /&gt;
|7E Print unsigned word&lt;br /&gt;
&lt;br /&gt;
|7F Print dword in currency units&lt;br /&gt;
&lt;br /&gt;
|80 Print substring (text ID from stack)&lt;br /&gt;
&lt;br /&gt;
|81 Print substring (text ID in next 2 bytes of string)&lt;br /&gt;
&lt;br /&gt;
|82 Print date (day, month, year)&lt;br /&gt;
&lt;br /&gt;
|83 Print month and year&lt;br /&gt;
&lt;br /&gt;
|84 Print signed word in speed units&lt;br /&gt;
&lt;br /&gt;
|85 Discard next word from stack&lt;br /&gt;
&lt;br /&gt;
|86 Rotate down top 4 words on stack&lt;br /&gt;
&lt;br /&gt;
|87 Print signed word in litres&lt;br /&gt;
&lt;br /&gt;
88..98|Colour codes&lt;br /&gt;
&lt;br /&gt;
|88 Blue&lt;br /&gt;
&lt;br /&gt;
|89 Light Gray&lt;br /&gt;
&lt;br /&gt;
|8A Light Orange (&amp;amp;quot;Gold&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
|8B Red&lt;br /&gt;
&lt;br /&gt;
|8C Purple&lt;br /&gt;
&lt;br /&gt;
|8D ))Gray-Green[[]]Gray-Green[[&lt;br /&gt;
&lt;br /&gt;
|8E Orange&lt;br /&gt;
&lt;br /&gt;
|8F Green&lt;br /&gt;
&lt;br /&gt;
|90 Yellow&lt;br /&gt;
&lt;br /&gt;
|91 Light Green&lt;br /&gt;
&lt;br /&gt;
|92 ))Red-Brown[[]]Red-Brown[[&lt;br /&gt;
&lt;br /&gt;
|93 Brown&lt;br /&gt;
&lt;br /&gt;
|94 White&lt;br /&gt;
&lt;br /&gt;
|95 Light Blue&lt;br /&gt;
&lt;br /&gt;
|96 Dark Gray&lt;br /&gt;
&lt;br /&gt;
|97 Mauve (grayish purple)&lt;br /&gt;
&lt;br /&gt;
|98 Black&lt;br /&gt;
&lt;br /&gt;
99|Switch to company colour that follows in next byte (enabled by enhancegui)&lt;br /&gt;
&lt;br /&gt;
9A|Extended format code in next byte:&lt;br /&gt;
&lt;br /&gt;
|00 -or- 01 Display 64-bit value from stack in currency units&lt;br /&gt;
&lt;br /&gt;
|02 Ignore next colour byte. Multiple instances will skip multiple colour bytes.&lt;br /&gt;
&lt;br /&gt;
|03 WORD Push WORD onto the textref stack&lt;br /&gt;
&lt;br /&gt;
|04 BYTE Un-print the previous BYTE characters.&lt;br /&gt;
&lt;br /&gt;
|05 For internal use only. Not valid in GRF files.&lt;br /&gt;
&lt;br /&gt;
|06 Print byte in hex (since TTDPatch r2007)&lt;br /&gt;
&lt;br /&gt;
|07 Print word in hex (since TTDPatch r2007)&lt;br /&gt;
&lt;br /&gt;
|08 Print dword in hex (since TTDPatch r2007)&lt;br /&gt;
&lt;br /&gt;
|09 For internal use only. Usage in NewGRFs will most likely crash TTDPatch. (since TTDPatch r2128)&lt;br /&gt;
&lt;br /&gt;
|0A For internal use only. Usage in NewGRFs will most likely crash TTDPatch. (since TTDPatch r2128)&lt;br /&gt;
&lt;br /&gt;
|0B Print 64-bit value in hex (since TTDPatch r2178)&lt;br /&gt;
&lt;br /&gt;
|0C Print name of station with id in next textrefstack word (since TTDPatch r2178)&lt;br /&gt;
&lt;br /&gt;
|0D Print signed word in tonnes (since OpenTTD r21086)&lt;br /&gt;
&lt;br /&gt;
|0E Set gender of string, NewGRF internal ID in next byte. Must be first in a string (since OpenTTD r21209) (*)&lt;br /&gt;
&lt;br /&gt;
|0F Select case for next substring, NewGRF internal ID in next byte (since OpenTTD r21209) (*)&lt;br /&gt;
&lt;br /&gt;
|10 Begin choice list value, NewGRF internal ID in next byte (since OpenTTD r21211) (**)&lt;br /&gt;
&lt;br /&gt;
|11 Begin choice list default (since OpenTTD r21211) (**)&lt;br /&gt;
&lt;br /&gt;
|12 End choice list (since OpenTTD r21211) (**)&lt;br /&gt;
&lt;br /&gt;
|13 Begin gender choice list, stack offset of substring to get gender from in next byte (since OpenTTD r21211) (**)&lt;br /&gt;
&lt;br /&gt;
|14 Begin case choice list (since OpenTTD r21211) (**)&lt;br /&gt;
&lt;br /&gt;
|15 Begin plural choice list, stack offset of value to get plural for in next byte (since OpenTTD r21216) (***)&lt;br /&gt;
&lt;br /&gt;
9B..9D|Reserved&lt;br /&gt;
&lt;br /&gt;
9E..FF|Latin-1 characters, except for the following:&lt;br /&gt;
&lt;br /&gt;
|9E Euro character &amp;amp;quot;&amp;amp;euro;&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
|9F Capital Y umlaut &amp;amp;quot;&amp;amp;Yuml;&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
|A0 Scroll button up&lt;br /&gt;
&lt;br /&gt;
|AA Scroll button down&lt;br /&gt;
&lt;br /&gt;
|AC Tick mark&lt;br /&gt;
&lt;br /&gt;
|AD X mark&lt;br /&gt;
&lt;br /&gt;
|AF Scroll button right&lt;br /&gt;
&lt;br /&gt;
|B4 Train symbol&lt;br /&gt;
&lt;br /&gt;
|B5 Truck symbol&lt;br /&gt;
&lt;br /&gt;
|B6 Bus symbol&lt;br /&gt;
&lt;br /&gt;
|B7 Plane symbol&lt;br /&gt;
&lt;br /&gt;
|B8 Ship symbol&lt;br /&gt;
&lt;br /&gt;
|B9 Superscript -1&lt;br /&gt;
&lt;br /&gt;
|BC Small scroll button up&lt;br /&gt;
&lt;br /&gt;
|BD Small scroll button down||&lt;br /&gt;
&lt;br /&gt;
The formatting instructions must not be used except in strings that expect them, and then they may not be out of order (with the possible exception of code 86 shuffling the internal stack). When used improperly, they will most likely crash TTD. Code 81 is always safe to use (provided that the referenced text ID uses no unsafe formatting instructions either), and will insert the given text ID (e.g. &amp;amp;quot;\81\3D\A0&amp;amp;quot; will insert text ID A03D, &amp;amp;quot;\98Refit Aircraft&amp;amp;quot;). Note however that if you want to include e.g. ID D000/D400, the 00 byte will be considered the end of string, and this will therefore break if additional texts are supposed to follow in the action 4. DCxx IDs must not be included; neither codes 80 nor 81 correctly access DCxx IDs.&lt;br /&gt;
&lt;br /&gt;
Each formatting instructions removes its argument from the stack, so that the next one will receive the following bytes as arguments. Code 86 takes the top four words from the stack, let&#039;s call them W1 through W4, and reorders them as W4 W1 W2 W3. This is used for languages in which industries or stations should be named not &amp;amp;quot;Flinfingbury Power Plant&amp;amp;quot; but &amp;amp;quot;Power Plant Flinfingbury&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(*) Maps a NewGRF internal gender or case ID to an OpenTTD gender or case. The internal ID is resolved to the appropriate OpenTTD gender or case at load time by means of the mapping. The first internal ID in the mapping that matches the ID from the string and has an existing OpenTTD gender or case is taken, i.e. the list of mappings is filtered by internal ID and existance of the OpenTTD gender/case and then the top element is used. When the gender or case ID is not known, or there is no existing OpenTTD gender or case with the mapped names the whole mapping is ignored and the default gender or case is taken.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~// Gender translation table&lt;br /&gt;
&lt;br /&gt;
// Current OpenTTD German translation uses m, w, n and p but&lt;br /&gt;
&lt;br /&gt;
// support a (fictitious) previous version that used masculine,&lt;br /&gt;
&lt;br /&gt;
// feminine, neuter and plural as gender names.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;0 * 56 &amp;amp;nbsp; &amp;amp;nbsp; 00 08 01 01 02&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; 13&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;01 &amp;amp;quot;m&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;01 &amp;amp;quot;masculine&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;02 &amp;amp;quot;w&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;02 &amp;amp;quot;feminine&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;03 &amp;amp;quot;n&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;03 &amp;amp;quot;neuter&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;04 &amp;amp;quot;p&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;04 &amp;amp;quot;plural&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
// Brauerei is a female word in German; this sets it as female.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;1 * 40 &amp;amp;nbsp; &amp;amp;nbsp; 04 0A 82 01 73 DC C3 9E 9A 0E 02 &amp;amp;quot;Brauerei&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case OpenTTD would look for NewGRF internal ID 2 in the gender table. This would yield &amp;amp;quot;w&amp;amp;quot; and &amp;amp;quot;feminine&amp;amp;quot; as OpenTTD gender names. In current OpenTTD this would match &amp;amp;quot;w&amp;amp;quot;, in the fictitious older version of OpenTTD it will match &amp;amp;quot;feminine&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(**) Maps an OpenTTD gender or case to the NewGRF internal gender or case ID. The mapping is resolved at load time by going through all cases or genders OpenTTD&#039;s translation knows an mapping these to NewGRF internal IDs. If mapping is found the default choice list item is chosen. This happens by filtering the mapping on the gender or case name and then the NewGRF internal ID of the top element is used.&lt;br /&gt;
&lt;br /&gt;
The choice list string codes are related and must be used in a specific manner:&lt;br /&gt;
&lt;br /&gt;
Genders: 9A 13 &amp;amp;lt;offset&amp;amp;gt; (9A 10 &amp;amp;lt;index&amp;amp;gt; &amp;amp;lt;string&amp;amp;gt;)+ 9A 11 &amp;amp;lt;default&amp;amp;gt; 9A 12&lt;br /&gt;
&lt;br /&gt;
Cases: 9A 14 (9A 10 &amp;amp;lt;ndex&amp;amp;gt; &amp;amp;lt;string&amp;amp;gt;)+ 9A 11 &amp;amp;lt;default&amp;amp;gt; 9A 12&lt;br /&gt;
&lt;br /&gt;
Plurals: 9A 13 &amp;amp;lt;offset&amp;amp;gt; (9A 10 &amp;amp;lt;index&amp;amp;gt; &amp;amp;lt;string&amp;amp;gt;)+ 9A 11 &amp;amp;lt;default&amp;amp;gt; 9A 12&lt;br /&gt;
&lt;br /&gt;
The offset is the offset in the stack to the substring/value you want to get the gender/plural for. This is the real offset plus 80, i.e. an offset of -1 becomes 7F and an offset of 1 becomes 81.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~// Assuming the translation table of the previous example&lt;br /&gt;
&lt;br /&gt;
// A string with a gender choice list and a stack item that gets resolved&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;2 * 29 &amp;amp;nbsp; &amp;amp;nbsp; 04 0A FF 01 1A DC &amp;amp;quot;D&amp;amp;quot; 9A 13 80 9A 10 1 &amp;amp;quot;er&amp;amp;quot; 9A 10 3 &amp;amp;quot;as&amp;amp;quot; 9A 11 &amp;amp;quot;ie&amp;amp;quot; 9A 12 &amp;amp;quot; &amp;amp;quot; 80 00&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Imagine the &amp;amp;quot;Brauerei&amp;amp;quot; from the previous example being, as substring, on the stack. Then this string would resolve to &amp;amp;quot;Die Brauerei&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What happens in OpenTTD is that whenever the &amp;amp;quot;begin gender choice list&amp;amp;quot; string code is found it will resolve the string at the given stack location. Of that resolved string the first character is compared to the &amp;amp;quot;set gender&amp;amp;quot; string code and if that is the case the (mapped) OpenTTD gender is retrieved. When there is &amp;amp;quot;set gender&amp;amp;quot; string code the first OpenTTD gender is used. After resolving the OpenTTD gender that gender is reverse mapped to a NewGRF internal ID. If that NewGRF internal ID exists in one of the &amp;amp;quot;choice list values&amp;amp;quot; that (sub)string is taken (up till the next choice list value/default). If there is no reverse mapping the string at the &amp;amp;quot;choice list default&amp;amp;quot; string code is used up till the &amp;amp;quot;end choice list&amp;amp;quot; string code. Further processing of the string happens after the choice list, i.e. the (sub)strings in the choice list may not contain any special string codes except colour codes.&lt;br /&gt;
&lt;br /&gt;
Case choice lists work in a similar matter, except that instead of resolving a case from a (sub)string we &amp;amp;quot;are&amp;amp;quot; the substring; the string that includes this substring has set a case using the &amp;amp;quot;select case&amp;amp;quot; string code. As such no offset has to be given to the choice list, but the rest works in the same way as gender choice lists.&lt;br /&gt;
&lt;br /&gt;
(***) The plural list works like a gender list, however you have to choose one &amp;amp;quot;mapping&amp;amp;quot; from value to plural index by setting the plural form using [[Action0GeneralVariables]] property 15.&lt;br /&gt;
&lt;br /&gt;
If, for example, plural form 0 is chosen using the [[Action0GeneralVariables]] property 15, then there are 2 plural indices. If the value at the stack with the given offset equals 1 you get plural index 1, otherwise plural index 2. These plural indices are the indices that are used in the choice lists.&lt;br /&gt;
&lt;br /&gt;
||Plural form|Plural index|Description&lt;br /&gt;
&lt;br /&gt;
0|Two forms:&lt;br /&gt;
&lt;br /&gt;
|1|1&lt;br /&gt;
&lt;br /&gt;
|2|rest&lt;br /&gt;
&lt;br /&gt;
1|Only one form:&lt;br /&gt;
&lt;br /&gt;
|1|every form&lt;br /&gt;
&lt;br /&gt;
2|Two forms:&lt;br /&gt;
&lt;br /&gt;
|1|0 or 1&lt;br /&gt;
&lt;br /&gt;
|2|rest&lt;br /&gt;
&lt;br /&gt;
3|Three forms:&lt;br /&gt;
&lt;br /&gt;
|1|ending in 1, but not ending in 11&lt;br /&gt;
&lt;br /&gt;
|2|0&lt;br /&gt;
&lt;br /&gt;
|3|rest&lt;br /&gt;
&lt;br /&gt;
4|Five forms:&lt;br /&gt;
&lt;br /&gt;
|1|1&lt;br /&gt;
&lt;br /&gt;
|2|2&lt;br /&gt;
&lt;br /&gt;
|3|3-6&lt;br /&gt;
&lt;br /&gt;
|4|7-10&lt;br /&gt;
&lt;br /&gt;
|5|rest&lt;br /&gt;
&lt;br /&gt;
5|Three forms:&lt;br /&gt;
&lt;br /&gt;
|1|ending in 1, but not ending in 11&lt;br /&gt;
&lt;br /&gt;
|2|ending in 2-9, but not ending in 1~91~2-9~93~&lt;br /&gt;
&lt;br /&gt;
|3|rest&lt;br /&gt;
&lt;br /&gt;
6|Three forms:&lt;br /&gt;
&lt;br /&gt;
|1|ending in 1, but not ending in 11&lt;br /&gt;
&lt;br /&gt;
|2|ending in 2-4, but not ending in 1~91~2-4~93~&lt;br /&gt;
&lt;br /&gt;
|3|rest&lt;br /&gt;
&lt;br /&gt;
7|Three forms:&lt;br /&gt;
&lt;br /&gt;
|1|0&lt;br /&gt;
&lt;br /&gt;
|2|ending in 2-4, but not ending in 1~91~2-4~93~&lt;br /&gt;
&lt;br /&gt;
|3|rest&lt;br /&gt;
&lt;br /&gt;
8|Four forms:&lt;br /&gt;
&lt;br /&gt;
|1|ending in 01&lt;br /&gt;
&lt;br /&gt;
|2|ending in 02&lt;br /&gt;
&lt;br /&gt;
|3|ending in 03 or ending in 04&lt;br /&gt;
&lt;br /&gt;
|4|rest&lt;br /&gt;
&lt;br /&gt;
9|Two forms:&lt;br /&gt;
&lt;br /&gt;
|1|ending in 1, but not ending in 11&lt;br /&gt;
&lt;br /&gt;
|2|ret&lt;br /&gt;
&lt;br /&gt;
10|Three forms:&lt;br /&gt;
&lt;br /&gt;
|1|1&lt;br /&gt;
&lt;br /&gt;
|2|2-4&lt;br /&gt;
&lt;br /&gt;
|3|rest&lt;br /&gt;
&lt;br /&gt;
11|Two forms:&lt;br /&gt;
&lt;br /&gt;
|1|ending in 0, 1, 3, 6, 7 and 8&lt;br /&gt;
&lt;br /&gt;
|2|ending in 2, 4, 5 and 9&lt;br /&gt;
&lt;br /&gt;
12|Four forms:&lt;br /&gt;
&lt;br /&gt;
|1|1&lt;br /&gt;
&lt;br /&gt;
|2|0 or ending in 02-10&lt;br /&gt;
&lt;br /&gt;
|3|ending in 11-19&lt;br /&gt;
&lt;br /&gt;
|4|rest||&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~// Gender translation table&lt;br /&gt;
&lt;br /&gt;
// Set the plural type to type 0&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;0 * 7 &amp;amp;nbsp; &amp;amp;nbsp; 00 08 01 01 02 15 00&lt;br /&gt;
&lt;br /&gt;
// In case of the first stack item being 1 use &amp;amp;quot;Tonne&amp;amp;quot;, otherwise use &amp;amp;quot;Tonnen&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;1 * 34 &amp;amp;nbsp; &amp;amp;nbsp; 04 0B 82 01 1A DC C3 9E &amp;amp;quot;\UE07C Tonne&amp;amp;quot; 9A 15 80 9A 10 01 &amp;amp;quot;&amp;amp;quot; 9A 11 &amp;amp;quot;n&amp;amp;quot; 9A 12 &amp;amp;quot; Sand&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=UTF-8 support=&lt;br /&gt;
&lt;br /&gt;
Since 2.0.1 alpha 68, TTDPatch supports UTF-8 encoded input strings. Use [[Action12|action 12]] to define glyphs for the characters which do not exist in TTD&#039;s .grf files (possible since 2.0.1 alpha 73).&lt;br /&gt;
&lt;br /&gt;
To indicate that a given string is in UTF-8 encoding, start it with a capital thorn (U+00DE, &amp;amp;quot;&amp;amp;THORN;&amp;amp;quot;), encoded in UTF-8 as usual with the bytes C3 9E. &amp;amp;nbsp;Everything in that string is then assumed to be in UTF-8 encoding, with the following exception: if characters appear that are not valid UTF-8 sequences, they are assumed to be one of the above control codes. This way, it is still possible to write, e.g. &amp;amp;quot;&amp;amp;THORN;Capacity: &amp;amp;quot; 87 &amp;amp;quot;litres&amp;amp;quot;, without encoding the 87 in UTF-8 (which would instead refer to a character installed at codepoint U+0087).&lt;br /&gt;
&lt;br /&gt;
In addition, this allows using the non-Unicode characters 9E, 9F, A0, AA, AC, AD, AF, B4..B9, BC and BD from the above list, which when encoded with UTF-8 would refer to their respective Unicode characters instead. To use the TTD characters, simply do not encode them using UTF-8 but enter them directly as bytes. This causes them to be an invalid UTF-8 sequence and allows TTDPatch to use the correct symbol from TTD&#039;s fonts.&lt;br /&gt;
&lt;br /&gt;
Alternatively, these symbols (in fact, the TTD character set from 20 to FF) are also mapped into the Unicode Private Use Area at U+E0xx, so to encode the truck symbol, you may use character U+E0B5 as well, although this will probably be an unprintable character in most text editors.&lt;br /&gt;
&lt;br /&gt;
Finally, characters 7B..7F no longer function as the above formatting instructions, but will display regular glyphs instead (provided they are installed; by default TTD has none at these codepoints). Instead, to use these formatting instructions in UTF-8 mode, you need to use their Private Use Area codepoint at U+E0xx.&lt;br /&gt;
&lt;br /&gt;
Basically there are three possibilities:&lt;br /&gt;
# Characters U+E020..U+E0FF &amp;amp;nbsp;in the E0xx Private Use Area do what their respective character xx would do in TTD, as do the control characters below U+0020&lt;br /&gt;
# All other valid UTF-8 sequences display actual glyphs, if they are available&lt;br /&gt;
# All invalid UTF-8 sequences do what their individual bytes would do in TTD&lt;br /&gt;
&lt;br /&gt;
To summarize, here&#039;s a handy table:&lt;br /&gt;
&lt;br /&gt;
||Character|Encoding in UTF-8 mode|Meaning&lt;br /&gt;
&lt;br /&gt;
7E|7E|Unicode Character &#039;TILDE&#039; (~)&lt;br /&gt;
&lt;br /&gt;
82|82 (invalid UTF-8)|Print date (day, month, year)&lt;br /&gt;
&lt;br /&gt;
82|C2 82|Display glyph for U+0082&lt;br /&gt;
&lt;br /&gt;
AC|AC (invalid UTF-8)|Tick mark&lt;br /&gt;
&lt;br /&gt;
AC|C2 AC|Unicode Character &#039;NOT SIGN&#039; (&amp;amp;not;)&lt;br /&gt;
&lt;br /&gt;
E07E|EE 81 BE|Print unsigned word&lt;br /&gt;
&lt;br /&gt;
E082|EE 82 82|Print date (day, month, year)&lt;br /&gt;
&lt;br /&gt;
E0AC|EE 82 AC|Tick mark||&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Global_Settings&amp;diff=74</id>
		<title>Action0/Global Settings</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Global_Settings&amp;diff=74"/>
		<updated>2010-11-16T21:09:55Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Action 0 properties for general variables&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 0 - Properties for general variables=&lt;br /&gt;
&lt;br /&gt;
{maketoc}&lt;br /&gt;
&lt;br /&gt;
Global variables can be set in one of two ways. &amp;amp;nbsp;(This) action 0 using feature 8, or [[ActionD|Action D]]. &amp;amp;nbsp;Variables in arrays will usually be set using an action 0, whereas action D will most commonly set single variables.&lt;br /&gt;
&lt;br /&gt;
In addition to global variables, this action can also set some general grf-specific variables.&lt;br /&gt;
&lt;br /&gt;
-=Properties=-&lt;br /&gt;
&lt;br /&gt;
||Number|Version|Size|Description&lt;br /&gt;
&lt;br /&gt;
08|2.0.1 alpha 40|B|Cost base multipliers&lt;br /&gt;
&lt;br /&gt;
09|2.0.1 alpha 66|D|Cargo translation table&lt;br /&gt;
&lt;br /&gt;
0A|2.0.1 alpha 69|W|Currency display names&lt;br /&gt;
&lt;br /&gt;
0B|2.0.1 alpha 69|D|Currency multipliers&lt;br /&gt;
&lt;br /&gt;
0C|2.0.1 alpha 69|W|Currency options&lt;br /&gt;
&lt;br /&gt;
0D,0E|2.0.1 alpha 69|D|Currency symbols&lt;br /&gt;
&lt;br /&gt;
0F|2.0.1 alpha 69|W|Euro introduction dates&lt;br /&gt;
&lt;br /&gt;
10|2.0.1 alpha 74|12*32*B|Snow line height table&lt;br /&gt;
&lt;br /&gt;
11|OpenTTD (r12924)|2*D|GRF ID overrides for engines&lt;br /&gt;
&lt;br /&gt;
12|OpenTTD (r15417)|D|Rail type translation table&lt;br /&gt;
&lt;br /&gt;
13,14|OpenTTD (r21208)|V|Gender/case translation table&lt;br /&gt;
&lt;br /&gt;
15|OpenTTD (r21216)|B|Plural form||&lt;br /&gt;
&lt;br /&gt;
-=Comments=-&lt;br /&gt;
&lt;br /&gt;
==Cost base multipliers (08)==&lt;br /&gt;
&lt;br /&gt;
TTD has 49 [[BaseCosts|base costs]] (66 in OTTD currently) which govern how much everything costs. &amp;amp;nbsp;Each cost is calculated from a (fixed) factor times the base cost, which is adjusted by inflation every month.&lt;br /&gt;
&lt;br /&gt;
Setting this property allows changing these base costs by factors of two. &amp;amp;nbsp;The default value of the property is 08 which leaves the base cost unchanged. Adding one to the property doubles the base cost, subtracting one halves it.&lt;br /&gt;
&lt;br /&gt;
Using math: ))NewBaseCost[[]]NewBaseCost[[ = ))OldBaseCost[[]]OldBaseCost[[ * 2&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;(n-8), where n is the value of property 08.&lt;br /&gt;
&lt;br /&gt;
Modifying the base costs incurs a small rounding error every time the game is saved, because the costs have to be set back to the default in the savegame. &amp;amp;nbsp;However, this error is unnoticable until many years of inflation have passed and should therefore be of little concern.&lt;br /&gt;
&lt;br /&gt;
Note: in OpenTTD rounding happens towards 1 or -1 depending on the old base cost; i.e. if the old base cost is positive round towards 1, if negative round towards -1. This prevents the base cost to be zero.&lt;br /&gt;
&lt;br /&gt;
==Cargo translation table (09)==&lt;br /&gt;
&lt;br /&gt;
To aid with coding vehicle grf files that wish to support more than the standard cargo types, the easiest way is to install a cargo translation table using this property.&lt;br /&gt;
&lt;br /&gt;
The cargo translation table is a list of [[Action0Cargos#Cargo_label_17_|cargo labels]]. Each entry means that the corresponding cargo is meant when using this ID in an [[Action3|action 3]] or for a bit in the vehicle&#039;s refit mask.&lt;br /&gt;
&lt;br /&gt;
In other words, if for example the fourth entry (number 03) in the list is &amp;amp;quot;MAIL&amp;amp;quot;, then defining graphics for cargo 03 will define graphics for mail, and bit 3 in the refit mask will be for mail as well.&lt;br /&gt;
&lt;br /&gt;
This way, the vehicle grf file doesn&#039;t need to know or care which cargo slot and cargo bit a certain cargo type uses, it can define its own ID for each cargo that it wishes to support, and thus be independent of both what cargo types are really available in the game and what slots/bits they use.&lt;br /&gt;
&lt;br /&gt;
Because the refit mask contains only 32 bits, only the first 32 entries in the translation table can make use of the refit mask. Other cargo types have to be added via the cargo classes, so put the cargos that need exceptions to the cargo class based refitting first so that they can go in the refit mask.&lt;br /&gt;
&lt;br /&gt;
Note that this property cannot be set incrementally, you must set all types in a single action 0 starting from ID 0.&lt;br /&gt;
&lt;br /&gt;
See below for an example.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;~pp~// Cargo translation table&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp;1 * 169 &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00 08 01 29 00 09&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;COAL&amp;amp;quot; &amp;amp;quot;WATR&amp;amp;quot; &amp;amp;quot;RUBB&amp;amp;quot; &amp;amp;quot;MAIL&amp;amp;quot; &amp;amp;quot;OIL_&amp;amp;quot; // 0-4&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;LVST&amp;amp;quot; &amp;amp;quot;GOOD&amp;amp;quot; &amp;amp;quot;CERE&amp;amp;quot; &amp;amp;quot;GRAN&amp;amp;quot; &amp;amp;quot;WHET&amp;amp;quot; // 5-9&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;MAIZ&amp;amp;quot; &amp;amp;quot;WOOD&amp;amp;quot; &amp;amp;quot;WODT&amp;amp;quot; &amp;amp;quot;IORE&amp;amp;quot; &amp;amp;quot;CORE&amp;amp;quot; // 10-14&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;STEL&amp;amp;quot; &amp;amp;quot;PLAS&amp;amp;quot; &amp;amp;quot;VALU&amp;amp;quot; &amp;amp;quot;GOLD&amp;amp;quot; &amp;amp;quot;DIAM&amp;amp;quot; // 15-19&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;PAPR&amp;amp;quot; &amp;amp;quot;FOOD&amp;amp;quot; &amp;amp;quot;FRUT&amp;amp;quot; &amp;amp;quot;FISH&amp;amp;quot; &amp;amp;quot;WOOL&amp;amp;quot; // 20-24&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;POTA&amp;amp;quot; &amp;amp;quot;SAND&amp;amp;quot; &amp;amp;quot;GLAS&amp;amp;quot; &amp;amp;quot;WDPR&amp;amp;quot; &amp;amp;quot;DYES&amp;amp;quot; // 25-29&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;FERT&amp;amp;quot; &amp;amp;quot;OLSD&amp;amp;quot; &amp;amp;quot;RFPR&amp;amp;quot; &amp;amp;quot;VEHI&amp;amp;quot; &amp;amp;quot;PETR&amp;amp;quot; // 30-34&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;BRCK&amp;amp;quot; &amp;amp;quot;SULP&amp;amp;quot; &amp;amp;quot;CMNT&amp;amp;quot; &amp;amp;quot;FICR&amp;amp;quot; &amp;amp;quot;LIME&amp;amp;quot; // 35-39&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;MILK&amp;amp;quot; // 40&lt;br /&gt;
&lt;br /&gt;
// Train wagon that has special graphics for grain (8),&lt;br /&gt;
&lt;br /&gt;
// wheat (9), maize (10) and cereals (7)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp;2 * 29 &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; 03 00 01 1B 04&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;08 &amp;amp;lt;grain-cid&amp;amp;gt; 09 &amp;amp;lt;wheat-cid&amp;amp;gt; 0A &amp;amp;lt;maize-cid&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;07 &amp;amp;lt;cereals-cid&amp;amp;gt; &amp;amp;lt;default-cid&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Train wagon that has graphics for water (1), rubber (2),&lt;br /&gt;
&lt;br /&gt;
// oil (4), petrol (34) and milk (40)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp;3 * 31 &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; 03 00 01 1C 05&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;01 &amp;amp;lt;water-cid&amp;amp;gt; 02 &amp;amp;lt;rubber-cid&amp;amp;gt; 04 &amp;amp;lt;oil-cid&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;22 &amp;amp;lt;petrol-cid&amp;amp;gt; 28 &amp;amp;lt;milk-cid&amp;amp;gt; &amp;amp;lt;default-cid&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The following properties can be used to modify currencies. Each of them can have IDs 0-18 (decimal), the IDs being ordered the same as in the Currency drop-down list.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Currency display names (0A)==&lt;br /&gt;
&lt;br /&gt;
This property allows changing currency names that are displayed in the Currency drop-down in the Game Options window. This property is a textID, and if you need to supply your own text, it must be a DCxx one.&lt;br /&gt;
&lt;br /&gt;
==Currency multipliers (0B)==&lt;br /&gt;
&lt;br /&gt;
The equivalent of 1 British pound in this currency, multiplied by 1000. For example, 1 GBP=2 USD, so this should be 2000 for US dollars. The multiplication by 1000 allows you to have decimals in the multiplier without requiring floating-point calculations. This value is used for display purposes only, TTD always uses British pounds for internal calculations.&lt;br /&gt;
&lt;br /&gt;
==Currency options (0C)==&lt;br /&gt;
&lt;br /&gt;
The low byte of this word specifies the thousands separator to be used for this currency ( usually dot &amp;amp;quot;.&amp;amp;quot; or comma &amp;amp;quot;,&amp;amp;quot;). The high byte should be zero if the currency symbol should be in front of the number ($123,456) and should be 1 if the currency symbol should be shown after the number (123,456$). The symbol placement can be overridden by the TTDPatch settings.&lt;br /&gt;
&lt;br /&gt;
==Currency symbols (0D,0E)==&lt;br /&gt;
&lt;br /&gt;
These doublewords are interpreted as a string of up to 4 characters. If you need fewer characters, the remaining bytes should be zero. Property 0D is printed before the number, property 0E is printed after the number. These two usually differ only if the symbol is separated by a space from the number (for example, &amp;amp;quot;$ &amp;amp;quot; vs. &amp;amp;quot; $&amp;amp;quot;). You should specify both properties since the player can override your preferred symbol placement.&lt;br /&gt;
&lt;br /&gt;
==Euro introduction dates (0F)==&lt;br /&gt;
&lt;br /&gt;
This value allows you to have Euro introduced instead the currency at a given time. If this value is zero, the currency is never substituted with the Euro (USD, for example). If it&#039;s nonzero, it gives the year when the currency is replaced by Euro (for example, 2002 for DM).&lt;br /&gt;
&lt;br /&gt;
==Snow line height table (10)==&lt;br /&gt;
&lt;br /&gt;
This property allows you to specify the snow line height for every day of the year. The only ID you can set is 0, and the value must be 12*32=384 bytes long. To simplify things for the patch, every month has 32 entries, and the impossible combinations (like 32th January or 31th April) will never be read. The entries should be a multiply of 8 or else some visual glitches may appear. Values below 10h and above EFh may result in overflow and should not be used. Since the highest possible land is 78h high, giving 88h or above will effectively disable the snow line.&lt;br /&gt;
&lt;br /&gt;
If the temperate snow line is enabled, this table applies on temperate as well.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; Some code in TTD assumes that the snow line will remain constant: Some industries are built only above/below snowline and assume that the snow line won&#039;t move when they&#039;re already built. Similarly, snowy houses on arctic will still appear snowy even when the snow disappears around them. If you want to use this feature, make sure to counter these effects by overriding arctic houses and industries with snow-aware versions.&lt;br /&gt;
&lt;br /&gt;
==GRF ID overrides for engines (11)==&lt;br /&gt;
&lt;br /&gt;
(OpenTTD only) Allows you to provide a list of &#039;source&#039; and &#039;target&#039; GRF IDs to let engines in the source GRF override those in the target GRF, when dynamic engines is enabled. Each entry is 8 bytes, containing two GRF IDs. Multiple entries can be used, and different GRFs can be set to override the same &#039;target&#039; GRF, but only the last instance of a &#039;source&#039; GRF is active. GRF IDs that are not present will have no effect.&lt;br /&gt;
&lt;br /&gt;
The scope of this feature is quite limited and it should be used only for sets that modify data of another set, for example the DBSetXL ECS addon for DBSetXL, or the censored version of LV4.&lt;br /&gt;
&lt;br /&gt;
==Rail type translation table (12)==&lt;br /&gt;
&lt;br /&gt;
(OpenTTD only) Provides ability to specify rail types via a translation table, similar to using a cargo translation table. Each rail type label is a DWord. The default labels are RAIL, ELRL, MONO and MGLV. If a table is installed, then changing engine traction type will not affect the rail type.&lt;br /&gt;
&lt;br /&gt;
==Gender/case translation table (13,14)==&lt;br /&gt;
&lt;br /&gt;
(OpenTTD only) Provides ability to specify genders or cases via a translation table. These map NewGRF internal IDs for the genders or cases to the genders or cases as defined in OpenTTD&#039;s language files so NewGRF strings and OpenTTD strings can interact on eachother&#039;s gender or cases. Property 13 is for mapping genders whereas property 14 is for mapping cases.&lt;br /&gt;
&lt;br /&gt;
The ID used for these translation tables is the Action 4 (GRF version 7 or higher) language-id, i.e. this mapping only works with GRF version 7 or higher. Language-id 7F (any) is not allowed. You can can define an ID multiple times in which case the new mappings are simply appended to the already known mappings.&lt;br /&gt;
&lt;br /&gt;
The format is simply a 00 terminated list of mappings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;-+(&amp;amp;lt;id&amp;amp;gt; &amp;amp;lt;name&amp;amp;gt;)+ 00+-&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||Size|Name|Meaning&lt;br /&gt;
&lt;br /&gt;
B|id|NewGRF internal ID for the gender or case name, may not be 00&lt;br /&gt;
&lt;br /&gt;
V|name|A 00 terminated string with the gender or case name as in OpenTTD&#039;s translation||&lt;br /&gt;
&lt;br /&gt;
An NewGRF internal ID may be mapped multiple times for the same language as may an OpenTTD gender or case name be (reverse) mapped multiple times. This can be used for coping with OpenTTD translators adding or removing genders or cases over time. The NewGRF internal ID may not be 00 as this ID will be used in the Action 4 strings which may not contain 00 except for terminating the string.&lt;br /&gt;
&lt;br /&gt;
These mappings are used for [[StringCodes]] 9A 0E, 9A 0F, 9A 13 and 9A 14. How the mapping is used precisely can be found there.&lt;br /&gt;
&lt;br /&gt;
==Plural form (15)==&lt;br /&gt;
&lt;br /&gt;
Defines the plural form for a language. The ID used is the Action 4 (GRF version 7 or higher) language-id, i.e. this only works with GRF version 7 or higher. Language-id 7F (any) is not allowed. More information about the different valid plural forms can be found on the [[StringCodes]] page. This property is used for [[StringCodes|StringCode]] 9A 15.&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=StringCodes&amp;diff=883</id>
		<title>StringCodes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=StringCodes&amp;diff=883"/>
		<updated>2010-11-16T17:35:30Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Description of characters in TTD&#039;s character set&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=String Codes=&lt;br /&gt;
&lt;br /&gt;
Texts in TTD are mostly in the Latin-1 (ISO-8859-1) character set (except when using UTF-8 encoding; see below), however a few characters are different. &amp;amp;nbsp;Also, some characters have special meaning. These are explained in the following table.&lt;br /&gt;
&lt;br /&gt;
||Range, hex|Meaning&lt;br /&gt;
&lt;br /&gt;
00..1F|Control characters, unused except for the following:&lt;br /&gt;
&lt;br /&gt;
|01 X offset in next byte of string (variable space)&lt;br /&gt;
&lt;br /&gt;
|0D New line&lt;br /&gt;
&lt;br /&gt;
|0E Set small font size&lt;br /&gt;
&lt;br /&gt;
|0F Set large font size&lt;br /&gt;
&lt;br /&gt;
|1F X and Y offsets in next two bytes of string&lt;br /&gt;
&lt;br /&gt;
20..7A| Latin-1 characters, from space &amp;amp;quot; &amp;amp;quot; up to lower case &amp;amp;quot;z&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
7B..87| Formatting instructions, all take their argument from the stack if not otherwise specified&lt;br /&gt;
&lt;br /&gt;
|7B Print dword&lt;br /&gt;
&lt;br /&gt;
|7C Print signed word&lt;br /&gt;
&lt;br /&gt;
|7D Print signed byte&lt;br /&gt;
&lt;br /&gt;
|7E Print unsigned word&lt;br /&gt;
&lt;br /&gt;
|7F Print dword in currency units&lt;br /&gt;
&lt;br /&gt;
|80 Print substring (text ID from stack)&lt;br /&gt;
&lt;br /&gt;
|81 Print substring (text ID in next 2 bytes of string)&lt;br /&gt;
&lt;br /&gt;
|82 Print date (day, month, year)&lt;br /&gt;
&lt;br /&gt;
|83 Print month and year&lt;br /&gt;
&lt;br /&gt;
|84 Print signed word in speed units&lt;br /&gt;
&lt;br /&gt;
|85 Discard next word from stack&lt;br /&gt;
&lt;br /&gt;
|86 Rotate down top 4 words on stack&lt;br /&gt;
&lt;br /&gt;
|87 Print signed word in litres&lt;br /&gt;
&lt;br /&gt;
88..98|Colour codes&lt;br /&gt;
&lt;br /&gt;
|88 Blue&lt;br /&gt;
&lt;br /&gt;
|89 Light Gray&lt;br /&gt;
&lt;br /&gt;
|8A Light Orange (&amp;amp;quot;Gold&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
|8B Red&lt;br /&gt;
&lt;br /&gt;
|8C Purple&lt;br /&gt;
&lt;br /&gt;
|8D ))Gray-Green[[]]Gray-Green[[&lt;br /&gt;
&lt;br /&gt;
|8E Orange&lt;br /&gt;
&lt;br /&gt;
|8F Green&lt;br /&gt;
&lt;br /&gt;
|90 Yellow&lt;br /&gt;
&lt;br /&gt;
|91 Light Green&lt;br /&gt;
&lt;br /&gt;
|92 ))Red-Brown[[]]Red-Brown[[&lt;br /&gt;
&lt;br /&gt;
|93 Brown&lt;br /&gt;
&lt;br /&gt;
|94 White&lt;br /&gt;
&lt;br /&gt;
|95 Light Blue&lt;br /&gt;
&lt;br /&gt;
|96 Dark Gray&lt;br /&gt;
&lt;br /&gt;
|97 Mauve (grayish purple)&lt;br /&gt;
&lt;br /&gt;
|98 Black&lt;br /&gt;
&lt;br /&gt;
99|Switch to company colour that follows in next byte (enabled by enhancegui)&lt;br /&gt;
&lt;br /&gt;
9A|Extended format code in next byte:&lt;br /&gt;
&lt;br /&gt;
|00 -or- 01 Display 64-bit value from stack in currency units&lt;br /&gt;
&lt;br /&gt;
|02 Ignore next colour byte. Multiple instances will skip multiple colour bytes.&lt;br /&gt;
&lt;br /&gt;
|03 WORD Push WORD onto the textref stack&lt;br /&gt;
&lt;br /&gt;
|04 BYTE Un-print the previous BYTE characters.&lt;br /&gt;
&lt;br /&gt;
|05 For internal use only. Not valid in GRF files.&lt;br /&gt;
&lt;br /&gt;
|06 Print byte in hex (since TTDPatch r2007)&lt;br /&gt;
&lt;br /&gt;
|07 Print word in hex (since TTDPatch r2007)&lt;br /&gt;
&lt;br /&gt;
|08 Print dword in hex (since TTDPatch r2007)&lt;br /&gt;
&lt;br /&gt;
|09 For internal use only. Usage in NewGRFs will most likely crash TTDPatch. (since TTDPatch r2128)&lt;br /&gt;
&lt;br /&gt;
|0A For internal use only. Usage in NewGRFs will most likely crash TTDPatch. (since TTDPatch r2128)&lt;br /&gt;
&lt;br /&gt;
|0B Print 64-bit value in hex (since TTDPatch r2178)&lt;br /&gt;
&lt;br /&gt;
|0C Print name of station with id in next textrefstack word (since TTDPatch r2178)&lt;br /&gt;
&lt;br /&gt;
|0D Print signed word in tonnes (since OpenTTD r21086)&lt;br /&gt;
&lt;br /&gt;
|0E Set gender of string, NewGRF internal ID in next byte. Must be first in a string (since OpenTTD r21209) (*)&lt;br /&gt;
&lt;br /&gt;
|0F Select case for next substring, NewGRF internal ID in next byte (since OpenTTD r21209) (*)&lt;br /&gt;
&lt;br /&gt;
|10 Begin choice list value, NewGRF internal ID in next byte (since OpenTTD r21211) (**)&lt;br /&gt;
&lt;br /&gt;
|11 Begin choice list default (since OpenTTD r21211) (**)&lt;br /&gt;
&lt;br /&gt;
|12 End choice list (since OpenTTD r21211) (**)&lt;br /&gt;
&lt;br /&gt;
|13 Begin gender choice list, stack offset of substring to get gender from in next byte (since OpenTTD r21211) (**)&lt;br /&gt;
&lt;br /&gt;
|14 Begin case choice list (since OpenTTD r21211) (**)&lt;br /&gt;
&lt;br /&gt;
9B..9D|Reserved&lt;br /&gt;
&lt;br /&gt;
9E..FF|Latin-1 characters, except for the following:&lt;br /&gt;
&lt;br /&gt;
|9E Euro character &amp;amp;quot;&amp;amp;euro;&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
|9F Capital Y umlaut &amp;amp;quot;&amp;amp;Yuml;&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
|A0 Scroll button up&lt;br /&gt;
&lt;br /&gt;
|AA Scroll button down&lt;br /&gt;
&lt;br /&gt;
|AC Tick mark&lt;br /&gt;
&lt;br /&gt;
|AD X mark&lt;br /&gt;
&lt;br /&gt;
|AF Scroll button right&lt;br /&gt;
&lt;br /&gt;
|B4 Train symbol&lt;br /&gt;
&lt;br /&gt;
|B5 Truck symbol&lt;br /&gt;
&lt;br /&gt;
|B6 Bus symbol&lt;br /&gt;
&lt;br /&gt;
|B7 Plane symbol&lt;br /&gt;
&lt;br /&gt;
|B8 Ship symbol&lt;br /&gt;
&lt;br /&gt;
|B9 Superscript -1&lt;br /&gt;
&lt;br /&gt;
|BC Small scroll button up&lt;br /&gt;
&lt;br /&gt;
|BD Small scroll button down||&lt;br /&gt;
&lt;br /&gt;
The formatting instructions must not be used except in strings that expect them, and then they may not be out of order (with the possible exception of code 86 shuffling the internal stack). When used improperly, they will most likely crash TTD. Code 81 is always safe to use (provided that the referenced text ID uses no unsafe formatting instructions either), and will insert the given text ID (e.g. &amp;amp;quot;\81\3D\A0&amp;amp;quot; will insert text ID A03D, &amp;amp;quot;\98Refit Aircraft&amp;amp;quot;). Note however that if you want to include e.g. ID D000/D400, the 00 byte will be considered the end of string, and this will therefore break if additional texts are supposed to follow in the action 4. DCxx IDs must not be included; neither codes 80 nor 81 correctly access DCxx IDs.&lt;br /&gt;
&lt;br /&gt;
Each formatting instructions removes its argument from the stack, so that the next one will receive the following bytes as arguments. Code 86 takes the top four words from the stack, let&#039;s call them W1 through W4, and reorders them as W4 W1 W2 W3. This is used for languages in which industries or stations should be named not &amp;amp;quot;Flinfingbury Power Plant&amp;amp;quot; but &amp;amp;quot;Power Plant Flinfingbury&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(*) Maps a NewGRF internal gender or case ID to an OpenTTD gender or case. The internal ID is resolved to the appropriate OpenTTD gender or case at load time by means of the mapping. The first internal ID in the mapping that matches the ID from the string and has an existing OpenTTD gender or case is taken, i.e. the list of mappings is filtered by internal ID and existance of the OpenTTD gender/case and then the top element is used. When the gender or case ID is not known, or there is no existing OpenTTD gender or case with the mapped names the whole mapping is ignored and the default gender or case is taken.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~// Gender translation table&lt;br /&gt;
&lt;br /&gt;
// Current OpenTTD German translation uses m, w, n and p but&lt;br /&gt;
&lt;br /&gt;
// support a (fictitious) previous version that used masculine,&lt;br /&gt;
&lt;br /&gt;
// feminine, neuter and plural as gender names.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;0 * 56 &amp;amp;nbsp; &amp;amp;nbsp; 00 08 01 01 02&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; 13&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;01 &amp;amp;quot;m&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;01 &amp;amp;quot;masculine&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;02 &amp;amp;quot;w&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;02 &amp;amp;quot;feminine&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;03 &amp;amp;quot;n&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;03 &amp;amp;quot;neuter&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;04 &amp;amp;quot;p&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;04 &amp;amp;quot;plural&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
// Brauerei is a female word in German; this sets it as female.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;1 * 40 &amp;amp;nbsp; &amp;amp;nbsp; 04 0A 82 01 73 DC C3 9E 9A 0E 02 &amp;amp;quot;Brauerei&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case OpenTTD would look for NewGRF internal ID 2 in the gender table. This would yield &amp;amp;quot;w&amp;amp;quot; and &amp;amp;quot;feminine&amp;amp;quot; as OpenTTD gender names. In current OpenTTD this would match &amp;amp;quot;w&amp;amp;quot;, in the fictitious older version of OpenTTD it will match &amp;amp;quot;feminine&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(**) Maps an OpenTTD gender or case to the NewGRF internal gender or case ID. The mapping is resolved at load time by going through all cases or genders OpenTTD&#039;s translation knows an mapping these to NewGRF internal IDs. If mapping is found the default choice list item is chosen. This happens by filtering the mapping on the gender or case name and then the NewGRF internal ID of the top element is used.&lt;br /&gt;
&lt;br /&gt;
The choice list string codes are related and must be used in a specific manner:&lt;br /&gt;
&lt;br /&gt;
Genders: 9A 13 &amp;amp;lt;offset&amp;amp;gt; (9A 10 &amp;amp;lt;index&amp;amp;gt; &amp;amp;lt;string&amp;amp;gt;)+ 9A 11 &amp;amp;lt;default&amp;amp;gt; 9A 12&lt;br /&gt;
&lt;br /&gt;
Cases: 9A 14 (9A 10 &amp;amp;lt;ndex&amp;amp;gt; &amp;amp;lt;string&amp;amp;gt;)+ 9A 11 &amp;amp;lt;default&amp;amp;gt; 9A 12&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~// Assuming the translation table of the previous example&lt;br /&gt;
&lt;br /&gt;
// A string with a gender choice list and a stack item that gets resolved&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;2 * 29 &amp;amp;nbsp; &amp;amp;nbsp; 04 0A FF 01 1A DC &amp;amp;quot;D&amp;amp;quot; 9A 13 80 9A 10 1 &amp;amp;quot;er&amp;amp;quot; 9A 10 3 &amp;amp;quot;as&amp;amp;quot; 9A 11 &amp;amp;quot;ie&amp;amp;quot; 9A 12 &amp;amp;quot; &amp;amp;quot; 80 00&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Imagine the &amp;amp;quot;Brauerei&amp;amp;quot; from the previous example being, as substring, on the stack. Then this string would resolve to &amp;amp;quot;Die Brauerei&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What happens in OpenTTD is that whenever the &amp;amp;quot;begin gender choice list&amp;amp;quot; string code is found it will resolve the string at the given stack location. Of that resolved string the first character is compared to the &amp;amp;quot;set gender&amp;amp;quot; string code and if that is the case the (mapped) OpenTTD gender is retrieved. When there is &amp;amp;quot;set gender&amp;amp;quot; string code the first OpenTTD gender is used. After resolving the OpenTTD gender that gender is reverse mapped to a NewGRF internal ID. If that NewGRF internal ID exists in one of the &amp;amp;quot;choice list values&amp;amp;quot; that (sub)string is taken (up till the next choice list value/default). If there is no reverse mapping the string at the &amp;amp;quot;choice list default&amp;amp;quot; string code is used up till the &amp;amp;quot;end choice list&amp;amp;quot; string code. Further processing of the string happens after the choice list, i.e. the (sub)strings in the choice list may not contain any special string codes except colour codes.&lt;br /&gt;
&lt;br /&gt;
Case choice lists work in a similar matter, except that instead of resolving a case from a (sub)string we &amp;amp;quot;are&amp;amp;quot; the substring; the string that includes this substring has set a case using the &amp;amp;quot;select case&amp;amp;quot; string code. As such no offset has to be given to the choice list, but the rest works in the same way as gender choice lists.&lt;br /&gt;
&lt;br /&gt;
=UTF-8 support=&lt;br /&gt;
&lt;br /&gt;
Since 2.0.1 alpha 68, TTDPatch supports UTF-8 encoded input strings. Use [[Action12|action 12]] to define glyphs for the characters which do not exist in TTD&#039;s .grf files (possible since 2.0.1 alpha 73).&lt;br /&gt;
&lt;br /&gt;
To indicate that a given string is in UTF-8 encoding, start it with a capital thorn (U+00DE, &amp;amp;quot;&amp;amp;THORN;&amp;amp;quot;), encoded in UTF-8 as usual with the bytes C3 9E. &amp;amp;nbsp;Everything in that string is then assumed to be in UTF-8 encoding, with the following exception: if characters appear that are not valid UTF-8 sequences, they are assumed to be one of the above control codes. This way, it is still possible to write, e.g. &amp;amp;quot;&amp;amp;THORN;Capacity: &amp;amp;quot; 87 &amp;amp;quot;litres&amp;amp;quot;, without encoding the 87 in UTF-8 (which would instead refer to a character installed at codepoint U+0087).&lt;br /&gt;
&lt;br /&gt;
In addition, this allows using the non-Unicode characters 9E, 9F, A0, AA, AC, AD, AF, B4..B9, BC and BD from the above list, which when encoded with UTF-8 would refer to their respective Unicode characters instead. To use the TTD characters, simply do not encode them using UTF-8 but enter them directly as bytes. This causes them to be an invalid UTF-8 sequence and allows TTDPatch to use the correct symbol from TTD&#039;s fonts.&lt;br /&gt;
&lt;br /&gt;
Alternatively, these symbols (in fact, the TTD character set from 20 to FF) are also mapped into the Unicode Private Use Area at U+E0xx, so to encode the truck symbol, you may use character U+E0B5 as well, although this will probably be an unprintable character in most text editors.&lt;br /&gt;
&lt;br /&gt;
Finally, characters 7B..7F no longer function as the above formatting instructions, but will display regular glyphs instead (provided they are installed; by default TTD has none at these codepoints). Instead, to use these formatting instructions in UTF-8 mode, you need to use their Private Use Area codepoint at U+E0xx.&lt;br /&gt;
&lt;br /&gt;
Basically there are three possibilities:&lt;br /&gt;
# Characters U+E020..U+E0FF &amp;amp;nbsp;in the E0xx Private Use Area do what their respective character xx would do in TTD, as do the control characters below U+0020&lt;br /&gt;
# All other valid UTF-8 sequences display actual glyphs, if they are available&lt;br /&gt;
# All invalid UTF-8 sequences do what their individual bytes would do in TTD&lt;br /&gt;
&lt;br /&gt;
To summarize, here&#039;s a handy table:&lt;br /&gt;
&lt;br /&gt;
||Character|Encoding in UTF-8 mode|Meaning&lt;br /&gt;
&lt;br /&gt;
7E|7E|Unicode Character &#039;TILDE&#039; (~)&lt;br /&gt;
&lt;br /&gt;
82|82 (invalid UTF-8)|Print date (day, month, year)&lt;br /&gt;
&lt;br /&gt;
82|C2 82|Display glyph for U+0082&lt;br /&gt;
&lt;br /&gt;
AC|AC (invalid UTF-8)|Tick mark&lt;br /&gt;
&lt;br /&gt;
AC|C2 AC|Unicode Character &#039;NOT SIGN&#039; (&amp;amp;not;)&lt;br /&gt;
&lt;br /&gt;
E07E|EE 81 BE|Print unsigned word&lt;br /&gt;
&lt;br /&gt;
E082|EE 82 82|Print date (day, month, year)&lt;br /&gt;
&lt;br /&gt;
E0AC|EE 82 AC|Tick mark||&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=StringCodes&amp;diff=884</id>
		<title>StringCodes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=StringCodes&amp;diff=884"/>
		<updated>2010-11-16T14:00:12Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Description of characters in TTD&#039;s character set&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=String Codes=&lt;br /&gt;
&lt;br /&gt;
Texts in TTD are mostly in the Latin-1 (ISO-8859-1) character set (except when using UTF-8 encoding; see below), however a few characters are different. &amp;amp;nbsp;Also, some characters have special meaning. These are explained in the following table.&lt;br /&gt;
&lt;br /&gt;
||Range, hex|Meaning&lt;br /&gt;
&lt;br /&gt;
00..1F|Control characters, unused except for the following:&lt;br /&gt;
&lt;br /&gt;
|01 X offset in next byte of string (variable space)&lt;br /&gt;
&lt;br /&gt;
|0D New line&lt;br /&gt;
&lt;br /&gt;
|0E Set small font size&lt;br /&gt;
&lt;br /&gt;
|0F Set large font size&lt;br /&gt;
&lt;br /&gt;
|1F X and Y offsets in next two bytes of string&lt;br /&gt;
&lt;br /&gt;
20..7A| Latin-1 characters, from space &amp;amp;quot; &amp;amp;quot; up to lower case &amp;amp;quot;z&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
7B..87| Formatting instructions, all take their argument from the stack if not otherwise specified&lt;br /&gt;
&lt;br /&gt;
|7B Print dword&lt;br /&gt;
&lt;br /&gt;
|7C Print signed word&lt;br /&gt;
&lt;br /&gt;
|7D Print signed byte&lt;br /&gt;
&lt;br /&gt;
|7E Print unsigned word&lt;br /&gt;
&lt;br /&gt;
|7F Print dword in currency units&lt;br /&gt;
&lt;br /&gt;
|80 Print substring (text ID from stack)&lt;br /&gt;
&lt;br /&gt;
|81 Print substring (text ID in next 2 bytes of string)&lt;br /&gt;
&lt;br /&gt;
|82 Print date (day, month, year)&lt;br /&gt;
&lt;br /&gt;
|83 Print month and year&lt;br /&gt;
&lt;br /&gt;
|84 Print signed word in speed units&lt;br /&gt;
&lt;br /&gt;
|85 Discard next word from stack&lt;br /&gt;
&lt;br /&gt;
|86 Rotate down top 4 words on stack&lt;br /&gt;
&lt;br /&gt;
|87 Print signed word in litres&lt;br /&gt;
&lt;br /&gt;
88..98|Colour codes&lt;br /&gt;
&lt;br /&gt;
|88 Blue&lt;br /&gt;
&lt;br /&gt;
|89 Light Gray&lt;br /&gt;
&lt;br /&gt;
|8A Light Orange (&amp;amp;quot;Gold&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
|8B Red&lt;br /&gt;
&lt;br /&gt;
|8C Purple&lt;br /&gt;
&lt;br /&gt;
|8D ))Gray-Green[[]]Gray-Green[[&lt;br /&gt;
&lt;br /&gt;
|8E Orange&lt;br /&gt;
&lt;br /&gt;
|8F Green&lt;br /&gt;
&lt;br /&gt;
|90 Yellow&lt;br /&gt;
&lt;br /&gt;
|91 Light Green&lt;br /&gt;
&lt;br /&gt;
|92 ))Red-Brown[[]]Red-Brown[[&lt;br /&gt;
&lt;br /&gt;
|93 Brown&lt;br /&gt;
&lt;br /&gt;
|94 White&lt;br /&gt;
&lt;br /&gt;
|95 Light Blue&lt;br /&gt;
&lt;br /&gt;
|96 Dark Gray&lt;br /&gt;
&lt;br /&gt;
|97 Mauve (grayish purple)&lt;br /&gt;
&lt;br /&gt;
|98 Black&lt;br /&gt;
&lt;br /&gt;
99|Switch to company colour that follows in next byte (enabled by enhancegui)&lt;br /&gt;
&lt;br /&gt;
9A|Extended format code in next byte:&lt;br /&gt;
&lt;br /&gt;
|00 -or- 01 Display 64-bit value from stack in currency units&lt;br /&gt;
&lt;br /&gt;
|02 Ignore next colour byte. Multiple instances will skip multiple colour bytes.&lt;br /&gt;
&lt;br /&gt;
|03 WORD Push WORD onto the textref stack&lt;br /&gt;
&lt;br /&gt;
|04 BYTE Un-print the previous BYTE characters.&lt;br /&gt;
&lt;br /&gt;
|05 For internal use only. Not valid in GRF files.&lt;br /&gt;
&lt;br /&gt;
|06 Print byte in hex (since TTDPatch r2007)&lt;br /&gt;
&lt;br /&gt;
|07 Print word in hex (since TTDPatch r2007)&lt;br /&gt;
&lt;br /&gt;
|08 Print dword in hex (since TTDPatch r2007)&lt;br /&gt;
&lt;br /&gt;
|09 For internal use only. Usage in NewGRFs will most likely crash TTDPatch. (since TTDPatch r2128)&lt;br /&gt;
&lt;br /&gt;
|0A For internal use only. Usage in NewGRFs will most likely crash TTDPatch. (since TTDPatch r2128)&lt;br /&gt;
&lt;br /&gt;
|0B Print 64-bit value in hex (since TTDPatch r2178)&lt;br /&gt;
&lt;br /&gt;
|0C Print name of station with id in next textrefstack word (since TTDPatch r2178)&lt;br /&gt;
&lt;br /&gt;
|0D Print signed word in tonnes (since OpenTTD r21086)&lt;br /&gt;
&lt;br /&gt;
|0E Set gender of string, NewGRF internal ID in next byte. Must be first in a string (since OpenTTD r21209) (*)&lt;br /&gt;
&lt;br /&gt;
|0F Select case for next substring, NewGRF internal ID in next byte (since OpenTTD r21209) (*)&lt;br /&gt;
&lt;br /&gt;
9B..9D|Reserved&lt;br /&gt;
&lt;br /&gt;
9E..FF|Latin-1 characters, except for the following:&lt;br /&gt;
&lt;br /&gt;
|9E Euro character &amp;amp;quot;&amp;amp;euro;&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
|9F Capital Y umlaut &amp;amp;quot;&amp;amp;Yuml;&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
|A0 Scroll button up&lt;br /&gt;
&lt;br /&gt;
|AA Scroll button down&lt;br /&gt;
&lt;br /&gt;
|AC Tick mark&lt;br /&gt;
&lt;br /&gt;
|AD X mark&lt;br /&gt;
&lt;br /&gt;
|AF Scroll button right&lt;br /&gt;
&lt;br /&gt;
|B4 Train symbol&lt;br /&gt;
&lt;br /&gt;
|B5 Truck symbol&lt;br /&gt;
&lt;br /&gt;
|B6 Bus symbol&lt;br /&gt;
&lt;br /&gt;
|B7 Plane symbol&lt;br /&gt;
&lt;br /&gt;
|B8 Ship symbol&lt;br /&gt;
&lt;br /&gt;
|B9 Superscript -1&lt;br /&gt;
&lt;br /&gt;
|BC Small scroll button up&lt;br /&gt;
&lt;br /&gt;
|BD Small scroll button down||&lt;br /&gt;
&lt;br /&gt;
The formatting instructions must not be used except in strings that expect them, and then they may not be out of order (with the possible exception of code 86 shuffling the internal stack). When used improperly, they will most likely crash TTD. Code 81 is always safe to use (provided that the referenced text ID uses no unsafe formatting instructions either), and will insert the given text ID (e.g. &amp;amp;quot;\81\3D\A0&amp;amp;quot; will insert text ID A03D, &amp;amp;quot;\98Refit Aircraft&amp;amp;quot;). Note however that if you want to include e.g. ID D000/D400, the 00 byte will be considered the end of string, and this will therefore break if additional texts are supposed to follow in the action 4. DCxx IDs must not be included; neither codes 80 nor 81 correctly access DCxx IDs.&lt;br /&gt;
&lt;br /&gt;
Each formatting instructions removes its argument from the stack, so that the next one will receive the following bytes as arguments. Code 86 takes the top four words from the stack, let&#039;s call them W1 through W4, and reorders them as W4 W1 W2 W3. This is used for languages in which industries or stations should be named not &amp;amp;quot;Flinfingbury Power Plant&amp;amp;quot; but &amp;amp;quot;Power Plant Flinfingbury&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(*) Maps a NewGRF internal gender or case ID to an OpenTTD gender or case. The internal ID is resolved to the appropriate OpenTTD gender or case at load time by means of the mapping. The first internal ID in the mapping that matches the ID from the string and has an existing OpenTTD gender or case is taken, i.e. the list of mappings is filtered by internal ID and existance of the OpenTTD gender/case and then the top element is used. When the gender or case ID is not known, or there is no existing OpenTTD gender or case with the mapped names the whole mapping is ignored and the default gender or case is taken.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~// Gender translation table&lt;br /&gt;
&lt;br /&gt;
// Current OpenTTD German translation uses m, w, n and p but&lt;br /&gt;
&lt;br /&gt;
// support a (fictitious) previous version that used masculine,&lt;br /&gt;
&lt;br /&gt;
// feminine, neuter and plural as gender names.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;0 * 56 &amp;amp;nbsp; &amp;amp;nbsp; 00 08 01 01 02&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; 13&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;01 &amp;amp;quot;m&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;01 &amp;amp;quot;masculine&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;02 &amp;amp;quot;w&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;02 &amp;amp;quot;feminine&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;03 &amp;amp;quot;n&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;03 &amp;amp;quot;neuter&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;04 &amp;amp;quot;p&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;04 &amp;amp;quot;plural&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
// Brauerei is a female word in German; this sets it as female.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;1 * 40 &amp;amp;nbsp; &amp;amp;nbsp; 04 0A 82 01 73 DC C3 9E 9A 0E 02 &amp;amp;quot;Brauerei&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case OpenTTD would look for NewGRF internal ID 2 in the gender table. This would yield &amp;amp;quot;w&amp;amp;quot; and &amp;amp;quot;feminine&amp;amp;quot; as OpenTTD gender names. In current OpenTTD this would match &amp;amp;quot;w&amp;amp;quot;, in the fictitious older version of OpenTTD it will match &amp;amp;quot;feminine&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=UTF-8 support=&lt;br /&gt;
&lt;br /&gt;
Since 2.0.1 alpha 68, TTDPatch supports UTF-8 encoded input strings. Use [[Action12|action 12]] to define glyphs for the characters which do not exist in TTD&#039;s .grf files (possible since 2.0.1 alpha 73).&lt;br /&gt;
&lt;br /&gt;
To indicate that a given string is in UTF-8 encoding, start it with a capital thorn (U+00DE, &amp;amp;quot;&amp;amp;THORN;&amp;amp;quot;), encoded in UTF-8 as usual with the bytes C3 9E. &amp;amp;nbsp;Everything in that string is then assumed to be in UTF-8 encoding, with the following exception: if characters appear that are not valid UTF-8 sequences, they are assumed to be one of the above control codes. This way, it is still possible to write, e.g. &amp;amp;quot;&amp;amp;THORN;Capacity: &amp;amp;quot; 87 &amp;amp;quot;litres&amp;amp;quot;, without encoding the 87 in UTF-8 (which would instead refer to a character installed at codepoint U+0087).&lt;br /&gt;
&lt;br /&gt;
In addition, this allows using the non-Unicode characters 9E, 9F, A0, AA, AC, AD, AF, B4..B9, BC and BD from the above list, which when encoded with UTF-8 would refer to their respective Unicode characters instead. To use the TTD characters, simply do not encode them using UTF-8 but enter them directly as bytes. This causes them to be an invalid UTF-8 sequence and allows TTDPatch to use the correct symbol from TTD&#039;s fonts.&lt;br /&gt;
&lt;br /&gt;
Alternatively, these symbols (in fact, the TTD character set from 20 to FF) are also mapped into the Unicode Private Use Area at U+E0xx, so to encode the truck symbol, you may use character U+E0B5 as well, although this will probably be an unprintable character in most text editors.&lt;br /&gt;
&lt;br /&gt;
Finally, characters 7B..7F no longer function as the above formatting instructions, but will display regular glyphs instead (provided they are installed; by default TTD has none at these codepoints). Instead, to use these formatting instructions in UTF-8 mode, you need to use their Private Use Area codepoint at U+E0xx.&lt;br /&gt;
&lt;br /&gt;
Basically there are three possibilities:&lt;br /&gt;
# Characters U+E020..U+E0FF &amp;amp;nbsp;in the E0xx Private Use Area do what their respective character xx would do in TTD, as do the control characters below U+0020&lt;br /&gt;
# All other valid UTF-8 sequences display actual glyphs, if they are available&lt;br /&gt;
# All invalid UTF-8 sequences do what their individual bytes would do in TTD&lt;br /&gt;
&lt;br /&gt;
To summarize, here&#039;s a handy table:&lt;br /&gt;
&lt;br /&gt;
||Character|Encoding in UTF-8 mode|Meaning&lt;br /&gt;
&lt;br /&gt;
7E|7E|Unicode Character &#039;TILDE&#039; (~)&lt;br /&gt;
&lt;br /&gt;
82|82 (invalid UTF-8)|Print date (day, month, year)&lt;br /&gt;
&lt;br /&gt;
82|C2 82|Display glyph for U+0082&lt;br /&gt;
&lt;br /&gt;
AC|AC (invalid UTF-8)|Tick mark&lt;br /&gt;
&lt;br /&gt;
AC|C2 AC|Unicode Character &#039;NOT SIGN&#039; (&amp;amp;not;)&lt;br /&gt;
&lt;br /&gt;
E07E|EE 81 BE|Print unsigned word&lt;br /&gt;
&lt;br /&gt;
E082|EE 82 82|Print date (day, month, year)&lt;br /&gt;
&lt;br /&gt;
E0AC|EE 82 AC|Tick mark||&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Global_Settings&amp;diff=75</id>
		<title>Action0/Global Settings</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Global_Settings&amp;diff=75"/>
		<updated>2010-11-16T13:38:56Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Action 0 properties for general variables&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 0 - Properties for general variables=&lt;br /&gt;
&lt;br /&gt;
{maketoc}&lt;br /&gt;
&lt;br /&gt;
Global variables can be set in one of two ways. &amp;amp;nbsp;(This) action 0 using feature 8, or [[ActionD|Action D]]. &amp;amp;nbsp;Variables in arrays will usually be set using an action 0, whereas action D will most commonly set single variables.&lt;br /&gt;
&lt;br /&gt;
In addition to global variables, this action can also set some general grf-specific variables.&lt;br /&gt;
&lt;br /&gt;
-=Properties=-&lt;br /&gt;
&lt;br /&gt;
||Number|Version|Size|Description&lt;br /&gt;
&lt;br /&gt;
08|2.0.1 alpha 40|B|Cost base multipliers&lt;br /&gt;
&lt;br /&gt;
09|2.0.1 alpha 66|D|Cargo translation table&lt;br /&gt;
&lt;br /&gt;
0A|2.0.1 alpha 69|W|Currency display names&lt;br /&gt;
&lt;br /&gt;
0B|2.0.1 alpha 69|D|Currency multipliers&lt;br /&gt;
&lt;br /&gt;
0C|2.0.1 alpha 69|W|Currency options&lt;br /&gt;
&lt;br /&gt;
0D,0E|2.0.1 alpha 69|D|Currency symbols&lt;br /&gt;
&lt;br /&gt;
0F|2.0.1 alpha 69|W|Euro introduction dates&lt;br /&gt;
&lt;br /&gt;
10|2.0.1 alpha 74|12*32*B|Snow line height table&lt;br /&gt;
&lt;br /&gt;
11|OpenTTD (r12924)|2*D|GRF ID overrides for engines&lt;br /&gt;
&lt;br /&gt;
12|OpenTTD (r15417)|D|Rail type translation table&lt;br /&gt;
&lt;br /&gt;
13,14|OpenTTD (r21208)|V|Gender/case translation table||&lt;br /&gt;
&lt;br /&gt;
-=Comments=-&lt;br /&gt;
&lt;br /&gt;
==Cost base multipliers (08)==&lt;br /&gt;
&lt;br /&gt;
TTD has 49 [[BaseCosts|base costs]] (66 in OTTD currently) which govern how much everything costs. &amp;amp;nbsp;Each cost is calculated from a (fixed) factor times the base cost, which is adjusted by inflation every month.&lt;br /&gt;
&lt;br /&gt;
Setting this property allows changing these base costs by factors of two. &amp;amp;nbsp;The default value of the property is 08 which leaves the base cost unchanged. Adding one to the property doubles the base cost, subtracting one halves it.&lt;br /&gt;
&lt;br /&gt;
Using math: ))NewBaseCost[[]]NewBaseCost[[ = ))OldBaseCost[[]]OldBaseCost[[ * 2&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;(n-8), where n is the value of property 08.&lt;br /&gt;
&lt;br /&gt;
Modifying the base costs incurs a small rounding error every time the game is saved, because the costs have to be set back to the default in the savegame. &amp;amp;nbsp;However, this error is unnoticable until many years of inflation have passed and should therefore be of little concern.&lt;br /&gt;
&lt;br /&gt;
Note: in OpenTTD rounding happens towards 1 or -1 depending on the old base cost; i.e. if the old base cost is positive round towards 1, if negative round towards -1. This prevents the base cost to be zero.&lt;br /&gt;
&lt;br /&gt;
==Cargo translation table (09)==&lt;br /&gt;
&lt;br /&gt;
To aid with coding vehicle grf files that wish to support more than the standard cargo types, the easiest way is to install a cargo translation table using this property.&lt;br /&gt;
&lt;br /&gt;
The cargo translation table is a list of [[Action0Cargos#Cargo_label_17_|cargo labels]]. Each entry means that the corresponding cargo is meant when using this ID in an [[Action3|action 3]] or for a bit in the vehicle&#039;s refit mask.&lt;br /&gt;
&lt;br /&gt;
In other words, if for example the fourth entry (number 03) in the list is &amp;amp;quot;MAIL&amp;amp;quot;, then defining graphics for cargo 03 will define graphics for mail, and bit 3 in the refit mask will be for mail as well.&lt;br /&gt;
&lt;br /&gt;
This way, the vehicle grf file doesn&#039;t need to know or care which cargo slot and cargo bit a certain cargo type uses, it can define its own ID for each cargo that it wishes to support, and thus be independent of both what cargo types are really available in the game and what slots/bits they use.&lt;br /&gt;
&lt;br /&gt;
Because the refit mask contains only 32 bits, only the first 32 entries in the translation table can make use of the refit mask. Other cargo types have to be added via the cargo classes, so put the cargos that need exceptions to the cargo class based refitting first so that they can go in the refit mask.&lt;br /&gt;
&lt;br /&gt;
Note that this property cannot be set incrementally, you must set all types in a single action 0 starting from ID 0.&lt;br /&gt;
&lt;br /&gt;
See below for an example.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;~pp~// Cargo translation table&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp;1 * 169 &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00 08 01 29 00 09&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;COAL&amp;amp;quot; &amp;amp;quot;WATR&amp;amp;quot; &amp;amp;quot;RUBB&amp;amp;quot; &amp;amp;quot;MAIL&amp;amp;quot; &amp;amp;quot;OIL_&amp;amp;quot; // 0-4&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;LVST&amp;amp;quot; &amp;amp;quot;GOOD&amp;amp;quot; &amp;amp;quot;CERE&amp;amp;quot; &amp;amp;quot;GRAN&amp;amp;quot; &amp;amp;quot;WHET&amp;amp;quot; // 5-9&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;MAIZ&amp;amp;quot; &amp;amp;quot;WOOD&amp;amp;quot; &amp;amp;quot;WODT&amp;amp;quot; &amp;amp;quot;IORE&amp;amp;quot; &amp;amp;quot;CORE&amp;amp;quot; // 10-14&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;STEL&amp;amp;quot; &amp;amp;quot;PLAS&amp;amp;quot; &amp;amp;quot;VALU&amp;amp;quot; &amp;amp;quot;GOLD&amp;amp;quot; &amp;amp;quot;DIAM&amp;amp;quot; // 15-19&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;PAPR&amp;amp;quot; &amp;amp;quot;FOOD&amp;amp;quot; &amp;amp;quot;FRUT&amp;amp;quot; &amp;amp;quot;FISH&amp;amp;quot; &amp;amp;quot;WOOL&amp;amp;quot; // 20-24&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;POTA&amp;amp;quot; &amp;amp;quot;SAND&amp;amp;quot; &amp;amp;quot;GLAS&amp;amp;quot; &amp;amp;quot;WDPR&amp;amp;quot; &amp;amp;quot;DYES&amp;amp;quot; // 25-29&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;FERT&amp;amp;quot; &amp;amp;quot;OLSD&amp;amp;quot; &amp;amp;quot;RFPR&amp;amp;quot; &amp;amp;quot;VEHI&amp;amp;quot; &amp;amp;quot;PETR&amp;amp;quot; // 30-34&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;BRCK&amp;amp;quot; &amp;amp;quot;SULP&amp;amp;quot; &amp;amp;quot;CMNT&amp;amp;quot; &amp;amp;quot;FICR&amp;amp;quot; &amp;amp;quot;LIME&amp;amp;quot; // 35-39&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;MILK&amp;amp;quot; // 40&lt;br /&gt;
&lt;br /&gt;
// Train wagon that has special graphics for grain (8),&lt;br /&gt;
&lt;br /&gt;
// wheat (9), maize (10) and cereals (7)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp;2 * 29 &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; 03 00 01 1B 04&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;08 &amp;amp;lt;grain-cid&amp;amp;gt; 09 &amp;amp;lt;wheat-cid&amp;amp;gt; 0A &amp;amp;lt;maize-cid&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;07 &amp;amp;lt;cereals-cid&amp;amp;gt; &amp;amp;lt;default-cid&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Train wagon that has graphics for water (1), rubber (2),&lt;br /&gt;
&lt;br /&gt;
// oil (4), petrol (34) and milk (40)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp;3 * 31 &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; 03 00 01 1C 05&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;01 &amp;amp;lt;water-cid&amp;amp;gt; 02 &amp;amp;lt;rubber-cid&amp;amp;gt; 04 &amp;amp;lt;oil-cid&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;22 &amp;amp;lt;petrol-cid&amp;amp;gt; 28 &amp;amp;lt;milk-cid&amp;amp;gt; &amp;amp;lt;default-cid&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The following properties can be used to modify currencies. Each of them can have IDs 0-18 (decimal), the IDs being ordered the same as in the Currency drop-down list.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Currency display names (0A)==&lt;br /&gt;
&lt;br /&gt;
This property allows changing currency names that are displayed in the Currency drop-down in the Game Options window. This property is a textID, and if you need to supply your own text, it must be a DCxx one.&lt;br /&gt;
&lt;br /&gt;
==Currency multipliers (0B)==&lt;br /&gt;
&lt;br /&gt;
The equivalent of 1 British pound in this currency, multiplied by 1000. For example, 1 GBP=2 USD, so this should be 2000 for US dollars. The multiplication by 1000 allows you to have decimals in the multiplier without requiring floating-point calculations. This value is used for display purposes only, TTD always uses British pounds for internal calculations.&lt;br /&gt;
&lt;br /&gt;
==Currency options (0C)==&lt;br /&gt;
&lt;br /&gt;
The low byte of this word specifies the thousands separator to be used for this currency ( usually dot &amp;amp;quot;.&amp;amp;quot; or comma &amp;amp;quot;,&amp;amp;quot;). The high byte should be zero if the currency symbol should be in front of the number ($123,456) and should be 1 if the currency symbol should be shown after the number (123,456$). The symbol placement can be overridden by the TTDPatch settings.&lt;br /&gt;
&lt;br /&gt;
==Currency symbols (0D,0E)==&lt;br /&gt;
&lt;br /&gt;
These doublewords are interpreted as a string of up to 4 characters. If you need fewer characters, the remaining bytes should be zero. Property 0D is printed before the number, property 0E is printed after the number. These two usually differ only if the symbol is separated by a space from the number (for example, &amp;amp;quot;$ &amp;amp;quot; vs. &amp;amp;quot; $&amp;amp;quot;). You should specify both properties since the player can override your preferred symbol placement.&lt;br /&gt;
&lt;br /&gt;
==Euro introduction dates (0F)==&lt;br /&gt;
&lt;br /&gt;
This value allows you to have Euro introduced instead the currency at a given time. If this value is zero, the currency is never substituted with the Euro (USD, for example). If it&#039;s nonzero, it gives the year when the currency is replaced by Euro (for example, 2002 for DM).&lt;br /&gt;
&lt;br /&gt;
==Snow line height table (10)==&lt;br /&gt;
&lt;br /&gt;
This property allows you to specify the snow line height for every day of the year. The only ID you can set is 0, and the value must be 12*32=384 bytes long. To simplify things for the patch, every month has 32 entries, and the impossible combinations (like 32th January or 31th April) will never be read. The entries should be a multiply of 8 or else some visual glitches may appear. Values below 10h and above EFh may result in overflow and should not be used. Since the highest possible land is 78h high, giving 88h or above will effectively disable the snow line.&lt;br /&gt;
&lt;br /&gt;
If the temperate snow line is enabled, this table applies on temperate as well.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; Some code in TTD assumes that the snow line will remain constant: Some industries are built only above/below snowline and assume that the snow line won&#039;t move when they&#039;re already built. Similarly, snowy houses on arctic will still appear snowy even when the snow disappears around them. If you want to use this feature, make sure to counter these effects by overriding arctic houses and industries with snow-aware versions.&lt;br /&gt;
&lt;br /&gt;
==GRF ID overrides for engines (11)==&lt;br /&gt;
&lt;br /&gt;
(OpenTTD only) Allows you to provide a list of &#039;source&#039; and &#039;target&#039; GRF IDs to let engines in the source GRF override those in the target GRF, when dynamic engines is enabled. Each entry is 8 bytes, containing two GRF IDs. Multiple entries can be used, and different GRFs can be set to override the same &#039;target&#039; GRF, but only the last instance of a &#039;source&#039; GRF is active. GRF IDs that are not present will have no effect.&lt;br /&gt;
&lt;br /&gt;
The scope of this feature is quite limited and it should be used only for sets that modify data of another set, for example the DBSetXL ECS addon for DBSetXL, or the censored version of LV4.&lt;br /&gt;
&lt;br /&gt;
==Rail type translation table (12)==&lt;br /&gt;
&lt;br /&gt;
(OpenTTD only) Provides ability to specify rail types via a translation table, similar to using a cargo translation table. Each rail type label is a DWord. The default labels are RAIL, ELRL, MONO and MGLV. If a table is installed, then changing engine traction type will not affect the rail type.&lt;br /&gt;
&lt;br /&gt;
==Gender/case translation table (13,14)==&lt;br /&gt;
&lt;br /&gt;
(OpenTTD only) Provides ability to specify genders or cases via a translation table. These map NewGRF internal IDs for the genders or cases to the genders or cases as defined in OpenTTD&#039;s language files so NewGRF strings and OpenTTD strings can interact on eachother&#039;s gender or cases. Property 13 is for mapping genders whereas property 14 is for mapping cases.&lt;br /&gt;
&lt;br /&gt;
The ID used for these translation tables is the Action 4 (GRF version 7 or higher) language-id, i.e. this mapping only works with GRF version 7 or higher. Language-id 7F (any) is not allowed. You can can define an ID multiple times in which case the new mappings are simply appended to the already known mappings.&lt;br /&gt;
&lt;br /&gt;
The format is simply a 00 terminated list of mappings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;-+(&amp;amp;lt;id&amp;amp;gt; &amp;amp;lt;name&amp;amp;gt;)+ 00+-&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||Size|Name|Meaning&lt;br /&gt;
&lt;br /&gt;
B|id|NewGRF internal ID for the gender or case name, may not be 00&lt;br /&gt;
&lt;br /&gt;
V|name|A 00 terminated string with the gender or case name as in OpenTTD&#039;s translation||&lt;br /&gt;
&lt;br /&gt;
An NewGRF internal ID may be mapped multiple times for the same language as may an OpenTTD gender or case name be (reverse) mapped multiple times. This can be used for coping with OpenTTD translators adding or removing genders or cases over time. The NewGRF internal ID may not be 00 as this ID will be used in the Action 4 strings which may not contain 00 except for terminating the string.&lt;br /&gt;
&lt;br /&gt;
These mappings are used for [[StringCodes]] 9A 0E, 9A 0F, 9A 13 and 9A 14. How the mapping is used precisely can be found there.&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Global_Settings&amp;diff=76</id>
		<title>Action0/Global Settings</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Global_Settings&amp;diff=76"/>
		<updated>2010-11-16T13:33:53Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Action 0 properties for general variables&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 0 - Properties for general variables=&lt;br /&gt;
&lt;br /&gt;
{maketoc}&lt;br /&gt;
&lt;br /&gt;
Global variables can be set in one of two ways. &amp;amp;nbsp;(This) action 0 using feature 8, or [[ActionD|Action D]]. &amp;amp;nbsp;Variables in arrays will usually be set using an action 0, whereas action D will most commonly set single variables.&lt;br /&gt;
&lt;br /&gt;
In addition to global variables, this action can also set some general grf-specific variables.&lt;br /&gt;
&lt;br /&gt;
-=Properties=-&lt;br /&gt;
&lt;br /&gt;
||Number|Version|Size|Description&lt;br /&gt;
&lt;br /&gt;
08|2.0.1 alpha 40|B|Cost base multipliers&lt;br /&gt;
&lt;br /&gt;
09|2.0.1 alpha 66|D|Cargo translation table&lt;br /&gt;
&lt;br /&gt;
0A|2.0.1 alpha 69|W|Currency display names&lt;br /&gt;
&lt;br /&gt;
0B|2.0.1 alpha 69|D|Currency multipliers&lt;br /&gt;
&lt;br /&gt;
0C|2.0.1 alpha 69|W|Currency options&lt;br /&gt;
&lt;br /&gt;
0D,0E|2.0.1 alpha 69|D|Currency symbols&lt;br /&gt;
&lt;br /&gt;
0F|2.0.1 alpha 69|W|Euro introduction dates&lt;br /&gt;
&lt;br /&gt;
10|2.0.1 alpha 74|12*32*B|Snow line height table&lt;br /&gt;
&lt;br /&gt;
11|OpenTTD (r12924)|2*D|GRF ID overrides for engines&lt;br /&gt;
&lt;br /&gt;
12|OpenTTD (r15417)|D|Rail type translation table&lt;br /&gt;
&lt;br /&gt;
13,14|OpenTTD (r21208)|V|Gender/case translation table||&lt;br /&gt;
&lt;br /&gt;
-=Comments=-&lt;br /&gt;
&lt;br /&gt;
==Cost base multipliers (08)==&lt;br /&gt;
&lt;br /&gt;
TTD has 49 [[BaseCosts|base costs]] (66 in OTTD currently) which govern how much everything costs. &amp;amp;nbsp;Each cost is calculated from a (fixed) factor times the base cost, which is adjusted by inflation every month.&lt;br /&gt;
&lt;br /&gt;
Setting this property allows changing these base costs by factors of two. &amp;amp;nbsp;The default value of the property is 08 which leaves the base cost unchanged. Adding one to the property doubles the base cost, subtracting one halves it.&lt;br /&gt;
&lt;br /&gt;
Using math: ))NewBaseCost[[]]NewBaseCost[[ = ))OldBaseCost[[]]OldBaseCost[[ * 2&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;(n-8), where n is the value of property 08.&lt;br /&gt;
&lt;br /&gt;
Modifying the base costs incurs a small rounding error every time the game is saved, because the costs have to be set back to the default in the savegame. &amp;amp;nbsp;However, this error is unnoticable until many years of inflation have passed and should therefore be of little concern.&lt;br /&gt;
&lt;br /&gt;
Note: in OpenTTD rounding happens towards 1 or -1 depending on the old base cost; i.e. if the old base cost is positive round towards 1, if negative round towards -1. This prevents the base cost to be zero.&lt;br /&gt;
&lt;br /&gt;
==Cargo translation table (09)==&lt;br /&gt;
&lt;br /&gt;
To aid with coding vehicle grf files that wish to support more than the standard cargo types, the easiest way is to install a cargo translation table using this property.&lt;br /&gt;
&lt;br /&gt;
The cargo translation table is a list of [[Action0Cargos#Cargo_label_17_|cargo labels]]. Each entry means that the corresponding cargo is meant when using this ID in an [[Action3|action 3]] or for a bit in the vehicle&#039;s refit mask.&lt;br /&gt;
&lt;br /&gt;
In other words, if for example the fourth entry (number 03) in the list is &amp;amp;quot;MAIL&amp;amp;quot;, then defining graphics for cargo 03 will define graphics for mail, and bit 3 in the refit mask will be for mail as well.&lt;br /&gt;
&lt;br /&gt;
This way, the vehicle grf file doesn&#039;t need to know or care which cargo slot and cargo bit a certain cargo type uses, it can define its own ID for each cargo that it wishes to support, and thus be independent of both what cargo types are really available in the game and what slots/bits they use.&lt;br /&gt;
&lt;br /&gt;
Because the refit mask contains only 32 bits, only the first 32 entries in the translation table can make use of the refit mask. Other cargo types have to be added via the cargo classes, so put the cargos that need exceptions to the cargo class based refitting first so that they can go in the refit mask.&lt;br /&gt;
&lt;br /&gt;
Note that this property cannot be set incrementally, you must set all types in a single action 0 starting from ID 0.&lt;br /&gt;
&lt;br /&gt;
See below for an example.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;~pp~// Cargo translation table&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp;1 * 169 &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00 08 01 29 00 09&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;COAL&amp;amp;quot; &amp;amp;quot;WATR&amp;amp;quot; &amp;amp;quot;RUBB&amp;amp;quot; &amp;amp;quot;MAIL&amp;amp;quot; &amp;amp;quot;OIL_&amp;amp;quot; // 0-4&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;LVST&amp;amp;quot; &amp;amp;quot;GOOD&amp;amp;quot; &amp;amp;quot;CERE&amp;amp;quot; &amp;amp;quot;GRAN&amp;amp;quot; &amp;amp;quot;WHET&amp;amp;quot; // 5-9&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;MAIZ&amp;amp;quot; &amp;amp;quot;WOOD&amp;amp;quot; &amp;amp;quot;WODT&amp;amp;quot; &amp;amp;quot;IORE&amp;amp;quot; &amp;amp;quot;CORE&amp;amp;quot; // 10-14&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;STEL&amp;amp;quot; &amp;amp;quot;PLAS&amp;amp;quot; &amp;amp;quot;VALU&amp;amp;quot; &amp;amp;quot;GOLD&amp;amp;quot; &amp;amp;quot;DIAM&amp;amp;quot; // 15-19&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;PAPR&amp;amp;quot; &amp;amp;quot;FOOD&amp;amp;quot; &amp;amp;quot;FRUT&amp;amp;quot; &amp;amp;quot;FISH&amp;amp;quot; &amp;amp;quot;WOOL&amp;amp;quot; // 20-24&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;POTA&amp;amp;quot; &amp;amp;quot;SAND&amp;amp;quot; &amp;amp;quot;GLAS&amp;amp;quot; &amp;amp;quot;WDPR&amp;amp;quot; &amp;amp;quot;DYES&amp;amp;quot; // 25-29&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;FERT&amp;amp;quot; &amp;amp;quot;OLSD&amp;amp;quot; &amp;amp;quot;RFPR&amp;amp;quot; &amp;amp;quot;VEHI&amp;amp;quot; &amp;amp;quot;PETR&amp;amp;quot; // 30-34&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;BRCK&amp;amp;quot; &amp;amp;quot;SULP&amp;amp;quot; &amp;amp;quot;CMNT&amp;amp;quot; &amp;amp;quot;FICR&amp;amp;quot; &amp;amp;quot;LIME&amp;amp;quot; // 35-39&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;MILK&amp;amp;quot; // 40&lt;br /&gt;
&lt;br /&gt;
// Train wagon that has special graphics for grain (8),&lt;br /&gt;
&lt;br /&gt;
// wheat (9), maize (10) and cereals (7)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp;2 * 29 &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; 03 00 01 1B 04&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;08 &amp;amp;lt;grain-cid&amp;amp;gt; 09 &amp;amp;lt;wheat-cid&amp;amp;gt; 0A &amp;amp;lt;maize-cid&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;07 &amp;amp;lt;cereals-cid&amp;amp;gt; &amp;amp;lt;default-cid&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Train wagon that has graphics for water (1), rubber (2),&lt;br /&gt;
&lt;br /&gt;
// oil (4), petrol (34) and milk (40)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp;3 * 31 &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; 03 00 01 1C 05&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;01 &amp;amp;lt;water-cid&amp;amp;gt; 02 &amp;amp;lt;rubber-cid&amp;amp;gt; 04 &amp;amp;lt;oil-cid&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;22 &amp;amp;lt;petrol-cid&amp;amp;gt; 28 &amp;amp;lt;milk-cid&amp;amp;gt; &amp;amp;lt;default-cid&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The following properties can be used to modify currencies. Each of them can have IDs 0-18 (decimal), the IDs being ordered the same as in the Currency drop-down list.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Currency display names (0A)==&lt;br /&gt;
&lt;br /&gt;
This property allows changing currency names that are displayed in the Currency drop-down in the Game Options window. This property is a textID, and if you need to supply your own text, it must be a DCxx one.&lt;br /&gt;
&lt;br /&gt;
==Currency multipliers (0B)==&lt;br /&gt;
&lt;br /&gt;
The equivalent of 1 British pound in this currency, multiplied by 1000. For example, 1 GBP=2 USD, so this should be 2000 for US dollars. The multiplication by 1000 allows you to have decimals in the multiplier without requiring floating-point calculations. This value is used for display purposes only, TTD always uses British pounds for internal calculations.&lt;br /&gt;
&lt;br /&gt;
==Currency options (0C)==&lt;br /&gt;
&lt;br /&gt;
The low byte of this word specifies the thousands separator to be used for this currency ( usually dot &amp;amp;quot;.&amp;amp;quot; or comma &amp;amp;quot;,&amp;amp;quot;). The high byte should be zero if the currency symbol should be in front of the number ($123,456) and should be 1 if the currency symbol should be shown after the number (123,456$). The symbol placement can be overridden by the TTDPatch settings.&lt;br /&gt;
&lt;br /&gt;
==Currency symbols (0D,0E)==&lt;br /&gt;
&lt;br /&gt;
These doublewords are interpreted as a string of up to 4 characters. If you need fewer characters, the remaining bytes should be zero. Property 0D is printed before the number, property 0E is printed after the number. These two usually differ only if the symbol is separated by a space from the number (for example, &amp;amp;quot;$ &amp;amp;quot; vs. &amp;amp;quot; $&amp;amp;quot;). You should specify both properties since the player can override your preferred symbol placement.&lt;br /&gt;
&lt;br /&gt;
==Euro introduction dates (0F)==&lt;br /&gt;
&lt;br /&gt;
This value allows you to have Euro introduced instead the currency at a given time. If this value is zero, the currency is never substituted with the Euro (USD, for example). If it&#039;s nonzero, it gives the year when the currency is replaced by Euro (for example, 2002 for DM).&lt;br /&gt;
&lt;br /&gt;
==Snow line height table (10)==&lt;br /&gt;
&lt;br /&gt;
This property allows you to specify the snow line height for every day of the year. The only ID you can set is 0, and the value must be 12*32=384 bytes long. To simplify things for the patch, every month has 32 entries, and the impossible combinations (like 32th January or 31th April) will never be read. The entries should be a multiply of 8 or else some visual glitches may appear. Values below 10h and above EFh may result in overflow and should not be used. Since the highest possible land is 78h high, giving 88h or above will effectively disable the snow line.&lt;br /&gt;
&lt;br /&gt;
If the temperate snow line is enabled, this table applies on temperate as well.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; Some code in TTD assumes that the snow line will remain constant: Some industries are built only above/below snowline and assume that the snow line won&#039;t move when they&#039;re already built. Similarly, snowy houses on arctic will still appear snowy even when the snow disappears around them. If you want to use this feature, make sure to counter these effects by overriding arctic houses and industries with snow-aware versions.&lt;br /&gt;
&lt;br /&gt;
==GRF ID overrides for engines (11)==&lt;br /&gt;
&lt;br /&gt;
(OpenTTD only) Allows you to provide a list of &#039;source&#039; and &#039;target&#039; GRF IDs to let engines in the source GRF override those in the target GRF, when dynamic engines is enabled. Each entry is 8 bytes, containing two GRF IDs. Multiple entries can be used, and different GRFs can be set to override the same &#039;target&#039; GRF, but only the last instance of a &#039;source&#039; GRF is active. GRF IDs that are not present will have no effect.&lt;br /&gt;
&lt;br /&gt;
The scope of this feature is quite limited and it should be used only for sets that modify data of another set, for example the DBSetXL ECS addon for DBSetXL, or the censored version of LV4.&lt;br /&gt;
&lt;br /&gt;
==Rail type translation table (12)==&lt;br /&gt;
&lt;br /&gt;
(OpenTTD only) Provides ability to specify rail types via a translation table, similar to using a cargo translation table. Each rail type label is a DWord. The default labels are RAIL, ELRL, MONO and MGLV. If a table is installed, then changing engine traction type will not affect the rail type.&lt;br /&gt;
&lt;br /&gt;
==Gender/case translation table (13,14)==&lt;br /&gt;
&lt;br /&gt;
(OpenTTD only) Provides ability to specify genders or cases via a translation table. These map NewGRF internal IDs for the genders or cases to the genders or cases as defined in OpenTTD&#039;s language files so NewGRF strings and OpenTTD strings can interact on eachother&#039;s gender or cases. Property 13 is for mapping genders whereas property 14 is for mapping cases.&lt;br /&gt;
&lt;br /&gt;
The ID used for these translation tables is the Action 4 (GRF version 7 or higher) language-id, i.e. this mapping only works with GRF version 7 or higher. Language-id 7F (any) is not allowed. You can can define an ID multiple times in which case the new mappings are simply appended to the already known mappings.&lt;br /&gt;
&lt;br /&gt;
The format is simply a 00 terminated list of mappings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;-+(&amp;amp;lt;id&amp;amp;gt; &amp;amp;lt;name&amp;amp;gt;)+ 00+-&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||Size|Name|Meaning&lt;br /&gt;
&lt;br /&gt;
B|id|NewGRF internal ID for the gender or case name&lt;br /&gt;
&lt;br /&gt;
V|name|A 00 terminated string with the gender or case name as in OpenTTD&#039;s translation||&lt;br /&gt;
&lt;br /&gt;
An NewGRF internal ID may be mapped multiple times for the same language as may an OpenTTD gender or case name be (reverse) mapped multiple times. This can be used for coping with OpenTTD translators adding or removing genders or cases over time.&lt;br /&gt;
&lt;br /&gt;
These mappings are used for [[StringCodes]] 9A 0E, 9A 0F, 9A 13 and 9A 14. How the mapping is used precisely can be found there.&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=StringCodes&amp;diff=885</id>
		<title>StringCodes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=StringCodes&amp;diff=885"/>
		<updated>2010-11-05T13:43:05Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Description of characters in TTD&#039;s character set&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=String Codes=&lt;br /&gt;
&lt;br /&gt;
Texts in TTD are mostly in the Latin-1 (ISO-8859-1) character set (except when using UTF-8 encoding; see below), however a few characters are different. &amp;amp;nbsp;Also, some characters have special meaning. These are explained in the following table.&lt;br /&gt;
&lt;br /&gt;
||Range, hex|Meaning&lt;br /&gt;
&lt;br /&gt;
00..1F|Control characters, unused except for the following:&lt;br /&gt;
&lt;br /&gt;
|01 X offset in next byte of string (variable space)&lt;br /&gt;
&lt;br /&gt;
|0D New line&lt;br /&gt;
&lt;br /&gt;
|0E Set small font size&lt;br /&gt;
&lt;br /&gt;
|0F Set large font size&lt;br /&gt;
&lt;br /&gt;
|1F X and Y offsets in next two bytes of string&lt;br /&gt;
&lt;br /&gt;
20..7A| Latin-1 characters, from space &amp;amp;quot; &amp;amp;quot; up to lower case &amp;amp;quot;z&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
7B..87| Formatting instructions, all take their argument from the stack if not otherwise specified&lt;br /&gt;
&lt;br /&gt;
|7B Print dword&lt;br /&gt;
&lt;br /&gt;
|7C Print signed word&lt;br /&gt;
&lt;br /&gt;
|7D Print signed byte&lt;br /&gt;
&lt;br /&gt;
|7E Print unsigned word&lt;br /&gt;
&lt;br /&gt;
|7F Print dword in currency units&lt;br /&gt;
&lt;br /&gt;
|80 Print substring (text ID from stack)&lt;br /&gt;
&lt;br /&gt;
|81 Print substring (text ID in next 2 bytes of string)&lt;br /&gt;
&lt;br /&gt;
|82 Print date (day, month, year)&lt;br /&gt;
&lt;br /&gt;
|83 Print month and year&lt;br /&gt;
&lt;br /&gt;
|84 Print signed word in speed units&lt;br /&gt;
&lt;br /&gt;
|85 Discard next word from stack&lt;br /&gt;
&lt;br /&gt;
|86 Rotate down top 4 words on stack&lt;br /&gt;
&lt;br /&gt;
|87 Print signed word in litres&lt;br /&gt;
&lt;br /&gt;
88..98|Colour codes&lt;br /&gt;
&lt;br /&gt;
|88 Blue&lt;br /&gt;
&lt;br /&gt;
|89 Light Gray&lt;br /&gt;
&lt;br /&gt;
|8A Light Orange (&amp;amp;quot;Gold&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
|8B Red&lt;br /&gt;
&lt;br /&gt;
|8C Purple&lt;br /&gt;
&lt;br /&gt;
|8D ))Gray-Green[[]]Gray-Green[[&lt;br /&gt;
&lt;br /&gt;
|8E Orange&lt;br /&gt;
&lt;br /&gt;
|8F Green&lt;br /&gt;
&lt;br /&gt;
|90 Yellow&lt;br /&gt;
&lt;br /&gt;
|91 Light Green&lt;br /&gt;
&lt;br /&gt;
|92 ))Red-Brown[[]]Red-Brown[[&lt;br /&gt;
&lt;br /&gt;
|93 Brown&lt;br /&gt;
&lt;br /&gt;
|94 White&lt;br /&gt;
&lt;br /&gt;
|95 Light Blue&lt;br /&gt;
&lt;br /&gt;
|96 Dark Gray&lt;br /&gt;
&lt;br /&gt;
|97 Mauve (grayish purple)&lt;br /&gt;
&lt;br /&gt;
|98 Black&lt;br /&gt;
&lt;br /&gt;
99|Switch to company colour that follows in next byte (enabled by enhancegui)&lt;br /&gt;
&lt;br /&gt;
9A|Extended format code in next byte:&lt;br /&gt;
&lt;br /&gt;
|00 -or- 01 Display 64-bit value from stack in currency units&lt;br /&gt;
&lt;br /&gt;
|02 Ignore next colour byte. Multiple instances will skip multiple colour bytes.&lt;br /&gt;
&lt;br /&gt;
|03 WORD Push WORD onto the textref stack&lt;br /&gt;
&lt;br /&gt;
|04 BYTE Un-print the previous BYTE characters.&lt;br /&gt;
&lt;br /&gt;
|05 For internal use only. Not valid in GRF files.&lt;br /&gt;
&lt;br /&gt;
|06 Print byte in hex (since TTDPatch r2007)&lt;br /&gt;
&lt;br /&gt;
|07 Print word in hex (since TTDPatch r2007)&lt;br /&gt;
&lt;br /&gt;
|08 Print dword in hex (since TTDPatch r2007)&lt;br /&gt;
&lt;br /&gt;
|09 For internal use only. Usage in NewGRFs will most likely crash TTDPatch. (since TTDPatch r2128)&lt;br /&gt;
&lt;br /&gt;
|0A For internal use only. Usage in NewGRFs will most likely crash TTDPatch. (since TTDPatch r2128)&lt;br /&gt;
&lt;br /&gt;
|0B Print 64-bit value in hex (since TTDPatch r2178)&lt;br /&gt;
&lt;br /&gt;
|0C Print name of station with id in next textrefstack word (since TTDPatch r2178)&lt;br /&gt;
&lt;br /&gt;
|0D Print signed word in tonnes&lt;br /&gt;
&lt;br /&gt;
9B..9D|Reserved&lt;br /&gt;
&lt;br /&gt;
9E..FF|Latin-1 characters, except for the following:&lt;br /&gt;
&lt;br /&gt;
|9E Euro character &amp;amp;quot;&amp;amp;euro;&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
|9F Capital Y umlaut &amp;amp;quot;&amp;amp;Yuml;&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
|A0 Scroll button up&lt;br /&gt;
&lt;br /&gt;
|AA Scroll button down&lt;br /&gt;
&lt;br /&gt;
|AC Tick mark&lt;br /&gt;
&lt;br /&gt;
|AD X mark&lt;br /&gt;
&lt;br /&gt;
|AF Scroll button right&lt;br /&gt;
&lt;br /&gt;
|B4 Train symbol&lt;br /&gt;
&lt;br /&gt;
|B5 Truck symbol&lt;br /&gt;
&lt;br /&gt;
|B6 Bus symbol&lt;br /&gt;
&lt;br /&gt;
|B7 Plane symbol&lt;br /&gt;
&lt;br /&gt;
|B8 Ship symbol&lt;br /&gt;
&lt;br /&gt;
|B9 Superscript -1&lt;br /&gt;
&lt;br /&gt;
|BC Small scroll button up&lt;br /&gt;
&lt;br /&gt;
|BD Small scroll button down||&lt;br /&gt;
&lt;br /&gt;
The formatting instructions must not be used except in strings that expect them, and then they may not be out of order (with the possible exception of code 86 shuffling the internal stack). When used improperly, they will most likely crash TTD. Code 81 is always safe to use (provided that the referenced text ID uses no unsafe formatting instructions either), and will insert the given text ID (e.g. &amp;amp;quot;\81\3D\A0&amp;amp;quot; will insert text ID A03D, &amp;amp;quot;\98Refit Aircraft&amp;amp;quot;). Note however that if you want to include e.g. ID D000/D400, the 00 byte will be considered the end of string, and this will therefore break if additional texts are supposed to follow in the action 4. DCxx IDs must not be included; neither codes 80 nor 81 correctly access DCxx IDs.&lt;br /&gt;
&lt;br /&gt;
Each formatting instructions removes its argument from the stack, so that the next one will receive the following bytes as arguments. Code 86 takes the top four words from the stack, let&#039;s call them W1 through W4, and reorders them as W4 W1 W2 W3. This is used for languages in which industries or stations should be named not &amp;amp;quot;Flinfingbury Power Plant&amp;amp;quot; but &amp;amp;quot;Power Plant Flinfingbury&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=UTF-8 support=&lt;br /&gt;
&lt;br /&gt;
Since 2.0.1 alpha 68, TTDPatch supports UTF-8 encoded input strings. Use [[Action12|action 12]] to define glyphs for the characters which do not exist in TTD&#039;s .grf files (possible since 2.0.1 alpha 73).&lt;br /&gt;
&lt;br /&gt;
To indicate that a given string is in UTF-8 encoding, start it with a capital thorn (U+00DE, &amp;amp;quot;&amp;amp;THORN;&amp;amp;quot;), encoded in UTF-8 as usual with the bytes C3 9E. &amp;amp;nbsp;Everything in that string is then assumed to be in UTF-8 encoding, with the following exception: if characters appear that are not valid UTF-8 sequences, they are assumed to be one of the above control codes. This way, it is still possible to write, e.g. &amp;amp;quot;&amp;amp;THORN;Capacity: &amp;amp;quot; 87 &amp;amp;quot;litres&amp;amp;quot;, without encoding the 87 in UTF-8 (which would instead refer to a character installed at codepoint U+0087).&lt;br /&gt;
&lt;br /&gt;
In addition, this allows using the non-Unicode characters 9E, 9F, A0, AA, AC, AD, AF, B4..B9, BC and BD from the above list, which when encoded with UTF-8 would refer to their respective Unicode characters instead. To use the TTD characters, simply do not encode them using UTF-8 but enter them directly as bytes. This causes them to be an invalid UTF-8 sequence and allows TTDPatch to use the correct symbol from TTD&#039;s fonts.&lt;br /&gt;
&lt;br /&gt;
Alternatively, these symbols (in fact, the TTD character set from 20 to FF) are also mapped into the Unicode Private Use Area at U+E0xx, so to encode the truck symbol, you may use character U+E0B5 as well, although this will probably be an unprintable character in most text editors.&lt;br /&gt;
&lt;br /&gt;
Finally, characters 7B..7F no longer function as the above formatting instructions, but will display regular glyphs instead (provided they are installed; by default TTD has none at these codepoints). Instead, to use these formatting instructions in UTF-8 mode, you need to use their Private Use Area codepoint at U+E0xx.&lt;br /&gt;
&lt;br /&gt;
Basically there are three possibilities:&lt;br /&gt;
# Characters U+E020..U+E0FF &amp;amp;nbsp;in the E0xx Private Use Area do what their respective character xx would do in TTD, as do the control characters below U+0020&lt;br /&gt;
# All other valid UTF-8 sequences display actual glyphs, if they are available&lt;br /&gt;
# All invalid UTF-8 sequences do what their individual bytes would do in TTD&lt;br /&gt;
&lt;br /&gt;
To summarize, here&#039;s a handy table:&lt;br /&gt;
&lt;br /&gt;
||Character|Encoding in UTF-8 mode|Meaning&lt;br /&gt;
&lt;br /&gt;
7E|7E|Unicode Character &#039;TILDE&#039; (~)&lt;br /&gt;
&lt;br /&gt;
82|82 (invalid UTF-8)|Print date (day, month, year)&lt;br /&gt;
&lt;br /&gt;
82|C2 82|Display glyph for U+0082&lt;br /&gt;
&lt;br /&gt;
AC|AC (invalid UTF-8)|Tick mark&lt;br /&gt;
&lt;br /&gt;
AC|C2 AC|Unicode Character &#039;NOT SIGN&#039; (&amp;amp;not;)&lt;br /&gt;
&lt;br /&gt;
E07E|EE 81 BE|Print unsigned word&lt;br /&gt;
&lt;br /&gt;
E082|EE 82 82|Print date (day, month, year)&lt;br /&gt;
&lt;br /&gt;
E0AC|EE 82 AC|Tick mark||&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Callbacks&amp;diff=745</id>
		<title>Callbacks</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Callbacks&amp;diff=745"/>
		<updated>2010-10-16T13:22:33Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;List of available callbacks&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Callbacks=&lt;br /&gt;
&lt;br /&gt;
{maketoc}&lt;br /&gt;
&lt;br /&gt;
A callback is a special action 2 that the patch &amp;amp;quot;calls&amp;amp;quot; in order to modify various features, an example being the visual effect of train vehicles. &amp;amp;nbsp;See the [[CallbacksTut|callback tutorial]] on how to use them.&lt;br /&gt;
&lt;br /&gt;
In the final action 2 of a chain of variational action 2s, the second byte of the matching entry has to have bit 7 set to identify it as a callback result. (Previously, it was required that the second byte be FF, but now only bit 7 needs to be set.)&lt;br /&gt;
&lt;br /&gt;
For example, 04 00 is not a callback result (but it may be the ID of another chained action 2), whereas 04 80 is a callback result with a value of 4. &amp;amp;nbsp;For some callbacks, 15 bit results are possible, in which case the upper 7 bits are stored in the second byte. &amp;amp;nbsp;For example, 54 C2 is a callback result with a value of 4254=16980, where again the second byte has bit 7 set, changing the 42 into C2.&lt;br /&gt;
&lt;br /&gt;
For compatibility with earlier patch versions, FF in the high byte is taken to mean the same thing as 80, so 04 FF also has a callback result of 4. &amp;amp;nbsp;Note that if your grf file needs to be compatible with versions before 2.0.1 alpha 40, you must set the high byte to FF, and so can use only 8 bit results.&lt;br /&gt;
&lt;br /&gt;
== List of callbacks==&lt;br /&gt;
&lt;br /&gt;
The following callbacks are defined by the patch. &amp;amp;nbsp;The number of the callback is what will be stored in variable 0C so that you can return the right results if you have several callbacks. &amp;amp;nbsp;All callbacks are explained in more detail below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PLEASE NOTE:&#039;&#039;&#039; Since TTDPatch 2.5 beta 5, the size of variable 0C has changed, and now there are word-sized callback numbers as well. To maintain backwards compatibility, only callbacks 10..3F can be checked using a byte-sized check. Callbacks 140 and above, on the other hand, must be checked using a word or dword sized check, to make sure they are identified uniquely.&lt;br /&gt;
&lt;br /&gt;
||Number|Feature(s)|Meaning&lt;br /&gt;
&lt;br /&gt;
10|Trains|Powered wagons and visual effect&lt;br /&gt;
&lt;br /&gt;
11|Vehicles|Wagon length&lt;br /&gt;
&lt;br /&gt;
12|Vehicles|Load amount&lt;br /&gt;
&lt;br /&gt;
13|Stations|Station availability&lt;br /&gt;
&lt;br /&gt;
14|Stations|Use callback to select sprite layout&lt;br /&gt;
&lt;br /&gt;
15|Vehicles|Set refitted capacity&lt;br /&gt;
&lt;br /&gt;
16|Trains|Build articulated engines&lt;br /&gt;
&lt;br /&gt;
17|Houses|House construction check&lt;br /&gt;
&lt;br /&gt;
18|Several (G*)|AI construction/purchase selection&lt;br /&gt;
&lt;br /&gt;
19|Vehicles|Cargo sub-type display&lt;br /&gt;
&lt;br /&gt;
1A|Houses|Next animation frame&lt;br /&gt;
&lt;br /&gt;
1B|Houses|Animation control&lt;br /&gt;
&lt;br /&gt;
1C|Houses|Construction stage changes&lt;br /&gt;
&lt;br /&gt;
1D|Trains|Can wagon be attached&lt;br /&gt;
&lt;br /&gt;
1E|Houses|Decide colour of building&lt;br /&gt;
&lt;br /&gt;
1F|Houses|Cargo acceptance&lt;br /&gt;
&lt;br /&gt;
20|Houses|Length of animation frame&lt;br /&gt;
&lt;br /&gt;
21|Houses|Trigger building destruction&lt;br /&gt;
&lt;br /&gt;
22|Industries|Availability&lt;br /&gt;
&lt;br /&gt;
23|Vehicles|Additional text in purchase screen&lt;br /&gt;
&lt;br /&gt;
24|Stations|Custom station layout&lt;br /&gt;
&lt;br /&gt;
25|Industry tiles|Animation control&lt;br /&gt;
&lt;br /&gt;
26|Industry tiles|Next animation frame&lt;br /&gt;
&lt;br /&gt;
27|Industry tiles|Length of animation frame&lt;br /&gt;
&lt;br /&gt;
28|Industries|Industry location permissibility&lt;br /&gt;
&lt;br /&gt;
29|Industries|Random production change&lt;br /&gt;
&lt;br /&gt;
2A|Houses|Get accepted cargo types&lt;br /&gt;
&lt;br /&gt;
2B|Industry tiles|Decide cargo acceptance&lt;br /&gt;
&lt;br /&gt;
2C|Industry tiles|Get accepted cargo types&lt;br /&gt;
&lt;br /&gt;
2D|Vehicles|Select colour mapping for vehicle&lt;br /&gt;
&lt;br /&gt;
2E|Houses|Custom cargo production&lt;br /&gt;
&lt;br /&gt;
2F|Industry tiles|Custom shape check&lt;br /&gt;
&lt;br /&gt;
30|Industry tiles|Decide drawing default foundations&lt;br /&gt;
&lt;br /&gt;
31|Vehicles|Start/stop check&lt;br /&gt;
&lt;br /&gt;
32|Vehicles|32-day callback&lt;br /&gt;
&lt;br /&gt;
33|Several|Sound effect callback&lt;br /&gt;
&lt;br /&gt;
34|Vehicles (G*)|Autoreplace vehicle selection&lt;br /&gt;
&lt;br /&gt;
35|Industries|Monthly random production change&lt;br /&gt;
&lt;br /&gt;
36|Vehicles|Change vehicle Properties&lt;br /&gt;
&lt;br /&gt;
37|Industries|Cargo sub-type display&lt;br /&gt;
&lt;br /&gt;
38|Industries|Show additional text in fund window&lt;br /&gt;
&lt;br /&gt;
39|Cargoes|Custom profit calculation&lt;br /&gt;
&lt;br /&gt;
3A|Industries|Show additional text in industry window&lt;br /&gt;
&lt;br /&gt;
3B|Industries|Control special effects&lt;br /&gt;
&lt;br /&gt;
3C|Industry tiles|Disable autosloping&lt;br /&gt;
&lt;br /&gt;
3D|Industries|Opt out of accepting cargo&lt;br /&gt;
&lt;br /&gt;
40..13F| |--Reserved--&lt;br /&gt;
&lt;br /&gt;
140|Stations|Animation control&lt;br /&gt;
&lt;br /&gt;
141|Stations|Next animation frame&lt;br /&gt;
&lt;br /&gt;
142|Stations|Length of animation frame&lt;br /&gt;
&lt;br /&gt;
143|Houses|Protect building conditionally&lt;br /&gt;
&lt;br /&gt;
144|Sounds (G*)|Ambient sound effects&lt;br /&gt;
&lt;br /&gt;
145|Cargoes|Custom station rating calculation&lt;br /&gt;
&lt;br /&gt;
146|New Signals (G*)|New signals sprite drawing|&lt;br /&gt;
&lt;br /&gt;
147|Canals|Add sprite offset&lt;br /&gt;
&lt;br /&gt;
148|Houses|Watched cargo accepted&lt;br /&gt;
&lt;br /&gt;
149|Stations|Land slope check&lt;br /&gt;
&lt;br /&gt;
14A|Industries|Decide industry color&lt;br /&gt;
&lt;br /&gt;
14B|Industries|Decide input cargo types&lt;br /&gt;
&lt;br /&gt;
14C|Industries|Decide output cargo types&lt;br /&gt;
&lt;br /&gt;
14D|Houses|Customized building name&lt;br /&gt;
&lt;br /&gt;
14E|Houses|Decide drawing default foundations&lt;br /&gt;
&lt;br /&gt;
14F|Houses|Disable autosloping&lt;br /&gt;
&lt;br /&gt;
150|Airport tiles|Decide drawing default foundations&lt;br /&gt;
&lt;br /&gt;
152|Airport tiles|Animation control (OpenTTD &amp;amp;gt; r19197)&lt;br /&gt;
&lt;br /&gt;
153|Airport tiles|Next Animation frame (OpenTTD &amp;amp;gt; r19197)&lt;br /&gt;
&lt;br /&gt;
154|Airport tiles|Length of animation frame (OpenTTD &amp;amp;gt; r19197)&lt;br /&gt;
&lt;br /&gt;
155|Airports|Extra information about airport layout in the build gui (OpenTTD &amp;amp;gt; r20372)&lt;br /&gt;
&lt;br /&gt;
156|Airports|Airport layout name (OpenTTD &amp;amp;gt; r20373)&lt;br /&gt;
&lt;br /&gt;
157|Objects|Land slope check&lt;br /&gt;
&lt;br /&gt;
158|Objects|Next animation frame&lt;br /&gt;
&lt;br /&gt;
159|Objects|Animation control&lt;br /&gt;
&lt;br /&gt;
15A|Objects|Length of animation frame&lt;br /&gt;
&lt;br /&gt;
15B|Objects|Decide colour of building&lt;br /&gt;
&lt;br /&gt;
15C|Objects|Show additional text in fund window&lt;br /&gt;
&lt;br /&gt;
15D|Objects|Disable autosloping||&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt; Generic callbacks are called for the feature, not any specific vehicle ID. Read the [[Action3#n%2Did|Action 3]] entry on how to define these.&lt;br /&gt;
&lt;br /&gt;
==Powered wagon callback (10)==&lt;br /&gt;
&lt;br /&gt;
This callback is used to determine whether a wagon is powered (adding power and weight to the train) and what visual effect to use for the wagon. It only applies if the wagon would by default be powered (i.e. property 1B is set), and is only called when loading a game, when the train reverses, or when rearranging the train in a depot. &amp;amp;nbsp;If the callback fails for any reason (e.g. not defined, action 2 does not return callback result etc.), the value of property 22 is used instead. &amp;amp;nbsp;For possible return values, refer to [[Action0Trains#Visual_effects_and_wagon_power_22_|train property 22]].&lt;br /&gt;
&lt;br /&gt;
==Wagon length callback (11)==&lt;br /&gt;
&lt;br /&gt;
This callback is used instead of [[Action0Trains#Shorter_train_vehicles_21_|property 21]] whenever the train leaves a depot or is displayed inside a depot. If the callback fails, the value of property 21 is used instead.&lt;br /&gt;
&lt;br /&gt;
Road vehicles do not have a property for this purpose. If the callback fails, a length of 8/8 is used.&lt;br /&gt;
&lt;br /&gt;
The callback result may change only when whole vehicle chain is inside a depot.&lt;br /&gt;
&lt;br /&gt;
==Load amount callback (12)==&lt;br /&gt;
&lt;br /&gt;
This callback is used instead of [[Action0General#Load_amount|property 07]] when loading a game or rearranging a train in a depot (or when buying other vehicles). If the callback fails, the value of property 07 is used instead.&lt;br /&gt;
&lt;br /&gt;
Note: For aircraft carrying both passengers and mail this callback is broken (wrt. mail) in TTDP and OTTD before r14672.&lt;br /&gt;
&lt;br /&gt;
Since OTTD r14672 the callback is called for passengers and for mail. The mail compartment behaves like a wagon attached to a train engine. I.e. to read general variables of the aircraft you have to use varaction2 type 82/86/8A (related object), as most variables are not valid for the mail compartment.&lt;br /&gt;
&lt;br /&gt;
Finally to distinguish the passenger and the mail part you can use variable 47 or even 40.&lt;br /&gt;
&lt;br /&gt;
==Station availability callback (13)==&lt;br /&gt;
&lt;br /&gt;
This sets whether a station can be constructed or not, i.e. whether it can be selected in the station construction window. &amp;amp;nbsp;A non-zero callback return indicates the station can be built, and a return code of zero removes the station from the selection.&lt;br /&gt;
&lt;br /&gt;
==Station sprite layout (14)==&lt;br /&gt;
&lt;br /&gt;
Callback 14 selects an entry from the sprite layout (set by [[Action0Stations#Sprite_layout_09_|prop. 09]] or the default if unset), and if its return value is invalid then the sprite layout given from the tile type will be used. &amp;amp;nbsp;You can use this to have more than 4 different sprite sets to choose from.&lt;br /&gt;
&lt;br /&gt;
Bit 0 (station orientation) of the return value is ignored, and instead set to bit 0 of the actual tile, so that you do not have to check the orientation explicitly and return the two corresponding values, instead just organize the layouts such that even numbers correspond to X orientation (NE-SW) and odd numbers corresponding to Y orientation (NW-SE).&lt;br /&gt;
&lt;br /&gt;
The effect is like having additional tile types that are however not actually built, but only show different graphics depending on this callback.&lt;br /&gt;
&lt;br /&gt;
==Refitted capacity callback (15)==&lt;br /&gt;
&lt;br /&gt;
This callback is used when a vehicle is refitted, to find the new capacity. It is a 15 bit callback since 2.0.1 alpha 40, and allows return values up to 7EFF=32511 units of cargo.&lt;br /&gt;
&lt;br /&gt;
Vehicle variable B9 (for a variational action 2) will be set to the new, climate-specific cargo type (column 3, type B in the [[CargoTypes|cargo type list]]), or to FF when only checking whether the vehicle is refittable.&lt;br /&gt;
&lt;br /&gt;
Unlike regular refitted capacities (including those from callback 36), the return value is not subject to the usual division of capacities for cargoes other than passengers on trains and planes, instead the capacity is used exactly as returned by the callback. See also the summary page about &amp;amp;nbsp;[[VehicleRefitting|vehicle refitting]].&lt;br /&gt;
&lt;br /&gt;
==Articulated engine callback (16)==&lt;br /&gt;
&lt;br /&gt;
This allows building articulated engines or wagons, i.e. vehicles made from several individual vehicles. &amp;amp;nbsp;If this callback is in use, additional vehicles will be added until the callback returns FF.&lt;br /&gt;
&lt;br /&gt;
The callback return is interpreted as the ID of the vehicle to add. &amp;amp;nbsp;If 80 is added to the ID, the vehicle will be reversed (as if Ctrl was held while bought).&lt;br /&gt;
&lt;br /&gt;
Note that since the train is not yet built, you cannot use train variables in action 2. Instead, use variable 10 (extra callback info 1), which is set to 01 for the first articulated part, 02 for the second and so on.&lt;br /&gt;
&lt;br /&gt;
If more than the first vehicle contains cargo, the callback must work in the buy menu as well. (This is only supported since 2.5 beta 8.) &amp;amp;nbsp;This means that it will be called with cargo type FF in the action 3. Otherwise, the cargo amount shown in the buy menu will only be for the first part of the articulated vehicle.&lt;br /&gt;
&lt;br /&gt;
In OpenTTD the cargo class of the first road vehicles is used to determine whether the vehicle can stop at bus or truck stops regardless of the capacity of the first vehicle. If the cargo class bit for passengers is set it can go to bus stops when the is not set it can go to truck stops. See also the page about &amp;amp;nbsp;[[VehicleRefitting|vehicle refitting]].&lt;br /&gt;
&lt;br /&gt;
==House construction check (17)==&lt;br /&gt;
&lt;br /&gt;
This callback is used to determine if the given building type can be built on a position. It should return a nonzero value to allow building and zero to cancel it.&lt;br /&gt;
&lt;br /&gt;
Since the building is not created yet, you can&#039;t use variables 40 and 41 (they return zero). You can use variable 42, 43, 44, 45 and all town variables, though. Since OpenTTD r19744 you can also access the random bits via RandomAction2 or variable 5F.&lt;br /&gt;
&lt;br /&gt;
Property 0A and 13 are checked even if the callback returns a nonzero value; they can cancel building as well.&lt;br /&gt;
&lt;br /&gt;
For multi-tile buildings, this callback is always called for the north tile type, but the position you can access through variables 40, 42 and 43 is not guaranteed to be the final position of the north tile. It is guaranteed, though, that if the building really gets built, one of its tiles will occupy that tile. So, for example, if you return zero for desert tiles, this neither means that your building won&#039;t occupy any desert tiles, nor that its north tile will be on a non-desert tile; it only means that at least one tile of the building will be on a non-desert tile. (e.g. it can still be built on the very edge of a desert) This restriction was removed in OTTD r13489, the callback is now called for the final position of the north tile.&lt;br /&gt;
&lt;br /&gt;
==AI construction/purchase selection (18)==&lt;br /&gt;
&lt;br /&gt;
This generic feature callback is called for various decisions when the AI is constructing a new route. For example, normally the AI has a hardcoded list of wagons for each cargo type, but with this callback you can make the selection depend on source and destination industries as well as service distance among other things.&lt;br /&gt;
&lt;br /&gt;
Since the vehicle hasn&#039;t been bought yet, you cannot use the usual 40+x or 80+x vehicle variables, instead you have the following:&lt;br /&gt;
&lt;br /&gt;
||Variable|Size|Content&lt;br /&gt;
&lt;br /&gt;
80|B|cargo type (climate specific, column 3, type B in the [[CargoTypes|cargo type list]])&lt;br /&gt;
&lt;br /&gt;
81|B|cargo type (climate independent, column 1, type A in the [[CargoTypes|cargo type list]])&lt;br /&gt;
&lt;br /&gt;
82|B|default selection&lt;br /&gt;
&lt;br /&gt;
83|B|source [[IndustryTypes|industry type]]. For new industries the substitute type is returned starting with OpenTTD r20108.&lt;br /&gt;
&lt;br /&gt;
84|B|destination [[IndustryTypes|industry type]]. For new industries the substitute type is returned starting with OpenTTD r20108.&lt;br /&gt;
&lt;br /&gt;
85|B|distance between source and destination, in (dx+dy)/2&lt;br /&gt;
&lt;br /&gt;
86|B|AI construction event&lt;br /&gt;
&lt;br /&gt;
87|B|Construction number; for wagons: number of wagon; for stations 0=source station, 1=destination station&lt;br /&gt;
&lt;br /&gt;
88|B|Station size in form NL; N=number of platforms, L=length&lt;br /&gt;
&lt;br /&gt;
40|D|xxxxxxTT, TT=cargo slot from cargo translation table or same as var.81 if no table, available since r1167/2.5b9||&lt;br /&gt;
&lt;br /&gt;
The callback will be called for following construction events, stored in variable 86:&lt;br /&gt;
&lt;br /&gt;
||Group|Feature|Var.86|Type|Description&lt;br /&gt;
&lt;br /&gt;
Trains|00|00|Check|Regular rail engine&lt;br /&gt;
&lt;br /&gt;
| |01|Check|Electric rail engine&lt;br /&gt;
&lt;br /&gt;
| |02|Check|Monorail engine&lt;br /&gt;
&lt;br /&gt;
| |03|Check|Maglev engine&lt;br /&gt;
&lt;br /&gt;
| |08|Get|Regular rail wagon&lt;br /&gt;
&lt;br /&gt;
| |09|Get|Electric rail wagon&lt;br /&gt;
&lt;br /&gt;
| |0A|Get|Monorail wagon&lt;br /&gt;
&lt;br /&gt;
| |0B|Get|Maglev wagon&lt;br /&gt;
&lt;br /&gt;
| |0F|Get|Track type to build&lt;br /&gt;
&lt;br /&gt;
Road Vehicles|01|00|Check|Road vehicle&lt;br /&gt;
&lt;br /&gt;
| |01|Get|First road vehicle ID to try&lt;br /&gt;
&lt;br /&gt;
| |02|Get|Number of road vehicles to try&lt;br /&gt;
&lt;br /&gt;
Ships|02|00|Check|Ship&lt;br /&gt;
&lt;br /&gt;
| |01|Get|First ship ID to try&lt;br /&gt;
&lt;br /&gt;
| |02|Get|Number of ships to try&lt;br /&gt;
&lt;br /&gt;
Aircraft|03|00|Check|Aircraft&lt;br /&gt;
&lt;br /&gt;
Stations|04|00|Get|Station ID||&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
*&amp;amp;quot;Check&amp;amp;quot; means to check if it should try to buy this vehicle (with ID in var.82). Return 00 to disallow purchase, or a non-zero value to allow it. If allowed, the computer will buy the highest-cost (or AI rank for train engines) vehicle it can find that is available and has high enough reliability.&lt;br /&gt;
*&amp;amp;quot;Get&amp;amp;quot; means to find out which ID (etc.) to use. The default in var.82 is what it will use if the callback fails.&lt;br /&gt;
*For train engines and aircraft, the AI always checks all available engines.&lt;br /&gt;
*For road vehicles and ships, the AI has a built-in list of vehicles to try, you can use callback event 01 and 02 to change that list.&lt;br /&gt;
*For trains, the track types (0=regular, 1=electric, 2=monorail, 3=maglev) are automatically mapped as appropriate depending on the electrifiedrailways/unifiedmaglev switches. For best results, assume that all four are available. The game will then use the correct one if it is not available.&lt;br /&gt;
&lt;br /&gt;
This callback is &amp;amp;quot;chained&amp;amp;quot;, i.e. if a result is not a callback result (high bit is not set), then the request is passed on to the previous generic callback handler, i.e. they are checked in reverse order. This makes it possible to leave certain decisions to the previous handler and allows some cooperation between several .grf files.&lt;br /&gt;
&lt;br /&gt;
==Cargo Subtype Display (19)==&lt;br /&gt;
&lt;br /&gt;
This callback allows you to display some text after the cargo name when refitting, and in the vehicle capacity display. This is useful to distinguish several subtypes of a certain cargo, e.g. goods could be cars, petroleum, sheet metal etc.&lt;br /&gt;
&lt;br /&gt;
The return value must be the number of a D0xx string set by an action 4 in the same .grf file. &amp;amp;nbsp;For example, if you set text ID D006 to some text, return 06 in this callback will make it displayed after the cargo name.&lt;br /&gt;
&lt;br /&gt;
Normally, you would use the vehicle refit cycle/sub type variable F2 to distinguish the various subtypes. &amp;amp;nbsp;During refitting, the callback is called with successively increased values of variable F2, until the callback returns FF. &amp;amp;nbsp;All the returned variations are then displayed as refitting options, with all options that have the same cargo type and callback result (irrespective of refit cycle) grouped together in the same line.&lt;br /&gt;
&lt;br /&gt;
==Next animation frame (1A/26/141/153/158)==&lt;br /&gt;
&lt;br /&gt;
Called in every animation frame, this callback returns the number of the next frame to display. Additionally, it can return these special values:&lt;br /&gt;
&lt;br /&gt;
||Value|Meaning&lt;br /&gt;
&lt;br /&gt;
FF|stop animation. The current frame stays on screen until the animation is restarted.&lt;br /&gt;
&lt;br /&gt;
FE|continue with next frame as usual. You can return this for stages where you don&#039;t want to do anything special.||&lt;br /&gt;
&lt;br /&gt;
From TTDPatch 2.5 beta 2, you can ask for random bits in variable 10. To enable this, set bit 3 of property 19 for houses, bit 0 of property 12 for industry tiles, or bit 2 of property 13 for stations.&lt;br /&gt;
&lt;br /&gt;
Additionally all animation callbacks also allow to trigger sound effects as described in [[Callbacks#Watched_cargo_accepted_148_|Callback 148]].&lt;br /&gt;
&lt;br /&gt;
==Animation control (1B/25/140/152/159)==&lt;br /&gt;
&lt;br /&gt;
Called periodically, in a time interval specified in property 16 (houses) or when an animation trigger happens (industry tiles and stations). Returns the number of the frame the animation should jump to, or one of the following special values:&lt;br /&gt;
&lt;br /&gt;
||Value|Meaning&lt;br /&gt;
&lt;br /&gt;
FF|stop animation in its current frame&lt;br /&gt;
&lt;br /&gt;
FE|start animation with its current frame&lt;br /&gt;
&lt;br /&gt;
FD|leave the animation in its current state (do nothing)||&lt;br /&gt;
&lt;br /&gt;
For multi-tile town buildings, [[Action0Houses#Extra_Flags_19_|property 19/bit 2]] modifies this callback slightly, see details there.&lt;br /&gt;
&lt;br /&gt;
For industry tiles and stations, the low byte of variable 18 contains the reason for the call, i.e. the bit number of the event from [[Action0IndustryTiles#Triggers_for_callback_25_11_|property 11]] or [[Action0Stations#Animation_triggers_18_|property 18]], accordingly.&lt;br /&gt;
&lt;br /&gt;
Unlike callback 1B, callbacks 25, 140 and 159 are always used when defined, no bit in the action 0 property needs to be set to activate them.&lt;br /&gt;
&lt;br /&gt;
Since TTDPatch 2.5 beta 2, this callback gets random bits in variable 10, to allow randomizing changes.&lt;br /&gt;
&lt;br /&gt;
For callback 1B, the exact randomness depends on bit 2 of property 19 (synchronized callback 1B). If the callback is synchronized, the high 16 bits will be the same for all tiles and the low 16 bits will be different for each tile. Otherwise, all 32 bits will be independent for each tile.&lt;br /&gt;
&lt;br /&gt;
For callback 25, the randomness depends on the type of the event. For triggers that happen for the whole industry (triggers 2, 3 and 4), the high 16 bits will be the same for all tiles, while the low 16 bits will be different. For other triggers, all 32 bits are independent.&lt;br /&gt;
&lt;br /&gt;
For callback 140, the high 16 bits are the same for all tiles triggered, while the low 16 bits are different for each tile.&lt;br /&gt;
&lt;br /&gt;
Additionally all animation callbacks also allow to trigger sound effects as described in [[Callbacks#Watched_cargo_accepted_148_|Callback 148]].&lt;br /&gt;
&lt;br /&gt;
==Construction stage changes (1C)==&lt;br /&gt;
&lt;br /&gt;
Called when the building changes its construction stage (during normal gameplay, that means exactly four times). Can return the same values as callback 1B. Variable 40 contains the new stage. You can return FF for stages that don&#039;t have animated graphics to save resources.&lt;br /&gt;
&lt;br /&gt;
==Watched cargo accepted (148)==&lt;br /&gt;
&lt;br /&gt;
Called when a cargo type specified in property 20 is accepted by a house tile, or to be more specific, in a station that has the house tile in its acceptance area. It will be called for each tile of a multi-tile building whenever a tile with property 20 accepts cargo. This means if more than one tile has cargoes specified in property 20, the callback can be called multiple times on the same tile in the same tick. The low word of variable 18 contains the offset of the trigger tile relative to the current tile; the low byte contains the X offset, the high byte the Y offset. (0 means it&#039;s the same tile, negative coordinates mean it&#039;s northward, positive southward.) With this, you can tell apart the callings within the same tick. The high word of variable 18 contains random bits, the bits are the same for each tile of multi-tile buildings. The return values can be the same as for callback 1B.&lt;br /&gt;
&lt;br /&gt;
Due to implementation details, up to 250 game ticks can pass between the actual acceptance and triggering this callback.&lt;br /&gt;
&lt;br /&gt;
This callback isn&#039;t available if the station2 structure isn&#039;t present - see the property 20 entry for more information.&lt;br /&gt;
&lt;br /&gt;
If any of the above animation callbacks return a nonzero value in the high byte, it will be interpreted as a sound effect number, and the corresponding sound effect will be played on the house tile.&lt;br /&gt;
&lt;br /&gt;
==Can wagon be attached (1D)==&lt;br /&gt;
&lt;br /&gt;
This callback is called for the train engine (i.e. from the engine&#039;s action 3) when attaching a new vehicle to the current train and determines whether it may in fact be attached to the train. The callback is always used when defined, no bit in the action 0 property needs to be set to activate it.&lt;br /&gt;
&lt;br /&gt;
You may use variational action 2s to check variables 40+x and 80+x. For var. action 2 type 81 (vehicle), they refer to variables of the wagon that is to be attached, not the engine it is being attached to, so you can check the wagon&#039;s properties like the cargo type to see whether it is appropriate for the given train engine.&lt;br /&gt;
&lt;br /&gt;
Var. action 2 type 82 (engine) refers to the engine the wagon is being attached to, starting from version 2.0.1 alpha 46. This allows you to for example find out the length of the train it is being attached to. In earlier patch versions, it refers to the engine of the source consist (or the wagon if the wagon is not attached to anything else), which was not really helpful.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
&lt;br /&gt;
||Return|Meaning&lt;br /&gt;
&lt;br /&gt;
xx|Disallow attaching and use the D0xx text ID as second line of an error message,&lt;br /&gt;
&lt;br /&gt;
FD|Disallow attaching with the standard message (incompatible rail types)&lt;br /&gt;
&lt;br /&gt;
FE|Allow attaching&lt;br /&gt;
&lt;br /&gt;
FF|Allow attaching if the rail types match (default)||&lt;br /&gt;
&lt;br /&gt;
It you return FE, you would allow attaching for example a monorail wagon to a regular rail vehicle, so if that&#039;s not what you intend, return FF.&lt;br /&gt;
&lt;br /&gt;
==Building colour (1E)==&lt;br /&gt;
&lt;br /&gt;
Called to decide what colour mapping the building should use. Should return the number of the colour mapping to be used, for example, 775 for blue-&amp;amp;gt;dark blue mapping.&lt;br /&gt;
&lt;br /&gt;
This can be useful if you want something more complex than four random colours.&lt;br /&gt;
&lt;br /&gt;
From 2.0.1 alpha 67, you can return a value of col2*16+col1 plus bit 14 set, where col1 and col2 are two company colours. For example, a return value of 73 C0 uses col1=3=yellow and col2=7=dark green. If no two-company-colour maps have been installed, the colours from prop. 17 are used instead.&lt;br /&gt;
&lt;br /&gt;
Uses 15 return bits.&lt;br /&gt;
&lt;br /&gt;
==Cargo acceptance (1F)==&lt;br /&gt;
&lt;br /&gt;
Called to decide what the building tile can accept. Uses 15 return bits. The returned word should have the layout of Sgmp, where the letters mean the following:&lt;br /&gt;
&lt;br /&gt;
||Symbol|Meaning&lt;br /&gt;
&lt;br /&gt;
S|1 if the building should accept food/fizzy drinks instead of goods&lt;br /&gt;
&lt;br /&gt;
g|If S is 1, the food acceptance in 1/8 units&lt;br /&gt;
&lt;br /&gt;
|If S is 0, the goods acceptance in 1/8 units&lt;br /&gt;
&lt;br /&gt;
m|mail acceptance in 1/8 units&lt;br /&gt;
&lt;br /&gt;
p|passenger acceptance in 1/8 units||&lt;br /&gt;
&lt;br /&gt;
So, for example, giving the ID 8426h means &amp;amp;quot;4/8 goods, 2/8 mail, 6/8 passenger&amp;amp;quot;, while giving the ID 9205 means &amp;amp;quot;2/8 food, 5/8 passenger&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If property 1E and/or callback 2A is used, the meaning changes slightly. In this case, p means the acceptance of the first cargo type given, m means the same for the second cargo type, and g is the same for the third cargo type, while S must be zero.&lt;br /&gt;
&lt;br /&gt;
==Length of animation frame (20/27/142/154/15A)==&lt;br /&gt;
&lt;br /&gt;
Called to decide how long the current animation frame should last. The value of the delay should be given in the same way as for property 1B/10/17. Decreasing the return value speeds the animation up instantly. Increasing, on the other hand, doesn&#039;t slow it down instantly: the actual duration of the current frame will be somewhere between the old and the new delays. The new delay is applied correctly for later frames.&lt;br /&gt;
&lt;br /&gt;
Note: This is one of the most time consuming callbacks as it is called for every animated tile every &amp;amp;asymp;30 milliseconds. For better performance try to avoid using it where reasonable, e.g. try to use only the properties and put multiple identical looking animation frames after each other.&lt;br /&gt;
&lt;br /&gt;
==Trigger building destruction (21)==&lt;br /&gt;
&lt;br /&gt;
Called periodically, in a time interval specified by property 16. If it returns a nonzero value, the building gets removed from the map as if the town decided to destroy it. You can use this for example to remove a historical building, since those cannot be normally removed by towns.&lt;br /&gt;
&lt;br /&gt;
==Industry availability (22)==&lt;br /&gt;
&lt;br /&gt;
Called when TTDPatch needs to know if a given industry type is available.&lt;br /&gt;
&lt;br /&gt;
Return zero to make your type available, or any nonzero value to disable it. This callback is intended for limiting your type as a whole, so you can&#039;t access any industry-specific variables, just the global ones. A good example for the use of this callback is a nuclear power plant that isn&#039;t allowed to appear before 1970.&lt;br /&gt;
&lt;br /&gt;
During this callback, variable 18 (extra callback info 2) can contain the following values:&lt;br /&gt;
&lt;br /&gt;
||Variable 18|Meaning&lt;br /&gt;
&lt;br /&gt;
0|TTD is generating a map and needs to know if your type can appear.&lt;br /&gt;
&lt;br /&gt;
1|TTD decided to build a new random industry during regular gameplay and needs to know if it can choose your type.&lt;br /&gt;
&lt;br /&gt;
2|The user tries to build/prospect for your industry via the new industry window. TTD needs to know if the player is allowed to do this.||&lt;br /&gt;
&lt;br /&gt;
==Additional text in purchase screen (23)==&lt;br /&gt;
&lt;br /&gt;
This callback is called when TTDPatch displays the vehicle stats of any vehicle in its purchase screen. The return value is the &amp;amp;quot;xx&amp;amp;quot; of a D0xx text ID to be shown below all other stats. The callback is always used when defined, no bit in the action 0 property needs to be set to activate it. As of r1908, text IDs D100..D3FF may also be returned.&lt;br /&gt;
&lt;br /&gt;
How many lines are available depends on the type of vehicle and its other properties, for instance the presence or absence of a &amp;amp;quot;refittable to&amp;amp;quot; line or powered wagons etc. Lines are wrapped automatically, or may be broken explicitly using the newline character 0D.&lt;br /&gt;
&lt;br /&gt;
This callback is used always and does not need setting a bit in the action 0 property to activate it.&lt;br /&gt;
&lt;br /&gt;
==Custom station layout (24)==&lt;br /&gt;
&lt;br /&gt;
After applying the values from station prop. 0E, this callback is used to further customize the tile layout.&lt;br /&gt;
&lt;br /&gt;
It is called once for every tile that is being built, and returns the new tile type to build in its place or to leave the tile as defined by prop. 0E or TTD&#039;s default if the callback fails. The only possible return values are 00, 02, 04 and 06. Their meaning is the same as in prop. 0E.&lt;br /&gt;
&lt;br /&gt;
Since the station hasn&#039;t yet been built, variables 40+x and 80+x are not available, instead variable 10 (extra callback info 1) contains the same information as variable 41 would contain. For the same reason, it uses the same cargo type in action 3 as the construction menu does (i.e., type FF if defined or else the default).&lt;br /&gt;
&lt;br /&gt;
This callback is used always and does not need setting a bit in the action 0 property to activate it.&lt;br /&gt;
&lt;br /&gt;
==Industry location permissibility (28)==&lt;br /&gt;
&lt;br /&gt;
Called to decide if the industry can be built on a given spot. Since the industry isn&#039;t built yet, you can only use a small subset of the data: you can access the data of the nearest town via action 2/type 82 without any problems, but action 2/type 81 will access different variables than it would normally access:&lt;br /&gt;
&lt;br /&gt;
||Variable|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|Meaning&lt;br /&gt;
&lt;br /&gt;
40+x| |Not accessible&lt;br /&gt;
&lt;br /&gt;
5F| |Since OpenTTD r19744: Random bits the industry starts with after construction. Accessible via RandomAction2 as well.&lt;br /&gt;
&lt;br /&gt;
60+x| |Only var. 62 and vars 64..68 can be used&lt;br /&gt;
&lt;br /&gt;
80|W|Coordinates of the selected position&lt;br /&gt;
&lt;br /&gt;
86|B|Number of the selected layout, according to property 0A&lt;br /&gt;
&lt;br /&gt;
87|B|Ground type of the selected spot (see [[VarAction2Canals|canal variable 81]] for details)&lt;br /&gt;
&lt;br /&gt;
88|B|Town zone of the selected spot (see [[VarAction2Houses#Town_zone_42_|house variable 42]] for details)&lt;br /&gt;
&lt;br /&gt;
89|B|Distance between the closest town and the selected position.&lt;br /&gt;
&lt;br /&gt;
8A|B|Height of the lowest corner of the tile (between 00h and 80h, one land height unit equals 8 units)&lt;br /&gt;
&lt;br /&gt;
8B|W|Distance to the closest water tile if property 1A bit 2 is clear (built on land); distance to the closest empty dry land tile if property 1A bit 2 is clear (built on water)&lt;br /&gt;
&lt;br /&gt;
8D|W|Square of the Euclidean distance between the closest town and the selected position&lt;br /&gt;
&lt;br /&gt;
8F|D|32 random bits (since r1816 and r11985)||&lt;br /&gt;
&lt;br /&gt;
Unless explicitly noted, distances are Manhattan distance, not Euclidean distance, ie. -+|x-x0|+|y-y0|+- instead of -+&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;sqrt[[Action11|Action 11]]. If the callback returns a failure code (not a callback result), the default TTD sound effect will be played. If the callback returns a sound number that is neither a TTD sound, nor a sound from action 11, nothing will be played.&lt;br /&gt;
&lt;br /&gt;
||Var. 10|Event&lt;br /&gt;
&lt;br /&gt;
1|Start sound, called when leaving a station or depot, take-off sound for planes&lt;br /&gt;
&lt;br /&gt;
2|Tunnel sound, called when vehicle enters tunnel&lt;br /&gt;
&lt;br /&gt;
3|Breakdown sound, called when vehicle breaks down (not for planes)&lt;br /&gt;
&lt;br /&gt;
4|Running sound, called once per engine tick, but no more than once per vehicle motion&lt;br /&gt;
&lt;br /&gt;
5|Touchdown sound, for planes only (obviously)&lt;br /&gt;
&lt;br /&gt;
6|Train visual effect generation (steam plume, diesel smoke, electric spark)&lt;br /&gt;
&lt;br /&gt;
7|Running sound, called every 16 engine ticks if in motion&lt;br /&gt;
&lt;br /&gt;
8|Stopped sound, called every 16 engine ticks if stopped (e.g. at signal/in station)&lt;br /&gt;
&lt;br /&gt;
9|Load/unload sound, called when consist loads or unloads cargo&lt;br /&gt;
&lt;br /&gt;
10|Bridge sound, called as generic feature 06 callback every time a consist moves on a bridge. Variables 40+x, 60+x and 80+x refer to the vehicle and bits 0..7 of variable 18 hold the bridge type||&lt;br /&gt;
&lt;br /&gt;
For the running sounds, it is advisable to check the [[VarAction2Vehicles#Motion_counter_46_|motion counter]] and to only return a successful sound effect number every so many vehicle motion ticks. This way, the sounds will be played more frequently the faster the train is. Alternatively, you can check the tick counter variable and play the sound effect every so many engine ticks, so that it is played at a constant rate, or, of course, switch between both modes depending on vehicle speed.&lt;br /&gt;
&lt;br /&gt;
Note that if the planespeed switch is active, planes move the given number of times per engine tick. This means that their motion counter increases faster than for other vehicles, and thus to get reliable sound effects you need to divide the motion counter by the planespeed setting (readable via [[ActionDSpecialVariables#Reading_patch_variables|action D]]) before checking the value.&lt;br /&gt;
&lt;br /&gt;
==Autoreplace vehicle selection (34)==&lt;br /&gt;
&lt;br /&gt;
This callback is called whenever an old vehicle needs replacing. It returns the vehicle IDs to upgrade the current vehicle to. The vehicle variables are available as usual to decide which IDs would be appropriate to upgrade to.&lt;br /&gt;
&lt;br /&gt;
The callback is repeatedly called, with the iteration number stored in variable 10. &amp;amp;nbsp;The .grf file should return all possible IDs one by one, with the best ones listed first. &amp;amp;nbsp;The patch will use the first vehicle from the list that is available to the player and has the required minimum reliability as set by the autoreplace switch, and abort the callback sequence at this point.&lt;br /&gt;
&lt;br /&gt;
The callback sequence is also aborted when the returned ID is equal to the current vehicle ID. This is to prevent downgrading, and so you must take care to always return the ID of the vehicle for which the callback is called at the appropriate place in the sequence.&lt;br /&gt;
&lt;br /&gt;
If the callback fails, i.e. if no suitable ID could be found by any of the callbacks in the generic chain, the vehicle is not upgraded, and is simply renewed instead. &amp;amp;nbsp;If an ID is available but the player lacks the cash to upgrade, the patch waits for the cash to become available instead of either picking a worse engine or renewing the vehicle.&lt;br /&gt;
&lt;br /&gt;
For trains, each engine head will be replaced by one vehicle of the new type. &amp;amp;nbsp;As such, it is advisable for only return &amp;amp;quot;compatible&amp;amp;quot; IDs for trains that require a particular construction or arrangement of engine heads.&lt;br /&gt;
&lt;br /&gt;
The callback is always used when defined, no bit in the action 0 property needs to be set to activate it.&lt;br /&gt;
&lt;br /&gt;
==Monthly random production change (35)==&lt;br /&gt;
&lt;br /&gt;
Works exactly the same way as callback 29, except that it&#039;s called every month, allowing more frequent production changes.&lt;br /&gt;
&lt;br /&gt;
==Change vehicle properties (36)==&lt;br /&gt;
&lt;br /&gt;
This common callback allows modification of certain properties of a vehicle for which there exists no specific callback (like CBs 10, 11, 12). The low byte of variable 10 holds the [[Action0|property]] number from Action 0.&lt;br /&gt;
&lt;br /&gt;
The following properties are supported:&lt;br /&gt;
&lt;br /&gt;
||Feature|Property|Minimum version|OpenTTD rev|&lt;br /&gt;
&lt;br /&gt;
Trains (00)|&#039;&#039;07 (Load amount)&#039;&#039;| - | - |&#039;&#039;Changeable via [[Callbacks#Load_amount_callback_12_|callback 12]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|09 (Speed)|2.5 beta 6|r9671|&lt;br /&gt;
&lt;br /&gt;
|0B (Power)|2.5 beta 6|r9671|&lt;br /&gt;
&lt;br /&gt;
|0D (Running cost factor)|2.6 rev 1420|r9671|&lt;br /&gt;
&lt;br /&gt;
|14 (Cargo capacity)|2.6 rev 1966|r9828|See also [[Callbacks#Refitted_capacity_callback_15_|callback 15]]&lt;br /&gt;
&lt;br /&gt;
|16 (Weight)|2.6 rev 1887|r9780|&lt;br /&gt;
&lt;br /&gt;
|17 (Cost factor)| |r9806|&lt;br /&gt;
&lt;br /&gt;
|1F (Tractive effort)|2.5 beta 6|r9671|&lt;br /&gt;
&lt;br /&gt;
|&#039;&#039;21 (Short wagons)&#039;&#039;| - | - |&#039;&#039;Changeable via [[Callbacks#Wagon_length_callback_11_|callback 11]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|&#039;&#039;22 (Visual effect &amp;amp; powered wagons)&#039;&#039;| - | - |&#039;&#039;Changeable via [[Callbacks#Powered_wagon_callback_10_|callback 10]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|25 (User data)|2.5 beta 6|r11431|&lt;br /&gt;
&lt;br /&gt;
Road Vehicles (01)|&#039;&#039;07 (Load amount)&#039;&#039;| - | - |&#039;&#039;Changeable via [[Callbacks#Load_amount_callback_12_|callback 12]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|09 (Running cost factor)| |r18011|&lt;br /&gt;
&lt;br /&gt;
|0F (Cargo capacity)| |r9828|See also [[Callbacks#Refitted_capacity_callback_15_|callback 15]]&lt;br /&gt;
&lt;br /&gt;
|11 (Cost factor)| |r9806|&lt;br /&gt;
&lt;br /&gt;
Ships (02)|&#039;&#039;07 (Load amount)&#039;&#039;| - | - |&#039;&#039;Changeable via [[Callbacks#Load_amount_callback_12_|callback 12]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|0A (Cost factor)| 2.6 rev 1990 |r9806|&lt;br /&gt;
&lt;br /&gt;
|0B (Speed)|2.5 beta 6|r9671|&lt;br /&gt;
&lt;br /&gt;
|0D (Cargo capacity)| 2.6 rev 1990 |r9828|See also [[Callbacks#Refitted_capacity_callback_15_|callback 15]]&lt;br /&gt;
&lt;br /&gt;
|0F (Running cost factor)| 2.6 rev 1510 |r9808|&lt;br /&gt;
&lt;br /&gt;
Planes (03)|&#039;&#039;07 (Load amount)&#039;&#039;| - | - |&#039;&#039;Changeable via [[Callbacks#Load_amount_callback_12_|callback 12]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|0B (Cost factor)| |r9806|&lt;br /&gt;
&lt;br /&gt;
|0C (Speed)|2.5 beta 6|r9671|&lt;br /&gt;
&lt;br /&gt;
|0E (Running cost factor)|2.6 r1507|r9678|&lt;br /&gt;
&lt;br /&gt;
|0F (Passenger capacity)| |r19218|See also [[Callbacks#Refitted_capacity_callback_15_|callback 15]]&lt;br /&gt;
&lt;br /&gt;
|11 (Mail capacity)| |r19218| ||&lt;br /&gt;
&lt;br /&gt;
Most properties will only change when the vehicle is bought, serviced (enters a depot), visits a station or on loading of a saved game. Other ones such as TE are called every time a TE calculation is run.&lt;br /&gt;
&lt;br /&gt;
If the callback fails, the corresponding value from the action 0 property will be used. The callback is always used when defined, no bit in the action 0 property needs to be set to activate it.&lt;br /&gt;
&lt;br /&gt;
Before r1758 (both 2.5 and 2.6), callback 36 was sometimes called with the 40+x and 80+x variables unavailable when they should have been available, or with not all 80+x variables properly initialized, causing some 40+x variables to be unsafe.&lt;br /&gt;
&lt;br /&gt;
About the capacity properties see also the summary page about &amp;amp;nbsp;[[VehicleRefitting|vehicle refitting]].&lt;br /&gt;
&lt;br /&gt;
==Cargo sub-type display for industries (37)==&lt;br /&gt;
&lt;br /&gt;
This callback allows you to display some text after the cargo name in the industry fund window and in industry windows. Just like callback 19, the return value must be the number of a D0xx string set by an action 4 in the same .grf file. Returning FFh causes no text to be displayed.&lt;br /&gt;
&lt;br /&gt;
During the callback, the lowest byte of var. 18 can have the following values:&lt;br /&gt;
&lt;br /&gt;
||Number|Meaning&lt;br /&gt;
&lt;br /&gt;
00|Return subtext for first accepted cargo type&lt;br /&gt;
&lt;br /&gt;
01|Return subtext for second accepted cargo type&lt;br /&gt;
&lt;br /&gt;
02|Return subtext for third accepted cargo type&lt;br /&gt;
&lt;br /&gt;
03|Return subtext for first produced cargo type&lt;br /&gt;
&lt;br /&gt;
04|Return subtext for second produced cargo type||&lt;br /&gt;
&lt;br /&gt;
Bits 8..15 of var. 18 can have the following values:&lt;br /&gt;
&lt;br /&gt;
||Number|Meaning&lt;br /&gt;
&lt;br /&gt;
00|The text is to be displayed in the industry fund window. The industry isn&#039;t built yet, so you can&#039;t access the industry variables&lt;br /&gt;
&lt;br /&gt;
01|The text is to be displayed in the window of the industry. You can use the industry variables here.&lt;br /&gt;
&lt;br /&gt;
02|The text is to be displayed in the industry directory window. You can use the industry variables here.&lt;br /&gt;
&lt;br /&gt;
other values|Reserved for future use||&lt;br /&gt;
&lt;br /&gt;
Other bits of var. 18 are reserved for future use.&lt;br /&gt;
&lt;br /&gt;
Since OpenTTD r17802, the contents of registers 100h..105h are copied onto the text reference stack.&lt;br /&gt;
&lt;br /&gt;
==Show additional text in industry fund window (38/15C)==&lt;br /&gt;
&lt;br /&gt;
This callback allows you to display extra information in the industry fund window about your industry. The return value should be the number of a D0xx text to be displayed. The text must begin with a colouring special character and should not be longer than three lines (automatic line breaks are provided, but you can use char 0D for a manual line break). The industry isn&#039;t built yet, so you can&#039;t access any industry variables during this callback.&lt;br /&gt;
&lt;br /&gt;
Since OpenTTD r20086, the contents of registers 100h..105h are copied onto the text reference stack.&lt;br /&gt;
&lt;br /&gt;
{cookie}&lt;br /&gt;
&lt;br /&gt;
==Custom profit calculation for cargoes (39)==&lt;br /&gt;
&lt;br /&gt;
This callback is called every time cargo is delivered to a station, to get how much income the player should get. The low word of var. 18 contains the distance of the transfer, byte 3 contains the amount of cargo moved and the highest byte contains the time spent en-route (a unit of time is +185 ticks, or ca. 2.5 days). The result should be a signed multiplier that gets multiplied by the amount of cargo moved and the price factor, then gets divided by 8192. Since the highest bit must always be set for a callback result, TTDPatch checks for the second highest bit (bit 14) for the sign. Returning a negative value means that the player has to pay for the transfer instead of getting money from it. For example, the maximum returnable value of 16383 means that the player gets twice the price factor for every unit.&lt;br /&gt;
&lt;br /&gt;
==Show additional text in industry window (3A)==&lt;br /&gt;
&lt;br /&gt;
This callback allows you to display extra information in the industry window about the state of your industry. The return value should be the number of a D0xx text to be displayed. The text must begin with a colouring special character and should not be longer than one line. For example, you can use this callback to display the current production limit of a secondary industry.&lt;br /&gt;
&lt;br /&gt;
Note that since r11987, OpenTTD allows resizing the window when this callback is enabled. &amp;amp;nbsp;It allows to specify a text containing more than one line.&lt;br /&gt;
&lt;br /&gt;
Since TTDPatch 2.6 r1370, the contents of registers 100h..105h are copied onto the text reference stack. This allows you to display dynamically calculated values in the text by using the according StringCodes. Please note, though, that the text handler will see it as an array of bytes, not as an array of DWORDs, so you will have to pack two words into a register when you use codes that read words from the stack. In the case of \7D (which gets a byte), you may have to pack more into a register, but it&#039;s probably easier to use \7C instead. Please also note that you can use \80 to display textIDs calculated on the fly, but DCxx textIDs won&#039;t work correctly. When you need to choose from your own texts dynamically, you must use D0xx IDs, and add 400h to them. (That is, use D400 to refer to D000, D401 for D001 etc.)&lt;br /&gt;
&lt;br /&gt;
==Control special industry effects (3B)==&lt;br /&gt;
&lt;br /&gt;
This callback allows you to control some aspects of the special effects enabled in property 1A. The lowest byte of variable 18 always contains the number of the special effect, which equals to the bit number being set in property 1A. Currently only effect 0 (plant fields periodically) and effect 1 (cut nearby trees periodically) are supported.&lt;br /&gt;
* For effect 0 you should return zero to avoid planting fields and any other value to plant a field. The callback is called every 256 ticks for a given industry. Variable 10 contains 32 random bits that can be used to randomize the behaviour. Industry variable AAh (word) can be used to make the plantings rarer, but please note that the low byte is always zero at this point. The default behaviour is giving 1/8 chance to plant a new field every 256 ticks.&lt;br /&gt;
* For effect 1 you should return zero to avoid cutting a tree and any other value to try cutting one. The callback is called every 256 ticks for a given industry. You don&#039;t get random values this case, but you can still use variable AAh; the low byte is always zero here as well. The default behaviour is trying to cut a tree every 512 ticks.&lt;br /&gt;
&lt;br /&gt;
==Disable autosloping for industry tiles (3C/14F/15D)==&lt;br /&gt;
&lt;br /&gt;
With this callback, you can prevent the autoslope feature from altering the ground below the industry/house tiles. To allow altering the ground, return zero. Returning anything other than zero will disallow land modifications.&lt;br /&gt;
&lt;br /&gt;
==Opt out of accepting cargo (3D)==&lt;br /&gt;
&lt;br /&gt;
With this callback, the industry can refuse accepting a cargo even if it&#039;s one of the input cargo types. If there&#039;s another industry nearby that accepts this cargo, that one will get it.&lt;br /&gt;
&lt;br /&gt;
The lowest byte of var. 18 contains the ID of the cargo delivered. If your GRF has a cargo translation table installed, you will get the index from that table; otherwise, you will get the cargo bit associated with the cargo type. You must return zero if you don&#039;t want to accept the cargo, or 1 to accept it. Other return values are reserved for future use.&lt;br /&gt;
&lt;br /&gt;
This callback should be used in conjunction with callback 2B, since the acceptance of the tiles and the acceptance of the industry itself should always agree. If you disable accepting a cargo via callback 3D, but forget to remove the acceptance from the tiles, the station will keep accepting the cargo and the player will keep getting the money, but the industry won&#039;t receive the cargo. On the other hand, if you remove acceptance from the tiles, but forget using callback 3D, your industry may still get the cargo. (For example, there may be another industry nearby whose tiles accept the cargo. This makes the station accept the cargo, and send it to the nearest industry, which happens to be yours, even though its tiles don&#039;t accept the cargo.)&lt;br /&gt;
&lt;br /&gt;
==Protect building conditionally (143)==&lt;br /&gt;
&lt;br /&gt;
This callback is called when someone tries to remove the building from the map. You can use this callback to prevent the town or AI players from removing the building if certain conditions are met. You can return 0 to allow the destruction, or 1 to disallow it, except for human players, who can always remove any building.&lt;br /&gt;
&lt;br /&gt;
If you always return 1 from this callback, you achieve the same effect as turning on bit 1 of property 19. When this callback is enabled, bit 1 of property 19 is ignored. If the callback fails, the destruction is allowed.&lt;br /&gt;
&lt;br /&gt;
For multi-tile buildings, the callback will be called for the type of the tile the player wants to destroy. Therefore, to get consistent behaviour, you must enable this callback for every tile and respond it the same way no matter which tile it is called for.&lt;br /&gt;
&lt;br /&gt;
Since TTDPatch 2.6 r1705, you can use this callback to prevent building &amp;amp;quot;town&amp;amp;quot; industries (banks, water towers, etc.) over your house. The lowest byte of variable 10 is zero for &amp;amp;quot;normal&amp;amp;quot; demolition and one when TTD wants to remove the house for the sake of a new industry. Other values of variable 10 are reserved for future use.&lt;br /&gt;
&lt;br /&gt;
==Ambient sound effects (144)==&lt;br /&gt;
&lt;br /&gt;
This callback is a generic callback for feature 0C (new sounds) used for playing ambient sound effects.&lt;br /&gt;
&lt;br /&gt;
The 15-bit return value is the sound effect number. Values from 0 to 72 (dec) are TTD&#039;s built-in sound effects, values beyond that refer to the sounds from [[Action11|Action 11]].&lt;br /&gt;
&lt;br /&gt;
To decide whether to play a sound, and what sound to play, Var.Action 2 variable 10 holds the following information: THRRxxxt&lt;br /&gt;
&lt;br /&gt;
||Field|Meaning&lt;br /&gt;
&lt;br /&gt;
T|Tile class, 0=bare land, 4=trees, 6=water&lt;br /&gt;
&lt;br /&gt;
H|Height of north corner of tile&lt;br /&gt;
&lt;br /&gt;
RR|8 random bits&lt;br /&gt;
&lt;br /&gt;
xxx|Reserved&lt;br /&gt;
&lt;br /&gt;
t|Terrain type; &amp;amp;nbsp;0 normal (grass), 1 desert, 2 rainforest, 4 on or above snowline||&lt;br /&gt;
&lt;br /&gt;
This callback must be enabled by bit 4 in [[ActionD#Misc_GRF_Features_9E_|action D var 9E]].&lt;br /&gt;
&lt;br /&gt;
==Custom station rating calculation (145)==&lt;br /&gt;
&lt;br /&gt;
This callback allows you to modify part of the station cargo rating calculation for your cargo. To understand how to use it, you must first understand how the default rating calculation works:&lt;br /&gt;
&lt;br /&gt;
Internally, the station rating is stored in a byte, 0 meaning 0% and 255 meaning 100%. The rating is calculated as the sum of the following components:&lt;br /&gt;
* Time since the cargo was last picked up:&lt;br /&gt;
&lt;br /&gt;
||Time units (days)|Score (%, rounded)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;gt;21 (&amp;amp;gt;52.5 days)|0 (0%)&lt;br /&gt;
&lt;br /&gt;
13..21 (32.5 days..52.5 days)|25 (10%)&lt;br /&gt;
&lt;br /&gt;
7..12 (17.5 days..32.5 days)|50 (20%)&lt;br /&gt;
&lt;br /&gt;
4..6 (10 days..17.5 days)|95 (37%)&lt;br /&gt;
&lt;br /&gt;
0..3 (0 days..10 days)|130 (51%)||&lt;br /&gt;
&lt;br /&gt;
The time unit used equals 185 engine ticks, or 2.5 TTD days. For ships, the time units are divided by 4 before calculating this component, so ships have four times more time before the ratings start dropping.&lt;br /&gt;
* Amount of cargo waiting:&lt;br /&gt;
&lt;br /&gt;
||Amount of cargo|Score (%, rounded)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;gt;1500|-90 (-35%)&lt;br /&gt;
&lt;br /&gt;
1001..1500|-35 (-14%)&lt;br /&gt;
&lt;br /&gt;
601..1000|0 (0%)&lt;br /&gt;
&lt;br /&gt;
301..600|10 (4%)&lt;br /&gt;
&lt;br /&gt;
101..300|30 (12%)&lt;br /&gt;
&lt;br /&gt;
0..100|40 (16%)||&lt;br /&gt;
* Max. speed of the last vehicle picking up the cargo:&lt;br /&gt;
&lt;br /&gt;
This calculation is somewhat complicated. The maximum speed of the vehicle is expressed in &amp;amp;quot;speed units&amp;amp;quot;. For trains and road vehicles, the speed unit is 1 km/h; for ships, it&#039;s 0.5 km/h; for aircraft, it&#039;s 8 mph. If the max. speed is above 255 speed units, 255 is used instead. If the vehicle is slower than 85 units, no points are awarded; otherwise, you get (speed_units-85)/4 points. Therefore, the maximum you can get is 42 points, or 16%.&lt;br /&gt;
* Age of the last carrier picking up the cargo:&lt;br /&gt;
&lt;br /&gt;
The original calculation goes like this:&lt;br /&gt;
&lt;br /&gt;
||Age of vehicle (years)|Score (%, rounded)&lt;br /&gt;
&lt;br /&gt;
2|10 (4%)&lt;br /&gt;
&lt;br /&gt;
1|20 (8%)&lt;br /&gt;
&lt;br /&gt;
0|33 (13%)||&lt;br /&gt;
&lt;br /&gt;
If the newagerating switch is turned on, the calculation changes. You get 33 points for vehicles younger than 5 years, and get 0 points for vehicles older than 21 years. Between these two ages, score drops slowly, by 2 points per year.&lt;br /&gt;
* Bonus for AI companies&lt;br /&gt;
&lt;br /&gt;
||AI intelligence setting|Score (%, rounded)&lt;br /&gt;
&lt;br /&gt;
Low|0 (0%)&lt;br /&gt;
&lt;br /&gt;
Medium|31 (12%)&lt;br /&gt;
&lt;br /&gt;
High|63 (25%)||&lt;br /&gt;
&lt;br /&gt;
That is, AI players cheat to get good ratings for their brain-dead routes.&lt;br /&gt;
* Bonus for statue in nearest town&lt;br /&gt;
&lt;br /&gt;
If your company has erected a statue in the nearest town, you get 26 points (10%) bonus to all cargo ratings.&lt;br /&gt;
&lt;br /&gt;
If a human player does everything perfectly, the maximum rating she can get is 271 points, while the worst possible transport service gets -90 points; for &amp;amp;quot;highly intelligent&amp;amp;quot; AI players, the corresponding values are 334 and -27, respectively. The resulting value gets clamped to the 0..255 range. TTD makes sure the ratings change slowly, but steadily: every 2.5 days, the actual rating moves towards the value calculated above, by no more than 2 points. For example, you &#039;d need at least 320 days to go from 0% to 100%, even if your service is perfect. When a cargo type first appears at a station, its rating is set to 175 points (69%), so it takes some time until it gets adjusted to the actual parameters of the service.&lt;br /&gt;
&lt;br /&gt;
The callback allows you to replace the first three components (days since last pickup, amount waiting and max. speed of last vehicle) in the calculation above. If your callback succeeds, the first three components are skipped and the returned value is used instead their results. Bit 14 is considered the sign bit, so you can return negative numbers (and need not to worry about calculated callback results yielding a negative result, as long as you stay in the range -16384..16383). During the callback, variable 18 has the value ssaaaatt, where&lt;br /&gt;
* tt is the time since the cargo was last picked up, in the time units described above (1 unit = 2.5 days independent of vehicle type)&lt;br /&gt;
* aaaa is the amount of cargo waiting&lt;br /&gt;
* ss is the speed of the last vehicle picking the cargo up, in the speed units described above (if no vehicle entered the station yet, the value is FFh)&lt;br /&gt;
&lt;br /&gt;
The lowest byte of variable 10 contains one of the following values:&lt;br /&gt;
&lt;br /&gt;
||value|meaning&lt;br /&gt;
&lt;br /&gt;
10h|the last vehicle entering the station was a train&lt;br /&gt;
&lt;br /&gt;
11h|the last vehicle entering the station was a road vehicle&lt;br /&gt;
&lt;br /&gt;
12h|the last vehicle entering the station was a ship&lt;br /&gt;
&lt;br /&gt;
13h|the last vehicle entering the station was an aircraft&lt;br /&gt;
&lt;br /&gt;
00h|no vehicle entered the station yet, or the last one entering was sold||&lt;br /&gt;
&lt;br /&gt;
Please note that there&#039;s only one &amp;amp;quot;last vehicle&amp;amp;quot; field per station, so the vehicle this refers to may not have picked up any of your cargo. The original TTD calculation doesn&#039;t care about this and just uses the field to get the vehicle type used in the first component.&lt;br /&gt;
&lt;br /&gt;
Currently, you can only use variables 10 and 18 for your decision, since neither vehicle nor station variables are available for a cargo callback. As soon as the architecture of TTDPatch allows this, the callback will be given access to the station and the last vehicle that entered.&lt;br /&gt;
&lt;br /&gt;
==New signals sprite drawing callback (146)==&lt;br /&gt;
&lt;br /&gt;
This is a generic callback, and thus a generic action 3 must be used. It must be processed by a variational action 2 feature 0E, as indicated in the following link: [[VarAction2NewSignals]].&lt;br /&gt;
&lt;br /&gt;
==Add sprite offset callback (147)==&lt;br /&gt;
&lt;br /&gt;
Add an offset to the default sprite number to be drawn.&lt;br /&gt;
&lt;br /&gt;
||Feature|Accessible Variables&lt;br /&gt;
&lt;br /&gt;
Canals|80+x variables are accessible by Canals. See [[VarAction2Canals]]||&lt;br /&gt;
&lt;br /&gt;
The default number is accessible in variable 10 (extra callback info 1) to decide if the sprite number needs an offset.&lt;br /&gt;
&lt;br /&gt;
==Land slope check (149/157)==&lt;br /&gt;
&lt;br /&gt;
This callback is called for each tile where the new station part will be built. It can return zero to accept the current tile or one to make the station building fail with the &amp;amp;quot;Land sloped in wrong direction&amp;amp;quot; error message. Other return values are reserved for future use, don&#039;t use them for now.&lt;br /&gt;
&lt;br /&gt;
Since the station isn&#039;t built yet, no 8x variables can be accessed. Only variables 43 and 67 will work from the 4x and 6x variables. You get the following information, though:&lt;br /&gt;
* variable 18:&lt;br /&gt;
&lt;br /&gt;
||bit numbers|Meaning&lt;br /&gt;
&lt;br /&gt;
0..7|offset of current tile on the platform, 0 is the northmost tile&lt;br /&gt;
&lt;br /&gt;
8..15|bits 8..15: current platform number, 0 is the northmost platform&lt;br /&gt;
&lt;br /&gt;
16..23|total length of station being built&lt;br /&gt;
&lt;br /&gt;
24..31|total number of platforms being built||&lt;br /&gt;
* variable 10:&lt;br /&gt;
&lt;br /&gt;
||bit numbers|Meaning&lt;br /&gt;
&lt;br /&gt;
4..7|Slope info of the current tile:~pp~&lt;br /&gt;
&lt;br /&gt;
bit 7 - N corner is elevated&lt;br /&gt;
&lt;br /&gt;
bit 6 - E corner is elevated&lt;br /&gt;
&lt;br /&gt;
bit 5 - S corner is elevated&lt;br /&gt;
&lt;br /&gt;
bit 4 - W corner is elevated~/pp~&lt;br /&gt;
&lt;br /&gt;
0..3|the same information, but &amp;amp;quot;mirrored&amp;amp;quot; (bit 0 and 2 swapped) if the station is built in the NW-SE orientation. This allows you to check slopes without checking the orientation explicitly.&lt;br /&gt;
&lt;br /&gt;
other bits|reserved for future use||&lt;br /&gt;
&lt;br /&gt;
The callback is called only after the normal checks TTD does for slopes, so it&#039;s not possible&lt;br /&gt;
&lt;br /&gt;
to allow a slope that isn&#039;t allowed by default; you can only narrow the set of allowed slopes. If the callback fails, the tile will be accepted. It is, however, called for flat tiles, so you can force your station to sloped land. You can&#039;t access the station info even if the platform is added to an existing rail station or is overbuilding station tiles. That&#039;s because TTD will decide this later in the code, after the slope is already accepted.&lt;br /&gt;
&lt;br /&gt;
This is called if available just before object construction, it does not require that any flags be set in the action0.&lt;br /&gt;
&lt;br /&gt;
Please note that for Objects only the low byte of variable 18 is valid (Offset from north tile (origin), stored as YX) and that variable 10 does not have the reversed version, and bits 0 - 3 contain the actual raised corners (same order as bits 4 - 7).&lt;br /&gt;
&lt;br /&gt;
==Decide industry colour (14A)==&lt;br /&gt;
&lt;br /&gt;
This callback is called when the industry is being constructed, to override the selected colour of the industry (variable A8). This colour will be used for tile sprites that request recolouring, but don&#039;t supply a recolour sprite number. The following industry variables aren&#039;t yet filled and contain random junk: 86..87, 93, 9E..A1, A9. (You probably wouldn&#039;t need to read anything but 86..87 anyway, since these fields contain information about the past, and the industry doesn&#039;t yet have a past.) Industry tiles aren&#039;t placed yet, either.&lt;br /&gt;
&lt;br /&gt;
Variables A7 and A8 are filled, however, and provide useful information. Variable A7 contains the number of the funder company, or 10h if the industry wasn&#039;t funded. Variable A8 contains the number of the colour scheme randomly picked by TTD, it&#039;s between 0 and 15. If you don&#039;t want to change the colour picked by default, you can either make the callback fail or just return variable A8 unchanged.&lt;br /&gt;
&lt;br /&gt;
Only the lowest four bits of the returned value are used, the other bits are reserved for future use. Those four bits are copied into variable A8 after the callback returns. You can either use industry variable 45 to get the company colour of the funder (if there&#039;s any), use a random action2 to select a random colour scheme from a given list, or of course decide on global variables like position or game year.&lt;br /&gt;
&lt;br /&gt;
==Decide input and output cargo types (14B,14C)==&lt;br /&gt;
&lt;br /&gt;
These callbacks are called when the industry is built, and allow customizing the input and output cargo types dynamically. Both callbacks are called repeatedly, with the lowest byte of variable 10 starting from zero and increasing after every call; you should return a cargo type each time, or FFh to terminate the list. (A failed callback terminates the list, too.) The same limitations apply as for callback 14A: industry tiles aren&#039;t yet placed, and some industry variables contain junk. You can use random action2s, however. The interpretation of the returned value depends on two factors: the current GRF version number and the presence of a cargo translation table:&lt;br /&gt;
&lt;br /&gt;
||GRF version|Has cargo translation table|Interpretation&lt;br /&gt;
&lt;br /&gt;
6 or below| |Climate-dependent cargo slot number&lt;br /&gt;
&lt;br /&gt;
7 or above|No|Cargo bit&lt;br /&gt;
&lt;br /&gt;
7 or above|Yes|Index in the translation table||&lt;br /&gt;
&lt;br /&gt;
Although currently callback 14B is called no more than three times, and callback 14C no more than twice, this may change between versions/implementations, to allow more input/output types. To be safe, you should return FFh as the last element even when you use all three input types or both output types.&lt;br /&gt;
&lt;br /&gt;
==House customized building name (14D)==&lt;br /&gt;
&lt;br /&gt;
This callback is activated from the Tile Description Query tool, when enquiring a house. &amp;amp;nbsp;Variable 10 will be set to 1 if the house is complete, otherwise it will be 0. &amp;amp;nbsp;The return value is the &amp;amp;quot;xx&amp;amp;quot; of a D0xx text ID. &amp;amp;nbsp;If the callback fails, the Query tool will use the house name set in property 12 (Building name ID).&lt;br /&gt;
&lt;br /&gt;
Since this callback is not performed frequently, you do not need to specify a mask. &amp;amp;nbsp;It will always be performed, and the name will only change when successful.&lt;br /&gt;
&lt;br /&gt;
Available for OpenTTD since r15172, and for TTDPatch since 2.6r2249&lt;br /&gt;
&lt;br /&gt;
==Extra information about airport layout in the build gui (155)==&lt;br /&gt;
&lt;br /&gt;
This callback allows you to display some extra text in the build airport gui. It should return a D0xx StringID. This callback is always called when available, you do not need to set a bit in any action0 property to enable it. Available for OpenTTD since r20272&lt;br /&gt;
&lt;br /&gt;
==Airport layout name (156)==&lt;br /&gt;
&lt;br /&gt;
This callback allows you to show a name for an airport layout. It should return a D0xx StringID. This callback is always called when available, you do not need to set a bit in any action0 property to enable it. Available for OpenTTD since r20273.&lt;br /&gt;
&lt;br /&gt;
==Decide object colour (15B)==&lt;br /&gt;
&lt;br /&gt;
This callback allows you to set/modify the colour of an object upon construction. Variable 10 contains the current company colour or a random colour for when there is no company, i.e. in the scenario editor. If the object wants a 2CC colour mapping two nibbles, i.e. two colours, are passed in variable 10, otherwise one nibble (colour).&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=VariationalAction2/Objects&amp;diff=664</id>
		<title>VariationalAction2/Objects</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=VariationalAction2/Objects&amp;diff=664"/>
		<updated>2010-09-01T19:53:02Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Variational Action 2 Variables for Objects&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Variational Action 2 Variables for Objects=&lt;br /&gt;
&lt;br /&gt;
||Variable|Size|Content&lt;br /&gt;
&lt;br /&gt;
40|D|Relative position, like [[VarAction2IndustryTiles|Industry Tile var43]]&lt;br /&gt;
&lt;br /&gt;
41|W|Tile information, see below&lt;br /&gt;
&lt;br /&gt;
42|D|Construction date from year 0&lt;br /&gt;
&lt;br /&gt;
43|W|Animation counter, see below&lt;br /&gt;
&lt;br /&gt;
44|B|Object founder information&lt;br /&gt;
&lt;br /&gt;
45|D|Get town zone and Manhattan distance of closest town&lt;br /&gt;
&lt;br /&gt;
46|D|Get square of Euclidian distance of closest town&lt;br /&gt;
&lt;br /&gt;
60|W|Get object type at offset&lt;br /&gt;
&lt;br /&gt;
61|B|Get random bits at offset&lt;br /&gt;
&lt;br /&gt;
62|D|Land info of nearby tiles&lt;br /&gt;
&lt;br /&gt;
63|W|Animation counter of nearby tile&lt;br /&gt;
&lt;br /&gt;
64|D|Count of object, distance of closest instance||&lt;br /&gt;
&lt;br /&gt;
==Tile information (41)==&lt;br /&gt;
&lt;br /&gt;
The return value has the format of ss0t where t is the terrain type which the tile is on, same values as [[VarAction2Canals|canal var81]].&lt;br /&gt;
&lt;br /&gt;
As of TTDPatch r2088, ss contains the slope data of the tile, same format as for [[VarAction2IndustryTiles| industrytile var60]]. The meaning of the individual bits is:&lt;br /&gt;
&lt;br /&gt;
||Bit|Meaning&lt;br /&gt;
&lt;br /&gt;
0|West corner is above the lowest&lt;br /&gt;
&lt;br /&gt;
1|South corner is above the lowest&lt;br /&gt;
&lt;br /&gt;
2|East corner is above the lowest&lt;br /&gt;
&lt;br /&gt;
3|North corner is above the lowest&lt;br /&gt;
&lt;br /&gt;
4|The tile is a steep slope (*)||&lt;br /&gt;
&lt;br /&gt;
(*) - Currently, objects are not allowed on steep slopes so this should be ignored for now.&lt;br /&gt;
&lt;br /&gt;
==Animation Counter (43)==&lt;br /&gt;
&lt;br /&gt;
The return value has the format of ccaa, where c is the colour of the object, a is the animation counter (note that action0, property 10, bit 6 must be set for this to work).&lt;br /&gt;
&lt;br /&gt;
==Object founder information (44)==&lt;br /&gt;
&lt;br /&gt;
This byte contains the ID of the company that funded the object, or 10h if the object was placed in the scenario editor.&lt;br /&gt;
&lt;br /&gt;
==Get town zone and Manhattan distance of closest town (45)==&lt;br /&gt;
&lt;br /&gt;
Like [[VarAction2Industries#Get_town_zone_and_Manhattan_distance_of_closest_town_65_|industry var65]] but instead of an offset the current tile is used.&lt;br /&gt;
&lt;br /&gt;
==Get square of Euclidian distance of closest town (46)==&lt;br /&gt;
&lt;br /&gt;
Like [[VarAction2Industries#Get_square_of_Euclidean_distance_of_closest_town_66_|industry var66]] but instead of an offset the current tile is used.&lt;br /&gt;
&lt;br /&gt;
==Get object type at offset (60)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2Industries#Get_industry_tile_ID_at_offset_60_|industry var60]]. The offset it from the current tile.&lt;br /&gt;
&lt;br /&gt;
==Get random bits at offset (61)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2Industries#Get_random_tile_bits_at_offset_61_|industry var61]]. The offset it from the current tile.&lt;br /&gt;
&lt;br /&gt;
==Land info of nearby tiles (62)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2IndustryTiles#Land_info_of_nearby_tiles_60_|industry tile var60]]. The offset it from the current tile.&lt;br /&gt;
&lt;br /&gt;
==Animation counter of nearby tile (63)==&lt;br /&gt;
&lt;br /&gt;
Returns the var 43 of another tile given by the offset.&lt;br /&gt;
&lt;br /&gt;
==Count of object, distance of closest instance (64)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2Industries#Count_of_industry_distance_of_closest_instance_67_68_|industry var67]]. The distance is from the current tile.&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=VariationalAction2/Objects&amp;diff=666</id>
		<title>VariationalAction2/Objects</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=VariationalAction2/Objects&amp;diff=666"/>
		<updated>2010-08-28T22:24:09Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Variational Action 2 Variables for Objects&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Variational Action 2 Variables for Objects=&lt;br /&gt;
&lt;br /&gt;
||Variable|Size|Content&lt;br /&gt;
&lt;br /&gt;
40|D|Relative position, like [[VarAction2IndustryTiles|Industry Tile var43]]&lt;br /&gt;
&lt;br /&gt;
41|W|Tile information, see below&lt;br /&gt;
&lt;br /&gt;
42|D|Construction date from year 0&lt;br /&gt;
&lt;br /&gt;
43|W|Animation counter, see below&lt;br /&gt;
&lt;br /&gt;
44|B|Object founder information&lt;br /&gt;
&lt;br /&gt;
45|D|Get town zone and Manhattan distance of closest town&lt;br /&gt;
&lt;br /&gt;
46|D|Get square of Euclidian distance of closest town&lt;br /&gt;
&lt;br /&gt;
60|W|Get object type at offset&lt;br /&gt;
&lt;br /&gt;
61|B|Get random bits at offset&lt;br /&gt;
&lt;br /&gt;
62|D|Land info of nearby tiles&lt;br /&gt;
&lt;br /&gt;
63|W|Animation counter of nearby tile&lt;br /&gt;
&lt;br /&gt;
64|D|Count of object, distance of closest instance||&lt;br /&gt;
&lt;br /&gt;
==Tile information (41)==&lt;br /&gt;
&lt;br /&gt;
The return value has the format of ss0t where t is the terrain type which the tile is on, same values as [[VarAction2Canals|canal var81]].&lt;br /&gt;
&lt;br /&gt;
As of TTDPatch r2088, ss contains the slope data of the tile, same format as for [[VarAction2IndustryTiles| industrytile var60]]. The meaning of the individual bits is:&lt;br /&gt;
&lt;br /&gt;
||Bit|Meaning&lt;br /&gt;
&lt;br /&gt;
0|West corner is above the lowest&lt;br /&gt;
&lt;br /&gt;
1|South corner is above the lowest&lt;br /&gt;
&lt;br /&gt;
2|East corner is above the lowest&lt;br /&gt;
&lt;br /&gt;
3|North corner is above the lowest&lt;br /&gt;
&lt;br /&gt;
4|The tile is a steep slope (*)||&lt;br /&gt;
&lt;br /&gt;
(*) - Currently, objects are not allowed on steep slopes so this should be ignored for now.&lt;br /&gt;
&lt;br /&gt;
==Animation Counter (43)==&lt;br /&gt;
&lt;br /&gt;
The return value has the format of ccaa, where c is the colour of the object, a is the animation counter (note that action0, property 10, bit 6 must be set for this to work).&lt;br /&gt;
&lt;br /&gt;
==Object founder information (44)==&lt;br /&gt;
&lt;br /&gt;
This byte contains the ID of the company that funded the object, or 10h if the object was placed in the scenario editor.&lt;br /&gt;
&lt;br /&gt;
==Get town zone and Manhattan distance of closest town (45)==&lt;br /&gt;
&lt;br /&gt;
Like [[VarAction2Industries#Get_town_zone_and_Manhattan_distance_of_closest_town_65_|industry var65]] but instead of an offset the current tile is used.&lt;br /&gt;
&lt;br /&gt;
==Get square of Euclidian distance of closest town (46)==&lt;br /&gt;
&lt;br /&gt;
Like [[VarAction2Industries#Get_square_of_Euclidean_distance_of_closest_town_66_|industry var65]] but instead of an offset the current tile is used.&lt;br /&gt;
&lt;br /&gt;
==Get object type at offset (60)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2Industries#Get_industry_tile_ID_at_offset_60_|industry var60]]. The offset it from the current tile.&lt;br /&gt;
&lt;br /&gt;
==Get random bits at offset (61)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2Industries#Get_random_tile_bits_at_offset_61_|industry var61]]. The offset it from the current tile.&lt;br /&gt;
&lt;br /&gt;
==Land info of nearby tiles (62)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2IndustryTiles#Land_info_of_nearby_tiles_60_|industry tile var60]]. The offset it from the current tile.&lt;br /&gt;
&lt;br /&gt;
==Animation counter of nearby tile (63)==&lt;br /&gt;
&lt;br /&gt;
Returns the var 43 of another tile given by the offset.&lt;br /&gt;
&lt;br /&gt;
==Count of object, distance of closest instance (64)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2Industries#Count_of_industry_distance_of_closest_instance_67_68_|industry var67]]. The offset it from the current tile.&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=ReadingOtherGRFParameters&amp;diff=767</id>
		<title>ReadingOtherGRFParameters</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=ReadingOtherGRFParameters&amp;diff=767"/>
		<updated>2010-08-28T21:48:02Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Reading another GRF file&#039;s parameters&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Reading another GRF file&#039;s parameters==&lt;br /&gt;
&lt;br /&gt;
-=Introduction=-&lt;br /&gt;
&lt;br /&gt;
Since 2.0.1 alpha 16, it has been possible to use action D to read the parameters of other GRF files. With this, you can try to use the settings for another related GRF before falling back to a hard coded default.&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 0D &amp;amp;lt;target&amp;amp;gt; &amp;amp;lt;operation&amp;amp;gt; &amp;amp;lt;param&amp;amp;gt; FE &amp;amp;lt;grfid&amp;amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
0D|B|Defines action 0D&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;target&amp;amp;gt;|B|Target parameter&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;operation&amp;amp;gt;|B|As for [[ActionD#operation|action D]], but only assignment is valid.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;param&amp;amp;gt;|B|Parameter number of the other GRF file that you want to read&lt;br /&gt;
&lt;br /&gt;
FE|B|Defines a special variable access&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;grfid&amp;amp;gt;|D|The GRFID whose parameter you want to read||&lt;br /&gt;
&lt;br /&gt;
This will store parameter &amp;amp;lt;param&amp;amp;gt; of the GRF file with grfid &amp;amp;lt;grfid&amp;amp;gt; into the &amp;amp;lt;target&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
With parameter FE you can read the action 14 NewGRF version of another NewGRF in OpenTTD. It returns 0 if no NewGRF version has been set by an action 14.&lt;br /&gt;
&lt;br /&gt;
If the GRF ID cannot be found, or if the parameter is not defined, a value of 0 is used instead (no matter whether bit 7 of the operation is set or not).&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Objects&amp;diff=143</id>
		<title>Action0/Objects</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Objects&amp;diff=143"/>
		<updated>2010-08-28T19:35:01Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Action 0 properties for new objects&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 0 - Properties for new objects=&lt;br /&gt;
&lt;br /&gt;
Defining properties of new objects.&lt;br /&gt;
&lt;br /&gt;
{maketoc}&lt;br /&gt;
&lt;br /&gt;
Unlike vehicles or new stations, most new objects have no real equivalent in TTD.&lt;br /&gt;
&lt;br /&gt;
The IDs are therefore free to be chosen and will in fact be allocated automatically by the patch. In action 0, you only specify IDs relative to the set, i.e. the ID of the first object type is 00, the second object type is 01 and so on. In total, each game can only have 255 object IDs for all active grf files.&lt;br /&gt;
&lt;br /&gt;
The property you &#039;&#039;&#039;must&#039;&#039;&#039; set for each object ID is 08 (in addition to defining an action 3 for it). Also, all object IDs must get their classes in the right order, starting from ID 00 onwards.&lt;br /&gt;
&lt;br /&gt;
-=Properties=-&lt;br /&gt;
&lt;br /&gt;
||Number|Version|Size|Description&lt;br /&gt;
&lt;br /&gt;
08|a|D|Class ID, see below&lt;br /&gt;
&lt;br /&gt;
09|a|W|Text ID for class&lt;br /&gt;
&lt;br /&gt;
0A|a|W|Text ID for this object&lt;br /&gt;
&lt;br /&gt;
0B|a|B|[[Action0General#Climate_availability|Climate availability]]&lt;br /&gt;
&lt;br /&gt;
0C|a|B|Byte representing size, see below&lt;br /&gt;
&lt;br /&gt;
0D|a|B|Object build cost factor (sets object removal cost factor as well)&lt;br /&gt;
&lt;br /&gt;
0E|a|D|Introduction date, see below&lt;br /&gt;
&lt;br /&gt;
0F|a|D|End of life date, see below&lt;br /&gt;
&lt;br /&gt;
10|a|W|Object flags, see below&lt;br /&gt;
&lt;br /&gt;
11|b|W|Animation information&lt;br /&gt;
&lt;br /&gt;
12|b|B|Animation speed&lt;br /&gt;
&lt;br /&gt;
13|b|W|Animation triggers&lt;br /&gt;
&lt;br /&gt;
14|b|B|Object removal cost factor (set after object build cost factor)&lt;br /&gt;
&lt;br /&gt;
15|b|W|Callback flags, see below&lt;br /&gt;
&lt;br /&gt;
16|b|B|Height of the building||&lt;br /&gt;
&lt;br /&gt;
Check [http://pics.lakie.net/newObject-ActionStructure.png|Lakie&#039;s Graphical Representation of the newObject Specifications|nocache]&lt;br /&gt;
&lt;br /&gt;
-=Comments=-&lt;br /&gt;
&lt;br /&gt;
==Object class (08)==&lt;br /&gt;
&lt;br /&gt;
Unlike station classes, there is currently no default yet, planned are TRNS for transmitters and LTHS for lighthouses. &#039;&#039;&#039;You have to set the class ID before any other property.&#039;&#039;&#039; Characters allowed in the IDs are A-Z, 0-9.&lt;br /&gt;
&lt;br /&gt;
==Object class text ID (09)==&lt;br /&gt;
&lt;br /&gt;
The text ID for this class (word value). This textid should be either a TTD textid or a D4xx textid (set via D0xx in action4).&lt;br /&gt;
&lt;br /&gt;
When specifying an object, you don&#039;t need to set a class name again if you already did for another one with the same class.&lt;br /&gt;
&lt;br /&gt;
==Object text ID (0A)==&lt;br /&gt;
&lt;br /&gt;
The text ID for the object for query and selection (word value). Same requirements as for property09.&lt;br /&gt;
&lt;br /&gt;
==Object size (0C)==&lt;br /&gt;
&lt;br /&gt;
The object size up to 15x15 tiles.&lt;br /&gt;
&lt;br /&gt;
This byte value is divided into two nibbles. The first defines the size in y direction and the second defines the size in x (i.e., stored as YX).&lt;br /&gt;
&lt;br /&gt;
Note that any value lower than 0x11 will be rejected.&lt;br /&gt;
&lt;br /&gt;
==Build Cost (0D)==&lt;br /&gt;
&lt;br /&gt;
The build cost multiplier. This is multiplied by the number of tiles for evaluation of construction and removal costs of an object.&lt;br /&gt;
&lt;br /&gt;
==Introduction date (0E)==&lt;br /&gt;
&lt;br /&gt;
Introduction date of an object, in days since the year 0. This takes account of leap years; divisible by 4, but not 100 unless 400. A start date of 1920-01-01 is obtained with a value of 701265 (51 B3 0A 00). In TTDPatch anything before 1920 is considered to be always available, and it should allow for objects to work past 2044, the date is also the very first date you can build the object.&lt;br /&gt;
&lt;br /&gt;
==End of life date (0F)==&lt;br /&gt;
&lt;br /&gt;
Last year an object can be build, in days since the year 0. Same requirements as above. Also note that it must be a minimum of a year (365 days) after the introduction date or TTDPatch will ignore it.&lt;br /&gt;
&lt;br /&gt;
==Object flags (10)==&lt;br /&gt;
&lt;br /&gt;
The following flags control object behaviour and are cached for built objects, so changing these flags will have no effect on already constructed objects.&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Version|Meaning&lt;br /&gt;
&lt;br /&gt;
0|1|a|Only Available in the scenario editor (1)&lt;br /&gt;
&lt;br /&gt;
1|2|a|Irremovable (2)&lt;br /&gt;
&lt;br /&gt;
2|4|a|Anything Can Remove (owned land behaviour)&lt;br /&gt;
&lt;br /&gt;
3|8|a|Allow construction of the object on water&lt;br /&gt;
&lt;br /&gt;
4|16|a|Removal cost is actually income (owned land behaviour)&lt;br /&gt;
&lt;br /&gt;
5|32|a|Do not display foundations if on a slope&lt;br /&gt;
&lt;br /&gt;
6|64|a|Object has animation (3)&lt;br /&gt;
&lt;br /&gt;
7|128|a|Only available during game play (1)&lt;br /&gt;
&lt;br /&gt;
8|256|b|Allows 2cc mapping for objects instead of the default 1cc&lt;br /&gt;
&lt;br /&gt;
9|512|c|Disallows construction on land (also has bit 3 behaviour)&lt;br /&gt;
&lt;br /&gt;
10|1024|c|Draws the water under the object (4)&lt;br /&gt;
&lt;br /&gt;
11|2048|d|Allow bridge over the object taking the building height into account (5)&lt;br /&gt;
&lt;br /&gt;
12|4096|d|Random bits in the &amp;amp;quot;next animation frame&amp;amp;quot; callback||&lt;br /&gt;
&lt;br /&gt;
c - TTDPatch r2331&lt;br /&gt;
&lt;br /&gt;
(1) - Note that bits 0 and 7 are incompatible and setting both will make an object completely unavailable.&lt;br /&gt;
&lt;br /&gt;
(2) - Object cannot be removed through normal dynamite, control must be held and the removal cost will be multiplied by 25 (this is the usual behaviour for most class A objects in TTDPatch).&lt;br /&gt;
&lt;br /&gt;
(3) - Setting this flag will allow the object&#039;s animation counter to be increased, must be set if you plan to make use of animations.&lt;br /&gt;
&lt;br /&gt;
(4) - Only applies when built on top of a water tile, also replaces the ground tile of the object completely. (Does not work when object built on sloped water tiles).&lt;br /&gt;
&lt;br /&gt;
(5) - Only applies to OpenTTD. TTDPatch does not support bridges over objects yet.&lt;br /&gt;
&lt;br /&gt;
==Animation information (11)==&lt;br /&gt;
&lt;br /&gt;
The low byte specifies the number of animation frames minus one, so 00 means 1 frame, 01 means 2 frames etc. The maximum number of frames is 256, although you can have some problems if your animation exceeds FD (253) frames. The high byte must be 0 for non-looping animations and 01 for looping animations. Every other value is reserved for future use. In addition, if the whole word contains FFFF, animation is turned off for this station (this is the default value).&lt;br /&gt;
&lt;br /&gt;
Since you can&#039;t have properties for individual station tiles, this property applies for every tile of the station. If you don&#039;t want to animate some tiles, you should check the current position during [[Callbacks#Animation_control_1B_25_140_|callback 159]] and return FD if the current tile doesn&#039;t need to be animated. If you also need animations of different length per tile, you&#039;ll have to use [[Callbacks#Next_animation_frame_1A_26_141_|callback 158]] for that.&lt;br /&gt;
&lt;br /&gt;
==Animation speed (12)==&lt;br /&gt;
&lt;br /&gt;
The meaning is the same as for [[Action0Houses#Animation_Speed_1B_|house property 1B]], but the lower limit is 0 instead of 2, so the fastest possible animation changes frames every game tick (27ms). The default value is 0.&lt;br /&gt;
&lt;br /&gt;
==Animation triggers (13)==&lt;br /&gt;
&lt;br /&gt;
This is a bit mask of events that should trigger [[Callbacks#Animation_control_1B_25_140_|callback 159]], allowing to change the animation state&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Meaning|Happens on&lt;br /&gt;
&lt;br /&gt;
0|1|Object is built|all tiles&lt;br /&gt;
&lt;br /&gt;
1|2|Periodic tile loop|single tile&lt;br /&gt;
&lt;br /&gt;
2|4|Synchronised periodic tile loop|all tiles||&lt;br /&gt;
&lt;br /&gt;
The synchronised periodic tile loop is called directly after the (unsynchronised) periodic tile loop of the northern tile.&lt;br /&gt;
&lt;br /&gt;
==Object removal cost factor (14)==&lt;br /&gt;
&lt;br /&gt;
Cost factor for the removal of an object. This must be set after property 0D (object build cost factor) as that overwrites this value.&lt;br /&gt;
&lt;br /&gt;
==Callback flags (15)==&lt;br /&gt;
&lt;br /&gt;
For stations, the following [[Callbacks|callbacks]] can be defined by setting the corresponding bit in property 15:&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Variable 0C value|Callback&lt;br /&gt;
&lt;br /&gt;
0|1|157|Custom slope check&lt;br /&gt;
&lt;br /&gt;
1|2|158|Decide next animation frame&lt;br /&gt;
&lt;br /&gt;
2|4|159|Decide animation speed&lt;br /&gt;
&lt;br /&gt;
3|8|15B|Decide colour of building&lt;br /&gt;
&lt;br /&gt;
4|16|15C|Show additional text in the build object window&lt;br /&gt;
&lt;br /&gt;
5|32|15D|Allow/disallow autosloping||&lt;br /&gt;
&lt;br /&gt;
==Building height (16)==&lt;br /&gt;
&lt;br /&gt;
Set the height of the building in heightlevels (8 pixels). For example if the structure is 16 pixels high you set this property to 2.&lt;br /&gt;
&lt;br /&gt;
In OpenTTD this property is used to determine the height of the build object window; the height for the object preview is set to 32 + &amp;amp;quot;value of property 16&amp;amp;quot; * 8. The property is also uses to determine how high a bridge must be if it is allowed by the bit in property 10.&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Objects&amp;diff=144</id>
		<title>Action0/Objects</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Objects&amp;diff=144"/>
		<updated>2010-08-28T12:13:14Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Action 0 properties for new objects&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 0 - Properties for new objects=&lt;br /&gt;
&lt;br /&gt;
Defining properties of new objects.&lt;br /&gt;
&lt;br /&gt;
{maketoc}&lt;br /&gt;
&lt;br /&gt;
Unlike vehicles or new stations, most new objects have no real equivalent in TTD.&lt;br /&gt;
&lt;br /&gt;
The IDs are therefore free to be chosen and will in fact be allocated automatically by the patch. In action 0, you only specify IDs relative to the set, i.e. the ID of the first object type is 00, the second object type is 01 and so on. In total, each game can only have 255 object IDs for all active grf files.&lt;br /&gt;
&lt;br /&gt;
The property you &#039;&#039;&#039;must&#039;&#039;&#039; set for each object ID is 08 (in addition to defining an action 3 for it). Also, all object IDs must get their classes in the right order, starting from ID 00 onwards.&lt;br /&gt;
&lt;br /&gt;
-=Properties=-&lt;br /&gt;
&lt;br /&gt;
||Number|Version|Size|Description&lt;br /&gt;
&lt;br /&gt;
08|a|D|Class ID, see below&lt;br /&gt;
&lt;br /&gt;
09|a|W|Text ID for class&lt;br /&gt;
&lt;br /&gt;
0A|a|W|Text ID for this object&lt;br /&gt;
&lt;br /&gt;
0B|a|B|[[Action0General#Climate_availability|Climate availability]]&lt;br /&gt;
&lt;br /&gt;
0C|a|B|Byte representing size, see below&lt;br /&gt;
&lt;br /&gt;
0D|a|B|Object Cost Factor&lt;br /&gt;
&lt;br /&gt;
0E|a|D|Introduction date, see below&lt;br /&gt;
&lt;br /&gt;
0F|a|D|End of life date, see below&lt;br /&gt;
&lt;br /&gt;
10|a|W|Object flags, see below||&lt;br /&gt;
&lt;br /&gt;
Check [http://pics.lakie.net/newObject-ActionStructure.png|Lakie&#039;s Graphical Representation of the newObject Specifications|nocache]&lt;br /&gt;
&lt;br /&gt;
-=Comments=-&lt;br /&gt;
&lt;br /&gt;
==Object class (08)==&lt;br /&gt;
&lt;br /&gt;
Unlike station classes, there is currently no default yet, planned are TRNS for transmitters and LTHS for lighthouses. &#039;&#039;&#039;You have to set the class ID before any other property.&#039;&#039;&#039; Characters allowed in the IDs are A-Z, 0-9.&lt;br /&gt;
&lt;br /&gt;
==Object class text ID (09)==&lt;br /&gt;
&lt;br /&gt;
The text ID for this class (word value). This textid should be either a TTD textid or a D4xx textid (set via D0xx in action4).&lt;br /&gt;
&lt;br /&gt;
When specifying an object, you don&#039;t need to set a class name again if you already did for another one with the same class.&lt;br /&gt;
&lt;br /&gt;
==Object text ID (0A)==&lt;br /&gt;
&lt;br /&gt;
The text ID for the object for query and selection (word value). Same requirements as for property09.&lt;br /&gt;
&lt;br /&gt;
==Object size (0C)==&lt;br /&gt;
&lt;br /&gt;
The object size up to 15x15 tiles.&lt;br /&gt;
&lt;br /&gt;
This byte value is divided into two nibbles. The first defines the size in y direction and the second defines the size in x (i.e., stored as YX).&lt;br /&gt;
&lt;br /&gt;
Note that any value lower than 0x11 will be rejected.&lt;br /&gt;
&lt;br /&gt;
==Build Cost (0D)==&lt;br /&gt;
&lt;br /&gt;
The build cost multiplier. This is multiplied by the number of tiles for evaluation of construction and removal costs of an object.&lt;br /&gt;
&lt;br /&gt;
==Introduction date (0E)==&lt;br /&gt;
&lt;br /&gt;
Introduction date of an object, in days since the year 0. This takes account of leap years; divisible by 4, but not 100 unless 400. A start date of 1920-01-01 is obtained with a value of 701265 (51 B3 0A 00). In TTDPatch anything before 1920 is considered to be always available, and it should allow for objects to work past 2044, the date is also the very first date you can build the object.&lt;br /&gt;
&lt;br /&gt;
==End of life date (0F)==&lt;br /&gt;
&lt;br /&gt;
Last year an object can be build, in days since the year 0. Same requirements as above. Also note that it must be a minimum of a year (365 days) after the introduction date or TTDPatch will ignore it.&lt;br /&gt;
&lt;br /&gt;
==Object flags (10)==&lt;br /&gt;
&lt;br /&gt;
The following flags control object behaviour and are cached for built objects, so changing these flags will have no effect on already constructed objects.&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Version|Meaning&lt;br /&gt;
&lt;br /&gt;
0|1|a|Only Available in the scenario editor (1)&lt;br /&gt;
&lt;br /&gt;
1|2|a|Irremovable (2)&lt;br /&gt;
&lt;br /&gt;
2|4|a|Anything Can Remove (owned land behaviour)&lt;br /&gt;
&lt;br /&gt;
3|8|a|Allow construction of the object on water&lt;br /&gt;
&lt;br /&gt;
4|16|a|Removal cost is actually income (owned land behaviour)&lt;br /&gt;
&lt;br /&gt;
5|32|a|Do not display foundations if on a slope&lt;br /&gt;
&lt;br /&gt;
6|64|a|Object has animation (3)&lt;br /&gt;
&lt;br /&gt;
7|128|a|Only available during game play (1)&lt;br /&gt;
&lt;br /&gt;
8|256|b|Allows 2cc mapping for objects instead of the default 1cc&lt;br /&gt;
&lt;br /&gt;
9|512|c|Disallows construction on land (also has bit 3 behaviour)&lt;br /&gt;
&lt;br /&gt;
10|1024|c|Draws the water under the object (4)||&lt;br /&gt;
&lt;br /&gt;
c - TTDPatch r2331&lt;br /&gt;
&lt;br /&gt;
(1) - Note that bits 0 and 7 are incompatible and setting both will make an object completely unavailable.&lt;br /&gt;
&lt;br /&gt;
(2) - Object cannot be removed through normal dynamite, control must be held and the removal cost will be multiplied by 25 (this is the usual behaviour for most class A objects in TTDPatch).&lt;br /&gt;
&lt;br /&gt;
(3) - Setting this flag will allow the object&#039;s animation counter to be increased, must be set if you plan to make use of animations.&lt;br /&gt;
&lt;br /&gt;
(4) - Only applies when built on top of a water tile, also replaces the ground tile of the object completely. (Does not work when object built on sloped water tiles).&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action4&amp;diff=414</id>
		<title>Action4</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action4&amp;diff=414"/>
		<updated>2010-08-04T08:49:36Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Define vehicle names or other texts&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 4=&lt;br /&gt;
&lt;br /&gt;
Define vehicle names or other texts&lt;br /&gt;
&lt;br /&gt;
-=Introduction=-&lt;br /&gt;
&lt;br /&gt;
When making new vehicle graphics, you also need to name the new vehicles, or they&#039;ll show up with their original name from TTD.&lt;br /&gt;
&lt;br /&gt;
In addition, you can change most of TTD&#039;s text strings.&lt;br /&gt;
&lt;br /&gt;
Note that changes of vehicles names can be overridden by using TTD&#039;s vehicle.dat custom vehicle names. &amp;amp;nbsp;There is no way to bypass the custom vehicle names, other than turning them off or deleting vehicle.dat.&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
The data looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 04 &amp;amp;lt;feature&amp;amp;gt; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;lt;num-ent&amp;amp;gt; &amp;amp;lt;offset&amp;amp;gt; &amp;amp;lt;text&amp;amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes used in this action.&lt;br /&gt;
&lt;br /&gt;
04|B|Defines action 04&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;feature&amp;amp;gt;|B|For what type of vehicle/station should this definition be used?&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;language-id&amp;amp;gt;|B|Which of TTD&#039;s languages this name is for&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;num-ent&amp;amp;gt;|B|Number of consecutive strings to change&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;offset&amp;amp;gt;|B/W|First ID to change&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;text&amp;amp;gt;|S|New text strings||&lt;br /&gt;
&lt;br /&gt;
Whether &amp;amp;lt;offset&amp;amp;gt; is a &#039;&#039;&#039;BYTE&#039;&#039;&#039; or a &#039;&#039;&#039;WORD&#039;&#039;&#039; is decided by bit 7 of &amp;amp;lt;language-id&amp;amp;gt;, see below.&lt;br /&gt;
&lt;br /&gt;
-=Filling in the terms=-&lt;br /&gt;
&lt;br /&gt;
===Sprite-number===&lt;br /&gt;
&lt;br /&gt;
This is just the number you are at.&lt;br /&gt;
&lt;br /&gt;
===Length===&lt;br /&gt;
&lt;br /&gt;
Count the number of bytes in this action.&lt;br /&gt;
&lt;br /&gt;
===feature===&lt;br /&gt;
&lt;br /&gt;
This sets the type of feature that you wish to change. Set it to:&lt;br /&gt;
&lt;br /&gt;
00 for trains&lt;br /&gt;
&lt;br /&gt;
01 for road vehicles&lt;br /&gt;
&lt;br /&gt;
02 for ships&lt;br /&gt;
&lt;br /&gt;
03 for planes&lt;br /&gt;
&lt;br /&gt;
04 for stations&lt;br /&gt;
&lt;br /&gt;
05 for canals&lt;br /&gt;
&lt;br /&gt;
06 for bridges&lt;br /&gt;
&lt;br /&gt;
07 for houses&lt;br /&gt;
&lt;br /&gt;
0A for industries&lt;br /&gt;
&lt;br /&gt;
0B for cargos&lt;br /&gt;
&lt;br /&gt;
48 for original strings; see [[TextIDs]] for a list of TTD&#039;s text IDs.&lt;br /&gt;
&lt;br /&gt;
===language-id===&lt;br /&gt;
&lt;br /&gt;
The meaning of this byte depends on the GRF version of the .grf file as set in [[Action8#version|action 8]].&lt;br /&gt;
&lt;br /&gt;
Up to version 6, this is a bit mask of the following bits:&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Meaning&lt;br /&gt;
&lt;br /&gt;
0|01|American or &amp;amp;quot;other&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
1|02|English&lt;br /&gt;
&lt;br /&gt;
2|04|German&lt;br /&gt;
&lt;br /&gt;
3|08|French&lt;br /&gt;
&lt;br /&gt;
4|10|Spanish&lt;br /&gt;
&lt;br /&gt;
7|80|Flag for 16 bit string IDs||&lt;br /&gt;
&lt;br /&gt;
Add the bits of all languages for which the following strings apply. Bit 7 controls, whether the following string ID consists of 16 or 8 bit. Since TTDPatch now supports languages other than the standard ones, unknown languages will use the American strings as fallback. Otherwise the string would remain undefined for these languages. To actually define strings for any new language, you must use grf version 7.&lt;br /&gt;
&lt;br /&gt;
For version 7 and higher, it is a simple language ID from the list below. (This has changed with 2.5 beta 4). Bit 7 has the same meaning as in the earlier versions above.&lt;br /&gt;
&lt;br /&gt;
In either scheme, you can use the value 7F or FF, respectively, to define strings shown for languages that you do not provide translation for. First set all strings to a default value using this, and later override the language specific ones if they exist.&lt;br /&gt;
&lt;br /&gt;
Currently, the scheme is to use international phone codes as language IDs, unless they&#039;re out of range, in which case pick a number vaguely related in some way. Or something else.&lt;br /&gt;
&lt;br /&gt;
||ID (hex)|Language&lt;br /&gt;
&lt;br /&gt;
00|American&lt;br /&gt;
&lt;br /&gt;
01|English&lt;br /&gt;
&lt;br /&gt;
02|German&lt;br /&gt;
&lt;br /&gt;
03|French&lt;br /&gt;
&lt;br /&gt;
04|Spanish&lt;br /&gt;
&lt;br /&gt;
05|Esperanto&lt;br /&gt;
&lt;br /&gt;
06|Ido&lt;br /&gt;
&lt;br /&gt;
07|Russian&lt;br /&gt;
&lt;br /&gt;
08|Irish&lt;br /&gt;
&lt;br /&gt;
09|Maltese&lt;br /&gt;
&lt;br /&gt;
0A|Tamil&lt;br /&gt;
&lt;br /&gt;
0B|Chuvash&lt;br /&gt;
&lt;br /&gt;
0C|Chinese (Traditional)&lt;br /&gt;
&lt;br /&gt;
0D|Serbian&lt;br /&gt;
&lt;br /&gt;
0E|Norwegian (Nynorsk)&lt;br /&gt;
&lt;br /&gt;
0F|Welsh&lt;br /&gt;
&lt;br /&gt;
10|Belarusian&lt;br /&gt;
&lt;br /&gt;
11|Marathi&lt;br /&gt;
&lt;br /&gt;
14|Arabic (Egypt)&lt;br /&gt;
&lt;br /&gt;
15|Czech&lt;br /&gt;
&lt;br /&gt;
16|Slovak&lt;br /&gt;
&lt;br /&gt;
18|Bulgarian&lt;br /&gt;
&lt;br /&gt;
1B|Afrikaans&lt;br /&gt;
&lt;br /&gt;
1E|Greek&lt;br /&gt;
&lt;br /&gt;
1F|Dutch&lt;br /&gt;
&lt;br /&gt;
21|Basque&lt;br /&gt;
&lt;br /&gt;
22|Catalan&lt;br /&gt;
&lt;br /&gt;
23|Luxembourgish&lt;br /&gt;
&lt;br /&gt;
24|Hungarian&lt;br /&gt;
&lt;br /&gt;
26|Macedonian&lt;br /&gt;
&lt;br /&gt;
27|Italian&lt;br /&gt;
&lt;br /&gt;
28|Romanian&lt;br /&gt;
&lt;br /&gt;
29|Icelandic&lt;br /&gt;
&lt;br /&gt;
2A|Latvian&lt;br /&gt;
&lt;br /&gt;
2B|Lithuanian&lt;br /&gt;
&lt;br /&gt;
2C|Slovenian&lt;br /&gt;
&lt;br /&gt;
2D|Danish&lt;br /&gt;
&lt;br /&gt;
2E|Swedish&lt;br /&gt;
&lt;br /&gt;
2F|Norwegian (Bokmal)&lt;br /&gt;
&lt;br /&gt;
30|Polish&lt;br /&gt;
&lt;br /&gt;
31|Galician&lt;br /&gt;
&lt;br /&gt;
32|Frisian&lt;br /&gt;
&lt;br /&gt;
33|Ukrainian&lt;br /&gt;
&lt;br /&gt;
34|Estonian&lt;br /&gt;
&lt;br /&gt;
35|Finnish&lt;br /&gt;
&lt;br /&gt;
36|Portuguese&lt;br /&gt;
&lt;br /&gt;
37|Brazilian Portuguese&lt;br /&gt;
&lt;br /&gt;
38|Croatian&lt;br /&gt;
&lt;br /&gt;
39|Japanese&lt;br /&gt;
&lt;br /&gt;
3A|Korean&lt;br /&gt;
&lt;br /&gt;
3C|Malay&lt;br /&gt;
&lt;br /&gt;
3E|Turkish&lt;br /&gt;
&lt;br /&gt;
42|Thai&lt;br /&gt;
&lt;br /&gt;
54|Vietnamese&lt;br /&gt;
&lt;br /&gt;
56|Chinese (Simplified)&lt;br /&gt;
&lt;br /&gt;
5A|Indonesian&lt;br /&gt;
&lt;br /&gt;
5C|Urdu&lt;br /&gt;
&lt;br /&gt;
61|Hebrew&lt;br /&gt;
&lt;br /&gt;
62|Persian&lt;br /&gt;
&lt;br /&gt;
80|Flag 16 bit string IDs (added to language ID)&lt;br /&gt;
&lt;br /&gt;
7F|any (will be applied no matter what language is active)||&lt;br /&gt;
&lt;br /&gt;
When translating for a new language, please simply edit this document and add the new definition here.&lt;br /&gt;
&lt;br /&gt;
===num-ent===&lt;br /&gt;
&lt;br /&gt;
How many consecutive entries to change.&lt;br /&gt;
&lt;br /&gt;
===offset===&lt;br /&gt;
&lt;br /&gt;
The ID of the first string to change.&lt;br /&gt;
&lt;br /&gt;
When language-id bit 7 is clear, this is a byte value; except for OpenTTD since r13482, where it is an extended byte value for vehicles.&lt;br /&gt;
&lt;br /&gt;
When language-id bit 7 is set, this is a word value in little endian notation, e.g. 8134 becomes 34 81.&lt;br /&gt;
&lt;br /&gt;
The 8 bit version is only allowed for vehicles to set their name, in which case the text ID is just the vehicle ID.&lt;br /&gt;
&lt;br /&gt;
To replace original texts, or to define texts for usage in callbacks or properties of vehicles, stations, houses or industries you have to use the 16 bit version. However, town names are changed with [[ActionF|Action F]].&lt;br /&gt;
&lt;br /&gt;
For the usable 16 bit text IDs see the table below, resp. for feature 48 see [[TextIDs]].&lt;br /&gt;
&lt;br /&gt;
Though these ranges are shared across all features, you should still set the proper feature you are using them for.&lt;br /&gt;
&lt;br /&gt;
||ID|Content&lt;br /&gt;
&lt;br /&gt;
C4xx|Set name of station class associated with station ID xx; this is the text above the preview (where otherwise TTD shows &amp;amp;quot;Orientation&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
C5xx|New station names, this changes the text &amp;amp;quot;number of platforms&amp;amp;quot; into the given text when the station with this ID from the current set is selected (i.e. xx=station-id from action 3 and 0)&lt;br /&gt;
&lt;br /&gt;
C9xx|Name of the house type of this ID. If both property 12 and this is set, the latest definition is used always. You should prefer setting property 12 instead of this, so executables translated with TTD Translator will show the name in the current language. However, if you can&#039;t find any suitable old TTD texts, this can be used to specify your custom name. Don&#039;t forget to set the same text for all parts of a multi-tile building.&lt;br /&gt;
&lt;br /&gt;
D0xx|Miscellaneous graphics texts, unique to each .grf file. Used for newobjects and several callbacks. Some callbacks as well as newobjects support IDs up to D3FF.&lt;br /&gt;
&lt;br /&gt;
D4xx|&#039;&#039;&#039;Never use in Action4&#039;&#039;&#039;, only for displaying textids in range D000-D3FF (grf specific), see [[TextIDs]]&lt;br /&gt;
&lt;br /&gt;
D8xx|&#039;&#039;&#039;Never use in Action4&#039;&#039;&#039;, only usable in Action0 features, see [[TextIDs]]&lt;br /&gt;
&lt;br /&gt;
DCxx|Set miscellaneous persistent GRF texts. Unlike the D0xx GRF texts, these IDs can be used to set properties. The text ID must be set before any action 0 references it.||&lt;br /&gt;
&lt;br /&gt;
The DCxx IDs are allocated internally when defined, and are persistent in the savegame data. Each .grf file gets its own separate map of these internal IDs and thus may set all 256 of them. &amp;amp;nbsp;However, only 1024 IDs are available in total, to be shared by all .grf files ever activated in the savegame. This means these IDs should be used as sparingly as possible. But use them when they are useful!&lt;br /&gt;
&lt;br /&gt;
===text===&lt;br /&gt;
&lt;br /&gt;
This is a list of zero-terminated strings, there must be as many strings as num-ent specifies.&lt;br /&gt;
&lt;br /&gt;
You can use the [http://www.ttdpatch.net/cgi-bin/str2hex.pl|str2hex converter] to generate the proper hex values.&lt;br /&gt;
&lt;br /&gt;
Alternatively, use grfcodec version 0.9.6 or later, which accepts literal strings in the .nfo. These are encoded exactly as written, in whatever encoding your text editor uses; if you need a 00, put it immediately after the literal string.&lt;br /&gt;
&lt;br /&gt;
For the supported encodings, format, and restrictions on what characters you may use, please see [[GRFActionsDetailed#Strings|GRFActionsDetailed]] and StringCodes.&lt;br /&gt;
&lt;br /&gt;
A large number of original TTD strings require a colour code in front of the actual string. You can also use these colour codes in most of your custom strings. Use them wisely! In case a string requires a colour code, the string will have the code displayed in front of the default text as listed in [[TextIDs]].Typically, a colour coded string starts with the escape character (backslash), followed by hex byte and then the actual text string itself. I.e. string 0001 (&amp;amp;quot;\94Off edge of map&amp;amp;quot;) has colour code 0x94 in front of the text string, which will colour it white. You can also put the plain hex byte outside the quoted string without having to escape it. &#039;&#039;94 &amp;amp;quot;Off edge of map&amp;amp;quot;&#039;&#039; would be the same as &#039;&#039;&amp;amp;quot;\94Off edge of map&amp;amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The following 16 colour codes are available for use:&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Code&#039;&#039;&#039;|&#039;&#039;&#039;Colour&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
88|Blue&lt;br /&gt;
&lt;br /&gt;
89|Light Grey&lt;br /&gt;
&lt;br /&gt;
8A|Yellow&lt;br /&gt;
&lt;br /&gt;
8B|Red&lt;br /&gt;
&lt;br /&gt;
8C|Light Purple&lt;br /&gt;
&lt;br /&gt;
8D|Beige&lt;br /&gt;
&lt;br /&gt;
8E|Light Orange&lt;br /&gt;
&lt;br /&gt;
90|Light Yellow&lt;br /&gt;
&lt;br /&gt;
91|Light Green&lt;br /&gt;
&lt;br /&gt;
92|Light Pink&lt;br /&gt;
&lt;br /&gt;
93|Brown&lt;br /&gt;
&lt;br /&gt;
94|White&lt;br /&gt;
&lt;br /&gt;
95|Light Blue&lt;br /&gt;
&lt;br /&gt;
96|Grey&lt;br /&gt;
&lt;br /&gt;
97|Purple&lt;br /&gt;
&lt;br /&gt;
98|Black||&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&#039;color:#808080&#039;&amp;gt;Something to go here&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=BaseCosts&amp;diff=830</id>
		<title>BaseCosts</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=BaseCosts&amp;diff=830"/>
		<updated>2010-08-02T19:47:02Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;List of all base costs&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Base Costs=&lt;br /&gt;
&lt;br /&gt;
This is a list of all base costs used by TTD.&lt;br /&gt;
&lt;br /&gt;
NFO ID is the ID to use for action 0 feature 8 property 08.&lt;br /&gt;
&lt;br /&gt;
Location is the address in the savegame structure.&lt;br /&gt;
&lt;br /&gt;
Default value is the initial value used at the game start.&lt;br /&gt;
&lt;br /&gt;
||ID|NFO ID|Location|Default|Used for&lt;br /&gt;
&lt;br /&gt;
0|&amp;lt;center&amp;gt;0&amp;lt;/center&amp;gt;|4B34|100|miscellaneous&lt;br /&gt;
&lt;br /&gt;
1|&amp;lt;center&amp;gt;1&amp;lt;/center&amp;gt;|4B3A|100|build track&lt;br /&gt;
&lt;br /&gt;
2|&amp;lt;center&amp;gt;2&amp;lt;/center&amp;gt;|4B40|95|build road&lt;br /&gt;
&lt;br /&gt;
3|&amp;lt;center&amp;gt;3&amp;lt;/center&amp;gt;|4B46|65|place signal&lt;br /&gt;
&lt;br /&gt;
4|&amp;lt;center&amp;gt;4&amp;lt;/center&amp;gt;|4B4C|275|build bridge tile&lt;br /&gt;
&lt;br /&gt;
5|&amp;lt;center&amp;gt;5&amp;lt;/center&amp;gt;|4B52|600|build rail depot, also affects &amp;amp;quot;build rail-waypoint&amp;amp;quot; (*)&lt;br /&gt;
&lt;br /&gt;
6|&amp;lt;center&amp;gt;6&amp;lt;/center&amp;gt;|4B58|500|build road depot&lt;br /&gt;
&lt;br /&gt;
7|&amp;lt;center&amp;gt;7&amp;lt;/center&amp;gt;|4B5E|700|build ship depot&lt;br /&gt;
&lt;br /&gt;
8|&amp;lt;center&amp;gt;8&amp;lt;/center&amp;gt;|4B64|450|build tunnel unit&lt;br /&gt;
&lt;br /&gt;
9|&amp;lt;center&amp;gt;9&amp;lt;/center&amp;gt;|4B6A|200|build platform unit (per tile)&lt;br /&gt;
&lt;br /&gt;
10|&amp;lt;center&amp;gt;A&amp;lt;/center&amp;gt;|4B70|180|build platform fixed (per platform)&lt;br /&gt;
&lt;br /&gt;
11|&amp;lt;center&amp;gt;B&amp;lt;/center&amp;gt;|4B76|600|build airport tile&lt;br /&gt;
&lt;br /&gt;
12|&amp;lt;center&amp;gt;C&amp;lt;/center&amp;gt;|4B7C|200|build bus station&lt;br /&gt;
&lt;br /&gt;
13|&amp;lt;center&amp;gt;D&amp;lt;/center&amp;gt;|4B82|200|build lorry area&lt;br /&gt;
&lt;br /&gt;
14|&amp;lt;center&amp;gt;E&amp;lt;/center&amp;gt;|4B88|350|build dock, also affects &amp;amp;quot;build buoy&amp;amp;quot; (*)&lt;br /&gt;
&lt;br /&gt;
15|&amp;lt;center&amp;gt;F&amp;lt;/center&amp;gt;|4B8E|400,000|locomotive purchase&lt;br /&gt;
&lt;br /&gt;
16|&amp;lt;center&amp;gt;10&amp;lt;/center&amp;gt;|4B94|2000|waggon purchase&lt;br /&gt;
&lt;br /&gt;
17|&amp;lt;center&amp;gt;11&amp;lt;/center&amp;gt;|4B9A|700,000|aircraft purchase&lt;br /&gt;
&lt;br /&gt;
18|&amp;lt;center&amp;gt;12&amp;lt;/center&amp;gt;|4BA0|14,000|road vehicle purchase&lt;br /&gt;
&lt;br /&gt;
19|&amp;lt;center&amp;gt;13&amp;lt;/center&amp;gt;|4BA6|65,000|ship purchase&lt;br /&gt;
&lt;br /&gt;
20|&amp;lt;center&amp;gt;14&amp;lt;/center&amp;gt;|4BAC|20|plant tree&lt;br /&gt;
&lt;br /&gt;
21|&amp;lt;center&amp;gt;15&amp;lt;/center&amp;gt;|4BB2|250|raise/lower land, also affects &amp;amp;quot;build foundation&amp;amp;quot; (*)&lt;br /&gt;
&lt;br /&gt;
22|&amp;lt;center&amp;gt;16&amp;lt;/center&amp;gt;|4BB8|20|clear grass&lt;br /&gt;
&lt;br /&gt;
23|&amp;lt;center&amp;gt;17&amp;lt;/center&amp;gt;|4BBE|40|clear rough land, also affects &amp;amp;quot;build/remove object&amp;amp;quot; (*)&lt;br /&gt;
&lt;br /&gt;
24|&amp;lt;center&amp;gt;18&amp;lt;/center&amp;gt;|4BC4|200|clear rocks&lt;br /&gt;
&lt;br /&gt;
25|&amp;lt;center&amp;gt;19&amp;lt;/center&amp;gt;|4BCA|500|clear fields&lt;br /&gt;
&lt;br /&gt;
26|&amp;lt;center&amp;gt;1A&amp;lt;/center&amp;gt;|4BD0|20|remove tree&lt;br /&gt;
&lt;br /&gt;
27|&amp;lt;center&amp;gt;1B&amp;lt;/center&amp;gt;|4BD6|-70|remove track&lt;br /&gt;
&lt;br /&gt;
28|&amp;lt;center&amp;gt;1C&amp;lt;/center&amp;gt;|4BDC|10|remove signal&lt;br /&gt;
&lt;br /&gt;
29|&amp;lt;center&amp;gt;1D&amp;lt;/center&amp;gt;|4BE2|50|remove bridge tile, also affects &amp;amp;quot;remove aqueduct&amp;amp;quot; (*)&lt;br /&gt;
&lt;br /&gt;
30|&amp;lt;center&amp;gt;1E&amp;lt;/center&amp;gt;|4BE8|80|remove rail depot, also affects &amp;amp;quot;remove rail-waypoint&amp;amp;quot; (*)&lt;br /&gt;
&lt;br /&gt;
31|&amp;lt;center&amp;gt;1F&amp;lt;/center&amp;gt;|4BEE|80|remove road depot&lt;br /&gt;
&lt;br /&gt;
32|&amp;lt;center&amp;gt;20&amp;lt;/center&amp;gt;|4BF4|90|remove ship depot&lt;br /&gt;
&lt;br /&gt;
33|&amp;lt;center&amp;gt;21&amp;lt;/center&amp;gt;|4BFA|30|remove tunnel tile&lt;br /&gt;
&lt;br /&gt;
34|&amp;lt;center&amp;gt;22&amp;lt;/center&amp;gt;|4C00|10,000|clear water, also affects &amp;amp;quot;build/remove canal/lock&amp;amp;quot; and &amp;amp;quot;build aqueduct&amp;amp;quot; (*)&lt;br /&gt;
&lt;br /&gt;
35|&amp;lt;center&amp;gt;23&amp;lt;/center&amp;gt;|4C06|50|remove platform tile&lt;br /&gt;
&lt;br /&gt;
36|&amp;lt;center&amp;gt;24&amp;lt;/center&amp;gt;|4C0C|30|remove airport tile&lt;br /&gt;
&lt;br /&gt;
37|&amp;lt;center&amp;gt;25&amp;lt;/center&amp;gt;|4C12|50|remove bus station&lt;br /&gt;
&lt;br /&gt;
38|&amp;lt;center&amp;gt;26&amp;lt;/center&amp;gt;|4C18|50|remove lorry area, also affects &amp;amp;quot;remove buoy&amp;amp;quot; (*) (**)&lt;br /&gt;
&lt;br /&gt;
39|&amp;lt;center&amp;gt;27&amp;lt;/center&amp;gt;|4C1E|55|remove dock&lt;br /&gt;
&lt;br /&gt;
40|&amp;lt;center&amp;gt;28&amp;lt;/center&amp;gt;|4C24|1600|remove house, also affects &amp;amp;quot;remove industry&amp;amp;quot; (*)&lt;br /&gt;
&lt;br /&gt;
41|&amp;lt;center&amp;gt;29&amp;lt;/center&amp;gt;|4C2A|40|remove road&lt;br /&gt;
&lt;br /&gt;
42|&amp;lt;center&amp;gt;2A&amp;lt;/center&amp;gt;|4C30|5600|steam engine running costs&lt;br /&gt;
&lt;br /&gt;
43|&amp;lt;center&amp;gt;2B&amp;lt;/center&amp;gt;|4C36|5200|diesel engine running costs&lt;br /&gt;
&lt;br /&gt;
44|&amp;lt;center&amp;gt;2C&amp;lt;/center&amp;gt;|4C3C|4800|electricengine running costs&lt;br /&gt;
&lt;br /&gt;
45|&amp;lt;center&amp;gt;2D&amp;lt;/center&amp;gt;|4C42|9600|aircraft running costs&lt;br /&gt;
&lt;br /&gt;
46|&amp;lt;center&amp;gt;2E&amp;lt;/center&amp;gt;|4C48|1600|road vehicle running costs&lt;br /&gt;
&lt;br /&gt;
47|&amp;lt;center&amp;gt;2F&amp;lt;/center&amp;gt;|4C4E|5600|ship running costs&lt;br /&gt;
&lt;br /&gt;
48|&amp;lt;center&amp;gt;30&amp;lt;/center&amp;gt;|4C54|1,000,000|funding industries, also affects &amp;amp;quot;stuff with local authority&amp;amp;quot;, &amp;amp;quot;build raw industry&amp;amp;quot; and &amp;amp;quot;fund town&amp;amp;quot; (*)&lt;br /&gt;
&lt;br /&gt;
49|&amp;lt;center&amp;gt;31&amp;lt;/center&amp;gt;|-|1600|remove industry|OTTD r18283&lt;br /&gt;
&lt;br /&gt;
50|&amp;lt;center&amp;gt;32&amp;lt;/center&amp;gt;|-|40|build object|OTTD r18283&lt;br /&gt;
&lt;br /&gt;
51|&amp;lt;center&amp;gt;33&amp;lt;/center&amp;gt;|-|40|remove object|OTTD r18283&lt;br /&gt;
&lt;br /&gt;
52|&amp;lt;center&amp;gt;34&amp;lt;/center&amp;gt;|-|600|build rail-waypoint|OTTD r18283&lt;br /&gt;
&lt;br /&gt;
53|&amp;lt;center&amp;gt;35&amp;lt;/center&amp;gt;|-|80|remove rail-waypoint|OTTD r18283&lt;br /&gt;
&lt;br /&gt;
54|&amp;lt;center&amp;gt;36&amp;lt;/center&amp;gt;|-|350|build buoy|OTTD r18283&lt;br /&gt;
&lt;br /&gt;
55|&amp;lt;center&amp;gt;37&amp;lt;/center&amp;gt;|-|50|remove buoy|OTTD r18283&lt;br /&gt;
&lt;br /&gt;
56|&amp;lt;center&amp;gt;38&amp;lt;/center&amp;gt;|-|1,000,000|stuff with town authority|OTTD r18283&lt;br /&gt;
&lt;br /&gt;
57|&amp;lt;center&amp;gt;39&amp;lt;/center&amp;gt;|-|250|build foundation|OTTD r18283&lt;br /&gt;
&lt;br /&gt;
58|&amp;lt;center&amp;gt;3A&amp;lt;/center&amp;gt;|-|8,000,000|build raw industry (in case prospecting is disabled)|OTTD r18283&lt;br /&gt;
&lt;br /&gt;
59|&amp;lt;center&amp;gt;3B&amp;lt;/center&amp;gt;|-|1,000,000|fund town|OTTD r18283&lt;br /&gt;
&lt;br /&gt;
60|&amp;lt;center&amp;gt;3C&amp;lt;/center&amp;gt;|-|5,000|build canal|OTTD r19720&lt;br /&gt;
&lt;br /&gt;
61|&amp;lt;center&amp;gt;3D&amp;lt;/center&amp;gt;|-|5,000|remove canal|OTTD r19720&lt;br /&gt;
&lt;br /&gt;
62|&amp;lt;center&amp;gt;3E&amp;lt;/center&amp;gt;|-|10,000|build aqueduct|OTTD r19720&lt;br /&gt;
&lt;br /&gt;
63|&amp;lt;center&amp;gt;3F&amp;lt;/center&amp;gt;|-|2,000|remove aqueduct|OTTD r19720&lt;br /&gt;
&lt;br /&gt;
64|&amp;lt;center&amp;gt;40&amp;lt;/center&amp;gt;|-|7,500|build lock|OTTD r19720&lt;br /&gt;
&lt;br /&gt;
65|&amp;lt;center&amp;gt;41&amp;lt;/center&amp;gt;|-|2,000|remove lock|OTTD r19720||&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt; if not set separately&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt; yes, &amp;amp;quot;remove buoy&amp;amp;quot; is mentioned in this line, not in the line below&lt;br /&gt;
&lt;br /&gt;
Note: The newly added base costs of OTTD only apply if a base cost modifier is set for them. E.g. if NewGRF only set a base cost modifier for terraforming, but none for building foundations, the modifier for terraforming will also apply to building foundations, as that was the base cost used before the new one was added.&lt;br /&gt;
&lt;br /&gt;
Note that some values may be adjusted by certain constant factors before being used by the game, but that is a property of the place where it&#039;s used, not the base cost as such.&lt;br /&gt;
&lt;br /&gt;
Also, all constructions costs and all running costs are subject to modification by the game difficulty settings.&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action14&amp;diff=297</id>
		<title>Action14</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action14&amp;diff=297"/>
		<updated>2010-07-31T17:25:24Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Static GRF Information&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 14=&lt;br /&gt;
&lt;br /&gt;
Static GRF Information&lt;br /&gt;
&lt;br /&gt;
{maketoc}&lt;br /&gt;
&lt;br /&gt;
-=Description=-&lt;br /&gt;
&lt;br /&gt;
This action allows to specify additional information about the GRF. Every piece of information is considered optional and non-essential, thus OpenTTD/TTDPatch will ignore unknown parts and not display any error. The action is also meant to allow interfacing non-official extensions/patches for OpenTTD.&lt;br /&gt;
&lt;br /&gt;
Currently this action can be used to define&lt;br /&gt;
* translations for the name and description of the GRF. (Those from action 8) (since OpenTTD r20250)&lt;br /&gt;
* the palette (DOS, Windows) the GRF needs, or whether the palette does not matter. (since OpenTTD r20254)&lt;br /&gt;
* the number, format and purpose of GRF parameters. (allowed values, names, descriptions, ...) (since OpenTTD 20255)&lt;br /&gt;
&lt;br /&gt;
The action itself is available since OpenTTD r20250. For TTDPatch you should currently skip it using action 9. The action is only allowed for GRF version 7 or above.&lt;br /&gt;
&lt;br /&gt;
The action is processed while scanning for GRFs and their action 8 descriptions. This scanning stops when encountering an action 8, thus action 14 needs to appear earlier in the GRF.&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
The data is provided using nestable chunks, and looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+&amp;amp;lt;sprite-number&amp;amp;gt; * &amp;amp;lt;length&amp;amp;gt; 14 &amp;amp;lt;chunks ...&amp;amp;gt; 00+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;amp;lt;chunks ...&amp;amp;gt; is one or a sequence of&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+&amp;amp;quot;C&amp;amp;quot; &amp;amp;lt;identifier&amp;amp;gt; &amp;amp;lt;chunks ...&amp;amp;gt; 00+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+&amp;amp;quot;B&amp;amp;quot; &amp;amp;lt;identifier&amp;amp;gt; &amp;amp;lt;length&amp;amp;gt; &amp;amp;lt;binary-data&amp;amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+&amp;amp;quot;T&amp;amp;quot; &amp;amp;lt;identifier&amp;amp;gt; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;lt;text&amp;amp;gt; 00+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These three types of chunks define branch nodes (choices) and binary and textual leafs in a tree-like information structure. A piece of information is identified by the path in the information tree. E.g. the text leaf node at &amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;DESC&amp;amp;quot; provides translatable descriptions for the GRF. It does not matter how many action 14 appear in a GRF, and which information is defined in which. Information with different identifier paths or same identifier paths (but e.g. different language-ids) can be set in the same action 14 or in multiple. If information is assigned to the same identifier-path multiple times, the information adds up resp. the last set information wins.&lt;br /&gt;
&lt;br /&gt;
Chunks with unknown identifiers are just skipped including their subchunks. Following chunks are processed nevertheless.&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes in the action&lt;br /&gt;
&lt;br /&gt;
14|B|Action 14&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;identifier&amp;amp;gt;|4*B|Unique identifier for the chunk (see below)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;chunks ...&amp;amp;gt;|*|Any number of sub chunks.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|W|Number of bytes of binary data following.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;binary-data&amp;amp;gt;|length*B|Binary data&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;language-id&amp;amp;gt;|B|Which of TTD&#039;s languages the text is used for. (only GRF version &amp;amp;gt;= 7 language codes allowed)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;text&amp;amp;gt;|S|Text data||&lt;br /&gt;
&lt;br /&gt;
== Custom information for non-official extensions/patches (&amp;amp;quot;CSTM&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;extension-id&amp;amp;gt; -&amp;amp;gt; ...)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;CSTM&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;lt;extension-id&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;... whatever suits you ...&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Due to the purely-optional character of action 14 it is especially meant for non-official extensions/patches. However, to avoid conflicts custom additions should go into the &amp;amp;quot;CSTM&amp;amp;quot; chunk. Every extension may define its own subchunk with its own custom 4 byte &amp;amp;lt;extension-id&amp;amp;gt; below the &amp;amp;quot;CSTM&amp;amp;quot; chunk. The format of the subchunks below the &amp;amp;lt;extension-id&amp;amp;gt; chunk is freely defineable.&lt;br /&gt;
&lt;br /&gt;
The information there could be used e.g. to notify an extension that the GRF knows about it. Consecutively the extension might then enable custom GRF features and notify the GRF about their existance e.g. via variable 8D. Versions of OpenTTD without the extension will then just skip the &amp;amp;quot;CSTM&amp;amp;quot; chunk and return the usual value in variable 8D.&lt;br /&gt;
&lt;br /&gt;
== GRF name (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;NAME&amp;amp;quot;) and description (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;DESC&amp;amp;quot;)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;T&amp;amp;quot; &amp;amp;quot;NAME&amp;amp;quot; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;quot;Translatable GRF name&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;T&amp;amp;quot; &amp;amp;quot;DESC&amp;amp;quot; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;quot;Translatable GRF description&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below the top-level chunk &amp;amp;quot;INFO&amp;amp;quot; you can use the leaf-chunks &amp;amp;quot;NAME&amp;amp;quot; and &amp;amp;quot;DESC&amp;amp;quot; to define name and description for additional languages. The information provided in action 8 is used for &amp;amp;quot;other&amp;amp;quot; languages (id 7F).&lt;br /&gt;
&lt;br /&gt;
== GRF palette (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PALS&amp;amp;quot;)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;B&amp;amp;quot; &amp;amp;quot;PALS&amp;amp;quot; \w1 &amp;amp;lt;palette&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Specifies the palette the sprites in the GRF are meant for.&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;&amp;amp;lt;palette&amp;amp;gt;&#039;&#039;&#039;|&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;D&amp;amp;quot;|DOS palette&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;W&amp;amp;quot;|Windows palette&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;A&amp;amp;quot;|Any palette. (e.g. when the GRF does not contain any sprites)||&lt;br /&gt;
&lt;br /&gt;
== GRF version (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;VRSN&amp;amp;quot;)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;B&amp;amp;quot; &amp;amp;quot;VRSN&amp;amp;quot; \w4 \d&amp;amp;lt;version&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Specifies the version of the GRF. This version is then used (by OpenTTD) to internally order GRFs with the same GRF ID. That order will determine which GRF is loading as &amp;amp;quot;compatible&amp;amp;quot; GRF and which GRFs to show in the list of GRFs. By default a GRF has version 0.&lt;br /&gt;
&lt;br /&gt;
If all GRFs (with the same GRF ID) have version 0 all will be shown in the list of GRFs. If the highest version is shared by multiple GRFs one is randomly chosen as &amp;amp;quot;compatible&amp;amp;quot; GRF. As such it is important to prevent releasing multiple GRFs with the same version number.&lt;br /&gt;
&lt;br /&gt;
== GRF parameters==&lt;br /&gt;
&lt;br /&gt;
This section describes how to specify information about GRF parameters, and what settings are stored in them. By default a GRF comes with 128 settings, that is a dword setting for every of the 128 GRF parameters.&lt;br /&gt;
&lt;br /&gt;
=== Number of settings (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;NPAR&amp;amp;quot;)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;B&amp;amp;quot; &amp;amp;quot;NPAR&amp;amp;quot; \w1 &amp;amp;lt;number-of-settings&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Defines the number of settings a GRF provides. This is independant from the number of allowed GRF parameters, as multiple settings might go into the same GRF parameter (e.g. bitmasks).&lt;br /&gt;
&lt;br /&gt;
=== Setting name (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PARA&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;setting-number&amp;amp;gt; -&amp;amp;gt; &amp;amp;quot;NAME&amp;amp;quot;) and description (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PARA&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;setting-number&amp;amp;gt; -&amp;amp;gt; &amp;amp;quot;DESC&amp;amp;quot;)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;PARA&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; \d&amp;amp;lt;setting-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;T&amp;amp;quot; &amp;amp;quot;NAME&amp;amp;quot; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;quot;Name of setting&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;T&amp;amp;quot; &amp;amp;quot;DESC&amp;amp;quot; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;quot;Setting description&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Defines a name for a setting.&lt;br /&gt;
&lt;br /&gt;
The settings are numbered and identified using &amp;amp;lt;setting-number&amp;amp;gt;. Valid values are 0 up to (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;NPAR&amp;amp;quot;) - 1.&lt;br /&gt;
&lt;br /&gt;
=== Setting to GRF parameter mapping (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PARA&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;setting-number&amp;amp;gt; -&amp;amp;gt; &amp;amp;quot;MASK&amp;amp;quot;)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;PARA&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; \d&amp;amp;lt;setting-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;B&amp;amp;quot; &amp;amp;quot;MASK&amp;amp;quot; \w&amp;amp;lt;length&amp;amp;gt; \b &amp;amp;lt;grf-parameter&amp;amp;gt; [ \b &amp;amp;lt;first-bit&amp;amp;gt; [ \b &amp;amp;lt;num-bit&amp;amp;gt; ] ]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Specifies which GRF parameter is used to store a setting in.&lt;br /&gt;
&lt;br /&gt;
||&amp;amp;lt;length&amp;amp;gt;|A chunk length of 1 to 3 is allowed.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;grf-parameter&amp;amp;gt;|GRF parameter (0 to 127) to store the setting in. Default value is the same as &amp;amp;lt;setting-number&amp;amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;first-bit&amp;amp;gt;|First bit in the GRF parameter to use for the setting. Default value is &amp;amp;quot;0&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;num-bit&amp;amp;gt;|Number of bits to use for the setting in the GRF parameter. Default value is &amp;amp;quot;32&amp;amp;quot;.||&lt;br /&gt;
&lt;br /&gt;
If you do not specify &amp;amp;lt;first-bit&amp;amp;gt; and &amp;amp;lt;num-bit&amp;amp;gt; the setting uses the whole GRF parameter by default. If you do not specify any &amp;amp;quot;MASK&amp;amp;quot; chunk at all, the setting will use the GRF parameter with the same number as &amp;amp;lt;setting-number&amp;amp;gt;.&lt;br /&gt;
&lt;br /&gt;
So if you do not need to store multiple settings in one parameter, you do not need &amp;amp;quot;MASK&amp;amp;quot; chunks.&lt;br /&gt;
&lt;br /&gt;
Note: You cannot store a setting across/using multiple GRF parameters.&lt;br /&gt;
&lt;br /&gt;
=== Setting type (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PARA&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;setting-number&amp;amp;gt; -&amp;amp;gt; &amp;amp;quot;TYPE&amp;amp;quot;)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;PARA&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; \d&amp;amp;lt;setting-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;B&amp;amp;quot; &amp;amp;quot;TYPE&amp;amp;quot; \w1 &amp;amp;lt;setting-type&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Specifies the type of a setting.&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;&amp;amp;lt;setting-type&amp;amp;gt;&#039;&#039;&#039;|&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
0|Integer (unsigned) or enumeration. The GUI displays &amp;amp;quot;&amp;amp;lt;&amp;amp;quot; and &amp;amp;quot;&amp;amp;gt;&amp;amp;quot; buttons to change the setting resp. allows entering a value from a query window.&lt;br /&gt;
&lt;br /&gt;
1|Boolean. The GUI displays a toggle button to switch the setting on or off.||&lt;br /&gt;
&lt;br /&gt;
The defaut value is &amp;amp;quot;0&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Allowed value range (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PARA&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;setting-number&amp;amp;gt; -&amp;amp;gt; &amp;amp;quot;LIMI&amp;amp;quot;)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;PARA&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; \d&amp;amp;lt;setting-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;B&amp;amp;quot; &amp;amp;quot;LIMI&amp;amp;quot; \w8 \d&amp;amp;lt;minimum-value&amp;amp;gt; \d&amp;amp;lt;maximum-value&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets minimal and maximal allowed value for integer/enumeration settings.&lt;br /&gt;
&lt;br /&gt;
The default values are &amp;amp;quot;0&amp;amp;quot; resp. &amp;amp;quot;&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;2 &amp;lt;pre&amp;gt; 32 - 1&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Enumeration values (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PARA&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;setting-number&amp;amp;gt; -&amp;amp;gt; &amp;amp;quot;VALU&amp;amp;quot;)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;PARA&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; \d&amp;amp;lt;setting-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;VALU&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;T&amp;amp;quot; \d&amp;amp;lt;setting-value&amp;amp;gt; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;quot;Enumeration value&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;...&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chunk allows you to specify texts to display instead of the raw value for integer/enumeration. You can also specify texts only for some of the valid values. So if a setting e.g. allows values betweeen 0 to 42 you can instruct the GUI to show &amp;amp;quot;none&amp;amp;quot; instead of &amp;amp;quot;0&amp;amp;quot;.&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action14&amp;diff=298</id>
		<title>Action14</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action14&amp;diff=298"/>
		<updated>2010-07-31T14:41:09Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Static GRF Information&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 14=&lt;br /&gt;
&lt;br /&gt;
Static GRF Information&lt;br /&gt;
&lt;br /&gt;
{maketoc}&lt;br /&gt;
&lt;br /&gt;
-=Description=-&lt;br /&gt;
&lt;br /&gt;
This action allows to specify additional information about the GRF. Every piece of information is considered optional and non-essential, thus OpenTTD/TTDPatch will ignore unknown parts and not display any error. The action is also meant to allow interfacing non-official extensions/patches for OpenTTD.&lt;br /&gt;
&lt;br /&gt;
Currently this action can be used to define&lt;br /&gt;
* translations for the name and description of the GRF. (Those from action 8) (since OpenTTD r20250)&lt;br /&gt;
* the palette (DOS, Windows) the GRF needs, or whether the palette does not matter. (since OpenTTD r20254)&lt;br /&gt;
* the number, format and purpose of GRF parameters. (allowed values, names, descriptions, ...) (since OpenTTD 20255)&lt;br /&gt;
&lt;br /&gt;
The action itself is available since OpenTTD r20250. For TTDPatch you should currently skip it using action 9. The action is only allowed for GRF version 7 or above.&lt;br /&gt;
&lt;br /&gt;
The action is processed while scanning for GRFs and their action 8 descriptions. This scanning stops when encountering an action 8, thus action 14 needs to appear earlier in the GRF.&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
The data is provided using nestable chunks, and looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+&amp;amp;lt;sprite-number&amp;amp;gt; * &amp;amp;lt;length&amp;amp;gt; 14 &amp;amp;lt;chunks ...&amp;amp;gt; 00+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;amp;lt;chunks ...&amp;amp;gt; is one or a sequence of&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+&amp;amp;quot;C&amp;amp;quot; &amp;amp;lt;identifier&amp;amp;gt; &amp;amp;lt;chunks ...&amp;amp;gt; 00+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+&amp;amp;quot;B&amp;amp;quot; &amp;amp;lt;identifier&amp;amp;gt; &amp;amp;lt;length&amp;amp;gt; &amp;amp;lt;binary-data&amp;amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+&amp;amp;quot;T&amp;amp;quot; &amp;amp;lt;identifier&amp;amp;gt; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;lt;text&amp;amp;gt; 00+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These three types of chunks define branch nodes (choices) and binary and textual leafs in a tree-like information structure. A piece of information is identified by the path in the information tree. E.g. the text leaf node at &amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;DESC&amp;amp;quot; provides translatable descriptions for the GRF. It does not matter how many action 14 appear in a GRF, and which information is defined in which. Information with different identifier paths or same identifier paths (but e.g. different language-ids) can be set in the same action 14 or in multiple. If information is assigned to the same identifier-path multiple times, the information adds up resp. the last set information wins.&lt;br /&gt;
&lt;br /&gt;
Chunks with unknown identifiers are just skipped including their subchunks. Following chunks are processed nevertheless.&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes in the action&lt;br /&gt;
&lt;br /&gt;
14|B|Action 14&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;identifier&amp;amp;gt;|4*B|Unique identifier for the chunk (see below)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;chunks ...&amp;amp;gt;|*|Any number of sub chunks.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|W|Number of bytes of binary data following.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;binary-data&amp;amp;gt;|length*B|Binary data&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;language-id&amp;amp;gt;|B|Which of TTD&#039;s languages the text is used for. (only GRF version &amp;amp;gt;= 7 language codes allowed)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;text&amp;amp;gt;|S|Text data||&lt;br /&gt;
&lt;br /&gt;
== Custom information for non-official extensions/patches (&amp;amp;quot;CSTM&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;extension-id&amp;amp;gt; -&amp;amp;gt; ...)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;CSTM&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;lt;extension-id&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;... whatever suits you ...&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Due to the purely-optional character of action 14 it is especially meant for non-official extensions/patches. However, to avoid conflicts custom additions should go into the &amp;amp;quot;CSTM&amp;amp;quot; chunk. Every extension may define its own subchunk with its own custom 4 byte &amp;amp;lt;extension-id&amp;amp;gt; below the &amp;amp;quot;CSTM&amp;amp;quot; chunk. The format of the subchunks below the &amp;amp;lt;extension-id&amp;amp;gt; chunk is freely defineable.&lt;br /&gt;
&lt;br /&gt;
The information there could be used e.g. to notify an extension that the GRF knows about it. Consecutively the extension might then enable custom GRF features and notify the GRF about their existance e.g. via variable 8D. Versions of OpenTTD without the extension will then just skip the &amp;amp;quot;CSTM&amp;amp;quot; chunk and return the usual value in variable 8D.&lt;br /&gt;
&lt;br /&gt;
== GRF name (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;NAME&amp;amp;quot;) and description (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;DESC&amp;amp;quot;)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;T&amp;amp;quot; &amp;amp;quot;NAME&amp;amp;quot; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;quot;Translatable GRF name&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;T&amp;amp;quot; &amp;amp;quot;DESC&amp;amp;quot; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;quot;Translatable GRF description&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below the top-level chunk &amp;amp;quot;INFO&amp;amp;quot; you can use the leaf-chunks &amp;amp;quot;NAME&amp;amp;quot; and &amp;amp;quot;DESC&amp;amp;quot; to define name and description for additional languages. The information provided in action 8 is used for &amp;amp;quot;other&amp;amp;quot; languages (id 7F).&lt;br /&gt;
&lt;br /&gt;
== GRF palette (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PALS&amp;amp;quot;)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;B&amp;amp;quot; &amp;amp;quot;PALS&amp;amp;quot; \w1 &amp;amp;lt;palette&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Specifies the palette the sprites in the GRF are meant for.&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;&amp;amp;lt;palette&amp;amp;gt;&#039;&#039;&#039;|&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;D&amp;amp;quot;|DOS palette&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;W&amp;amp;quot;|Windows palette&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;A&amp;amp;quot;|Any palette. (e.g. when the GRF does not contain any sprites)||&lt;br /&gt;
&lt;br /&gt;
== GRF version (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;VRSN&amp;amp;quot;)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;B&amp;amp;quot; &amp;amp;quot;VRSN&amp;amp;quot; \w4 \d&amp;amp;lt;version&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Specifies the version of the GRF. This version is then used (by OpenTTD) to internally order GRFs with the same GRF ID. That order will determine which GRF is loading as &amp;amp;quot;compatible&amp;amp;quot; GRF and which GRFs to show in the list of GRFs. By default a GRF has version 0.&lt;br /&gt;
&lt;br /&gt;
If all GRFs (with the same GRF ID) have version 0 all will be shown in the list of GRFs. If the highest version is shared by multiple GRFs one is randomly chosen as &amp;amp;quot;compatible&amp;amp;quot; GRF. As such it is important to prevent releasing multiple GRFs with the same version number.&lt;br /&gt;
&lt;br /&gt;
== GRF parameters==&lt;br /&gt;
&lt;br /&gt;
This section describes how to specify information about GRF parameters, and what settings are stored in them. By default a GRF comes with 128 settings, that is a dword setting for every of the 128 GRF parameters.&lt;br /&gt;
&lt;br /&gt;
=== Number of settings (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;NPAR&amp;amp;quot;)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;B&amp;amp;quot; &amp;amp;quot;NPAR&amp;amp;quot; \w1 &amp;amp;lt;number-of-settings&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Defines the number of settings a GRF provides. This is independant from the number of allowed GRF parameters, as multiple settings might go into the same GRF parameter (e.g. bitmasks).&lt;br /&gt;
&lt;br /&gt;
=== Setting name (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PARA&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;setting-number&amp;amp;gt; -&amp;amp;gt; &amp;amp;quot;NAME&amp;amp;quot;) and description (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PARA&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;setting-number&amp;amp;gt; -&amp;amp;gt; &amp;amp;quot;DESC&amp;amp;quot;)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;PARA&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; \d&amp;amp;lt;setting-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;T&amp;amp;quot; &amp;amp;quot;NAME&amp;amp;quot; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;quot;Name of setting&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;T&amp;amp;quot; &amp;amp;quot;DESC&amp;amp;quot; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;quot;Setting description&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Defines a name for a setting.&lt;br /&gt;
&lt;br /&gt;
The settings are numbered and identified using &amp;amp;lt;setting-number&amp;amp;gt;. Valid values are 0 up to (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;NPAR&amp;amp;quot;) - 1.&lt;br /&gt;
&lt;br /&gt;
=== Setting to GRF parameter mapping (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PARA&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;setting-number&amp;amp;gt; -&amp;amp;gt; &amp;amp;quot;MASK&amp;amp;quot;)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;PARA&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; \d&amp;amp;lt;setting-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;B&amp;amp;quot; &amp;amp;quot;MASK&amp;amp;quot; \w&amp;amp;lt;length&amp;amp;gt; \b &amp;amp;lt;grf-parameter&amp;amp;gt; [ \b &amp;amp;lt;first-bit&amp;amp;gt; [ \b &amp;amp;lt;num-bit&amp;amp;gt; ] ]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Specifies which GRF parameter is used to store a setting in.&lt;br /&gt;
&lt;br /&gt;
||&amp;amp;lt;length&amp;amp;gt;|A chunk length of 1 to 3 is allowed.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;grf-parameter&amp;amp;gt;|GRF parameter (0 to 127) to store the setting in. Default value is the same as &amp;amp;lt;setting-number&amp;amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;first-bit&amp;amp;gt;|First bit in the GRF parameter to use for the setting. Default value is &amp;amp;quot;0&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;num-bit&amp;amp;gt;|Number of bits to use for the setting in the GRF parameter. Default value is &amp;amp;quot;32&amp;amp;quot;.||&lt;br /&gt;
&lt;br /&gt;
If you do not specify &amp;amp;lt;first-bit&amp;amp;gt; and &amp;amp;lt;num-bit&amp;amp;gt; the setting uses the whole GRF parameter by default. If you do not specify any &amp;amp;quot;MASK&amp;amp;quot; chunk at all, the setting will use the GRF parameter with the same number as &amp;amp;lt;setting-number&amp;amp;gt;.&lt;br /&gt;
&lt;br /&gt;
So if you do not need to store multiple settings in one parameter, you do not need &amp;amp;quot;MASK&amp;amp;quot; chunks.&lt;br /&gt;
&lt;br /&gt;
Note: You cannot store a setting across/using multiple GRF parameters.&lt;br /&gt;
&lt;br /&gt;
=== Setting type (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PARA&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;setting-number&amp;amp;gt; -&amp;amp;gt; &amp;amp;quot;TYPE&amp;amp;quot;)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;PARA&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; \d&amp;amp;lt;setting-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;B&amp;amp;quot; &amp;amp;quot;TYPE&amp;amp;quot; \w1 &amp;amp;lt;setting-type&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Specifies the type of a setting.&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;&amp;amp;lt;setting-type&amp;amp;gt;&#039;&#039;&#039;|&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
0|Integer (unsigned) or enumeration. The GUI displays &amp;amp;quot;&amp;amp;lt;&amp;amp;quot; and &amp;amp;quot;&amp;amp;gt;&amp;amp;quot; buttons to change the setting resp. allows entering a value from a query window.&lt;br /&gt;
&lt;br /&gt;
1|Boolean. The GUI displays a toggle button to switch the setting on or off.||&lt;br /&gt;
&lt;br /&gt;
The defaut value is &amp;amp;quot;0&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Allowed value range (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PARA&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;setting-number&amp;amp;gt; -&amp;amp;gt; &amp;amp;quot;LIMI&amp;amp;quot;)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;PARA&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; \d&amp;amp;lt;setting-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;B&amp;amp;quot; &amp;amp;quot;LIMI&amp;amp;quot; \d&amp;amp;lt;minimum-value&amp;amp;gt; \d&amp;amp;lt;maximum-value&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets minimal and maximal allowed value for integer/enumeration settings.&lt;br /&gt;
&lt;br /&gt;
The default values are &amp;amp;quot;0&amp;amp;quot; resp. &amp;amp;quot;&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;2 &amp;lt;pre&amp;gt; 32 - 1&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Enumeration values (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PARA&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;setting-number&amp;amp;gt; -&amp;amp;gt; &amp;amp;quot;VALU&amp;amp;quot;)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;PARA&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; \d&amp;amp;lt;setting-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;VALU&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;T&amp;amp;quot; \d&amp;amp;lt;setting-value&amp;amp;gt; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;quot;Enumeration value&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;...&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chunk allows you to specify texts to display instead of the raw value for integer/enumeration. You can also specify texts only for some of the valid values. So if a setting e.g. allows values betweeen 0 to 42 you can instruct the GUI to show &amp;amp;quot;none&amp;amp;quot; instead of &amp;amp;quot;0&amp;amp;quot;.&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action14&amp;diff=299</id>
		<title>Action14</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action14&amp;diff=299"/>
		<updated>2010-07-31T14:29:51Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Static GRF Information&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 14=&lt;br /&gt;
&lt;br /&gt;
Static GRF Information&lt;br /&gt;
&lt;br /&gt;
{maketoc}&lt;br /&gt;
&lt;br /&gt;
-=Description=-&lt;br /&gt;
&lt;br /&gt;
This action allows to specify additional information about the GRF. Every piece of information is considered optional and non-essential, thus OpenTTD/TTDPatch will ignore unknown parts and not display any error. The action is also meant to allow interfacing non-official extensions/patches for OpenTTD.&lt;br /&gt;
&lt;br /&gt;
Currently this action can be used to define&lt;br /&gt;
* translations for the name and description of the GRF. (Those from action 8) (since OpenTTD r20250)&lt;br /&gt;
* the palette (DOS, Windows) the GRF needs, or whether the palette does not matter. (since OpenTTD r20254)&lt;br /&gt;
* the number, format and purpose of GRF parameters. (allowed values, names, descriptions, ...) (since OpenTTD 20255)&lt;br /&gt;
&lt;br /&gt;
The action itself is available since OpenTTD r20250. For TTDPatch you should currently skip it using action 9. The action is only allowed for GRF version 7 or above.&lt;br /&gt;
&lt;br /&gt;
The action is processed while scanning for GRFs and their action 8 descriptions. This scanning stops when encountering an action 8, thus action 14 needs to appear earlier in the GRF.&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
The data is provided using nestable chunks, and looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+&amp;amp;lt;sprite-number&amp;amp;gt; * &amp;amp;lt;length&amp;amp;gt; 14 &amp;amp;lt;chunks ...&amp;amp;gt; 00+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;amp;lt;chunks ...&amp;amp;gt; is one or a sequence of&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+&amp;amp;quot;C&amp;amp;quot; &amp;amp;lt;identifier&amp;amp;gt; &amp;amp;lt;chunks ...&amp;amp;gt; 00+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+&amp;amp;quot;B&amp;amp;quot; &amp;amp;lt;identifier&amp;amp;gt; &amp;amp;lt;length&amp;amp;gt; &amp;amp;lt;binary-data&amp;amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+&amp;amp;quot;T&amp;amp;quot; &amp;amp;lt;identifier&amp;amp;gt; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;lt;text&amp;amp;gt; 00+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These three types of chunks define branch nodes (choices) and binary and textual leafs in a tree-like information structure. A piece of information is identified by the path in the information tree. E.g. the text leaf node at &amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;DESC&amp;amp;quot; provides translatable descriptions for the GRF. It does not matter how many action 14 appear in a GRF, and which information is defined in which. Information with different identifier paths or same identifier paths (but e.g. different language-ids) can be set in the same action 14 or in multiple. If information is assigned to the same identifier-path multiple times, the information adds up resp. the last set information wins.&lt;br /&gt;
&lt;br /&gt;
Chunks with unknown identifiers are just skipped including their subchunks. Following chunks are processed nevertheless.&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes in the action&lt;br /&gt;
&lt;br /&gt;
14|B|Action 14&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;identifier&amp;amp;gt;|4*B|Unique identifier for the chunk (see below)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;chunks ...&amp;amp;gt;|*|Any number of sub chunks.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|W|Number of bytes of binary data following.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;binary-data&amp;amp;gt;|length*B|Binary data&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;language-id&amp;amp;gt;|B|Which of TTD&#039;s languages the text is used for. (only GRF version &amp;amp;gt;= 7 language codes allowed)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;text&amp;amp;gt;|S|Text data||&lt;br /&gt;
&lt;br /&gt;
== Custom information for non-official extensions/patches (&amp;amp;quot;CSTM&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;extension-id&amp;amp;gt; -&amp;amp;gt; ...)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;CSTM&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;lt;extension-id&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;... whatever suits you ...&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Due to the purely-optional character of action 14 it is especially meant for non-official extensions/patches. However, to avoid conflicts custom additions should go into the &amp;amp;quot;CSTM&amp;amp;quot; chunk. Every extension may define its own subchunk with its own custom 4 byte &amp;amp;lt;extension-id&amp;amp;gt; below the &amp;amp;quot;CSTM&amp;amp;quot; chunk. The format of the subchunks below the &amp;amp;lt;extension-id&amp;amp;gt; chunk is freely defineable.&lt;br /&gt;
&lt;br /&gt;
The information there could be used e.g. to notify an extension that the GRF knows about it. Consecutively the extension might then enable custom GRF features and notify the GRF about their existance e.g. via variable 8D. Versions of OpenTTD without the extension will then just skip the &amp;amp;quot;CSTM&amp;amp;quot; chunk and return the usual value in variable 8D.&lt;br /&gt;
&lt;br /&gt;
== GRF name (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;NAME&amp;amp;quot;) and description (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;DESC&amp;amp;quot;)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;T&amp;amp;quot; &amp;amp;quot;NAME&amp;amp;quot; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;quot;Translatable GRF name&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;T&amp;amp;quot; &amp;amp;quot;DESC&amp;amp;quot; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;quot;Translatable GRF description&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below the top-level chunk &amp;amp;quot;INFO&amp;amp;quot; you can use the leaf-chunks &amp;amp;quot;NAME&amp;amp;quot; and &amp;amp;quot;DESC&amp;amp;quot; to define name and description for additional languages. The information provided in action 8 is used for &amp;amp;quot;other&amp;amp;quot; languages (id 7F).&lt;br /&gt;
&lt;br /&gt;
== GRF palette (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PALS&amp;amp;quot;)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;B&amp;amp;quot; &amp;amp;quot;PALS&amp;amp;quot; \w1 &amp;amp;lt;palette&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Specifies the palette the sprites in the GRF are meant for.&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;&amp;amp;lt;palette&amp;amp;gt;&#039;&#039;&#039;|&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;D&amp;amp;quot;|DOS palette&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;W&amp;amp;quot;|Windows palette&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;A&amp;amp;quot;|Any palette. (e.g. when the GRF does not contain any sprites)||&lt;br /&gt;
&lt;br /&gt;
== GRF parameters==&lt;br /&gt;
&lt;br /&gt;
This section describes how to specify information about GRF parameters, and what settings are stored in them. By default a GRF comes with 128 settings, that is a dword setting for every of the 128 GRF parameters.&lt;br /&gt;
&lt;br /&gt;
=== Number of settings (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;NPAR&amp;amp;quot;)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;B&amp;amp;quot; &amp;amp;quot;NPAR&amp;amp;quot; \w1 &amp;amp;lt;number-of-settings&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Defines the number of settings a GRF provides. This is independant from the number of allowed GRF parameters, as multiple settings might go into the same GRF parameter (e.g. bitmasks).&lt;br /&gt;
&lt;br /&gt;
=== Setting name (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PARA&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;setting-number&amp;amp;gt; -&amp;amp;gt; &amp;amp;quot;NAME&amp;amp;quot;) and description (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PARA&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;setting-number&amp;amp;gt; -&amp;amp;gt; &amp;amp;quot;DESC&amp;amp;quot;)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;PARA&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; \d&amp;amp;lt;setting-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;T&amp;amp;quot; &amp;amp;quot;NAME&amp;amp;quot; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;quot;Name of setting&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;T&amp;amp;quot; &amp;amp;quot;DESC&amp;amp;quot; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;quot;Setting description&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Defines a name for a setting.&lt;br /&gt;
&lt;br /&gt;
The settings are numbered and identified using &amp;amp;lt;setting-number&amp;amp;gt;. Valid values are 0 up to (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;NPAR&amp;amp;quot;) - 1.&lt;br /&gt;
&lt;br /&gt;
=== Setting to GRF parameter mapping (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PARA&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;setting-number&amp;amp;gt; -&amp;amp;gt; &amp;amp;quot;MASK&amp;amp;quot;)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;PARA&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; \d&amp;amp;lt;setting-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;B&amp;amp;quot; &amp;amp;quot;MASK&amp;amp;quot; \w&amp;amp;lt;length&amp;amp;gt; \b &amp;amp;lt;grf-parameter&amp;amp;gt; [ \b &amp;amp;lt;first-bit&amp;amp;gt; [ \b &amp;amp;lt;num-bit&amp;amp;gt; ] ]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Specifies which GRF parameter is used to store a setting in.&lt;br /&gt;
&lt;br /&gt;
||&amp;amp;lt;length&amp;amp;gt;|A chunk length of 1 to 3 is allowed.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;grf-parameter&amp;amp;gt;|GRF parameter (0 to 127) to store the setting in. Default value is the same as &amp;amp;lt;setting-number&amp;amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;first-bit&amp;amp;gt;|First bit in the GRF parameter to use for the setting. Default value is &amp;amp;quot;0&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;num-bit&amp;amp;gt;|Number of bits to use for the setting in the GRF parameter. Default value is &amp;amp;quot;32&amp;amp;quot;.||&lt;br /&gt;
&lt;br /&gt;
If you do not specify &amp;amp;lt;first-bit&amp;amp;gt; and &amp;amp;lt;num-bit&amp;amp;gt; the setting uses the whole GRF parameter by default. If you do not specify any &amp;amp;quot;MASK&amp;amp;quot; chunk at all, the setting will use the GRF parameter with the same number as &amp;amp;lt;setting-number&amp;amp;gt;.&lt;br /&gt;
&lt;br /&gt;
So if you do not need to store multiple settings in one parameter, you do not need &amp;amp;quot;MASK&amp;amp;quot; chunks.&lt;br /&gt;
&lt;br /&gt;
Note: You cannot store a setting across/using multiple GRF parameters.&lt;br /&gt;
&lt;br /&gt;
=== Setting type (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PARA&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;setting-number&amp;amp;gt; -&amp;amp;gt; &amp;amp;quot;TYPE&amp;amp;quot;)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;PARA&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; \d&amp;amp;lt;setting-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;B&amp;amp;quot; &amp;amp;quot;TYPE&amp;amp;quot; \w1 &amp;amp;lt;setting-type&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Specifies the type of a setting.&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;&amp;amp;lt;setting-type&amp;amp;gt;&#039;&#039;&#039;|&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
0|Integer (unsigned) or enumeration. The GUI displays &amp;amp;quot;&amp;amp;lt;&amp;amp;quot; and &amp;amp;quot;&amp;amp;gt;&amp;amp;quot; buttons to change the setting resp. allows entering a value from a query window.&lt;br /&gt;
&lt;br /&gt;
1|Boolean. The GUI displays a toggle button to switch the setting on or off.||&lt;br /&gt;
&lt;br /&gt;
The defaut value is &amp;amp;quot;0&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Allowed value range (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PARA&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;setting-number&amp;amp;gt; -&amp;amp;gt; &amp;amp;quot;LIMI&amp;amp;quot;)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;PARA&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; \d&amp;amp;lt;setting-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;B&amp;amp;quot; &amp;amp;quot;LIMI&amp;amp;quot; \d&amp;amp;lt;minimum-value&amp;amp;gt; \d&amp;amp;lt;maximum-value&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets minimal and maximal allowed value for integer/enumeration settings.&lt;br /&gt;
&lt;br /&gt;
The default values are &amp;amp;quot;0&amp;amp;quot; resp. &amp;amp;quot;&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;2 &amp;lt;pre&amp;gt; 32 - 1&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Enumeration values (&amp;amp;quot;INFO&amp;amp;quot; -&amp;amp;gt; &amp;amp;quot;PARA&amp;amp;quot; -&amp;amp;gt; &amp;amp;lt;setting-number&amp;amp;gt; -&amp;amp;gt; &amp;amp;quot;VALU&amp;amp;quot;)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;~pp~ -1 * -1 &amp;amp;nbsp; 14 &amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;INFO&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;PARA&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; \d&amp;amp;lt;setting-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;C&amp;amp;quot; &amp;amp;quot;VALU&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;quot;T&amp;amp;quot; \d&amp;amp;lt;setting-value&amp;amp;gt; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;quot;Enumeration value&amp;amp;quot; 00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;...&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;00~/pp~&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chunk allows you to specify texts to display instead of the raw value for integer/enumeration. You can also specify texts only for some of the valid values. So if a setting e.g. allows values betweeen 0 to 42 you can instruct the GUI to show &amp;amp;quot;none&amp;amp;quot; instead of &amp;amp;quot;0&amp;amp;quot;.&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Railtypes&amp;diff=168</id>
		<title>Action0/Railtypes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Railtypes&amp;diff=168"/>
		<updated>2010-07-30T12:25:19Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Action 0 properties for rail types&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 0 - Properties for rail types=&lt;br /&gt;
&lt;br /&gt;
Defining properties of rail types.&lt;br /&gt;
&lt;br /&gt;
Note: This feature is only available in OpenTTD &amp;amp;gt; r18969&lt;br /&gt;
&lt;br /&gt;
{maketoc}&lt;br /&gt;
&lt;br /&gt;
-=Properties=-&lt;br /&gt;
&lt;br /&gt;
||Number|Version|Size|Description&lt;br /&gt;
&lt;br /&gt;
08| |4*B|Rail type label&lt;br /&gt;
&lt;br /&gt;
09| |W|StringID: Build rail toolbar caption&lt;br /&gt;
&lt;br /&gt;
0A| |W|StringID: Rail construction dropdown text&lt;br /&gt;
&lt;br /&gt;
0B| |W|StringID: Build vehicle window caption&lt;br /&gt;
&lt;br /&gt;
0C| |W|StringID: Autoreplace text&lt;br /&gt;
&lt;br /&gt;
0D| |W|StringID: New engine text&lt;br /&gt;
&lt;br /&gt;
0E| |B n*D |Compatible rail type list&lt;br /&gt;
&lt;br /&gt;
0F| |B n*D |Powered rail type list&lt;br /&gt;
&lt;br /&gt;
10| |B|Rail type flags&lt;br /&gt;
&lt;br /&gt;
11| |B|Curve speed advantage multiplier&lt;br /&gt;
&lt;br /&gt;
12| |B|Station graphics&lt;br /&gt;
&lt;br /&gt;
13| |W (a)|Construction costs&lt;br /&gt;
&lt;br /&gt;
14| |W|Speed limit&lt;br /&gt;
&lt;br /&gt;
15| |B|Acceleration model&lt;br /&gt;
&lt;br /&gt;
16|r19307|B|Minimap colour||&lt;br /&gt;
&lt;br /&gt;
(a) In r18969 to 19306 this property was byte-sized.&lt;br /&gt;
&lt;br /&gt;
In NFO, rail type IDs will be GRF local, with an ID to label mapping. Therefore to modify an existing rail type, specify its label in property 08. To create a new rail type, again just specify its label in property 08. This way there is no need for complex GRM mechanisms to allocate IDs. If a label &#039;clashes&#039; with another GRF, then one GRF will end up modifying the properties instead of creating a new rail type.&lt;br /&gt;
&lt;br /&gt;
When a new rail type is created, it is populated with the information from the first rail type, except that the compatible and powered list contain only the rail type being created. However, no default values should be assumed, as the first rail type may have been modified.&lt;br /&gt;
&lt;br /&gt;
-=Comments=-&lt;br /&gt;
&lt;br /&gt;
==Rail type label (08)==&lt;br /&gt;
&lt;br /&gt;
A label of four letters which identifies the rail type. Analoguous to [[Action0Cargos#Cargo_label_17_|cargo labels]]. The reserved default rail types are labeled:&lt;br /&gt;
&lt;br /&gt;
||Label|rail type&lt;br /&gt;
&lt;br /&gt;
RAIL | Normal rail&lt;br /&gt;
&lt;br /&gt;
ELRL | electrified rail&lt;br /&gt;
&lt;br /&gt;
MONO | mono rail&lt;br /&gt;
&lt;br /&gt;
MGLV | maglev rail||&lt;br /&gt;
&lt;br /&gt;
The following are standard labels for additional railtypes:&lt;br /&gt;
&lt;br /&gt;
||Label|rail type&lt;br /&gt;
&lt;br /&gt;
3RDC | 3rd rail with catenary&lt;br /&gt;
&lt;br /&gt;
3RDR | 3rd rail ||&lt;br /&gt;
&lt;br /&gt;
See also [[Action0GeneralVariables#Rail_type_translation_table_12_| rail type translation table]] for further info.&lt;br /&gt;
&lt;br /&gt;
==Build rail toolbar caption (09)==&lt;br /&gt;
&lt;br /&gt;
String ID of the name of the rail type as shown in the toolbar caption.&lt;br /&gt;
&lt;br /&gt;
OpenTTD before r20342 and 1.0.3 require the string to start with the white control code. Later versions of OpenTTD will automatically default to white.&lt;br /&gt;
&lt;br /&gt;
==Rail construction dropdown text (0A)==&lt;br /&gt;
&lt;br /&gt;
String ID for text in the dropdown of all rail types.&lt;br /&gt;
&lt;br /&gt;
This string must never start with a colour control code.&lt;br /&gt;
&lt;br /&gt;
==Build vehicle window caption (0B)==&lt;br /&gt;
&lt;br /&gt;
String ID for build vehicle window caption.&lt;br /&gt;
&lt;br /&gt;
OpenTTD before r20342 and 1.0.3 require the string to start with the white control code. Later versions of OpenTTD will automatically default to white.&lt;br /&gt;
&lt;br /&gt;
==Autoreplace text (0C)==&lt;br /&gt;
&lt;br /&gt;
String ID for rail type shown in autoreplace window.&lt;br /&gt;
&lt;br /&gt;
==New engines (0D)==&lt;br /&gt;
&lt;br /&gt;
StringID to use for showing texts of the type &amp;amp;quot;We have invented a new &amp;amp;lt;rail type&amp;amp;gt; engine&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Compatible rail type list (0E)==&lt;br /&gt;
&lt;br /&gt;
List of rail types on which trains of this rail type can run, even though they might not be powered. E.g. wagons/engines of &amp;amp;quot;eletrified rail&amp;amp;quot;-type are also compatible to &amp;amp;quot;normal rail&amp;amp;quot; and &amp;amp;quot;third rail&amp;amp;quot; type, but they are not powered (there need to be an other powered engine in the consist to move the train).&lt;br /&gt;
&lt;br /&gt;
The format is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+0E &amp;amp;lt;nvar&amp;amp;gt; (&amp;amp;lt;rail type label&amp;amp;gt;){n}+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That is you give the number of compatible rail types in a single byte followed by a list of that length of rail type labels. A rail type is automatically compatible (and powered) with itself, so you don&#039;t need to list the current rail type.&lt;br /&gt;
&lt;br /&gt;
Note that these properties apply to trains of this rail type, not the track. If you want trains of other rail types to be able to run on your rail types, you must set the compatible rail types property for each rail type. Setting these properties behaves always incremental, so you only need to the set additional bits for each other rail type, you cannot remove compatibility/poweredness once it is set (by some other grf).&lt;br /&gt;
&lt;br /&gt;
==Powered rail type list (0F)==&lt;br /&gt;
&lt;br /&gt;
List of rail types on which trains of this rail type are powered. E.g. engines of &amp;amp;quot;normal rail&amp;amp;quot;-type are powered on &amp;amp;quot;electrified rail&amp;amp;quot;- and &amp;amp;quot;third-rail&amp;amp;quot;-type as well.&lt;br /&gt;
&lt;br /&gt;
Same format as for property 0E above.&lt;br /&gt;
&lt;br /&gt;
==Rail type flags (10)==&lt;br /&gt;
&lt;br /&gt;
Flags to define properties related to the rail type:&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Meaning&lt;br /&gt;
&lt;br /&gt;
0|1|Draw catenary for this rail&lt;br /&gt;
&lt;br /&gt;
1|2|Disallow level crossings for this rail (OpenTTD since r20049)||&lt;br /&gt;
&lt;br /&gt;
==Curve Speed advantage multiplier==&lt;br /&gt;
&lt;br /&gt;
This property sets the multiplier to the curve speed advantage which all trains running on this track type get. The base curve speed advantage is given by the multiplication of the value of this property with the base speed advantage - which depends on the curve length in tiles:&lt;br /&gt;
&lt;br /&gt;
||curve length | base speed adv.&lt;br /&gt;
&lt;br /&gt;
0 (90&amp;amp;deg; turn) |30&lt;br /&gt;
&lt;br /&gt;
1 |44&lt;br /&gt;
&lt;br /&gt;
2| 55&lt;br /&gt;
&lt;br /&gt;
3| 66&lt;br /&gt;
&lt;br /&gt;
4| 75&lt;br /&gt;
&lt;br /&gt;
5| 84&lt;br /&gt;
&lt;br /&gt;
6| 91&lt;br /&gt;
&lt;br /&gt;
7| 98&lt;br /&gt;
&lt;br /&gt;
8| 103&lt;br /&gt;
&lt;br /&gt;
9| 108&lt;br /&gt;
&lt;br /&gt;
10| 111&lt;br /&gt;
&lt;br /&gt;
11| 114&lt;br /&gt;
&lt;br /&gt;
12+| 115||&lt;br /&gt;
&lt;br /&gt;
==Station graphics (12)==&lt;br /&gt;
&lt;br /&gt;
This property defines the default graphics for the stations. There are three kind of default stations, usually associated with rail, monorail and maglev tracks. Valid values are:&lt;br /&gt;
&lt;br /&gt;
||Value|Meaning&lt;br /&gt;
&lt;br /&gt;
0|normal rail&lt;br /&gt;
&lt;br /&gt;
1|monorail&lt;br /&gt;
&lt;br /&gt;
2|maglev||&lt;br /&gt;
&lt;br /&gt;
==Speed limit (14)==&lt;br /&gt;
&lt;br /&gt;
Speed limit in mph*1.6 (approx. km/h). Set to &amp;amp;quot;0&amp;amp;quot; for no limit at all.&lt;br /&gt;
&lt;br /&gt;
==Acceleration model (15)==&lt;br /&gt;
&lt;br /&gt;
This property defines the acceleration model used. Valid values range from 0 to 2:&lt;br /&gt;
&lt;br /&gt;
||Value|Meaning&lt;br /&gt;
&lt;br /&gt;
0|normal rail&lt;br /&gt;
&lt;br /&gt;
1|monorail&lt;br /&gt;
&lt;br /&gt;
2|maglev||&lt;br /&gt;
&lt;br /&gt;
There is currently no difference between normal rail and monorail.&lt;br /&gt;
&lt;br /&gt;
==Map colour (16)==&lt;br /&gt;
&lt;br /&gt;
This property defines the colour this track type is drawn in the minimap view. The byte value specifies the colour entry in the [[PalettesAndCoordinates| DOS palette]].&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action4&amp;diff=415</id>
		<title>Action4</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action4&amp;diff=415"/>
		<updated>2010-07-28T19:01:55Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Define vehicle names or other texts&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 4=&lt;br /&gt;
&lt;br /&gt;
Define vehicle names or other texts&lt;br /&gt;
&lt;br /&gt;
-=Introduction=-&lt;br /&gt;
&lt;br /&gt;
When making new vehicle graphics, you also need to name the new vehicles, or they&#039;ll show up with their original name from TTD.&lt;br /&gt;
&lt;br /&gt;
In addition, you can change most of TTD&#039;s text strings.&lt;br /&gt;
&lt;br /&gt;
Note that changes of vehicles names can be overridden by using TTD&#039;s vehicle.dat custom vehicle names. &amp;amp;nbsp;There is no way to bypass the custom vehicle names, other than turning them off or deleting vehicle.dat.&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
The data looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 04 &amp;amp;lt;feature&amp;amp;gt; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;lt;num-ent&amp;amp;gt; &amp;amp;lt;offset&amp;amp;gt; &amp;amp;lt;text&amp;amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes used in this action.&lt;br /&gt;
&lt;br /&gt;
04|B|Defines action 04&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;feature&amp;amp;gt;|B|For what type of vehicle/station should this definition be used?&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;language-id&amp;amp;gt;|B|Which of TTD&#039;s languages this name is for&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;num-ent&amp;amp;gt;|B|Number of consecutive strings to change&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;offset&amp;amp;gt;|B/W|First ID to change&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;text&amp;amp;gt;|S|New text strings||&lt;br /&gt;
&lt;br /&gt;
Whether &amp;amp;lt;offset&amp;amp;gt; is a &#039;&#039;&#039;BYTE&#039;&#039;&#039; or a &#039;&#039;&#039;WORD&#039;&#039;&#039; is decided by bit 7 of &amp;amp;lt;language-id&amp;amp;gt;, see below.&lt;br /&gt;
&lt;br /&gt;
-=Filling in the terms=-&lt;br /&gt;
&lt;br /&gt;
===Sprite-number===&lt;br /&gt;
&lt;br /&gt;
This is just the number you are at.&lt;br /&gt;
&lt;br /&gt;
===Length===&lt;br /&gt;
&lt;br /&gt;
Count the number of bytes in this action.&lt;br /&gt;
&lt;br /&gt;
===feature===&lt;br /&gt;
&lt;br /&gt;
This sets the type of feature that you wish to change. Set it to:&lt;br /&gt;
&lt;br /&gt;
00 for trains&lt;br /&gt;
&lt;br /&gt;
01 for road vehicles&lt;br /&gt;
&lt;br /&gt;
02 for ships&lt;br /&gt;
&lt;br /&gt;
03 for planes&lt;br /&gt;
&lt;br /&gt;
04 for stations&lt;br /&gt;
&lt;br /&gt;
05 for canals&lt;br /&gt;
&lt;br /&gt;
06 for bridges&lt;br /&gt;
&lt;br /&gt;
07 for houses&lt;br /&gt;
&lt;br /&gt;
0A for industries&lt;br /&gt;
&lt;br /&gt;
0B for cargos&lt;br /&gt;
&lt;br /&gt;
48 for original strings; see [[TextIDs]] for a list of TTD&#039;s text IDs.&lt;br /&gt;
&lt;br /&gt;
===language-id===&lt;br /&gt;
&lt;br /&gt;
The meaning of this byte depends on the GRF version of the .grf file as set in [[Action8#version|action 8]].&lt;br /&gt;
&lt;br /&gt;
Up to version 6, this is a bit mask of the following bits:&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Meaning&lt;br /&gt;
&lt;br /&gt;
0|01|American or &amp;amp;quot;other&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
1|02|English&lt;br /&gt;
&lt;br /&gt;
2|04|German&lt;br /&gt;
&lt;br /&gt;
3|08|French&lt;br /&gt;
&lt;br /&gt;
4|10|Spanish&lt;br /&gt;
&lt;br /&gt;
7|80|Flag for 16 bit string IDs||&lt;br /&gt;
&lt;br /&gt;
Add the bits of all languages for which the following strings apply. Bit 7 controls, whether the following string ID consists of 16 or 8 bit. Since TTDPatch now supports languages other than the standard ones, unknown languages will use the American strings as fallback. Otherwise the string would remain undefined for these languages. To actually define strings for any new language, you must use grf version 7.&lt;br /&gt;
&lt;br /&gt;
For version 7 and higher, it is a simple language ID from the list below. (This has changed with 2.5 beta 4). Bit 7 has the same meaning as in the earlier versions above.&lt;br /&gt;
&lt;br /&gt;
In either scheme, you can use the value 7F or FF, respectively, to define strings shown for languages that you do not provide translation for. First set all strings to a default value using this, and later override the language specific ones if they exist.&lt;br /&gt;
&lt;br /&gt;
Currently, the scheme is to use international phone codes as language IDs, unless they&#039;re out of range, in which case pick a number vaguely related in some way. Or something else.&lt;br /&gt;
&lt;br /&gt;
||ID (hex)|Language&lt;br /&gt;
&lt;br /&gt;
00|American&lt;br /&gt;
&lt;br /&gt;
01|English&lt;br /&gt;
&lt;br /&gt;
02|German&lt;br /&gt;
&lt;br /&gt;
03|French&lt;br /&gt;
&lt;br /&gt;
04|Spanish&lt;br /&gt;
&lt;br /&gt;
05|Esperanto&lt;br /&gt;
&lt;br /&gt;
06|Ido&lt;br /&gt;
&lt;br /&gt;
07|Russian&lt;br /&gt;
&lt;br /&gt;
08|Irish&lt;br /&gt;
&lt;br /&gt;
09|Maltese&lt;br /&gt;
&lt;br /&gt;
0A|Tamil&lt;br /&gt;
&lt;br /&gt;
0B|Chuvash&lt;br /&gt;
&lt;br /&gt;
0C|Chinese (Traditional)&lt;br /&gt;
&lt;br /&gt;
0D|Serbian&lt;br /&gt;
&lt;br /&gt;
0E|Norwegian (Nynorsk)&lt;br /&gt;
&lt;br /&gt;
0F|Welsh&lt;br /&gt;
&lt;br /&gt;
10|Belarusian&lt;br /&gt;
&lt;br /&gt;
14|Arabic (Egypt)&lt;br /&gt;
&lt;br /&gt;
15|Czech&lt;br /&gt;
&lt;br /&gt;
16|Slovak&lt;br /&gt;
&lt;br /&gt;
18|Bulgarian&lt;br /&gt;
&lt;br /&gt;
1B|Afrikaans&lt;br /&gt;
&lt;br /&gt;
1E|Greek&lt;br /&gt;
&lt;br /&gt;
1F|Dutch&lt;br /&gt;
&lt;br /&gt;
21|Basque&lt;br /&gt;
&lt;br /&gt;
22|Catalan&lt;br /&gt;
&lt;br /&gt;
23|Luxembourgish&lt;br /&gt;
&lt;br /&gt;
24|Hungarian&lt;br /&gt;
&lt;br /&gt;
26|Macedonian&lt;br /&gt;
&lt;br /&gt;
27|Italian&lt;br /&gt;
&lt;br /&gt;
28|Romanian&lt;br /&gt;
&lt;br /&gt;
29|Icelandic&lt;br /&gt;
&lt;br /&gt;
2A|Latvian&lt;br /&gt;
&lt;br /&gt;
2B|Lithuanian&lt;br /&gt;
&lt;br /&gt;
2C|Slovenian&lt;br /&gt;
&lt;br /&gt;
2D|Danish&lt;br /&gt;
&lt;br /&gt;
2E|Swedish&lt;br /&gt;
&lt;br /&gt;
2F|Norwegian (Bokmal)&lt;br /&gt;
&lt;br /&gt;
30|Polish&lt;br /&gt;
&lt;br /&gt;
31|Galician&lt;br /&gt;
&lt;br /&gt;
32|Frisian&lt;br /&gt;
&lt;br /&gt;
33|Ukrainian&lt;br /&gt;
&lt;br /&gt;
34|Estonian&lt;br /&gt;
&lt;br /&gt;
35|Finnish&lt;br /&gt;
&lt;br /&gt;
36|Portuguese&lt;br /&gt;
&lt;br /&gt;
37|Brazilian Portuguese&lt;br /&gt;
&lt;br /&gt;
38|Croatian&lt;br /&gt;
&lt;br /&gt;
39|Japanese&lt;br /&gt;
&lt;br /&gt;
3A|Korean&lt;br /&gt;
&lt;br /&gt;
3C|Malay&lt;br /&gt;
&lt;br /&gt;
3E|Turkish&lt;br /&gt;
&lt;br /&gt;
42|Thai&lt;br /&gt;
&lt;br /&gt;
54|Vietnamese&lt;br /&gt;
&lt;br /&gt;
56|Chinese (Simplified)&lt;br /&gt;
&lt;br /&gt;
5A|Indonesian&lt;br /&gt;
&lt;br /&gt;
5C|Urdu&lt;br /&gt;
&lt;br /&gt;
61|Hebrew&lt;br /&gt;
&lt;br /&gt;
62|Persian&lt;br /&gt;
&lt;br /&gt;
80|Flag 16 bit string IDs (added to language ID)&lt;br /&gt;
&lt;br /&gt;
7F|any (will be applied no matter what language is active)||&lt;br /&gt;
&lt;br /&gt;
When translating for a new language, please simply edit this document and add the new definition here.&lt;br /&gt;
&lt;br /&gt;
===num-ent===&lt;br /&gt;
&lt;br /&gt;
How many consecutive entries to change.&lt;br /&gt;
&lt;br /&gt;
===offset===&lt;br /&gt;
&lt;br /&gt;
The ID of the first string to change.&lt;br /&gt;
&lt;br /&gt;
When language-id bit 7 is clear, this is a byte value; except for OpenTTD since r13482, where it is an extended byte value for vehicles.&lt;br /&gt;
&lt;br /&gt;
When language-id bit 7 is set, this is a word value in little endian notation, e.g. 8134 becomes 34 81.&lt;br /&gt;
&lt;br /&gt;
The 8 bit version is only allowed for vehicles to set their name, in which case the text ID is just the vehicle ID.&lt;br /&gt;
&lt;br /&gt;
To replace original texts, or to define texts for usage in callbacks or properties of vehicles, stations, houses or industries you have to use the 16 bit version. However, town names are changed with [[ActionF|Action F]].&lt;br /&gt;
&lt;br /&gt;
For the usable 16 bit text IDs see the table below, resp. for feature 48 see [[TextIDs]].&lt;br /&gt;
&lt;br /&gt;
Though these ranges are shared across all features, you should still set the proper feature you are using them for.&lt;br /&gt;
&lt;br /&gt;
||ID|Content&lt;br /&gt;
&lt;br /&gt;
C4xx|Set name of station class associated with station ID xx; this is the text above the preview (where otherwise TTD shows &amp;amp;quot;Orientation&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
C5xx|New station names, this changes the text &amp;amp;quot;number of platforms&amp;amp;quot; into the given text when the station with this ID from the current set is selected (i.e. xx=station-id from action 3 and 0)&lt;br /&gt;
&lt;br /&gt;
C9xx|Name of the house type of this ID. If both property 12 and this is set, the latest definition is used always. You should prefer setting property 12 instead of this, so executables translated with TTD Translator will show the name in the current language. However, if you can&#039;t find any suitable old TTD texts, this can be used to specify your custom name. Don&#039;t forget to set the same text for all parts of a multi-tile building.&lt;br /&gt;
&lt;br /&gt;
D0xx|Miscellaneous graphics texts, unique to each .grf file. Used for newobjects and several callbacks. Some callbacks as well as newobjects support IDs up to D3FF.&lt;br /&gt;
&lt;br /&gt;
D4xx|&#039;&#039;&#039;Never use in Action4&#039;&#039;&#039;, only for displaying textids in range D000-D3FF (grf specific), see [[TextIDs]]&lt;br /&gt;
&lt;br /&gt;
D8xx|&#039;&#039;&#039;Never use in Action4&#039;&#039;&#039;, only usable in Action0 features, see [[TextIDs]]&lt;br /&gt;
&lt;br /&gt;
DCxx|Set miscellaneous persistent GRF texts. Unlike the D0xx GRF texts, these IDs can be used to set properties. The text ID must be set before any action 0 references it.||&lt;br /&gt;
&lt;br /&gt;
The DCxx IDs are allocated internally when defined, and are persistent in the savegame data. Each .grf file gets its own separate map of these internal IDs and thus may set all 256 of them. &amp;amp;nbsp;However, only 1024 IDs are available in total, to be shared by all .grf files ever activated in the savegame. This means these IDs should be used as sparingly as possible. But use them when they are useful!&lt;br /&gt;
&lt;br /&gt;
===text===&lt;br /&gt;
&lt;br /&gt;
This is a list of zero-terminated strings, there must be as many strings as num-ent specifies.&lt;br /&gt;
&lt;br /&gt;
You can use the [http://www.ttdpatch.net/cgi-bin/str2hex.pl|str2hex converter] to generate the proper hex values.&lt;br /&gt;
&lt;br /&gt;
Alternatively, use grfcodec version 0.9.6 or later, which accepts literal strings in the .nfo. These are encoded exactly as written, in whatever encoding your text editor uses; if you need a 00, put it immediately after the literal string.&lt;br /&gt;
&lt;br /&gt;
For the supported encodings, format, and restrictions on what characters you may use, please see [[GRFActionsDetailed#Strings|GRFActionsDetailed]] and StringCodes.&lt;br /&gt;
&lt;br /&gt;
A large number of original TTD strings require a colour code in front of the actual string. You can also use these colour codes in most of your custom strings. Use them wisely! In case a string requires a colour code, the string will have the code displayed in front of the default text as listed in [[TextIDs]].Typically, a colour coded string starts with the escape character (backslash), followed by hex byte and then the actual text string itself. I.e. string 0001 (&amp;amp;quot;\94Off edge of map&amp;amp;quot;) has colour code 0x94 in front of the text string, which will colour it white. You can also put the plain hex byte outside the quoted string without having to escape it. &#039;&#039;94 &amp;amp;quot;Off edge of map&amp;amp;quot;&#039;&#039; would be the same as &#039;&#039;&amp;amp;quot;\94Off edge of map&amp;amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The following 16 colour codes are available for use:&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Code&#039;&#039;&#039;|&#039;&#039;&#039;Colour&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
88|Blue&lt;br /&gt;
&lt;br /&gt;
89|Light Grey&lt;br /&gt;
&lt;br /&gt;
8A|Yellow&lt;br /&gt;
&lt;br /&gt;
8B|Red&lt;br /&gt;
&lt;br /&gt;
8C|Light Purple&lt;br /&gt;
&lt;br /&gt;
8D|Beige&lt;br /&gt;
&lt;br /&gt;
8E|Light Orange&lt;br /&gt;
&lt;br /&gt;
90|Light Yellow&lt;br /&gt;
&lt;br /&gt;
91|Light Green&lt;br /&gt;
&lt;br /&gt;
92|Light Pink&lt;br /&gt;
&lt;br /&gt;
93|Brown&lt;br /&gt;
&lt;br /&gt;
94|White&lt;br /&gt;
&lt;br /&gt;
95|Light Blue&lt;br /&gt;
&lt;br /&gt;
96|Grey&lt;br /&gt;
&lt;br /&gt;
97|Purple&lt;br /&gt;
&lt;br /&gt;
98|Black||&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&#039;color:#808080&#039;&amp;gt;Something to go here&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=VariationalAction2/Railtypes&amp;diff=672</id>
		<title>VariationalAction2/Railtypes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=VariationalAction2/Railtypes&amp;diff=672"/>
		<updated>2010-07-21T09:05:03Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Variational Action 2 for Railtypes&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Variational Action 2 for Railtypes=&lt;br /&gt;
&lt;br /&gt;
available in OpenTTD r19056&lt;br /&gt;
&lt;br /&gt;
||Variable|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|Content&lt;br /&gt;
&lt;br /&gt;
40|B|Terrain type: 0 normal, 1 desert, 2 rainforest, 4 on or above snowline.&lt;br /&gt;
&lt;br /&gt;
41|B|Enhanced tunnels; entrance has track above. Always 0 in OpenTTD.&lt;br /&gt;
&lt;br /&gt;
42|B|Level crossing status: 0 if open (or not a crossing), 1 if closed.&lt;br /&gt;
&lt;br /&gt;
43|D|Depot construction date (long format, 0 based); other: current date||&lt;br /&gt;
&lt;br /&gt;
== Terrain type (40)==&lt;br /&gt;
&lt;br /&gt;
Format: byte&lt;br /&gt;
&lt;br /&gt;
||value|Meaning&lt;br /&gt;
&lt;br /&gt;
0|normal tile&lt;br /&gt;
&lt;br /&gt;
1|desert tile&lt;br /&gt;
&lt;br /&gt;
2|rain forest tile&lt;br /&gt;
&lt;br /&gt;
4|tile on or above snow line||&lt;br /&gt;
&lt;br /&gt;
==Enhanced tunnels (41)==&lt;br /&gt;
&lt;br /&gt;
Format: byte&lt;br /&gt;
&lt;br /&gt;
This variable will always return 0 and is reserved for future use with enhanced tunnels.&lt;br /&gt;
&lt;br /&gt;
==Level crossing status (42)==&lt;br /&gt;
&lt;br /&gt;
Format: byte&lt;br /&gt;
&lt;br /&gt;
This variable returns 1, if a crossing is closed. If the crossing is open or the tile is no level crossing, the return value is 0.&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action4&amp;diff=417</id>
		<title>Action4</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action4&amp;diff=417"/>
		<updated>2010-06-21T19:28:01Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Define vehicle names or other texts&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 4=&lt;br /&gt;
&lt;br /&gt;
Define vehicle names or other texts&lt;br /&gt;
&lt;br /&gt;
-=Introduction=-&lt;br /&gt;
&lt;br /&gt;
When making new vehicle graphics, you also need to name the new vehicles, or they&#039;ll show up with their original name from TTD.&lt;br /&gt;
&lt;br /&gt;
In addition, you can change most of TTD&#039;s text strings.&lt;br /&gt;
&lt;br /&gt;
Note that changes of vehicles names can be overridden by using TTD&#039;s vehicle.dat custom vehicle names. &amp;amp;nbsp;There is no way to bypass the custom vehicle names, other than turning them off or deleting vehicle.dat.&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
The data looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 04 &amp;amp;lt;feature&amp;amp;gt; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;lt;num-ent&amp;amp;gt; &amp;amp;lt;offset&amp;amp;gt; &amp;amp;lt;text&amp;amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes used in this action.&lt;br /&gt;
&lt;br /&gt;
04|B|Defines action 04&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;feature&amp;amp;gt;|B|For what type of vehicle/station should this definition be used?&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;language-id&amp;amp;gt;|B|Which of TTD&#039;s languages this name is for&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;num-ent&amp;amp;gt;|B|Number of consecutive strings to change&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;offset&amp;amp;gt;|B/W|First ID to change&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;text&amp;amp;gt;|S|New text strings||&lt;br /&gt;
&lt;br /&gt;
Whether &amp;amp;lt;offset&amp;amp;gt; is a &#039;&#039;&#039;BYTE&#039;&#039;&#039; or a &#039;&#039;&#039;WORD&#039;&#039;&#039; is decided by bit 7 of &amp;amp;lt;language-id&amp;amp;gt;, see below.&lt;br /&gt;
&lt;br /&gt;
-=Filling in the terms=-&lt;br /&gt;
&lt;br /&gt;
===Sprite-number===&lt;br /&gt;
&lt;br /&gt;
This is just the number you are at.&lt;br /&gt;
&lt;br /&gt;
===Length===&lt;br /&gt;
&lt;br /&gt;
Count the number of bytes in this action.&lt;br /&gt;
&lt;br /&gt;
===feature===&lt;br /&gt;
&lt;br /&gt;
This sets the type of feature that you wish to change. Set it to:&lt;br /&gt;
&lt;br /&gt;
00 for trains&lt;br /&gt;
&lt;br /&gt;
01 for road vehicles&lt;br /&gt;
&lt;br /&gt;
02 for ships&lt;br /&gt;
&lt;br /&gt;
03 for planes&lt;br /&gt;
&lt;br /&gt;
04 for stations&lt;br /&gt;
&lt;br /&gt;
05 for canals&lt;br /&gt;
&lt;br /&gt;
06 for bridges&lt;br /&gt;
&lt;br /&gt;
07 for houses&lt;br /&gt;
&lt;br /&gt;
0A for industries&lt;br /&gt;
&lt;br /&gt;
0B for cargos&lt;br /&gt;
&lt;br /&gt;
48 for original strings; see [[TextIDs]] for a list of TTD&#039;s text IDs.&lt;br /&gt;
&lt;br /&gt;
===language-id===&lt;br /&gt;
&lt;br /&gt;
The meaning of this byte depends on the GRF version of the .grf file as set in [[Action8#version|action 8]].&lt;br /&gt;
&lt;br /&gt;
Up to version 6, this is a bit mask of the following bits:&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Meaning&lt;br /&gt;
&lt;br /&gt;
0|01|American or &amp;amp;quot;other&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
1|02|English&lt;br /&gt;
&lt;br /&gt;
2|04|German&lt;br /&gt;
&lt;br /&gt;
3|08|French&lt;br /&gt;
&lt;br /&gt;
4|10|Spanish&lt;br /&gt;
&lt;br /&gt;
7|80|Flag for 16 bit string IDs||&lt;br /&gt;
&lt;br /&gt;
Add the bits of all languages for which the following strings apply. Bit 7 controls, whether the following string ID consists of 16 or 8 bit. Since TTDPatch now supports languages other than the standard ones, unknown languages will use the American strings as fallback. Otherwise the string would remain undefined for these languages. To actually define strings for any new language, you must use grf version 7.&lt;br /&gt;
&lt;br /&gt;
For version 7 and higher, it is a simple language ID from the list below. (This has changed with 2.5 beta 4). Bit 7 has the same meaning as in the earlier versions above.&lt;br /&gt;
&lt;br /&gt;
In either scheme, you can use the value 7F or FF, respectively, to define strings shown for languages that you do not provide translation for. First set all strings to a default value using this, and later override the language specific ones if they exist.&lt;br /&gt;
&lt;br /&gt;
Currently, the scheme is to use international phone codes as language IDs, unless they&#039;re out of range, in which case pick a number vaguely related in some way. Or something else.&lt;br /&gt;
&lt;br /&gt;
||ID (hex)|Language&lt;br /&gt;
&lt;br /&gt;
00|American&lt;br /&gt;
&lt;br /&gt;
01|English&lt;br /&gt;
&lt;br /&gt;
02|German&lt;br /&gt;
&lt;br /&gt;
03|French&lt;br /&gt;
&lt;br /&gt;
04|Spanish&lt;br /&gt;
&lt;br /&gt;
05|Esperanto&lt;br /&gt;
&lt;br /&gt;
06|Ido&lt;br /&gt;
&lt;br /&gt;
07|Russian&lt;br /&gt;
&lt;br /&gt;
08|Irish&lt;br /&gt;
&lt;br /&gt;
09|Maltese&lt;br /&gt;
&lt;br /&gt;
0A|Tamil&lt;br /&gt;
&lt;br /&gt;
0B|Chuvash&lt;br /&gt;
&lt;br /&gt;
0C|Chinese (Traditional)&lt;br /&gt;
&lt;br /&gt;
0D|Serbian&lt;br /&gt;
&lt;br /&gt;
0E|Norwegian (Nynorsk)&lt;br /&gt;
&lt;br /&gt;
0F|Welsh&lt;br /&gt;
&lt;br /&gt;
14|Arabic (Egypt)&lt;br /&gt;
&lt;br /&gt;
15|Czech&lt;br /&gt;
&lt;br /&gt;
16|Slovak&lt;br /&gt;
&lt;br /&gt;
18|Bulgarian&lt;br /&gt;
&lt;br /&gt;
1B|Afrikaans&lt;br /&gt;
&lt;br /&gt;
1E|Greek&lt;br /&gt;
&lt;br /&gt;
1F|Dutch&lt;br /&gt;
&lt;br /&gt;
21|Basque&lt;br /&gt;
&lt;br /&gt;
22|Catalan&lt;br /&gt;
&lt;br /&gt;
23|Luxembourgish&lt;br /&gt;
&lt;br /&gt;
24|Hungarian&lt;br /&gt;
&lt;br /&gt;
26|Macedonian&lt;br /&gt;
&lt;br /&gt;
27|Italian&lt;br /&gt;
&lt;br /&gt;
28|Romanian&lt;br /&gt;
&lt;br /&gt;
29|Icelandic&lt;br /&gt;
&lt;br /&gt;
2A|Latvian&lt;br /&gt;
&lt;br /&gt;
2B|Lithuanian&lt;br /&gt;
&lt;br /&gt;
2C|Slovenian&lt;br /&gt;
&lt;br /&gt;
2D|Danish&lt;br /&gt;
&lt;br /&gt;
2E|Swedish&lt;br /&gt;
&lt;br /&gt;
2F|Norwegian (Bokmal)&lt;br /&gt;
&lt;br /&gt;
30|Polish&lt;br /&gt;
&lt;br /&gt;
31|Galician&lt;br /&gt;
&lt;br /&gt;
32|Frisian&lt;br /&gt;
&lt;br /&gt;
33|Ukrainian&lt;br /&gt;
&lt;br /&gt;
34|Estonian&lt;br /&gt;
&lt;br /&gt;
35|Finnish&lt;br /&gt;
&lt;br /&gt;
36|Portuguese&lt;br /&gt;
&lt;br /&gt;
37|Brazilian Portuguese&lt;br /&gt;
&lt;br /&gt;
38|Croatian&lt;br /&gt;
&lt;br /&gt;
39|Japanese&lt;br /&gt;
&lt;br /&gt;
3A|Korean&lt;br /&gt;
&lt;br /&gt;
3C|Malay&lt;br /&gt;
&lt;br /&gt;
3E|Turkish&lt;br /&gt;
&lt;br /&gt;
42|Thai&lt;br /&gt;
&lt;br /&gt;
54|Vietnamese&lt;br /&gt;
&lt;br /&gt;
56|Chinese (Simplified)&lt;br /&gt;
&lt;br /&gt;
5A|Indonesian&lt;br /&gt;
&lt;br /&gt;
5C|Urdu&lt;br /&gt;
&lt;br /&gt;
61|Hebrew&lt;br /&gt;
&lt;br /&gt;
62|Persian&lt;br /&gt;
&lt;br /&gt;
80|Flag 16 bit string IDs (added to language ID)&lt;br /&gt;
&lt;br /&gt;
7F|any (will be applied no matter what language is active)||&lt;br /&gt;
&lt;br /&gt;
When translating for a new language, please simply edit this document and add the new definition here.&lt;br /&gt;
&lt;br /&gt;
===num-ent===&lt;br /&gt;
&lt;br /&gt;
How many consecutive entries to change.&lt;br /&gt;
&lt;br /&gt;
===offset===&lt;br /&gt;
&lt;br /&gt;
The ID of the first string to change.&lt;br /&gt;
&lt;br /&gt;
When language-id bit 7 is clear, this is a byte value; except for OpenTTD since r13482, where it is an extended byte value for vehicles.&lt;br /&gt;
&lt;br /&gt;
When language-id bit 7 is set, this is a word value in little endian notation, e.g. 8134 becomes 34 81.&lt;br /&gt;
&lt;br /&gt;
The 8 bit version is only allowed for vehicles to set their name, in which case the text ID is just the vehicle ID.&lt;br /&gt;
&lt;br /&gt;
To replace original texts, or to define texts for usage in callbacks or properties of vehicles, stations, houses or industries you have to use the 16 bit version. However, town names are changed with [[ActionF|Action F]].&lt;br /&gt;
&lt;br /&gt;
For the usable 16 bit text IDs see the table below, resp. for feature 48 see [[TextIDs]].&lt;br /&gt;
&lt;br /&gt;
Though these ranges are shared across all features, you should still set the proper feature you are using them for.&lt;br /&gt;
&lt;br /&gt;
||ID|Content&lt;br /&gt;
&lt;br /&gt;
C4xx|Set name of station class associated with station ID xx; this is the text above the preview (where otherwise TTD shows &amp;amp;quot;Orientation&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
C5xx|New station names, this changes the text &amp;amp;quot;number of platforms&amp;amp;quot; into the given text when the station with this ID from the current set is selected (i.e. xx=station-id from action 3 and 0)&lt;br /&gt;
&lt;br /&gt;
C9xx|Name of the house type of this ID. If both property 12 and this is set, the latest definition is used always. You should prefer setting property 12 instead of this, so executables translated with TTD Translator will show the name in the current language. However, if you can&#039;t find any suitable old TTD texts, this can be used to specify your custom name. Don&#039;t forget to set the same text for all parts of a multi-tile building.&lt;br /&gt;
&lt;br /&gt;
D0xx|Miscellaneous graphics texts, unique to each .grf file. Used for several callbacks. Some callbacks as well as newobjects support IDs up to D3FF.&lt;br /&gt;
&lt;br /&gt;
DCxx|Set miscellaneous persistent GRF texts. Unlike the D0xx GRF texts, these IDs can be used to set properties. The text ID must be set before any action 0 references it.||&lt;br /&gt;
&lt;br /&gt;
The DCxx IDs are allocated internally when defined, and are persistent in the savegame data. Each .grf file gets its own separate map of these internal IDs and thus may set all 256 of them. &amp;amp;nbsp;However, only 1024 IDs are available in total, to be shared by all .grf files ever activated in the savegame. This means these IDs should be used as sparingly as possible. But use them when they are useful!&lt;br /&gt;
&lt;br /&gt;
===text===&lt;br /&gt;
&lt;br /&gt;
This is a list of zero-terminated strings, there must be as many strings as num-ent specifies.&lt;br /&gt;
&lt;br /&gt;
You can use the [http://www.ttdpatch.net/cgi-bin/str2hex.pl|str2hex converter] to generate the proper hex values.&lt;br /&gt;
&lt;br /&gt;
Alternatively, use grfcodec version 0.9.6 or later, which accepts literal strings in the .nfo. These are encoded exactly as written, in whatever encoding your text editor uses; if you need a 00, put it immediately after the literal string.&lt;br /&gt;
&lt;br /&gt;
For the supported encodings, format, and restrictions on what characters you may use, please see [[GRFActionsDetailed#Strings|GRFActionsDetailed]] and StringCodes.&lt;br /&gt;
&lt;br /&gt;
A large number of original TTD strings require a colour code in front of the actual string. You can also use these colour codes in most of your custom strings. Use them wisely! In case a string requires a colour code, the string will have the code displayed in front of the default text as listed in [[TextIDs]].Typically, a colour coded string starts with the escape character (backslash), followed by hex byte and then the actual text string itself. I.e. string 0001 (&amp;amp;quot;\94Off edge of map&amp;amp;quot;) has colour code 0x94 in front of the text string, which will colour it white. You can also put the plain hex byte outside the quoted string without having to escape it. &#039;&#039;94 &amp;amp;quot;Off edge of map&amp;amp;quot;&#039;&#039; would be the same as &#039;&#039;&amp;amp;quot;\94Off edge of map&amp;amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The following 16 colour codes are available for use:&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Code&#039;&#039;&#039;|&#039;&#039;&#039;Colour&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
88|Blue&lt;br /&gt;
&lt;br /&gt;
89|Light Grey&lt;br /&gt;
&lt;br /&gt;
8A|Yellow&lt;br /&gt;
&lt;br /&gt;
8B|Red&lt;br /&gt;
&lt;br /&gt;
8C|Light Purple&lt;br /&gt;
&lt;br /&gt;
8D|Beige&lt;br /&gt;
&lt;br /&gt;
8E|Light Orange&lt;br /&gt;
&lt;br /&gt;
90|Light Yellow&lt;br /&gt;
&lt;br /&gt;
91|Light Green&lt;br /&gt;
&lt;br /&gt;
92|Light Pink&lt;br /&gt;
&lt;br /&gt;
93|Brown&lt;br /&gt;
&lt;br /&gt;
94|White&lt;br /&gt;
&lt;br /&gt;
95|Light Blue&lt;br /&gt;
&lt;br /&gt;
96|Grey&lt;br /&gt;
&lt;br /&gt;
97|Purple&lt;br /&gt;
&lt;br /&gt;
98|Black||&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&#039;color:#808080&#039;&amp;gt;Something to go here&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action4&amp;diff=418</id>
		<title>Action4</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action4&amp;diff=418"/>
		<updated>2010-04-17T11:26:24Z</updated>

		<summary type="html">&lt;p&gt;Rubidium: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Define vehicle names or other texts&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 4=&lt;br /&gt;
&lt;br /&gt;
Define vehicle names or other texts&lt;br /&gt;
&lt;br /&gt;
-=Introduction=-&lt;br /&gt;
&lt;br /&gt;
When making new vehicle graphics, you also need to name the new vehicles, or they&#039;ll show up with their original name from TTD.&lt;br /&gt;
&lt;br /&gt;
In addition, you can change most of TTD&#039;s text strings.&lt;br /&gt;
&lt;br /&gt;
Note that changes of vehicles names can be overridden by using TTD&#039;s vehicle.dat custom vehicle names. &amp;amp;nbsp;There is no way to bypass the custom vehicle names, other than turning them off or deleting vehicle.dat.&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
The data looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 04 &amp;amp;lt;feature&amp;amp;gt; &amp;amp;lt;language-id&amp;amp;gt; &amp;amp;lt;num-ent&amp;amp;gt; &amp;amp;lt;offset&amp;amp;gt; &amp;amp;lt;text&amp;amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes used in this action.&lt;br /&gt;
&lt;br /&gt;
04|B|Defines action 04&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;feature&amp;amp;gt;|B|For what type of vehicle/station should this definition be used?&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;language-id&amp;amp;gt;|B|Which of TTD&#039;s languages this name is for&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;num-ent&amp;amp;gt;|B|Number of consecutive strings to change&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;offset&amp;amp;gt;|B/W|First ID to change&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;text&amp;amp;gt;|S|New text strings||&lt;br /&gt;
&lt;br /&gt;
Whether &amp;amp;lt;offset&amp;amp;gt; is a &#039;&#039;&#039;BYTE&#039;&#039;&#039; or a &#039;&#039;&#039;WORD&#039;&#039;&#039; is decided by bit 7 of &amp;amp;lt;language-id&amp;amp;gt;, see below.&lt;br /&gt;
&lt;br /&gt;
-=Filling in the terms=-&lt;br /&gt;
&lt;br /&gt;
===Sprite-number===&lt;br /&gt;
&lt;br /&gt;
This is just the number you are at.&lt;br /&gt;
&lt;br /&gt;
===Length===&lt;br /&gt;
&lt;br /&gt;
Count the number of bytes in this action.&lt;br /&gt;
&lt;br /&gt;
===feature===&lt;br /&gt;
&lt;br /&gt;
This sets the type of feature that you wish to change. Set it to:&lt;br /&gt;
&lt;br /&gt;
00 for trains&lt;br /&gt;
&lt;br /&gt;
01 for road vehicles&lt;br /&gt;
&lt;br /&gt;
02 for ships&lt;br /&gt;
&lt;br /&gt;
03 for planes&lt;br /&gt;
&lt;br /&gt;
04 for stations&lt;br /&gt;
&lt;br /&gt;
05 for canals&lt;br /&gt;
&lt;br /&gt;
06 for bridges&lt;br /&gt;
&lt;br /&gt;
07 for houses&lt;br /&gt;
&lt;br /&gt;
0A for industries&lt;br /&gt;
&lt;br /&gt;
0B for cargos&lt;br /&gt;
&lt;br /&gt;
48 for original strings; see [[TextIDs]] for a list of TTD&#039;s text IDs.&lt;br /&gt;
&lt;br /&gt;
===language-id===&lt;br /&gt;
&lt;br /&gt;
The meaning of this byte depends on the GRF version of the .grf file as set in [[Action8#version|action 8]].&lt;br /&gt;
&lt;br /&gt;
Up to version 6, this is a bit mask of the following bits:&lt;br /&gt;
&lt;br /&gt;
||Bit|Value|Meaning&lt;br /&gt;
&lt;br /&gt;
0|01|American or &amp;amp;quot;other&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
1|02|English&lt;br /&gt;
&lt;br /&gt;
2|04|German&lt;br /&gt;
&lt;br /&gt;
3|08|French&lt;br /&gt;
&lt;br /&gt;
4|10|Spanish&lt;br /&gt;
&lt;br /&gt;
7|80|Flag for 16 bit string IDs||&lt;br /&gt;
&lt;br /&gt;
Add the bits of all languages for which the following strings apply. Bit 7 controls, whether the following string ID consists of 16 or 8 bit. Since TTDPatch now supports languages other than the standard ones, unknown languages will use the American strings as fallback. Otherwise the string would remain undefined for these languages. To actually define strings for any new language, you must use grf version 7.&lt;br /&gt;
&lt;br /&gt;
For version 7 and higher, it is a simple language ID from the list below. (This has changed with 2.5 beta 4). Bit 7 has the same meaning as in the earlier versions above.&lt;br /&gt;
&lt;br /&gt;
In either scheme, you can use the value 7F or FF, respectively, to define strings shown for languages that you do not provide translation for. First set all strings to a default value using this, and later override the language specific ones if they exist.&lt;br /&gt;
&lt;br /&gt;
Currently, the scheme is to use international phone codes as language IDs, unless they&#039;re out of range, in which case pick a number vaguely related in some way. Or something else.&lt;br /&gt;
&lt;br /&gt;
||ID (hex)|Language&lt;br /&gt;
&lt;br /&gt;
00|American&lt;br /&gt;
&lt;br /&gt;
01|English&lt;br /&gt;
&lt;br /&gt;
02|German&lt;br /&gt;
&lt;br /&gt;
03|French&lt;br /&gt;
&lt;br /&gt;
04|Spanish&lt;br /&gt;
&lt;br /&gt;
05|Esperanto&lt;br /&gt;
&lt;br /&gt;
06|Ido&lt;br /&gt;
&lt;br /&gt;
07|Russian&lt;br /&gt;
&lt;br /&gt;
08|Irish&lt;br /&gt;
&lt;br /&gt;
09|Maltese&lt;br /&gt;
&lt;br /&gt;
0C|Chinese (Traditional)&lt;br /&gt;
&lt;br /&gt;
0D|Serbian&lt;br /&gt;
&lt;br /&gt;
0E|Norwegian (Nynorsk)&lt;br /&gt;
&lt;br /&gt;
0F|Welsh&lt;br /&gt;
&lt;br /&gt;
14|Arabic (Egypt)&lt;br /&gt;
&lt;br /&gt;
15|Czech&lt;br /&gt;
&lt;br /&gt;
16|Slovak&lt;br /&gt;
&lt;br /&gt;
18|Bulgarian&lt;br /&gt;
&lt;br /&gt;
1B|Afrikaans&lt;br /&gt;
&lt;br /&gt;
1E|Greek&lt;br /&gt;
&lt;br /&gt;
1F|Dutch&lt;br /&gt;
&lt;br /&gt;
21|Basque&lt;br /&gt;
&lt;br /&gt;
22|Catalan&lt;br /&gt;
&lt;br /&gt;
23|Luxembourgish&lt;br /&gt;
&lt;br /&gt;
24|Hungarian&lt;br /&gt;
&lt;br /&gt;
26|Macedonian&lt;br /&gt;
&lt;br /&gt;
27|Italian&lt;br /&gt;
&lt;br /&gt;
28|Romanian&lt;br /&gt;
&lt;br /&gt;
29|Icelandic&lt;br /&gt;
&lt;br /&gt;
2A|Latvian&lt;br /&gt;
&lt;br /&gt;
2B|Lithuanian&lt;br /&gt;
&lt;br /&gt;
2C|Slovenian&lt;br /&gt;
&lt;br /&gt;
2D|Danish&lt;br /&gt;
&lt;br /&gt;
2E|Swedish&lt;br /&gt;
&lt;br /&gt;
2F|Norwegian (Bokmal)&lt;br /&gt;
&lt;br /&gt;
30|Polish&lt;br /&gt;
&lt;br /&gt;
31|Galician&lt;br /&gt;
&lt;br /&gt;
32|Frisian&lt;br /&gt;
&lt;br /&gt;
33|Ukrainian&lt;br /&gt;
&lt;br /&gt;
34|Estonian&lt;br /&gt;
&lt;br /&gt;
35|Finnish&lt;br /&gt;
&lt;br /&gt;
36|Portuguese&lt;br /&gt;
&lt;br /&gt;
37|Brazilian Portuguese&lt;br /&gt;
&lt;br /&gt;
38|Croatian&lt;br /&gt;
&lt;br /&gt;
39|Japanese&lt;br /&gt;
&lt;br /&gt;
3A|Korean&lt;br /&gt;
&lt;br /&gt;
3C|Malay&lt;br /&gt;
&lt;br /&gt;
3E|Turkish&lt;br /&gt;
&lt;br /&gt;
42|Thai&lt;br /&gt;
&lt;br /&gt;
54|Vietnamese&lt;br /&gt;
&lt;br /&gt;
56|Chinese (Simplified)&lt;br /&gt;
&lt;br /&gt;
5A|Indonesian&lt;br /&gt;
&lt;br /&gt;
5C|Urdu&lt;br /&gt;
&lt;br /&gt;
61|Hebrew&lt;br /&gt;
&lt;br /&gt;
62|Persian&lt;br /&gt;
&lt;br /&gt;
80|Flag 16 bit string IDs (added to language ID)&lt;br /&gt;
&lt;br /&gt;
7F|any (will be applied no matter what language is active)||&lt;br /&gt;
&lt;br /&gt;
When translating for a new language, please simply edit this document and add the new definition here.&lt;br /&gt;
&lt;br /&gt;
===num-ent===&lt;br /&gt;
&lt;br /&gt;
How many consecutive entries to change.&lt;br /&gt;
&lt;br /&gt;
===offset===&lt;br /&gt;
&lt;br /&gt;
The ID of the first string to change.&lt;br /&gt;
&lt;br /&gt;
When language-id bit 7 is clear, this is a byte value; except for OpenTTD since r13482, where it is an extended byte value for vehicles.&lt;br /&gt;
&lt;br /&gt;
When language-id bit 7 is set, this is a word value in little endian notation, e.g. 8134 becomes 34 81.&lt;br /&gt;
&lt;br /&gt;
The 8 bit version is only allowed for vehicles to set their name, in which case the text ID is just the vehicle ID.&lt;br /&gt;
&lt;br /&gt;
To replace original texts, or to define texts for usage in callbacks or properties of vehicles, stations, houses or industries you have to use the 16 bit version. However, town names are changed with [[ActionF|Action F]].&lt;br /&gt;
&lt;br /&gt;
For the usable 16 bit text IDs see the table below, resp. for feature 48 see [[TextIDs]].&lt;br /&gt;
&lt;br /&gt;
Though these ranges are shared across all features, you should still set the proper feature you are using them for.&lt;br /&gt;
&lt;br /&gt;
||ID|Content&lt;br /&gt;
&lt;br /&gt;
C4xx|Set name of station class associated with station ID xx; this is the text above the preview (where otherwise TTD shows &amp;amp;quot;Orientation&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
C5xx|New station names, this changes the text &amp;amp;quot;number of platforms&amp;amp;quot; into the given text when the station with this ID from the current set is selected (i.e. xx=station-id from action 3 and 0)&lt;br /&gt;
&lt;br /&gt;
C9xx|Name of the house type of this ID. If both property 12 and this is set, the latest definition is used always. You should prefer setting property 12 instead of this, so executables translated with TTD Translator will show the name in the current language. However, if you can&#039;t find any suitable old TTD texts, this can be used to specify your custom name. Don&#039;t forget to set the same text for all parts of a multi-tile building.&lt;br /&gt;
&lt;br /&gt;
D0xx|Miscellaneous graphics texts, unique to each .grf file. Used for several callbacks. Some callbacks as well as newobjects support IDs up to D3FF.&lt;br /&gt;
&lt;br /&gt;
DCxx|Set miscellaneous persistent GRF texts. Unlike the D0xx GRF texts, these IDs can be used to set properties. The text ID must be set before any action 0 references it.||&lt;br /&gt;
&lt;br /&gt;
The DCxx IDs are allocated internally when defined, and are persistent in the savegame data. Each .grf file gets its own separate map of these internal IDs and thus may set all 256 of them. &amp;amp;nbsp;However, only 1024 IDs are available in total, to be shared by all .grf files ever activated in the savegame. This means these IDs should be used as sparingly as possible. But use them when they are useful!&lt;br /&gt;
&lt;br /&gt;
===text===&lt;br /&gt;
&lt;br /&gt;
This is a list of zero-terminated strings, there must be as many strings as num-ent specifies.&lt;br /&gt;
&lt;br /&gt;
You can use the [http://www.ttdpatch.net/cgi-bin/str2hex.pl|str2hex converter] to generate the proper hex values.&lt;br /&gt;
&lt;br /&gt;
Alternatively, use grfcodec version 0.9.6 or later, which accepts literal strings in the .nfo. These are encoded exactly as written, in whatever encoding your text editor uses; if you need a 00, put it immediately after the literal string.&lt;br /&gt;
&lt;br /&gt;
For the supported encodings, format, and restrictions on what characters you may use, please see [[GRFActionsDetailed#Strings|GRFActionsDetailed]] and StringCodes.&lt;br /&gt;
&lt;br /&gt;
A large number of original TTD strings require a colour code in front of the actual string. You can also use these colour codes in most of your custom strings. Use them wisely! In case a string requires a colour code, the string will have the code displayed in front of the default text as listed in [[TextIDs]].Typically, a colour coded string starts with the escape character (backslash), followed by hex byte and then the actual text string itself. I.e. string 0001 (&amp;amp;quot;\94Off edge of map&amp;amp;quot;) has colour code 0x94 in front of the text string, which will colour it white. You can also put the plain hex byte outside the quoted string without having to escape it. &#039;&#039;94 &amp;amp;quot;Off edge of map&amp;amp;quot;&#039;&#039; would be the same as &#039;&#039;&amp;amp;quot;\94Off edge of map&amp;amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The following 16 colour codes are available for use:&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Code&#039;&#039;&#039;|&#039;&#039;&#039;Colour&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
88|Blue&lt;br /&gt;
&lt;br /&gt;
89|Light Grey&lt;br /&gt;
&lt;br /&gt;
8A|Yellow&lt;br /&gt;
&lt;br /&gt;
8B|Red&lt;br /&gt;
&lt;br /&gt;
8C|Light Purple&lt;br /&gt;
&lt;br /&gt;
8D|Beige&lt;br /&gt;
&lt;br /&gt;
8E|Light Orange&lt;br /&gt;
&lt;br /&gt;
90|Light Yellow&lt;br /&gt;
&lt;br /&gt;
91|Light Green&lt;br /&gt;
&lt;br /&gt;
92|Light Pink&lt;br /&gt;
&lt;br /&gt;
93|Brown&lt;br /&gt;
&lt;br /&gt;
94|White&lt;br /&gt;
&lt;br /&gt;
95|Light Blue&lt;br /&gt;
&lt;br /&gt;
96|Grey&lt;br /&gt;
&lt;br /&gt;
97|Purple&lt;br /&gt;
&lt;br /&gt;
98|Black||&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&#039;color:#808080&#039;&amp;gt;Something to go here&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rubidium</name></author>
	</entry>
</feed>