<?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=Peter1138</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=Peter1138"/>
	<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/wiki/Special:Contributions/Peter1138"/>
	<updated>2026-04-20T12:40:33Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action3&amp;diff=5116</id>
		<title>Action3</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action3&amp;diff=5116"/>
		<updated>2025-12-03T08:24:58Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Feature */&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 (vehicles, stations, houses, industries, ...).&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The format of the data is feature-dependent.&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 &amp;amp;lt;feature&amp;amp;gt; &amp;amp;lt;n-id&amp;amp;gt; &amp;amp;lt;ids...&amp;amp;gt; &amp;amp;lt;num-cid&amp;amp;gt; (&amp;amp;lt;cargo-type&amp;amp;gt; &amp;amp;lt;set-ID&amp;amp;gt;)... &amp;amp;lt;default 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;
|&amp;amp;lt;feature&amp;amp;gt;&lt;br /&gt;
|B&lt;br /&gt;
|What type of feature the IDs refer to&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;n-id&amp;amp;gt;&lt;br /&gt;
|B&lt;br /&gt;
|Number of IDs this action 3 associates graphics with&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;ids...&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;
|&amp;amp;lt;num-cid&amp;amp;gt;&lt;br /&gt;
|B&lt;br /&gt;
|Number of different cargo types to support&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;cargo-type&amp;amp;gt;&lt;br /&gt;
|B&lt;br /&gt;
|Cargo type for which to use the following set-ID&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;set-ID&amp;amp;gt;&lt;br /&gt;
|W&lt;br /&gt;
|Set-ID (from action 2 or from a varaction2 chain) to use for this cargo type&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;default 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. 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;
|05||[[Action3/Canals|Canals/Rivers]]&lt;br /&gt;
|-&lt;br /&gt;
|07||Houses&lt;br /&gt;
|-&lt;br /&gt;
|09||Industry Tiles&lt;br /&gt;
|-&lt;br /&gt;
|0A||Industries&lt;br /&gt;
|-&lt;br /&gt;
|0B||Cargos&lt;br /&gt;
|-&lt;br /&gt;
|0C||Sound Effects (generic callback only)&lt;br /&gt;
|-&lt;br /&gt;
|0D||Airports&lt;br /&gt;
|-&lt;br /&gt;
|0E||Signals (generic callback only)&lt;br /&gt;
|-&lt;br /&gt;
|0F||Objects&lt;br /&gt;
|-&lt;br /&gt;
|10||[[Action3/Railtypes|Railtypes]]&lt;br /&gt;
|-&lt;br /&gt;
|11||Airport Tiles&lt;br /&gt;
|-&lt;br /&gt;
|12||[[Action3/Roadtypes|Roadtypes]]&lt;br /&gt;
|-&lt;br /&gt;
|13||[[Action3/Tramtypes|Tramtypes]]&lt;br /&gt;
|-&lt;br /&gt;
|14||Road Stops&lt;br /&gt;
|-&lt;br /&gt;
|15||Badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== n-id ===&lt;br /&gt;
&lt;br /&gt;
How many items of the current feature this action 3 defines new graphics for. If this is more than one, all items listed will get the same graphics. If this value has bit 7 set (i.e. 80 added), it is a wagon override. See [[Action3LiveryOverride|Action 3 - Livery Override]] for more info on this feature.&lt;br /&gt;
&lt;br /&gt;
You can make a definition with n-id equal to zero (and thus no ids that follow). &amp;amp;nbsp;This creates a generic feature-specific definition not associated with any particular item. &amp;amp;nbsp;At the moment, this is used for generic callbacks, but might be extended to other functions eventually.&lt;br /&gt;
&lt;br /&gt;
=== ids ===&lt;br /&gt;
&lt;br /&gt;
Feature IDs to use this action 3 for. All IDs are counted from the first of their class, i.e. the first road vehicle has 00, as does the first plane, the first ship, and the first train vehicle.&lt;br /&gt;
&lt;br /&gt;
In OpenTTD since r13482, each ID is an extended byte for vehicles, otherwise the ID is a regular byte.&lt;br /&gt;
&lt;br /&gt;
Since OpenTTD 14.0, each ID is an extended byte for all features.&lt;br /&gt;
&lt;br /&gt;
For canals and rivers the id has a special meaning, see its [[Action3/Canals|own Action 3 page]]&lt;br /&gt;
&lt;br /&gt;
For town buildings, the IDs are the house IDs, and specifying a house ID that haven&#039;t been defined before (by setting its property 08) doesn&#039;t do anything, but doesn&#039;t cause an error, either. Note that you don&#039;t necessarily have to assign a set-ID to a house ID, the old TTD sprite of the substitute type will be used if you don&#039;t do so. &amp;amp;nbsp;Industry tile IDs work in the same manner.&lt;br /&gt;
&lt;br /&gt;
=== num-cid ===&lt;br /&gt;
&lt;br /&gt;
Number of cargo type definitions that follow. Can be zero if only the default follows.&lt;br /&gt;
&lt;br /&gt;
For features 05 (canals/rivers), 07 (houses), 09 (industry tiles), 0A (industries), and 0B (cargoes) this must always be zero.&lt;br /&gt;
&lt;br /&gt;
=== cargo-type ===&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Feature !! cids&lt;br /&gt;
|-&lt;br /&gt;
| 00..03 vehicles ||&lt;br /&gt;
* 00..FE: cargo-type (index in [[Action0/Global Settings#Cargo translation table 09|cargo translation table]]; cargobit if no table present)&lt;br /&gt;
* FF: purchase list &amp;lt;ref&amp;gt;For dual-headed trains (prop 13) special rules for the purchase menu sprite apply: two sprites are drawn (for front and back) as if the vehicle is normally constructed. If you supply one purchase menu sprite, it will be used for both vehicle parts in the purchase menu. Provide a set of 8 sprites, and the 7th resp. 3rd sprite will&lt;br /&gt;
be drawn; provide a set of 8 blank sprites except the 7th if you want to fully control a single purchase menu sprite for a dual-headed engine.&amp;lt;/ref&amp;gt;&lt;br /&gt;
* default: used if none of the listed cids apply&lt;br /&gt;
|-&lt;br /&gt;
| 04 stations ||&lt;br /&gt;
* 00..FD: cargo-type (index in [[Action0/Global Settings#Cargo translation table 09|cargo translation table]]; cargobit if no table present) waiting at the station. The waiting amount of this cargo is used in [[Action2/Stations|Action2]] to decide the spriteset.&lt;br /&gt;
* FE: used if none of the listed cids apply. [[Action2/Stations|Action2]] will assume &amp;quot;zero waiting cargo&amp;quot;.&lt;br /&gt;
* FF: purchase list&lt;br /&gt;
* default: used if none of the listed cids apply. [[Action2/Stations|Action2]] will use &amp;quot;sum of all waiting cargos&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 05 canals || default only&lt;br /&gt;
|-&lt;br /&gt;
| 07 houses ||&lt;br /&gt;
* FF: {{ottdp|15|no}} purchase list (callbacks when not constructed yet; and house picker GUI)&lt;br /&gt;
* default: used if none of the listed cids apply&lt;br /&gt;
|-&lt;br /&gt;
| 09 industry tiles ||&lt;br /&gt;
* FF: {{ottdp|15|no}} purchase list (callbacks when not constructed yet)&lt;br /&gt;
* default: used if none of the listed cids apply&lt;br /&gt;
|-&lt;br /&gt;
| 0A industries ||&lt;br /&gt;
* FF: {{ottdp|15|no}} purchase list (callbacks when not constructed yet)&lt;br /&gt;
* default: used if none of the listed cids apply&lt;br /&gt;
|-&lt;br /&gt;
| 0B cargos || default only&lt;br /&gt;
|-&lt;br /&gt;
| 0C sound effects || default only&lt;br /&gt;
|-&lt;br /&gt;
| 0D airports ||&lt;br /&gt;
* FF: {{ottdp|15|no}} purchase list (callbacks when not constructed yet)&lt;br /&gt;
* default: used if none of the listed cids apply&lt;br /&gt;
|-&lt;br /&gt;
| 0E signals || default only&lt;br /&gt;
|-&lt;br /&gt;
| 0F objects ||&lt;br /&gt;
* FF: purchase list&lt;br /&gt;
* default: used if none of the listed cids apply&lt;br /&gt;
|-&lt;br /&gt;
| 10 rail types || special cids, see [[Action3/Railtypes#cargo-type|here]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 airport tiles ||&lt;br /&gt;
* FF: {{ottdp|15|no}} purchase list (callbacks when not constructed yet)&lt;br /&gt;
* default: used if none of the listed cids apply&lt;br /&gt;
|-&lt;br /&gt;
| 12 road types || special cids, see [[Action3/Tramtypes#cargo-type|here]]&lt;br /&gt;
|-&lt;br /&gt;
| 13 tram types || special cids, see [[Action3/Roadtypes#cargo-type|here]]&lt;br /&gt;
|-&lt;br /&gt;
| 14 road stops ||&lt;br /&gt;
* 00..FD: cargo-type (index in [[Action0/Global Settings#Cargo translation table 09|cargo translation table]]; cargobit if no table present) waiting at the road stop.&lt;br /&gt;
* FE: used if none of the listed cids apply.&lt;br /&gt;
* FF: purchase list&lt;br /&gt;
* default: used if none of the listed cids apply.&lt;br /&gt;
|-&lt;br /&gt;
| 15 badges || special cids:&lt;br /&gt;
* 00..14: feature&lt;br /&gt;
* default: used if specific feature is not assigned.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default set-ID ===&lt;br /&gt;
&lt;br /&gt;
Default set-ID if no entry from the cargo-type list above matches, or if there are no special cargo-types listed at all.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Below is an example of what a real action 3 pseudo-sprite could look like for a train engine.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; 13 * 7 &amp;amp;nbsp; 03 00 01 02 00 00 00&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;Byte&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|&amp;amp;lt;sprite-number&amp;amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;amp;lt;length&amp;amp;gt; of the action in bytes; start counting at 03 (&amp;amp;lt;action&amp;amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|03&lt;br /&gt;
|&amp;amp;lt;action&amp;amp;gt;: sets this pseudo-sprite to function as action 3&lt;br /&gt;
|-&lt;br /&gt;
|00&lt;br /&gt;
|&amp;amp;lt;feature&amp;amp;gt;: 00 for trains&lt;br /&gt;
|-&lt;br /&gt;
|01&lt;br /&gt;
|&amp;amp;lt;n-id&amp;amp;gt;: One ID to change in this case&lt;br /&gt;
|-&lt;br /&gt;
|02&lt;br /&gt;
|&amp;amp;lt;ids...&amp;amp;gt;: vehicle ID (02 - Ploddyphut Choo-Choo)&lt;br /&gt;
|-&lt;br /&gt;
|00&lt;br /&gt;
|&amp;amp;lt;num-cid&amp;amp;gt;: this engine doesn&#039;t have cargo-specific graphics&lt;br /&gt;
|-&lt;br /&gt;
|00 00&lt;br /&gt;
|&amp;amp;lt;default set-ID&amp;amp;gt;: Use action 2 ID 00, because it is a word value you add 00&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action1&amp;diff=5115</id>
		<title>Action1</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action1&amp;diff=5115"/>
		<updated>2025-12-03T08:24:14Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Feature */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Defining a set of real sprites.&lt;br /&gt;
Action 01 is used to define sets of real sprites (as opposed to pseudo-sprites). It can be put anywhere in the .nfo file after [[Action8|Action 8]].&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
=== Basic format ===&lt;br /&gt;
{{ottdp|0.6|2.0}}&lt;br /&gt;
 &amp;lt;sprite-number&amp;gt; * &amp;lt;length&amp;gt; &#039;&#039;&#039;01&#039;&#039;&#039; &amp;lt;feature&amp;gt; &amp;lt;num-sets&amp;gt; &amp;lt;num-ent&amp;gt;&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 used in this action&lt;br /&gt;
|-&lt;br /&gt;
|01||B||Defines action 01&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;feature&amp;gt;||B||The feature that following sprites should be used for (s.b.)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;num-sets&amp;gt;||B||The number of sprite sets you have (one sprite set is one vehicle/station/ship etc). Setting this to 00 makes it an extended format (see below).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;num-ent&amp;gt;||B*||The number of views the sprite has&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The block of data that always follows after action 01 should consist of num-sets * num-ent RealSprites or RecolorSprites.&lt;br /&gt;
&lt;br /&gt;
=== Extended format ===&lt;br /&gt;
{{ottdp|1.2.2|no|ottdrev=r24361}} &lt;br /&gt;
 &amp;lt;sprite-number&amp;gt; * &amp;lt;length&amp;gt; &#039;&#039;&#039;01&#039;&#039;&#039; &amp;lt;feature&amp;gt; &#039;&#039;&#039;00&#039;&#039;&#039; &amp;lt;first-set&amp;gt; &amp;lt;num-sets&amp;gt; &amp;lt;num-ent&amp;gt;&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 used in this action&lt;br /&gt;
|-&lt;br /&gt;
|01||B||Defines action 01&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;feature&amp;gt;||B||The feature that following sprites should be used for (s.b.)&lt;br /&gt;
|-&lt;br /&gt;
|00||B||Identfies the extended format.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;first-set&amp;gt;||B*||The ID of the first spriteset to define&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;num-sets&amp;gt;||B*||The number of sprite sets you have (one sprite set is one vehicle/station/ship etc)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;num-ent&amp;gt;||B*||The number of views the sprite has&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The block of data that always follows after action 01 should consist of num-sets * num-ent RealSprites or RecolorSprites.&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. 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;
|05||Canals/Rivers&lt;br /&gt;
|-&lt;br /&gt;
|07||Houses&lt;br /&gt;
|-&lt;br /&gt;
|09||Industry Tiles&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;
|11||Airport Tiles&lt;br /&gt;
|-&lt;br /&gt;
|12||Roadtypes&lt;br /&gt;
|-&lt;br /&gt;
|13||Tramtypes&lt;br /&gt;
|-&lt;br /&gt;
|14||Road Stops&lt;br /&gt;
|-&lt;br /&gt;
|15||Badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== first-set ===&lt;br /&gt;
This specifies the first set ID to define.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.2|no|ottdrev=r22925}} Since OpenTTD r22925 spritesets stay valid across multiple Action1. That is, if one Action1 defines spritesets 0 to 4, and later a second Action1 redefines spriteset 0, spritesets 1 to 4 still refer to the first Action1. Spritesets are feature-specific, each feature maintains its own mapping of ids to Action1 spritesets. (Prior to OpenTTD r22925 and in TTDPatch only spritesets from a single Action1 are referencible from an Action2 at a time. Referencing an Action1 with a different feature than the Action2 is an error.)&lt;br /&gt;
&lt;br /&gt;
This behaviour of Action1 applies to both the basic as well as the extended format. &lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.2|no|ottdrev=r22926}} In addition the extended format allows to specify an ID for the first spriteset to define. That way individual spritesets and be redefined individually. &lt;br /&gt;
&lt;br /&gt;
There are no restriction on the order the spritesets are defined. If you define spritesets 23..25 in one Action 1, define spritesets 0..5 in another Action 1, then an Action 2 can access sets 0..5 and 23..25. Later another Action 1 can redefine spritesets 2..3, and following Action 2 could access spritesets 0..1, 2..3, 4, 23..25 from various Action 1.&lt;br /&gt;
&lt;br /&gt;
Note that all spriteset defined in a single Action1 have the same amount of sprites per spriteset. Using multiple Action1 you can define spriteset with different amounts of sprites per set. Action2 will individually use the size of each referenced spriteset. There is no requirement for consistent numbers of sprites in Action2 or spritelayouts.&lt;br /&gt;
&lt;br /&gt;
=== num-sets ===&lt;br /&gt;
The amount of stations, vehicles, ships, etc that the following sprites represent (be warned, one spriteset can be used for more as one vehicle, or truck; you will see this when you reach [[Action2|Action 2]] and [[Action3|Action 3]])&lt;br /&gt;
&lt;br /&gt;
=== num-ent ===&lt;br /&gt;
&lt;br /&gt;
This sets how many different views each entry has.&lt;br /&gt;
&lt;br /&gt;
For vehicles, this corresponds to the different directions it can be in. If your vehicle is symmetrical you need 4 views, and if it isn&#039;t symmetrical then use 8 views.&lt;br /&gt;
&lt;br /&gt;
A station should normally be 12 (hex) because a station is made out of 18 (decimal) sprites, although if you use a different sprite layout for your station this number may vary.&lt;br /&gt;
For canals, it depends on the canal feature, see [[Action3|Action 3]].&lt;br /&gt;
&lt;br /&gt;
For houses and industry tiles, this should be between 1 and 4 and specifies the number of different construction stages. Sprites after the first four are always ignored. See also action 2 and 3.&lt;br /&gt;
&lt;br /&gt;
For cargos, this should always be 1. The following sprites should be no larger than 10x10 pixels or they won&#039;t fit into the station window correctly.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|0.6|2.5|ttdprev=2.0.1 alpha 49}} Since TTDPatch 2.0.1 alpha 49, this value is a so-called &amp;quot;extended byte&amp;quot; (see [[GRFActionsDetailed]]).&lt;br /&gt;
&lt;br /&gt;
{{ottdp|0.6|2.5|ttdprev=2.0.1 alpha 63}} Since TTDPatch 2.0.1 alpha 63, it is possible to have &amp;lt;num-ent&amp;gt;=0. This is useful for defining an action 1/2 combination that only serves as invalid callback result. If the .grf file defines no graphics otherwise, this way callbacks can return an explicit failure code without needing any actual sprites to be allocated. This is also needed if the feature has [[Action2/Only_Callback_Failure | no graphics at all]].&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Below is an example of what a real Action 1 pseudo-sprite could look like with the sprite entries under it.&lt;br /&gt;
&lt;br /&gt;
 2 * 4 01 00 01 08&lt;br /&gt;
 3 C:\TTD\SPRITES\mytrain.pcx 66 8 01 18 8 -3 -10&lt;br /&gt;
 4 C:\TTD\SPRITES\mytrain.pcx 82 8 09 15 20 -14 -6&lt;br /&gt;
 5 C:\TTD\SPRITES\mytrain.pcx 114 8 01 12 28 -14 -6&lt;br /&gt;
 6 C:\TTD\SPRITES\mytrain.pcx 162 8 09 16 20 -4 -8&lt;br /&gt;
 7 C:\TTD\SPRITES\mytrain.pcx 194 8 01 18 8 -3 -10&lt;br /&gt;
 8 C:\TTD\SPRITES\mytrain.pcx 210 8 09 16 20 -14 -7&lt;br /&gt;
 9 C:\TTD\SPRITES\mytrain.pcx 242 8 01 12 28 -14 -6&lt;br /&gt;
 10 C:\TTD\SPRITES\mytrain.pcx 290 8 09 15 20 -4 -7&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;
|2||&amp;lt;sprite-number&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4||&amp;lt;length&amp;gt; of the action in bytes; start counting at 01 (&amp;lt;action&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|01||&amp;lt;action&amp;gt;: sets this pseudo-sprite to function as action 1&lt;br /&gt;
|-&lt;br /&gt;
|00||&amp;lt;feature&amp;gt;: In this case Train&lt;br /&gt;
|-&lt;br /&gt;
|01||&amp;lt;num-sets&amp;gt;: 1 Set of views&lt;br /&gt;
|-&lt;br /&gt;
|08||&amp;lt;num-ent&amp;gt;: 8 views of this train&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Stations&amp;diff=5106</id>
		<title>Action0/Stations</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Stations&amp;diff=5106"/>
		<updated>2025-08-26T19:27:25Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
Defining properties of new stations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unlike vehicles, the new stations have no equivalent in TTD. The IDs are therefore free to be chosen and will in fact be allocated automatically. In action 0, you only specify IDs relative to the set, i.e. the ID of the first station type is 00, the second station type is 01 and so on.&lt;br /&gt;
&lt;br /&gt;
{{ttdp|}} In TTDPatch each game can only have 255 station IDs for all active grf files.&lt;br /&gt;
&lt;br /&gt;
The only property you &#039;&#039;&#039;must&#039;&#039;&#039; set for each station ID is 08 (in addition to defining an [[Action3|action 3]] for it), anything else can be left at the default. It must be the first property you set for each station ID, because the station ID is actually undefined until it has been assigned a class through property 08. Also, all station 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;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||D||{{ottdp|0.6|2.5|ttdprev=alpha 19}}||Class ID, see below&lt;br /&gt;
|-&lt;br /&gt;
|09||V||{{ottdp|0.6|2.5|ttdprev=alpha 20}}||Sprite layout, see below&lt;br /&gt;
|-&lt;br /&gt;
|0A||B/B*||{{ottdp|0.6|2.5|ttdprev=alpha 20}}/{{ottdp|14.0}}||Copy sprite layout&lt;br /&gt;
|-&lt;br /&gt;
|0B||B||{{ottdp|0.6|2.5|ttdprev=alpha 22}}||Callback flags&lt;br /&gt;
|-&lt;br /&gt;
|0C||B||{{ottdp|0.6|2.5|ttdprev=alpha 22}}||Bit mask of disabled numbers of platforms&lt;br /&gt;
|-&lt;br /&gt;
|0D||B||{{ottdp|0.6|2.5|ttdprev=alpha 22}}||Bit mask of disabled platform lengths&lt;br /&gt;
|-&lt;br /&gt;
|0E||V||{{ottdp|0.6|2.5|ttdprev=alpha 22}}||Define custom layout, see below&lt;br /&gt;
|-&lt;br /&gt;
|0F||B/B*||{{ottdp|0.6|2.5|ttdprev=alpha 22}}/{{ottdp|14.0}}||Copy custom layout from stationid given by argument&lt;br /&gt;
|-&lt;br /&gt;
|10||W||{{ottdp|0.6|2.5|ttdprev=alpha 25}}||Little/lots threshold&lt;br /&gt;
|-&lt;br /&gt;
|11||B||{{ottdp|0.6|2.5|ttdprev=alpha 27}}||Pylon placement&lt;br /&gt;
|-&lt;br /&gt;
|12||D||{{ottdp|0.6|2.5|ttdprev=alpha 30}}||Bit mask of cargo type triggers for random sprites&lt;br /&gt;
|-&lt;br /&gt;
|13||B||{{ottdp|0.6|2.5|ttdprev=alpha 30}}||General flags&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|0.6|2.5|ttdprev=alpha 47}}||Overhead wire placement&lt;br /&gt;
|-&lt;br /&gt;
|15||B||{{ottdp|0.6|2.5|ttdprev=alpha 51}}||Can train enter tile&lt;br /&gt;
|-&lt;br /&gt;
|16||W||{{ottdp|0.7|2.5|ttdprev=beta 9}}||Animation information&lt;br /&gt;
|-&lt;br /&gt;
|17||B||{{ottdp|0.7|2.5|ttdprev=beta 9}}||Animation speed&lt;br /&gt;
|-&lt;br /&gt;
|18||W||{{ottdp|0.7|2.5|ttdprev=beta 9}}||Animation triggers&lt;br /&gt;
|-&lt;br /&gt;
|1A||V||{{ottdp|1.2|no|ottdrev=r22518}}||Advanced sprite layout with register modifiers&lt;br /&gt;
|-&lt;br /&gt;
|1B|| || ||Reserved&lt;br /&gt;
|-&lt;br /&gt;
|1C||W||{{ottdp|14}}||Station name&lt;br /&gt;
|-&lt;br /&gt;
|1D||W||{{ottdp|14}}||Station class name&lt;br /&gt;
|-&lt;br /&gt;
|1E||V||{{ottdp|15}}||Station sprite layout flags&lt;br /&gt;
|-&lt;br /&gt;
|1F||W n*W||{{ottdp|15}}||List of badges&lt;br /&gt;
|-&lt;br /&gt;
|20||B* n*B||{{ottdp|15}}||Minimum height list.&lt;br /&gt;
|-&lt;br /&gt;
|21||B* n*B||{{ottdp|15}}||Blocked bridge pillars list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unofficial additions and changes. Don&#039;t rely on them to ever work this way in OpenTTD or TTDPatch:&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|1B||8*B||whatever-PP||Minimum bridge height for bridges over stations&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Station class (08) ===&lt;br /&gt;
TTDPatch groups sets of new station graphics into various classes. &amp;amp;nbsp;The classes can be selected by the top dropdown list in the construction window, and the individual stations within the class from the bottom dropdown list. &amp;amp;nbsp;In addition, each station can alter its appearance using [[VariationalAction2|variational]] and/or [[RandomAction2|random]] action 2 entries.&lt;br /&gt;
&lt;br /&gt;
Only two classes are pre-defined:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Name!!Class ID!!Intended use for station&lt;br /&gt;
|-&lt;br /&gt;
|DFLT||44 46 4C 54||Default, no special station type&lt;br /&gt;
|-&lt;br /&gt;
|WAYP||57 41 59 50||Non-cargo stations, waypoints, signal boxes etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You may simply use other classes than the above, as long as no more than (at the moment) 16 classes are used among all active .grf files at any time.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Station classes which start with the byte FF are considered waypoint classes, and will appear in the waypoint construction window instead of the station construction window.&lt;br /&gt;
&lt;br /&gt;
When a waypoint station is built, it will not accept cargo nor will any cargo appear from nearby industries or towns. &amp;amp;nbsp;Trains will not stop at waypoint stations, regardless of the non-stop order and/or the nonstop switch.&lt;br /&gt;
&lt;br /&gt;
=== Sprite layout (09) ===&lt;br /&gt;
This controls what sprites are displayed, where they are displayed, and in what order. &amp;amp;nbsp;The property is variable sized, and contains the data for all 8 possible station tile types. &amp;amp;nbsp;If this property is set, the num-ent in the corresponding [[Action1|action 1]] need not be equal to 12 (hex), it can in fact be any number, and any number of sprites can be displayed in any order.&lt;br /&gt;
&lt;br /&gt;
The data is specified as data for all eight tiles in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;data1&amp;amp;gt; &amp;amp;lt;data2&amp;amp;gt; ... &amp;amp;lt;datan&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B*||num||Number of different tiles supported (see below)&lt;br /&gt;
|-&lt;br /&gt;
|V||data1...||The variable size data for each of the &amp;amp;lt;num&amp;amp;gt; tiles, as specified below&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Number of tiles supported =====&lt;br /&gt;
* Normally this is 8, but you can specify fewer as well&lt;br /&gt;
* Using callback flags bit 1, specifying more makes sense too&lt;br /&gt;
* This value must be the same for all stations set by this action 0, even though it must be repeated for the prop. 09 definition of each station ID as well&lt;br /&gt;
&lt;br /&gt;
(Note that num is an extended byte, see [[GRFActionsDetailed]].)&lt;br /&gt;
&lt;br /&gt;
The content of each of the (usually eight) data sets is either a new sprite layout:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|D||groundsprite||the sprite to draw for the rails; this is by default a TTD sprite, but with bit 31 set an [[Action1|action 1]] sprite (42D+X) may be specified&lt;br /&gt;
|-&lt;br /&gt;
|V||spritedata||the data for station sprites, see below; each has a size of 10 bytes, and there may be several&lt;br /&gt;
|-&lt;br /&gt;
|B||80||a literal 80 ends the list of sprites for this tile&lt;br /&gt;
|}&lt;br /&gt;
or, alternatively, the instruction to use TTD&#039;s layout by using four zero bytes 00 00 00 00 instead of the groundsprite bytes. You can use [http://www.bytetransfer.de/projects/ttdpatch/docs/spriteidmapping.php the online sprite ID converter] to look up the sprite IDs you can use for all the climates.&lt;br /&gt;
&lt;br /&gt;
One can draw two types of sprites. &amp;amp;nbsp;One type is one that establishes a new 3D bounding box for use by the sprite sorter. &amp;amp;nbsp;The other type shares the 3D bounding box of the previous sprite(s). &amp;amp;nbsp;It must not be larger than the sprite which established the bounding box, nor must any part of it be outside this box. &amp;amp;nbsp;For simplicity, it should have the exact same dimensions as the sprite it shares the bounding box with. &amp;amp;nbsp;The latter type is supported in the station construction window display only since TTDPatch 2.6 r1684.&lt;br /&gt;
&lt;br /&gt;
The spritedata of sprites with their own bounding box has this format:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||xofs||x-offset from northern tile corner&lt;br /&gt;
|-&lt;br /&gt;
|B||yofs||y-offset from northern tile corner&lt;br /&gt;
|-&lt;br /&gt;
|B||zofs||z-offset from northern tile corner&lt;br /&gt;
|-&lt;br /&gt;
|B||xextent||size of sprite in x direction&lt;br /&gt;
|-&lt;br /&gt;
|B||yextent||size of sprite in y direction&lt;br /&gt;
|-&lt;br /&gt;
|B||zextent||size of sprite in z direction&lt;br /&gt;
|-&lt;br /&gt;
|D||sprite||sprite number to draw&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The spritedata of sprites sharing the bounding box has this format:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||xofs||x-offset relative to previous sprite&lt;br /&gt;
|-&lt;br /&gt;
|B||yofs||y-offset relative to previous sprite&lt;br /&gt;
|-&lt;br /&gt;
|B||80||a literal 80&lt;br /&gt;
|-&lt;br /&gt;
|B||00||(ignored)&lt;br /&gt;
|-&lt;br /&gt;
|B||00||(ignored)&lt;br /&gt;
|-&lt;br /&gt;
|B||00||(ignored)&lt;br /&gt;
|-&lt;br /&gt;
|D||sprite||sprite number to draw&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Since OpenTTD r18959 you can draw multiple ground sprites for a tile, which is useful if you want to use the usual rail/grass/concrete groundtile, but still need to add features to it without using a new bounding box. To do so use the syntax of sprites sharing the previous bounding box, but use it before the first bounding box definition. xpixeloffset and ypixeloffset refer to the usual spot of groundtiles. The same feature is also partially supported in TTDPatch since TTDPatch 2.6 r2312: TTDPatch ignores the xofs and yofs fields and always uses (0,0) for the offset. If you are developing a GRF that needs to be compatible with both OpenTTD and TTDPatch, you should always keep xofs and yofs zero to get the same effect in both games.&lt;br /&gt;
Note however that both implementations do not consider the [[Action0/Stations#General_Flags_.2813.29|setting of prop13 bit 0]], hence these &amp;quot;multiple ground sprites&amp;quot; have to be always part of the building sprites set and cannot be part of the different sprite set for ground sprites.&lt;br /&gt;
&lt;br /&gt;
The sprite number can have the following values (remember to use little endian, i.e. reversed byte order):&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!!Sprite&lt;br /&gt;
|-&lt;br /&gt;
|0000042D+X||use sprite X from the corresponding [[Action1|action 1]] block (i.e. 0000042D for the first, 0000042E for the second, etc.)&lt;br /&gt;
|-&lt;br /&gt;
|0000842D+X||same, but draw it using company colour translation&lt;br /&gt;
|-&lt;br /&gt;
|0322442D+X||same, but draw in transparent mode (actual colours of the sprite are disregarded entirely); supported in station construction window display since TTDPatch 2.6 r1683&lt;br /&gt;
|-&lt;br /&gt;
|RRRR842D+X||draw sprite with colour translation defined in sprite RRRR; available since TTDPatch 2.6 r1683&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
With bit 31 set, this sprite will refer to a TTD sprite, not the action 1 sprite. For the first ground sprite the reverse meaning applies.&lt;br /&gt;
&lt;br /&gt;
Depending on the railtype the sprites may get additional offsets:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
! !! Normal/electrified rail !! Monorail !! Maglev&lt;br /&gt;
|-&lt;br /&gt;
|TTD sprites || 0 || 82 || 164&lt;br /&gt;
|-&lt;br /&gt;
|Action 1 sprite (first ground sprite) || 0 || 1 || 2&lt;br /&gt;
|-&lt;br /&gt;
|Action 1 sprite (other sprites in the layout) || 0 || 0 || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
So, TTD sprites and the first ground sprite are affected by the railtype, while other action 1 sprites in the layout are not. The offset &amp;quot;82&amp;quot; refers to the offset between the default TTD track sprites; if you are using non-track ground sprites which are not from an action 1, you need to supply fake spritenumbers which preemptively reverse the offsets (that is, you need different sprite layouts for every railtype your station is available for).&lt;br /&gt;
&lt;br /&gt;
Setting bit 30 forces this sprite to be displayed normally even in &amp;quot;transparent buildings&amp;quot; mode (supported only in TTDPatch 2.6 r1695 and later).&lt;br /&gt;
&lt;br /&gt;
See below for an example of linked sprites as well as transparent sprites (e.g. for a station roof).&lt;br /&gt;
&lt;br /&gt;
Note that the coordinates here are 3D coordinates with x running from top-right to bottom-left and y running from top-left to bottom-right, with the tile dimensions being 16x16 (and 8 for one height level). This means the x and y values should always be within 0-15 (decimal).&lt;br /&gt;
&lt;br /&gt;
This is different to and independent from the x/y offsets used in the actual .NFO file. &amp;amp;nbsp;The 3D bounding box is used by TTD&#039;s sprite sorter to figure out the order in which to draw the sprites, as well as telling it which sprites to draw, because those whose bounding box falls outside the currently updated screen rectangle will not be drawn. &amp;amp;nbsp;Make sure the 3D bounding box is large enough to contain the entire sprite, but not so large that the sprite sorter can&#039;t determine which sprites should be in front.&lt;br /&gt;
&lt;br /&gt;
This means that the order in which you specify sprites is irrelevant. &amp;amp;nbsp;Sprites will get drawn from back to front, in the order which the sprite sorter determines as correct, from their bounding boxes. &amp;amp;nbsp;There are two exceptions, however:&lt;br /&gt;
* Sprites sharing the same bounding box will always be drawn in the given order.&lt;br /&gt;
* The station construction window display doesn&#039;t use the sprite sorter. Tiles that may be displayed in that window need to be specified in the correct drawing order, back to front.&lt;br /&gt;
&lt;br /&gt;
=== Copy sprite layout (0A) ===&lt;br /&gt;
&lt;br /&gt;
This is not a property as such, but an action. &amp;amp;nbsp;It takes as argument a byte which is interpreted as station-ID to copy the custom sprite layout from.&lt;br /&gt;
&lt;br /&gt;
Since {{ottdp|14.0}} this property is now an extended byte.&lt;br /&gt;
&lt;br /&gt;
=== Callback flags (0B) ===&lt;br /&gt;
For stations, the following [[callbacks]] can be defined by setting the corresponding bit in property 0B:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Variable 0C value!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||13||Whether to make station available in construction window (non-zero callback return) or not (callback returns zero)&lt;br /&gt;
|-&lt;br /&gt;
|1||2||14||Use callback to select sprite layout&lt;br /&gt;
|-&lt;br /&gt;
|2||4||141||Decide next animation frame&lt;br /&gt;
|-&lt;br /&gt;
|3||8||142||Decide animation speed&lt;br /&gt;
|-&lt;br /&gt;
|4||10||149||Custom slope check&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 [[VariationalAction2|VarAction2]] for callbacks.&lt;br /&gt;
&lt;br /&gt;
=== Selection of numbers of platforms and length (0C, 0D) ===&lt;br /&gt;
&lt;br /&gt;
By default all platform lengths and any number of platforms is available for the new stations. &amp;amp;nbsp;Using these properties, you can choose which ones should be unavailable by setting the corresponding bit in the property.&lt;br /&gt;
&lt;br /&gt;
The values are a byte, used as a bit mask. &amp;amp;nbsp;Bits 0 to 6 control the availability of number or length 1 to 7, and bit 7 controls the availability of the &amp;quot;+7&amp;quot; button. &amp;amp;nbsp;Each bit that is set disables the corresponding length or number of platforms.&lt;br /&gt;
&lt;br /&gt;
For compatibility with &amp;quot;largestations off&amp;quot;, at least one length between 1 and 5 (bits 0 to 4) and one number of platforms between 1 and 4 (bits 0 to 3) must be available, i.e. at least one of these bits must be unset.&lt;br /&gt;
&lt;br /&gt;
=== Define custom layout (0E) ===&lt;br /&gt;
&lt;br /&gt;
This allows choosing which tile type is built at which tile of a newly built station. &amp;amp;nbsp;There are four different types, which TTD normally defines as&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Tile type!!Appearance&lt;br /&gt;
|-&lt;br /&gt;
|00||plain platform&lt;br /&gt;
|-&lt;br /&gt;
|02||platform with building&lt;br /&gt;
|-&lt;br /&gt;
|04||platform with roof, left side&lt;br /&gt;
|-&lt;br /&gt;
|06||platform with roof, right side&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Since {{ottdp|15}}, all even values up to FE are supported if the sprite layout is defined via property 09/0A.&lt;br /&gt;
&lt;br /&gt;
These numbers are used for stations in NE-SW direction, or these numbers plus one for stations in the NW-SE direction. &amp;amp;nbsp;To define a custom layout, use this format:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||length||length of platforms for this layout&lt;br /&gt;
|-&lt;br /&gt;
|B||number||number of platforms for this layout&lt;br /&gt;
|-&lt;br /&gt;
|V||tiles||length*number bytes of tile types, one platform after another, only 00, 02, 04 or 06 are allowed as values&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Repeat this as often as necessary to define the layouts for all supported combinations of length and number. &amp;amp;nbsp;End the definitions with a 00 00 (zero length and zero number). &amp;amp;nbsp;Any combinations that are not defined will be built using TTD&#039;s default layout.&lt;br /&gt;
Note that it may be easier to draw different sprite sets using a [[VariationalAction2|VarAction2]] based on [[VarAction2Stations#Platform info 40 41 46 47 49|station variable 40]], rather than redefining the layout. &amp;amp;nbsp;In addition, [[Callbacks#Custom station layout 24|callback 24]] will be used to further customize the layout as defined by this property (or by TTD if no prop 0E layout is available). This may also be easier than defining a prop 0E layout for every combination of length and number of platforms.&lt;br /&gt;
&lt;br /&gt;
=== Copy custom layout (0F) ===&lt;br /&gt;
&lt;br /&gt;
Similar to property 0A, this copies the custom layout from the station-ID given by the argument.&lt;br /&gt;
&lt;br /&gt;
Since {{ottdp|14.0}} this property is now an extended byte.&lt;br /&gt;
&lt;br /&gt;
=== Little/lots threshold (10) ===&lt;br /&gt;
Amount of cargo for switching from &amp;quot;little&amp;quot; to &amp;quot;lots&amp;quot; of cargo. &amp;amp;nbsp;TTDPatch separates the full range of cargo amounts (0 to 4095) into two separate subranges, &amp;quot;little&amp;quot; and &amp;quot;lots&amp;quot; of cargo. &amp;amp;nbsp;This allows better control of cargo amount based graphics (if needed). &amp;amp;nbsp;Property 10 specifies at what amount of cargo the patch is to switch from one to the other subrange. &amp;amp;nbsp;See [[Action2Stations|Action 2 for stations]] for more information.&lt;br /&gt;
&lt;br /&gt;
=== Pylon placement (11) and wire placement (14) ===&lt;br /&gt;
Prop. 11 sets which tile types should have pylons when used with electrified tracks. By default, tiles 0-3 (default stations without roof) have pylons, and tiles 4-7 (default stations with roof) don&#039;t. This is a bit mask of tile types, with a bit set meaning that a pylon should be drawn. The tile types here do not consider [[Callbacks#Station sprite layout 14|callback 14]], but rather the type as it was built, i.e. from prop. 0E.&lt;br /&gt;
&lt;br /&gt;
Prop. 14 works in a similar way, except that it sets the tile types on which there should be &#039;&#039;no&#039;&#039; wires displayed. With the default value of &amp;quot;00&amp;quot;, wires are displayed everywhere, and for each bit set, the wire is omitted on that tile type.&lt;br /&gt;
&lt;br /&gt;
This property should only be used when the wires cause problems with the sprite sorter, because even when the wire is obscured by a station hall or similar, it should still show up in transparent mode so that each tile can easily be verified as being electrified.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Note: This property only allows setting the flags of the first 8 sprite layouts. Use Property 1E instead to set flags when more sprite layouts are used via prop. 0E or [[Callbacks#Custom_station_layout_.2824.29|callback 24]].&lt;br /&gt;
&lt;br /&gt;
=== Cargo types for random triggers (12) ===&lt;br /&gt;
&lt;br /&gt;
This sets which cargo types should trigger re-randomizing. The cargo types are given as a bitmask of the bits from column 3 (type B) in CargoTypes. &amp;amp;nbsp;If nothing is set (the default), the no random triggers will happen, to conserve CPU time.&lt;br /&gt;
&lt;br /&gt;
With GRF version 7 and above, the interpretation of bits changes. Instead of climate-dependent cargo slot numbers (type B), you have to set the bits of climate-independent cargo ID (type A).&lt;br /&gt;
&lt;br /&gt;
{{ottd|15.0}} Since 15.0, a default cargo translation table corresponding to the climate is used if one is not provided.&lt;br /&gt;
&lt;br /&gt;
=== General Flags (13) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Version!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||{{ottdp|0.7|2.5}}||use different sprite set for ground sprites ([[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|var. 10]] is 1 for ground sprites, 0 otherwise)&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|0.6|2.5}}||when calculating the cargo amount to display, divide the amount by the station size (to simulate cargo distributed over the area of the station)&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|0.7|2.5}}||[[Callbacks#Next animation frame (1A/26/141/153/158)|callback 141]] needs random bits in var. 10&lt;br /&gt;
|-&lt;br /&gt;
|3||8||{{ottdp|1.0|2.6}}||Use custom foundations on sloped tiles (the lowest byte of [[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|var. 10]] is 2 for foundation sprites)&lt;br /&gt;
|-&lt;br /&gt;
|4||10||{{ottdp|1.0|2.6}}||When bit 3 is set, use extended foundation block instead of the simple one&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Bit 3 works somewhat similarly to bit 0: your sprite selection will be called again, with 2 in the lowest byte of [[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|variable 10]]. If the chain ends on a callback result, the program will assume the foundation selection has failed and will use the default foundaton sprites. The low word of [[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|variable 18]] will contain the tile type of the current tile; if you have [[Callbacks#Station sprite layout (14)|callback 14]] enabled, this will be the its return value - otherwise, the default TTD types (platform with building, platform with left roof etc.) are used. In either case, one is added for the NW-SE orientation, in case your station needs different foundations depending on its orientation. Bits 16 and 17 are set if the NW and and NE foundations are to merged with the corresponding neighbour tile, so you shouldn&#039;t draw the corresponding edge in the foundation sprite. Other bits of variable 10 and variable 18 are reserved for future use.&lt;br /&gt;
&lt;br /&gt;
Your sprite selection code should select a foundation sprite block. The contents of this block depends on whether bit 4 is set or not.&lt;br /&gt;
* Bit 4 clear (simple foundations):&lt;br /&gt;
[[File:simple_foundations.png]]&lt;br /&gt;
&lt;br /&gt;
The programme will combine the needed foundation from these 8 sprites depending on the current slope. You don&#039;t need to care about the merge data in bits 16..17 of [[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|variable 18]]; it will be taken care of that automatically by adding the 7th and 8th sprite only when necessary.&lt;br /&gt;
* Bit 4 set (extended foundations):&lt;br /&gt;
[[File:extended_foundations.png]]&lt;br /&gt;
&lt;br /&gt;
You need to have one sprite for every slope that&#039;s possible below a rail station. The correct one will be automatically selected depending on the current slope. It can&#039;t handle the merging itself, however, so you need four foundation blocks: one with no edges removed, one with the NW edge removed, one with the NE edge removed and one with both north edges removed. Your sprite selection code is responsible for selecting the correct of those blocks according to the merge info in [[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|variable 18]].&lt;br /&gt;
&lt;br /&gt;
In both cases, you can put an additional value into register 100h, which will serve as an offset into the selected block. If you don&#039;t modify register 100h during the chain, it will default to 0. It is important that the dimensions of these sprites remain the same - thus bit 6 in the real sprites must be set to prevent GRFCodec from trimming the empty blue areas. The offset of these foundations must be -31 to the X direction and -9 to the Y direction.&lt;br /&gt;
&lt;br /&gt;
=== Can train enter tile (15) ===&lt;br /&gt;
&lt;br /&gt;
Like props. 11 and 14, this value contains eight bits relating to the eight possible tile types. If a bit is set, trains are prevented from routing through or entering any tile of this type.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Note: This property only allows setting the flags of the first 8 sprite layouts. Use Property 1E instead to set flags when more sprite layouts are used via prop. 0E or [[Callbacks#Custom_station_layout_.2824.29|callback 24]].&lt;br /&gt;
&lt;br /&gt;
=== Animation information (16) ===&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;
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/152/159)|callback 140]] 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/153/158)|callback 141]] for that.&lt;br /&gt;
&lt;br /&gt;
=== Animation speed (17) ===&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 2.&lt;br /&gt;
&lt;br /&gt;
=== Animation triggers (18) ===&lt;br /&gt;
This is a bit mask of events that should trigger [[Callbacks#Animation control (1B/25/140/152/159)|callback 140]], allowing to change the animation state&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Property bit, var18 byte 0!!Property value!!Version!!Meaning!!Happens on!!Var 18 byte 1&lt;br /&gt;
|-&lt;br /&gt;
|0||1||{{ottdp|0.7|2.5}}||Station part is built||the newly built tiles||&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|0.7|2.5}}||New cargo arrives to station||whole station||Cargo type &amp;lt;ref name=&amp;quot;cargotype&amp;quot;&amp;gt;Bits 8..15 of var 18 contain the triggering cargo type. If your GRF has a cargo translation table, the cargo type will be an index in that table, or FFh if the cargo isn&#039;t in the table. If you don&#039;t have a cargo translation table, the cargo type will simply be the climate-dependent cargo type number.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|0.7|2.5}}||A cargo type gets removed from station||whole station||Cargo type &amp;lt;ref name=&amp;quot;cargotype&amp;quot;/&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3||8||{{ottdp|0.7|2.5}}||Train enters station (starts loading/unloading)||platform where the train is||&lt;br /&gt;
|-&lt;br /&gt;
|4||10||{{ottdp|0.7|2.5}}||Train leaves station (done loading/unloading)||platform where the train is||&lt;br /&gt;
|-&lt;br /&gt;
|5||20||{{ottdp|1.2|2.5|ottdrev=r22746}}||Train loads/unloads cargo||platform where the train is||&lt;br /&gt;
|-&lt;br /&gt;
|6||40||{{ottdp|0.7|2.5}}||Every 250 ticks||whole station||&lt;br /&gt;
|-&lt;br /&gt;
|7||80||{{ottdp|15|no}}||Tile is processed in the periodic processing loop||single tile||&lt;br /&gt;
|-&lt;br /&gt;
|8||100||{{ottdp|15|no}}||Train reserves platform (using PBS)||platform where the train reserved||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The remaining bits are reserved for future triggers, they must be zero for now.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;happens on&amp;quot; column tells which tiles will [[Callbacks#Animation control (1B/25/140/152/159) |callback 140]] be called on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Advanced sprite layout with register modifiers (1A) ===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.2|no|ottdrev=r22518}}&lt;br /&gt;
Format:&lt;br /&gt;
 1A &amp;lt;num-layouts&amp;gt; &amp;lt;0x40 + num-sprites&amp;gt;&lt;br /&gt;
                  &amp;lt;groundsprite&amp;gt; &amp;lt;flags&amp;gt; [&amp;lt;register/value&amp;gt;]...&lt;br /&gt;
                  [ &amp;lt;buildingsprite&amp;gt; &amp;lt;flags&amp;gt;&lt;br /&gt;
                      ( &amp;lt;xoffset&amp;gt; &amp;lt;yoffset&amp;gt; &amp;lt;zoffset&amp;gt; &amp;lt;xextent&amp;gt; &amp;lt;yextent&amp;gt; &amp;lt;zextent&amp;gt; &lt;br /&gt;
                      | &amp;lt;xpixeloffset&amp;gt; &amp;lt;ypixeloffset&amp;gt; 80)&lt;br /&gt;
                    [&amp;lt;register/value&amp;gt;]...&lt;br /&gt;
                  ]...&lt;br /&gt;
&lt;br /&gt;
For further details see [https://wiki.openttd.org/en/Archive/Development/Advanced%20Sprite%20Layout#stations here] for now.&lt;br /&gt;
&lt;br /&gt;
=== Minimum bridge height (1B) ===&lt;br /&gt;
&lt;br /&gt;
This property allows building bridges over stations.&lt;br /&gt;
&lt;br /&gt;
The bridge height property defines minimum clearances required for a bridge for each of the four [[Action0/Stations#Define_custom_layout_.280E.29|tile types]] of this station (or zero to not allow any bridge). Values are given in &amp;quot;height level&amp;quot; units (1 level == 8px).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; |-&lt;br /&gt;
!Height (1)!!Appearance&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; |x1 y1 ||plain platform&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; |x2 y2 ||platform with building&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; |x3 y3 ||platform with roof, left side&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; |x4 y4 ||platform with roof, right side&lt;br /&gt;
|}&lt;br /&gt;
(1) where the values are one byte pairs (x-direction, y-direction) expressed in hexadecimal notation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
&lt;br /&gt;
1B &amp;lt;1st pair&amp;gt; &amp;lt;2nd pair&amp;gt; &amp;lt;3rd pair&amp;gt; &amp;lt;4th pair&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
1B x1 y1 x2 y2 x3 y3 x4 y4&amp;lt;br /&amp;gt;&lt;br /&gt;
1B 01 01 02 02 03 03 03 03 // 8px 16px 24px 24px&lt;br /&gt;
&lt;br /&gt;
This property is currently only available for JGR&#039;s Patch Pack (v0.26.0 and later) and the developmental &amp;quot;New Map Features&amp;quot; (NMF) fork of OpenTTD.&lt;br /&gt;
&lt;br /&gt;
=== Station name (1C) ===&lt;br /&gt;
&lt;br /&gt;
=== Station class name (1D) ===&lt;br /&gt;
&lt;br /&gt;
=== Station sprite layout flags (1E) ===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Since OpenTTD supports more than 8 sprite layouts to be used, props. 11, 14 and 15 are not sufficient to set the flags for all usable sprite layouts. This property is variable length and allows these flags to be set for each tile beyond the original limit of 8.&lt;br /&gt;
&lt;br /&gt;
The data is specified as flags for all sprite layouts in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;flags1&amp;amp;gt; &amp;amp;lt;flags2&amp;amp;gt; ... &amp;amp;lt;flagsn&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B*||num||Number of different tiles supported (see below)&lt;br /&gt;
|-&lt;br /&gt;
|B||flags1...||The flags for each of the &amp;amp;lt;num&amp;amp;gt; tiles, as specified below&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The flag values are as follows:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
|Bit||Value||Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||01||Tile should contain catenary pylons.&lt;br /&gt;
|-&lt;br /&gt;
|1||02||Tile should NOT contain catenary wires.&lt;br /&gt;
|-&lt;br /&gt;
|2||04||Tile is blocked to vehicles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These should be combined as needed.&lt;br /&gt;
&lt;br /&gt;
===Minimum Bright Height (20)===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} This property allows building bridges over stations.&lt;br /&gt;
&lt;br /&gt;
The bridge height property defines minimum clearances required for a bridge for the sprite layouts of this station (or zero to not allow any bridge). Values are given in &amp;quot;height level&amp;quot; units (1 level == 8px). &lt;br /&gt;
&lt;br /&gt;
The data is specified as minimum height for all sprite layouts in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;height1&amp;amp;gt; &amp;amp;lt;height2&amp;amp;gt; ... &amp;amp;lt;heightn&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B*||num||Number of different tiles supported (see below)&lt;br /&gt;
|-&lt;br /&gt;
|B||height...||The minimum heights for each of the &amp;amp;lt;num&amp;amp;gt; tiles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Blocked Pillar Information (21)===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Allows information to provided about blocked bridge pillars to assist the game in hiding pillars if necessary depending on what is above the station tile. Blocking a pillar prevents the pillar from being drawn. It does not prevent the station being bridgeable.&lt;br /&gt;
&lt;br /&gt;
The data is specified as blocked pillar flags for all sprite layouts in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;flags1&amp;amp;gt; &amp;amp;lt;flags2&amp;amp;gt; ... &amp;amp;lt;flagsn&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B*||num||Number of different tiles supported (see below)&lt;br /&gt;
|-&lt;br /&gt;
|B||flags...||The blocked pillar flags for each of the &amp;amp;lt;num&amp;amp;gt; tiles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The flag bits are as follows:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
|Bit||Value||Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||01||Tile layout blocks a pillar on the west corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|1||02||Tile layout blocks a pillar on the south corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|2||04||Tile layout blocks a pillar on the east corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|3||08||Tile layout blocks a pillar on the north corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|4||10||Tile layout blocks a wall on the north east side of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|5||20||Tile layout blocks a wall on the south east side of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|6||40||Tile layout blocks a wall on the south west side of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|7||80||Tile layout blocks a wall on the north west side of the tile.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These should be combined as needed.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Using TTD&#039;s sprite layouts for certain tiles ===&lt;br /&gt;
&lt;br /&gt;
To use TTD&#039;s layout, you use &amp;lt;code&amp;gt;00 00 00 00&amp;lt;/code&amp;gt; for the ground sprite number and leave off everything else.&lt;br /&gt;
&lt;br /&gt;
So instead of for example&lt;br /&gt;
&lt;br /&gt;
 F4 03 00 00&lt;br /&gt;
    00 00 00    10 05 02    2E 84 00 00&lt;br /&gt;
    00 0B 00    10 05 02    30 84 00 00&lt;br /&gt;
    80&lt;br /&gt;
&lt;br /&gt;
you just put&lt;br /&gt;
&lt;br /&gt;
 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
=== Using transparent sprites ===&lt;br /&gt;
&lt;br /&gt;
You can use transparent sprites to make for example the roof translucent like in TTD&#039;s stations. The roof of TTD&#039;s stations is made like this:&lt;br /&gt;
&lt;br /&gt;
 00 00 10    10 10 0A    37 84 00 00&lt;br /&gt;
 00 00 80    00 00 00    3B 44 22 03&lt;br /&gt;
&lt;br /&gt;
The first sprite here is the non-transparent frame of the roof, drawn in company colours (it has bit 15 set). The second part is a special &amp;quot;linked&amp;quot; sprite without its own bounding box, it shares that of the previous sprite. That&#039;s done by setting the z offset to 80.&lt;br /&gt;
&lt;br /&gt;
To make that second sprite transparent, bit 14 is set in the sprite number, and the upper word is set to 322 (*), so 0322443B means to take sprite 43B and draw it in transparent mode. The colours of that sprite are ignored entirely, every pixel in colour 0 is fully transparent, and all other pixels are semi-transparent (essentially just causing what they are drawn over to become darker).&lt;br /&gt;
&lt;br /&gt;
(*) This is the [[RecolorSprites#Default_recolour_sprites | recolour sprite]] for the glass effect.&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Road_Stops&amp;diff=5105</id>
		<title>Action0/Road Stops</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Road_Stops&amp;diff=5105"/>
		<updated>2025-08-26T19:26:48Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Defining properties of road stops.&lt;br /&gt;
&lt;br /&gt;
Road stop IDs may be freely chosen. In action 0, you need only specify IDs relative to the set, i.e. the ID of the first road stop type is 00, the second road type is 01 and so on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OpenTTD supports 64000 road stops per game, and 64000 road stop IDs per GRF file.&lt;br /&gt;
&lt;br /&gt;
The property you &#039;&#039;&#039;must&#039;&#039;&#039; set for each road stop ID is 08 (in addition to defining an action 3 for it). Also, all road stop 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!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||D||{{ottdp|14}}||Class label, see below&lt;br /&gt;
|-&lt;br /&gt;
|09||B||{{ottdp|14}}||Road stop type&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|14}}||Road stop name text ID&lt;br /&gt;
|-&lt;br /&gt;
|0B||W||{{ottdp|14}}||Class name text ID&lt;br /&gt;
|-&lt;br /&gt;
|0C||B||{{ottdp|14}}||Draw mode&lt;br /&gt;
|-&lt;br /&gt;
|0D||D||{{ottdp|14}}||Random trigger cargoes&lt;br /&gt;
|-&lt;br /&gt;
|0E||W||{{ottdp|14}}||Animation information&lt;br /&gt;
|-&lt;br /&gt;
|0F||B||{{ottdp|14}}||Animation speed&lt;br /&gt;
|-&lt;br /&gt;
|10||W||{{ottdp|14}}||Animation triggers&lt;br /&gt;
|-&lt;br /&gt;
|11||B||{{ottdp|14}}||Callback flags, see below&lt;br /&gt;
|-&lt;br /&gt;
|12||D||{{ottdp|14}}||General flags, see below&lt;br /&gt;
|-&lt;br /&gt;
|13||B* n*B||{{ottdp|15}}||Minimum height list.&lt;br /&gt;
|-&lt;br /&gt;
|14||B* n*B||{{ottdp|15}}||Blocked bridge pillars list.&lt;br /&gt;
|-&lt;br /&gt;
|15||W||{{ottdp|14}}||Cost multipiers, see below&lt;br /&gt;
|-&lt;br /&gt;
|16||W n*W||{{ottdp|15}}||List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Road stop class (08) ===&lt;br /&gt;
&lt;br /&gt;
New road stops are grouped graphics into classes.&lt;br /&gt;
&lt;br /&gt;
Only two classes are pre-defined:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Name!!Class ID!!Intended use for road stops&lt;br /&gt;
|-&lt;br /&gt;
|DFLT||44 46 4C 54||Default road stops&lt;br /&gt;
|-&lt;br /&gt;
|WAYP||57 41 59 50||{{ottdp|15}} Road waypoints&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Road stop classes which start with the byte FF are considered road waypoint classes, and will appear in the road waypoint construction window instead of the road bus/truck stop construction windows.&lt;br /&gt;
&lt;br /&gt;
It is recommended that the class identifier used is unique to your GRF(s).&lt;br /&gt;
&lt;br /&gt;
=== Road stop type (09) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||Passenger/bus stop&lt;br /&gt;
|-&lt;br /&gt;
|1||Freight/lorry stop&lt;br /&gt;
|-&lt;br /&gt;
|2||Both passenger/bus and freight/lorry stops&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default value is 2: Both passenger/bus and freight/lorry stops&lt;br /&gt;
&lt;br /&gt;
=== Road stop name text ID (0A) ===&lt;br /&gt;
&lt;br /&gt;
The text ID for this road stop (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;
=== Class name text ID (0B) ===&lt;br /&gt;
&lt;br /&gt;
The text ID for the road stop class.&lt;br /&gt;
&lt;br /&gt;
When specifying a road stop, 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;
=== Draw mode (0C) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||Bay stops: Draw road type ground sprite&lt;br /&gt;
|-&lt;br /&gt;
|1||2||Drive through stops: Draw road/tram type overlays&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|15}} Road waypoints: Draw the sprite layout ground tile (on top of the road)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default value is 3 (bits 0 and 1 both set).&lt;br /&gt;
&lt;br /&gt;
The remaining bits are reserved for future use.&lt;br /&gt;
&lt;br /&gt;
=== Cargo types for random triggers (0D) ===&lt;br /&gt;
&lt;br /&gt;
This sets which cargo types should trigger re-randomizing. The cargo types are given as a bitmask of the bits from column 3 (type B) in CargoTypes. &amp;amp;nbsp;If nothing is set (the default), the no random triggers will happen, to conserve CPU time.&lt;br /&gt;
&lt;br /&gt;
With GRF version 7 and above, the interpretation of bits changes. Instead of climate-dependent cargo slot numbers (type B), you have to set the bits of climate-independent cargo ID (type A).&lt;br /&gt;
&lt;br /&gt;
=== Animation information (0E) ===&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;
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/152/159)|callback 140]] 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/153/158)|callback 141]] for that.&lt;br /&gt;
&lt;br /&gt;
=== Animation speed (0F) ===&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 2.&lt;br /&gt;
&lt;br /&gt;
=== Animation triggers (10) ===&lt;br /&gt;
This is a bit mask of events that should trigger [[Callbacks#Animation control (1B/25/140/152/159)|callback 140]], allowing to change the animation state&lt;br /&gt;
&lt;br /&gt;
Roadstops have the same animation triggers as [[Action0/Stations#Animation_triggers_.2818.29|rail stations]].&lt;br /&gt;
&lt;br /&gt;
=== Callback flags (11) ===&lt;br /&gt;
For road stops, the following [[callbacks]] can be defined by setting the corresponding bit in property 0B:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Variable 0C value!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||13||Whether to make the road stop available in construction window (non-zero callback return) or not (callback returns zero)&lt;br /&gt;
|-&lt;br /&gt;
|1||2||141||Decide next animation frame&lt;br /&gt;
|-&lt;br /&gt;
|2||4||142||Decide animation speed&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 [[VariationalAction2|VarAction2]] for callbacks.&lt;br /&gt;
&lt;br /&gt;
=== General Flags (12) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||[[Callbacks#Next animation frame (1A/26/141/153/158)|callback 141]] needs random bits in var. 10&lt;br /&gt;
|-&lt;br /&gt;
|2||4||Do not show catenary graphics&lt;br /&gt;
|-&lt;br /&gt;
|3||8||Only allow drive-through stops (not bay stops)&lt;br /&gt;
|-&lt;br /&gt;
|4||10||Do not automatically build connecting road pieces&lt;br /&gt;
|-&lt;br /&gt;
|5||20||Only show in the road build menu (not tram)&lt;br /&gt;
|-&lt;br /&gt;
|6||40||Only show in the tram build menu (not road)&lt;br /&gt;
|-&lt;br /&gt;
|8||100||{{ottdp|15}} Read the draw mode from register 0x100, overriding the default value in property 0C&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default value is 0 (no bits set).&lt;br /&gt;
&lt;br /&gt;
The remaining bits are reserved for future use.&lt;br /&gt;
&lt;br /&gt;
===Minimum Bright Height (13)===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} This property allows building bridges over roadstops&lt;br /&gt;
&lt;br /&gt;
The bridge height property defines minimum clearances required for a bridge for the sprite layouts of this roadstop (or zero to not allow any bridge). Values are given in &amp;quot;height level&amp;quot; units (1 level == 8px). &lt;br /&gt;
&lt;br /&gt;
The data is specified as minimum height for all sprite layouts in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;height1&amp;amp;gt; &amp;amp;lt;height2&amp;amp;gt; ... &amp;amp;lt;heightn&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B*||num||Number of different tiles supported&lt;br /&gt;
|-&lt;br /&gt;
|B||height...||The minimum heights for each of the &amp;amp;lt;num&amp;amp;gt; tiles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Blocked Pillar Information (14)===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Allows information to provided about blocked bridge pillars to assist the game in hiding pillars if necessary depending on what is above the roadstop tile. Blocking a pillar prevents the pillar from being drawn. It does not prevent the roadstop being bridgeable.&lt;br /&gt;
&lt;br /&gt;
The data is specified as blocked pillar flags for all sprite layouts in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;flags1&amp;amp;gt; &amp;amp;lt;flags2&amp;amp;gt; ... &amp;amp;lt;flagsn&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B*||num||Number of different tiles supported&lt;br /&gt;
|-&lt;br /&gt;
|B||flags...||The blocked pillar flags for each of the &amp;amp;lt;num&amp;amp;gt; tiles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;flagsx1&amp;amp;gt; &amp;amp;lt;flagsy1&amp;amp;gt; &amp;amp;lt;flagsx2&amp;amp;gt; &amp;amp;lt;flagsy2&amp;amp;gt; ... &amp;amp;lt;flagsxn&amp;amp;gt; &amp;amp;lt;flagsyn&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The flag bits are as follows:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
|Bit||Value||Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||01||Tile layout blocks a pillar on the west corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|1||02||Tile layout blocks a pillar on the south corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|2||04||Tile layout blocks a pillar on the east corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|3||08||Tile layout blocks a pillar on the north corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|4||10||Tile layout blocks a wall on the north east side of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|5||20||Tile layout blocks a wall on the south east side of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|6||40||Tile layout blocks a wall on the south west side of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|7||80||Tile layout blocks a wall on the north west side of the tile.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These should be combined as needed.&lt;br /&gt;
&lt;br /&gt;
=== Cost multipliers (15) ===&lt;br /&gt;
&lt;br /&gt;
The first byte is the build cost multiplier.&lt;br /&gt;
&lt;br /&gt;
The second byte is the removal cost multiplier.&lt;br /&gt;
&lt;br /&gt;
The total property length is 2 bytes.&lt;br /&gt;
&lt;br /&gt;
A value of 16 produces a build or removal cost the same as non-NewGRF road stops.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Road_Stops&amp;diff=5104</id>
		<title>Action0/Road Stops</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Road_Stops&amp;diff=5104"/>
		<updated>2025-08-26T19:26:35Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Defining properties of road stops.&lt;br /&gt;
&lt;br /&gt;
Road stop IDs may be freely chosen. In action 0, you need only specify IDs relative to the set, i.e. the ID of the first road stop type is 00, the second road type is 01 and so on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OpenTTD supports 64000 road stops per game, and 64000 road stop IDs per GRF file.&lt;br /&gt;
&lt;br /&gt;
The property you &#039;&#039;&#039;must&#039;&#039;&#039; set for each road stop ID is 08 (in addition to defining an action 3 for it). Also, all road stop 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!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||D||{{ottdp|14}}||Class label, see below&lt;br /&gt;
|-&lt;br /&gt;
|09||B||{{ottdp|14}}||Road stop type&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|14}}||Road stop name text ID&lt;br /&gt;
|-&lt;br /&gt;
|0B||W||{{ottdp|14}}||Class name text ID&lt;br /&gt;
|-&lt;br /&gt;
|0C||B||{{ottdp|14}}||Draw mode&lt;br /&gt;
|-&lt;br /&gt;
|0D||D||{{ottdp|14}}||Random trigger cargoes&lt;br /&gt;
|-&lt;br /&gt;
|0E||W||{{ottdp|14}}||Animation information&lt;br /&gt;
|-&lt;br /&gt;
|0F||B||{{ottdp|14}}||Animation speed&lt;br /&gt;
|-&lt;br /&gt;
|10||W||{{ottdp|14}}||Animation triggers&lt;br /&gt;
|-&lt;br /&gt;
|11||B||{{ottdp|14}}||Callback flags, see below&lt;br /&gt;
|-&lt;br /&gt;
|12||D||{{ottdp|14}}||General flags, see below&lt;br /&gt;
|-&lt;br /&gt;
|13||B* n*B||{ottdp|15}}||Minimum height list.&lt;br /&gt;
|-&lt;br /&gt;
|14||B* n*B||{ottdp|15}}||Blocked bridge pillars list.&lt;br /&gt;
|-&lt;br /&gt;
|15||W||{{ottdp|14}}||Cost multipiers, see below&lt;br /&gt;
|-&lt;br /&gt;
|16||W n*W||{{ottdp|15}}||List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Road stop class (08) ===&lt;br /&gt;
&lt;br /&gt;
New road stops are grouped graphics into classes.&lt;br /&gt;
&lt;br /&gt;
Only two classes are pre-defined:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Name!!Class ID!!Intended use for road stops&lt;br /&gt;
|-&lt;br /&gt;
|DFLT||44 46 4C 54||Default road stops&lt;br /&gt;
|-&lt;br /&gt;
|WAYP||57 41 59 50||{{ottdp|15}} Road waypoints&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Road stop classes which start with the byte FF are considered road waypoint classes, and will appear in the road waypoint construction window instead of the road bus/truck stop construction windows.&lt;br /&gt;
&lt;br /&gt;
It is recommended that the class identifier used is unique to your GRF(s).&lt;br /&gt;
&lt;br /&gt;
=== Road stop type (09) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||Passenger/bus stop&lt;br /&gt;
|-&lt;br /&gt;
|1||Freight/lorry stop&lt;br /&gt;
|-&lt;br /&gt;
|2||Both passenger/bus and freight/lorry stops&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default value is 2: Both passenger/bus and freight/lorry stops&lt;br /&gt;
&lt;br /&gt;
=== Road stop name text ID (0A) ===&lt;br /&gt;
&lt;br /&gt;
The text ID for this road stop (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;
=== Class name text ID (0B) ===&lt;br /&gt;
&lt;br /&gt;
The text ID for the road stop class.&lt;br /&gt;
&lt;br /&gt;
When specifying a road stop, 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;
=== Draw mode (0C) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||Bay stops: Draw road type ground sprite&lt;br /&gt;
|-&lt;br /&gt;
|1||2||Drive through stops: Draw road/tram type overlays&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|15}} Road waypoints: Draw the sprite layout ground tile (on top of the road)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default value is 3 (bits 0 and 1 both set).&lt;br /&gt;
&lt;br /&gt;
The remaining bits are reserved for future use.&lt;br /&gt;
&lt;br /&gt;
=== Cargo types for random triggers (0D) ===&lt;br /&gt;
&lt;br /&gt;
This sets which cargo types should trigger re-randomizing. The cargo types are given as a bitmask of the bits from column 3 (type B) in CargoTypes. &amp;amp;nbsp;If nothing is set (the default), the no random triggers will happen, to conserve CPU time.&lt;br /&gt;
&lt;br /&gt;
With GRF version 7 and above, the interpretation of bits changes. Instead of climate-dependent cargo slot numbers (type B), you have to set the bits of climate-independent cargo ID (type A).&lt;br /&gt;
&lt;br /&gt;
=== Animation information (0E) ===&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;
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/152/159)|callback 140]] 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/153/158)|callback 141]] for that.&lt;br /&gt;
&lt;br /&gt;
=== Animation speed (0F) ===&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 2.&lt;br /&gt;
&lt;br /&gt;
=== Animation triggers (10) ===&lt;br /&gt;
This is a bit mask of events that should trigger [[Callbacks#Animation control (1B/25/140/152/159)|callback 140]], allowing to change the animation state&lt;br /&gt;
&lt;br /&gt;
Roadstops have the same animation triggers as [[Action0/Stations#Animation_triggers_.2818.29|rail stations]].&lt;br /&gt;
&lt;br /&gt;
=== Callback flags (11) ===&lt;br /&gt;
For road stops, the following [[callbacks]] can be defined by setting the corresponding bit in property 0B:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Variable 0C value!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||13||Whether to make the road stop available in construction window (non-zero callback return) or not (callback returns zero)&lt;br /&gt;
|-&lt;br /&gt;
|1||2||141||Decide next animation frame&lt;br /&gt;
|-&lt;br /&gt;
|2||4||142||Decide animation speed&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 [[VariationalAction2|VarAction2]] for callbacks.&lt;br /&gt;
&lt;br /&gt;
=== General Flags (12) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||[[Callbacks#Next animation frame (1A/26/141/153/158)|callback 141]] needs random bits in var. 10&lt;br /&gt;
|-&lt;br /&gt;
|2||4||Do not show catenary graphics&lt;br /&gt;
|-&lt;br /&gt;
|3||8||Only allow drive-through stops (not bay stops)&lt;br /&gt;
|-&lt;br /&gt;
|4||10||Do not automatically build connecting road pieces&lt;br /&gt;
|-&lt;br /&gt;
|5||20||Only show in the road build menu (not tram)&lt;br /&gt;
|-&lt;br /&gt;
|6||40||Only show in the tram build menu (not road)&lt;br /&gt;
|-&lt;br /&gt;
|8||100||{{ottdp|15}} Read the draw mode from register 0x100, overriding the default value in property 0C&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default value is 0 (no bits set).&lt;br /&gt;
&lt;br /&gt;
The remaining bits are reserved for future use.&lt;br /&gt;
&lt;br /&gt;
===Minimum Bright Height (13)===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} This property allows building bridges over roadstops&lt;br /&gt;
&lt;br /&gt;
The bridge height property defines minimum clearances required for a bridge for the sprite layouts of this roadstop (or zero to not allow any bridge). Values are given in &amp;quot;height level&amp;quot; units (1 level == 8px). &lt;br /&gt;
&lt;br /&gt;
The data is specified as minimum height for all sprite layouts in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;height1&amp;amp;gt; &amp;amp;lt;height2&amp;amp;gt; ... &amp;amp;lt;heightn&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B*||num||Number of different tiles supported&lt;br /&gt;
|-&lt;br /&gt;
|B||height...||The minimum heights for each of the &amp;amp;lt;num&amp;amp;gt; tiles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Blocked Pillar Information (14)===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Allows information to provided about blocked bridge pillars to assist the game in hiding pillars if necessary depending on what is above the roadstop tile. Blocking a pillar prevents the pillar from being drawn. It does not prevent the roadstop being bridgeable.&lt;br /&gt;
&lt;br /&gt;
The data is specified as blocked pillar flags for all sprite layouts in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;flags1&amp;amp;gt; &amp;amp;lt;flags2&amp;amp;gt; ... &amp;amp;lt;flagsn&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B*||num||Number of different tiles supported&lt;br /&gt;
|-&lt;br /&gt;
|B||flags...||The blocked pillar flags for each of the &amp;amp;lt;num&amp;amp;gt; tiles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;flagsx1&amp;amp;gt; &amp;amp;lt;flagsy1&amp;amp;gt; &amp;amp;lt;flagsx2&amp;amp;gt; &amp;amp;lt;flagsy2&amp;amp;gt; ... &amp;amp;lt;flagsxn&amp;amp;gt; &amp;amp;lt;flagsyn&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The flag bits are as follows:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
|Bit||Value||Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||01||Tile layout blocks a pillar on the west corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|1||02||Tile layout blocks a pillar on the south corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|2||04||Tile layout blocks a pillar on the east corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|3||08||Tile layout blocks a pillar on the north corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|4||10||Tile layout blocks a wall on the north east side of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|5||20||Tile layout blocks a wall on the south east side of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|6||40||Tile layout blocks a wall on the south west side of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|7||80||Tile layout blocks a wall on the north west side of the tile.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These should be combined as needed.&lt;br /&gt;
&lt;br /&gt;
=== Cost multipliers (15) ===&lt;br /&gt;
&lt;br /&gt;
The first byte is the build cost multiplier.&lt;br /&gt;
&lt;br /&gt;
The second byte is the removal cost multiplier.&lt;br /&gt;
&lt;br /&gt;
The total property length is 2 bytes.&lt;br /&gt;
&lt;br /&gt;
A value of 16 produces a build or removal cost the same as non-NewGRF road stops.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Road_Stops&amp;diff=5103</id>
		<title>Action0/Road Stops</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Road_Stops&amp;diff=5103"/>
		<updated>2025-08-26T19:25:30Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Cost multipiers (15) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Defining properties of road stops.&lt;br /&gt;
&lt;br /&gt;
Road stop IDs may be freely chosen. In action 0, you need only specify IDs relative to the set, i.e. the ID of the first road stop type is 00, the second road type is 01 and so on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OpenTTD supports 64000 road stops per game, and 64000 road stop IDs per GRF file.&lt;br /&gt;
&lt;br /&gt;
The property you &#039;&#039;&#039;must&#039;&#039;&#039; set for each road stop ID is 08 (in addition to defining an action 3 for it). Also, all road stop 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!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||D||{{ottdp|14}}||Class label, see below&lt;br /&gt;
|-&lt;br /&gt;
|09||B||{{ottdp|14}}||Road stop type&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|14}}||Road stop name text ID&lt;br /&gt;
|-&lt;br /&gt;
|0B||W||{{ottdp|14}}||Class name text ID&lt;br /&gt;
|-&lt;br /&gt;
|0C||B||{{ottdp|14}}||Draw mode&lt;br /&gt;
|-&lt;br /&gt;
|0D||D||{{ottdp|14}}||Random trigger cargoes&lt;br /&gt;
|-&lt;br /&gt;
|0E||W||{{ottdp|14}}||Animation information&lt;br /&gt;
|-&lt;br /&gt;
|0F||B||{{ottdp|14}}||Animation speed&lt;br /&gt;
|-&lt;br /&gt;
|10||W||{{ottdp|14}}||Animation triggers&lt;br /&gt;
|-&lt;br /&gt;
|11||B||{{ottdp|14}}||Callback flags, see below&lt;br /&gt;
|-&lt;br /&gt;
|12||D||{{ottdp|14}}||General flags, see below&lt;br /&gt;
|-&lt;br /&gt;
|15||W||{{ottdp|14}}||Cost multipiers, see below&lt;br /&gt;
|-&lt;br /&gt;
|16||W n*W||{{ottdp|15}}||List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Road stop class (08) ===&lt;br /&gt;
&lt;br /&gt;
New road stops are grouped graphics into classes.&lt;br /&gt;
&lt;br /&gt;
Only two classes are pre-defined:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Name!!Class ID!!Intended use for road stops&lt;br /&gt;
|-&lt;br /&gt;
|DFLT||44 46 4C 54||Default road stops&lt;br /&gt;
|-&lt;br /&gt;
|WAYP||57 41 59 50||{{ottdp|15}} Road waypoints&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Road stop classes which start with the byte FF are considered road waypoint classes, and will appear in the road waypoint construction window instead of the road bus/truck stop construction windows.&lt;br /&gt;
&lt;br /&gt;
It is recommended that the class identifier used is unique to your GRF(s).&lt;br /&gt;
&lt;br /&gt;
=== Road stop type (09) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||Passenger/bus stop&lt;br /&gt;
|-&lt;br /&gt;
|1||Freight/lorry stop&lt;br /&gt;
|-&lt;br /&gt;
|2||Both passenger/bus and freight/lorry stops&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default value is 2: Both passenger/bus and freight/lorry stops&lt;br /&gt;
&lt;br /&gt;
=== Road stop name text ID (0A) ===&lt;br /&gt;
&lt;br /&gt;
The text ID for this road stop (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;
=== Class name text ID (0B) ===&lt;br /&gt;
&lt;br /&gt;
The text ID for the road stop class.&lt;br /&gt;
&lt;br /&gt;
When specifying a road stop, 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;
=== Draw mode (0C) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||Bay stops: Draw road type ground sprite&lt;br /&gt;
|-&lt;br /&gt;
|1||2||Drive through stops: Draw road/tram type overlays&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|15}} Road waypoints: Draw the sprite layout ground tile (on top of the road)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default value is 3 (bits 0 and 1 both set).&lt;br /&gt;
&lt;br /&gt;
The remaining bits are reserved for future use.&lt;br /&gt;
&lt;br /&gt;
=== Cargo types for random triggers (0D) ===&lt;br /&gt;
&lt;br /&gt;
This sets which cargo types should trigger re-randomizing. The cargo types are given as a bitmask of the bits from column 3 (type B) in CargoTypes. &amp;amp;nbsp;If nothing is set (the default), the no random triggers will happen, to conserve CPU time.&lt;br /&gt;
&lt;br /&gt;
With GRF version 7 and above, the interpretation of bits changes. Instead of climate-dependent cargo slot numbers (type B), you have to set the bits of climate-independent cargo ID (type A).&lt;br /&gt;
&lt;br /&gt;
=== Animation information (0E) ===&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;
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/152/159)|callback 140]] 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/153/158)|callback 141]] for that.&lt;br /&gt;
&lt;br /&gt;
=== Animation speed (0F) ===&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 2.&lt;br /&gt;
&lt;br /&gt;
=== Animation triggers (10) ===&lt;br /&gt;
This is a bit mask of events that should trigger [[Callbacks#Animation control (1B/25/140/152/159)|callback 140]], allowing to change the animation state&lt;br /&gt;
&lt;br /&gt;
Roadstops have the same animation triggers as [[Action0/Stations#Animation_triggers_.2818.29|rail stations]].&lt;br /&gt;
&lt;br /&gt;
=== Callback flags (11) ===&lt;br /&gt;
For road stops, the following [[callbacks]] can be defined by setting the corresponding bit in property 0B:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Variable 0C value!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||13||Whether to make the road stop available in construction window (non-zero callback return) or not (callback returns zero)&lt;br /&gt;
|-&lt;br /&gt;
|1||2||141||Decide next animation frame&lt;br /&gt;
|-&lt;br /&gt;
|2||4||142||Decide animation speed&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 [[VariationalAction2|VarAction2]] for callbacks.&lt;br /&gt;
&lt;br /&gt;
=== General Flags (12) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||[[Callbacks#Next animation frame (1A/26/141/153/158)|callback 141]] needs random bits in var. 10&lt;br /&gt;
|-&lt;br /&gt;
|2||4||Do not show catenary graphics&lt;br /&gt;
|-&lt;br /&gt;
|3||8||Only allow drive-through stops (not bay stops)&lt;br /&gt;
|-&lt;br /&gt;
|4||10||Do not automatically build connecting road pieces&lt;br /&gt;
|-&lt;br /&gt;
|5||20||Only show in the road build menu (not tram)&lt;br /&gt;
|-&lt;br /&gt;
|6||40||Only show in the tram build menu (not road)&lt;br /&gt;
|-&lt;br /&gt;
|8||100||{{ottdp|15}} Read the draw mode from register 0x100, overriding the default value in property 0C&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default value is 0 (no bits set).&lt;br /&gt;
&lt;br /&gt;
The remaining bits are reserved for future use.&lt;br /&gt;
&lt;br /&gt;
===Minimum Bright Height (13)===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} This property allows building bridges over roadstops&lt;br /&gt;
&lt;br /&gt;
The bridge height property defines minimum clearances required for a bridge for the sprite layouts of this roadstop (or zero to not allow any bridge). Values are given in &amp;quot;height level&amp;quot; units (1 level == 8px). &lt;br /&gt;
&lt;br /&gt;
The data is specified as minimum height for all sprite layouts in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;height1&amp;amp;gt; &amp;amp;lt;height2&amp;amp;gt; ... &amp;amp;lt;heightn&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B*||num||Number of different tiles supported&lt;br /&gt;
|-&lt;br /&gt;
|B||height...||The minimum heights for each of the &amp;amp;lt;num&amp;amp;gt; tiles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Blocked Pillar Information (14)===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Allows information to provided about blocked bridge pillars to assist the game in hiding pillars if necessary depending on what is above the roadstop tile. Blocking a pillar prevents the pillar from being drawn. It does not prevent the roadstop being bridgeable.&lt;br /&gt;
&lt;br /&gt;
The data is specified as blocked pillar flags for all sprite layouts in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;flags1&amp;amp;gt; &amp;amp;lt;flags2&amp;amp;gt; ... &amp;amp;lt;flagsn&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B*||num||Number of different tiles supported&lt;br /&gt;
|-&lt;br /&gt;
|B||flags...||The blocked pillar flags for each of the &amp;amp;lt;num&amp;amp;gt; tiles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;flagsx1&amp;amp;gt; &amp;amp;lt;flagsy1&amp;amp;gt; &amp;amp;lt;flagsx2&amp;amp;gt; &amp;amp;lt;flagsy2&amp;amp;gt; ... &amp;amp;lt;flagsxn&amp;amp;gt; &amp;amp;lt;flagsyn&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The flag bits are as follows:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
|Bit||Value||Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||01||Tile layout blocks a pillar on the west corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|1||02||Tile layout blocks a pillar on the south corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|2||04||Tile layout blocks a pillar on the east corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|3||08||Tile layout blocks a pillar on the north corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|4||10||Tile layout blocks a wall on the north east side of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|5||20||Tile layout blocks a wall on the south east side of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|6||40||Tile layout blocks a wall on the south west side of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|7||80||Tile layout blocks a wall on the north west side of the tile.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These should be combined as needed.&lt;br /&gt;
&lt;br /&gt;
=== Cost multipliers (15) ===&lt;br /&gt;
&lt;br /&gt;
The first byte is the build cost multiplier.&lt;br /&gt;
&lt;br /&gt;
The second byte is the removal cost multiplier.&lt;br /&gt;
&lt;br /&gt;
The total property length is 2 bytes.&lt;br /&gt;
&lt;br /&gt;
A value of 16 produces a build or removal cost the same as non-NewGRF road stops.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Stations&amp;diff=5102</id>
		<title>Action0/Stations</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Stations&amp;diff=5102"/>
		<updated>2025-08-26T19:22:42Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: Document station minimum height and blocked pillars&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
Defining properties of new stations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unlike vehicles, the new stations have no equivalent in TTD. The IDs are therefore free to be chosen and will in fact be allocated automatically. In action 0, you only specify IDs relative to the set, i.e. the ID of the first station type is 00, the second station type is 01 and so on.&lt;br /&gt;
&lt;br /&gt;
{{ttdp|}} In TTDPatch each game can only have 255 station IDs for all active grf files.&lt;br /&gt;
&lt;br /&gt;
The only property you &#039;&#039;&#039;must&#039;&#039;&#039; set for each station ID is 08 (in addition to defining an [[Action3|action 3]] for it), anything else can be left at the default. It must be the first property you set for each station ID, because the station ID is actually undefined until it has been assigned a class through property 08. Also, all station 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;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||D||{{ottdp|0.6|2.5|ttdprev=alpha 19}}||Class ID, see below&lt;br /&gt;
|-&lt;br /&gt;
|09||V||{{ottdp|0.6|2.5|ttdprev=alpha 20}}||Sprite layout, see below&lt;br /&gt;
|-&lt;br /&gt;
|0A||B/B*||{{ottdp|0.6|2.5|ttdprev=alpha 20}}/{{ottdp|14.0}}||Copy sprite layout&lt;br /&gt;
|-&lt;br /&gt;
|0B||B||{{ottdp|0.6|2.5|ttdprev=alpha 22}}||Callback flags&lt;br /&gt;
|-&lt;br /&gt;
|0C||B||{{ottdp|0.6|2.5|ttdprev=alpha 22}}||Bit mask of disabled numbers of platforms&lt;br /&gt;
|-&lt;br /&gt;
|0D||B||{{ottdp|0.6|2.5|ttdprev=alpha 22}}||Bit mask of disabled platform lengths&lt;br /&gt;
|-&lt;br /&gt;
|0E||V||{{ottdp|0.6|2.5|ttdprev=alpha 22}}||Define custom layout, see below&lt;br /&gt;
|-&lt;br /&gt;
|0F||B/B*||{{ottdp|0.6|2.5|ttdprev=alpha 22}}/{{ottdp|14.0}}||Copy custom layout from stationid given by argument&lt;br /&gt;
|-&lt;br /&gt;
|10||W||{{ottdp|0.6|2.5|ttdprev=alpha 25}}||Little/lots threshold&lt;br /&gt;
|-&lt;br /&gt;
|11||B||{{ottdp|0.6|2.5|ttdprev=alpha 27}}||Pylon placement&lt;br /&gt;
|-&lt;br /&gt;
|12||D||{{ottdp|0.6|2.5|ttdprev=alpha 30}}||Bit mask of cargo type triggers for random sprites&lt;br /&gt;
|-&lt;br /&gt;
|13||B||{{ottdp|0.6|2.5|ttdprev=alpha 30}}||General flags&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|0.6|2.5|ttdprev=alpha 47}}||Overhead wire placement&lt;br /&gt;
|-&lt;br /&gt;
|15||B||{{ottdp|0.6|2.5|ttdprev=alpha 51}}||Can train enter tile&lt;br /&gt;
|-&lt;br /&gt;
|16||W||{{ottdp|0.7|2.5|ttdprev=beta 9}}||Animation information&lt;br /&gt;
|-&lt;br /&gt;
|17||B||{{ottdp|0.7|2.5|ttdprev=beta 9}}||Animation speed&lt;br /&gt;
|-&lt;br /&gt;
|18||W||{{ottdp|0.7|2.5|ttdprev=beta 9}}||Animation triggers&lt;br /&gt;
|-&lt;br /&gt;
|1A||V||{{ottdp|1.2|no|ottdrev=r22518}}||Advanced sprite layout with register modifiers&lt;br /&gt;
|-&lt;br /&gt;
|1B|| || ||Reserved&lt;br /&gt;
|-&lt;br /&gt;
|1C||W||{{ottdp|14}}||Station name&lt;br /&gt;
|-&lt;br /&gt;
|1D||W||{{ottdp|14}}||Station class name&lt;br /&gt;
|-&lt;br /&gt;
|1E||V||{{ottdp|15}}||Station sprite layout flags&lt;br /&gt;
|-&lt;br /&gt;
|1F||W n*W||{{ottdp|15}}||List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unofficial additions and changes. Don&#039;t rely on them to ever work this way in OpenTTD or TTDPatch:&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|1B||8*B||whatever-PP||Minimum bridge height for bridges over stations&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Station class (08) ===&lt;br /&gt;
TTDPatch groups sets of new station graphics into various classes. &amp;amp;nbsp;The classes can be selected by the top dropdown list in the construction window, and the individual stations within the class from the bottom dropdown list. &amp;amp;nbsp;In addition, each station can alter its appearance using [[VariationalAction2|variational]] and/or [[RandomAction2|random]] action 2 entries.&lt;br /&gt;
&lt;br /&gt;
Only two classes are pre-defined:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Name!!Class ID!!Intended use for station&lt;br /&gt;
|-&lt;br /&gt;
|DFLT||44 46 4C 54||Default, no special station type&lt;br /&gt;
|-&lt;br /&gt;
|WAYP||57 41 59 50||Non-cargo stations, waypoints, signal boxes etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You may simply use other classes than the above, as long as no more than (at the moment) 16 classes are used among all active .grf files at any time.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Station classes which start with the byte FF are considered waypoint classes, and will appear in the waypoint construction window instead of the station construction window.&lt;br /&gt;
&lt;br /&gt;
When a waypoint station is built, it will not accept cargo nor will any cargo appear from nearby industries or towns. &amp;amp;nbsp;Trains will not stop at waypoint stations, regardless of the non-stop order and/or the nonstop switch.&lt;br /&gt;
&lt;br /&gt;
=== Sprite layout (09) ===&lt;br /&gt;
This controls what sprites are displayed, where they are displayed, and in what order. &amp;amp;nbsp;The property is variable sized, and contains the data for all 8 possible station tile types. &amp;amp;nbsp;If this property is set, the num-ent in the corresponding [[Action1|action 1]] need not be equal to 12 (hex), it can in fact be any number, and any number of sprites can be displayed in any order.&lt;br /&gt;
&lt;br /&gt;
The data is specified as data for all eight tiles in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;data1&amp;amp;gt; &amp;amp;lt;data2&amp;amp;gt; ... &amp;amp;lt;datan&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B*||num||Number of different tiles supported (see below)&lt;br /&gt;
|-&lt;br /&gt;
|V||data1...||The variable size data for each of the &amp;amp;lt;num&amp;amp;gt; tiles, as specified below&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Number of tiles supported =====&lt;br /&gt;
* Normally this is 8, but you can specify fewer as well&lt;br /&gt;
* Using callback flags bit 1, specifying more makes sense too&lt;br /&gt;
* This value must be the same for all stations set by this action 0, even though it must be repeated for the prop. 09 definition of each station ID as well&lt;br /&gt;
&lt;br /&gt;
(Note that num is an extended byte, see [[GRFActionsDetailed]].)&lt;br /&gt;
&lt;br /&gt;
The content of each of the (usually eight) data sets is either a new sprite layout:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|D||groundsprite||the sprite to draw for the rails; this is by default a TTD sprite, but with bit 31 set an [[Action1|action 1]] sprite (42D+X) may be specified&lt;br /&gt;
|-&lt;br /&gt;
|V||spritedata||the data for station sprites, see below; each has a size of 10 bytes, and there may be several&lt;br /&gt;
|-&lt;br /&gt;
|B||80||a literal 80 ends the list of sprites for this tile&lt;br /&gt;
|}&lt;br /&gt;
or, alternatively, the instruction to use TTD&#039;s layout by using four zero bytes 00 00 00 00 instead of the groundsprite bytes. You can use [http://www.bytetransfer.de/projects/ttdpatch/docs/spriteidmapping.php the online sprite ID converter] to look up the sprite IDs you can use for all the climates.&lt;br /&gt;
&lt;br /&gt;
One can draw two types of sprites. &amp;amp;nbsp;One type is one that establishes a new 3D bounding box for use by the sprite sorter. &amp;amp;nbsp;The other type shares the 3D bounding box of the previous sprite(s). &amp;amp;nbsp;It must not be larger than the sprite which established the bounding box, nor must any part of it be outside this box. &amp;amp;nbsp;For simplicity, it should have the exact same dimensions as the sprite it shares the bounding box with. &amp;amp;nbsp;The latter type is supported in the station construction window display only since TTDPatch 2.6 r1684.&lt;br /&gt;
&lt;br /&gt;
The spritedata of sprites with their own bounding box has this format:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||xofs||x-offset from northern tile corner&lt;br /&gt;
|-&lt;br /&gt;
|B||yofs||y-offset from northern tile corner&lt;br /&gt;
|-&lt;br /&gt;
|B||zofs||z-offset from northern tile corner&lt;br /&gt;
|-&lt;br /&gt;
|B||xextent||size of sprite in x direction&lt;br /&gt;
|-&lt;br /&gt;
|B||yextent||size of sprite in y direction&lt;br /&gt;
|-&lt;br /&gt;
|B||zextent||size of sprite in z direction&lt;br /&gt;
|-&lt;br /&gt;
|D||sprite||sprite number to draw&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The spritedata of sprites sharing the bounding box has this format:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||xofs||x-offset relative to previous sprite&lt;br /&gt;
|-&lt;br /&gt;
|B||yofs||y-offset relative to previous sprite&lt;br /&gt;
|-&lt;br /&gt;
|B||80||a literal 80&lt;br /&gt;
|-&lt;br /&gt;
|B||00||(ignored)&lt;br /&gt;
|-&lt;br /&gt;
|B||00||(ignored)&lt;br /&gt;
|-&lt;br /&gt;
|B||00||(ignored)&lt;br /&gt;
|-&lt;br /&gt;
|D||sprite||sprite number to draw&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Since OpenTTD r18959 you can draw multiple ground sprites for a tile, which is useful if you want to use the usual rail/grass/concrete groundtile, but still need to add features to it without using a new bounding box. To do so use the syntax of sprites sharing the previous bounding box, but use it before the first bounding box definition. xpixeloffset and ypixeloffset refer to the usual spot of groundtiles. The same feature is also partially supported in TTDPatch since TTDPatch 2.6 r2312: TTDPatch ignores the xofs and yofs fields and always uses (0,0) for the offset. If you are developing a GRF that needs to be compatible with both OpenTTD and TTDPatch, you should always keep xofs and yofs zero to get the same effect in both games.&lt;br /&gt;
Note however that both implementations do not consider the [[Action0/Stations#General_Flags_.2813.29|setting of prop13 bit 0]], hence these &amp;quot;multiple ground sprites&amp;quot; have to be always part of the building sprites set and cannot be part of the different sprite set for ground sprites.&lt;br /&gt;
&lt;br /&gt;
The sprite number can have the following values (remember to use little endian, i.e. reversed byte order):&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!!Sprite&lt;br /&gt;
|-&lt;br /&gt;
|0000042D+X||use sprite X from the corresponding [[Action1|action 1]] block (i.e. 0000042D for the first, 0000042E for the second, etc.)&lt;br /&gt;
|-&lt;br /&gt;
|0000842D+X||same, but draw it using company colour translation&lt;br /&gt;
|-&lt;br /&gt;
|0322442D+X||same, but draw in transparent mode (actual colours of the sprite are disregarded entirely); supported in station construction window display since TTDPatch 2.6 r1683&lt;br /&gt;
|-&lt;br /&gt;
|RRRR842D+X||draw sprite with colour translation defined in sprite RRRR; available since TTDPatch 2.6 r1683&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
With bit 31 set, this sprite will refer to a TTD sprite, not the action 1 sprite. For the first ground sprite the reverse meaning applies.&lt;br /&gt;
&lt;br /&gt;
Depending on the railtype the sprites may get additional offsets:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
! !! Normal/electrified rail !! Monorail !! Maglev&lt;br /&gt;
|-&lt;br /&gt;
|TTD sprites || 0 || 82 || 164&lt;br /&gt;
|-&lt;br /&gt;
|Action 1 sprite (first ground sprite) || 0 || 1 || 2&lt;br /&gt;
|-&lt;br /&gt;
|Action 1 sprite (other sprites in the layout) || 0 || 0 || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
So, TTD sprites and the first ground sprite are affected by the railtype, while other action 1 sprites in the layout are not. The offset &amp;quot;82&amp;quot; refers to the offset between the default TTD track sprites; if you are using non-track ground sprites which are not from an action 1, you need to supply fake spritenumbers which preemptively reverse the offsets (that is, you need different sprite layouts for every railtype your station is available for).&lt;br /&gt;
&lt;br /&gt;
Setting bit 30 forces this sprite to be displayed normally even in &amp;quot;transparent buildings&amp;quot; mode (supported only in TTDPatch 2.6 r1695 and later).&lt;br /&gt;
&lt;br /&gt;
See below for an example of linked sprites as well as transparent sprites (e.g. for a station roof).&lt;br /&gt;
&lt;br /&gt;
Note that the coordinates here are 3D coordinates with x running from top-right to bottom-left and y running from top-left to bottom-right, with the tile dimensions being 16x16 (and 8 for one height level). This means the x and y values should always be within 0-15 (decimal).&lt;br /&gt;
&lt;br /&gt;
This is different to and independent from the x/y offsets used in the actual .NFO file. &amp;amp;nbsp;The 3D bounding box is used by TTD&#039;s sprite sorter to figure out the order in which to draw the sprites, as well as telling it which sprites to draw, because those whose bounding box falls outside the currently updated screen rectangle will not be drawn. &amp;amp;nbsp;Make sure the 3D bounding box is large enough to contain the entire sprite, but not so large that the sprite sorter can&#039;t determine which sprites should be in front.&lt;br /&gt;
&lt;br /&gt;
This means that the order in which you specify sprites is irrelevant. &amp;amp;nbsp;Sprites will get drawn from back to front, in the order which the sprite sorter determines as correct, from their bounding boxes. &amp;amp;nbsp;There are two exceptions, however:&lt;br /&gt;
* Sprites sharing the same bounding box will always be drawn in the given order.&lt;br /&gt;
* The station construction window display doesn&#039;t use the sprite sorter. Tiles that may be displayed in that window need to be specified in the correct drawing order, back to front.&lt;br /&gt;
&lt;br /&gt;
=== Copy sprite layout (0A) ===&lt;br /&gt;
&lt;br /&gt;
This is not a property as such, but an action. &amp;amp;nbsp;It takes as argument a byte which is interpreted as station-ID to copy the custom sprite layout from.&lt;br /&gt;
&lt;br /&gt;
Since {{ottdp|14.0}} this property is now an extended byte.&lt;br /&gt;
&lt;br /&gt;
=== Callback flags (0B) ===&lt;br /&gt;
For stations, the following [[callbacks]] can be defined by setting the corresponding bit in property 0B:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Variable 0C value!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||13||Whether to make station available in construction window (non-zero callback return) or not (callback returns zero)&lt;br /&gt;
|-&lt;br /&gt;
|1||2||14||Use callback to select sprite layout&lt;br /&gt;
|-&lt;br /&gt;
|2||4||141||Decide next animation frame&lt;br /&gt;
|-&lt;br /&gt;
|3||8||142||Decide animation speed&lt;br /&gt;
|-&lt;br /&gt;
|4||10||149||Custom slope check&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 [[VariationalAction2|VarAction2]] for callbacks.&lt;br /&gt;
&lt;br /&gt;
=== Selection of numbers of platforms and length (0C, 0D) ===&lt;br /&gt;
&lt;br /&gt;
By default all platform lengths and any number of platforms is available for the new stations. &amp;amp;nbsp;Using these properties, you can choose which ones should be unavailable by setting the corresponding bit in the property.&lt;br /&gt;
&lt;br /&gt;
The values are a byte, used as a bit mask. &amp;amp;nbsp;Bits 0 to 6 control the availability of number or length 1 to 7, and bit 7 controls the availability of the &amp;quot;+7&amp;quot; button. &amp;amp;nbsp;Each bit that is set disables the corresponding length or number of platforms.&lt;br /&gt;
&lt;br /&gt;
For compatibility with &amp;quot;largestations off&amp;quot;, at least one length between 1 and 5 (bits 0 to 4) and one number of platforms between 1 and 4 (bits 0 to 3) must be available, i.e. at least one of these bits must be unset.&lt;br /&gt;
&lt;br /&gt;
=== Define custom layout (0E) ===&lt;br /&gt;
&lt;br /&gt;
This allows choosing which tile type is built at which tile of a newly built station. &amp;amp;nbsp;There are four different types, which TTD normally defines as&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Tile type!!Appearance&lt;br /&gt;
|-&lt;br /&gt;
|00||plain platform&lt;br /&gt;
|-&lt;br /&gt;
|02||platform with building&lt;br /&gt;
|-&lt;br /&gt;
|04||platform with roof, left side&lt;br /&gt;
|-&lt;br /&gt;
|06||platform with roof, right side&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Since {{ottdp|15}}, all even values up to FE are supported if the sprite layout is defined via property 09/0A.&lt;br /&gt;
&lt;br /&gt;
These numbers are used for stations in NE-SW direction, or these numbers plus one for stations in the NW-SE direction. &amp;amp;nbsp;To define a custom layout, use this format:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||length||length of platforms for this layout&lt;br /&gt;
|-&lt;br /&gt;
|B||number||number of platforms for this layout&lt;br /&gt;
|-&lt;br /&gt;
|V||tiles||length*number bytes of tile types, one platform after another, only 00, 02, 04 or 06 are allowed as values&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Repeat this as often as necessary to define the layouts for all supported combinations of length and number. &amp;amp;nbsp;End the definitions with a 00 00 (zero length and zero number). &amp;amp;nbsp;Any combinations that are not defined will be built using TTD&#039;s default layout.&lt;br /&gt;
Note that it may be easier to draw different sprite sets using a [[VariationalAction2|VarAction2]] based on [[VarAction2Stations#Platform info 40 41 46 47 49|station variable 40]], rather than redefining the layout. &amp;amp;nbsp;In addition, [[Callbacks#Custom station layout 24|callback 24]] will be used to further customize the layout as defined by this property (or by TTD if no prop 0E layout is available). This may also be easier than defining a prop 0E layout for every combination of length and number of platforms.&lt;br /&gt;
&lt;br /&gt;
=== Copy custom layout (0F) ===&lt;br /&gt;
&lt;br /&gt;
Similar to property 0A, this copies the custom layout from the station-ID given by the argument.&lt;br /&gt;
&lt;br /&gt;
Since {{ottdp|14.0}} this property is now an extended byte.&lt;br /&gt;
&lt;br /&gt;
=== Little/lots threshold (10) ===&lt;br /&gt;
Amount of cargo for switching from &amp;quot;little&amp;quot; to &amp;quot;lots&amp;quot; of cargo. &amp;amp;nbsp;TTDPatch separates the full range of cargo amounts (0 to 4095) into two separate subranges, &amp;quot;little&amp;quot; and &amp;quot;lots&amp;quot; of cargo. &amp;amp;nbsp;This allows better control of cargo amount based graphics (if needed). &amp;amp;nbsp;Property 10 specifies at what amount of cargo the patch is to switch from one to the other subrange. &amp;amp;nbsp;See [[Action2Stations|Action 2 for stations]] for more information.&lt;br /&gt;
&lt;br /&gt;
=== Pylon placement (11) and wire placement (14) ===&lt;br /&gt;
Prop. 11 sets which tile types should have pylons when used with electrified tracks. By default, tiles 0-3 (default stations without roof) have pylons, and tiles 4-7 (default stations with roof) don&#039;t. This is a bit mask of tile types, with a bit set meaning that a pylon should be drawn. The tile types here do not consider [[Callbacks#Station sprite layout 14|callback 14]], but rather the type as it was built, i.e. from prop. 0E.&lt;br /&gt;
&lt;br /&gt;
Prop. 14 works in a similar way, except that it sets the tile types on which there should be &#039;&#039;no&#039;&#039; wires displayed. With the default value of &amp;quot;00&amp;quot;, wires are displayed everywhere, and for each bit set, the wire is omitted on that tile type.&lt;br /&gt;
&lt;br /&gt;
This property should only be used when the wires cause problems with the sprite sorter, because even when the wire is obscured by a station hall or similar, it should still show up in transparent mode so that each tile can easily be verified as being electrified.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Note: This property only allows setting the flags of the first 8 sprite layouts. Use Property 1E instead to set flags when more sprite layouts are used via prop. 0E or [[Callbacks#Custom_station_layout_.2824.29|callback 24]].&lt;br /&gt;
&lt;br /&gt;
=== Cargo types for random triggers (12) ===&lt;br /&gt;
&lt;br /&gt;
This sets which cargo types should trigger re-randomizing. The cargo types are given as a bitmask of the bits from column 3 (type B) in CargoTypes. &amp;amp;nbsp;If nothing is set (the default), the no random triggers will happen, to conserve CPU time.&lt;br /&gt;
&lt;br /&gt;
With GRF version 7 and above, the interpretation of bits changes. Instead of climate-dependent cargo slot numbers (type B), you have to set the bits of climate-independent cargo ID (type A).&lt;br /&gt;
&lt;br /&gt;
{{ottd|15.0}} Since 15.0, a default cargo translation table corresponding to the climate is used if one is not provided.&lt;br /&gt;
&lt;br /&gt;
=== General Flags (13) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Version!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||{{ottdp|0.7|2.5}}||use different sprite set for ground sprites ([[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|var. 10]] is 1 for ground sprites, 0 otherwise)&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|0.6|2.5}}||when calculating the cargo amount to display, divide the amount by the station size (to simulate cargo distributed over the area of the station)&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|0.7|2.5}}||[[Callbacks#Next animation frame (1A/26/141/153/158)|callback 141]] needs random bits in var. 10&lt;br /&gt;
|-&lt;br /&gt;
|3||8||{{ottdp|1.0|2.6}}||Use custom foundations on sloped tiles (the lowest byte of [[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|var. 10]] is 2 for foundation sprites)&lt;br /&gt;
|-&lt;br /&gt;
|4||10||{{ottdp|1.0|2.6}}||When bit 3 is set, use extended foundation block instead of the simple one&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Bit 3 works somewhat similarly to bit 0: your sprite selection will be called again, with 2 in the lowest byte of [[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|variable 10]]. If the chain ends on a callback result, the program will assume the foundation selection has failed and will use the default foundaton sprites. The low word of [[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|variable 18]] will contain the tile type of the current tile; if you have [[Callbacks#Station sprite layout (14)|callback 14]] enabled, this will be the its return value - otherwise, the default TTD types (platform with building, platform with left roof etc.) are used. In either case, one is added for the NW-SE orientation, in case your station needs different foundations depending on its orientation. Bits 16 and 17 are set if the NW and and NE foundations are to merged with the corresponding neighbour tile, so you shouldn&#039;t draw the corresponding edge in the foundation sprite. Other bits of variable 10 and variable 18 are reserved for future use.&lt;br /&gt;
&lt;br /&gt;
Your sprite selection code should select a foundation sprite block. The contents of this block depends on whether bit 4 is set or not.&lt;br /&gt;
* Bit 4 clear (simple foundations):&lt;br /&gt;
[[File:simple_foundations.png]]&lt;br /&gt;
&lt;br /&gt;
The programme will combine the needed foundation from these 8 sprites depending on the current slope. You don&#039;t need to care about the merge data in bits 16..17 of [[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|variable 18]]; it will be taken care of that automatically by adding the 7th and 8th sprite only when necessary.&lt;br /&gt;
* Bit 4 set (extended foundations):&lt;br /&gt;
[[File:extended_foundations.png]]&lt;br /&gt;
&lt;br /&gt;
You need to have one sprite for every slope that&#039;s possible below a rail station. The correct one will be automatically selected depending on the current slope. It can&#039;t handle the merging itself, however, so you need four foundation blocks: one with no edges removed, one with the NW edge removed, one with the NE edge removed and one with both north edges removed. Your sprite selection code is responsible for selecting the correct of those blocks according to the merge info in [[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|variable 18]].&lt;br /&gt;
&lt;br /&gt;
In both cases, you can put an additional value into register 100h, which will serve as an offset into the selected block. If you don&#039;t modify register 100h during the chain, it will default to 0. It is important that the dimensions of these sprites remain the same - thus bit 6 in the real sprites must be set to prevent GRFCodec from trimming the empty blue areas. The offset of these foundations must be -31 to the X direction and -9 to the Y direction.&lt;br /&gt;
&lt;br /&gt;
=== Can train enter tile (15) ===&lt;br /&gt;
&lt;br /&gt;
Like props. 11 and 14, this value contains eight bits relating to the eight possible tile types. If a bit is set, trains are prevented from routing through or entering any tile of this type.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Note: This property only allows setting the flags of the first 8 sprite layouts. Use Property 1E instead to set flags when more sprite layouts are used via prop. 0E or [[Callbacks#Custom_station_layout_.2824.29|callback 24]].&lt;br /&gt;
&lt;br /&gt;
=== Animation information (16) ===&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;
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/152/159)|callback 140]] 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/153/158)|callback 141]] for that.&lt;br /&gt;
&lt;br /&gt;
=== Animation speed (17) ===&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 2.&lt;br /&gt;
&lt;br /&gt;
=== Animation triggers (18) ===&lt;br /&gt;
This is a bit mask of events that should trigger [[Callbacks#Animation control (1B/25/140/152/159)|callback 140]], allowing to change the animation state&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Property bit, var18 byte 0!!Property value!!Version!!Meaning!!Happens on!!Var 18 byte 1&lt;br /&gt;
|-&lt;br /&gt;
|0||1||{{ottdp|0.7|2.5}}||Station part is built||the newly built tiles||&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|0.7|2.5}}||New cargo arrives to station||whole station||Cargo type &amp;lt;ref name=&amp;quot;cargotype&amp;quot;&amp;gt;Bits 8..15 of var 18 contain the triggering cargo type. If your GRF has a cargo translation table, the cargo type will be an index in that table, or FFh if the cargo isn&#039;t in the table. If you don&#039;t have a cargo translation table, the cargo type will simply be the climate-dependent cargo type number.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|0.7|2.5}}||A cargo type gets removed from station||whole station||Cargo type &amp;lt;ref name=&amp;quot;cargotype&amp;quot;/&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3||8||{{ottdp|0.7|2.5}}||Train enters station (starts loading/unloading)||platform where the train is||&lt;br /&gt;
|-&lt;br /&gt;
|4||10||{{ottdp|0.7|2.5}}||Train leaves station (done loading/unloading)||platform where the train is||&lt;br /&gt;
|-&lt;br /&gt;
|5||20||{{ottdp|1.2|2.5|ottdrev=r22746}}||Train loads/unloads cargo||platform where the train is||&lt;br /&gt;
|-&lt;br /&gt;
|6||40||{{ottdp|0.7|2.5}}||Every 250 ticks||whole station||&lt;br /&gt;
|-&lt;br /&gt;
|7||80||{{ottdp|15|no}}||Tile is processed in the periodic processing loop||single tile||&lt;br /&gt;
|-&lt;br /&gt;
|8||100||{{ottdp|15|no}}||Train reserves platform (using PBS)||platform where the train reserved||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The remaining bits are reserved for future triggers, they must be zero for now.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;happens on&amp;quot; column tells which tiles will [[Callbacks#Animation control (1B/25/140/152/159) |callback 140]] be called on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Advanced sprite layout with register modifiers (1A) ===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.2|no|ottdrev=r22518}}&lt;br /&gt;
Format:&lt;br /&gt;
 1A &amp;lt;num-layouts&amp;gt; &amp;lt;0x40 + num-sprites&amp;gt;&lt;br /&gt;
                  &amp;lt;groundsprite&amp;gt; &amp;lt;flags&amp;gt; [&amp;lt;register/value&amp;gt;]...&lt;br /&gt;
                  [ &amp;lt;buildingsprite&amp;gt; &amp;lt;flags&amp;gt;&lt;br /&gt;
                      ( &amp;lt;xoffset&amp;gt; &amp;lt;yoffset&amp;gt; &amp;lt;zoffset&amp;gt; &amp;lt;xextent&amp;gt; &amp;lt;yextent&amp;gt; &amp;lt;zextent&amp;gt; &lt;br /&gt;
                      | &amp;lt;xpixeloffset&amp;gt; &amp;lt;ypixeloffset&amp;gt; 80)&lt;br /&gt;
                    [&amp;lt;register/value&amp;gt;]...&lt;br /&gt;
                  ]...&lt;br /&gt;
&lt;br /&gt;
For further details see [https://wiki.openttd.org/en/Archive/Development/Advanced%20Sprite%20Layout#stations here] for now.&lt;br /&gt;
&lt;br /&gt;
=== Minimum bridge height (1B) ===&lt;br /&gt;
&lt;br /&gt;
This property allows building bridges over stations.&lt;br /&gt;
&lt;br /&gt;
The bridge height property defines minimum clearances required for a bridge for each of the four [[Action0/Stations#Define_custom_layout_.280E.29|tile types]] of this station (or zero to not allow any bridge). Values are given in &amp;quot;height level&amp;quot; units (1 level == 8px).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; |-&lt;br /&gt;
!Height (1)!!Appearance&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; |x1 y1 ||plain platform&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; |x2 y2 ||platform with building&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; |x3 y3 ||platform with roof, left side&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; |x4 y4 ||platform with roof, right side&lt;br /&gt;
|}&lt;br /&gt;
(1) where the values are one byte pairs (x-direction, y-direction) expressed in hexadecimal notation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
&lt;br /&gt;
1B &amp;lt;1st pair&amp;gt; &amp;lt;2nd pair&amp;gt; &amp;lt;3rd pair&amp;gt; &amp;lt;4th pair&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
1B x1 y1 x2 y2 x3 y3 x4 y4&amp;lt;br /&amp;gt;&lt;br /&gt;
1B 01 01 02 02 03 03 03 03 // 8px 16px 24px 24px&lt;br /&gt;
&lt;br /&gt;
This property is currently only available for JGR&#039;s Patch Pack (v0.26.0 and later) and the developmental &amp;quot;New Map Features&amp;quot; (NMF) fork of OpenTTD.&lt;br /&gt;
&lt;br /&gt;
=== Station name (1C) ===&lt;br /&gt;
&lt;br /&gt;
=== Station class name (1D) ===&lt;br /&gt;
&lt;br /&gt;
=== Station sprite layout flags (1E) ===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Since OpenTTD supports more than 8 sprite layouts to be used, props. 11, 14 and 15 are not sufficient to set the flags for all usable sprite layouts. This property is variable length and allows these flags to be set for each tile beyond the original limit of 8.&lt;br /&gt;
&lt;br /&gt;
The data is specified as flags for all sprite layouts in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;flags1&amp;amp;gt; &amp;amp;lt;flags2&amp;amp;gt; ... &amp;amp;lt;flagsn&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B*||num||Number of different tiles supported (see below)&lt;br /&gt;
|-&lt;br /&gt;
|B||flags1...||The flags for each of the &amp;amp;lt;num&amp;amp;gt; tiles, as specified below&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The flag values are as follows:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
|Bit||Value||Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||01||Tile should contain catenary pylons.&lt;br /&gt;
|-&lt;br /&gt;
|1||02||Tile should NOT contain catenary wires.&lt;br /&gt;
|-&lt;br /&gt;
|2||04||Tile is blocked to vehicles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These should be combined as needed.&lt;br /&gt;
&lt;br /&gt;
===Minimum Bright Height (20)===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} This property allows building bridges over stations.&lt;br /&gt;
&lt;br /&gt;
The bridge height property defines minimum clearances required for a bridge for the sprite layouts of this station (or zero to not allow any bridge). Values are given in &amp;quot;height level&amp;quot; units (1 level == 8px). &lt;br /&gt;
&lt;br /&gt;
The data is specified as minimum height for all sprite layouts in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;height1&amp;amp;gt; &amp;amp;lt;height2&amp;amp;gt; ... &amp;amp;lt;heightn&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B*||num||Number of different tiles supported (see below)&lt;br /&gt;
|-&lt;br /&gt;
|B||height...||The minimum heights for each of the &amp;amp;lt;num&amp;amp;gt; tiles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Blocked Pillar Information (21)===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Allows information to provided about blocked bridge pillars to assist the game in hiding pillars if necessary depending on what is above the station tile. Blocking a pillar prevents the pillar from being drawn. It does not prevent the station being bridgeable.&lt;br /&gt;
&lt;br /&gt;
The data is specified as blocked pillar flags for all sprite layouts in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;flags1&amp;amp;gt; &amp;amp;lt;flags2&amp;amp;gt; ... &amp;amp;lt;flagsn&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B*||num||Number of different tiles supported (see below)&lt;br /&gt;
|-&lt;br /&gt;
|B||flags...||The blocked pillar flags for each of the &amp;amp;lt;num&amp;amp;gt; tiles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The flag bits are as follows:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
|Bit||Value||Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||01||Tile layout blocks a pillar on the west corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|1||02||Tile layout blocks a pillar on the south corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|2||04||Tile layout blocks a pillar on the east corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|3||08||Tile layout blocks a pillar on the north corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|4||10||Tile layout blocks a wall on the north east side of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|5||20||Tile layout blocks a wall on the south east side of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|6||40||Tile layout blocks a wall on the south west side of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|7||80||Tile layout blocks a wall on the north west side of the tile.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These should be combined as needed.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Using TTD&#039;s sprite layouts for certain tiles ===&lt;br /&gt;
&lt;br /&gt;
To use TTD&#039;s layout, you use &amp;lt;code&amp;gt;00 00 00 00&amp;lt;/code&amp;gt; for the ground sprite number and leave off everything else.&lt;br /&gt;
&lt;br /&gt;
So instead of for example&lt;br /&gt;
&lt;br /&gt;
 F4 03 00 00&lt;br /&gt;
    00 00 00    10 05 02    2E 84 00 00&lt;br /&gt;
    00 0B 00    10 05 02    30 84 00 00&lt;br /&gt;
    80&lt;br /&gt;
&lt;br /&gt;
you just put&lt;br /&gt;
&lt;br /&gt;
 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
=== Using transparent sprites ===&lt;br /&gt;
&lt;br /&gt;
You can use transparent sprites to make for example the roof translucent like in TTD&#039;s stations. The roof of TTD&#039;s stations is made like this:&lt;br /&gt;
&lt;br /&gt;
 00 00 10    10 10 0A    37 84 00 00&lt;br /&gt;
 00 00 80    00 00 00    3B 44 22 03&lt;br /&gt;
&lt;br /&gt;
The first sprite here is the non-transparent frame of the roof, drawn in company colours (it has bit 15 set). The second part is a special &amp;quot;linked&amp;quot; sprite without its own bounding box, it shares that of the previous sprite. That&#039;s done by setting the z offset to 80.&lt;br /&gt;
&lt;br /&gt;
To make that second sprite transparent, bit 14 is set in the sprite number, and the upper word is set to 322 (*), so 0322443B means to take sprite 43B and draw it in transparent mode. The colours of that sprite are ignored entirely, every pixel in colour 0 is fully transparent, and all other pixels are semi-transparent (essentially just causing what they are drawn over to become darker).&lt;br /&gt;
&lt;br /&gt;
(*) This is the [[RecolorSprites#Default_recolour_sprites | recolour sprite]] for the glass effect.&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Bridges&amp;diff=5075</id>
		<title>Action0/Bridges</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Bridges&amp;diff=5075"/>
		<updated>2025-08-15T22:21:29Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: Bridge pillars&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
Defining properties of bridges. By default the following bridges are defined:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;ID (dec)&#039;&#039;&#039;!!&#039;&#039;&#039;ID (hex)&#039;&#039;&#039;!!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0||00||Wooden Bridge&lt;br /&gt;
|-&lt;br /&gt;
|1||01||Concrete Bridge&lt;br /&gt;
|-&lt;br /&gt;
|2||02||Girder, Steel Bridge&lt;br /&gt;
|-&lt;br /&gt;
|3||03||Suspension, Concrete Bridge&lt;br /&gt;
|-&lt;br /&gt;
|4||04||Suspension, Steel (Bronze) Bridge&lt;br /&gt;
|-&lt;br /&gt;
|5||05||Suspension, Steel (Golden) Bridge&lt;br /&gt;
|-&lt;br /&gt;
|6||06||Cantilever, Steel (Bronze) Bridge&lt;br /&gt;
|-&lt;br /&gt;
|7||07||Cantilever, Steel (Brown) Bridge&lt;br /&gt;
|-&lt;br /&gt;
|8||08||Cantilever, Steel (Red) Bridg&lt;br /&gt;
|-&lt;br /&gt;
|9||09||Girder, Steel Bridge&lt;br /&gt;
|-&lt;br /&gt;
|10||0A||Tubular, Steel (Bronze) Bridge&lt;br /&gt;
|-&lt;br /&gt;
|11||0B||{{ottdp|0.6|no}} Tubular, Steel (Golden) Bridge&lt;br /&gt;
|-&lt;br /&gt;
|12||0C||{{ottdp|0.6|no}} Tubular, Silicon Bridge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Properties==&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|00||B||{{ottdp|no|2.6|ttdprev=r1994}}||Failback Type, a default TTD Bridge ID&lt;br /&gt;
|-&lt;br /&gt;
|08&amp;lt;ref&amp;gt;The meaning of prop. 08 has changed in TTDPatch 2.0.1 alpha 34, it used to be what is now prop. 0D.&amp;lt;/ref&amp;gt;||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Year of availability, counted from 1920 (set to 1920 for first bridge if newstartyear&amp;amp;lt;1930)&lt;br /&gt;
|-&lt;br /&gt;
|09||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Minimum length, not counting ramps&lt;br /&gt;
|-&lt;br /&gt;
|0A||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Maximum length, not counting ramps&lt;br /&gt;
|-&lt;br /&gt;
|0B||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Cost factor&lt;br /&gt;
|-&lt;br /&gt;
|0C||W||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Max. speed&lt;br /&gt;
|-&lt;br /&gt;
|0D||V||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Sprite layout, see below&lt;br /&gt;
|-&lt;br /&gt;
|0E||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Various flags, bitcoded&lt;br /&gt;
|-&lt;br /&gt;
|0F||D||{{ottdp|0.6|2.5|ttdprev=r1702|ottdrev=r7191}}||Long format year of availability, counted from year 0&lt;br /&gt;
|-&lt;br /&gt;
|10||W||{{ottdp|0.6|2.5|ttdprev=r1824|ottdrev=r10269}}||Purchase text&lt;br /&gt;
|-&lt;br /&gt;
|11||W||{{ottdp|0.6|2.5|ttdprev=r1824|ottdrev=r10269}}||Description of a rail bridge&lt;br /&gt;
|-&lt;br /&gt;
|12||W||{{ottdp|0.6|2.5|ttdprev=r1824|ottdrev=r10269}}||Description of a road bridge&lt;br /&gt;
|-&lt;br /&gt;
|13||W||{{ottdp|0.7|2.6|ttdprev=r1994|ottdrev=r14172}}||Cost factor word access&lt;br /&gt;
|-&lt;br /&gt;
|15||V||{{ottdp|15.0}}||Pillar information&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unofficial additions and changes. Don&#039;t rely on them to ever work this way or at all in OpenTTD or TTDPatch: &lt;br /&gt;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|14||D||New Map Features||Menu icons &amp;lt;ref name=&amp;quot;nmf&amp;quot;&amp;gt;New Map Features (NMF) adds three bridge IDs (0x0D ... 0x0F). There are no graphics. Currently Graphic Resource Management (GRM) must be used to assign real sprites.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Descriptions==&lt;br /&gt;
&lt;br /&gt;
===Maximum speed (0C)===&lt;br /&gt;
Speed limit in mph*1.6 (approx. km/h). From {{ottdp|13|no}} set to &amp;quot;0&amp;quot; for no limit at all.&lt;br /&gt;
&lt;br /&gt;
===Sprite layout (0D)===&lt;br /&gt;
&lt;br /&gt;
Property 0D sets the sprite layout for bridges.     Each part of a bridge has eight sprites for each of the four types (rail, road, monorail, maglev), making 32 sprites in total.     Each bridge has 7 parts, though not all of them have different graphics.&lt;br /&gt;
&lt;br /&gt;
The data for property 0D is variable sized, with the format being&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Field!!Description&lt;br /&gt;
|-&lt;br /&gt;
|B||tableid||First table to define sprites for&lt;br /&gt;
|-&lt;br /&gt;
|B||numtables||Number of tables to define sprites for&lt;br /&gt;
|-&lt;br /&gt;
|V||spritedata||spritedata, numtables*32 DWORDs with sprite numbers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The tableid is the number of the first table to change.     There are seven tables for each bridge, with the first six (0-5) being various middle parts and the last one (6) being the end pieces.&lt;br /&gt;
&lt;br /&gt;
In each of the six middle part tables, there are four entries each for the following:&lt;br /&gt;
* Rail X, Rail Y, Road X, Road Y, Monorail X, Monorail Y, Maglev X, Maglev Y&lt;br /&gt;
&lt;br /&gt;
Where X is a bridge in /-direction and Y a bridge in \-direction.&lt;br /&gt;
&lt;br /&gt;
The four entries are&lt;br /&gt;
* Back &amp;amp; Floor, Front, Pillars, 0&lt;br /&gt;
&lt;br /&gt;
Front and Pillars can be 0, meaning no sprite to draw.     The fourth entry is always ignored.&lt;br /&gt;
&lt;br /&gt;
In the end part table, there are again four entries each, but now for Rail flat, Rail ramp, Road flat, Road ramp, Monorail flat, Monorail ramp and Maglev flat, Maglev ramp.&lt;br /&gt;
&lt;br /&gt;
The four entries in this case are&lt;br /&gt;
* northern end X, northern end Y, southern end X, southern end Y&lt;br /&gt;
&lt;br /&gt;
The sprite numbers can be any of TTD&#039;s sprite numbers.&lt;br /&gt;
&lt;br /&gt;
To summarize, there are 7 tables for each of the 11 bridges.     Each table contains 4*8 entries, making it 128 (80h) bytes large.     The first six tables, number 0 to 5, are middle pieces, the last table, number 6, is the end pieces.&lt;br /&gt;
&lt;br /&gt;
====Colour Translations====&lt;br /&gt;
&lt;br /&gt;
In order to recolour a bridge, you can add one of the values from the table below to the sprite number of the sprite you wish to recolour. The colour translations from the table will use the default colour translation tables from the base sets. These translation tables will translate the &#039;brownish red&#039; as used in the default bridges to the colour you specify.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Added value&#039;&#039;&#039;!!&#039;&#039;&#039;Little Endian&#039;&#039;&#039;!!&#039;&#039;&#039;Colour&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|031B8000h||00 80 1B 03||Blue&lt;br /&gt;
|-&lt;br /&gt;
|031C8000h||00 80 1C 03||Brown&lt;br /&gt;
|-&lt;br /&gt;
|031D8000h||00 80 1D 03||Pure white&lt;br /&gt;
|-&lt;br /&gt;
|031E8000h||00 80 1E 03||Red&lt;br /&gt;
|-&lt;br /&gt;
|031F8000h||00 80 1F 03||Green&lt;br /&gt;
|-&lt;br /&gt;
|03208000h||00 80 20 03||Blueish white (concrete)&lt;br /&gt;
|-&lt;br /&gt;
|03218000h||00 80 21 03||Yellow (golden steel)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Take a look at the [[RecolorSprites#Default_recolour_sprites | default recolour tables]] for other colour translations. However, other recolor maps than the seven listed above will translate other colours than those uses by original bridges.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example: Translate sprite 4366 to yellow&#039;&#039;&lt;br /&gt;
:4366 translates to 0E 11 in little endian value and as such to 0E 11 00 00 in a dword. In order to convert to yellow you&#039;ll have to add 00 80 21 03 to the dword value. This yields 0E 91 21 03. Use the latter in your bridge table to colour one of the monorail bridgeheads grey.&lt;br /&gt;
&lt;br /&gt;
====Bridge Layouts====&lt;br /&gt;
&lt;br /&gt;
There are five possible bridge layouts in TTD. The numbers in the table below reflect the bridge table numbers in the NFO code.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Layout!!Description&lt;br /&gt;
|-&lt;br /&gt;
|__ ||Bridge without middle part&lt;br /&gt;
|-&lt;br /&gt;
|_0_||Bridge of length 3&lt;br /&gt;
|-&lt;br /&gt;
|_0(23)1_||Bridge of even length&lt;br /&gt;
|-&lt;br /&gt;
|_0(23)4(23)1_||Bridge of (uneven) lengths 5, 9, 13, 17 etc.&lt;br /&gt;
|-&lt;br /&gt;
|_0(23)253(23)1_||Bridge of (uneven) lengths 7, 11, 15, 19 etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
_ is used as a symbol to indicate bridgeheads (as defined in table 6).&lt;br /&gt;
&lt;br /&gt;
Part 0 is always at the farthest end from the viewer.&lt;br /&gt;
&lt;br /&gt;
Parts (23) are repeated &#039;&#039;n&#039;&#039; times as necessary, where &#039;&#039;n&#039;&#039; is any number equal or greater than 0.&lt;br /&gt;
&lt;br /&gt;
===Flags (0E)===&lt;br /&gt;
&lt;br /&gt;
The following flags can be set here:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Bit&#039;&#039;&#039;!!&#039;&#039;&#039;Value&#039;&#039;&#039;!!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0||1||Do not draw the far pillars for higher bridges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Long format year of availability (0F)===&lt;br /&gt;
&lt;br /&gt;
Set the year of availability of the bridge in years since 0. The date range is from 0 to 5000000. This property must be set after property 08 to take effect.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no||}} In TTDPatch, bridge introduction dates outside the range 1920..2175 will be limited to this range.&lt;br /&gt;
&lt;br /&gt;
===Purchase text (10)===&lt;br /&gt;
&lt;br /&gt;
Set the text appearing in the purchase window, describing what this bridge is made of, or what kind of bridge it is.&lt;br /&gt;
&lt;br /&gt;
This should be the ID of an original bridge name, or a TextID in the DCxx range.&lt;br /&gt;
&lt;br /&gt;
===Description of a rail(11) or road(12) bridge===&lt;br /&gt;
&lt;br /&gt;
Set the text used as a description by the query tool. When the bridge is used for carrying a rail, it will use property 11, and will use property 12 when it will be for road.&lt;br /&gt;
&lt;br /&gt;
This should be the ID of an original bridge name, or a TextID in the DCxx range.&lt;br /&gt;
&lt;br /&gt;
===Menu icons (14)===&lt;br /&gt;
&lt;br /&gt;
Previously menu icons could be replaced by an ActionA, with the exception of the six recolor bridges which always retained a recolored icon of one of the three parent bridges.&lt;br /&gt;
Property 14 allows all icons to be accessed including the three new bridge IDs (0D, 0E, 0F) in cirdan&#039;s New Map Features.&lt;br /&gt;
&lt;br /&gt;
Note: This property is currently only available for the developmental &amp;quot;New Map Features&amp;quot; (NMF) fork of OpenTTD.&lt;br /&gt;
&lt;br /&gt;
===Pillar information (15)===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Allows information to provided about bridge pillars to assist the game in hiding pillars if necessary depending on what is below a bridge.&lt;br /&gt;
&lt;br /&gt;
The data is specified a pair of flags (for x-axis and y-axis) for all bridge pieces in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;flagsx1&amp;amp;gt; &amp;amp;lt;flagsy1&amp;amp;gt; &amp;amp;lt;flagsx2&amp;amp;gt; &amp;amp;lt;flagsy2&amp;amp;gt; ... &amp;amp;lt;flagsxn&amp;amp;gt; &amp;amp;lt;flagsyn&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B*||num||Number of different bridge pieces supported (see below)&lt;br /&gt;
|-&lt;br /&gt;
|B||flagsx||The flags for the x-axis of a bridge piece.&lt;br /&gt;
|-&lt;br /&gt;
|B||flagsy||The flags for the y-axis of a bridge piece.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The flag bits are as follows:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
|Bit||Value||Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||01||Bridge piece has a pillar on the west corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|1||02||Bridge piece has a pillar on the south corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|2||04||Bridge piece has a pillar on the east corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|3||08||Bridge piece has a pillar on the north corner of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|4||10||Bridge piece has a wall on the north east side of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|5||20||Bridge piece has a wall on the south east side of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|6||40||Bridge piece has a wall on the south west side of the tile.&lt;br /&gt;
|-&lt;br /&gt;
|7||80||Bridge piece has a wall on the north west side of the tile.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These should be combined as needed.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&lt;br /&gt;
Below is an example code which rebuilds the bronze steel suspension bridge (ID 04). The code fragment by itself has no use (no visual difference in game), but might be useful in order to understand the bridge code. Sprite numbers refer to the numbers in the base grf. The code might also be useful to re-enstate the default bridge if you only want to replace only one certain tracktype.&lt;br /&gt;
&lt;br /&gt;
The complete recode of all default bridges including colour translations is available at TT-Forums: https://www.tt-forums.net/viewtopic.php?f=26&amp;amp;t=75209&amp;amp;p=1221899#p1221899&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//SUSPENSION, STEEL (BRONZE) bridge (04)&lt;br /&gt;
&lt;br /&gt;
-1 * 0 00 06 01 01 04 0D 00 07 //action 00 bridges, 01 property, 01 ID, ID, prop 0D, tableID 00, 07 tables&lt;br /&gt;
&lt;br /&gt;
//table 00&lt;br /&gt;
&lt;br /&gt;
A9 09 00 00     9F 09 00 00     B1 09 00 00     00 00 00 00 //rail X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
A5 09 00 00     97 09 00 00     AD 09 00 00     00 00 00 00 //rail Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
9D 09 00 00     9F 09 00 00     B1 09 00 00     00 00 00 00 //Road X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
95 09 00 00     97 09 00 00     AD 09 00 00     00 00 00 00 //Road Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
F2 10 00 00     9F 09 00 00     B1 09 00 00     00 00 00 00 //Mono X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
EE 10 00 00     97 09 00 00     AD 09 00 00     00 00 00 00 //Mono Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
1A 11 00 00     9F 09 00 00     B1 09 00 00     00 00 00 00 //Mlev X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
16 11 00 00     97 09 00 00     AD 09 00 00     00 00 00 00 //Mlev Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
//table 01&lt;br /&gt;
AA 09 00 00     A0 09 00 00     B2 09 00 00     00 00 00 00 //rail X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
A6 09 00 00     98 09 00 00     AE 09 00 00     00 00 00 00 //rail Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
9E 09 00 00     A0 09 00 00     B2 09 00 00     00 00 00 00 //Road X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
96 09 00 00     98 09 00 00     AE 09 00 00     00 00 00 00 //Road Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
F3 10 00 00     A0 09 00 00     B2 09 00 00     00 00 00 00 //Mono X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
EF 10 00 00     98 09 00 00     AE 09 00 00     00 00 00 00 //Mono Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
1B 11 00 00     A0 09 00 00     B2 09 00 00     00 00 00 00 //Mlev X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
17 11 00 00     98 09 00 00     AE 09 00 00     00 00 00 00 //Mlev Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
//table 02&lt;br /&gt;
AC 09 00 00     A4 09 00 00     B4 09 00 00     00 00 00 00 //rail X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
A8 09 00 00     9C 09 00 00     B0 09 00 00     00 00 00 00 //rail Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
A2 09 00 00     A4 09 00 00     B4 09 00 00     00 00 00 00 //Road X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
9A 09 00 00     9C 09 00 00     B0 09 00 00     00 00 00 00 //Road Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
F5 10 00 00     A4 09 00 00     B4 09 00 00     00 00 00 00 //Mono X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
F1 10 00 00     9C 09 00 00     B0 09 00 00     00 00 00 00 //Mono Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
1D 11 00 00     A4 09 00 00     B4 09 00 00     00 00 00 00 //Mlev X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
19 11 00 00     9C 09 00 00     B0 09 00 00     00 00 00 00 //Mlev Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
//table 03&lt;br /&gt;
AB 09 00 00     A3 09 00 00     B3 09 00 00     00 00 00 00 //rail X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
A7 09 00 00     9B 09 00 00     AF 09 00 00     00 00 00 00 //rail Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
A1 09 00 00     A3 09 00 00     B3 09 00 00     00 00 00 00 //Road X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
99 09 00 00     9B 09 00 00     AF 09 00 00     00 00 00 00 //Road Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
F4 10 00 00     A3 09 00 00     B3 09 00 00     00 00 00 00 //Mono X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
F0 10 00 00     9B 09 00 00     AF 09 00 00     00 00 00 00 //Mono Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
1C 11 00 00     A3 09 00 00     B3 09 00 00     00 00 00 00 //Mlev X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
18 11 00 00     9B 09 00 00     AF 09 00 00     00 00 00 00 //Mlev Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
//table 04&lt;br /&gt;
B6 09 00 00     BA 09 00 00     BC 09 00 00     00 00 00 00 //rail X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
B5 09 00 00     B9 09 00 00     BB 09 00 00     00 00 00 00 //rail Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
B8 09 00 00     BA 09 00 00     BC 09 00 00     00 00 00 00 //Road X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
B7 09 00 00     B9 09 00 00     BB 09 00 00     00 00 00 00 //Road Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
F7 10 00 00     BA 09 00 00     BC 09 00 00     00 00 00 00 //Mono X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
F6 10 00 00     B9 09 00 00     BB 09 00 00     00 00 00 00 //Mono Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
1F 11 00 00     BA 09 00 00     BC 09 00 00     00 00 00 00 //Mlev X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
1E 11 00 00     B9 09 00 00     BB 09 00 00     00 00 00 00 //Mlev Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
//table 05&lt;br /&gt;
BD 09 00 00     C1 09 00 00     00 00 00 00     00 00 00 00 //rail X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
BE 09 00 00     C2 09 00 00     00 00 00 00     00 00 00 00 //rail Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
BF 09 00 00     C1 09 00 00     00 00 00 00     00 00 00 00 //Road X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
C0 09 00 00     C2 09 00 00     00 00 00 00     00 00 00 00 //Road Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
F8 10 00 00     C1 09 00 00     00 00 00 00     00 00 00 00 //Mono X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
F9 10 00 00     C2 09 00 00     00 00 00 00     00 00 00 00 //Mono Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
20 11 00 00     C1 09 00 00     00 00 00 00     00 00 00 00 //Mlev X: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
21 11 00 00     C2 09 00 00     00 00 00 00     00 00 00 00 //Mlev Y: Back&amp;amp;amp;Floor, Front, Pillars, 0&lt;br /&gt;
//table 06&lt;br /&gt;
86 09 00 00     88 09 00 00     85 09 00 00     87 09 00 00 //rail flat: northern end X, northern end Y, southern end X, southern end Y&lt;br /&gt;
8A 09 00 00     8C 09 00 00     89 09 00 00     8B 09 00 00 //rail ramp: northern end X, northern end Y, southern end X, southern end Y&lt;br /&gt;
8E 09 00 00     90 09 00 00     8D 09 00 00     8F 09 00 00 //road flat: northern end X, northern end Y, southern end X, southern end Y&lt;br /&gt;
92 09 00 00     94 09 00 00     91 09 00 00     93 09 00 00 //road ramp: northern end X, northern end Y, southern end X, southern end Y&lt;br /&gt;
E7 10 00 00     E9 10 00 00     E6 10 00 00     E8 10 00 00 //mono flat: northern end X, northern end Y, southern end X, southern end Y&lt;br /&gt;
EB 10 00 00     ED 10 00 00     EA 10 00 00     EC 10 00 00 //mono ramp: northern end X, northern end Y, southern end X, southern end Y&lt;br /&gt;
0F 11 00 00     11 11 00 00     0E 11 00 00     10 11 00 00 //mlev flat: northern end X, northern end Y, southern end X, southern end Y&lt;br /&gt;
13 11 00 00     15 11 00 00     12 11 00 00     14 11 00 00 //mlev ramp: northern end X, northern end Y, southern end X, southern end Y&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Objects&amp;diff=5049</id>
		<title>NML:Objects</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Objects&amp;diff=5049"/>
		<updated>2025-06-06T11:15:02Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Object properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
==Object IDs==&lt;br /&gt;
OpenTTD supports 64000 object types per game, and 255 object IDs per grf file.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|14.0|no}} 64000 object IDs per grf file are supported since OpenTTD 14.0.&lt;br /&gt;
&lt;br /&gt;
Object IDs are NewGRF-local and can therefore freely be chosen within the ID ranges. &lt;br /&gt;
&lt;br /&gt;
An object is allocated by setting the &#039;class&#039;-property, which should therefore be set first. &lt;br /&gt;
&lt;br /&gt;
Overriding the default objects (e.g. transmitter, lighthouse) is not (yet) possible.&lt;br /&gt;
&lt;br /&gt;
==Object properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! property&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| class&lt;br /&gt;
| String literal of length 4&lt;br /&gt;
|&lt;br /&gt;
Unlike station classes, there is currently no default yet. &#039;&#039;&#039;This property &#039;&#039;must&#039;&#039; be set first, before any other properties or graphics.&#039;&#039;&#039; Characters allowed in the IDs are A-Z, 0-9. While you are technically free to chose your own class, it&#039;s highly recommended you stick to one of the [[#Default object classes|default classes]].&lt;br /&gt;
|-&lt;br /&gt;
| classname&lt;br /&gt;
| string&lt;br /&gt;
| You only need to set this for one object in every class.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| string&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| climates_available&lt;br /&gt;
| bitmask(CLIMATE_XXX, CLIMATE_YYY, ...)&lt;br /&gt;
| XXX = [TEMPERATE &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; ARCTIC &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; TROPICAL &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; TOYLAND], alternatively NO_CLIMATE or ALL_CLIMATES&lt;br /&gt;
|-&lt;br /&gt;
| size&lt;br /&gt;
| [x, y]&lt;br /&gt;
| Size in x and y direction. Both x and y must be compiletime constants&lt;br /&gt;
|-&lt;br /&gt;
| build_cost_multiplier&lt;br /&gt;
|&lt;br /&gt;
| multiplicator to the base purchase cost&lt;br /&gt;
|-&lt;br /&gt;
| remove_cost_multiplier&lt;br /&gt;
|&lt;br /&gt;
| multiplicator to the base removal cost&lt;br /&gt;
|-&lt;br /&gt;
| introduction_date&lt;br /&gt;
| date&lt;br /&gt;
| The date this object becomes available to build.&lt;br /&gt;
|-&lt;br /&gt;
| end_of_life_date&lt;br /&gt;
| date&lt;br /&gt;
| The last date this object is buildable. Must be at least 365 days after introduction_date&lt;br /&gt;
|-&lt;br /&gt;
| object_flags&lt;br /&gt;
| bitmask(OBJ_FLAG_XXX, OBJ_FLAG_YYY)&lt;br /&gt;
|&lt;br /&gt;
See [[#List of object flags|list of object flags]]&lt;br /&gt;
|-&lt;br /&gt;
| animation_info&lt;br /&gt;
| Array [ANIMATION_XXX, frame-count]&lt;br /&gt;
| XXX = [LOOPING &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; NON_LOOPING], 1..253 frames&lt;br /&gt;
|-&lt;br /&gt;
| animation_speed&lt;br /&gt;
| 0..16&lt;br /&gt;
|&lt;br /&gt;
Speed of animation, see [[NML:Animation speed|animation speed table]] for the meaning of the values.&lt;br /&gt;
|-&lt;br /&gt;
| animation_triggers&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
See [[#Animation_triggers|list of animation triggers]]&lt;br /&gt;
|-&lt;br /&gt;
| callback_flags&lt;br /&gt;
| bitmask(OBJ_CBF_XXX, OBJ_CBF_YYY)&lt;br /&gt;
|&lt;br /&gt;
Do not set this, unless you use [[NML:Old style callbacks|old-style callbacks]].&lt;br /&gt;
|-&lt;br /&gt;
| height&lt;br /&gt;
| 0..255&lt;br /&gt;
| Height of the object / 8. For example if your object is 16 pixels height you should set height to 2. 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;quot;value of property&amp;quot; * 8. The property is also used to determine how high a bridge must be if it is allowed by the bit in object_flags.&lt;br /&gt;
|-&lt;br /&gt;
| num_views&lt;br /&gt;
| 1, 2 or 4&lt;br /&gt;
| Objects may have &amp;quot;views&amp;quot;, i.e. different graphical representations, e.g. used to show rotated views of an object. Number of views may be 1, 2, or 4. Default value is 1. For non-square objects, x and y sizes are swapped for odd views. Use variable &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;view&amp;lt;/code&amp;gt; to determine the view of a built object. Views should be used for rotations or minor variations, not for objects of different types as those should just be different object types which provides a better experience for players. Using separate objects is better for discoverability, naming, filtering, used state, favourite state, and badges.&lt;br /&gt;
|-&lt;br /&gt;
| count_per_map256&lt;br /&gt;
| 0..255&lt;br /&gt;
| {{ottd|1.4|r25878}} Measure for the amount of objects placed on a map of 256^2 tiles. (Comparison: there are 15 transmitter)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Default object classes===&lt;br /&gt;
&lt;br /&gt;
Please refer to the [[ObjectLabels|list of object labels]] in the NewGRF Specs. The default class names listed there are recommended, you still need to set the class name for at least one object in every class or you risk to end up with objects in a class without a name. If multiple NewGRFs define objects for the same class the name defined in the last NewGRF will be used.&lt;br /&gt;
&lt;br /&gt;
===List of object flags===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_ONLY_SE&lt;br /&gt;
| Only available in the scenario editor (incompatible with OBJ_FLAG_ONLY_INGAME).&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_IRREMOVABLE&lt;br /&gt;
| Object cannot be removed with the normal dynamite tool. In OpenTTD you can only remove the object with the magic bulldozer cheat, in TTDPatch you can remove it by holding ctrl while using the bulldozer tool. The cost of removing this object is multiplied by 25.&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_ANYTHING_REMOVE&lt;br /&gt;
| Anything can remove this object (owned land behavior).&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_ON_WATER&lt;br /&gt;
| Allow construction of the object on water. Note that if an object is allowed to be built both on land and on water, then it will resist being flooded and will not flood adjacent tiles.&lt;br /&gt;
This flag has the same effect as using &#039;&#039;GROUNDSPRITE_WATER&#039;&#039; for the ground sprite in the spritelayout.&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_REMOVE_IS_INCOME&lt;br /&gt;
| Removal cost is actually income (owned land behaviour).&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_NO_FOUNDATIONS&lt;br /&gt;
| Do not display foundations if on a slope.&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_ANIMATED&lt;br /&gt;
| 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;
| OBJ_FLAG_ONLY_INGAME&lt;br /&gt;
| Only available during game play (incompatible with OBJ_FLAG_ONLY_SE).&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_2CC&lt;br /&gt;
| Allows 2cc mapping for objects instead of the default 1cc.&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_NOT_ON_LAND&lt;br /&gt;
| Disallows construction on land (implies OBJ_FLAG_ON_WATER).&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_DRAW_WATER&lt;br /&gt;
| Draws the water under the object. 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;
| OBJ_FLAG_ALLOW_BRIDGE&lt;br /&gt;
| Allow bridge over the object taking the building height into account.&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_RANDOM_ANIMATION&lt;br /&gt;
| Random bits in the &amp;quot;next animation frame&amp;quot; callback.&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_SCALE_BY_WATER&lt;br /&gt;
| Scale amount of objects placed on map generation not by map area, but roughly by the length of the coastline&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Object variables==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| relative_x&lt;br /&gt;
| 0..255&lt;br /&gt;
| X-coordinate (top right -&amp;amp;gt; bottom left) of the tile relative to the northernmost tile.&lt;br /&gt;
|-&lt;br /&gt;
| relative_y&lt;br /&gt;
| 0..255&lt;br /&gt;
| Y-coordinate (top left -&amp;amp;gt; bottom right) of the tile relative to the northernmost tile.&lt;br /&gt;
|-&lt;br /&gt;
| relative_pos&lt;br /&gt;
| 0xYYXX&lt;br /&gt;
|&lt;br /&gt;
A combination of relative_x and relative_y in the format 0xYYXX. Useful if you want to check for a single position. The [[NML:Builtin functions|builtin function]] relative_coord(x, y) may be useful when making comparisons.&lt;br /&gt;
|-&lt;br /&gt;
| terrain_type&lt;br /&gt;
| TILETYPE_NORMAL, TILETYPE_DESERT, TILETYPE_RAIN_FOREST, TILETYPE_SNOW&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| tile_slope&lt;br /&gt;
| SLOPE_XXX&lt;br /&gt;
|&lt;br /&gt;
See [[NML:List of tile slopes|tile slopes]] for an overview of possible values&lt;br /&gt;
|-&lt;br /&gt;
| build_date&lt;br /&gt;
|&lt;br /&gt;
| The date this object was build.&lt;br /&gt;
|-&lt;br /&gt;
| animation_frame&lt;br /&gt;
| 0 .. (frame_count - 1)&lt;br /&gt;
| Current animation frame, with the maximum defined in the object&#039;s &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;animation_info&amp;lt;/code&amp;gt; property.&lt;br /&gt;
|-&lt;br /&gt;
| colour&lt;br /&gt;
| COLOUR_XXX&lt;br /&gt;
|&lt;br /&gt;
Colour used for the company colour mask. Refer to the table [[NML:List of default colour translation palettes#Company colour helper functions|here]] for possible values.&lt;br /&gt;
|-&lt;br /&gt;
| owner&lt;br /&gt;
| 0..0x10&lt;br /&gt;
| CompanyID of the owner of the object or 0x10 if it was build in the scenario editor&lt;br /&gt;
|-&lt;br /&gt;
| town_manhattan_dist&lt;br /&gt;
|&lt;br /&gt;
| Manhattan distance to the nearest town&lt;br /&gt;
|-&lt;br /&gt;
| town_euclidean_dist&lt;br /&gt;
|&lt;br /&gt;
| Euclidean distance to the nearest town&lt;br /&gt;
|-&lt;br /&gt;
| town_zone&lt;br /&gt;
|&lt;br /&gt;
[[NML:List of town zones|town zone]]&lt;br /&gt;
| The town zone of the current tile. The town zone from the closest town (measured in manhattan distance) is used.&lt;br /&gt;
|-&lt;br /&gt;
| view&lt;br /&gt;
| 0 .. (&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;num_views&amp;lt;/code&amp;gt; - 1)&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r21455}} The view of the particular object. See also the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;num_views&amp;lt;/code&amp;gt; property.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables that require one or more parameters:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! arguments&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_object_type&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
| ID of the object on a nearby tile, if defined by the same grf. OBJECT_TYPE_OTHER_GRF if the object is defined by a different grf (or none at all). OBJECT_TYPE_NO_OBJECT if the tile does not contain an object.&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_object_view&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
| {{ottdp|1.4|no|ottdrev=r26316}} View of the object on a nearby tile, if defined by the same grf.&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_random_bits&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
| Random bits of the given tile. Only valid for tiles of the same object.&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_slope&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
| See tile_slope&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_is_same_object&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
| 0 .. 1&lt;br /&gt;
| Is the given tile part of the same object?&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_is_water&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
| 0 .. 1&lt;br /&gt;
| Is the given tile a water tile?&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_terrain_type&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
| See terrain_type&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_water_class&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
| WATER_CLASS_XXX&lt;br /&gt;
| XXX = [NONE &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; SEA &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; CANAL &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; RIVER] Note that tiles for which &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;nearby_tile_is_water&amp;lt;/code&amp;gt; is 0 may still have a water class, e.g. industry tiles with water beneath them.&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_height&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
| 0 .. 120&lt;br /&gt;
| The minimum height of the given tile. 8 units correspond to one height level&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_class&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
[[NML:List of tile classes|Tile class]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_animation_frame&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
| See animation_frame. Only valid for tiles of the same object.&lt;br /&gt;
|-&lt;br /&gt;
| object_count&lt;br /&gt;
| object id [, grfid]&lt;br /&gt;
| 0..0xFFFF&lt;br /&gt;
|&lt;br /&gt;
Number of objects with the given object id currently on the map. Grfid is the grfid of the newgrf you want to check the object count of (default is current grf). Use the [[NML:Builtin functions|builtin function]] &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;str2number()&amp;lt;/code&amp;gt; to convert a grfid to its numeric representation.&lt;br /&gt;
|-&lt;br /&gt;
| object_distance&lt;br /&gt;
| object id [, grfid]&lt;br /&gt;
| 0..0xFFFF&lt;br /&gt;
|&lt;br /&gt;
Manhattan distance to the closest object of the given type. Grfid is the grfid of the newgrf you want to check the minimum object distance of (default is current grf). Use the [[NML:Builtin functions|builtin function]] &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;str2number()&amp;lt;/code&amp;gt; to convert a grfid to its numeric representation. If the given object type is not yet built, this will return 0xFFFF&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Object callbacks==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! callback&lt;br /&gt;
! return value&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| default&lt;br /&gt;
| Sprite layout&lt;br /&gt;
| Normal graphics for an object placed on the map&lt;br /&gt;
|-&lt;br /&gt;
| purchase &amp;lt;ref name=&amp;quot;notyetbuilt&amp;quot;&amp;gt;These callbacks are called when the object is not yet built, so object- specific variables cannot be accessed. Trying to do so will result in undefined behaviour.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| Sprite layout&lt;br /&gt;
| Graphics shown in the build menu&lt;br /&gt;
|-&lt;br /&gt;
| anim_next_frame&lt;br /&gt;
| Next animation frame or CB_RESULT_XXX&lt;br /&gt;
| Called for every animation frame, returns the next frame to display. Alternatively, return CB_RESULT_NEXT_FRAME or CB_RESULT_STOP_ANIMATION to show the next frame or stop animation, respectively. Returning a sound effect in the high byte will cause that sound effect to be played (e.g. &amp;lt;code&amp;gt;return (sound(&amp;quot;mysound.wav&amp;quot;) &amp;amp;lt;&amp;amp;lt; 8) &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; CB_RESULT_NEXT_FRAME;&amp;lt;/code&amp;gt;).&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;extra_callback_info1&amp;lt;/code&amp;gt;: 32 random bits, if the object flag OBJ_FLAG_RANDOM_ANIMATION is set.&lt;br /&gt;
Note: Every time the animation frame is changed the map tile will be refreshed, even if the selected graphics stay the same. Therefore using the animation frame as a timer should be avoided, and animation triggers should be preferred instead.&lt;br /&gt;
|-&lt;br /&gt;
| anim_control&lt;br /&gt;
| Next animation frame or CB_RESULT_XXX&lt;br /&gt;
|&lt;br /&gt;
Called whenever an object animation trigger happens. Return the animation frame to show, or CB_RESULT_XXX with XXX = [CB_RESULT_START_ANIMATION &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; STOP_ANIMATION &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; DO_NOTHING] to respectively start the animation in its current frame, stop the animation or do nothing. Returning a sound effect in the high byte will cause that sound effect to be played.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;extra_callback_info1&amp;lt;/code&amp;gt;: 32 random bits, if the object flag OBJ_FLAG_RANDOM_ANIMATION is set.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 8)&amp;lt;/code&amp;gt;: Reason for the callback trigger, see the [[#Animation triggers| table]] below.&lt;br /&gt;
Note: Every time the animation frame is changed the map tile will be refreshed, even if the selected graphics stay the same. Therefore using the animation frame as a timer should be avoided, and animation triggers should be preferred instead.&lt;br /&gt;
|-&lt;br /&gt;
| anim_speed&lt;br /&gt;
| 0 .. 16&lt;br /&gt;
| Decide the time an animation frame should last. Return value is interpreted as (num_ticks = 2^anim_speed), which each tick lasting 30 ms. Avoid using this callback if possible, since it has to be called each tick for every animated tile. This can be used to create animation frames that last between 30 ms and 33 minutes.&lt;br /&gt;
|-&lt;br /&gt;
| colour&lt;br /&gt;
| colour2*16 + colour1&lt;br /&gt;
|&lt;br /&gt;
Called once, just after construction. &lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;: Colour scheme of the constructing company in the same format as the return value, or random colours if not available (scenario editor). If OBJ_FLAG_2CC is not set, colour2 is zero.&lt;br /&gt;
This callback can be used to alter the colour scheme of an object. Refer to the table [[NML:List of default colour translation palettes#Company colour helper functions|here]] for possible colour values.&lt;br /&gt;
|-&lt;br /&gt;
| autoslope&lt;br /&gt;
| CB_RESULT[_NO]_AUTOSLOPE&lt;br /&gt;
| Return CB_RESULT_AUTOSLOPE to allow autoslope (altering the ground below a tile) or CB_RESULT_NO_AUTOSLOPE to disallow it.&lt;br /&gt;
|-&lt;br /&gt;
| tile_check &amp;lt;ref name=&amp;quot;notyetbuilt&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
See the [[#Location check results|table]] below&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 5)&amp;lt;/code&amp;gt;: Tile slope, see below&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 8)&amp;lt;/code&amp;gt;: The location of the tile within the object as 16*y + x.&lt;br /&gt;
If this callback is not implemented or fails, the default behaviour is to allow building the object if it can be placed on a flat surface. This means that steep slopes are not allowed and that the highest corner of each tile of a multi-tile object should have the same height. Additionally, all tiles must be flat if &amp;quot;build on slopes&amp;quot; is disabled.&lt;br /&gt;
|-&lt;br /&gt;
| additional_text &amp;lt;ref name=&amp;quot;notyetbuilt&amp;quot;/&amp;gt;&lt;br /&gt;
| String&lt;br /&gt;
| Additional text to show in the purchase menu&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{NML:LocationCheckResults}}&lt;br /&gt;
&lt;br /&gt;
===Animation triggers===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Animation trigger&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| ANIM_TRIGGER_OBJ_BUILT&lt;br /&gt;
| Object is built (all tiles at the same time)&lt;br /&gt;
|-&lt;br /&gt;
| ANIM_TRIGGER_OBJ_TILELOOP&lt;br /&gt;
| Object tile is processed in the tileloop (at different times for different tiles)&lt;br /&gt;
|-&lt;br /&gt;
| ANIM_TRIGGER_OBJ_256_TICKS&lt;br /&gt;
| Every 256 ticks (all tiles at the same time)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Objects&amp;diff=5048</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=5048"/>
		<updated>2025-06-06T11:14:38Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Number of views (17) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Defining properties of new objects.&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. &lt;br /&gt;
&lt;br /&gt;
OpenTTD supports 64000 object types per game, and 255 object IDs per grf file.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|14.0|no}} 64000 object IDs per grf file are supported since OpenTTD 14.0.&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!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||D||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Class label, see below&lt;br /&gt;
|-&lt;br /&gt;
|09||W||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Text ID for class&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Text ID for this object&lt;br /&gt;
|-&lt;br /&gt;
|0B||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||[[Action0General#Climate availability|Climate availability]]&lt;br /&gt;
|-&lt;br /&gt;
|0C||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Byte representing size, see below&lt;br /&gt;
|-&lt;br /&gt;
|0D||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Object build cost factor (sets object removal cost factor as well)&lt;br /&gt;
|-&lt;br /&gt;
|0E||D||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Introduction date, see below&lt;br /&gt;
|-&lt;br /&gt;
|0F||D||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||End of life date, see below&lt;br /&gt;
|-&lt;br /&gt;
|10||W||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Object flags, see below&lt;br /&gt;
|-&lt;br /&gt;
|11||W||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Animation information&lt;br /&gt;
|-&lt;br /&gt;
|12||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Animation speed&lt;br /&gt;
|-&lt;br /&gt;
|13||W||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Animation triggers&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Object removal cost factor (set after object build cost factor)&lt;br /&gt;
|-&lt;br /&gt;
|15||W||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Callback flags, see below&lt;br /&gt;
|-&lt;br /&gt;
|16||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Height of the building&lt;br /&gt;
|-&lt;br /&gt;
|17||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Number of object views&lt;br /&gt;
|-&lt;br /&gt;
|18||B||{{ottdp|1.4|no|ottdrev=r25879}}||Measure for number of objects placed upon map creation&lt;br /&gt;
|-&lt;br /&gt;
|19||W n*W||{{ottdp|15}}||List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Check [http://pics.lakie.net/newObject-ActionStructure.png Lakie&#039;s Graphical Representation of the newObject Specifications]&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Object class (08) ===&lt;br /&gt;
&lt;br /&gt;
Class labels are unique identifiers composed of the letters A-Z and/or the numbers 0-9, &amp;amp;nbsp;analoguous to [[Action0Stations#Station class (08)|station class labels]].&lt;br /&gt;
&lt;br /&gt;
Their main use is to combine objects into classes and make them available by the top dropdown list in the object construction window.&lt;br /&gt;
&lt;br /&gt;
Unlike for stations, there is no default class for objects. Set authors have to specify their [[ObjectLabels|own labels]], although it is strongly recommended to follow a general scheme to try to avoid confusion.&lt;br /&gt;
&lt;br /&gt;
Class IDs must be set before any other property.&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;
{|&lt;br /&gt;
!Bit!!Value!!Version!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Only Available in the scenario editor&amp;lt;ref name=&amp;quot;incompatible&amp;quot;&amp;gt;Note that bits 0 and 7 are incompatible and setting both will make an object completely unavailable.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Irremovable&amp;lt;ref&amp;gt;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).&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Anything Can Remove (owned land behaviour)&lt;br /&gt;
|-&lt;br /&gt;
|3||8||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Allow construction of the object on water&lt;br /&gt;
|-&lt;br /&gt;
|4||16||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Removal cost is actually income (owned land behaviour)&lt;br /&gt;
|-&lt;br /&gt;
|5||32||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Do not display foundations if on a slope&lt;br /&gt;
|-&lt;br /&gt;
|6||64||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Object has animation&amp;lt;ref&amp;gt;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;quot;built tile&amp;quot; trigger and callback 159.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|7||128||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Only available during game play&amp;lt;ref name=&amp;quot;incompatible&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|8||256||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Allows 2cc mapping for objects instead of the default 1cc&lt;br /&gt;
|-&lt;br /&gt;
|9||512||{{ottdp|1.1|2.6|ttdprev=r2331}}||Disallows construction on land (also has bit 3 behaviour)&lt;br /&gt;
|-&lt;br /&gt;
|10||1024||{{ottdp|1.1|2.6|ttdprev=r2331}}||Draws the water under the object&amp;lt;ref&amp;gt;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).&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|11||2048||{{ottdp|1.1|no|ottdrev=r21455}}||Allow bridge over the object taking the building height into account&lt;br /&gt;
|-&lt;br /&gt;
|12||4096||{{ottdp|1.1|2.6|ottdrev=r21455|ttdprev=r2360}}||Random bits in the &amp;quot;next animation frame&amp;quot; callback&lt;br /&gt;
|-&lt;br /&gt;
|13||8192||{{ottdp|1.4|no|ottdrev=r25878}}||Scale amount of objects placed on map generation not by map area, but roughly by the length of the coastline&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&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/152/159)|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/153/158)|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/152/159)|callback 159]], allowing to change the animation state&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Property bit, var18 byte 0!!Property value!!Meaning!!Happens on!!Var 18 byte 1&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;
Currently no trigger provides additional information in var 18 byte 1. &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]] can be defined by setting the corresponding bit in property 15:&lt;br /&gt;
&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;
&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;
{{ottdp|1.1|no|ottdrev=r21455}} 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;quot;value of property 16&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;br /&gt;
&lt;br /&gt;
=== Number of views (17) ===&lt;br /&gt;
&lt;br /&gt;
Objects may have &amp;quot;views&amp;quot;, i.e. different graphical representations, e.g. used to show rotated views of an object. Number of views may be 1, 2, or 4. Default value is 1. Views should be used for rotations or minor variations, not for objects of different types as those should just be different object types which provides a better experience for players. Using separate objects is better for discoverability, naming, filtering, used state, favourite state, and badges.&lt;br /&gt;
&lt;br /&gt;
For non-square objects, x and y sizes are swapped for odd views. I.e., giving an object size of 1*2 (x = 1, y = 2), it will be displayed as 1*2 for num = &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;0,2] (x-direction) but as 2*1 for num = &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;1,3] (y-direction).&lt;br /&gt;
&lt;br /&gt;
Use object varaction2 var48 to access particular views of an object.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Objects&amp;diff=5047</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=5047"/>
		<updated>2025-06-06T09:25:43Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Number of views (17) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Defining properties of new objects.&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. &lt;br /&gt;
&lt;br /&gt;
OpenTTD supports 64000 object types per game, and 255 object IDs per grf file.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|14.0|no}} 64000 object IDs per grf file are supported since OpenTTD 14.0.&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!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||D||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Class label, see below&lt;br /&gt;
|-&lt;br /&gt;
|09||W||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Text ID for class&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Text ID for this object&lt;br /&gt;
|-&lt;br /&gt;
|0B||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||[[Action0General#Climate availability|Climate availability]]&lt;br /&gt;
|-&lt;br /&gt;
|0C||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Byte representing size, see below&lt;br /&gt;
|-&lt;br /&gt;
|0D||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Object build cost factor (sets object removal cost factor as well)&lt;br /&gt;
|-&lt;br /&gt;
|0E||D||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Introduction date, see below&lt;br /&gt;
|-&lt;br /&gt;
|0F||D||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||End of life date, see below&lt;br /&gt;
|-&lt;br /&gt;
|10||W||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Object flags, see below&lt;br /&gt;
|-&lt;br /&gt;
|11||W||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Animation information&lt;br /&gt;
|-&lt;br /&gt;
|12||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Animation speed&lt;br /&gt;
|-&lt;br /&gt;
|13||W||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Animation triggers&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Object removal cost factor (set after object build cost factor)&lt;br /&gt;
|-&lt;br /&gt;
|15||W||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Callback flags, see below&lt;br /&gt;
|-&lt;br /&gt;
|16||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Height of the building&lt;br /&gt;
|-&lt;br /&gt;
|17||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Number of object views&lt;br /&gt;
|-&lt;br /&gt;
|18||B||{{ottdp|1.4|no|ottdrev=r25879}}||Measure for number of objects placed upon map creation&lt;br /&gt;
|-&lt;br /&gt;
|19||W n*W||{{ottdp|15}}||List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Check [http://pics.lakie.net/newObject-ActionStructure.png Lakie&#039;s Graphical Representation of the newObject Specifications]&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Object class (08) ===&lt;br /&gt;
&lt;br /&gt;
Class labels are unique identifiers composed of the letters A-Z and/or the numbers 0-9, &amp;amp;nbsp;analoguous to [[Action0Stations#Station class (08)|station class labels]].&lt;br /&gt;
&lt;br /&gt;
Their main use is to combine objects into classes and make them available by the top dropdown list in the object construction window.&lt;br /&gt;
&lt;br /&gt;
Unlike for stations, there is no default class for objects. Set authors have to specify their [[ObjectLabels|own labels]], although it is strongly recommended to follow a general scheme to try to avoid confusion.&lt;br /&gt;
&lt;br /&gt;
Class IDs must be set before any other property.&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;
{|&lt;br /&gt;
!Bit!!Value!!Version!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Only Available in the scenario editor&amp;lt;ref name=&amp;quot;incompatible&amp;quot;&amp;gt;Note that bits 0 and 7 are incompatible and setting both will make an object completely unavailable.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Irremovable&amp;lt;ref&amp;gt;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).&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Anything Can Remove (owned land behaviour)&lt;br /&gt;
|-&lt;br /&gt;
|3||8||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Allow construction of the object on water&lt;br /&gt;
|-&lt;br /&gt;
|4||16||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Removal cost is actually income (owned land behaviour)&lt;br /&gt;
|-&lt;br /&gt;
|5||32||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Do not display foundations if on a slope&lt;br /&gt;
|-&lt;br /&gt;
|6||64||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Object has animation&amp;lt;ref&amp;gt;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;quot;built tile&amp;quot; trigger and callback 159.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|7||128||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Only available during game play&amp;lt;ref name=&amp;quot;incompatible&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|8||256||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Allows 2cc mapping for objects instead of the default 1cc&lt;br /&gt;
|-&lt;br /&gt;
|9||512||{{ottdp|1.1|2.6|ttdprev=r2331}}||Disallows construction on land (also has bit 3 behaviour)&lt;br /&gt;
|-&lt;br /&gt;
|10||1024||{{ottdp|1.1|2.6|ttdprev=r2331}}||Draws the water under the object&amp;lt;ref&amp;gt;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).&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|11||2048||{{ottdp|1.1|no|ottdrev=r21455}}||Allow bridge over the object taking the building height into account&lt;br /&gt;
|-&lt;br /&gt;
|12||4096||{{ottdp|1.1|2.6|ottdrev=r21455|ttdprev=r2360}}||Random bits in the &amp;quot;next animation frame&amp;quot; callback&lt;br /&gt;
|-&lt;br /&gt;
|13||8192||{{ottdp|1.4|no|ottdrev=r25878}}||Scale amount of objects placed on map generation not by map area, but roughly by the length of the coastline&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&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/152/159)|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/153/158)|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/152/159)|callback 159]], allowing to change the animation state&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Property bit, var18 byte 0!!Property value!!Meaning!!Happens on!!Var 18 byte 1&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;
Currently no trigger provides additional information in var 18 byte 1. &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]] can be defined by setting the corresponding bit in property 15:&lt;br /&gt;
&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;
&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;
{{ottdp|1.1|no|ottdrev=r21455}} 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;quot;value of property 16&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;br /&gt;
&lt;br /&gt;
=== Number of views (17) ===&lt;br /&gt;
&lt;br /&gt;
Objects may have &amp;quot;views&amp;quot;, i.e. different graphical representations, e.g. used to show rotated views of an object. Number of views may be 1, 2, or 4. Default value is 1. Views should be used for rotations or minor variations, not for objects of different types as those should just be different object types which provides a better experience for players.&lt;br /&gt;
&lt;br /&gt;
For non-square objects, x and y sizes are swapped for odd views. I.e., giving an object size of 1*2 (x = 1, y = 2), it will be displayed as 1*2 for num = &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;0,2] (x-direction) but as 2*1 for num = &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;1,3] (y-direction).&lt;br /&gt;
&lt;br /&gt;
Use object varaction2 var48 to access particular views of an object.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Objects&amp;diff=5036</id>
		<title>NML:Objects</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Objects&amp;diff=5036"/>
		<updated>2025-05-17T12:46:50Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Object properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
==Object IDs==&lt;br /&gt;
OpenTTD supports 64000 object types per game, and 255 object IDs per grf file.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|14.0|no}} 64000 object IDs per grf file are supported since OpenTTD 14.0.&lt;br /&gt;
&lt;br /&gt;
Object IDs are NewGRF-local and can therefore freely be chosen within the ID ranges. &lt;br /&gt;
&lt;br /&gt;
An object is allocated by setting the &#039;class&#039;-property, which should therefore be set first. &lt;br /&gt;
&lt;br /&gt;
Overriding the default objects (e.g. transmitter, lighthouse) is not (yet) possible.&lt;br /&gt;
&lt;br /&gt;
==Object properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! property&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| class&lt;br /&gt;
| String literal of length 4&lt;br /&gt;
|&lt;br /&gt;
Unlike station classes, there is currently no default yet. &#039;&#039;&#039;This property &#039;&#039;must&#039;&#039; be set first, before any other properties or graphics.&#039;&#039;&#039; Characters allowed in the IDs are A-Z, 0-9. While you are technically free to chose your own class, it&#039;s highly recommended you stick to one of the [[#Default object classes|default classes]].&lt;br /&gt;
|-&lt;br /&gt;
| classname&lt;br /&gt;
| string&lt;br /&gt;
| You only need to set this for one object in every class.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| string&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| climates_available&lt;br /&gt;
| bitmask(CLIMATE_XXX, CLIMATE_YYY, ...)&lt;br /&gt;
| XXX = [TEMPERATE &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; ARCTIC &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; TROPICAL &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; TOYLAND], alternatively NO_CLIMATE or ALL_CLIMATES&lt;br /&gt;
|-&lt;br /&gt;
| size&lt;br /&gt;
| [x, y]&lt;br /&gt;
| Size in x and y direction. Both x and y must be compiletime constants&lt;br /&gt;
|-&lt;br /&gt;
| build_cost_multiplier&lt;br /&gt;
|&lt;br /&gt;
| multiplicator to the base purchase cost&lt;br /&gt;
|-&lt;br /&gt;
| remove_cost_multiplier&lt;br /&gt;
|&lt;br /&gt;
| multiplicator to the base removal cost&lt;br /&gt;
|-&lt;br /&gt;
| introduction_date&lt;br /&gt;
| date&lt;br /&gt;
| The date this object becomes available to build.&lt;br /&gt;
|-&lt;br /&gt;
| end_of_life_date&lt;br /&gt;
| date&lt;br /&gt;
| The last date this object is buildable. Must be at least 365 days after introduction_date&lt;br /&gt;
|-&lt;br /&gt;
| object_flags&lt;br /&gt;
| bitmask(OBJ_FLAG_XXX, OBJ_FLAG_YYY)&lt;br /&gt;
|&lt;br /&gt;
See [[#List of object flags|list of object flags]]&lt;br /&gt;
|-&lt;br /&gt;
| animation_info&lt;br /&gt;
| Array [ANIMATION_XXX, frame-count]&lt;br /&gt;
| XXX = [LOOPING &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; NON_LOOPING], 1..253 frames&lt;br /&gt;
|-&lt;br /&gt;
| animation_speed&lt;br /&gt;
| 0..16&lt;br /&gt;
|&lt;br /&gt;
Speed of animation, see [[NML:Animation speed|animation speed table]] for the meaning of the values.&lt;br /&gt;
|-&lt;br /&gt;
| animation_triggers&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
See [[#Animation_triggers|list of animation triggers]]&lt;br /&gt;
|-&lt;br /&gt;
| callback_flags&lt;br /&gt;
| bitmask(OBJ_CBF_XXX, OBJ_CBF_YYY)&lt;br /&gt;
|&lt;br /&gt;
Do not set this, unless you use [[NML:Old style callbacks|old-style callbacks]].&lt;br /&gt;
|-&lt;br /&gt;
| height&lt;br /&gt;
| 0..255&lt;br /&gt;
| Height of the object / 8. For example if your object is 16 pixels height you should set height to 2. 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;quot;value of property&amp;quot; * 8. The property is also used to determine how high a bridge must be if it is allowed by the bit in object_flags.&lt;br /&gt;
|-&lt;br /&gt;
| num_views&lt;br /&gt;
| 1, 2 or 4&lt;br /&gt;
| Objects may have &amp;quot;views&amp;quot;, i.e. different graphical representations, e.g. used to show rotated views of an object. Number of views may be 1, 2, or 4. Default value is 1. For non-square objects, x and y sizes are swapped for odd views. Use variable &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;view&amp;lt;/code&amp;gt; to determine the view of a built object. Views should be used for rotations or minor variations, not for objects of different types as those should just be different object types which provides a better experience for players.&lt;br /&gt;
|-&lt;br /&gt;
| count_per_map256&lt;br /&gt;
| 0..255&lt;br /&gt;
| {{ottd|1.4|r25878}} Measure for the amount of objects placed on a map of 256^2 tiles. (Comparison: there are 15 transmitter)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Default object classes===&lt;br /&gt;
&lt;br /&gt;
Please refer to the [[ObjectLabels|list of object labels]] in the NewGRF Specs. The default class names listed there are recommended, you still need to set the class name for at least one object in every class or you risk to end up with objects in a class without a name. If multiple NewGRFs define objects for the same class the name defined in the last NewGRF will be used.&lt;br /&gt;
&lt;br /&gt;
===List of object flags===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_ONLY_SE&lt;br /&gt;
| Only available in the scenario editor (incompatible with OBJ_FLAG_ONLY_INGAME).&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_IRREMOVABLE&lt;br /&gt;
| Object cannot be removed with the normal dynamite tool. In OpenTTD you can only remove the object with the magic bulldozer cheat, in TTDPatch you can remove it by holding ctrl while using the bulldozer tool. The cost of removing this object is multiplied by 25.&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_ANYTHING_REMOVE&lt;br /&gt;
| Anything can remove this object (owned land behavior).&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_ON_WATER&lt;br /&gt;
| Allow construction of the object on water. Note that if an object is allowed to be built both on land and on water, then it will resist being flooded and will not flood adjacent tiles.&lt;br /&gt;
This flag has the same effect as using &#039;&#039;GROUNDSPRITE_WATER&#039;&#039; for the ground sprite in the spritelayout.&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_REMOVE_IS_INCOME&lt;br /&gt;
| Removal cost is actually income (owned land behaviour).&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_NO_FOUNDATIONS&lt;br /&gt;
| Do not display foundations if on a slope.&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_ANIMATED&lt;br /&gt;
| 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;
| OBJ_FLAG_ONLY_INGAME&lt;br /&gt;
| Only available during game play (incompatible with OBJ_FLAG_ONLY_SE).&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_2CC&lt;br /&gt;
| Allows 2cc mapping for objects instead of the default 1cc.&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_NOT_ON_LAND&lt;br /&gt;
| Disallows construction on land (implies OBJ_FLAG_ON_WATER).&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_DRAW_WATER&lt;br /&gt;
| Draws the water under the object. 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;
| OBJ_FLAG_ALLOW_BRIDGE&lt;br /&gt;
| Allow bridge over the object taking the building height into account.&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_RANDOM_ANIMATION&lt;br /&gt;
| Random bits in the &amp;quot;next animation frame&amp;quot; callback.&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_SCALE_BY_WATER&lt;br /&gt;
| Scale amount of objects placed on map generation not by map area, but roughly by the length of the coastline&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Object variables==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| relative_x&lt;br /&gt;
| 0..255&lt;br /&gt;
| X-coordinate (top right -&amp;amp;gt; bottom left) of the tile relative to the northernmost tile.&lt;br /&gt;
|-&lt;br /&gt;
| relative_y&lt;br /&gt;
| 0..255&lt;br /&gt;
| Y-coordinate (top left -&amp;amp;gt; bottom right) of the tile relative to the northernmost tile.&lt;br /&gt;
|-&lt;br /&gt;
| relative_pos&lt;br /&gt;
| 0xYYXX&lt;br /&gt;
|&lt;br /&gt;
A combination of relative_x and relative_y in the format 0xYYXX. Useful if you want to check for a single position. The [[NML:Builtin functions|builtin function]] relative_coord(x, y) may be useful when making comparisons.&lt;br /&gt;
|-&lt;br /&gt;
| terrain_type&lt;br /&gt;
| TILETYPE_NORMAL, TILETYPE_DESERT, TILETYPE_RAIN_FOREST, TILETYPE_SNOW&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| tile_slope&lt;br /&gt;
| SLOPE_XXX&lt;br /&gt;
|&lt;br /&gt;
See [[NML:List of tile slopes|tile slopes]] for an overview of possible values&lt;br /&gt;
|-&lt;br /&gt;
| build_date&lt;br /&gt;
|&lt;br /&gt;
| The date this object was build.&lt;br /&gt;
|-&lt;br /&gt;
| animation_frame&lt;br /&gt;
| 0 .. (frame_count - 1)&lt;br /&gt;
| Current animation frame, with the maximum defined in the object&#039;s &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;animation_info&amp;lt;/code&amp;gt; property.&lt;br /&gt;
|-&lt;br /&gt;
| colour&lt;br /&gt;
| COLOUR_XXX&lt;br /&gt;
|&lt;br /&gt;
Colour used for the company colour mask. Refer to the table [[NML:List of default colour translation palettes#Company colour helper functions|here]] for possible values.&lt;br /&gt;
|-&lt;br /&gt;
| owner&lt;br /&gt;
| 0..0x10&lt;br /&gt;
| CompanyID of the owner of the object or 0x10 if it was build in the scenario editor&lt;br /&gt;
|-&lt;br /&gt;
| town_manhattan_dist&lt;br /&gt;
|&lt;br /&gt;
| Manhattan distance to the nearest town&lt;br /&gt;
|-&lt;br /&gt;
| town_euclidean_dist&lt;br /&gt;
|&lt;br /&gt;
| Euclidean distance to the nearest town&lt;br /&gt;
|-&lt;br /&gt;
| town_zone&lt;br /&gt;
|&lt;br /&gt;
[[NML:List of town zones|town zone]]&lt;br /&gt;
| The town zone of the current tile. The town zone from the closest town (measured in manhattan distance) is used.&lt;br /&gt;
|-&lt;br /&gt;
| view&lt;br /&gt;
| 0 .. (&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;num_views&amp;lt;/code&amp;gt; - 1)&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r21455}} The view of the particular object. See also the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;num_views&amp;lt;/code&amp;gt; property.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables that require one or more parameters:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! arguments&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_object_type&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
| ID of the object on a nearby tile, if defined by the same grf. OBJECT_TYPE_OTHER_GRF if the object is defined by a different grf (or none at all). OBJECT_TYPE_NO_OBJECT if the tile does not contain an object.&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_object_view&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
| {{ottdp|1.4|no|ottdrev=r26316}} View of the object on a nearby tile, if defined by the same grf.&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_random_bits&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
| Random bits of the given tile. Only valid for tiles of the same object.&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_slope&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
| See tile_slope&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_is_same_object&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
| 0 .. 1&lt;br /&gt;
| Is the given tile part of the same object?&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_is_water&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
| 0 .. 1&lt;br /&gt;
| Is the given tile a water tile?&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_terrain_type&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
| See terrain_type&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_water_class&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
| WATER_CLASS_XXX&lt;br /&gt;
| XXX = [NONE &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; SEA &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; CANAL &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; RIVER] Note that tiles for which &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;nearby_tile_is_water&amp;lt;/code&amp;gt; is 0 may still have a water class, e.g. industry tiles with water beneath them.&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_height&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
| 0 .. 120&lt;br /&gt;
| The minimum height of the given tile. 8 units correspond to one height level&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_class&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
[[NML:List of tile classes|Tile class]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_animation_frame&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
| See animation_frame. Only valid for tiles of the same object.&lt;br /&gt;
|-&lt;br /&gt;
| object_count&lt;br /&gt;
| object id [, grfid]&lt;br /&gt;
| 0..0xFFFF&lt;br /&gt;
|&lt;br /&gt;
Number of objects with the given object id currently on the map. Grfid is the grfid of the newgrf you want to check the object count of (default is current grf). Use the [[NML:Builtin functions|builtin function]] &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;str2number()&amp;lt;/code&amp;gt; to convert a grfid to its numeric representation.&lt;br /&gt;
|-&lt;br /&gt;
| object_distance&lt;br /&gt;
| object id [, grfid]&lt;br /&gt;
| 0..0xFFFF&lt;br /&gt;
|&lt;br /&gt;
Manhattan distance to the closest object of the given type. Grfid is the grfid of the newgrf you want to check the minimum object distance of (default is current grf). Use the [[NML:Builtin functions|builtin function]] &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;str2number()&amp;lt;/code&amp;gt; to convert a grfid to its numeric representation. If the given object type is not yet built, this will return 0xFFFF&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Object callbacks==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! callback&lt;br /&gt;
! return value&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| default&lt;br /&gt;
| Sprite layout&lt;br /&gt;
| Normal graphics for an object placed on the map&lt;br /&gt;
|-&lt;br /&gt;
| purchase &amp;lt;ref name=&amp;quot;notyetbuilt&amp;quot;&amp;gt;These callbacks are called when the object is not yet built, so object- specific variables cannot be accessed. Trying to do so will result in undefined behaviour.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| Sprite layout&lt;br /&gt;
| Graphics shown in the build menu&lt;br /&gt;
|-&lt;br /&gt;
| anim_next_frame&lt;br /&gt;
| Next animation frame or CB_RESULT_XXX&lt;br /&gt;
| Called for every animation frame, returns the next frame to display. Alternatively, return CB_RESULT_NEXT_FRAME or CB_RESULT_STOP_ANIMATION to show the next frame or stop animation, respectively. Returning a sound effect in the high byte will cause that sound effect to be played (e.g. &amp;lt;code&amp;gt;return (sound(&amp;quot;mysound.wav&amp;quot;) &amp;amp;lt;&amp;amp;lt; 8) &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; CB_RESULT_NEXT_FRAME;&amp;lt;/code&amp;gt;).&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;extra_callback_info1&amp;lt;/code&amp;gt;: 32 random bits, if the object flag OBJ_FLAG_RANDOM_ANIMATION is set.&lt;br /&gt;
Note: Every time the animation frame is changed the map tile will be refreshed, even if the selected graphics stay the same. Therefore using the animation frame as a timer should be avoided, and animation triggers should be preferred instead.&lt;br /&gt;
|-&lt;br /&gt;
| anim_control&lt;br /&gt;
| Next animation frame or CB_RESULT_XXX&lt;br /&gt;
|&lt;br /&gt;
Called whenever an object animation trigger happens. Return the animation frame to show, or CB_RESULT_XXX with XXX = [CB_RESULT_START_ANIMATION &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; STOP_ANIMATION &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; DO_NOTHING] to respectively start the animation in its current frame, stop the animation or do nothing. Returning a sound effect in the high byte will cause that sound effect to be played.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;extra_callback_info1&amp;lt;/code&amp;gt;: 32 random bits, if the object flag OBJ_FLAG_RANDOM_ANIMATION is set.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 8)&amp;lt;/code&amp;gt;: Reason for the callback trigger, see the [[#Animation triggers| table]] below.&lt;br /&gt;
Note: Every time the animation frame is changed the map tile will be refreshed, even if the selected graphics stay the same. Therefore using the animation frame as a timer should be avoided, and animation triggers should be preferred instead.&lt;br /&gt;
|-&lt;br /&gt;
| anim_speed&lt;br /&gt;
| 0 .. 16&lt;br /&gt;
| Decide the time an animation frame should last. Return value is interpreted as (num_ticks = 2^anim_speed), which each tick lasting 30 ms. Avoid using this callback if possible, since it has to be called each tick for every animated tile. This can be used to create animation frames that last between 30 ms and 33 minutes.&lt;br /&gt;
|-&lt;br /&gt;
| colour&lt;br /&gt;
| colour2*16 + colour1&lt;br /&gt;
|&lt;br /&gt;
Called once, just after construction. &lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;: Colour scheme of the constructing company in the same format as the return value, or random colours if not available (scenario editor). If OBJ_FLAG_2CC is not set, colour2 is zero.&lt;br /&gt;
This callback can be used to alter the colour scheme of an object. Refer to the table [[NML:List of default colour translation palettes#Company colour helper functions|here]] for possible colour values.&lt;br /&gt;
|-&lt;br /&gt;
| autoslope&lt;br /&gt;
| CB_RESULT[_NO]_AUTOSLOPE&lt;br /&gt;
| Return CB_RESULT_AUTOSLOPE to allow autoslope (altering the ground below a tile) or CB_RESULT_NO_AUTOSLOPE to disallow it.&lt;br /&gt;
|-&lt;br /&gt;
| tile_check &amp;lt;ref name=&amp;quot;notyetbuilt&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
See the [[#Location check results|table]] below&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 5)&amp;lt;/code&amp;gt;: Tile slope, see below&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 8)&amp;lt;/code&amp;gt;: The location of the tile within the object as 16*y + x.&lt;br /&gt;
If this callback is not implemented or fails, the default behaviour is to allow building the object if it can be placed on a flat surface. This means that steep slopes are not allowed and that the highest corner of each tile of a multi-tile object should have the same height. Additionally, all tiles must be flat if &amp;quot;build on slopes&amp;quot; is disabled.&lt;br /&gt;
|-&lt;br /&gt;
| additional_text &amp;lt;ref name=&amp;quot;notyetbuilt&amp;quot;/&amp;gt;&lt;br /&gt;
| String&lt;br /&gt;
| Additional text to show in the purchase menu&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{NML:LocationCheckResults}}&lt;br /&gt;
&lt;br /&gt;
===Animation triggers===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Animation trigger&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| ANIM_TRIGGER_OBJ_BUILT&lt;br /&gt;
| Object is built (all tiles at the same time)&lt;br /&gt;
|-&lt;br /&gt;
| ANIM_TRIGGER_OBJ_TILELOOP&lt;br /&gt;
| Object tile is processed in the tileloop (at different times for different tiles)&lt;br /&gt;
|-&lt;br /&gt;
| ANIM_TRIGGER_OBJ_256_TICKS&lt;br /&gt;
| Every 256 ticks (all tiles at the same time)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Objects&amp;diff=5035</id>
		<title>NML:Objects</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Objects&amp;diff=5035"/>
		<updated>2025-05-17T12:46:25Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Object properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
==Object IDs==&lt;br /&gt;
OpenTTD supports 64000 object types per game, and 255 object IDs per grf file.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|14.0|no}} 64000 object IDs per grf file are supported since OpenTTD 14.0.&lt;br /&gt;
&lt;br /&gt;
Object IDs are NewGRF-local and can therefore freely be chosen within the ID ranges. &lt;br /&gt;
&lt;br /&gt;
An object is allocated by setting the &#039;class&#039;-property, which should therefore be set first. &lt;br /&gt;
&lt;br /&gt;
Overriding the default objects (e.g. transmitter, lighthouse) is not (yet) possible.&lt;br /&gt;
&lt;br /&gt;
==Object properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! property&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| class&lt;br /&gt;
| String literal of length 4&lt;br /&gt;
|&lt;br /&gt;
Unlike station classes, there is currently no default yet. &#039;&#039;&#039;This property &#039;&#039;must&#039;&#039; be set first, before any other properties or graphics.&#039;&#039;&#039; Characters allowed in the IDs are A-Z, 0-9. While you are technically free to chose your own class, it&#039;s highly recommended you stick to one of the [[#Default object classes|default classes]].&lt;br /&gt;
|-&lt;br /&gt;
| classname&lt;br /&gt;
| string&lt;br /&gt;
| You only need to set this for one object in every class.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| string&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| climates_available&lt;br /&gt;
| bitmask(CLIMATE_XXX, CLIMATE_YYY, ...)&lt;br /&gt;
| XXX = [TEMPERATE &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; ARCTIC &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; TROPICAL &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; TOYLAND], alternatively NO_CLIMATE or ALL_CLIMATES&lt;br /&gt;
|-&lt;br /&gt;
| size&lt;br /&gt;
| [x, y]&lt;br /&gt;
| Size in x and y direction. Both x and y must be compiletime constants&lt;br /&gt;
|-&lt;br /&gt;
| build_cost_multiplier&lt;br /&gt;
|&lt;br /&gt;
| multiplicator to the base purchase cost&lt;br /&gt;
|-&lt;br /&gt;
| remove_cost_multiplier&lt;br /&gt;
|&lt;br /&gt;
| multiplicator to the base removal cost&lt;br /&gt;
|-&lt;br /&gt;
| introduction_date&lt;br /&gt;
| date&lt;br /&gt;
| The date this object becomes available to build.&lt;br /&gt;
|-&lt;br /&gt;
| end_of_life_date&lt;br /&gt;
| date&lt;br /&gt;
| The last date this object is buildable. Must be at least 365 days after introduction_date&lt;br /&gt;
|-&lt;br /&gt;
| object_flags&lt;br /&gt;
| bitmask(OBJ_FLAG_XXX, OBJ_FLAG_YYY)&lt;br /&gt;
|&lt;br /&gt;
See [[#List of object flags|list of object flags]]&lt;br /&gt;
|-&lt;br /&gt;
| animation_info&lt;br /&gt;
| Array [ANIMATION_XXX, frame-count]&lt;br /&gt;
| XXX = [LOOPING &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; NON_LOOPING], 1..253 frames&lt;br /&gt;
|-&lt;br /&gt;
| animation_speed&lt;br /&gt;
| 0..16&lt;br /&gt;
|&lt;br /&gt;
Speed of animation, see [[NML:Animation speed|animation speed table]] for the meaning of the values.&lt;br /&gt;
|-&lt;br /&gt;
| animation_triggers&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
See [[#Animation_triggers|list of animation triggers]]&lt;br /&gt;
|-&lt;br /&gt;
| callback_flags&lt;br /&gt;
| bitmask(OBJ_CBF_XXX, OBJ_CBF_YYY)&lt;br /&gt;
|&lt;br /&gt;
Do not set this, unless you use [[NML:Old style callbacks|old-style callbacks]].&lt;br /&gt;
|-&lt;br /&gt;
| height&lt;br /&gt;
| 0..255&lt;br /&gt;
| Height of the object / 8. For example if your object is 16 pixels height you should set height to 2. 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;quot;value of property&amp;quot; * 8. The property is also used to determine how high a bridge must be if it is allowed by the bit in object_flags.&lt;br /&gt;
|-&lt;br /&gt;
| num_views&lt;br /&gt;
| 1, 2 or 4&lt;br /&gt;
| Objects may have &amp;quot;views&amp;quot;, i.e. different graphical representations, e.g. used to show rotated views of an object. Number of views may be 1, 2, or 4. Default value is 1. For non-square objects, x and y sizes are swapped for odd views. Use variable &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;view&amp;lt;/code&amp;gt; to determine the view of a built object. Views should be used for rotations or minor variations, not for objects of different types as those should just be different object types which providers a better experience for players.&lt;br /&gt;
|-&lt;br /&gt;
| count_per_map256&lt;br /&gt;
| 0..255&lt;br /&gt;
| {{ottd|1.4|r25878}} Measure for the amount of objects placed on a map of 256^2 tiles. (Comparison: there are 15 transmitter)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Default object classes===&lt;br /&gt;
&lt;br /&gt;
Please refer to the [[ObjectLabels|list of object labels]] in the NewGRF Specs. The default class names listed there are recommended, you still need to set the class name for at least one object in every class or you risk to end up with objects in a class without a name. If multiple NewGRFs define objects for the same class the name defined in the last NewGRF will be used.&lt;br /&gt;
&lt;br /&gt;
===List of object flags===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_ONLY_SE&lt;br /&gt;
| Only available in the scenario editor (incompatible with OBJ_FLAG_ONLY_INGAME).&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_IRREMOVABLE&lt;br /&gt;
| Object cannot be removed with the normal dynamite tool. In OpenTTD you can only remove the object with the magic bulldozer cheat, in TTDPatch you can remove it by holding ctrl while using the bulldozer tool. The cost of removing this object is multiplied by 25.&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_ANYTHING_REMOVE&lt;br /&gt;
| Anything can remove this object (owned land behavior).&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_ON_WATER&lt;br /&gt;
| Allow construction of the object on water. Note that if an object is allowed to be built both on land and on water, then it will resist being flooded and will not flood adjacent tiles.&lt;br /&gt;
This flag has the same effect as using &#039;&#039;GROUNDSPRITE_WATER&#039;&#039; for the ground sprite in the spritelayout.&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_REMOVE_IS_INCOME&lt;br /&gt;
| Removal cost is actually income (owned land behaviour).&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_NO_FOUNDATIONS&lt;br /&gt;
| Do not display foundations if on a slope.&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_ANIMATED&lt;br /&gt;
| 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;
| OBJ_FLAG_ONLY_INGAME&lt;br /&gt;
| Only available during game play (incompatible with OBJ_FLAG_ONLY_SE).&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_2CC&lt;br /&gt;
| Allows 2cc mapping for objects instead of the default 1cc.&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_NOT_ON_LAND&lt;br /&gt;
| Disallows construction on land (implies OBJ_FLAG_ON_WATER).&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_DRAW_WATER&lt;br /&gt;
| Draws the water under the object. 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;
| OBJ_FLAG_ALLOW_BRIDGE&lt;br /&gt;
| Allow bridge over the object taking the building height into account.&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_RANDOM_ANIMATION&lt;br /&gt;
| Random bits in the &amp;quot;next animation frame&amp;quot; callback.&lt;br /&gt;
|-&lt;br /&gt;
| OBJ_FLAG_SCALE_BY_WATER&lt;br /&gt;
| Scale amount of objects placed on map generation not by map area, but roughly by the length of the coastline&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Object variables==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| relative_x&lt;br /&gt;
| 0..255&lt;br /&gt;
| X-coordinate (top right -&amp;amp;gt; bottom left) of the tile relative to the northernmost tile.&lt;br /&gt;
|-&lt;br /&gt;
| relative_y&lt;br /&gt;
| 0..255&lt;br /&gt;
| Y-coordinate (top left -&amp;amp;gt; bottom right) of the tile relative to the northernmost tile.&lt;br /&gt;
|-&lt;br /&gt;
| relative_pos&lt;br /&gt;
| 0xYYXX&lt;br /&gt;
|&lt;br /&gt;
A combination of relative_x and relative_y in the format 0xYYXX. Useful if you want to check for a single position. The [[NML:Builtin functions|builtin function]] relative_coord(x, y) may be useful when making comparisons.&lt;br /&gt;
|-&lt;br /&gt;
| terrain_type&lt;br /&gt;
| TILETYPE_NORMAL, TILETYPE_DESERT, TILETYPE_RAIN_FOREST, TILETYPE_SNOW&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| tile_slope&lt;br /&gt;
| SLOPE_XXX&lt;br /&gt;
|&lt;br /&gt;
See [[NML:List of tile slopes|tile slopes]] for an overview of possible values&lt;br /&gt;
|-&lt;br /&gt;
| build_date&lt;br /&gt;
|&lt;br /&gt;
| The date this object was build.&lt;br /&gt;
|-&lt;br /&gt;
| animation_frame&lt;br /&gt;
| 0 .. (frame_count - 1)&lt;br /&gt;
| Current animation frame, with the maximum defined in the object&#039;s &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;animation_info&amp;lt;/code&amp;gt; property.&lt;br /&gt;
|-&lt;br /&gt;
| colour&lt;br /&gt;
| COLOUR_XXX&lt;br /&gt;
|&lt;br /&gt;
Colour used for the company colour mask. Refer to the table [[NML:List of default colour translation palettes#Company colour helper functions|here]] for possible values.&lt;br /&gt;
|-&lt;br /&gt;
| owner&lt;br /&gt;
| 0..0x10&lt;br /&gt;
| CompanyID of the owner of the object or 0x10 if it was build in the scenario editor&lt;br /&gt;
|-&lt;br /&gt;
| town_manhattan_dist&lt;br /&gt;
|&lt;br /&gt;
| Manhattan distance to the nearest town&lt;br /&gt;
|-&lt;br /&gt;
| town_euclidean_dist&lt;br /&gt;
|&lt;br /&gt;
| Euclidean distance to the nearest town&lt;br /&gt;
|-&lt;br /&gt;
| town_zone&lt;br /&gt;
|&lt;br /&gt;
[[NML:List of town zones|town zone]]&lt;br /&gt;
| The town zone of the current tile. The town zone from the closest town (measured in manhattan distance) is used.&lt;br /&gt;
|-&lt;br /&gt;
| view&lt;br /&gt;
| 0 .. (&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;num_views&amp;lt;/code&amp;gt; - 1)&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r21455}} The view of the particular object. See also the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;num_views&amp;lt;/code&amp;gt; property.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables that require one or more parameters:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! arguments&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_object_type&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
| ID of the object on a nearby tile, if defined by the same grf. OBJECT_TYPE_OTHER_GRF if the object is defined by a different grf (or none at all). OBJECT_TYPE_NO_OBJECT if the tile does not contain an object.&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_object_view&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
| {{ottdp|1.4|no|ottdrev=r26316}} View of the object on a nearby tile, if defined by the same grf.&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_random_bits&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
| Random bits of the given tile. Only valid for tiles of the same object.&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_slope&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
| See tile_slope&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_is_same_object&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
| 0 .. 1&lt;br /&gt;
| Is the given tile part of the same object?&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_is_water&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
| 0 .. 1&lt;br /&gt;
| Is the given tile a water tile?&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_terrain_type&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
| See terrain_type&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_water_class&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
| WATER_CLASS_XXX&lt;br /&gt;
| XXX = [NONE &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; SEA &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; CANAL &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; RIVER] Note that tiles for which &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;nearby_tile_is_water&amp;lt;/code&amp;gt; is 0 may still have a water class, e.g. industry tiles with water beneath them.&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_height&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
| 0 .. 120&lt;br /&gt;
| The minimum height of the given tile. 8 units correspond to one height level&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_class&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
[[NML:List of tile classes|Tile class]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_animation_frame&lt;br /&gt;
| x, y offset (-8..7)&lt;br /&gt;
|&lt;br /&gt;
| See animation_frame. Only valid for tiles of the same object.&lt;br /&gt;
|-&lt;br /&gt;
| object_count&lt;br /&gt;
| object id [, grfid]&lt;br /&gt;
| 0..0xFFFF&lt;br /&gt;
|&lt;br /&gt;
Number of objects with the given object id currently on the map. Grfid is the grfid of the newgrf you want to check the object count of (default is current grf). Use the [[NML:Builtin functions|builtin function]] &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;str2number()&amp;lt;/code&amp;gt; to convert a grfid to its numeric representation.&lt;br /&gt;
|-&lt;br /&gt;
| object_distance&lt;br /&gt;
| object id [, grfid]&lt;br /&gt;
| 0..0xFFFF&lt;br /&gt;
|&lt;br /&gt;
Manhattan distance to the closest object of the given type. Grfid is the grfid of the newgrf you want to check the minimum object distance of (default is current grf). Use the [[NML:Builtin functions|builtin function]] &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;str2number()&amp;lt;/code&amp;gt; to convert a grfid to its numeric representation. If the given object type is not yet built, this will return 0xFFFF&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Object callbacks==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! callback&lt;br /&gt;
! return value&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| default&lt;br /&gt;
| Sprite layout&lt;br /&gt;
| Normal graphics for an object placed on the map&lt;br /&gt;
|-&lt;br /&gt;
| purchase &amp;lt;ref name=&amp;quot;notyetbuilt&amp;quot;&amp;gt;These callbacks are called when the object is not yet built, so object- specific variables cannot be accessed. Trying to do so will result in undefined behaviour.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| Sprite layout&lt;br /&gt;
| Graphics shown in the build menu&lt;br /&gt;
|-&lt;br /&gt;
| anim_next_frame&lt;br /&gt;
| Next animation frame or CB_RESULT_XXX&lt;br /&gt;
| Called for every animation frame, returns the next frame to display. Alternatively, return CB_RESULT_NEXT_FRAME or CB_RESULT_STOP_ANIMATION to show the next frame or stop animation, respectively. Returning a sound effect in the high byte will cause that sound effect to be played (e.g. &amp;lt;code&amp;gt;return (sound(&amp;quot;mysound.wav&amp;quot;) &amp;amp;lt;&amp;amp;lt; 8) &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; CB_RESULT_NEXT_FRAME;&amp;lt;/code&amp;gt;).&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;extra_callback_info1&amp;lt;/code&amp;gt;: 32 random bits, if the object flag OBJ_FLAG_RANDOM_ANIMATION is set.&lt;br /&gt;
Note: Every time the animation frame is changed the map tile will be refreshed, even if the selected graphics stay the same. Therefore using the animation frame as a timer should be avoided, and animation triggers should be preferred instead.&lt;br /&gt;
|-&lt;br /&gt;
| anim_control&lt;br /&gt;
| Next animation frame or CB_RESULT_XXX&lt;br /&gt;
|&lt;br /&gt;
Called whenever an object animation trigger happens. Return the animation frame to show, or CB_RESULT_XXX with XXX = [CB_RESULT_START_ANIMATION &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; STOP_ANIMATION &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; DO_NOTHING] to respectively start the animation in its current frame, stop the animation or do nothing. Returning a sound effect in the high byte will cause that sound effect to be played.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;extra_callback_info1&amp;lt;/code&amp;gt;: 32 random bits, if the object flag OBJ_FLAG_RANDOM_ANIMATION is set.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 8)&amp;lt;/code&amp;gt;: Reason for the callback trigger, see the [[#Animation triggers| table]] below.&lt;br /&gt;
Note: Every time the animation frame is changed the map tile will be refreshed, even if the selected graphics stay the same. Therefore using the animation frame as a timer should be avoided, and animation triggers should be preferred instead.&lt;br /&gt;
|-&lt;br /&gt;
| anim_speed&lt;br /&gt;
| 0 .. 16&lt;br /&gt;
| Decide the time an animation frame should last. Return value is interpreted as (num_ticks = 2^anim_speed), which each tick lasting 30 ms. Avoid using this callback if possible, since it has to be called each tick for every animated tile. This can be used to create animation frames that last between 30 ms and 33 minutes.&lt;br /&gt;
|-&lt;br /&gt;
| colour&lt;br /&gt;
| colour2*16 + colour1&lt;br /&gt;
|&lt;br /&gt;
Called once, just after construction. &lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;: Colour scheme of the constructing company in the same format as the return value, or random colours if not available (scenario editor). If OBJ_FLAG_2CC is not set, colour2 is zero.&lt;br /&gt;
This callback can be used to alter the colour scheme of an object. Refer to the table [[NML:List of default colour translation palettes#Company colour helper functions|here]] for possible colour values.&lt;br /&gt;
|-&lt;br /&gt;
| autoslope&lt;br /&gt;
| CB_RESULT[_NO]_AUTOSLOPE&lt;br /&gt;
| Return CB_RESULT_AUTOSLOPE to allow autoslope (altering the ground below a tile) or CB_RESULT_NO_AUTOSLOPE to disallow it.&lt;br /&gt;
|-&lt;br /&gt;
| tile_check &amp;lt;ref name=&amp;quot;notyetbuilt&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
See the [[#Location check results|table]] below&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 5)&amp;lt;/code&amp;gt;: Tile slope, see below&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 8)&amp;lt;/code&amp;gt;: The location of the tile within the object as 16*y + x.&lt;br /&gt;
If this callback is not implemented or fails, the default behaviour is to allow building the object if it can be placed on a flat surface. This means that steep slopes are not allowed and that the highest corner of each tile of a multi-tile object should have the same height. Additionally, all tiles must be flat if &amp;quot;build on slopes&amp;quot; is disabled.&lt;br /&gt;
|-&lt;br /&gt;
| additional_text &amp;lt;ref name=&amp;quot;notyetbuilt&amp;quot;/&amp;gt;&lt;br /&gt;
| String&lt;br /&gt;
| Additional text to show in the purchase menu&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{NML:LocationCheckResults}}&lt;br /&gt;
&lt;br /&gt;
===Animation triggers===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Animation trigger&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| ANIM_TRIGGER_OBJ_BUILT&lt;br /&gt;
| Object is built (all tiles at the same time)&lt;br /&gt;
|-&lt;br /&gt;
| ANIM_TRIGGER_OBJ_TILELOOP&lt;br /&gt;
| Object tile is processed in the tileloop (at different times for different tiles)&lt;br /&gt;
|-&lt;br /&gt;
| ANIM_TRIGGER_OBJ_256_TICKS&lt;br /&gt;
| Every 256 ticks (all tiles at the same time)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action5&amp;diff=4950</id>
		<title>Action5</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action5&amp;diff=4950"/>
		<updated>2025-03-04T20:53:22Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* 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 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||{{ottdp|13|no}} 18 {{ottdp|0.6 - 12|2.5}} 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||{{ottdp|1.10|no}} 119 {{ottdp|0.6 - 1.9|2.5}} 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 - 1.11|no|ottdrev=11433}}||Flag sprites (no longer used)||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 191&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;
|19,99||{{ottdp|15|no|}}||Road waypoint graphics||4&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|1A,9A||{{ottdp|15|no|}}||Rocky overlay sprites, 5 sets of 19 (normal, 1/4 snowy, 2/4 snowy, 3/4 snowy and 4/4 snowy) base rock overlay sprites||95&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;
==== 09 One-way road arrows ====&lt;br /&gt;
&lt;br /&gt;
Overlay sprites to indicate the direction of one-way roads.&lt;br /&gt;
The 6 sprites originally supported from {{ottdp|0.6|2.5}} are, in order:&lt;br /&gt;
&lt;br /&gt;
 arrow facing SW, arrow NE, impassable NE-SW, arrow NW, arrow SE, impassable NW-SE.&lt;br /&gt;
&lt;br /&gt;
Before {{ottdp|13|no}} these are used on both flat and sloped roads.&lt;br /&gt;
&lt;br /&gt;
From {{ottdp|13|no}} the grf can optionally provide 18 sprites instead of 6.&lt;br /&gt;
In this case the first 6 sprites are used for flat tiles only. The next 6 are used in the same sequence for slopes with the N corner raised, and the last 6 for slopes with the S corner raised.&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 190 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;
|175 .. 178 || Icons for group livery selection&lt;br /&gt;
|-&lt;br /&gt;
|179 .. 183 || NotRoadTypes toolbar and cursor icons&lt;br /&gt;
|-&lt;br /&gt;
|184 || {{ottd|1.11|g8dda0ec4f}} window title bar: rename vehicle/station/town/...&lt;br /&gt;
|-&lt;br /&gt;
|185 || {{ottd|1.11|g8dda0ec4f}} window title bar: go to location of vehicle/station/town/industry/...&lt;br /&gt;
|-&lt;br /&gt;
|186 .. 190 || {{ottd|1.12|gfda1a590f6}} multiplayer GUI: chat, admin action, join team, self player, host player&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>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Badges&amp;diff=4949</id>
		<title>Action0/Badges</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Badges&amp;diff=4949"/>
		<updated>2025-02-25T12:29:31Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Badge label (08) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;&#039;Action 0 properties for badges&#039;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Action 0 - Properties for badges =&lt;br /&gt;
&lt;br /&gt;
Defining properties of badges.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Number&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Version&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|08&lt;br /&gt;
|{{ottdp|15}}&lt;br /&gt;
|S&lt;br /&gt;
|Badge label. A zero-terminated string.&lt;br /&gt;
|-&lt;br /&gt;
|09&lt;br /&gt;
|{{ottdp|15}}&lt;br /&gt;
|D&lt;br /&gt;
|Flags.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Badge label (08) ==&lt;br /&gt;
&lt;br /&gt;
These are globally unique strings.&lt;br /&gt;
&lt;br /&gt;
Badge labels comprise a badge class, for grouping similar badges, and badge name, separated by a &#039;/&#039;.&lt;br /&gt;
&lt;br /&gt;
Classes and names are arbitrary, but to be useful must follow a standard scheme. For instance, the badge label power/steam will define a badge for steam powered vehicles within the power class.&lt;br /&gt;
&lt;br /&gt;
Proposed initial classes are:&lt;br /&gt;
&lt;br /&gt;
* flag&lt;br /&gt;
* role&lt;br /&gt;
* manufacturer&lt;br /&gt;
* operator&lt;br /&gt;
* power&lt;br /&gt;
* livery&lt;br /&gt;
&lt;br /&gt;
It is also possible to assign a badge to everything within a NewGRF by defining the badge label `newgrf/&amp;lt;GRFID&amp;gt;`, with the GRFID in full hexadecimal form. This will work even if the badge is defined outside of the NewGRF it is for.&lt;br /&gt;
&lt;br /&gt;
=== Naming Proposal ===&lt;br /&gt;
&lt;br /&gt;
To work consistently, a naming standard needs to be agreed on, e.g.:&lt;br /&gt;
&lt;br /&gt;
 /role/passenger&lt;br /&gt;
 /role/freight&lt;br /&gt;
&lt;br /&gt;
 /livery/&amp;lt;country&amp;gt;/&amp;lt;operator&amp;gt;/&amp;lt;name&amp;gt;&lt;br /&gt;
 /livery/uk/british_rail/blue&lt;br /&gt;
 /livery/uk/british_rail/swallow&lt;br /&gt;
 /livery/fr/sncf/tgv&lt;br /&gt;
&lt;br /&gt;
The game could then present these as a filterable list, e.g.:&lt;br /&gt;
&lt;br /&gt;
 Role&lt;br /&gt;
   Passenger&lt;br /&gt;
   Freight&lt;br /&gt;
&lt;br /&gt;
 Livery&lt;br /&gt;
   UK&lt;br /&gt;
     British Rail - Blue&lt;br /&gt;
     British Rail - Swallow&lt;br /&gt;
   France&lt;br /&gt;
     SNCF - TGV&lt;br /&gt;
&lt;br /&gt;
== Flags (09) ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Bit&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Copy. Badge can be copied to related entity (e.g. badge on a railtype can be copied to rail vehicles of that railtype.)&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|NameListStop. Stops adding more names to the visible name list.&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4&lt;br /&gt;
|NameListFirstOnly. Add this name to the visible name list only if this is the first name.&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|8&lt;br /&gt;
|UseCompanyColour. Apply appropriate company colour palette to the icon. If the icon is applied to a vehicle with 2CC support, then the 2CC palette will be used.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action3&amp;diff=4948</id>
		<title>Action3</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action3&amp;diff=4948"/>
		<updated>2025-02-24T09:04:55Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* cargo-type */&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 (vehicles, stations, houses, industries, ...).&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The format of the data is feature-dependent.&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 &amp;amp;lt;feature&amp;amp;gt; &amp;amp;lt;n-id&amp;amp;gt; &amp;amp;lt;ids...&amp;amp;gt; &amp;amp;lt;num-cid&amp;amp;gt; (&amp;amp;lt;cargo-type&amp;amp;gt; &amp;amp;lt;set-ID&amp;amp;gt;)... &amp;amp;lt;default 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;
|&amp;amp;lt;feature&amp;amp;gt;&lt;br /&gt;
|B&lt;br /&gt;
|What type of feature the IDs refer to&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;n-id&amp;amp;gt;&lt;br /&gt;
|B&lt;br /&gt;
|Number of IDs this action 3 associates graphics with&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;ids...&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;
|&amp;amp;lt;num-cid&amp;amp;gt;&lt;br /&gt;
|B&lt;br /&gt;
|Number of different cargo types to support&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;cargo-type&amp;amp;gt;&lt;br /&gt;
|B&lt;br /&gt;
|Cargo type for which to use the following set-ID&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;set-ID&amp;amp;gt;&lt;br /&gt;
|W&lt;br /&gt;
|Set-ID (from action 2 or from a varaction2 chain) to use for this cargo type&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;default 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. 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;
|05||[[Action3/Canals|Canals/Rivers]]&lt;br /&gt;
|-&lt;br /&gt;
|07||Houses&lt;br /&gt;
|-&lt;br /&gt;
|09||Industry Tiles&lt;br /&gt;
|-&lt;br /&gt;
|0A||Industries&lt;br /&gt;
|-&lt;br /&gt;
|0B||Cargos&lt;br /&gt;
|-&lt;br /&gt;
|0C||Sound Effects (generic callback only)&lt;br /&gt;
|-&lt;br /&gt;
|0D||Airports&lt;br /&gt;
|-&lt;br /&gt;
|0E||Signals (generic callback only)&lt;br /&gt;
|-&lt;br /&gt;
|0F||Objects&lt;br /&gt;
|-&lt;br /&gt;
|10||[[Action3/Railtypes|Railtypes]]&lt;br /&gt;
|-&lt;br /&gt;
|11||Airport Tiles&lt;br /&gt;
|-&lt;br /&gt;
|12||[[Action3/Roadtypes|Roadtypes]]&lt;br /&gt;
|-&lt;br /&gt;
|13||[[Action3/Tramtypes|Tramtypes]]&lt;br /&gt;
|-&lt;br /&gt;
|14||Road Stops&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== n-id ===&lt;br /&gt;
&lt;br /&gt;
How many items of the current feature this action 3 defines new graphics for. If this is more than one, all items listed will get the same graphics. If this value has bit 7 set (i.e. 80 added), it is a wagon override. See [[Action3LiveryOverride|Action 3 - Livery Override]] for more info on this feature.&lt;br /&gt;
&lt;br /&gt;
You can make a definition with n-id equal to zero (and thus no ids that follow). &amp;amp;nbsp;This creates a generic feature-specific definition not associated with any particular item. &amp;amp;nbsp;At the moment, this is used for generic callbacks, but might be extended to other functions eventually.&lt;br /&gt;
&lt;br /&gt;
=== ids ===&lt;br /&gt;
&lt;br /&gt;
Feature IDs to use this action 3 for. All IDs are counted from the first of their class, i.e. the first road vehicle has 00, as does the first plane, the first ship, and the first train vehicle.&lt;br /&gt;
&lt;br /&gt;
In OpenTTD since r13482, each ID is an extended byte for vehicles, otherwise the ID is a regular byte.&lt;br /&gt;
&lt;br /&gt;
Since OpenTTD 14.0, each ID is an extended byte for all features.&lt;br /&gt;
&lt;br /&gt;
For canals and rivers the id has a special meaning, see its [[Action3/Canals|own Action 3 page]]&lt;br /&gt;
&lt;br /&gt;
For town buildings, the IDs are the house IDs, and specifying a house ID that haven&#039;t been defined before (by setting its property 08) doesn&#039;t do anything, but doesn&#039;t cause an error, either. Note that you don&#039;t necessarily have to assign a set-ID to a house ID, the old TTD sprite of the substitute type will be used if you don&#039;t do so. &amp;amp;nbsp;Industry tile IDs work in the same manner.&lt;br /&gt;
&lt;br /&gt;
=== num-cid ===&lt;br /&gt;
&lt;br /&gt;
Number of cargo type definitions that follow. Can be zero if only the default follows.&lt;br /&gt;
&lt;br /&gt;
For features 05 (canals/rivers), 07 (houses), 09 (industry tiles), 0A (industries), and 0B (cargoes) this must always be zero.&lt;br /&gt;
&lt;br /&gt;
=== cargo-type ===&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Feature !! cids&lt;br /&gt;
|-&lt;br /&gt;
| 00..03 vehicles ||&lt;br /&gt;
* 00..FE: cargo-type (index in [[Action0/Global Settings#Cargo translation table 09|cargo translation table]]; cargobit if no table present)&lt;br /&gt;
* FF: purchase list &amp;lt;ref&amp;gt;For dual-headed trains (prop 13) special rules for the purchase menu sprite apply: two sprites are drawn (for front and back) as if the vehicle is normally constructed. If you supply one purchase menu sprite, it will be used for both vehicle parts in the purchase menu. Provide a set of 8 sprites, and the 7th resp. 3rd sprite will&lt;br /&gt;
be drawn; provide a set of 8 blank sprites except the 7th if you want to fully control a single purchase menu sprite for a dual-headed engine.&amp;lt;/ref&amp;gt;&lt;br /&gt;
* default: used if none of the listed cids apply&lt;br /&gt;
|-&lt;br /&gt;
| 04 stations ||&lt;br /&gt;
* 00..FD: cargo-type (index in [[Action0/Global Settings#Cargo translation table 09|cargo translation table]]; cargobit if no table present) waiting at the station. The waiting amount of this cargo is used in [[Action2/Stations|Action2]] to decide the spriteset.&lt;br /&gt;
* FE: used if none of the listed cids apply. [[Action2/Stations|Action2]] will assume &amp;quot;zero waiting cargo&amp;quot;.&lt;br /&gt;
* FF: purchase list&lt;br /&gt;
* default: used if none of the listed cids apply. [[Action2/Stations|Action2]] will use &amp;quot;sum of all waiting cargos&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 05 canals || default only&lt;br /&gt;
|-&lt;br /&gt;
| 07 houses || default only&lt;br /&gt;
|-&lt;br /&gt;
| 09 industry tiles || default only&lt;br /&gt;
|-&lt;br /&gt;
| 0A industries || default only&lt;br /&gt;
|-&lt;br /&gt;
| 0B cargos || default only&lt;br /&gt;
|-&lt;br /&gt;
| 0C sound effects || default only&lt;br /&gt;
|-&lt;br /&gt;
| 0D airports || default only&lt;br /&gt;
|-&lt;br /&gt;
| 0E signals || default only&lt;br /&gt;
|-&lt;br /&gt;
| 0F objects ||&lt;br /&gt;
* FF: purchase list&lt;br /&gt;
* default: used if none of the listed cids apply&lt;br /&gt;
|-&lt;br /&gt;
| 10 rail types || special cids, see [[Action3/Railtypes#cargo-type|here]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 airport tiles || default only&lt;br /&gt;
|-&lt;br /&gt;
| 12 road types || special cids, see [[Action3/Tramtypes#cargo-type|here]]&lt;br /&gt;
|-&lt;br /&gt;
| 13 tram types || special cids, see [[Action3/Roadtypes#cargo-type|here]]&lt;br /&gt;
|-&lt;br /&gt;
| 14 road stops ||&lt;br /&gt;
* 00..FD: cargo-type (index in [[Action0/Global Settings#Cargo translation table 09|cargo translation table]]; cargobit if no table present) waiting at the road stop.&lt;br /&gt;
* FE: used if none of the listed cids apply.&lt;br /&gt;
* FF: purchase list&lt;br /&gt;
* default: used if none of the listed cids apply.&lt;br /&gt;
|-&lt;br /&gt;
| 15 badges || special cids:&lt;br /&gt;
* 00..14: feature&lt;br /&gt;
* default: used if specific feature is not assigned.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default set-ID ===&lt;br /&gt;
&lt;br /&gt;
Default set-ID if no entry from the cargo-type list above matches, or if there are no special cargo-types listed at all.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Below is an example of what a real action 3 pseudo-sprite could look like for a train engine.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; 13 * 7 &amp;amp;nbsp; 03 00 01 02 00 00 00&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;Byte&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|&amp;amp;lt;sprite-number&amp;amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;amp;lt;length&amp;amp;gt; of the action in bytes; start counting at 03 (&amp;amp;lt;action&amp;amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|03&lt;br /&gt;
|&amp;amp;lt;action&amp;amp;gt;: sets this pseudo-sprite to function as action 3&lt;br /&gt;
|-&lt;br /&gt;
|00&lt;br /&gt;
|&amp;amp;lt;feature&amp;amp;gt;: 00 for trains&lt;br /&gt;
|-&lt;br /&gt;
|01&lt;br /&gt;
|&amp;amp;lt;n-id&amp;amp;gt;: One ID to change in this case&lt;br /&gt;
|-&lt;br /&gt;
|02&lt;br /&gt;
|&amp;amp;lt;ids...&amp;amp;gt;: vehicle ID (02 - Ploddyphut Choo-Choo)&lt;br /&gt;
|-&lt;br /&gt;
|00&lt;br /&gt;
|&amp;amp;lt;num-cid&amp;amp;gt;: this engine doesn&#039;t have cargo-specific graphics&lt;br /&gt;
|-&lt;br /&gt;
|00 00&lt;br /&gt;
|&amp;amp;lt;default set-ID&amp;amp;gt;: Use action 2 ID 00, because it is a word value you add 00&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Badges&amp;diff=4947</id>
		<title>Action0/Badges</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Badges&amp;diff=4947"/>
		<updated>2025-02-24T01:53:17Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Badge label (08) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;&#039;Action 0 properties for badges&#039;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Action 0 - Properties for badges =&lt;br /&gt;
&lt;br /&gt;
Defining properties of badges.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Number&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Version&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|08&lt;br /&gt;
|{{ottdp|15}}&lt;br /&gt;
|S&lt;br /&gt;
|Badge label. A zero-terminated string.&lt;br /&gt;
|-&lt;br /&gt;
|09&lt;br /&gt;
|{{ottdp|15}}&lt;br /&gt;
|D&lt;br /&gt;
|Flags.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Badge label (08) ==&lt;br /&gt;
&lt;br /&gt;
These are globally unique strings.&lt;br /&gt;
&lt;br /&gt;
Badge labels comprise a badge class, for grouping similar badges, and badge name, separated by a &#039;/&#039;.&lt;br /&gt;
&lt;br /&gt;
Classes and names are arbitrary, but to be useful must follow a standard scheme. For instance, the badge label power/steam will define a badge for steam powered vehicles within the power class.&lt;br /&gt;
&lt;br /&gt;
Proposed initial classes are:&lt;br /&gt;
&lt;br /&gt;
* flag&lt;br /&gt;
* role&lt;br /&gt;
* manufacturer&lt;br /&gt;
* operator&lt;br /&gt;
* power&lt;br /&gt;
* livery&lt;br /&gt;
&lt;br /&gt;
It is also possible to assign a badge to everything within a NewGRF by defining the badge label `newgrf/&amp;lt;GRFID&amp;gt;`, with the GRFID in full hexadecimal form. This will work even if the badge is defined outside of the NewGRF it is for.&lt;br /&gt;
&lt;br /&gt;
== Flags (09) ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Bit&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Copy. Badge can be copied to related entity (e.g. badge on a railtype can be copied to rail vehicles of that railtype.)&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|NameListStop. Stops adding more names to the visible name list.&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4&lt;br /&gt;
|NameListFirstOnly. Add this name to the visible name list only if this is the first name.&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|8&lt;br /&gt;
|UseCompanyColour. Apply appropriate company colour palette to the icon. If the icon is applied to a vehicle with 2CC support, then the 2CC palette will be used.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Global_Settings&amp;diff=4944</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=4944"/>
		<updated>2025-02-17T16:43:28Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Tramtype translation table (17) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Global variables can be set in one of two ways. (This) action 0 using feature 8, or [[ActionD|Action D]]. 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;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||B||{{ottdp|0.6|2.5|ttdprev=alpha 40}}||Cost base multipliers&lt;br /&gt;
|-&lt;br /&gt;
|09||D||{{ottdp|0.6|2.5|ttdprev=alpha 66}}||Cargo translation table&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|0.6|2.5|ttdprev=alpha 69}}||Currency display names&lt;br /&gt;
|-&lt;br /&gt;
|0B||D||{{ottdp|0.6|2.5|ttdprev=alpha 69}}||Currency multipliers&lt;br /&gt;
|-&lt;br /&gt;
|0C||W||{{ottdp|0.6|2.5|ttdprev=alpha 69}}||Currency options&lt;br /&gt;
|-&lt;br /&gt;
|0D,0E||D||{{ottdp|0.6|2.5|ttdprev=alpha 69}}||Currency symbols&lt;br /&gt;
|-&lt;br /&gt;
|0F||W||{{ottdp|0.6|2.5|ttdprev=alpha 69}}||Euro introduction dates&lt;br /&gt;
|-&lt;br /&gt;
|10||12*32*B||{{ottdp|0.6|2.5|ttdprev=alpha 74}}||Snow line height table&lt;br /&gt;
|-&lt;br /&gt;
|11||2*D||{{ottdp|0.7|no|ottdrev=r12924}}||GRFID overrides for engines&lt;br /&gt;
|-&lt;br /&gt;
|12||D||{{ottdp|0.7|no|ottdrev=r15417}}||Railtype translation table&lt;br /&gt;
|-&lt;br /&gt;
|13,14||V||{{ottdp|1.1|no|ottdrev=r21208}} {{grfFrom|7}}||Gender/case translation table&lt;br /&gt;
|-&lt;br /&gt;
|15||B||{{ottdp|1.1|no|ottdrev=r21216}} {{grfFrom|7}}||Plural form&lt;br /&gt;
|-&lt;br /&gt;
|16,17||D||{{ottdp|1.10|no}}||Road-/tramtype translation table&lt;br /&gt;
|-&lt;br /&gt;
|18||S||{{ottdp|15}}||Badge translation table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Cost base multipliers (08) ===&lt;br /&gt;
&lt;br /&gt;
TTD has 49 [[BaseCosts|base costs]] (66 in OpenTTD currently) which govern how much everything costs. 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. 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 = OldBaseCost * 2^(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. 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;
{{ottdp|1.0|no}} 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;quot;MAIL&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;
 // Cargo translation table&lt;br /&gt;
   1 * 169      00 08 01 29 00 09&lt;br /&gt;
           &amp;quot;COAL&amp;quot; &amp;quot;WATR&amp;quot; &amp;quot;RUBB&amp;quot; &amp;quot;MAIL&amp;quot; &amp;quot;OIL_&amp;quot; // 0-4&lt;br /&gt;
           &amp;quot;LVST&amp;quot; &amp;quot;GOOD&amp;quot; &amp;quot;CERE&amp;quot; &amp;quot;GRAN&amp;quot; &amp;quot;WHET&amp;quot; // 5-9&lt;br /&gt;
           &amp;quot;MAIZ&amp;quot; &amp;quot;WOOD&amp;quot; &amp;quot;WODT&amp;quot; &amp;quot;IORE&amp;quot; &amp;quot;CORE&amp;quot; // 10-14&lt;br /&gt;
           &amp;quot;STEL&amp;quot; &amp;quot;PLAS&amp;quot; &amp;quot;VALU&amp;quot; &amp;quot;GOLD&amp;quot; &amp;quot;DIAM&amp;quot; // 15-19&lt;br /&gt;
           &amp;quot;PAPR&amp;quot; &amp;quot;FOOD&amp;quot; &amp;quot;FRUT&amp;quot; &amp;quot;FISH&amp;quot; &amp;quot;WOOL&amp;quot; // 20-24&lt;br /&gt;
           &amp;quot;POTA&amp;quot; &amp;quot;SAND&amp;quot; &amp;quot;GLAS&amp;quot; &amp;quot;WDPR&amp;quot; &amp;quot;DYES&amp;quot; // 25-29&lt;br /&gt;
           &amp;quot;FERT&amp;quot; &amp;quot;OLSD&amp;quot; &amp;quot;RFPR&amp;quot; &amp;quot;VEHI&amp;quot; &amp;quot;PETR&amp;quot; // 30-34&lt;br /&gt;
           &amp;quot;BRCK&amp;quot; &amp;quot;SULP&amp;quot; &amp;quot;CMNT&amp;quot; &amp;quot;FICR&amp;quot; &amp;quot;LIME&amp;quot; // 35-39&lt;br /&gt;
           &amp;quot;MILK&amp;quot; // 40&lt;br /&gt;
 // Train wagon that has special graphics for grain (8),&lt;br /&gt;
 // wheat (9), maize (10) and cereals (7)&lt;br /&gt;
   2 * 29       03 00 01 1B 04&lt;br /&gt;
           08 &amp;lt;grain-cid&amp;gt; 09 &amp;lt;wheat-cid&amp;gt; 0A &amp;lt;maize-cid&amp;gt;&lt;br /&gt;
           07 &amp;lt;cereals-cid&amp;gt; &amp;lt;default-cid&amp;gt;&lt;br /&gt;
 // Train wagon that has graphics for water (1), rubber (2),&lt;br /&gt;
 // oil (4), petrol (34) and milk (40)&lt;br /&gt;
   3 * 31       03 00 01 1C 05&lt;br /&gt;
           01 &amp;lt;water-cid&amp;gt; 02 &amp;lt;rubber-cid&amp;gt; 04 &amp;lt;oil-cid&amp;gt;&lt;br /&gt;
           22 &amp;lt;petrol-cid&amp;gt; 28 &amp;lt;milk-cid&amp;gt; &amp;lt;default-cid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Currency display names (0A) ===&lt;br /&gt;
This and 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.&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;quot;.&amp;quot; or comma &amp;quot;,&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;quot;$ &amp;quot; vs. &amp;quot; $&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.&lt;br /&gt;
&lt;br /&gt;
{{grfTill|7}} For GRF version 7 and below: The values should be multiple of 8 between 10h and 88h.&lt;br /&gt;
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;
{{grfFrom|8}} For GRF version 8 and above: The values can be any value between 0 and FFh.&lt;br /&gt;
FF means &#039;no snow&#039;; other values are scaled to the number of possible heightlevels of the map.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no|2.5}} 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;
=== GRFID overrides for engines (11) ===&lt;br /&gt;
&lt;br /&gt;
Allows you to provide a list of &#039;source&#039; and &#039;target&#039; GRFIDs to let vehicles in the source GRF override those in the target GRF, when dynamic engines is enabled. Each entry is 8 bytes, containing two GRFIDs. 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. GRFIDs 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;
=== Railtype translation table (12) ===&lt;br /&gt;
&lt;br /&gt;
Provides ability to specify railtypes via a translation table, similar to using a cargo translation table. Each railtype 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 railtype.&lt;br /&gt;
&lt;br /&gt;
Note that labels are not shared between features, so the same label can be used for multiple items. For example, the label &amp;quot;RAIL&amp;quot; can be used for a railtype, roadtype, tramtype, and cargotype simultaneously without conflict.&lt;br /&gt;
&lt;br /&gt;
=== Gender/case translation table (13,14) ===&lt;br /&gt;
&lt;br /&gt;
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;id&amp;gt; &amp;lt;name&amp;gt;)+ 00&lt;br /&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;
&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;br /&gt;
&lt;br /&gt;
=== Roadtype translation table (16) ===&lt;br /&gt;
&lt;br /&gt;
Provides ability to specify roadtypes via a translation table, similar to using a cargo translation table. Each roadtype label is a DWord. The default labels are ROAD and ELRD.&lt;br /&gt;
&lt;br /&gt;
Note that labels are not shared between features, so the same label can be used for multiple items. For example, the label &amp;quot;RAIL&amp;quot; can be used for a railtype, roadtype, tramtype, and cargotype simultaneously without conflict.&lt;br /&gt;
&lt;br /&gt;
=== Tramtype translation table (17) ===&lt;br /&gt;
&lt;br /&gt;
Provides ability to specify tramtypes via a translation table, similar to using a cargo translation table. Each tramtype label is a DWord. The default labels are RAIL and ELRL.&lt;br /&gt;
&lt;br /&gt;
Note that labels are not shared between features, so the same label can be used for multiple items. For example, the label &amp;quot;RAIL&amp;quot; can be used for a railtype, roadtype, tramtype, and cargotype simultaneously without conflict.&lt;br /&gt;
&lt;br /&gt;
=== Badge translation table (18) ===&lt;br /&gt;
&lt;br /&gt;
Required to allow badges to be assigned to other items. Each badge translation table entry is zero-terminated string corresponding to the badge&#039;s label.&lt;br /&gt;
&lt;br /&gt;
Unlike the other DWord label systems, a badge listed in a translation will automatically be created if it is not otherwise provided, and is fully usable internally.&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Global_Settings&amp;diff=4943</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=4943"/>
		<updated>2025-02-17T14:59:18Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Global variables can be set in one of two ways. (This) action 0 using feature 8, or [[ActionD|Action D]]. 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;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||B||{{ottdp|0.6|2.5|ttdprev=alpha 40}}||Cost base multipliers&lt;br /&gt;
|-&lt;br /&gt;
|09||D||{{ottdp|0.6|2.5|ttdprev=alpha 66}}||Cargo translation table&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|0.6|2.5|ttdprev=alpha 69}}||Currency display names&lt;br /&gt;
|-&lt;br /&gt;
|0B||D||{{ottdp|0.6|2.5|ttdprev=alpha 69}}||Currency multipliers&lt;br /&gt;
|-&lt;br /&gt;
|0C||W||{{ottdp|0.6|2.5|ttdprev=alpha 69}}||Currency options&lt;br /&gt;
|-&lt;br /&gt;
|0D,0E||D||{{ottdp|0.6|2.5|ttdprev=alpha 69}}||Currency symbols&lt;br /&gt;
|-&lt;br /&gt;
|0F||W||{{ottdp|0.6|2.5|ttdprev=alpha 69}}||Euro introduction dates&lt;br /&gt;
|-&lt;br /&gt;
|10||12*32*B||{{ottdp|0.6|2.5|ttdprev=alpha 74}}||Snow line height table&lt;br /&gt;
|-&lt;br /&gt;
|11||2*D||{{ottdp|0.7|no|ottdrev=r12924}}||GRFID overrides for engines&lt;br /&gt;
|-&lt;br /&gt;
|12||D||{{ottdp|0.7|no|ottdrev=r15417}}||Railtype translation table&lt;br /&gt;
|-&lt;br /&gt;
|13,14||V||{{ottdp|1.1|no|ottdrev=r21208}} {{grfFrom|7}}||Gender/case translation table&lt;br /&gt;
|-&lt;br /&gt;
|15||B||{{ottdp|1.1|no|ottdrev=r21216}} {{grfFrom|7}}||Plural form&lt;br /&gt;
|-&lt;br /&gt;
|16,17||D||{{ottdp|1.10|no}}||Road-/tramtype translation table&lt;br /&gt;
|-&lt;br /&gt;
|18||S||{{ottdp|15}}||Badge translation table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Cost base multipliers (08) ===&lt;br /&gt;
&lt;br /&gt;
TTD has 49 [[BaseCosts|base costs]] (66 in OpenTTD currently) which govern how much everything costs. 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. 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 = OldBaseCost * 2^(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. 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;
{{ottdp|1.0|no}} 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;quot;MAIL&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;
 // Cargo translation table&lt;br /&gt;
   1 * 169      00 08 01 29 00 09&lt;br /&gt;
           &amp;quot;COAL&amp;quot; &amp;quot;WATR&amp;quot; &amp;quot;RUBB&amp;quot; &amp;quot;MAIL&amp;quot; &amp;quot;OIL_&amp;quot; // 0-4&lt;br /&gt;
           &amp;quot;LVST&amp;quot; &amp;quot;GOOD&amp;quot; &amp;quot;CERE&amp;quot; &amp;quot;GRAN&amp;quot; &amp;quot;WHET&amp;quot; // 5-9&lt;br /&gt;
           &amp;quot;MAIZ&amp;quot; &amp;quot;WOOD&amp;quot; &amp;quot;WODT&amp;quot; &amp;quot;IORE&amp;quot; &amp;quot;CORE&amp;quot; // 10-14&lt;br /&gt;
           &amp;quot;STEL&amp;quot; &amp;quot;PLAS&amp;quot; &amp;quot;VALU&amp;quot; &amp;quot;GOLD&amp;quot; &amp;quot;DIAM&amp;quot; // 15-19&lt;br /&gt;
           &amp;quot;PAPR&amp;quot; &amp;quot;FOOD&amp;quot; &amp;quot;FRUT&amp;quot; &amp;quot;FISH&amp;quot; &amp;quot;WOOL&amp;quot; // 20-24&lt;br /&gt;
           &amp;quot;POTA&amp;quot; &amp;quot;SAND&amp;quot; &amp;quot;GLAS&amp;quot; &amp;quot;WDPR&amp;quot; &amp;quot;DYES&amp;quot; // 25-29&lt;br /&gt;
           &amp;quot;FERT&amp;quot; &amp;quot;OLSD&amp;quot; &amp;quot;RFPR&amp;quot; &amp;quot;VEHI&amp;quot; &amp;quot;PETR&amp;quot; // 30-34&lt;br /&gt;
           &amp;quot;BRCK&amp;quot; &amp;quot;SULP&amp;quot; &amp;quot;CMNT&amp;quot; &amp;quot;FICR&amp;quot; &amp;quot;LIME&amp;quot; // 35-39&lt;br /&gt;
           &amp;quot;MILK&amp;quot; // 40&lt;br /&gt;
 // Train wagon that has special graphics for grain (8),&lt;br /&gt;
 // wheat (9), maize (10) and cereals (7)&lt;br /&gt;
   2 * 29       03 00 01 1B 04&lt;br /&gt;
           08 &amp;lt;grain-cid&amp;gt; 09 &amp;lt;wheat-cid&amp;gt; 0A &amp;lt;maize-cid&amp;gt;&lt;br /&gt;
           07 &amp;lt;cereals-cid&amp;gt; &amp;lt;default-cid&amp;gt;&lt;br /&gt;
 // Train wagon that has graphics for water (1), rubber (2),&lt;br /&gt;
 // oil (4), petrol (34) and milk (40)&lt;br /&gt;
   3 * 31       03 00 01 1C 05&lt;br /&gt;
           01 &amp;lt;water-cid&amp;gt; 02 &amp;lt;rubber-cid&amp;gt; 04 &amp;lt;oil-cid&amp;gt;&lt;br /&gt;
           22 &amp;lt;petrol-cid&amp;gt; 28 &amp;lt;milk-cid&amp;gt; &amp;lt;default-cid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Currency display names (0A) ===&lt;br /&gt;
This and 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.&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;quot;.&amp;quot; or comma &amp;quot;,&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;quot;$ &amp;quot; vs. &amp;quot; $&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.&lt;br /&gt;
&lt;br /&gt;
{{grfTill|7}} For GRF version 7 and below: The values should be multiple of 8 between 10h and 88h.&lt;br /&gt;
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;
{{grfFrom|8}} For GRF version 8 and above: The values can be any value between 0 and FFh.&lt;br /&gt;
FF means &#039;no snow&#039;; other values are scaled to the number of possible heightlevels of the map.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no|2.5}} 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;
=== GRFID overrides for engines (11) ===&lt;br /&gt;
&lt;br /&gt;
Allows you to provide a list of &#039;source&#039; and &#039;target&#039; GRFIDs to let vehicles in the source GRF override those in the target GRF, when dynamic engines is enabled. Each entry is 8 bytes, containing two GRFIDs. 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. GRFIDs 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;
=== Railtype translation table (12) ===&lt;br /&gt;
&lt;br /&gt;
Provides ability to specify railtypes via a translation table, similar to using a cargo translation table. Each railtype 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 railtype.&lt;br /&gt;
&lt;br /&gt;
Note that labels are not shared between features, so the same label can be used for multiple items. For example, the label &amp;quot;RAIL&amp;quot; can be used for a railtype, roadtype, tramtype, and cargotype simultaneously without conflict.&lt;br /&gt;
&lt;br /&gt;
=== Gender/case translation table (13,14) ===&lt;br /&gt;
&lt;br /&gt;
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;id&amp;gt; &amp;lt;name&amp;gt;)+ 00&lt;br /&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;
&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;br /&gt;
&lt;br /&gt;
=== Roadtype translation table (16) ===&lt;br /&gt;
&lt;br /&gt;
Provides ability to specify roadtypes via a translation table, similar to using a cargo translation table. Each roadtype label is a DWord. The default labels are ROAD and ELRD.&lt;br /&gt;
&lt;br /&gt;
Note that labels are not shared between features, so the same label can be used for multiple items. For example, the label &amp;quot;RAIL&amp;quot; can be used for a railtype, roadtype, tramtype, and cargotype simultaneously without conflict.&lt;br /&gt;
&lt;br /&gt;
=== Tramtype translation table (17) ===&lt;br /&gt;
&lt;br /&gt;
Provides ability to specify tramtypes via a translation table, similar to using a cargo translation table. Each tramtype label is a DWord. The default labels are RAIL and ELRL.&lt;br /&gt;
&lt;br /&gt;
Note that labels are not shared between features, so the same label can be used for multiple items. For example, the label &amp;quot;RAIL&amp;quot; can be used for a railtype, roadtype, tramtype, and cargotype simultaneously without conflict.&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Road_Stops&amp;diff=4942</id>
		<title>Action0/Road Stops</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Road_Stops&amp;diff=4942"/>
		<updated>2025-02-17T14:58:23Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Defining properties of road stops.&lt;br /&gt;
&lt;br /&gt;
Road stop IDs may be freely chosen. In action 0, you need only specify IDs relative to the set, i.e. the ID of the first road stop type is 00, the second road type is 01 and so on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OpenTTD supports 64000 road stops per game, and 64000 road stop IDs per GRF file.&lt;br /&gt;
&lt;br /&gt;
The property you &#039;&#039;&#039;must&#039;&#039;&#039; set for each road stop ID is 08 (in addition to defining an action 3 for it). Also, all road stop 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!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||D||{{ottdp|14}}||Class label, see below&lt;br /&gt;
|-&lt;br /&gt;
|09||B||{{ottdp|14}}||Road stop type&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|14}}||Road stop name text ID&lt;br /&gt;
|-&lt;br /&gt;
|0B||W||{{ottdp|14}}||Class name text ID&lt;br /&gt;
|-&lt;br /&gt;
|0C||B||{{ottdp|14}}||Draw mode&lt;br /&gt;
|-&lt;br /&gt;
|0D||D||{{ottdp|14}}||Random trigger cargoes&lt;br /&gt;
|-&lt;br /&gt;
|0E||W||{{ottdp|14}}||Animation information&lt;br /&gt;
|-&lt;br /&gt;
|0F||B||{{ottdp|14}}||Animation speed&lt;br /&gt;
|-&lt;br /&gt;
|10||W||{{ottdp|14}}||Animation triggers&lt;br /&gt;
|-&lt;br /&gt;
|11||B||{{ottdp|14}}||Callback flags, see below&lt;br /&gt;
|-&lt;br /&gt;
|12||D||{{ottdp|14}}||General flags, see below&lt;br /&gt;
|-&lt;br /&gt;
|15||W||{{ottdp|14}}||Cost multipiers, see below&lt;br /&gt;
|-&lt;br /&gt;
|16||W n*W||{{ottdp|15}}||List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Road stop class (08) ===&lt;br /&gt;
&lt;br /&gt;
New road stops are grouped graphics into classes.&lt;br /&gt;
&lt;br /&gt;
Only two classes are pre-defined:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Name!!Class ID!!Intended use for road stops&lt;br /&gt;
|-&lt;br /&gt;
|DFLT||44 46 4C 54||Default road stops&lt;br /&gt;
|-&lt;br /&gt;
|WAYP||57 41 59 50||{{ottdp|15}} Road waypoints&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Road stop classes which start with the byte FF are considered road waypoint classes, and will appear in the road waypoint construction window instead of the road bus/truck stop construction windows.&lt;br /&gt;
&lt;br /&gt;
It is recommended that the class identifier used is unique to your GRF(s).&lt;br /&gt;
&lt;br /&gt;
=== Road stop type (09) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||Passenger/bus stop&lt;br /&gt;
|-&lt;br /&gt;
|1||Freight/lorry stop&lt;br /&gt;
|-&lt;br /&gt;
|2||Both passenger/bus and freight/lorry stops&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default value is 2: Both passenger/bus and freight/lorry stops&lt;br /&gt;
&lt;br /&gt;
=== Road stop name text ID (0A) ===&lt;br /&gt;
&lt;br /&gt;
The text ID for this road stop (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;
=== Class name text ID (0B) ===&lt;br /&gt;
&lt;br /&gt;
The text ID for the road stop class.&lt;br /&gt;
&lt;br /&gt;
When specifying a road stop, 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;
=== Draw mode (0C) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||Bay stops: Draw road type ground sprite&lt;br /&gt;
|-&lt;br /&gt;
|1||2||Drive through stops: Draw road/tram type overlays&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|15}} Road waypoints: Draw the sprite layout ground tile (on top of the road)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default value is 3 (bits 0 and 1 both set).&lt;br /&gt;
&lt;br /&gt;
The remaining bits are reserved for future use.&lt;br /&gt;
&lt;br /&gt;
=== Cargo types for random triggers (0D) ===&lt;br /&gt;
&lt;br /&gt;
This sets which cargo types should trigger re-randomizing. The cargo types are given as a bitmask of the bits from column 3 (type B) in CargoTypes. &amp;amp;nbsp;If nothing is set (the default), the no random triggers will happen, to conserve CPU time.&lt;br /&gt;
&lt;br /&gt;
With GRF version 7 and above, the interpretation of bits changes. Instead of climate-dependent cargo slot numbers (type B), you have to set the bits of climate-independent cargo ID (type A).&lt;br /&gt;
&lt;br /&gt;
=== Animation information (0E) ===&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;
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/152/159)|callback 140]] 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/153/158)|callback 141]] for that.&lt;br /&gt;
&lt;br /&gt;
=== Animation speed (0F) ===&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 2.&lt;br /&gt;
&lt;br /&gt;
=== Animation triggers (10) ===&lt;br /&gt;
This is a bit mask of events that should trigger [[Callbacks#Animation control (1B/25/140/152/159)|callback 140]], allowing to change the animation state&lt;br /&gt;
&lt;br /&gt;
=== Callback flags (11) ===&lt;br /&gt;
For road stops, the following [[callbacks]] can be defined by setting the corresponding bit in property 0B:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Variable 0C value!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||13||Whether to make the road stop available in construction window (non-zero callback return) or not (callback returns zero)&lt;br /&gt;
|-&lt;br /&gt;
|1||2||141||Decide next animation frame&lt;br /&gt;
|-&lt;br /&gt;
|2||4||142||Decide animation speed&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 [[VariationalAction2|VarAction2]] for callbacks.&lt;br /&gt;
&lt;br /&gt;
=== General Flags (12) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||[[Callbacks#Next animation frame (1A/26/141/153/158)|callback 141]] needs random bits in var. 10&lt;br /&gt;
|-&lt;br /&gt;
|2||4||Do not show catenary graphics&lt;br /&gt;
|-&lt;br /&gt;
|3||8||Only allow drive-through stops (not bay stops)&lt;br /&gt;
|-&lt;br /&gt;
|4||10||Do not automatically build connecting road pieces&lt;br /&gt;
|-&lt;br /&gt;
|5||20||Only show in the road build menu (not tram)&lt;br /&gt;
|-&lt;br /&gt;
|6||40||Only show in the tram build menu (not road)&lt;br /&gt;
|-&lt;br /&gt;
|8||100||{{ottdp|15}} Read the draw mode from register 0x100, overriding the default value in property 0C&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default value is 0 (no bits set).&lt;br /&gt;
&lt;br /&gt;
The remaining bits are reserved for future use.&lt;br /&gt;
&lt;br /&gt;
=== Cost multipiers (15) ===&lt;br /&gt;
&lt;br /&gt;
The first byte is the build cost multiplier.&lt;br /&gt;
&lt;br /&gt;
The second byte is the removal cost multiplier.&lt;br /&gt;
&lt;br /&gt;
The total property length is 2 bytes.&lt;br /&gt;
&lt;br /&gt;
A value of 16 produces a build or removal cost the same as non-NewGRF road stops.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Road_Stops&amp;diff=4941</id>
		<title>Action0/Road Stops</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Road_Stops&amp;diff=4941"/>
		<updated>2025-02-17T14:58:13Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Defining properties of road stops.&lt;br /&gt;
&lt;br /&gt;
Road stop IDs may be freely chosen. In action 0, you need only specify IDs relative to the set, i.e. the ID of the first road stop type is 00, the second road type is 01 and so on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OpenTTD supports 64000 road stops per game, and 64000 road stop IDs per GRF file.&lt;br /&gt;
&lt;br /&gt;
The property you &#039;&#039;&#039;must&#039;&#039;&#039; set for each road stop ID is 08 (in addition to defining an action 3 for it). Also, all road stop 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!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||D||{{ottdp|14}}||Class label, see below&lt;br /&gt;
|-&lt;br /&gt;
|09||B||{{ottdp|14}}||Road stop type&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|14}}||Road stop name text ID&lt;br /&gt;
|-&lt;br /&gt;
|0B||W||{{ottdp|14}}||Class name text ID&lt;br /&gt;
|-&lt;br /&gt;
|0C||B||{{ottdp|14}}||Draw mode&lt;br /&gt;
|-&lt;br /&gt;
|0D||D||{{ottdp|14}}||Random trigger cargoes&lt;br /&gt;
|-&lt;br /&gt;
|0E||W||{{ottdp|14}}||Animation information&lt;br /&gt;
|-&lt;br /&gt;
|0F||B||{{ottdp|14}}||Animation speed&lt;br /&gt;
|-&lt;br /&gt;
|10||W||{{ottdp|14}}||Animation triggers&lt;br /&gt;
|-&lt;br /&gt;
|11||B||{{ottdp|14}}||Callback flags, see below&lt;br /&gt;
|-&lt;br /&gt;
|12||D||{{ottdp|14}}||General flags, see below&lt;br /&gt;
|-&lt;br /&gt;
|15||W||{{ottdp|14}}||Cost multipiers, see below&lt;br /&gt;
|-&lt;br /&gt;
|16||{{ottdp|15}}||W n*W||List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Road stop class (08) ===&lt;br /&gt;
&lt;br /&gt;
New road stops are grouped graphics into classes.&lt;br /&gt;
&lt;br /&gt;
Only two classes are pre-defined:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Name!!Class ID!!Intended use for road stops&lt;br /&gt;
|-&lt;br /&gt;
|DFLT||44 46 4C 54||Default road stops&lt;br /&gt;
|-&lt;br /&gt;
|WAYP||57 41 59 50||{{ottdp|15}} Road waypoints&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Road stop classes which start with the byte FF are considered road waypoint classes, and will appear in the road waypoint construction window instead of the road bus/truck stop construction windows.&lt;br /&gt;
&lt;br /&gt;
It is recommended that the class identifier used is unique to your GRF(s).&lt;br /&gt;
&lt;br /&gt;
=== Road stop type (09) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||Passenger/bus stop&lt;br /&gt;
|-&lt;br /&gt;
|1||Freight/lorry stop&lt;br /&gt;
|-&lt;br /&gt;
|2||Both passenger/bus and freight/lorry stops&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default value is 2: Both passenger/bus and freight/lorry stops&lt;br /&gt;
&lt;br /&gt;
=== Road stop name text ID (0A) ===&lt;br /&gt;
&lt;br /&gt;
The text ID for this road stop (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;
=== Class name text ID (0B) ===&lt;br /&gt;
&lt;br /&gt;
The text ID for the road stop class.&lt;br /&gt;
&lt;br /&gt;
When specifying a road stop, 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;
=== Draw mode (0C) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||Bay stops: Draw road type ground sprite&lt;br /&gt;
|-&lt;br /&gt;
|1||2||Drive through stops: Draw road/tram type overlays&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|15}} Road waypoints: Draw the sprite layout ground tile (on top of the road)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default value is 3 (bits 0 and 1 both set).&lt;br /&gt;
&lt;br /&gt;
The remaining bits are reserved for future use.&lt;br /&gt;
&lt;br /&gt;
=== Cargo types for random triggers (0D) ===&lt;br /&gt;
&lt;br /&gt;
This sets which cargo types should trigger re-randomizing. The cargo types are given as a bitmask of the bits from column 3 (type B) in CargoTypes. &amp;amp;nbsp;If nothing is set (the default), the no random triggers will happen, to conserve CPU time.&lt;br /&gt;
&lt;br /&gt;
With GRF version 7 and above, the interpretation of bits changes. Instead of climate-dependent cargo slot numbers (type B), you have to set the bits of climate-independent cargo ID (type A).&lt;br /&gt;
&lt;br /&gt;
=== Animation information (0E) ===&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;
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/152/159)|callback 140]] 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/153/158)|callback 141]] for that.&lt;br /&gt;
&lt;br /&gt;
=== Animation speed (0F) ===&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 2.&lt;br /&gt;
&lt;br /&gt;
=== Animation triggers (10) ===&lt;br /&gt;
This is a bit mask of events that should trigger [[Callbacks#Animation control (1B/25/140/152/159)|callback 140]], allowing to change the animation state&lt;br /&gt;
&lt;br /&gt;
=== Callback flags (11) ===&lt;br /&gt;
For road stops, the following [[callbacks]] can be defined by setting the corresponding bit in property 0B:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Variable 0C value!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||13||Whether to make the road stop available in construction window (non-zero callback return) or not (callback returns zero)&lt;br /&gt;
|-&lt;br /&gt;
|1||2||141||Decide next animation frame&lt;br /&gt;
|-&lt;br /&gt;
|2||4||142||Decide animation speed&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 [[VariationalAction2|VarAction2]] for callbacks.&lt;br /&gt;
&lt;br /&gt;
=== General Flags (12) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||[[Callbacks#Next animation frame (1A/26/141/153/158)|callback 141]] needs random bits in var. 10&lt;br /&gt;
|-&lt;br /&gt;
|2||4||Do not show catenary graphics&lt;br /&gt;
|-&lt;br /&gt;
|3||8||Only allow drive-through stops (not bay stops)&lt;br /&gt;
|-&lt;br /&gt;
|4||10||Do not automatically build connecting road pieces&lt;br /&gt;
|-&lt;br /&gt;
|5||20||Only show in the road build menu (not tram)&lt;br /&gt;
|-&lt;br /&gt;
|6||40||Only show in the tram build menu (not road)&lt;br /&gt;
|-&lt;br /&gt;
|8||100||{{ottdp|15}} Read the draw mode from register 0x100, overriding the default value in property 0C&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default value is 0 (no bits set).&lt;br /&gt;
&lt;br /&gt;
The remaining bits are reserved for future use.&lt;br /&gt;
&lt;br /&gt;
=== Cost multipiers (15) ===&lt;br /&gt;
&lt;br /&gt;
The first byte is the build cost multiplier.&lt;br /&gt;
&lt;br /&gt;
The second byte is the removal cost multiplier.&lt;br /&gt;
&lt;br /&gt;
The total property length is 2 bytes.&lt;br /&gt;
&lt;br /&gt;
A value of 16 produces a build or removal cost the same as non-NewGRF road stops.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Airport_Tiles&amp;diff=4940</id>
		<title>Action0/Airport Tiles</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Airport_Tiles&amp;diff=4940"/>
		<updated>2025-02-17T14:57:52Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.1|ottdrev=r19204}}&lt;br /&gt;
Airport tiles work like industry tiles and similarly to town buildings, except that they are not stand-alone. This means an airport tile can&#039;t stand alone, it&#039;s always part of an airport.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!!Version!![[GRFActionsDetailed|Size]]!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||{{ottdp|1.1|ottdrev=r19204}}||B||Substitute airport tile type&lt;br /&gt;
|-&lt;br /&gt;
|09||{{ottdp|1.1|ottdrev=r19204}}||B||Airport tile override&lt;br /&gt;
|-&lt;br /&gt;
|0E||{{ottdp|1.1|ottdrev=r19204}}||B||Callback flags&lt;br /&gt;
|-&lt;br /&gt;
|0F||{{ottdp|1.1|ottdrev=r19204}}||W||Animation information&lt;br /&gt;
|-&lt;br /&gt;
|10||{{ottdp|1.1|ottdrev=r19204}}||B||Animation speed.&lt;br /&gt;
|-&lt;br /&gt;
|11||{{ottdp|1.1|ottdrev=r19204}}||B||Animation triggers&lt;br /&gt;
|-&lt;br /&gt;
|12||{{ottdp|15}}||W n*W||List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Substitute tile type (08) ===&lt;br /&gt;
&lt;br /&gt;
This tile type will be used instead of your new one if your definition isn&#039;t available for any reason. Assigning this property copies the properties of the old type just like it does with houses. If this tile&#039;s action 3 appears before this property is set, the action 3 will have no effect.&lt;br /&gt;
&lt;br /&gt;
=== Airport tile override (09) ===&lt;br /&gt;
&lt;br /&gt;
Works like the house override property for houses and industry tiles.&lt;br /&gt;
&lt;br /&gt;
=== Callback flags (0E) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!value!!version!!meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||{{ottdp|1.1|ottdrev=r19204}}||use [[Callbacks#Next animation frame (1A/26/141/153/158) |callback 153]] to decide the next animation frame&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|1.1|ottdrev=r19204}}||use [[Callbacks#Length of animation frame (20/27/142/154/15A) |callback 154]] to decide animation speed&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp}}||(reserved)&lt;br /&gt;
|-&lt;br /&gt;
|3||8||{{ottdp}}||(reserved)&lt;br /&gt;
|-&lt;br /&gt;
|4||10||{{ottdp|1.1|ottdrev=r19204}}||use callback xx to check if a slope is suitable (not yet implemented)&lt;br /&gt;
|-&lt;br /&gt;
|5||20||{{ottdp|1.1|ottdrev=r19204}}||use [[Callbacks#Decide drawing default foundations (30/14E/150) |callback 150]] to decide if default foundations need to be drawn&lt;br /&gt;
|-&lt;br /&gt;
|6||40||{{ottdp|1.1|ottdrev=r19204}}||use callback xx to allow or deny autosloping below the tile (not yet implemented)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Please note that callback 152 doesn&#039;t have a bit here. To use [[Callbacks#Animation control (1B/25/140/152/159) |callback 152]], simply set the wanted bits in property 11 and it will work as intended.&lt;br /&gt;
&lt;br /&gt;
=== Animation information (0F) ===&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 tile (this is the default value).&lt;br /&gt;
&lt;br /&gt;
=== Animation speed (10) ===&lt;br /&gt;
&lt;br /&gt;
The meaning is the same as for 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 2.&lt;br /&gt;
&lt;br /&gt;
=== Animation triggers via [[Callback:_Animation_control |callback 152]] (11) ===&lt;br /&gt;
&lt;br /&gt;
This shares some flags with industry tiles and others with stations. Call [[Callback:_Animation_control|callback 152]] when:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Version!!Meaning!!Var 18&lt;br /&gt;
|-&lt;br /&gt;
|0||1||{{ottdp|1.1|ottdrev=r19204}}||airport was just constructed||&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|1.1|ottdrev=r19204}}||the tile is processed in the periodic processing loop||&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|1.1|ottdrev=r19204}}||new cargo arrives at the station (for all airport tiles the same)||&amp;lt;ref name=&amp;quot;cargotype&amp;quot;&amp;gt;Bits 8..15 of var 18 contain the triggering cargo type. If your GRF has a cargo translation table, the cargo type will be an index in that table, or FFh if the cargo isn&#039;t in the table. If you don&#039;t have a cargo translation table, the cargo type will simply be the climate-dependent cargo type number.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3||8||{{ottdp|1.1|ottdrev=r19204}}||a cargo type gets removed from the station (for all airport tiles the same)||&amp;lt;ref name=&amp;quot;cargotype&amp;quot;/&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4||10||{{ottdp|1.1|ottdrev=r19204}}||every 250 ticks (for all airport tiles the same)||&lt;br /&gt;
|-&lt;br /&gt;
|5||20||{{ottdp|1.9}}||Triggered when an airplane (not a helicopter!) lands at airport (single tile only)||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Tramtypes&amp;diff=4939</id>
		<title>Action0/Tramtypes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Tramtypes&amp;diff=4939"/>
		<updated>2025-02-17T14:57:07Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;Action 0 properties for tram types&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Action 0 - Properties for tram types =&lt;br /&gt;
&lt;br /&gt;
Defining properties of tram types.&lt;br /&gt;
&lt;br /&gt;
Up to 63 tramtypes can be defined.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Number&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Version&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|08&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|4*B&lt;br /&gt;
|Tram type label&lt;br /&gt;
|-&lt;br /&gt;
|09&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Build tram toolbar caption&amp;lt;!--&amp;lt;ref&amp;gt;{{grfTill|7}} For GRF version 7 or earlier, setting property 09 sets property 1B as well.&amp;lt;/ref&amp;gt;--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|0A&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Tram construction dropdown text&lt;br /&gt;
|-&lt;br /&gt;
|0B&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Build vehicle window caption&lt;br /&gt;
|-&lt;br /&gt;
|0C&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Autoreplace text&lt;br /&gt;
|-&lt;br /&gt;
|0D&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: New engine text&lt;br /&gt;
|-&lt;br /&gt;
|0F&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Powered tram type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot;&amp;gt;Tram type labels in this list are &#039;&#039;not&#039;&#039; resolved using the alternate label list.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|B&lt;br /&gt;
|Tram type flags&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|W&lt;br /&gt;
|Construction costs&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|W&lt;br /&gt;
|Speed limit&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|B&lt;br /&gt;
|Minimap colour&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|D&lt;br /&gt;
|Introduction date&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Introduction required tram type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Introduced tram type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1A&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|B&lt;br /&gt;
|Sort order&lt;br /&gt;
|-&lt;br /&gt;
|1B&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Tram type name&amp;lt;!--&amp;lt;ref&amp;gt;{{grfTill|7}} For GRF version 7 or earlier, set property 1B &#039;&#039;after&#039;&#039; setting property 09, as property 09 sets the rail type name as well for backwards compatibility.&amp;lt;/ref&amp;gt;--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1C&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|W&lt;br /&gt;
|Infrastructure maintenance cost factor&lt;br /&gt;
|-&lt;br /&gt;
|1D&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|B n*D&lt;br /&gt;
|Alternate tram type labels that shall be &amp;quot;redirected&amp;quot; to this tram type&lt;br /&gt;
|-&lt;br /&gt;
|1E&lt;br /&gt;
|{{ottdp|15}}&lt;br /&gt;
|W n*W&lt;br /&gt;
|List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In NFO, tram type IDs will be GRF local, with an ID to label mapping. Therefore to modify an existing tram type, specify its label in property 08. To create a new tram 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 tram type.&lt;br /&gt;
&lt;br /&gt;
When a new tram type is created, it is populated with the information from the first tram type, except that the powered list contains only the tram type being created. However, no default values should be assumed, as the first tram type may have been modified.&lt;br /&gt;
&lt;br /&gt;
== Vehicle and Tramtype availability ==&lt;br /&gt;
&lt;br /&gt;
Vehicle and tramtype availability and compatibility is influenced by multiple properties.&lt;br /&gt;
Generally, the vehicle defines which tramtype it is, and the tramtypes define the compatibility between each other.&lt;br /&gt;
* A vehicle exists, if its tramtype (road vehicle prop 05) is defined. Otherwise the vehicle is disabled.&lt;br /&gt;
* When a vehicle is introduced, it always introduces its tramtype (road vehicle prop 05).&lt;br /&gt;
* A tramtype is introduced, if at least one of the following conditions is met:&lt;br /&gt;
** A vehicle is introduced, that references the tramtype (road vehicle prop 05).&lt;br /&gt;
** Another tramtype is introduced, that references the tramtype via the introduced tramtype list (tramtype prop 19).&lt;br /&gt;
** The introduction date (tramtype prop 17) is passed and all required tramtypes (tramtype prop 18) are available.&lt;br /&gt;
&lt;br /&gt;
Via tramtype property 1D multiple tramtypes can be defined, which shall be considered equivalent to a tramtype.&lt;br /&gt;
This affects the interpretation of road vehicle property 05. If road vehicle property 05 references an undefined tramtype, then&lt;br /&gt;
tramtype property 1D is checked for all defined tramtypes, whether the vehicle can be reassigned to some other tramtype.&lt;br /&gt;
Otherwise the vehicle is disabled.&lt;br /&gt;
&lt;br /&gt;
== Tram type label (08) ==&lt;br /&gt;
&lt;br /&gt;
These are globally unique four-letter identifiers for specific tram types (analoguous to [[Action0Cargos#Cargo label 17|cargo labels]]), used to make various tram types accessible from road vehicle grfs. Reserved labels for default tram types are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Label&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Tram Type&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|RAIL &lt;br /&gt;
| Normal Tram&lt;br /&gt;
|-&lt;br /&gt;
|ELRL &lt;br /&gt;
| Electrified Tram&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Tram type sets may use up to 63 tramtypes and have to specify their own [[TramtypeLabels|labels]].&lt;br /&gt;
&lt;br /&gt;
See also [[Action0/Global Settings#Tram type translation table 12|Tram Type Translation Table]] for further info.&lt;br /&gt;
&lt;br /&gt;
== Build tram toolbar caption (09) ==&lt;br /&gt;
&lt;br /&gt;
String ID of the name of the tram type as shown in the toolbar caption.&lt;br /&gt;
&lt;br /&gt;
== Tram construction dropdown text (0A) ==&lt;br /&gt;
&lt;br /&gt;
String ID for text in the dropdown of all tram 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;
== Autoreplace text (0C) ==&lt;br /&gt;
&lt;br /&gt;
String ID for tram 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;quot;We have invented a new &amp;amp;lt;tram type&amp;amp;gt; engine&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Powered tram type list (0F) ==&lt;br /&gt;
&lt;br /&gt;
List of tram types on which road vehicles of this tram type are powered. E.g. vehicles of &amp;quot;normal tram&amp;quot;-type are powered on &amp;quot;electrified tram&amp;quot;- and &amp;quot;haul-tram&amp;quot;-type as well. Note that there is no &amp;quot;compatible tram type list&amp;quot; since there is no difference between &amp;quot;powered&amp;quot; and &amp;quot;compatible&amp;quot; for tramtypes&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;tram 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 tram types in a single byte followed by a list of that length of tram type labels. A tram type is automatically powered with itself, so you don&#039;t need to list the current tram type.&lt;br /&gt;
&lt;br /&gt;
Note that these properties apply to road vehicles of this tram type, not the tram itself. If you want road vehicles of other tram types to be able to run on your tram types, you must set the powered tram types property for each tram type. Setting these properties behaves always incremental, so you only need to the set additional bits for each other tram type, you cannot remove poweredness once it is set (by some other grf).&lt;br /&gt;
&lt;br /&gt;
== Tram type flags (10) ==&lt;br /&gt;
&lt;br /&gt;
Flags to define properties related to the tram type:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Bit&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Draw catenary for this tram type&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Disallow level crossings for this tram type&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4&lt;br /&gt;
|Disallow construction of houses along tramtype&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|8&lt;br /&gt;
|Hide this tram type from construction menu&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|16&lt;br /&gt;
|Enables towns to build tramtype, but towns don&#039;t build trams...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Speed limit (14) ==&lt;br /&gt;
&lt;br /&gt;
Speed limit in mph*0.8 (approx. 0.5km/h). Set to &amp;quot;0&amp;quot; for no limit at all.&lt;br /&gt;
&lt;br /&gt;
== Map colour (16) ==&lt;br /&gt;
&lt;br /&gt;
This property defines the colour this tram 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 tram type. With this property set the tram type will be introduced at (or after) this date when all of the introduction required tram types are available to the company of the player, or whenever a vehicle using this tram type gets introduced whichever is first.&lt;br /&gt;
&lt;br /&gt;
== Introduction required tram type list (18) ==&lt;br /&gt;
&lt;br /&gt;
List of tram types on that need to be available to the company of the player for this tram type to be introduced at (or after) the introduction date. This limit does not apply when the tram type is introduced by the introduction of a vehicle.&lt;br /&gt;
&lt;br /&gt;
Same format as for property 0F above.&lt;br /&gt;
&lt;br /&gt;
This can, for example, be used to introduce a tram type with catenary when both normal tram and electrified tram types are available.&lt;br /&gt;
&lt;br /&gt;
== Introduced tram type list (19) ==&lt;br /&gt;
&lt;br /&gt;
List of tram types that get introduced when this tram type is introduced. For example, to make sure that when a fast tram type is introduced the slow variant exists.&lt;br /&gt;
&lt;br /&gt;
Same format as for property 0F 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 tram types. Default values are as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|07&lt;br /&gt;
|Normal Tram&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|Electrified Tram&lt;br /&gt;
|-&lt;br /&gt;
|n7&lt;br /&gt;
|Tramtype #n&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus the tram 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;br /&gt;
&lt;br /&gt;
== Tram type name (1B) ==&lt;br /&gt;
&lt;br /&gt;
String ID of the name of the tram type.&lt;br /&gt;
&lt;br /&gt;
== Alternate tram type labels (1D) ==&lt;br /&gt;
&lt;br /&gt;
A list of alternate labels that get &amp;quot;redirected&amp;quot; to this tram type when used e.g. as tram type of road vehicle or when testing if a label is defined. The redirection only happens if the alternate label isn&#039;t defined as a real tram type. Same format as for property 0F above.&lt;br /&gt;
&lt;br /&gt;
Alternate labels are not considered when evaluating properties 0F, 18, and 19.&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
&lt;br /&gt;
To be written&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Roadtypes&amp;diff=4938</id>
		<title>Action0/Roadtypes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Roadtypes&amp;diff=4938"/>
		<updated>2025-02-17T14:56:54Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;Action 0 properties for road types&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Action 0 - Properties for road types =&lt;br /&gt;
&lt;br /&gt;
Defining properties of road types.&lt;br /&gt;
&lt;br /&gt;
Up to 63 roadtypes can be defined.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Number&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Version&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|08&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|4*B&lt;br /&gt;
|Road type label&lt;br /&gt;
|-&lt;br /&gt;
|09&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Build road toolbar caption&amp;lt;!--&amp;lt;ref&amp;gt;{{grfTill|7}} For GRF version 7 or earlier, setting property 09 sets property 1B as well.&amp;lt;/ref&amp;gt;--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|0A&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Road construction dropdown text&lt;br /&gt;
|-&lt;br /&gt;
|0B&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Build vehicle window caption&lt;br /&gt;
|-&lt;br /&gt;
|0C&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Autoreplace text&lt;br /&gt;
|-&lt;br /&gt;
|0D&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: New engine text&lt;br /&gt;
|-&lt;br /&gt;
|0F&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Powered road type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot;&amp;gt;Road type labels in this list are &#039;&#039;not&#039;&#039; resolved using the alternate label list.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|B&lt;br /&gt;
|Road type flags&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|W&lt;br /&gt;
|Construction costs&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|W&lt;br /&gt;
|Speed limit&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|B&lt;br /&gt;
|Minimap colour&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|D&lt;br /&gt;
|Introduction date&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Introduction required road type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Introduced road type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1A&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|B&lt;br /&gt;
|Sort order&lt;br /&gt;
|-&lt;br /&gt;
|1B&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Road type name&amp;lt;!--&amp;lt;ref&amp;gt;{{grfTill|7}} For GRF version 7 or earlier, set property 1B &#039;&#039;after&#039;&#039; setting property 09, as property 09 sets the rail type name as well for backwards compatibility.&amp;lt;/ref&amp;gt;--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1C&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|W&lt;br /&gt;
|Infrastructure maintenance cost factor&lt;br /&gt;
|-&lt;br /&gt;
|1D&lt;br /&gt;
|{{ottdp|1.10}}&lt;br /&gt;
|B n*D&lt;br /&gt;
|Alternate road type labels that shall be &amp;quot;redirected&amp;quot; to this road type&lt;br /&gt;
|-&lt;br /&gt;
|1E&lt;br /&gt;
|{{ottdp|15}}&lt;br /&gt;
|W n*W&lt;br /&gt;
|List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In NFO, road type IDs will be GRF local, with an ID to label mapping. Therefore to modify an existing road type, specify its label in property 08. To create a new road 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 road type.&lt;br /&gt;
&lt;br /&gt;
When a new road type is created, it is populated with the information from the first road type, except that the powered list contains only the road type being created. However, no default values should be assumed, as the first road type may have been modified.&lt;br /&gt;
&lt;br /&gt;
== Vehicle and Roadtype availability ==&lt;br /&gt;
&lt;br /&gt;
Vehicle and roadtype availability and compatibility is influenced by multiple properties.&lt;br /&gt;
Generally, the vehicle defines which roadtype it is, and the roadtypes define the compatibility between each other.&lt;br /&gt;
* A vehicle exists, if its roadtype (road vehicle prop 05) is defined. Otherwise the vehicle is disabled.&lt;br /&gt;
* When a vehicle is introduced, it always introduces its roadtype (road vehicle prop 05).&lt;br /&gt;
* A roadtype is introduced, if at least one of the following conditions is met:&lt;br /&gt;
** A vehicle is introduced, that references the roadtype (road vehicle prop 05).&lt;br /&gt;
** Another roadtype is introduced, that references the roadtype via the introduced roadtype list (roadtype prop 19).&lt;br /&gt;
** The introduction date (roadtype prop 17) is passed and all required roadtypes (roadtype prop 18) are available.&lt;br /&gt;
&lt;br /&gt;
Via roadtype property 1D multiple roadtypes can be defined, which shall be considered equivalent to a roadtype.&lt;br /&gt;
This affects the interpretation of road vehicle property 05. If road vehicle property 05 references an undefined roadtype, then&lt;br /&gt;
roadtype property 1D is checked for all defined roadtypes, whether the vehicle can be reassigned to some other roadtype.&lt;br /&gt;
Otherwise the vehicle is disabled.&lt;br /&gt;
&lt;br /&gt;
== Road type label (08) ==&lt;br /&gt;
&lt;br /&gt;
These are globally unique four-letter identifiers for specific road types (analoguous to [[Action0Cargos#Cargo label 17|cargo labels]]), used to make various road types accessible from road vehicle grfs. Reserved labels for default road types are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Label&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Road Type&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|ROAD &lt;br /&gt;
| Normal Road&lt;br /&gt;
|-&lt;br /&gt;
|ELRD &lt;br /&gt;
| Electrified Road&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Road type sets may use up to 63 roadtypes and have to specify their own [[RoadtypeLabels|labels]].&lt;br /&gt;
&lt;br /&gt;
See also [[Action0/Global Settings#Road type translation table 12|Road Type Translation Table]] for further info.&lt;br /&gt;
&lt;br /&gt;
== Build road toolbar caption (09) ==&lt;br /&gt;
&lt;br /&gt;
String ID of the name of the road type as shown in the toolbar caption.&lt;br /&gt;
&lt;br /&gt;
== Road construction dropdown text (0A) ==&lt;br /&gt;
&lt;br /&gt;
String ID for text in the dropdown of all road 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;
== Autoreplace text (0C) ==&lt;br /&gt;
&lt;br /&gt;
String ID for road 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;quot;We have invented a new &amp;amp;lt;road type&amp;amp;gt; engine&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Powered road type list (0F) ==&lt;br /&gt;
&lt;br /&gt;
List of road types on which road vehicles of this road type are powered. E.g. vehicles of &amp;quot;normal road&amp;quot;-type are powered on &amp;quot;electrified road&amp;quot;- and &amp;quot;haul-road&amp;quot;-type as well. Note that there is no &amp;quot;compatible road type list&amp;quot; since there is no difference between &amp;quot;powered&amp;quot; and &amp;quot;compatible&amp;quot; for roadtypes&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;road 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 road types in a single byte followed by a list of that length of road type labels. A road type is automatically powered with itself, so you don&#039;t need to list the current road type.&lt;br /&gt;
&lt;br /&gt;
Note that these properties apply to road vehicles of this road type, not the road itself. If you want road vehicles of other road types to be able to run on your road types, you must set the powered road types property for each road type. Setting these properties behaves always incremental, so you only need to the set additional bits for each other road type, you cannot remove poweredness once it is set (by some other grf).&lt;br /&gt;
&lt;br /&gt;
== Road type flags (10) ==&lt;br /&gt;
&lt;br /&gt;
Flags to define properties related to the road type:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Bit&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Draw catenary for this road type&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Disallow level crossings for this road type&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4&lt;br /&gt;
|Disallow construction of houses along roadtype&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|8&lt;br /&gt;
|Hide this road type from construction menu&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|16&lt;br /&gt;
|Enables road type to be built by towns, picked by highest speed limit (defaults to ROAD label if no speed limits?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Speed limit (14) ==&lt;br /&gt;
&lt;br /&gt;
Speed limit in mph*0.8 (approx. 0.5km/h). Set to &amp;quot;0&amp;quot; for no limit at all.&lt;br /&gt;
&lt;br /&gt;
== Map colour (16) ==&lt;br /&gt;
&lt;br /&gt;
This property defines the colour this road 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 road type. With this property set the road type will be introduced at (or after) this date when all of the introduction required road types are available to the company of the player, or whenever a vehicle using this road type gets introduced whichever is first.&lt;br /&gt;
&lt;br /&gt;
== Introduction required road type list (18) ==&lt;br /&gt;
&lt;br /&gt;
List of road types on that need to be available to the company of the player for this road type to be introduced at (or after) the introduction date. This limit does not apply when the road type is introduced by the introduction of a vehicle.&lt;br /&gt;
&lt;br /&gt;
Same format as for property 0F above.&lt;br /&gt;
&lt;br /&gt;
This can, for example, be used to introduce a road type with streetlights when both paved road and electrified road types are available.&lt;br /&gt;
&lt;br /&gt;
== Introduced road type list (19) ==&lt;br /&gt;
&lt;br /&gt;
List of road types that get introduced when this road type is introduced. For example, to make sure that when a fast road type is introduced the slow variant exists.&lt;br /&gt;
&lt;br /&gt;
Same format as for property 0F 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 road types. Default values are as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|07&lt;br /&gt;
|Normal Road&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|Electrified Road&lt;br /&gt;
|-&lt;br /&gt;
|n7&lt;br /&gt;
|Roadtype #n&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus the road 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;br /&gt;
&lt;br /&gt;
== Road type name (1B) ==&lt;br /&gt;
&lt;br /&gt;
String ID of the name of the road type.&lt;br /&gt;
&lt;br /&gt;
== Alternate road type labels (1D) ==&lt;br /&gt;
&lt;br /&gt;
A list of alternate labels that get &amp;quot;redirected&amp;quot; to this road type when used e.g. as road type of road vehicle or when testing if a label is defined. The redirection only happens if the alternate label isn&#039;t defined as a real road type. Same format as for property 0F above.&lt;br /&gt;
&lt;br /&gt;
Alternate labels are not considered when evaluating properties 0F, 18, and 19.&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
&lt;br /&gt;
To be written&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Railtypes&amp;diff=4937</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=4937"/>
		<updated>2025-02-17T14:56:36Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;
{{ottdp|1.0|no|ottdrev=r18969}} 16 railtypes can be defined.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=bf8d7df7}} 64 railtypes can be defined.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Number&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Version&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|08&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|4*B&lt;br /&gt;
|Rail type label&lt;br /&gt;
|-&lt;br /&gt;
|09&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Build rail toolbar caption&amp;lt;ref&amp;gt;{{grfTill|7}} For GRF version 7 or earlier, setting property 09 sets property 1B as well.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|0A&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Rail construction dropdown text&lt;br /&gt;
|-&lt;br /&gt;
|0B&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Build vehicle window caption&lt;br /&gt;
|-&lt;br /&gt;
|0C&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Autoreplace text&lt;br /&gt;
|-&lt;br /&gt;
|0D&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: New engine text&lt;br /&gt;
|-&lt;br /&gt;
|0E&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Compatible rail type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot;&amp;gt;Rail type labels in this list are &#039;&#039;not&#039;&#039; resolved using the alternate label list.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|0F&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Powered rail type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B&lt;br /&gt;
|Rail type flags&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B&lt;br /&gt;
|Curve speed advantage multiplier&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B&lt;br /&gt;
|Station (and depot) graphics&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W &amp;lt;ref&amp;gt;In r18969 to 19306 this property was byte-sized.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|Construction costs&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|Speed limit&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B&lt;br /&gt;
|Acceleration model&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|{{ottdp|1.0|no|ottdrev=r19307}}&lt;br /&gt;
|B&lt;br /&gt;
|Minimap colour&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|{{ottdp|1.1|no|ottdrev=r21842}}&lt;br /&gt;
|D&lt;br /&gt;
|Introduction date&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|{{ottdp|1.1|no|ottdrev=r21842}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Introduction required rail type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|{{ottdp|1.1|no|ottdrev=r21841}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Introduced rail type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1A&lt;br /&gt;
|{{ottdp|1.1|no|ottdrev=r21866}}&lt;br /&gt;
|B&lt;br /&gt;
|Sort order&lt;br /&gt;
|-&lt;br /&gt;
|1B&lt;br /&gt;
|{{ottdp|1.2|no|ottdrev=r23129}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Rail type name&amp;lt;ref&amp;gt;{{grfTill|7}} For GRF version 7 or earlier, set property 1B &#039;&#039;after&#039;&#039; setting property 09, as property 09 sets the rail type name as well for backwards compatibility.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1C&lt;br /&gt;
|{{ottdp|1.2|no|ottdrev=r23415}}&lt;br /&gt;
|W&lt;br /&gt;
|Infrastructure maintenance cost factor&lt;br /&gt;
|-&lt;br /&gt;
|1D&lt;br /&gt;
|{{ottdp|1.2|no|ottdrev=r23758}}&lt;br /&gt;
|B n*D&lt;br /&gt;
|Alternate rail type labels that shall be &amp;quot;redirected&amp;quot; to this rail type&lt;br /&gt;
|-&lt;br /&gt;
|1E&lt;br /&gt;
|{{ottdp|15}}&lt;br /&gt;
|W n*W&lt;br /&gt;
|List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&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;
== Vehicle and Railtype availability ==&lt;br /&gt;
&lt;br /&gt;
Vehicle and railtype availability and compatibility is influenced by multiple properties.&lt;br /&gt;
Generally, the vehicle defines which railtype it is, and the railtypes define the compatibility between each other.&lt;br /&gt;
* A vehicle exists, if its railtype (train prop 05) is defined. Otherwise the vehicle is disabled.&lt;br /&gt;
* When a vehicle is introduced, it always introduces its railtype (train prop 05).&lt;br /&gt;
* A railtype is introduced, if at least one of the following conditions is met:&lt;br /&gt;
** A vehicle is introduced, that references the railtype (train prop 05).&lt;br /&gt;
** Another railtype is introduced, that references the railtype via the introduced railtype list (railtype prop 19).&lt;br /&gt;
** The introduction date (railtype prop 17) is passed and all required railtypes (railtype prop 18) are available.&lt;br /&gt;
&lt;br /&gt;
Via railtype property 1D multiple railtypes can be defined, which shall be considered equivalent to a railtype.&lt;br /&gt;
This affects the interpretation of train property 05. If train property 05 references an undefined railtype, then&lt;br /&gt;
railtype property 1D is checked for all defined railtypes, whether the vehicle can be reassigned to some other railtype.&lt;br /&gt;
Otherwise the vehicle is disabled.&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;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Label&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Rail Type&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|RAIL &lt;br /&gt;
| Normal Rail&lt;br /&gt;
|-&lt;br /&gt;
|ELRL &lt;br /&gt;
| Electrified Rail&lt;br /&gt;
|-&lt;br /&gt;
|MONO &lt;br /&gt;
| Mono Rail&lt;br /&gt;
|-&lt;br /&gt;
|MGLV &lt;br /&gt;
| Maglev Rail&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.0|no|ottdrev=r18969}} 16 railtypes can be defined.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=bf8d7df7}} 64 railtypes can be defined.&lt;br /&gt;
&lt;br /&gt;
Rail type sets may use up to 64 railtypes and have to specify their own [[RailtypeLabels|labels]].&lt;br /&gt;
&lt;br /&gt;
See also [[Action0/Global Settings#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;
{{grfTill|7}} {{ottd|1.2|ottdrev=r23129}} For backwards compatibility, setting this property sets the rail type name (property 1B) to this string as well for GRF versions 7 or below.&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;quot;We have invented a new &amp;amp;lt;rail type&amp;amp;gt; engine&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;quot;eletrified rail&amp;quot;-type are also compatible to &amp;quot;normal rail&amp;quot; and &amp;quot;third rail&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 &lt;br /&gt;
other rail type, you cannot remove compatibility/poweredness once it is set (by some other grf).&lt;br /&gt;
&lt;br /&gt;
Note that when routing trains, the compatibility is only evaluated for the lead engine of a consist.  This means that trains will run on incompatible rail types if they are in a consist where the lead engine is compatible with the rail type. This applies to both engines and wagons.&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;quot;normal rail&amp;quot;-type are powered on &amp;quot;electrified rail&amp;quot;- and &amp;quot;third-rail&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;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Bit&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Version&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
||{{ottdp|1.0}}&lt;br /&gt;
|Draw catenary for this rail type&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
||{{ottdp|1.1|no|ottdrev=r20049}}&lt;br /&gt;
|Disallow level crossings for this rail type&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4&lt;br /&gt;
||{{ottdp|1.9|no|ottdrev=e3b440c9c5}}&lt;br /&gt;
|Hide this rail type from construction menu&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|8&lt;br /&gt;
||{{ottdp|1.10|no|ottdrev=g42046af933}}&lt;br /&gt;
|Enable use of precombined overlay sprites&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|16&lt;br /&gt;
||{{ottdp|1.10|no|ottdrev=gcc5f175615}}&lt;br /&gt;
|Always allow 90 degree turns&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|32&lt;br /&gt;
||{{ottdp|1.10|no|ottdrev=gcc5f175615}}&lt;br /&gt;
|Always prohibit 90 degree turns (takes precedence over bit 4)&lt;br /&gt;
|}&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;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Curve Length&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Base Speed Adv.&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0 (90° turn) &lt;br /&gt;
|30&lt;br /&gt;
|-&lt;br /&gt;
|1 (2x45° turn) &lt;br /&gt;
|44&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| 55&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
| 66&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| 75&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
| 84&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
| 91&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
| 98&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
| 103&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
| 108&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
| 111&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
| 114&lt;br /&gt;
|-&lt;br /&gt;
|12+&lt;br /&gt;
| 115&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Curve length&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;quot;base speed advantage&amp;quot; * (2 + &amp;quot;property 11&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 (and depot) graphics (12) ==&lt;br /&gt;
&lt;br /&gt;
This property defines the default graphics for the stations. If no depot sprites are defined, this also defines at the same time the depot sprites to be used. There are three kind of default stations (and depots), usually associated with rail, monorail and maglev tracks. Valid values are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|Normal Rail&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Monorail&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Maglev&lt;br /&gt;
|}&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;quot;0&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;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|Normal Rail&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Monorail&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Maglev&lt;br /&gt;
|}&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;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|07&lt;br /&gt;
|Normal Rail&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|Electrified Rail&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|Monorail&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
|Maglev&lt;br /&gt;
|-&lt;br /&gt;
|n7&lt;br /&gt;
|Railtype #n&lt;br /&gt;
|}&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;br /&gt;
&lt;br /&gt;
== Rail type name (1B) ==&lt;br /&gt;
&lt;br /&gt;
String ID of the name of the rail type.&lt;br /&gt;
&lt;br /&gt;
{{grfTill|7}} For GRF versions 7 or earlier, set property 1B &#039;&#039;after&#039;&#039; setting property 09, as property 09 sets the rail type name as well for backwards compatibility.&lt;br /&gt;
&lt;br /&gt;
== Alternate rail type labels (1D) ==&lt;br /&gt;
&lt;br /&gt;
A list of alternate labels that get &amp;quot;redirected&amp;quot; to this rail type when used e.g. as track type of train or when testing if a label is defined. The redirection only happens if the alternate label isn&#039;t defined as a real rail type. Same format as for property 0E above.&lt;br /&gt;
&lt;br /&gt;
Alternate labels are not considered when evaluating properties 0E, 0F, 18, and 19.&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
&lt;br /&gt;
To be written&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Railtypes&amp;diff=4936</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=4936"/>
		<updated>2025-02-17T14:56:08Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;
{{ottdp|1.0|no|ottdrev=r18969}} 16 railtypes can be defined.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=bf8d7df7}} 64 railtypes can be defined.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Number&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Version&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|08&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|4*B&lt;br /&gt;
|Rail type label&lt;br /&gt;
|-&lt;br /&gt;
|09&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Build rail toolbar caption&amp;lt;ref&amp;gt;{{grfTill|7}} For GRF version 7 or earlier, setting property 09 sets property 1B as well.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|0A&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Rail construction dropdown text&lt;br /&gt;
|-&lt;br /&gt;
|0B&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Build vehicle window caption&lt;br /&gt;
|-&lt;br /&gt;
|0C&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Autoreplace text&lt;br /&gt;
|-&lt;br /&gt;
|0D&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: New engine text&lt;br /&gt;
|-&lt;br /&gt;
|0E&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Compatible rail type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot;&amp;gt;Rail type labels in this list are &#039;&#039;not&#039;&#039; resolved using the alternate label list.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|0F&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Powered rail type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B&lt;br /&gt;
|Rail type flags&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B&lt;br /&gt;
|Curve speed advantage multiplier&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B&lt;br /&gt;
|Station (and depot) graphics&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W &amp;lt;ref&amp;gt;In r18969 to 19306 this property was byte-sized.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|Construction costs&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|Speed limit&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B&lt;br /&gt;
|Acceleration model&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|{{ottdp|1.0|no|ottdrev=r19307}}&lt;br /&gt;
|B&lt;br /&gt;
|Minimap colour&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|{{ottdp|1.1|no|ottdrev=r21842}}&lt;br /&gt;
|D&lt;br /&gt;
|Introduction date&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|{{ottdp|1.1|no|ottdrev=r21842}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Introduction required rail type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|{{ottdp|1.1|no|ottdrev=r21841}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Introduced rail type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1A&lt;br /&gt;
|{{ottdp|1.1|no|ottdrev=r21866}}&lt;br /&gt;
|B&lt;br /&gt;
|Sort order&lt;br /&gt;
|-&lt;br /&gt;
|1B&lt;br /&gt;
|{{ottdp|1.2|no|ottdrev=r23129}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Rail type name&amp;lt;ref&amp;gt;{{grfTill|7}} For GRF version 7 or earlier, set property 1B &#039;&#039;after&#039;&#039; setting property 09, as property 09 sets the rail type name as well for backwards compatibility.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1C&lt;br /&gt;
|{{ottdp|1.2|no|ottdrev=r23415}}&lt;br /&gt;
|W&lt;br /&gt;
|Infrastructure maintenance cost factor&lt;br /&gt;
|-&lt;br /&gt;
|1D&lt;br /&gt;
|{{ottdp|1.2|no|ottdrev=r23758}}&lt;br /&gt;
|B n*D&lt;br /&gt;
|Alternate rail type labels that shall be &amp;quot;redirected&amp;quot; to this rail type&lt;br /&gt;
|-&lt;br /&gt;
|1E||W n*W||{{ottdp|15}}||List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&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;
== Vehicle and Railtype availability ==&lt;br /&gt;
&lt;br /&gt;
Vehicle and railtype availability and compatibility is influenced by multiple properties.&lt;br /&gt;
Generally, the vehicle defines which railtype it is, and the railtypes define the compatibility between each other.&lt;br /&gt;
* A vehicle exists, if its railtype (train prop 05) is defined. Otherwise the vehicle is disabled.&lt;br /&gt;
* When a vehicle is introduced, it always introduces its railtype (train prop 05).&lt;br /&gt;
* A railtype is introduced, if at least one of the following conditions is met:&lt;br /&gt;
** A vehicle is introduced, that references the railtype (train prop 05).&lt;br /&gt;
** Another railtype is introduced, that references the railtype via the introduced railtype list (railtype prop 19).&lt;br /&gt;
** The introduction date (railtype prop 17) is passed and all required railtypes (railtype prop 18) are available.&lt;br /&gt;
&lt;br /&gt;
Via railtype property 1D multiple railtypes can be defined, which shall be considered equivalent to a railtype.&lt;br /&gt;
This affects the interpretation of train property 05. If train property 05 references an undefined railtype, then&lt;br /&gt;
railtype property 1D is checked for all defined railtypes, whether the vehicle can be reassigned to some other railtype.&lt;br /&gt;
Otherwise the vehicle is disabled.&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;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Label&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Rail Type&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|RAIL &lt;br /&gt;
| Normal Rail&lt;br /&gt;
|-&lt;br /&gt;
|ELRL &lt;br /&gt;
| Electrified Rail&lt;br /&gt;
|-&lt;br /&gt;
|MONO &lt;br /&gt;
| Mono Rail&lt;br /&gt;
|-&lt;br /&gt;
|MGLV &lt;br /&gt;
| Maglev Rail&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.0|no|ottdrev=r18969}} 16 railtypes can be defined.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=bf8d7df7}} 64 railtypes can be defined.&lt;br /&gt;
&lt;br /&gt;
Rail type sets may use up to 64 railtypes and have to specify their own [[RailtypeLabels|labels]].&lt;br /&gt;
&lt;br /&gt;
See also [[Action0/Global Settings#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;
{{grfTill|7}} {{ottd|1.2|ottdrev=r23129}} For backwards compatibility, setting this property sets the rail type name (property 1B) to this string as well for GRF versions 7 or below.&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;quot;We have invented a new &amp;amp;lt;rail type&amp;amp;gt; engine&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;quot;eletrified rail&amp;quot;-type are also compatible to &amp;quot;normal rail&amp;quot; and &amp;quot;third rail&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 &lt;br /&gt;
other rail type, you cannot remove compatibility/poweredness once it is set (by some other grf).&lt;br /&gt;
&lt;br /&gt;
Note that when routing trains, the compatibility is only evaluated for the lead engine of a consist.  This means that trains will run on incompatible rail types if they are in a consist where the lead engine is compatible with the rail type. This applies to both engines and wagons.&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;quot;normal rail&amp;quot;-type are powered on &amp;quot;electrified rail&amp;quot;- and &amp;quot;third-rail&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;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Bit&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Version&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
||{{ottdp|1.0}}&lt;br /&gt;
|Draw catenary for this rail type&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
||{{ottdp|1.1|no|ottdrev=r20049}}&lt;br /&gt;
|Disallow level crossings for this rail type&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4&lt;br /&gt;
||{{ottdp|1.9|no|ottdrev=e3b440c9c5}}&lt;br /&gt;
|Hide this rail type from construction menu&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|8&lt;br /&gt;
||{{ottdp|1.10|no|ottdrev=g42046af933}}&lt;br /&gt;
|Enable use of precombined overlay sprites&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|16&lt;br /&gt;
||{{ottdp|1.10|no|ottdrev=gcc5f175615}}&lt;br /&gt;
|Always allow 90 degree turns&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|32&lt;br /&gt;
||{{ottdp|1.10|no|ottdrev=gcc5f175615}}&lt;br /&gt;
|Always prohibit 90 degree turns (takes precedence over bit 4)&lt;br /&gt;
|}&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;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Curve Length&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Base Speed Adv.&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0 (90° turn) &lt;br /&gt;
|30&lt;br /&gt;
|-&lt;br /&gt;
|1 (2x45° turn) &lt;br /&gt;
|44&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| 55&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
| 66&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| 75&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
| 84&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
| 91&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
| 98&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
| 103&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
| 108&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
| 111&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
| 114&lt;br /&gt;
|-&lt;br /&gt;
|12+&lt;br /&gt;
| 115&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Curve length&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;quot;base speed advantage&amp;quot; * (2 + &amp;quot;property 11&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 (and depot) graphics (12) ==&lt;br /&gt;
&lt;br /&gt;
This property defines the default graphics for the stations. If no depot sprites are defined, this also defines at the same time the depot sprites to be used. There are three kind of default stations (and depots), usually associated with rail, monorail and maglev tracks. Valid values are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|Normal Rail&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Monorail&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Maglev&lt;br /&gt;
|}&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;quot;0&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;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|Normal Rail&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Monorail&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Maglev&lt;br /&gt;
|}&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;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|07&lt;br /&gt;
|Normal Rail&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|Electrified Rail&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|Monorail&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
|Maglev&lt;br /&gt;
|-&lt;br /&gt;
|n7&lt;br /&gt;
|Railtype #n&lt;br /&gt;
|}&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;br /&gt;
&lt;br /&gt;
== Rail type name (1B) ==&lt;br /&gt;
&lt;br /&gt;
String ID of the name of the rail type.&lt;br /&gt;
&lt;br /&gt;
{{grfTill|7}} For GRF versions 7 or earlier, set property 1B &#039;&#039;after&#039;&#039; setting property 09, as property 09 sets the rail type name as well for backwards compatibility.&lt;br /&gt;
&lt;br /&gt;
== Alternate rail type labels (1D) ==&lt;br /&gt;
&lt;br /&gt;
A list of alternate labels that get &amp;quot;redirected&amp;quot; to this rail type when used e.g. as track type of train or when testing if a label is defined. The redirection only happens if the alternate label isn&#039;t defined as a real rail type. Same format as for property 0E above.&lt;br /&gt;
&lt;br /&gt;
Alternate labels are not considered when evaluating properties 0E, 0F, 18, and 19.&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
&lt;br /&gt;
To be written&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Objects&amp;diff=4935</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=4935"/>
		<updated>2025-02-17T14:55:49Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Defining properties of new objects.&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. &lt;br /&gt;
&lt;br /&gt;
OpenTTD supports 64000 object types per game, and 255 object IDs per grf file.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|14.0|no}} 64000 object IDs per grf file are supported since OpenTTD 14.0.&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!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||D||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Class label, see below&lt;br /&gt;
|-&lt;br /&gt;
|09||W||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Text ID for class&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Text ID for this object&lt;br /&gt;
|-&lt;br /&gt;
|0B||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||[[Action0General#Climate availability|Climate availability]]&lt;br /&gt;
|-&lt;br /&gt;
|0C||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Byte representing size, see below&lt;br /&gt;
|-&lt;br /&gt;
|0D||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Object build cost factor (sets object removal cost factor as well)&lt;br /&gt;
|-&lt;br /&gt;
|0E||D||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Introduction date, see below&lt;br /&gt;
|-&lt;br /&gt;
|0F||D||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||End of life date, see below&lt;br /&gt;
|-&lt;br /&gt;
|10||W||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Object flags, see below&lt;br /&gt;
|-&lt;br /&gt;
|11||W||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Animation information&lt;br /&gt;
|-&lt;br /&gt;
|12||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Animation speed&lt;br /&gt;
|-&lt;br /&gt;
|13||W||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Animation triggers&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Object removal cost factor (set after object build cost factor)&lt;br /&gt;
|-&lt;br /&gt;
|15||W||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Callback flags, see below&lt;br /&gt;
|-&lt;br /&gt;
|16||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Height of the building&lt;br /&gt;
|-&lt;br /&gt;
|17||B||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Number of object views&lt;br /&gt;
|-&lt;br /&gt;
|18||B||{{ottdp|1.4|no|ottdrev=r25879}}||Measure for number of objects placed upon map creation&lt;br /&gt;
|-&lt;br /&gt;
|19||W n*W||{{ottdp|15}}||List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Check [http://pics.lakie.net/newObject-ActionStructure.png Lakie&#039;s Graphical Representation of the newObject Specifications]&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Object class (08) ===&lt;br /&gt;
&lt;br /&gt;
Class labels are unique identifiers composed of the letters A-Z and/or the numbers 0-9, &amp;amp;nbsp;analoguous to [[Action0Stations#Station class (08)|station class labels]].&lt;br /&gt;
&lt;br /&gt;
Their main use is to combine objects into classes and make them available by the top dropdown list in the object construction window.&lt;br /&gt;
&lt;br /&gt;
Unlike for stations, there is no default class for objects. Set authors have to specify their [[ObjectLabels|own labels]], although it is strongly recommended to follow a general scheme to try to avoid confusion.&lt;br /&gt;
&lt;br /&gt;
Class IDs must be set before any other property.&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;
{|&lt;br /&gt;
!Bit!!Value!!Version!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Only Available in the scenario editor&amp;lt;ref name=&amp;quot;incompatible&amp;quot;&amp;gt;Note that bits 0 and 7 are incompatible and setting both will make an object completely unavailable.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Irremovable&amp;lt;ref&amp;gt;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).&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Anything Can Remove (owned land behaviour)&lt;br /&gt;
|-&lt;br /&gt;
|3||8||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Allow construction of the object on water&lt;br /&gt;
|-&lt;br /&gt;
|4||16||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Removal cost is actually income (owned land behaviour)&lt;br /&gt;
|-&lt;br /&gt;
|5||32||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Do not display foundations if on a slope&lt;br /&gt;
|-&lt;br /&gt;
|6||64||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Object has animation&amp;lt;ref&amp;gt;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;quot;built tile&amp;quot; trigger and callback 159.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|7||128||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Only available during game play&amp;lt;ref name=&amp;quot;incompatible&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|8||256||{{ottdp|1.1|2.6|ottdrev=r20670|ttdprev=r2340}}||Allows 2cc mapping for objects instead of the default 1cc&lt;br /&gt;
|-&lt;br /&gt;
|9||512||{{ottdp|1.1|2.6|ttdprev=r2331}}||Disallows construction on land (also has bit 3 behaviour)&lt;br /&gt;
|-&lt;br /&gt;
|10||1024||{{ottdp|1.1|2.6|ttdprev=r2331}}||Draws the water under the object&amp;lt;ref&amp;gt;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).&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|11||2048||{{ottdp|1.1|no|ottdrev=r21455}}||Allow bridge over the object taking the building height into account&lt;br /&gt;
|-&lt;br /&gt;
|12||4096||{{ottdp|1.1|2.6|ottdrev=r21455|ttdprev=r2360}}||Random bits in the &amp;quot;next animation frame&amp;quot; callback&lt;br /&gt;
|-&lt;br /&gt;
|13||8192||{{ottdp|1.4|no|ottdrev=r25878}}||Scale amount of objects placed on map generation not by map area, but roughly by the length of the coastline&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&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/152/159)|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/153/158)|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/152/159)|callback 159]], allowing to change the animation state&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Bit!!Value!!Meaning!!Happens on!!Var 18&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;
Currently no trigger provides additional information in var 18. &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]] can be defined by setting the corresponding bit in property 15:&lt;br /&gt;
&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;
&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;
{{ottdp|1.1|no|ottdrev=r21455}} 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;quot;value of property 16&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;br /&gt;
&lt;br /&gt;
=== Number of views (17) ===&lt;br /&gt;
&lt;br /&gt;
Objects may have &amp;quot;views&amp;quot;, i.e. different graphical representations, e.g. used to show rotated views of an object. Number of views may be 1, 2, or 4. Default value is 1.&lt;br /&gt;
&lt;br /&gt;
For non-square objects, x and y sizes are swapped for odd views. I.e., giving an object size of 1*2 (x = 1, y = 2), it will be displayed as 1*2 for num = &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;0,2] (x-direction) but as 2*1 for num = &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;1,3] (y-direction).&lt;br /&gt;
&lt;br /&gt;
Use object varaction2 var48 to access particular views of an object.&lt;br /&gt;
==Examples==&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Airports&amp;diff=4934</id>
		<title>Action0/Airports</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Airports&amp;diff=4934"/>
		<updated>2025-02-17T14:55:32Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Airports work similarly to industries and town buildings. The maximum number of possible airports is 128. All (even overridden) original types count towards this limit.&lt;br /&gt;
&lt;br /&gt;
Defining airports follows the same schema as industries do: to start using an ID, you first need to define it by setting property 8 or 9 for it. If you try to reference an ID (either via action0 or via action3) that isn&#039;t defined, your request is ignored, but not reported as an error, either. This means that if you want to conditionally define an ID, all you need to do is skipping the action0 that sets property8/property9, and everything else gets skipped automatically.&lt;br /&gt;
&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|1.1|no|ottdrev=r19459}}||Airport type override&lt;br /&gt;
|-&lt;br /&gt;
|0A||V||{{ottdp|1.1|no|ottdrev=r20377}}||Set airport layout(s)&lt;br /&gt;
|-&lt;br /&gt;
|0C||2*W||{{ottdp|1.1|no|ottdrev=r19459}}||Availability years&lt;br /&gt;
|-&lt;br /&gt;
|0D||B||{{ottdp|1.1|no|ottdrev=r19459}}||Best compatible TTD airport type&lt;br /&gt;
|-&lt;br /&gt;
|0E||B||{{ottdp|1.1|no|ottdrev=r19459}}||Catchment area&lt;br /&gt;
|-&lt;br /&gt;
|0F||B||{{ottdp|1.1|no|ottdrev=r19459}}||Noise level&lt;br /&gt;
|-&lt;br /&gt;
|10||W||{{ottdp|1.1|no|ottdrev=r19459}}||TextID to be used as airport name&lt;br /&gt;
|-&lt;br /&gt;
|11||W||{{ottdp|1.2|no|ottdrev=r23415}}||Infrastructure maintenance cost factor&lt;br /&gt;
|-&lt;br /&gt;
|12||W n*W||{{ottdp|15}}||List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Descriptions==&lt;br /&gt;
&lt;br /&gt;
===Airport type override (08)===&lt;br /&gt;
&lt;br /&gt;
Works as both substitute type and override. The assignment of this property copies all properties of the old type to this new type. List of valid types: [[AirportTypes]]&lt;br /&gt;
&lt;br /&gt;
There&#039;s a special use of this property: if you set it to FFh, you can disable an original airport. In this case, the ID used must be the number of airport you want to disable. Disable requests are ignored for airports that have already been overridden.&lt;br /&gt;
&lt;br /&gt;
===Set airportlayout(s) (0A)===&lt;br /&gt;
&lt;br /&gt;
Format of airport layout tables:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Variable!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||numlayouts||The total number of layouts following&lt;br /&gt;
|-&lt;br /&gt;
|D||size||The size in bytes of the whole definition, excluding numlayouts and size&lt;br /&gt;
|-&lt;br /&gt;
|V||layouts||numlayout layouts, see format below&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Format of an airport layout:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Variable!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||xoffs&lt;br /&gt;
|-&lt;br /&gt;
|B||yoffs||Offsets counted from the northernmost tile of the airport, specifying the position of the current tile. Both are taken as signed integers, but cannot go negative except the special case mentioned below.&lt;br /&gt;
|-&lt;br /&gt;
|B||oldtile||An old tile type to be put on the given tile&lt;br /&gt;
|-&lt;br /&gt;
|||--or--||&lt;br /&gt;
|-&lt;br /&gt;
|0xFE,W||newtile||The ID of an already defined airport tile, padded with 0 to create a word value. This tile type will be placed on the given tile.&lt;br /&gt;
|-&lt;br /&gt;
|||--or--||&lt;br /&gt;
|-&lt;br /&gt;
|0xFF|| ||The given tile is checked for clearance, but nothing will be placed on it. Useful to ensure some free space around your airport. This is the only case where xoffs and yoffs can be negative. If xoffs is negative, yoffs must be one lower than the wanted value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The layout consists of a single byte giving the rotation of the layout (0: north, 2: east, 4: south, 6: west) followed by a list of the above tile definitions, terminated by two bytes: 0,80h&lt;br /&gt;
&lt;br /&gt;
===Availability years (0C)===&lt;br /&gt;
&lt;br /&gt;
First year and last year the airport is available. 0 and FFFF respectively are forever.&lt;br /&gt;
&lt;br /&gt;
===Best compatible TTD airport type (0D)===&lt;br /&gt;
&lt;br /&gt;
Used for compatibility with [[VariationalAction2/Vehicles#Aircraft_info_.2844.29| vehicle var 44]]. Valid values:&lt;br /&gt;
&lt;br /&gt;
0: small airport&lt;br /&gt;
&lt;br /&gt;
1: large airport&lt;br /&gt;
&lt;br /&gt;
2: heliport&lt;br /&gt;
&lt;br /&gt;
3: oilrig&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Industries&amp;diff=4933</id>
		<title>Action0/Industries</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Industries&amp;diff=4933"/>
		<updated>2025-02-17T14:55:07Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
Industries work similarly to town buildings. The limit for the number of industry types is:&lt;br /&gt;
* {{ttdp|2.5}} TTDPatch: 37&lt;br /&gt;
* {{ottd|&amp;amp;lt;1.6}} OpenTTD &amp;lt; 1.6: 64&lt;br /&gt;
* {{ottd|1.6}} OpenTTD ⩾ 1.6: 128 per NewGRF, 240 in total&lt;br /&gt;
The non-overridden original types count towards the (total) limit. Industries don&#039;t have a climate mask; you should simply not define an industry if it would be for the wrong climate.&lt;br /&gt;
&lt;br /&gt;
Defining industries follows the same schema as houses do: to start using an ID, you first need to define it by setting property 8 for it. If you try to reference an ID (either via action0 or via action3) that isn&#039;t defined, your request is ignored, but not reported as an error, either. This means that if you want to conditionally define an ID, all you need to do is skipping the action0 that sets property8, and everything else gets skipped automatically.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{| |-&lt;br /&gt;
!Property !![[GRFActionsDetailed|Size]] !!Version !! Description&lt;br /&gt;
|-&lt;br /&gt;
|08||B||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Substitute industry type&lt;br /&gt;
|-&lt;br /&gt;
|09||B||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Industry type override&lt;br /&gt;
|-&lt;br /&gt;
|0A||V||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Set industry layout(s)&lt;br /&gt;
|-&lt;br /&gt;
|0B||B||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Industry production flags&lt;br /&gt;
|-&lt;br /&gt;
|0C||W||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Industry closure message&lt;br /&gt;
|-&lt;br /&gt;
|0D||W||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Production increase message&lt;br /&gt;
|-&lt;br /&gt;
|0E||W||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Production decrease message&lt;br /&gt;
|-&lt;br /&gt;
|0F||B||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Fund cost multiplier&lt;br /&gt;
|-&lt;br /&gt;
|10||W||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Production cargo types&lt;br /&gt;
|-&lt;br /&gt;
|11||D||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Acceptance cargo types&lt;br /&gt;
|-&lt;br /&gt;
|12,13||B||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Production multipliers&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Minimal amount of cargo distributed&lt;br /&gt;
|-&lt;br /&gt;
|15||V||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Random sound effects&lt;br /&gt;
|-&lt;br /&gt;
|16||3*B||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Conflicting industry types&lt;br /&gt;
|-&lt;br /&gt;
|17||B||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Probability in random game&lt;br /&gt;
|-&lt;br /&gt;
|18||B||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Probability during gameplay&lt;br /&gt;
|-&lt;br /&gt;
|19||B||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Map color&lt;br /&gt;
|-&lt;br /&gt;
|1A||D||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Special industry flags to define special behavior&lt;br /&gt;
|-&lt;br /&gt;
|1B||W||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||New industry text ID&lt;br /&gt;
|-&lt;br /&gt;
|1C,1D,1E||D||{{ottdp|0.6|2.5|ttdprev=alpha 45}}||Input cargo multipliers for the three input cargo types&lt;br /&gt;
|-&lt;br /&gt;
|1F||W||{{ottdp|0.6|2.5|ttdprev=alpha 49}}||Industry name&lt;br /&gt;
|-&lt;br /&gt;
|20||D||{{ottdp|0.6|2.5|ttdprev=alpha 49}}||Prospecting success chance&lt;br /&gt;
|-&lt;br /&gt;
|21,22||B||{{ottdp|0.6|2.5|ttdprev=alpha 49}}||Callback flags&lt;br /&gt;
|-&lt;br /&gt;
|23||D||{{ottdp|0.6|2.5|ttdprev=alpha 73}}||Destruction cost multiplier&lt;br /&gt;
|-&lt;br /&gt;
|24||W||{{ottdp|0.6|2.6|ttdprev=r1782}}||Default text for nearby station&lt;br /&gt;
|-&lt;br /&gt;
|25||V||{{ottdp|1.9|no|ottdrev=e66cec8f}}||Production cargo type list&lt;br /&gt;
|-&lt;br /&gt;
|26||V||{{ottdp|1.9|no|ottdrev=e66cec8f}}||Acceptance cargo type list&lt;br /&gt;
|-&lt;br /&gt;
|27||V||{{ottdp|1.9|no|ottdrev=e66cec8f}}||Production multiplier list&lt;br /&gt;
|-&lt;br /&gt;
|28||V||{{ottdp|1.9|no|ottdrev=e66cec8f}}||Input cargo multiplier list&lt;br /&gt;
|-&lt;br /&gt;
|29||W n*W||{{ottdp|15}}||List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Substitute industry type (08) ===&lt;br /&gt;
&lt;br /&gt;
Substitute industry type. The first assignment of this property copies all properties of the old type to this new type. Unlike for houses, the substitute type won&#039;t replace this new type if the definition becomes unavailable. List of [[IndustryDefaultProps#Climate_independent_properties |valid industry types]]&lt;br /&gt;
&lt;br /&gt;
There&#039;s a special use of this property beginning from alpha 70: if you set it to FFh, you can disable an original industry. In this case, the ID used must be the number of industry you want to disable. Disable requests are ignored for industries not present on the current climate and industries already overridden.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.1|ottdrev=r20108}} AIs can use the substitute type to make decisions about station graphics and vehicle choice via [[Callbacks#AI_construction.2Fpurchase_selection_.2818.29| callback 18]].&lt;br /&gt;
&lt;br /&gt;
=== Industry type override (09) ===&lt;br /&gt;
&lt;br /&gt;
Industry type override. The overridden industry type won&#039;t be built in new random games. If the GRF file becomes active after the game was started, industries of the overridden new type won&#039;t be replaced by the new type. List of [[IndustryDefaultProps#Climate_independent_properties |valid industry types]]&lt;br /&gt;
&lt;br /&gt;
By overriding an old type, you&#039;re saying &amp;quot;my type is a substitute for that old type&amp;quot;. When GRFs ask information about the old type you&#039;ve overridden (via industry variable 67, for example), they will get information about your type instead. If you want to replace an old industry type with something completely different, use the &amp;quot;disable&amp;quot; function of property 08 (see above), then define the new industry type &#039;&#039;without&#039;&#039; using property 09. A rule of thumb: if your industry accepts or produces different cargoes than the original one, it should not override the original one.&lt;br /&gt;
&lt;br /&gt;
For example, if you want to replace the old coal mine with something that changes its coal production more dynamically, use property 09 to override industry 00. This way, other industries that want to be far from coal mines will stay far from your industry type too. If, however, you want to replace the coal mine with a potash mine, do not use property 09. This will ensure that other industries don&#039;t consider your type as a coal mine.&lt;br /&gt;
&lt;br /&gt;
Please note, however, that only one new industry can override an old type. If two new types want to override the same old type, the first one wins, and the second is added normally, ignoring its property 09.&lt;br /&gt;
&lt;br /&gt;
=== Set industry layout(s) (0A) ===&lt;br /&gt;
&lt;br /&gt;
Format of industry layout tables:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Variable!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||numlayouts||The total number of layouts following&lt;br /&gt;
|-&lt;br /&gt;
|D||size||The size of the whole definition, excluding numlayouts and size&lt;br /&gt;
|-&lt;br /&gt;
|V||layouts||numlayout layouts, see format below&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Format of an industry layout:&lt;br /&gt;
&lt;br /&gt;
As a special case, if the first byte of a new industry layout is FEh, then only two bytes follow: the industry number and the layout number. The specified layout of the specified old industry type will be added to the layout list of the current industry. The following applies only if the first byte wasn&#039;t FEh&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Variable!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||xoffs&lt;br /&gt;
|-&lt;br /&gt;
|B||yoffs||Offsets counted from the northernmost tile of the industry, specifying the position of the current tile. Both are taken as signed integers, but cannot go negative except the special case mentioned below.&lt;br /&gt;
|-&lt;br /&gt;
|B||oldtile||An old tile type to be put on the given tile&lt;br /&gt;
|-&lt;br /&gt;
|||--or--||&lt;br /&gt;
|-&lt;br /&gt;
|0xFE,W||newtile||The ID of an already defined industry tile, padded with 0 to create a word value. This tile type will be placed on the given tile.&lt;br /&gt;
|-&lt;br /&gt;
|||--or--||&lt;br /&gt;
|-&lt;br /&gt;
|0xFF|| ||The given tile is checked for clearance, but nothing will be placed on it. Useful to ensure some free space around your industry. This is the only case where xoffs and yoffs can be negative.&lt;br /&gt;
&lt;br /&gt;
{{grfTill|7}} For GRF versions &amp;lt;= 7, if xoffs is negative, yoffs must be one lower than the wanted value.&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The layout consists of a list of the above tile definitions, terminated by two bytes: 0,80h&lt;br /&gt;
&lt;br /&gt;
=== Industry production type (0B) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Value!!Meaning!!{{ottdp|0.6|no}} Effect on nearby stations!!Effect if [[Callbacks#Random_production_change_.2829.29|CB 29]] is disabled&lt;br /&gt;
|-&lt;br /&gt;
|00||consuming industry (e.g. power plant)||none||No production changes; no closure&lt;br /&gt;
|-&lt;br /&gt;
|01||extractive industry (e.g. coal mine)||suffix &#039;Mines&#039; if some non-liquid, non-passenger, non-mail cargo is produced||Standard primary-industry production change&lt;br /&gt;
|-&lt;br /&gt;
|02||organic industry (e.g. forest)||suffix &#039;Forest&#039; or &#039;Woods&#039; if wood is produced||Standard primary-industry production change&lt;br /&gt;
|-&lt;br /&gt;
|04||processing industry (e.g. steel mill)||none||Standard processing-industry closing-behaviour&lt;br /&gt;
|}&lt;br /&gt;
Other values are reserved; do not set any other values.&lt;br /&gt;
&lt;br /&gt;
=== Industry messages (0C..0E), new industry text ID (1B) ===&lt;br /&gt;
&lt;br /&gt;
The text associated with these textID will be shown if the industry announces closedown, if the industry increases production, if the industry decreases production or when the industry is generated during the game.&lt;br /&gt;
&lt;br /&gt;
For the generation message, by default, all industries have &amp;quot;New xxx is being constructed near yyy&amp;quot;, except forests, that have &amp;quot;New Forest is being planted near yyy&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Production cargo types (10) ===&lt;br /&gt;
&lt;br /&gt;
Two climate-dependent cargo numbers representing the cargo types the industry can produce. Unused slots can be filled with FFh. List of valid types: [[CargoTypes]]&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=e66cec8f}} This property only supports two output cargos. Use property 25 instead to output more cargo types.&lt;br /&gt;
&lt;br /&gt;
=== Acceptance cargo types (11) ===&lt;br /&gt;
&lt;br /&gt;
Three climate-dependent cargo numbers representing the cargo types the industry can accept, plus a fourth filler byte which is always ignored. Unused slots can be filled with FFh. List of valid types: [[CargoTypes]]&lt;br /&gt;
&lt;br /&gt;
These cargo types will only be really accepted if the according acceptance of the industry tiles adds up to 8/8 or more.&lt;br /&gt;
&lt;br /&gt;
From GRF version 7 and above, the meaning of the above two properties will change: instead of climate-dependent cargo slot numbers, you have to give climate-independent cargo IDs. If your GRF has a cargo translation table, then this ID is the index in that table; otherwise, it&#039;s the cargo bit. Cargoes not currently present will be changed to FFh. Please note that TTD stops processing these lists at the first FFh value, so specifying absent cargoes isn&#039;t always safe.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=e66cec8f}} This property only supports three input cargos. Use property 26 instead to output more cargo types.&lt;br /&gt;
&lt;br /&gt;
=== Production multipliers (12, 13) ===&lt;br /&gt;
&lt;br /&gt;
If nonzero, the industry periodically (every 256 ticks, that is 8 or 9 times in a month) produces the given amount from the according cargo type. The properties specify the amount produced at default production level, they are scaled equally on [[Callbacks#Random production change 29|production changes]].&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=e66cec8f}} This properties only supports two output cargos. Use property 27 instead to output more cargo types.&lt;br /&gt;
&lt;br /&gt;
=== Minimal amount of cargo distributed (14) ===&lt;br /&gt;
&lt;br /&gt;
The produced cargo will be distributed to stations only after it exceeds this amount.&lt;br /&gt;
&lt;br /&gt;
=== Random sound effects (15) ===&lt;br /&gt;
&lt;br /&gt;
The data starts with a byte defining the number of available effects, then one byte per effect. TTD periodically picks one of the available effects randomly, and plays it.&lt;br /&gt;
&lt;br /&gt;
=== Conflicting industry types (16) ===&lt;br /&gt;
&lt;br /&gt;
3 bytes define 3 types that won&#039;t appear in the vicinity of this industry. If a byte has bit 7 set, the bottom 6 bits are the ID of a new type already defined in the current GRF file. If bit 7 is clear, the bottom 6 bits specify an old industry type. FFh can be used to fill unused entries. You shouldn&#039;t modify property 9 after the type has been referenced by a property 16. List of [[IndustryDefaultProps#Climate_independent_properties |valid industry types]]&lt;br /&gt;
&lt;br /&gt;
=== Probability in random game (17), Probability during gameplay (18) ===&lt;br /&gt;
&lt;br /&gt;
Old types have probabilities between 0 and 10. If the random game probability value is nonzero, at least one instance of this type is guaranteed to appear on the map.&lt;br /&gt;
&lt;br /&gt;
These probabilities are &amp;quot;relative probabilities&amp;quot;. That is, if you set the probability of industry A to twice the probability of industry B, industry A will appear about twice as often as B. Increasing the probabilities of all industries on the other hand changes nothing. The appearance probabilities have no influence on how many industries are placed in total.&lt;br /&gt;
&lt;br /&gt;
=== Map colour (19) ===&lt;br /&gt;
&lt;br /&gt;
The value must be a color index from the DOS pallette. The following values are used by default industries:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!!Colour!!Example&lt;br /&gt;
|-&lt;br /&gt;
|01||Black||Coal mine&lt;br /&gt;
|-&lt;br /&gt;
|0A||Gray||Steel mill&lt;br /&gt;
|-&lt;br /&gt;
|0F||White||Bank&lt;br /&gt;
|-&lt;br /&gt;
|25||Dark beige||Water supply&lt;br /&gt;
|-&lt;br /&gt;
|27||Light beige||Rubber plantation&lt;br /&gt;
|-&lt;br /&gt;
|30||Pink||Farm&lt;br /&gt;
|-&lt;br /&gt;
|37||Brown||Food processing plant&lt;br /&gt;
|-&lt;br /&gt;
|56||Green||Forest&lt;br /&gt;
|-&lt;br /&gt;
|98||Blue||Oil wells/oil rig&lt;br /&gt;
|-&lt;br /&gt;
|AE||Purple||Factory&lt;br /&gt;
|-&lt;br /&gt;
|B8||Red||Power station&lt;br /&gt;
|-&lt;br /&gt;
|BF||Yellow||Oil refinery&lt;br /&gt;
|-&lt;br /&gt;
|C2||Orange||Saw mill&lt;br /&gt;
|-&lt;br /&gt;
|D0||Light green||Water tower&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Special industry flags to define special behavior (1A) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Version!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||{{ottdp|0.6|2.5}}||The industry periodically plants fields around itself (temperate and arctic farms)&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|0.6|2.5}}||The industry cuts trees around itself and produces its first output cargo from them (lumber mill)&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|0.6|2.5}}||The industry is built on water (oil rig)&lt;br /&gt;
|-&lt;br /&gt;
|3||8||{{ottdp|0.6|2.5}}||The industry can only be built in towns (i.e. it has to replace houses) with population larger than 1200 (temperate bank)&lt;br /&gt;
|-&lt;br /&gt;
|4||10||{{ottdp|0.6|2.5}}||The industry can only be built in towns (i.e. it has to replace houses) (arctic and tropic banks, water tower)&lt;br /&gt;
|-&lt;br /&gt;
|5||20||{{ottdp|0.6|2.5}}||The industry is always built near towns (i.e. near town sign; additionally the industry is allowed to replace houses) (toy shop)&lt;br /&gt;
|-&lt;br /&gt;
|6||40||{{ottdp|0.6|2.5}}||Fields are planted around the industry when it&#039;s built (all farms)&lt;br /&gt;
|-&lt;br /&gt;
|7||80||{{ottdp|0.6|2.5}}||The industry cannot increase its production on the temperate climate (oil wells)&lt;br /&gt;
|-&lt;br /&gt;
|8||100||{{ottdp|0.6|2.5}}||The industry is built only before 1950 (oil wells)&lt;br /&gt;
|-&lt;br /&gt;
|9||200||{{ottdp|0.6|2.5}}||The industry is built only after 1960 (oil rig)&lt;br /&gt;
|-&lt;br /&gt;
|10||400||{{ottdp|0.6|2.5}}||AI players will attempt to establish air and ship routes going to this industry (oil rig)&lt;br /&gt;
|-&lt;br /&gt;
|11||800||{{ottdp|0.6|2.5}}||The industry can be exploded by a military airplane (oil refinery)&lt;br /&gt;
|-&lt;br /&gt;
|12||1000||{{ottdp|0.6|2.5}}||The industry can be exploded by a military helicopter (factory)&lt;br /&gt;
|-&lt;br /&gt;
|13||2000||{{ottdp|0.6|2.5}}||The industry can cause a subsidence (coal mine)&lt;br /&gt;
|-&lt;br /&gt;
|14||4000||{{ottdp|0.6|2.5}}||Automatic production multiplier handing (No industry has this bit set by default.)&amp;lt;ref&amp;gt;If bit 14 is set, variables 40..42 will be divided by industry.prodmultiplier (variable 93), and the resulting instructions will be multiplied by the same amount before applying them. If you set this bit, please use small amounts in your instructions, since industry.prodmultiplier is 16 for default production, and can get as high as 128.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|15||8000||{{ottdp|0.6|2.5}}||The production callback needs random bits in var. 10 (No industry has this bit set by default.)&lt;br /&gt;
|-&lt;br /&gt;
|16||10000||{{ottdp|1.0|2.6|ttdprev=r1925}}||Do not force one instance of this type to appear during initial map generation (No industry has this bit set by default.)&lt;br /&gt;
|-&lt;br /&gt;
|17||20000||{{ottdp|0.6|2.6|ttdprev=r1925}}||Allow closing down the last instance of this type (No industry has this bit set by default.)&lt;br /&gt;
|-&lt;br /&gt;
|18||40000||{{ottdp|1.9|no|ottdrev=e66cec8f}}||New format for callback 37, 14B, 14C to support more input/output cargos. See the callbacks for details.&lt;br /&gt;
|-&lt;br /&gt;
|19||80000||{{ottdp|1.11|no|ottdrev=b3d048dfc}}||By default OpenTTD&#039;s smooth economy clamps the production of passenger (like for oil rigs). This flag disables the clamping.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default, TTDPatch tries to ensure that cargo chains don&#039;t get broken. To achieve this, TTDPatch always generates at least one instance from every available industry type during random map generation, and prevents the last instance from closing down even when the production change callback says it should. If your industry type isn&#039;t essential for gameplay, or you want to handle this situation yourself, you can set bits 16 and/or 17 to turn off the default TTDPatch behavior.&lt;br /&gt;
&lt;br /&gt;
If you supply a lot of industry types but also want to support OpenTTD&#039;s small map sizes you should set bit 16 for the less important industry types which can be ommitted (there will likely not be enough space for an industry of every type).&lt;br /&gt;
&lt;br /&gt;
=== Input cargo multipliers for the three input cargo types (1C..1E) ===&lt;br /&gt;
&lt;br /&gt;
If the first (low) word of the property is M1 and the second (high) word is M2, and X units of the corresponding cargo is delivered to the industry, the output amounts are calculated this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;output_type1 = X*M1/256&lt;br /&gt;
&lt;br /&gt;
output_type2 = X*M2/256&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default value for old industry types is 0100h,0000h , so every unit of input cargo produces one unit of output cargo of the first type. Exceptions are temperate banks and oil rigs, that have the default value of 0000h,0000h ,so input cargo doesn&#039;t affect output.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=e66cec8f}} This property only supports three input and two output cargos. Use property 28 instead, if you have more cargo types.&lt;br /&gt;
&lt;br /&gt;
=== Industry name (1F) ===&lt;br /&gt;
&lt;br /&gt;
This is the text ID that will be attached to the town name when TTD texts refer to the industry.&lt;br /&gt;
&lt;br /&gt;
=== Prospecting success chance (20) ===&lt;br /&gt;
&lt;br /&gt;
This value is currently used only for extractive and organic industries (see property 0B for details). The higher this value is, the higher the chance that your industry can be built on a random place after prospecting. 0 means constant failure, while FFFFFFFFh means constant success.&lt;br /&gt;
&lt;br /&gt;
=== Callback flags (21,22) ===&lt;br /&gt;
&lt;br /&gt;
Property 21 can have the following bits set:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Var. 0C!!Version!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||22||{{ottdp| |2.5}}||Determine whether the industry can be built&lt;br /&gt;
|-&lt;br /&gt;
|1||2||00||{{ottdp| |2.5}}||Call the [[Action2Industries|production callback]] when cargo arrives at the industry &amp;lt;ref name=&amp;quot;smootheconomy&amp;quot;&amp;gt;{{ottdp|0.6|no}} If none of the production change callbacks is activated, OpenTTD will use &amp;quot;smooth economy&amp;quot; if enabled. If any of the callbacks is enabled, &amp;quot;smooth economy&amp;quot; will be disabled for the industry.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2||4||00||{{ottdp| |2.5}}||Call the [[Action2Industries|production callback]] every 256 ticks &amp;lt;ref name=&amp;quot;smootheconomy&amp;quot;/&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3||8||28||{{ottdp| |2.5}}||Determine whether the industry can be built on given spot&lt;br /&gt;
|-&lt;br /&gt;
|4||10||29||{{ottdp| |2.5}}||Control random production changes&lt;br /&gt;
|-&lt;br /&gt;
|5||20||35||{{ottdp| |2.5}}||Monthly random production change&lt;br /&gt;
|-&lt;br /&gt;
|6||40||37||{{ottdp| |2.5}}||Cargo sub-type display&lt;br /&gt;
|-&lt;br /&gt;
|7||80||38||{{ottdp| |2.5|ttdprev=2.0.1 alpha 72}}||Additional text in industry fund window&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Property 22 can have the following bits set:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Var. 0C!!Version!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||3A||{{ottdp| |2.5|ttdprev=2.0.1 alpha 72}}||Show additional text in industry window&lt;br /&gt;
|-&lt;br /&gt;
|1||2||3B||{{ottdp| |2.5|ttdprev=2.0.1 alpha 73}}||Control special industry effects&lt;br /&gt;
|-&lt;br /&gt;
|2||4||3D||{{ottdp| |2.5|ttdprev=2.5 beta 4 }}||Opt out of accepting cargo&lt;br /&gt;
|-&lt;br /&gt;
|3||8||14A||{{ottdp| |2.6|ttdprev=r1712}}||Decide industry color&lt;br /&gt;
|-&lt;br /&gt;
|4||10||14B||{{ottdp| |2.6|ttdprev=r1718}}||Decide input cargo types&lt;br /&gt;
|-&lt;br /&gt;
|5||20||14C||{{ottdp| |2.6|ttdprev=r1718}}||Decide output cargo types&lt;br /&gt;
|-&lt;br /&gt;
|6||40||15F||{{ottdp|1.3|no|ottdrev=r24186}}||Set initial production level on construction.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Destruction cost multiplier (23) ===&lt;br /&gt;
&lt;br /&gt;
This value specifies the cost of removing the industry when the ctrl-dynamite function of morebuildoptions.removeindustry is enabled. This value is multiplied by the house removal cost multiplier to get the final cost. The default value is 1000 in TTDPatch, and 0 (zero) in OpenTTD.&lt;br /&gt;
&lt;br /&gt;
=== Default name for nearby station (24) ===&lt;br /&gt;
&lt;br /&gt;
If non-zero, this text ID specifies an additional name option for stations built near this industry, which will be used before any of the standard TTD names. The text should contain a \80, which will be the name of the nearby town.&lt;br /&gt;
&lt;br /&gt;
If the newly built station cannot use the specified text (because that name has been used for another station in the same town) the default TTD naming system will be used, but without the names &amp;quot;\80 Oilfield&amp;quot; or &amp;quot;\80 Mines&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Setting this to zero disables &amp;quot;\80 Oilfield&amp;quot; and &amp;quot;\80 Mines&amp;quot; without adding any additional station name options.&lt;br /&gt;
&lt;br /&gt;
=== Production cargo type list (25) ===&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=e66cec8f}} &lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
 &amp;lt;numoutput&amp;gt; (&amp;lt;cargotype&amp;gt;)*&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Variable!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||numoutput||Number of &amp;lt;cargotype&amp;gt; to follow,&lt;br /&gt;
|-&lt;br /&gt;
|B||cargotype||Cargotype (from CTT) to produce.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This property defines up to 16 cargotypes, which are produced by the industry.&lt;br /&gt;
Use this property instead of property 10.&lt;br /&gt;
&lt;br /&gt;
=== Acceptance cargo type list (26) ===&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=e66cec8f}} &lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
 &amp;lt;numinput&amp;gt; (&amp;lt;cargotype&amp;gt;)*&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Variable!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||numinput||Number of &amp;lt;cargotype&amp;gt; to follow,&lt;br /&gt;
|-&lt;br /&gt;
|B||cargotype||Cargotype (from CTT) to accept.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This property defines up to 16 cargotypes, which are accepted by the industry.&lt;br /&gt;
Use this property instead of property 11.&lt;br /&gt;
&lt;br /&gt;
=== Production multiplier list (27) ===&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=e66cec8f}} &lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
 &amp;lt;numoutput&amp;gt; (&amp;lt;amount&amp;gt;)*&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Variable!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||numinput||Number of &amp;lt;amount&amp;gt; to follow,&lt;br /&gt;
|-&lt;br /&gt;
|B||amount||Amount of cargo to produce.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If nonzero, the industry periodically (every 256 ticks, that is 8 or 9 times in a month) produces the given amount from the according cargo type.&lt;br /&gt;
The amounts correlate to the cargotypes set by property 25. If fewer/more amounts are set, the extra items are not produced/ignored.&lt;br /&gt;
&lt;br /&gt;
The properties specify the amount produced at default production level, they are scaled equally on [[Callbacks#Random production change 29|production changes]].&lt;br /&gt;
&lt;br /&gt;
Use this property instead of property 12 and 13.&lt;br /&gt;
&lt;br /&gt;
=== Input cargo multiplier list (28) ===&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=e66cec8f}} &lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
 &amp;lt;numinput&amp;gt; &amp;lt;numoutput&amp;gt; (&amp;lt;multiplier&amp;gt;)*&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Variable!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||numinput||Number of input cargos to use.&lt;br /&gt;
|-&lt;br /&gt;
|B||numoutput||Number of output cargos to use.&lt;br /&gt;
|-&lt;br /&gt;
|W||multiplier||Cargo multipliers in 1/256 units. &amp;lt;numinput&amp;gt;*&amp;lt;numoutput&amp;gt; items.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This property defines a matrix which described how input cargos from property 26 are processed into output cargos from property 25.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 03 04    // 3 input cargos, 4 output cargos&lt;br /&gt;
    \wx0100 \wx0000 \wx0000 \wx0100    // input cargo 0 is converted to output cargos 0 and 3&lt;br /&gt;
    \wx0000 \wx0100 \wx0000 \wx0100    // input cargo 1 is converted to output cargos 1 and 3&lt;br /&gt;
    \wx0000 \wx0000 \wx0100 \wx0100    // input cargo 2 is converted to output cargos 2 and 3&lt;br /&gt;
&lt;br /&gt;
The matrix correlates to the cargotypes set by property 25 and 26. If fewer/more cargotypes are used, the extra items are not produced/ignored.&lt;br /&gt;
&lt;br /&gt;
Use this property instead of property 1C..1E.&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Industry_Tiles&amp;diff=4932</id>
		<title>Action0/Industry Tiles</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Industry_Tiles&amp;diff=4932"/>
		<updated>2025-02-17T14:54:46Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
Industry tiles work similarly to town buildings, except that they are not stand-alone; they are always part of an industry.&lt;br /&gt;
&lt;br /&gt;
Defining industry tiles follows the same schema as houses do: to start using an ID, you first need to define it by setting property 8 for it. If you try to reference an ID (either via action0 or via action3) that isn&#039;t defined, your request is ignored, but not reported as an error, either. This means that if you want to conditionally define an ID, all you need to do is skipping the action0 that sets property8, and everything else gets skipped automatically.&lt;br /&gt;
&lt;br /&gt;
Industry tile IDs are unique within each grf file. The per-GRF ID is specified as a byte, which means no GRF can define more than 256 tile IDs. You should use your industry tile IDs sparingly. [[VariationalAction2/Industry_Tiles#Relative_position_.2843.29| Variational action 2 variable 43]] for industry tiles can help you limiting tile consumption to 2 or 3 per industry. Avoid using tile FFh, so the tileID can be turned into an extended byte (in Action 3) in the distant future without breaking your NewGRF.&lt;br /&gt;
&lt;br /&gt;
{{ttdp|}} In total, TTDPatch can have up to a total of 256 new industry tile IDs (i.e. old tile types don&#039;t count).&lt;br /&gt;
&lt;br /&gt;
{{ottd|}} OpenTTD can have 512 IDs for all active grf files, but that includes non-overridden original tiles.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Property !![[GRFActionsDetailed|Size]] !!Version !! Description&lt;br /&gt;
|-&lt;br /&gt;
|08||B||{{ottdp|0.6|2.5|ttdprev=alpha 43}}||Substitute building type&lt;br /&gt;
|-&lt;br /&gt;
|09||B||{{ottdp|0.6|2.5|ttdprev=alpha 43}}||Industry tile override&lt;br /&gt;
|-&lt;br /&gt;
|0A,0B,0C||W||{{ottdp|0.6|2.5}}||Tile acceptance&lt;br /&gt;
|-&lt;br /&gt;
|0D||B||{{ottdp|0.6|2.5|ttdprev=alpha 49}}||Land shape flags&lt;br /&gt;
|-&lt;br /&gt;
|0E||B||{{ottdp|0.6|2.5|ttdprev=alpha 54}}||Callback flags&lt;br /&gt;
|-&lt;br /&gt;
|0F||W||{{ottdp|0.6|2.5|ttdprev=alpha 54}}||Animation information&lt;br /&gt;
|-&lt;br /&gt;
|10||B||{{ottdp|0.6|2.5|ttdprev=alpha 54}}||Animation speed.&lt;br /&gt;
|-&lt;br /&gt;
|11||B||{{ottdp|0.6|2.5|ttdprev=alpha 54}}||Triggers for callback 25&lt;br /&gt;
|-&lt;br /&gt;
|12||B||{{ottdp|0.6|2.5|ttdprev=beta 2}}||Special flags&lt;br /&gt;
|-&lt;br /&gt;
|13||V||{{ottdp|1.9|no|ottdrev=e66cec8f}}||Tile acceptance list&lt;br /&gt;
|-&lt;br /&gt;
|14||W n*W||{{ottdp|15}}||List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Substitute tile type (08) ===&lt;br /&gt;
&lt;br /&gt;
This tile type will be used instead of your new one if your definition isn&#039;t available for any reason. Valid values are [http://marcin.ttdpatch.net/sv1codec/TTD-locations.html#Class8 00h-AEh]. Assigning this property copies the properties of the old type just like it does with houses.&lt;br /&gt;
&lt;br /&gt;
If this tile&#039;s action 3 appears before this property is set, the action 3 will have no effect.&lt;br /&gt;
&lt;br /&gt;
=== Industry tile override (09) ===&lt;br /&gt;
&lt;br /&gt;
Works like the house override property for houses.&lt;br /&gt;
&lt;br /&gt;
=== Tile acceptance (0A, 0B, 0C) ===&lt;br /&gt;
&lt;br /&gt;
These three words define what cargoes the tile accepts, and how much of them. The low byte defines the type of the cargo according to the current climate, while the high byte defines the degree of acceptance in 1/8 units. If you don&#039;t need all three cargo types, just zero out the high byte of the extra properties.&lt;br /&gt;
&lt;br /&gt;
{{grfFrom|7}} From GRF version 7 and above, the meaning of the low byte changes: instead of a climate-dependent cargo slot number, you have to give a climate-independent cargo ID. If your GRF has a cargo translation table, then this ID is the index in that table; otherwise, it&#039;s the cargo bit. Acceptance of cargoes not currently present will automatically be disabled.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=e66cec8f}} These properties only support three cargos. Use property 13 instead to list more cargo types. &lt;br /&gt;
&lt;br /&gt;
=== Land shape flags (0D) ===&lt;br /&gt;
&lt;br /&gt;
This property defines which slopes the tile can be built on.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Version!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||{{ottdp|0.6|2.5}}||NW edge cannot be lowered&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|0.6|2.5}}||NE edge cannot be lowered&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|0.6|2.5}}||SW edge cannot be lowered&lt;br /&gt;
|-&lt;br /&gt;
|3||8||{{ottdp|0.6|2.5}}||SE edge cannot be lowered&lt;br /&gt;
|-&lt;br /&gt;
|4||10||{{ottdp|0.6|2.5}}||Can only be built on flat land&lt;br /&gt;
|-&lt;br /&gt;
|5||20||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||The tile is allowed on both land and water&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Industry tiles are never built on steep slopes unless [[Callbacks#Custom shape check (2F) |callback 2F]] is enabled, but bits 0..4 are ignored in that case.&lt;br /&gt;
&lt;br /&gt;
Bit 5 can be used to allow tiles of land industries built on water or vice versa. It effectively disables the land/water check code for the tile. If you need to customize the behavior further, you can use [[Callbacks#Custom shape check (2F) |callback 2F]] to decide what kind of water/land is allowed.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;PLEASE NOTE&#039;&#039;&#039;: Be careful when setting this property. If you fail to set it correctly, your industry may end up building on a hillside, which is probably not what you want. The easiest way is to set bit 4 for middle tiles, bit 0 for the tiles along the SE edge, bit 1 for those along the SW edge and so on.&lt;br /&gt;
&lt;br /&gt;
=== Callback flags (0E) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!value!!version!!meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||{{ottdp| | }}||use [[Callbacks#Next animation frame (1A/26/141/153/158) |callback 26]] to decide the next animation frame&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp| | }}||use [[Callbacks#Length of animation frame (20/27/142/154/15A) |callback 27]] to decide animation speed&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp| |2.5|ttdprev=alpha 55 vcs 3}}||use [[Callbacks#Decide cargo acceptance (2B) |callback 2B]] to decide amount of acceptance&lt;br /&gt;
|-&lt;br /&gt;
|3||8||{{ottdp| |2.5|ttdprev=alpha 55 vcs 3}}||use [[Callbacks#Get accepted cargo types (2A/2C) |callback 2C]] to decide accepted types&lt;br /&gt;
|-&lt;br /&gt;
|4||10||{{ottdp| | }}||use [[Callbacks#Custom shape check (2F) |callback 2F]] to check if a slope is suitable&lt;br /&gt;
|-&lt;br /&gt;
|5||20||{{ottdp| | }}||use [[Callbacks#Decide drawing default foundations (30/14E/150) |callback 30]] to decide if default foundations need to be drawn&lt;br /&gt;
|-&lt;br /&gt;
|6||40||{{ottdp| |2.5|ttdprev=beta 3}}||use [[Callbacks#Disable autosloping (3C/14F/15D) |callback 3C]] to allow or deny autosloping below the tile&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Please note that [[Callbacks#Animation control (1B/25/140/152/159) |callback 25]] doesn&#039;t have a bit here. To use [[Callbacks#Animation control (1B/25/140/152/159) |callback 25]], simply set the wanted bits in property 11 and it will work as intended.&lt;br /&gt;
&lt;br /&gt;
=== Animation information (0F) ===&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 tile (this is the default value).&lt;br /&gt;
&lt;br /&gt;
=== Animation speed (10) ===&lt;br /&gt;
&lt;br /&gt;
The meaning is the same as for 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 2.&lt;br /&gt;
&lt;br /&gt;
=== Triggers for [[Callbacks#Animation control (1B/25/140/152/159) |callback 25]] (11) ===&lt;br /&gt;
&lt;br /&gt;
Call [[Callbacks#Animation control (1B/25/140/152/159) |callback 25]] when:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Version!!Meaning||Var 18&lt;br /&gt;
|-&lt;br /&gt;
|0||1||{{ottdp|0.6|2.5}}||the construction state changes||&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|0.6|2.5}}||the tile is processed in the periodic processing loop||&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|0.6|2.5}}||the industry of the tile is processed in the periodic processing loop (synchronized animation)||&lt;br /&gt;
|-&lt;br /&gt;
|3||8||{{ottdp|0.6|2.5}}||the industry of the tile receives input cargo from a station||&lt;br /&gt;
|-&lt;br /&gt;
|4||10||{{ottdp|0.6|2.5|ttdprev=beta 2}}||the industry distributes its output cargo to one of the stations nearby||&lt;br /&gt;
|}&lt;br /&gt;
Currently no trigger provides additional information in var 18.&lt;br /&gt;
&lt;br /&gt;
=== Special flags (12) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||[[Callbacks#Next animation frame (1A/26/141/153/158) |Callback 26]] needs random bits&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|1.9|no|ottdrev=e66cec8f}} In addition to the cargotypes set by property 0A..0C and 13, the tile accepts all cargotypes which the industry accepts.&lt;br /&gt;
* This considers industry properties 11 and 26 and callback 14B.&lt;br /&gt;
* This does not consider industry callback 3D.&lt;br /&gt;
* This property adds 8/8 acceptance for the matching cargotypes. You can list negative acceptances (-8/8) in property 13 to exclude specific cargos.&lt;br /&gt;
* Tile callback 2C overrides all acceptances including those added by this flag.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Tile acceptance list (13) ===&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=e66cec8f}} &lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
 &amp;lt;numinput&amp;gt; (&amp;lt;cargotype&amp;gt; &amp;lt;acceptance&amp;gt;)*&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Variable!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||numinput||Number of (&amp;lt;cargotype&amp;gt; &amp;lt;acceptance&amp;gt;) pairs to follow,&lt;br /&gt;
|-&lt;br /&gt;
|B||cargotype||Cargotype (from CTT) to accept.&lt;br /&gt;
|-&lt;br /&gt;
|B||acceptance||Acceptance in 1/8 units. May be negative to negate property 12 bit 1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This property defines up to 16 cargotypes, which are accepted by the industry tile.&lt;br /&gt;
Use this property instead of property 0A..0C.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Houses&amp;diff=4931</id>
		<title>Action0/Houses</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Houses&amp;diff=4931"/>
		<updated>2025-02-17T14:54:21Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
For town buildings (or simply houses), the offset defines the first house ID for this action 0. House IDs, like station IDs, are unique within each grf file, and in total each game can only have 255 IDs in TTDPatch and 512 IDs in OpenTTD for all active grf files. &lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Since OpenTTD 15, the limits are increased to 4096 IDs, both per-grf and in total.&lt;br /&gt;
&lt;br /&gt;
To start using a house ID, you must first define it by setting its property 08 (see below). If you try to modify a house ID whose property 08 isn&#039;t set, your request is ignored, but not reported as an error, either.&lt;br /&gt;
&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.5|ttdprev=alpha 34}}||Substitute building type&lt;br /&gt;
|-&lt;br /&gt;
|09||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Building flags&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Availability years&lt;br /&gt;
|-&lt;br /&gt;
|0B||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Population&lt;br /&gt;
|-&lt;br /&gt;
|0C||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Mail generation multiplier&lt;br /&gt;
|-&lt;br /&gt;
|0D||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Passenger acceptance&lt;br /&gt;
|-&lt;br /&gt;
|0E||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Mail acceptance&lt;br /&gt;
|-&lt;br /&gt;
|0F||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Goods, food or fizzy drinks acceptance&lt;br /&gt;
|-&lt;br /&gt;
|10||W||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||LA rating decrease on removal (should be set to the same value for every tile for multi-tile buildings)&lt;br /&gt;
|-&lt;br /&gt;
|11||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Removal cost multiplier (should be set to the same value for every tile for multi-tile buildings)&lt;br /&gt;
|-&lt;br /&gt;
|12||W||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Building name ID&lt;br /&gt;
|-&lt;br /&gt;
|13||W||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Building availability mask&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||House callback flags&lt;br /&gt;
|-&lt;br /&gt;
|15||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||House override byte&lt;br /&gt;
|-&lt;br /&gt;
|16||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Periodic refresh multiplier&lt;br /&gt;
|-&lt;br /&gt;
|17||4*B||{{ottdp|0.6|2.5|ttdprev=alpha 35}}||Four random colours to use&lt;br /&gt;
|-&lt;br /&gt;
|18||B||{{ottdp|0.6|2.5|ttdprev=alpha 35}}||Relative probability of appearing&lt;br /&gt;
|-&lt;br /&gt;
|19||B||{{ottdp|0.6|2.5|ttdprev=alpha 38}}||Extra flags&lt;br /&gt;
|-&lt;br /&gt;
|1A||B||{{ottdp|0.6|2.5|ttdprev=alpha 39}}||Animation frames&lt;br /&gt;
|-&lt;br /&gt;
|1B||B||{{ottdp|0.6|2.5|ttdprev=alpha 39}}||Animation speed&lt;br /&gt;
|-&lt;br /&gt;
|1C||B||{{ottdp|0.6|2.5|ttdprev=alpha 43}}||Class of the building type&lt;br /&gt;
|-&lt;br /&gt;
|1D||B||{{ottdp|0.6|2.5|ttdprev=alpha 55 vcs 2}}||Callback flags 2&lt;br /&gt;
|-&lt;br /&gt;
|1E||D||{{ottdp|0.6|2.5|ttdprev=alpha 55 vcs 2}}||Accepted cargo types&lt;br /&gt;
|-&lt;br /&gt;
|1F||B||{{ottdp|0.6|2.6|ttdprev=r1554}}||Minimum life span in years&lt;br /&gt;
|-&lt;br /&gt;
|20||V||{{ottdp|1.2|2.6|ottdrev=r23072|ttdprev=r1677}}||Cargo acceptance watch list&lt;br /&gt;
|-&lt;br /&gt;
|21||W||{{ottdp|0.7|no|ottdrev=r13437}}||Long year (zero based) of minimum appearance&lt;br /&gt;
|-&lt;br /&gt;
|22||W||{{ottdp|0.7|no|ottdrev=r13437}}||Long year (zero based) of maximum appearance&lt;br /&gt;
|-&lt;br /&gt;
|23||V||{{ottdp|1.9|no|ottdrev=48b334cf}}||Tile acceptance list &lt;br /&gt;
|-&lt;br /&gt;
|24||W n*W||{{ottdp|15}}||List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When a town decides to expand, each active house type (both old and new ones) has a uniform probability to appear, so the more new houses you define, the fewer old TTD buildings will appear.&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Substitute building type (08) ===&lt;br /&gt;
&lt;br /&gt;
This building type will be used instead of your new one if your definition isn&#039;t available for any reason (the grf file is not found, for example).&lt;br /&gt;
&lt;br /&gt;
Don&#039;t set a substitute building type that is larger than your new one (for example, don&#039;t set 14 (stadium) for an 1x1 building) because this may corrupt savegames. Setting this property automatically copies every property of the substitute building to your new building, so you don&#039;t have to change properties that are the same as the substitute.&lt;br /&gt;
&lt;br /&gt;
House flags 40 and 80 are exceptions; these flags are never set automatically. Only the first property 08 setting copies properties; if you later change it, properties will stay.&lt;br /&gt;
&lt;br /&gt;
There&#039;s a special use of this property beginning from alpha 72: if you set it to FFh, you can disable an old house type. In this case, the ID used must be the number of old house type you want to disable. Disabling only prevents building the type in towns; houses already present on the map will stay unchanged. The type can still be overridden, and overriding affects houses present on the map.&lt;br /&gt;
&lt;br /&gt;
If this house&#039;s action 3 appears before this property is set, the action 3 will have no effect.&lt;br /&gt;
&lt;br /&gt;
=== Building flags (09) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||This is a 1x1 building&lt;br /&gt;
|-&lt;br /&gt;
|1||2||This building can be built only on flat land (if clear, foundations are automatically displayed on sloped land)&lt;br /&gt;
|-&lt;br /&gt;
|2||4||This is a 2x1 building&amp;lt;ref name=&amp;quot;large&amp;quot;&amp;gt;If your building isn&#039;t 1x1, set flags for the north tile, then define the next 1 or 3 tiles tiles (by setting their property 8). The only bit that can be set in the flags of additional tiles is bit 5 (animation). There should be no property 8 setting between the first tile and the additional tiles.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3||8||This is a 1x2 building&amp;lt;ref name=&amp;quot;large&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4||10||This is a 2x2 building&amp;lt;ref name=&amp;quot;large&amp;quot; /&amp;gt;&amp;lt;ref&amp;gt;For 2x2 buildings, the first additional tile is the east one, the second is the west part and the third is the south part. You probably want to set the substitute for additional tiles to a TTD additional tile whose flags are already zero. 2x2 buildings are always built on flat land no matter how bit 1 is set.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|5||20||Animation flag, set in tiles 04 and 05 (large office block). New buildings have a different animation scheme than large office blocks, but animation is still enabled with this bit.&amp;lt;ref&amp;gt;The animation flag works on a per-tile basis, so you should enable it for additional tiles of multi-tile buildings as well if you want all tiles to be animated.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|6||40||This building is a church&amp;lt;ref name=&amp;quot;only1&amp;quot;&amp;gt;Only one church and one stadium can exist in a town. The town won&#039;t build buildings with the according flag set until the old church/stadium is removed. (This can be done by either the town or a player)&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|7||80||This building is a stadium&amp;lt;ref name=&amp;quot;only1&amp;quot; /&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Availability years (0A) ===&lt;br /&gt;
&lt;br /&gt;
The low byte is the minimum year, the high is the maximum. The building can only be built between these two years (inclusive). 1920 is added to both bytes before using the values.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no| }}&lt;br /&gt;
Since the year counting stops in TTDPatch in 2070 even with [[ttwiki:EternalGame|EternalGame]] on, start years above 150 mean &amp;quot;never&amp;quot;, and end years above 150 mean &amp;quot;forever&amp;quot;. In OpenTTD there is no limit for the maximum year (resp. it is 5000000).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; Don&#039;t set the start year below 1930 (0Ah) unless you know what you&#039;re doing!&lt;br /&gt;
&lt;br /&gt;
{{ttdp|}} If TTDPatch finds a building that is available before 1930, it will not build old building types until that year, so you have to provide at least one custom building type that is available before 1930 for every [[TownZones|town zone]], or TTD may deadlock while trying to create a random game or expand a town.&lt;br /&gt;
&lt;br /&gt;
{{ottd|}} The availability of all active houses with the lowest availability year is set to start from year 0, so that always at least one house is available irrespective of starting year. Thus, if you de-activate default houses or set an introduction date prior to the default houses introduction year 1930, you should have at least for each [[TownZones|town zone]] a house with the same earliest availability year or you might end up with a situation where no house can be placed in a [[TownZones|town zone]].&lt;br /&gt;
&lt;br /&gt;
=== Population (0B) and Mail generation multiplier (0C) ===&lt;br /&gt;
[[Image:House_production.png|frame|right|Actual house production roughly depends on squared value of the population / mail generation multiplier.]]&lt;br /&gt;
&lt;br /&gt;
The population of the town will be increased by the amount set in prop. 0B if this building is built. Additional house parts should have a population of zero. The higher this value is, the more passengers this building generates.&lt;br /&gt;
&lt;br /&gt;
The higher the mail generation multiplier is, the more mail the building generates. For multi-tile buildings, mail generation is done in per-tile basis, so you can specify different values for every tile, although distributing the generation equally between tiles is suggested.&lt;br /&gt;
&lt;br /&gt;
This is how exactly passengers are generated: In each periodic processing (i.e. every 256 ticks), a random value 0&amp;lt;=X&amp;lt;=255 is generated for each house tile. If X isn&#039;t smaller than the population of the tile, no passengers are generated. Otherwise, X/8+1 passengers are generated (rounded down). If there is a recession going on, the number of generated passengers is halved, but this division gets rounded up instead of down. Mail generation happens in a similar manner, but with a new random value, and checking against the mail generation multiplier instead of the population.&lt;br /&gt;
&lt;br /&gt;
You can further customize how the cargo is generated with the [[Callbacks#Custom_cargo_production_.282E.29 |callback 2E]].&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Passenger (0D), Mail (0E) and Good/Food/Fizzy drinks (0F) acceptance ===&lt;br /&gt;
&lt;br /&gt;
The acceptance is given in units of 1/8th and must not be larger than 8 eighths.&lt;br /&gt;
&lt;br /&gt;
For property 0F, positive values indicate that the building accepts goods, and negative values (i.e. FF = 1/8th, FE = 2/8ths etc.) indicate acceptance of food or fizzy drinks, depending on the climate.&lt;br /&gt;
&lt;br /&gt;
All the above three values can be set independently for tiles of multi-tile buildings, since every tile is processed individually when determining what a station accepts.&lt;br /&gt;
&lt;br /&gt;
The type of accepted cargo can be modified using [[Action0Houses#Accepted_cargo_types|property 1E]].&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no| }} Note that in TTDPatch the officefood switch may modify acceptance in the sub-arctic and subtropical climates.&lt;br /&gt;
&lt;br /&gt;
=== Building name ID (12) ===&lt;br /&gt;
&lt;br /&gt;
The ID of the text that should be displayed in the land query window. The name can also be set by [[Action4|action 4]] (see there). Should be set to the same value for every tile for multi-tile buildings.&lt;br /&gt;
&lt;br /&gt;
=== Building availability mask (13) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0..4||1,2,4,8,10||which [[VariationalAction2/Houses#Town zone (42)|town zone(s)]] the building can be built in&lt;br /&gt;
|-&lt;br /&gt;
|11||800||can appear in sub-arctic climate above the snow line&lt;br /&gt;
|-&lt;br /&gt;
|12||1000||can appear in temperate climate&lt;br /&gt;
|-&lt;br /&gt;
|13||2000||can appear in sub-arctic climate below the snow line&lt;br /&gt;
|-&lt;br /&gt;
|14||4000||can appear in subtropical climate&lt;br /&gt;
|-&lt;br /&gt;
|15||8000||can appear in toyland climate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This property should be set to zero for additional building tiles.&lt;br /&gt;
&lt;br /&gt;
=== House callback flags (14,1D) ===&lt;br /&gt;
&lt;br /&gt;
For houses, the following [[callbacks]] can be defined by setting the corresponding bit in property 14:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Variable 0C value!!Version!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||17||{{ottdp| | }}||decide whether the house can be built on a given tile&lt;br /&gt;
|-&lt;br /&gt;
|1||2||1A||{{ottdp| | }}||decide the following frame of the animations&lt;br /&gt;
|-&lt;br /&gt;
|2||4||1B||{{ottdp| | }}||periodically start/stop the animation&lt;br /&gt;
|-&lt;br /&gt;
|3||8||1C||{{ottdp| | }}||change animation when construction state changes&lt;br /&gt;
|-&lt;br /&gt;
|4||10||1E||{{ottdp| | }}||decide the color of the building&lt;br /&gt;
|-&lt;br /&gt;
|5||20||1F||{{ottdp| | }}||decide the cargos amounts accepted&lt;br /&gt;
|-&lt;br /&gt;
|6||40||20||{{ottdp| | }}||decide the length of the current animation frame&lt;br /&gt;
|-&lt;br /&gt;
|7||80||21||{{ottdp| | }}||trigger destruction of building&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Property 1D was introduced after all bits of property 14 were filled. Its usage is the same, only the meaning of bits is different:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Variable 0C value!!Version!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||2A||{{ottdp| | }}||decide the cargo types accepted&lt;br /&gt;
|-&lt;br /&gt;
|1||2||2E||{{ottdp| | }}||custom cargo production&lt;br /&gt;
|-&lt;br /&gt;
|2||4||143||{{ottdp| | }}||conditional protection&lt;br /&gt;
|-&lt;br /&gt;
|3||8||14E||{{ottdp|1.0|2.6|ottdrev=r17558|ttdprev=2249}}||decide if default foundations need to be drawn&lt;br /&gt;
|-&lt;br /&gt;
|4||10||14F||{{ottdp|1.0|2.6|ottdrev=r17558|ttdprev=2249}}||allow or deny autosloping below the tile&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 variational Action2 for callbacks.&lt;br /&gt;
&lt;br /&gt;
Callback flags are ignored for additional building tiles.&lt;br /&gt;
&lt;br /&gt;
=== House override byte (15) ===&lt;br /&gt;
&lt;br /&gt;
Setting this property makes this building appear instead of the given old TTD building type. Setting the property is ignored if the given old house type is already overridden. You can set this property more than once to override more old building types.&lt;br /&gt;
&lt;br /&gt;
No new house of the overridden types will be built in towns.&lt;br /&gt;
&lt;br /&gt;
This property works in a per-tile basis, so you override tiles of old multi-tile buildings individually, although the old type will still be built if you don&#039;t override its north tile.&lt;br /&gt;
&lt;br /&gt;
=== Periodic refresh multiplier (16) ===&lt;br /&gt;
&lt;br /&gt;
This is used for random triggers, and sets how often the tile is re-randomized. When set to X, the tile will be re-randomized on every (X+1)-th periodic processing. (In other words, every (X+1)*256 game ticks.) If you want all tiles to be re-randomized, you must set this (but not necessarily to the same value) for each tile.&lt;br /&gt;
&lt;br /&gt;
If callback 1B is enabled in property 14, it is also called after re-randomizing random bits.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.1|2.5|ttdprev=2.5 beta 9}} In TTDPatch versions before TTDPatch 2.6 r1639 and TTDPatch 2.5 beta 9 (including beta 9), this variable could have any value between 0 and 255. After these versions, the upper limit has been lowered to 63. To maintain compatibility, values above 63 will be interpreted as 63.&lt;br /&gt;
&lt;br /&gt;
=== Random colours (17) ===&lt;br /&gt;
&lt;br /&gt;
This specifies four colors used for random painting (see [[Action2HousesIndustryTiles]]). Each byte of the dword defines a color, the values are the same as in Action2, except that numbering starts from zero instead of 775. If not set, this defaults to 04 08 0c 06 (red, blue, orange and green, the colors of the modern office building). Can be set to different values for tiles of multi-tile buildings.&lt;br /&gt;
&lt;br /&gt;
=== Probability (18) ===&lt;br /&gt;
&lt;br /&gt;
This sets the relative probability of this house being built. Old TTD house types have a probability of 16, and this is the default for new types as well.&lt;br /&gt;
&lt;br /&gt;
Increase (or better multiply) this value to make your building appear relatively more often, or decrease (divide) it to make it rarer. If you set this to zero, the house type never appears. The minimal useful value 1 means it&#039;s sixteen times less probable to build this type than a normal type, while the maximum setting of 255 means it&#039;s almost sixteen times more probable.&lt;br /&gt;
&lt;br /&gt;
The probability is relative since the absolute probability depends on the count and probability of other houses as well: the more types are available (and the higher their probabilities are), the less the chance is that your type will be chosen.&lt;br /&gt;
&lt;br /&gt;
=== Extra Flags (19) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Version!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||{{ottdp|0.6|2.5}}||This building appears during the generation of a town, but not later, i.e. will appear in random games, but new ones won&#039;t be built during the game. Useful for buildings that are intended to be historical.&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|0.6|2.5}}||This building is protected, i.e. towns and AI players won&#039;t remove it. Human players can still remove it, so you may need to set a high remove cost/rating to make them think twice.&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|0.6|2.5}}||Synchronized [[Callbacks#Animation_control_.281B.2F25.2F140.2F152.2F159.29| callback 1B]]. (for multi-tile buildings)&amp;lt;ref&amp;gt;If synchronized callbacks are enabled, callback 1B will be called when the periodic processing reaches the main tile of the building, and not when it reaches the current tile. This is useful if your animation must run synchronously on every tile of the building. If this bit is set, callback 1B is called according to the main tile&#039;s property 16, not the current one, to make sure every tile stays in sync.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3||8||{{ottdp|0.6|2.5|ttdprev=beta 2}}||[[Callbacks#Next animation frame (1A/26/141/153/158) |Callback 1A]] needs random bits&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Animation Frames (1A) ===&lt;br /&gt;
&lt;br /&gt;
The bottom seven bits define how many frames the animation consists of, minus one. (I.e. 0 means 1 frame, 1 means 2 frames etc.) The highest bit has another purpose (see below), so the biggest supported value is 7F (128 frames).&lt;br /&gt;
&lt;br /&gt;
The highest bit is set if the animation is looping, i.e. it should start again from the first frame after showing the last frame. Non-looping animations stop after the last frame, leaving it on the screen. Both kinds of animations start automatically when the building is created. It&#039;s recommended to use callback 1B with non-looping animations, so they are played multiple times.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|0.6|2.5|ottdrev=r12347|ttdprev=r1639}} In TTDPatch versions before TTDPatch 2.6 r1639 and TTDPatch 2.5 beta 9 (including beta 9) and OpenTTD before r12347, the frame number was limited to 32. If you intend to maintain compatibility with those versions, you should not use animations longer than 32 frames.&lt;br /&gt;
&lt;br /&gt;
=== Animation Speed (1B) ===&lt;br /&gt;
&lt;br /&gt;
This is the amount of time between switching frames.&lt;br /&gt;
&lt;br /&gt;
The default value is 2, which means the switch occurs every 108 milliseconds. Increasing this value by one doubles the wait, i.e. 3 will cause 216 ms delay, while 4 will pause 432 ms, and so on. Values below 2 have the same effect as 2, so the default is the fastest possible setting. The maximum is 16, which means 1769 seconds (approx. half an hour) delay. Settings above this value may cause strange behaviour.&lt;br /&gt;
&lt;br /&gt;
=== Building Class (1C) ===&lt;br /&gt;
&lt;br /&gt;
Types that were given the same class byte are considered to be in the same class. If you don&#039;t explicitly set this value, the type is considered to have no class (it won&#039;t be considered to be class 0). The scope of a class is the current GRF file, so two types are never in the same class if they were defined by different GRF files. Currently, this property affects variable 44 only.&lt;br /&gt;
&lt;br /&gt;
This property is a per-tile one, you can set it for additional tiles as well. It&#039;s a better idea, however, to set it for the main tile only, since var. 44 counts tiles, not buildings, and you may count multi-tile multiple times otherwise.&lt;br /&gt;
&lt;br /&gt;
=== Accepted cargo types (1E) ===&lt;br /&gt;
&lt;br /&gt;
There may be cases when you want your house to accept something other than the default types (passenger, mail, goods and food). This property allows you to do that. If this property is set to FFFFFFFFh (the default), the meaning of properties 0D, 0E and 0F aren&#039;t changed, that is, they are the passenger, mail and goods/food acceptances, accordingly. If this property isn&#039;t FFFFFFFFh, the first three bytes must be climate-dependent cargo slot numbers (the fourth byte is ignored). In this case property 0D is the amount of acceptance of the first cargo type given, 0E is the same for the second type and 0F is the same for the third type.&lt;br /&gt;
&lt;br /&gt;
From GRF version 7 and above, the meaning of this property changes: instead of climate-dependent cargo slot numbers, you have to give climate-independent cargo IDs. If your GRF has a cargo translation table, then this ID is the index in that table; otherwise, it&#039;s the cargo slot number. Acceptance of cargoes not currently present will automatically be disabled.&lt;br /&gt;
&lt;br /&gt;
{{ottd|15.0}} Since 15.0, a default cargo translation table corresponding to the climate is used if one is not provided.&lt;br /&gt;
&lt;br /&gt;
=== Minimum life span in years (1F) ===&lt;br /&gt;
&lt;br /&gt;
Towns are prevented from destroying the house if it hasn&#039;t yet reached the age given here. The default is 0, which means towns are free to remove the house any time they like. Please note that this setting doesn&#039;t prevent AI players from removing the house; only towns are affected. If you need to protect your building from AI players as well, you can set the &amp;quot;protected&amp;quot; flag (property 19 bit 1), or use [[Callbacks#Protect building conditionally (143) |callback 143]] and use your custom code to decide who (and when) is allowed to remove the building.&lt;br /&gt;
&lt;br /&gt;
For this to operate consequently on multi-tile buildings, you must set the same minimum lifespan for all tiles of the building.&lt;br /&gt;
&lt;br /&gt;
=== Cargo acceptance watch list (20) ===&lt;br /&gt;
&lt;br /&gt;
This property is a list of cargo types, types whose acceptance should be watched. The first byte is the length of the list, the remaining bytes identify cargo types. {{grfFrom|7}} If your GRF is version 7 or above, and has a cargo translation table, the bytes are indexes in the table; otherwise, they are cargo slot numbers. When a cargo from this list is accepted by the current tile, [[Callbacks#Watched cargo accepted (148) |callback 148]] is called on &#039;&#039;all&#039;&#039; tiles of the building. See [[Callbacks#Watched cargo accepted (148) |callback 148]] for more details about how this happens.&lt;br /&gt;
&lt;br /&gt;
{{ttdp|}} This property has no effect if the station2 structure isn&#039;t present. The station2 structure is present if any of the following is true:&lt;br /&gt;
* Generalfixes is on, and miscmods.noextendstationrange is off&lt;br /&gt;
* Any of fifoloading, newcargos or irregularstations is on&lt;br /&gt;
&lt;br /&gt;
=== Availability years (long format) - Minimum (21) - Maximum (22) ===&lt;br /&gt;
&lt;br /&gt;
Those two properties allow to specify a range of dates (based on year zero(0) that are not limited to the 1930 dates. So earlier buildings can be introduced. Be sure to add substantial houses to the sets, if you do not wat to have uniform towns, since the current earliest houses will remain in their current 1920 era. Mind also the warning wrt. introduction years as described at property 0A.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15|no}} A value of FFFF is treated as the game&#039;s MAX_YEAR instead of a literal year 65535.&lt;br /&gt;
&lt;br /&gt;
=== Tile acceptance list (23) ===&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=48b334cf}} &lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
 &amp;lt;numinput&amp;gt; (&amp;lt;cargotype&amp;gt; &amp;lt;acceptance&amp;gt;)*&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Variable!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||numinput||Number of (&amp;lt;cargotype&amp;gt; &amp;lt;acceptance&amp;gt;) pairs to follow,&lt;br /&gt;
|-&lt;br /&gt;
|B||cargotype||Cargotype (from CTT) to accept.&lt;br /&gt;
|-&lt;br /&gt;
|B||acceptance||Acceptance in 1/8 units.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This property defines up to 16 cargotypes, which are accepted by the house.&lt;br /&gt;
Use this property instead of property 0D..0F.&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/Ships&amp;diff=4930</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=4930"/>
		<updated>2025-02-17T14:53:18Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&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;&amp;lt;br/&amp;gt;&lt;br /&gt;
{{ottd|15.0}} Since 15.0, a default cargo translation table corresponding to the climate is used if one is not provided.&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]]. &amp;lt;b&amp;gt;Obsoleted by properties 1E/1F&amp;lt;/b&amp;gt;&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 (28, 29, 32)|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 (28, 29, 32)|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;
|25||W||{{ottdp|15|no|ottdrev=gd2496b6ec4}}||Cargo classes required for refittability, see [[Action0Trains#Cargo_classes (28, 29, 32)|train prop. 32]]&lt;br /&gt;
|-&lt;br /&gt;
|26||W n*W||{{ottdp|15}}||List of badges&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;
|9||200||163||{{ottdp|15|no|ottdrev=gd2496b6ec4}}Custom refit&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>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/Planes&amp;diff=4929</id>
		<title>Action0/Vehicles/Planes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/Planes&amp;diff=4929"/>
		<updated>2025-02-17T14:53:07Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&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 planes.&lt;br /&gt;
&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}}||Is helicopter? 2=no, 0=yes&lt;br /&gt;
|-&lt;br /&gt;
|0A||B||{{ottdp|0.6|2.0}}||Is large? 0=no, 1=yes (i.e. can&#039;t safely land on small airports)&lt;br /&gt;
|-&lt;br /&gt;
|0B||B||{{ottdp|0.6|2.0}}||Cost factor&lt;br /&gt;
|-&lt;br /&gt;
|0C||B||{{ottdp|0.6|2.0}}||Speed in units of 8 mph, that is: property = (speed in mph) / 8&lt;br /&gt;
|-&lt;br /&gt;
|0D||B||{{ottdp|0.6|2.0}}||Acceleration in units of 3/8 mph/tick, that is: property = (acceleration in mph/tick) * 8/3 &amp;lt;ref&amp;gt;{{ottd|&amp;amp;lt;1.3.1}} In OpenTTD before r25115 the units for acceleration were messed up. The unit used was about 1 mph/tick, so aircraft accelerated more than twice as fast. Also values bigger than 19 failed.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|0E||B||{{ottdp|0.6|2.0}}||Running cost factor&lt;br /&gt;
|-&lt;br /&gt;
|0F||W||{{ottdp|0.6|2.0}}||Primary cargo capacity (passenger or refitted cargo)&lt;br /&gt;
|-&lt;br /&gt;
|11||B||{{ottdp|0.6|2.0}}||Secondary cargo capacity (mail)&lt;br /&gt;
|-&lt;br /&gt;
|12||B||{{ottdp|0.6|2.0}}||Sound effect&lt;br /&gt;
|-&lt;br /&gt;
|13||D||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Bit mask of cargo types available for refitting, see column 2 (Bit Value) in [[CargoTypes]]. &amp;lt;b&amp;gt;Obsoleted by properties 1D/1E&amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Callback flags bit mask, see below&lt;br /&gt;
|-&lt;br /&gt;
|15||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;
|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 58}}||Miscellaneous vehicle flags&lt;br /&gt;
|-&lt;br /&gt;
|18||W||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Refittable cargo classes, see [[Action0Trains#Cargo_classes (28, 29, 32)|train prop. 28]]&lt;br /&gt;
|-&lt;br /&gt;
|19||W||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Non-refittable cargo classes, see [[Action0Trains#Cargo_classes (28, 29, 32)|train prop. 29]]&lt;br /&gt;
|-&lt;br /&gt;
|1A||D||{{ottdp|0.6|2.5|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||W||{{ottdp|1.2|no|ottdrev=r22713}}||Custom cargo ageing period&lt;br /&gt;
|-&lt;br /&gt;
|1D||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;
|1E||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;
|1F||W||{{ottdp|1.2|no|ottdrev=r23504}}||Aircraft range in tiles. Distance is euclidean, a value of 0 means range is unlimited&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|15|no|ottdrev=gd2496b6ec4}}||Cargo classes required for refittability, see [[Action0Trains#Cargo_classes (28, 29, 32)|train prop. 32]]&lt;br /&gt;
|-&lt;br /&gt;
|24||W n*W||{{ottdp|15}}||List of badges&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Primary (0F) and secondary (11) cargo capacity ===&lt;br /&gt;
Aircraft can transport up to two cargo types.&lt;br /&gt;
The first (primary) cargo type can be changed when refitting the aircraft.&lt;br /&gt;
&lt;br /&gt;
The secondary cargo type is always mail, and is only present when the primary cargo type is part of the [[Action0/Cargos#CargoClasses_.2816.29|passenger cargo class]].&lt;br /&gt;
&lt;br /&gt;
See also the page about [[VehicleRefitting|vehicle refitting]].&lt;br /&gt;
&lt;br /&gt;
=== Sound effect (12) ===&lt;br /&gt;
&lt;br /&gt;
The following sound effects are used by planes (note, the setting is ignored for helicopters):&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!!Sound&lt;br /&gt;
|-&lt;br /&gt;
|06||Propeller sound 1&lt;br /&gt;
|-&lt;br /&gt;
|07||Jet sound 1&lt;br /&gt;
|-&lt;br /&gt;
|3B||Supersonic&lt;br /&gt;
|-&lt;br /&gt;
|3D||Jet sound 2&lt;br /&gt;
|-&lt;br /&gt;
|45||Propeller sound 2&lt;br /&gt;
|-&lt;br /&gt;
|46||Jet sound 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&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;
{{ottdp|1.11|no|ottdrev=6198a47}} Since OpenTTD g6198a47 this prop can be used to to set custom Action11 sound effects for helicopers. Default sound effects are ignored as before.&lt;br /&gt;
&lt;br /&gt;
=== Callbacks (14, 22) ===&lt;br /&gt;
For planes, the following [[callbacks]] have to be enabled by setting the corresponding bit in property 14 (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;
|9||200||163||{{ottdp|15|no|ottdrev=gd2496b6ec4}}Custom refit&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 (15) ===&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 15 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;
Note: This also applies to the rotor sprite, if custom rotor sprites are used.&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 1A|trains]] for details.&lt;br /&gt;
&lt;br /&gt;
=== Custom cargo ageing period (1C) ===&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>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Stations&amp;diff=4928</id>
		<title>Action0/Stations</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Stations&amp;diff=4928"/>
		<updated>2025-02-17T14:52:50Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
Defining properties of new stations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unlike vehicles, the new stations have no equivalent in TTD. The IDs are therefore free to be chosen and will in fact be allocated automatically. In action 0, you only specify IDs relative to the set, i.e. the ID of the first station type is 00, the second station type is 01 and so on.&lt;br /&gt;
&lt;br /&gt;
{{ttdp|}} In TTDPatch each game can only have 255 station IDs for all active grf files.&lt;br /&gt;
&lt;br /&gt;
The only property you &#039;&#039;&#039;must&#039;&#039;&#039; set for each station ID is 08 (in addition to defining an [[Action3|action 3]] for it), anything else can be left at the default. It must be the first property you set for each station ID, because the station ID is actually undefined until it has been assigned a class through property 08. Also, all station 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;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||D||{{ottdp|0.6|2.5|ttdprev=alpha 19}}||Class ID, see below&lt;br /&gt;
|-&lt;br /&gt;
|09||V||{{ottdp|0.6|2.5|ttdprev=alpha 20}}||Sprite layout, see below&lt;br /&gt;
|-&lt;br /&gt;
|0A||B/B*||{{ottdp|0.6|2.5|ttdprev=alpha 20}}/{{ottdp|14.0}}||Copy sprite layout&lt;br /&gt;
|-&lt;br /&gt;
|0B||B||{{ottdp|0.6|2.5|ttdprev=alpha 22}}||Callback flags&lt;br /&gt;
|-&lt;br /&gt;
|0C||B||{{ottdp|0.6|2.5|ttdprev=alpha 22}}||Bit mask of disabled numbers of platforms&lt;br /&gt;
|-&lt;br /&gt;
|0D||B||{{ottdp|0.6|2.5|ttdprev=alpha 22}}||Bit mask of disabled platform lengths&lt;br /&gt;
|-&lt;br /&gt;
|0E||V||{{ottdp|0.6|2.5|ttdprev=alpha 22}}||Define custom layout, see below&lt;br /&gt;
|-&lt;br /&gt;
|0F||B/B*||{{ottdp|0.6|2.5|ttdprev=alpha 22}}/{{ottdp|14.0}}||Copy custom layout from stationid given by argument&lt;br /&gt;
|-&lt;br /&gt;
|10||W||{{ottdp|0.6|2.5|ttdprev=alpha 25}}||Little/lots threshold&lt;br /&gt;
|-&lt;br /&gt;
|11||B||{{ottdp|0.6|2.5|ttdprev=alpha 27}}||Pylon placement&lt;br /&gt;
|-&lt;br /&gt;
|12||D||{{ottdp|0.6|2.5|ttdprev=alpha 30}}||Bit mask of cargo type triggers for random sprites&lt;br /&gt;
|-&lt;br /&gt;
|13||B||{{ottdp|0.6|2.5|ttdprev=alpha 30}}||General flags&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|0.6|2.5|ttdprev=alpha 47}}||Overhead wire placement&lt;br /&gt;
|-&lt;br /&gt;
|15||B||{{ottdp|0.6|2.5|ttdprev=alpha 51}}||Can train enter tile&lt;br /&gt;
|-&lt;br /&gt;
|16||W||{{ottdp|0.7|2.5|ttdprev=beta 9}}||Animation information&lt;br /&gt;
|-&lt;br /&gt;
|17||B||{{ottdp|0.7|2.5|ttdprev=beta 9}}||Animation speed&lt;br /&gt;
|-&lt;br /&gt;
|18||W||{{ottdp|0.7|2.5|ttdprev=beta 9}}||Animation triggers&lt;br /&gt;
|-&lt;br /&gt;
|1A||V||{{ottdp|1.2|no|ottdrev=r22518}}||Advanced sprite layout with register modifiers&lt;br /&gt;
|-&lt;br /&gt;
|1B|| || ||Reserved&lt;br /&gt;
|-&lt;br /&gt;
|1C||W||{{ottdp|14}}||Station name&lt;br /&gt;
|-&lt;br /&gt;
|1D||W||{{ottdp|14}}||Station class name&lt;br /&gt;
|-&lt;br /&gt;
|1E||V||{{ottdp|15}}||Station sprite layout flags&lt;br /&gt;
|-&lt;br /&gt;
|1F||W n*W||{{ottdp|15}}||List of badges&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unofficial additions and changes. Don&#039;t rely on them to ever work this way in OpenTTD or TTDPatch:&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|1B||8*B||whatever-PP||Minimum bridge height for bridges over stations&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Station class (08) ===&lt;br /&gt;
TTDPatch groups sets of new station graphics into various classes. &amp;amp;nbsp;The classes can be selected by the top dropdown list in the construction window, and the individual stations within the class from the bottom dropdown list. &amp;amp;nbsp;In addition, each station can alter its appearance using [[VariationalAction2|variational]] and/or [[RandomAction2|random]] action 2 entries.&lt;br /&gt;
&lt;br /&gt;
Only two classes are pre-defined:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Name!!Class ID!!Intended use for station&lt;br /&gt;
|-&lt;br /&gt;
|DFLT||44 46 4C 54||Default, no special station type&lt;br /&gt;
|-&lt;br /&gt;
|WAYP||57 41 59 50||Non-cargo stations, waypoints, signal boxes etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You may simply use other classes than the above, as long as no more than (at the moment) 16 classes are used among all active .grf files at any time.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Station classes which start with the byte FF are considered waypoint classes, and will appear in the waypoint construction window instead of the station construction window.&lt;br /&gt;
&lt;br /&gt;
When a waypoint station is built, it will not accept cargo nor will any cargo appear from nearby industries or towns. &amp;amp;nbsp;Trains will not stop at waypoint stations, regardless of the non-stop order and/or the nonstop switch.&lt;br /&gt;
&lt;br /&gt;
=== Sprite layout (09) ===&lt;br /&gt;
This controls what sprites are displayed, where they are displayed, and in what order. &amp;amp;nbsp;The property is variable sized, and contains the data for all 8 possible station tile types. &amp;amp;nbsp;If this property is set, the num-ent in the corresponding [[Action1|action 1]] need not be equal to 12 (hex), it can in fact be any number, and any number of sprites can be displayed in any order.&lt;br /&gt;
&lt;br /&gt;
The data is specified as data for all eight tiles in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;data1&amp;amp;gt; &amp;amp;lt;data2&amp;amp;gt; ... &amp;amp;lt;datan&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B*||num||Number of different tiles supported (see below)&lt;br /&gt;
|-&lt;br /&gt;
|V||data1...||The variable size data for each of the &amp;amp;lt;num&amp;amp;gt; tiles, as specified below&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Number of tiles supported =====&lt;br /&gt;
* Normally this is 8, but you can specify fewer as well&lt;br /&gt;
* Using callback flags bit 1, specifying more makes sense too&lt;br /&gt;
* This value must be the same for all stations set by this action 0, even though it must be repeated for the prop. 09 definition of each station ID as well&lt;br /&gt;
&lt;br /&gt;
(Note that num is an extended byte, see [[GRFActionsDetailed]].)&lt;br /&gt;
&lt;br /&gt;
The content of each of the (usually eight) data sets is either a new sprite layout:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|D||groundsprite||the sprite to draw for the rails; this is by default a TTD sprite, but with bit 31 set an [[Action1|action 1]] sprite (42D+X) may be specified&lt;br /&gt;
|-&lt;br /&gt;
|V||spritedata||the data for station sprites, see below; each has a size of 10 bytes, and there may be several&lt;br /&gt;
|-&lt;br /&gt;
|B||80||a literal 80 ends the list of sprites for this tile&lt;br /&gt;
|}&lt;br /&gt;
or, alternatively, the instruction to use TTD&#039;s layout by using four zero bytes 00 00 00 00 instead of the groundsprite bytes. You can use [http://www.bytetransfer.de/projects/ttdpatch/docs/spriteidmapping.php the online sprite ID converter] to look up the sprite IDs you can use for all the climates.&lt;br /&gt;
&lt;br /&gt;
One can draw two types of sprites. &amp;amp;nbsp;One type is one that establishes a new 3D bounding box for use by the sprite sorter. &amp;amp;nbsp;The other type shares the 3D bounding box of the previous sprite(s). &amp;amp;nbsp;It must not be larger than the sprite which established the bounding box, nor must any part of it be outside this box. &amp;amp;nbsp;For simplicity, it should have the exact same dimensions as the sprite it shares the bounding box with. &amp;amp;nbsp;The latter type is supported in the station construction window display only since TTDPatch 2.6 r1684.&lt;br /&gt;
&lt;br /&gt;
The spritedata of sprites with their own bounding box has this format:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||xofs||x-offset from northern tile corner&lt;br /&gt;
|-&lt;br /&gt;
|B||yofs||y-offset from northern tile corner&lt;br /&gt;
|-&lt;br /&gt;
|B||zofs||z-offset from northern tile corner&lt;br /&gt;
|-&lt;br /&gt;
|B||xextent||size of sprite in x direction&lt;br /&gt;
|-&lt;br /&gt;
|B||yextent||size of sprite in y direction&lt;br /&gt;
|-&lt;br /&gt;
|B||zextent||size of sprite in z direction&lt;br /&gt;
|-&lt;br /&gt;
|D||sprite||sprite number to draw&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The spritedata of sprites sharing the bounding box has this format:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||xofs||x-offset relative to previous sprite&lt;br /&gt;
|-&lt;br /&gt;
|B||yofs||y-offset relative to previous sprite&lt;br /&gt;
|-&lt;br /&gt;
|B||80||a literal 80&lt;br /&gt;
|-&lt;br /&gt;
|B||00||(ignored)&lt;br /&gt;
|-&lt;br /&gt;
|B||00||(ignored)&lt;br /&gt;
|-&lt;br /&gt;
|B||00||(ignored)&lt;br /&gt;
|-&lt;br /&gt;
|D||sprite||sprite number to draw&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Since OpenTTD r18959 you can draw multiple ground sprites for a tile, which is useful if you want to use the usual rail/grass/concrete groundtile, but still need to add features to it without using a new bounding box. To do so use the syntax of sprites sharing the previous bounding box, but use it before the first bounding box definition. xpixeloffset and ypixeloffset refer to the usual spot of groundtiles. The same feature is also partially supported in TTDPatch since TTDPatch 2.6 r2312: TTDPatch ignores the xofs and yofs fields and always uses (0,0) for the offset. If you are developing a GRF that needs to be compatible with both OpenTTD and TTDPatch, you should always keep xofs and yofs zero to get the same effect in both games.&lt;br /&gt;
Note however that both implementations do not consider the [[Action0/Stations#General_Flags_.2813.29|setting of prop13 bit 0]], hence these &amp;quot;multiple ground sprites&amp;quot; have to be always part of the building sprites set and cannot be part of the different sprite set for ground sprites.&lt;br /&gt;
&lt;br /&gt;
The sprite number can have the following values (remember to use little endian, i.e. reversed byte order):&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!!Sprite&lt;br /&gt;
|-&lt;br /&gt;
|0000042D+X||use sprite X from the corresponding [[Action1|action 1]] block (i.e. 0000042D for the first, 0000042E for the second, etc.)&lt;br /&gt;
|-&lt;br /&gt;
|0000842D+X||same, but draw it using company colour translation&lt;br /&gt;
|-&lt;br /&gt;
|0322442D+X||same, but draw in transparent mode (actual colours of the sprite are disregarded entirely); supported in station construction window display since TTDPatch 2.6 r1683&lt;br /&gt;
|-&lt;br /&gt;
|RRRR842D+X||draw sprite with colour translation defined in sprite RRRR; available since TTDPatch 2.6 r1683&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
With bit 31 set, this sprite will refer to a TTD sprite, not the action 1 sprite. For the first ground sprite the reverse meaning applies.&lt;br /&gt;
&lt;br /&gt;
Depending on the railtype the sprites may get additional offsets:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
! !! Normal/electrified rail !! Monorail !! Maglev&lt;br /&gt;
|-&lt;br /&gt;
|TTD sprites || 0 || 82 || 164&lt;br /&gt;
|-&lt;br /&gt;
|Action 1 sprite (first ground sprite) || 0 || 1 || 2&lt;br /&gt;
|-&lt;br /&gt;
|Action 1 sprite (other sprites in the layout) || 0 || 0 || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
So, TTD sprites and the first ground sprite are affected by the railtype, while other action 1 sprites in the layout are not. The offset &amp;quot;82&amp;quot; refers to the offset between the default TTD track sprites; if you are using non-track ground sprites which are not from an action 1, you need to supply fake spritenumbers which preemptively reverse the offsets (that is, you need different sprite layouts for every railtype your station is available for).&lt;br /&gt;
&lt;br /&gt;
Setting bit 30 forces this sprite to be displayed normally even in &amp;quot;transparent buildings&amp;quot; mode (supported only in TTDPatch 2.6 r1695 and later).&lt;br /&gt;
&lt;br /&gt;
See below for an example of linked sprites as well as transparent sprites (e.g. for a station roof).&lt;br /&gt;
&lt;br /&gt;
Note that the coordinates here are 3D coordinates with x running from top-right to bottom-left and y running from top-left to bottom-right, with the tile dimensions being 16x16 (and 8 for one height level). This means the x and y values should always be within 0-15 (decimal).&lt;br /&gt;
&lt;br /&gt;
This is different to and independent from the x/y offsets used in the actual .NFO file. &amp;amp;nbsp;The 3D bounding box is used by TTD&#039;s sprite sorter to figure out the order in which to draw the sprites, as well as telling it which sprites to draw, because those whose bounding box falls outside the currently updated screen rectangle will not be drawn. &amp;amp;nbsp;Make sure the 3D bounding box is large enough to contain the entire sprite, but not so large that the sprite sorter can&#039;t determine which sprites should be in front.&lt;br /&gt;
&lt;br /&gt;
This means that the order in which you specify sprites is irrelevant. &amp;amp;nbsp;Sprites will get drawn from back to front, in the order which the sprite sorter determines as correct, from their bounding boxes. &amp;amp;nbsp;There are two exceptions, however:&lt;br /&gt;
* Sprites sharing the same bounding box will always be drawn in the given order.&lt;br /&gt;
* The station construction window display doesn&#039;t use the sprite sorter. Tiles that may be displayed in that window need to be specified in the correct drawing order, back to front.&lt;br /&gt;
&lt;br /&gt;
=== Copy sprite layout (0A) ===&lt;br /&gt;
&lt;br /&gt;
This is not a property as such, but an action. &amp;amp;nbsp;It takes as argument a byte which is interpreted as station-ID to copy the custom sprite layout from.&lt;br /&gt;
&lt;br /&gt;
Since {{ottdp|14.0}} this property is now an extended byte.&lt;br /&gt;
&lt;br /&gt;
=== Callback flags (0B) ===&lt;br /&gt;
For stations, the following [[callbacks]] can be defined by setting the corresponding bit in property 0B:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Variable 0C value!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||13||Whether to make station available in construction window (non-zero callback return) or not (callback returns zero)&lt;br /&gt;
|-&lt;br /&gt;
|1||2||14||Use callback to select sprite layout&lt;br /&gt;
|-&lt;br /&gt;
|2||4||141||Decide next animation frame&lt;br /&gt;
|-&lt;br /&gt;
|3||8||142||Decide animation speed&lt;br /&gt;
|-&lt;br /&gt;
|4||10||149||Custom slope check&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 [[VariationalAction2|VarAction2]] for callbacks.&lt;br /&gt;
&lt;br /&gt;
=== Selection of numbers of platforms and length (0C, 0D) ===&lt;br /&gt;
&lt;br /&gt;
By default all platform lengths and any number of platforms is available for the new stations. &amp;amp;nbsp;Using these properties, you can choose which ones should be unavailable by setting the corresponding bit in the property.&lt;br /&gt;
&lt;br /&gt;
The values are a byte, used as a bit mask. &amp;amp;nbsp;Bits 0 to 6 control the availability of number or length 1 to 7, and bit 7 controls the availability of the &amp;quot;+7&amp;quot; button. &amp;amp;nbsp;Each bit that is set disables the corresponding length or number of platforms.&lt;br /&gt;
&lt;br /&gt;
For compatibility with &amp;quot;largestations off&amp;quot;, at least one length between 1 and 5 (bits 0 to 4) and one number of platforms between 1 and 4 (bits 0 to 3) must be available, i.e. at least one of these bits must be unset.&lt;br /&gt;
&lt;br /&gt;
=== Define custom layout (0E) ===&lt;br /&gt;
&lt;br /&gt;
This allows choosing which tile type is built at which tile of a newly built station. &amp;amp;nbsp;There are four different types, which TTD normally defines as&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Tile type!!Appearance&lt;br /&gt;
|-&lt;br /&gt;
|00||plain platform&lt;br /&gt;
|-&lt;br /&gt;
|02||platform with building&lt;br /&gt;
|-&lt;br /&gt;
|04||platform with roof, left side&lt;br /&gt;
|-&lt;br /&gt;
|06||platform with roof, right side&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Since {{ottdp|15}}, all even values up to FE are supported if the sprite layout is defined via property 09/0A.&lt;br /&gt;
&lt;br /&gt;
These numbers are used for stations in NE-SW direction, or these numbers plus one for stations in the NW-SE direction. &amp;amp;nbsp;To define a custom layout, use this format:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||length||length of platforms for this layout&lt;br /&gt;
|-&lt;br /&gt;
|B||number||number of platforms for this layout&lt;br /&gt;
|-&lt;br /&gt;
|V||tiles||length*number bytes of tile types, one platform after another, only 00, 02, 04 or 06 are allowed as values&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Repeat this as often as necessary to define the layouts for all supported combinations of length and number. &amp;amp;nbsp;End the definitions with a 00 00 (zero length and zero number). &amp;amp;nbsp;Any combinations that are not defined will be built using TTD&#039;s default layout.&lt;br /&gt;
Note that it may be easier to draw different sprite sets using a [[VariationalAction2|VarAction2]] based on [[VarAction2Stations#Platform info 40 41 46 47 49|station variable 40]], rather than redefining the layout. &amp;amp;nbsp;In addition, [[Callbacks#Custom station layout 24|callback 24]] will be used to further customize the layout as defined by this property (or by TTD if no prop 0E layout is available). This may also be easier than defining a prop 0E layout for every combination of length and number of platforms.&lt;br /&gt;
&lt;br /&gt;
=== Copy custom layout (0F) ===&lt;br /&gt;
&lt;br /&gt;
Similar to property 0A, this copies the custom layout from the station-ID given by the argument.&lt;br /&gt;
&lt;br /&gt;
Since {{ottdp|14.0}} this property is now an extended byte.&lt;br /&gt;
&lt;br /&gt;
=== Little/lots threshold (10) ===&lt;br /&gt;
Amount of cargo for switching from &amp;quot;little&amp;quot; to &amp;quot;lots&amp;quot; of cargo. &amp;amp;nbsp;TTDPatch separates the full range of cargo amounts (0 to 4095) into two separate subranges, &amp;quot;little&amp;quot; and &amp;quot;lots&amp;quot; of cargo. &amp;amp;nbsp;This allows better control of cargo amount based graphics (if needed). &amp;amp;nbsp;Property 10 specifies at what amount of cargo the patch is to switch from one to the other subrange. &amp;amp;nbsp;See [[Action2Stations|Action 2 for stations]] for more information.&lt;br /&gt;
&lt;br /&gt;
=== Pylon placement (11) and wire placement (14) ===&lt;br /&gt;
Prop. 11 sets which tile types should have pylons when used with electrified tracks. By default, tiles 0-3 (default stations without roof) have pylons, and tiles 4-7 (default stations with roof) don&#039;t. This is a bit mask of tile types, with a bit set meaning that a pylon should be drawn. The tile types here do not consider [[Callbacks#Station sprite layout 14|callback 14]], but rather the type as it was built, i.e. from prop. 0E.&lt;br /&gt;
&lt;br /&gt;
Prop. 14 works in a similar way, except that it sets the tile types on which there should be &#039;&#039;no&#039;&#039; wires displayed. With the default value of &amp;quot;00&amp;quot;, wires are displayed everywhere, and for each bit set, the wire is omitted on that tile type.&lt;br /&gt;
&lt;br /&gt;
This property should only be used when the wires cause problems with the sprite sorter, because even when the wire is obscured by a station hall or similar, it should still show up in transparent mode so that each tile can easily be verified as being electrified.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Note: This property only allows setting the flags of the first 8 sprite layouts. Use Property 1E instead to set flags when more sprite layouts are used via prop. 0E or [[Callbacks#Custom_station_layout_.2824.29|callback 24]].&lt;br /&gt;
&lt;br /&gt;
=== Cargo types for random triggers (12) ===&lt;br /&gt;
&lt;br /&gt;
This sets which cargo types should trigger re-randomizing. The cargo types are given as a bitmask of the bits from column 3 (type B) in CargoTypes. &amp;amp;nbsp;If nothing is set (the default), the no random triggers will happen, to conserve CPU time.&lt;br /&gt;
&lt;br /&gt;
With GRF version 7 and above, the interpretation of bits changes. Instead of climate-dependent cargo slot numbers (type B), you have to set the bits of climate-independent cargo ID (type A).&lt;br /&gt;
&lt;br /&gt;
{{ottd|15.0}} Since 15.0, a default cargo translation table corresponding to the climate is used if one is not provided.&lt;br /&gt;
&lt;br /&gt;
=== General Flags (13) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Version!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||{{ottdp|0.7|2.5}}||use different sprite set for ground sprites ([[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|var. 10]] is 1 for ground sprites, 0 otherwise)&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|0.6|2.5}}||when calculating the cargo amount to display, divide the amount by the station size (to simulate cargo distributed over the area of the station)&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|0.7|2.5}}||[[Callbacks#Next animation frame (1A/26/141/153/158)|callback 141]] needs random bits in var. 10&lt;br /&gt;
|-&lt;br /&gt;
|3||8||{{ottdp|1.0|2.6}}||Use custom foundations on sloped tiles (the lowest byte of [[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|var. 10]] is 2 for foundation sprites)&lt;br /&gt;
|-&lt;br /&gt;
|4||10||{{ottdp|1.0|2.6}}||When bit 3 is set, use extended foundation block instead of the simple one&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Bit 3 works somewhat similarly to bit 0: your sprite selection will be called again, with 2 in the lowest byte of [[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|variable 10]]. If the chain ends on a callback result, the program will assume the foundation selection has failed and will use the default foundaton sprites. The low word of [[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|variable 18]] will contain the tile type of the current tile; if you have [[Callbacks#Station sprite layout (14)|callback 14]] enabled, this will be the its return value - otherwise, the default TTD types (platform with building, platform with left roof etc.) are used. In either case, one is added for the NW-SE orientation, in case your station needs different foundations depending on its orientation. Bits 16 and 17 are set if the NW and and NE foundations are to merged with the corresponding neighbour tile, so you shouldn&#039;t draw the corresponding edge in the foundation sprite. Other bits of variable 10 and variable 18 are reserved for future use.&lt;br /&gt;
&lt;br /&gt;
Your sprite selection code should select a foundation sprite block. The contents of this block depends on whether bit 4 is set or not.&lt;br /&gt;
* Bit 4 clear (simple foundations):&lt;br /&gt;
[[File:simple_foundations.png]]&lt;br /&gt;
&lt;br /&gt;
The programme will combine the needed foundation from these 8 sprites depending on the current slope. You don&#039;t need to care about the merge data in bits 16..17 of [[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|variable 18]]; it will be taken care of that automatically by adding the 7th and 8th sprite only when necessary.&lt;br /&gt;
* Bit 4 set (extended foundations):&lt;br /&gt;
[[File:extended_foundations.png]]&lt;br /&gt;
&lt;br /&gt;
You need to have one sprite for every slope that&#039;s possible below a rail station. The correct one will be automatically selected depending on the current slope. It can&#039;t handle the merging itself, however, so you need four foundation blocks: one with no edges removed, one with the NW edge removed, one with the NE edge removed and one with both north edges removed. Your sprite selection code is responsible for selecting the correct of those blocks according to the merge info in [[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|variable 18]].&lt;br /&gt;
&lt;br /&gt;
In both cases, you can put an additional value into register 100h, which will serve as an offset into the selected block. If you don&#039;t modify register 100h during the chain, it will default to 0. It is important that the dimensions of these sprites remain the same - thus bit 6 in the real sprites must be set to prevent GRFCodec from trimming the empty blue areas. The offset of these foundations must be -31 to the X direction and -9 to the Y direction.&lt;br /&gt;
&lt;br /&gt;
=== Can train enter tile (15) ===&lt;br /&gt;
&lt;br /&gt;
Like props. 11 and 14, this value contains eight bits relating to the eight possible tile types. If a bit is set, trains are prevented from routing through or entering any tile of this type.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Note: This property only allows setting the flags of the first 8 sprite layouts. Use Property 1E instead to set flags when more sprite layouts are used via prop. 0E or [[Callbacks#Custom_station_layout_.2824.29|callback 24]].&lt;br /&gt;
&lt;br /&gt;
=== Animation information (16) ===&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;
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/152/159)|callback 140]] 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/153/158)|callback 141]] for that.&lt;br /&gt;
&lt;br /&gt;
=== Animation speed (17) ===&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 2.&lt;br /&gt;
&lt;br /&gt;
=== Animation triggers (18) ===&lt;br /&gt;
This is a bit mask of events that should trigger [[Callbacks#Animation control (1B/25/140/152/159)|callback 140]], allowing to change the animation state&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Version!!Meaning!!Happens on!!Var 18&lt;br /&gt;
|-&lt;br /&gt;
|0||1||{{ottdp|0.7|2.5}}||Station part is built||the newly built tiles||&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|0.7|2.5}}||New cargo arrives to station||whole station||&amp;lt;ref name=&amp;quot;cargotype&amp;quot;&amp;gt;Bits 8..15 of var 18 contain the triggering cargo type. If your GRF has a cargo translation table, the cargo type will be an index in that table, or FFh if the cargo isn&#039;t in the table. If you don&#039;t have a cargo translation table, the cargo type will simply be the climate-dependent cargo type number.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|0.7|2.5}}||A cargo type gets removed from station||whole station||&amp;lt;ref name=&amp;quot;cargotype&amp;quot;/&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3||8||{{ottdp|0.7|2.5}}||Train enters station (starts loading/unloading)||platform where the train is||&lt;br /&gt;
|-&lt;br /&gt;
|4||10||{{ottdp|0.7|2.5}}||Train leaves station (done loading/unloading)||platform where the train is||&lt;br /&gt;
|-&lt;br /&gt;
|5||20||{{ottdp|1.2|2.5|ottdrev=r22746}}||Train loads/unloads cargo||platform where the train is||&lt;br /&gt;
|-&lt;br /&gt;
|6||40||{{ottdp|0.7|2.5}}||Every 250 ticks||whole station||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The remaining bits are reserved for future triggers, they must be zero for now.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;happens on&amp;quot; column tells which tiles will [[Callbacks#Animation control (1B/25/140/152/159) |callback 140]] be called on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Advanced sprite layout with register modifiers (1A) ===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.2|no|ottdrev=r22518}}&lt;br /&gt;
Format:&lt;br /&gt;
 1A &amp;lt;num-layouts&amp;gt; &amp;lt;0x40 + num-sprites&amp;gt;&lt;br /&gt;
                  &amp;lt;groundsprite&amp;gt; &amp;lt;flags&amp;gt; [&amp;lt;register/value&amp;gt;]...&lt;br /&gt;
                  [ &amp;lt;buildingsprite&amp;gt; &amp;lt;flags&amp;gt;&lt;br /&gt;
                      ( &amp;lt;xoffset&amp;gt; &amp;lt;yoffset&amp;gt; &amp;lt;zoffset&amp;gt; &amp;lt;xextent&amp;gt; &amp;lt;yextent&amp;gt; &amp;lt;zextent&amp;gt; &lt;br /&gt;
                      | &amp;lt;xpixeloffset&amp;gt; &amp;lt;ypixeloffset&amp;gt; 80)&lt;br /&gt;
                    [&amp;lt;register/value&amp;gt;]...&lt;br /&gt;
                  ]...&lt;br /&gt;
&lt;br /&gt;
For further details see [https://wiki.openttd.org/en/Archive/Development/Advanced%20Sprite%20Layout#stations here] for now.&lt;br /&gt;
&lt;br /&gt;
=== Minimum bridge height (1B) ===&lt;br /&gt;
&lt;br /&gt;
This property allows building bridges over stations.&lt;br /&gt;
&lt;br /&gt;
The bridge height property defines minimum clearances required for a bridge for each of the four [[Action0/Stations#Define_custom_layout_.280E.29|tile types]] of this station (or zero to not allow any bridge). Values are given in &amp;quot;height level&amp;quot; units (1 level == 8px).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; |-&lt;br /&gt;
!Height (1)!!Appearance&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; |x1 y1 ||plain platform&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; |x2 y2 ||platform with building&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; |x3 y3 ||platform with roof, left side&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; |x4 y4 ||platform with roof, right side&lt;br /&gt;
|}&lt;br /&gt;
(1) where the values are one byte pairs (x-direction, y-direction) expressed in hexadecimal notation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
&lt;br /&gt;
1B &amp;lt;1st pair&amp;gt; &amp;lt;2nd pair&amp;gt; &amp;lt;3rd pair&amp;gt; &amp;lt;4th pair&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
1B x1 y1 x2 y2 x3 y3 x4 y4&amp;lt;br /&amp;gt;&lt;br /&gt;
1B 01 01 02 02 03 03 03 03 // 8px 16px 24px 24px&lt;br /&gt;
&lt;br /&gt;
This property is currently only available for JGR&#039;s Patch Pack (v0.26.0 and later) and the developmental &amp;quot;New Map Features&amp;quot; (NMF) fork of OpenTTD.&lt;br /&gt;
&lt;br /&gt;
=== Station name (1C) ===&lt;br /&gt;
&lt;br /&gt;
=== Station class name (1D) ===&lt;br /&gt;
&lt;br /&gt;
=== Station sprite layout flags (1E) ===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Since OpenTTD supports more than 8 sprite layouts to be used, props. 11, 14 and 15 are not sufficient to set the flags for all usable sprite layouts. This property is variable length and allows these flags to be set for each tile beyond the original limit of 8.&lt;br /&gt;
&lt;br /&gt;
The data is specified as flags for all sprite layouts in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;num&amp;amp;gt; &amp;amp;lt;flags1&amp;amp;gt; &amp;amp;lt;flags2&amp;amp;gt; ... &amp;amp;lt;flagsn&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Name!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B*||num||Number of different tiles supported (see below)&lt;br /&gt;
|-&lt;br /&gt;
|B||flags1...||The flags for each of the &amp;amp;lt;num&amp;amp;gt; tiles, as specified below&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The flag values are as follows:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
|Bit||Value||Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||01||Tile should contain catenary pylons.&lt;br /&gt;
|-&lt;br /&gt;
|1||02||Tile should NOT contain catenary wires.&lt;br /&gt;
|-&lt;br /&gt;
|2||04||Tile is blocked to vehicles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These should be combined as needed.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Using TTD&#039;s sprite layouts for certain tiles ===&lt;br /&gt;
&lt;br /&gt;
To use TTD&#039;s layout, you use &amp;lt;code&amp;gt;00 00 00 00&amp;lt;/code&amp;gt; for the ground sprite number and leave off everything else.&lt;br /&gt;
&lt;br /&gt;
So instead of for example&lt;br /&gt;
&lt;br /&gt;
 F4 03 00 00&lt;br /&gt;
    00 00 00    10 05 02    2E 84 00 00&lt;br /&gt;
    00 0B 00    10 05 02    30 84 00 00&lt;br /&gt;
    80&lt;br /&gt;
&lt;br /&gt;
you just put&lt;br /&gt;
&lt;br /&gt;
 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
=== Using transparent sprites ===&lt;br /&gt;
&lt;br /&gt;
You can use transparent sprites to make for example the roof translucent like in TTD&#039;s stations. The roof of TTD&#039;s stations is made like this:&lt;br /&gt;
&lt;br /&gt;
 00 00 10    10 10 0A    37 84 00 00&lt;br /&gt;
 00 00 80    00 00 00    3B 44 22 03&lt;br /&gt;
&lt;br /&gt;
The first sprite here is the non-transparent frame of the roof, drawn in company colours (it has bit 15 set). The second part is a special &amp;quot;linked&amp;quot; sprite without its own bounding box, it shares that of the previous sprite. That&#039;s done by setting the z offset to 80.&lt;br /&gt;
&lt;br /&gt;
To make that second sprite transparent, bit 14 is set in the sprite number, and the upper word is set to 322 (*), so 0322443B means to take sprite 43B and draw it in transparent mode. The colours of that sprite are ignored entirely, every pixel in colour 0 is fully transparent, and all other pixels are semi-transparent (essentially just causing what they are drawn over to become darker).&lt;br /&gt;
&lt;br /&gt;
(*) This is the [[RecolorSprites#Default_recolour_sprites | recolour sprite]] for the glass effect.&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/Planes&amp;diff=4927</id>
		<title>Action0/Vehicles/Planes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/Planes&amp;diff=4927"/>
		<updated>2025-02-17T14:52:24Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&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 planes.&lt;br /&gt;
&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}}||Is helicopter? 2=no, 0=yes&lt;br /&gt;
|-&lt;br /&gt;
|0A||B||{{ottdp|0.6|2.0}}||Is large? 0=no, 1=yes (i.e. can&#039;t safely land on small airports)&lt;br /&gt;
|-&lt;br /&gt;
|0B||B||{{ottdp|0.6|2.0}}||Cost factor&lt;br /&gt;
|-&lt;br /&gt;
|0C||B||{{ottdp|0.6|2.0}}||Speed in units of 8 mph, that is: property = (speed in mph) / 8&lt;br /&gt;
|-&lt;br /&gt;
|0D||B||{{ottdp|0.6|2.0}}||Acceleration in units of 3/8 mph/tick, that is: property = (acceleration in mph/tick) * 8/3 &amp;lt;ref&amp;gt;{{ottd|&amp;amp;lt;1.3.1}} In OpenTTD before r25115 the units for acceleration were messed up. The unit used was about 1 mph/tick, so aircraft accelerated more than twice as fast. Also values bigger than 19 failed.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|0E||B||{{ottdp|0.6|2.0}}||Running cost factor&lt;br /&gt;
|-&lt;br /&gt;
|0F||W||{{ottdp|0.6|2.0}}||Primary cargo capacity (passenger or refitted cargo)&lt;br /&gt;
|-&lt;br /&gt;
|11||B||{{ottdp|0.6|2.0}}||Secondary cargo capacity (mail)&lt;br /&gt;
|-&lt;br /&gt;
|12||B||{{ottdp|0.6|2.0}}||Sound effect&lt;br /&gt;
|-&lt;br /&gt;
|13||D||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Bit mask of cargo types available for refitting, see column 2 (Bit Value) in [[CargoTypes]]. &amp;lt;b&amp;gt;Obsoleted by properties 1D/1E&amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Callback flags bit mask, see below&lt;br /&gt;
|-&lt;br /&gt;
|15||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;
|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 58}}||Miscellaneous vehicle flags&lt;br /&gt;
|-&lt;br /&gt;
|18||W||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Refittable cargo classes, see [[Action0Trains#Cargo_classes (28, 29, 32)|train prop. 28]]&lt;br /&gt;
|-&lt;br /&gt;
|19||W||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Non-refittable cargo classes, see [[Action0Trains#Cargo_classes (28, 29, 32)|train prop. 29]]&lt;br /&gt;
|-&lt;br /&gt;
|1A||D||{{ottdp|0.6|2.5|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||W||{{ottdp|1.2|no|ottdrev=r22713}}||Custom cargo ageing period&lt;br /&gt;
|-&lt;br /&gt;
|1D||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;
|1E||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;
|1F||W||{{ottdp|1.2|no|ottdrev=r23504}}||Aircraft range in tiles. Distance is euclidean, a value of 0 means range is unlimited&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|15|no|ottdrev=gd2496b6ec4}}||Cargo classes required for refittability, see [[Action0Trains#Cargo_classes (28, 29, 32)|train prop. 32]]&lt;br /&gt;
|-&lt;br /&gt;
|24||W n*W||{{ottdp|15}}||List of badges||??&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Primary (0F) and secondary (11) cargo capacity ===&lt;br /&gt;
Aircraft can transport up to two cargo types.&lt;br /&gt;
The first (primary) cargo type can be changed when refitting the aircraft.&lt;br /&gt;
&lt;br /&gt;
The secondary cargo type is always mail, and is only present when the primary cargo type is part of the [[Action0/Cargos#CargoClasses_.2816.29|passenger cargo class]].&lt;br /&gt;
&lt;br /&gt;
See also the page about [[VehicleRefitting|vehicle refitting]].&lt;br /&gt;
&lt;br /&gt;
=== Sound effect (12) ===&lt;br /&gt;
&lt;br /&gt;
The following sound effects are used by planes (note, the setting is ignored for helicopters):&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!!Sound&lt;br /&gt;
|-&lt;br /&gt;
|06||Propeller sound 1&lt;br /&gt;
|-&lt;br /&gt;
|07||Jet sound 1&lt;br /&gt;
|-&lt;br /&gt;
|3B||Supersonic&lt;br /&gt;
|-&lt;br /&gt;
|3D||Jet sound 2&lt;br /&gt;
|-&lt;br /&gt;
|45||Propeller sound 2&lt;br /&gt;
|-&lt;br /&gt;
|46||Jet sound 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&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;
{{ottdp|1.11|no|ottdrev=6198a47}} Since OpenTTD g6198a47 this prop can be used to to set custom Action11 sound effects for helicopers. Default sound effects are ignored as before.&lt;br /&gt;
&lt;br /&gt;
=== Callbacks (14, 22) ===&lt;br /&gt;
For planes, the following [[callbacks]] have to be enabled by setting the corresponding bit in property 14 (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;
|9||200||163||{{ottdp|15|no|ottdrev=gd2496b6ec4}}Custom refit&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 (15) ===&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 15 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;
Note: This also applies to the rotor sprite, if custom rotor sprites are used.&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 1A|trains]] for details.&lt;br /&gt;
&lt;br /&gt;
=== Custom cargo ageing period (1C) ===&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>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/Ships&amp;diff=4926</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=4926"/>
		<updated>2025-02-17T14:52:11Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&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;&amp;lt;br/&amp;gt;&lt;br /&gt;
{{ottd|15.0}} Since 15.0, a default cargo translation table corresponding to the climate is used if one is not provided.&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]]. &amp;lt;b&amp;gt;Obsoleted by properties 1E/1F&amp;lt;/b&amp;gt;&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 (28, 29, 32)|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 (28, 29, 32)|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;
|25||W||{{ottdp|15|no|ottdrev=gd2496b6ec4}}||Cargo classes required for refittability, see [[Action0Trains#Cargo_classes (28, 29, 32)|train prop. 32]]&lt;br /&gt;
|-&lt;br /&gt;
|26||W n*W||{{ottdp|15}}||List of badges||??&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;
|9||200||163||{{ottdp|15|no|ottdrev=gd2496b6ec4}}Custom refit&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>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/RoadVehicles&amp;diff=4925</id>
		<title>Action0/Vehicles/RoadVehicles</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/RoadVehicles&amp;diff=4925"/>
		<updated>2025-02-17T14:51:52Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&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 road vehicles.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description!!Available for articulated parts&lt;br /&gt;
|-&lt;br /&gt;
|05||B||{{ottdp|1.10|no}}||Roadtype / tramtype (see below)||should be same as front&lt;br /&gt;
|-&lt;br /&gt;
|08||B||{{ottdp|0.6|2.0}}||Speed in mph*3.2||no&lt;br /&gt;
|-&lt;br /&gt;
|09||B||{{ottdp|0.6|2.0}}||Running cost factor||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|0A||D||{{ottdp|0.6|2.0}}||Running cost base, see below||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|0E||B||{{ottdp|0.6|2.0}}||Sprite ID (FF for new graphics)||yes&lt;br /&gt;
|-&lt;br /&gt;
|0F||B||{{ottdp|0.6|2.0}}||Capacity||yes&lt;br /&gt;
|-&lt;br /&gt;
|10||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;&amp;lt;br/&amp;gt;&lt;br /&gt;
{{ottd|15.0}} Since 15.0, a default cargo translation table corresponding to the climate is used if one is not provided.&lt;br /&gt;
||yes&lt;br /&gt;
|-&lt;br /&gt;
|11||B||{{ottdp|0.6|2.0}}||Cost factor||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|12||B||{{ottdp|0.6|2.0}}||Sound effect: 17/19/1A for regular, 3C/3E for toyland&amp;lt;br/&amp;gt;{{ottdp|1.6|no|ottdrev=r27507}} Since OpenTTD r27507 also custom sound effects from Action11 are allowed here.||no&lt;br /&gt;
|-&lt;br /&gt;
|13||B||{{ottdp|1.1|2.0}} {{grfFrom|2}}||Power in 10 hp, see below||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|1.1|2.0}} {{grfFrom|2}}||Weight in 1/4 tons, see below||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|15||B||{{ottdp|0.7|2.0}} {{grfFrom|2}}||Speed in mph*0.8, see below||no&lt;br /&gt;
|-&lt;br /&gt;
|16||D||{{ottdp|0.6|2.0}} {{grfFrom|2}}||Bit mask of cargo types available for refitting (not refittable if 0 or unset), see column 2 (bit values) in [[CargoTypes]]. &amp;lt;b&amp;gt;Obsoleted by properties 24/25&amp;lt;/b&amp;gt;||yes&lt;br /&gt;
|-&lt;br /&gt;
|17||B||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Callback flags bit mask, see below||yes&lt;br /&gt;
|-&lt;br /&gt;
|18||B||{{ottdp|1.1|2.5|ttdprev=alpha 30}}||Coefficient of tractive effort||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|19||B||{{ottdp|1.1|2.5|ttdprev=alpha 30}}||Coefficient of air drag||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|1A||B||{{ottdp|0.6|2.5|ttdprev=alpha 30}}||Refit cost, using 25% of the [[BaseCosts|purchase price cost base]]||yes&lt;br /&gt;
|-&lt;br /&gt;
|1B||B||{{ottdp|0.6|2.5|ttdprev=alpha 44}}||Retire vehicle early, this many years before the end of phase 2 (see [[Action0General]])||no&lt;br /&gt;
|-&lt;br /&gt;
|1C||B||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Miscellaneous vehicle flags||partly (&amp;quot;tram&amp;quot; should be same as front)&lt;br /&gt;
|-&lt;br /&gt;
|1D||W||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Refittable cargo classes, see [[Action0Trains#Cargo_classes (28, 29, 32)|train prop. 28]]||yes&lt;br /&gt;
|-&lt;br /&gt;
|1E||W||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Non-refittable cargo classes, see [[Action0Trains#Cargo_classes (28, 29, 32)|train prop. 29]]||yes&lt;br /&gt;
|-&lt;br /&gt;
|1F||D||{{ottdp|0.6|2.5|ttdprev=r1210|ottdrev=r7191}}||Long format introduction date||no&lt;br /&gt;
|-&lt;br /&gt;
|20||B*||{{ottdp|0.7|no|ottdrev=r13831}}||Sort the purchase list||no&lt;br /&gt;
|-&lt;br /&gt;
|21||B||{{ottdp|1.1|no|ottdrev=r21240}}||Visual effect||yes&lt;br /&gt;
|-&lt;br /&gt;
|22||W||{{ottdp|1.2|no|ottdrev=r22713}}||Custom cargo ageing period||yes&lt;br /&gt;
|-&lt;br /&gt;
|23||B||{{ottdp|1.2|no|ottdrev=r23164}}||Make vehicle shorter, see [[Action0/Vehicles/Trains#Shorter_train_vehicles_.2821.29|train property 21]]||yes&lt;br /&gt;
|-&lt;br /&gt;
|24||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]]||yes&lt;br /&gt;
|-&lt;br /&gt;
|25||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]]||yes&lt;br /&gt;
|-&lt;br /&gt;
|26||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;
|27||D||{{ottdp|13|no}}||Extra flags, see [[Action0/Vehicles/Trains#Extra_flags_.2830.29|train property 30]]&lt;br /&gt;
|-&lt;br /&gt;
|28||B||{{ottdp|14|no|ottdrev=g2d73076056}}||Additional callback flags bit mask, see below||yes&lt;br /&gt;
|-&lt;br /&gt;
|29||W||{{ottdp|15|no|ottdrev=gd2496b6ec4}}||Cargo classes required for refittability, see [[Action0Trains#Cargo_classes (28, 29, 32)|train prop. 32]]||yes&lt;br /&gt;
|-&lt;br /&gt;
|2A||W n*W||{{ottdp|15}}||List of badges||??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Roadtype or tramtype (05) ===&lt;br /&gt;
{{ottdp|1.10|no}} Roadtype or tramtype for the vehicle.  This is an index into the [[Action0/Global_Settings#Roadtype_translation_table_.2816.29|roadtype]] or [[Action0/Global_Settings#Tramtype_translation_table_.2817.29|tramtype]] translation table.&lt;br /&gt;
&lt;br /&gt;
This property:&lt;br /&gt;
* will use property 1C bit 0 (flag &#039;vehicle is tram&#039;) to determine whether to use a roadtype or tramtype table&lt;br /&gt;
* requires an appropriate roadtype or tramtype table to be loaded&lt;br /&gt;
&lt;br /&gt;
=== Running cost base (0A) and factor (09) ===&lt;br /&gt;
&lt;br /&gt;
TTD calculates all costs by multiplying a 48-bit 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 road vehicles, the following base amounts are available:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Type!!Value!!in little-endian notation&lt;br /&gt;
|-&lt;br /&gt;
|Road vehicle running cost base||4C48||48 4C 00 00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Theoretically, you could use pointers to other [[BaseCosts|base amounts]] available in TTD, but these are the numbers TTD uses for road vehicles.&lt;br /&gt;
&lt;br /&gt;
=== Cost factor (11) ===&lt;br /&gt;
&lt;br /&gt;
The cost factor is a bit-coded value which determines how expensive a vehicle is. The table below gives you some values to use for finding the right price for your vehicles.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Cost factor!!Price&lt;br /&gt;
|-&lt;br /&gt;
|00||$ 0&lt;br /&gt;
|-&lt;br /&gt;
|01||$ 108&lt;br /&gt;
|-&lt;br /&gt;
|10||$ 1,750&lt;br /&gt;
|-&lt;br /&gt;
|20||$ 3,500&lt;br /&gt;
|-&lt;br /&gt;
|80||$ 14,000&lt;br /&gt;
|-&lt;br /&gt;
|FF||$ 27,890&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Realistic acceleration properties (13, 14, 15) ===&lt;br /&gt;
&lt;br /&gt;
Using property 15 to set the speed, it is possible to achieve speeds larger than 80 mph (127 km/h), to which property 08 is limited. When setting property 15, always set property 08 as well, so that the vehicle works reasonably well whether realistic acceleration is turned on or off. If property 15 is not set, the value from property 08 is used instead.&lt;br /&gt;
&lt;br /&gt;
{{ttdp|}} TTDPatch uses these properties only if road vehicles are set to realistic acceleration in the NewCurveAndMountainHandling switch. They are ignored otherwise.&lt;br /&gt;
&lt;br /&gt;
{{ottd|}} OpenTTD uses these properties always, if they are defined and gives the speed defined here precedence over the one defined in property 08.&lt;br /&gt;
&lt;br /&gt;
=== Callbacks (17, 28) ===&lt;br /&gt;
&lt;br /&gt;
For road vehicles, the following [[callbacks]] have to be enabled by setting the corresponding bit in properties 17 and 28 (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;
|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 vehicle&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;
|9||200||163||{{ottdp|15|no|ottdrev=gd2496b6ec4}}Custom refit&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;
=== Coefficient of tractive effort (18) ===&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;
For a value of FF, the tractive effort is equal to the vehicle weight, for 80, it is half, and so on. &amp;amp;nbsp;If not set, a default of 4C is used, for a fraction of 0.30, corresponding to W&amp;lt;sub&amp;gt;adh&amp;lt;/sub&amp;gt;=W and a coefficient of friction of 0.30, which is the value used by the patch before TTDPatch 2.0.1 alpha 19.&lt;br /&gt;
&lt;br /&gt;
=== Coefficient of air drag (19) ===&lt;br /&gt;
&lt;br /&gt;
This property sets the air drag coefficient c2 used for the realistic acceleration model, from 01 (no airdrag) to FF (most air drag) in arbitrary units. &amp;amp;nbsp;00 means to use the default value that depends on the top speed (to simulate the fact that high-speed engines are more streamlined).&lt;br /&gt;
&lt;br /&gt;
The default values are the following:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!top speed (mph/1.6)!!&amp;amp;lt;16!!16!!24!!32!!48!!64!!96!!128!!192!!256!!...&lt;br /&gt;
|-&lt;br /&gt;
|c2||192||128||96||64||48||32||24||16||12||8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For higher speeds, the series is continued in the same manner.&lt;br /&gt;
&lt;br /&gt;
Air drag in Newtons will then be c2*v*v with v in m/s, although it is probably futile to attempt to make c2 a realistic number due to the lack of TTd&#039;s consistent scaling. &amp;amp;nbsp;If a vehicle doesn&#039;t reach its historical top speed, you might try setting prop. 19 one or two higher than the default above, otherwise it&#039;s probably a good idea to leave it at the default.&lt;br /&gt;
&lt;br /&gt;
=== Refit cost (1A) ===&lt;br /&gt;
&lt;br /&gt;
Refit cost, using 25% of the [[BaseCosts|purchase price 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 (1C) is set, auto-refitting is allowed.&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous flags (1C) ===&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||Vehicle is a tram/light rail vehicle and requires tram tracks to operate&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 1A 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 (1F) ===&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 (20) ===&lt;br /&gt;
See sort vehicle list for [[Action0Trains#Sort vehicle list 1A|trains]] for details.&lt;br /&gt;
&lt;br /&gt;
=== Visual effect (21) ===&lt;br /&gt;
See the equivalent [[Action0Trains#Visual effects and wagon power 22|train property]] for information about the meaning of all bits. There is no default effect for road vehicles, 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 (22) ===&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>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/Trains&amp;diff=4924</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=4924"/>
		<updated>2025-02-17T14:51:27Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Properties */&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;
Defining properties of train vehicles.&lt;br /&gt;
&lt;br /&gt;
= Properties =&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description!!Available for articulated parts&lt;br /&gt;
|-&lt;br /&gt;
|05||B||{{ottdp|0.6|2.0}}||Track type (see below)||should be same as front&lt;br /&gt;
|-&lt;br /&gt;
|08||B||{{ottdp|0.6|2.0}}||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||{{ottdp|0.6|2.0}}||Speed in mph*1.6 (see below)||no&lt;br /&gt;
|-&lt;br /&gt;
|0B||W||{{ottdp|0.6|2.0}}||Power (0 for wagons)||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|0D||B||{{ottdp|0.6|2.0}}||Running cost factor (0 for wagons)||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|0E||D||{{ottdp|0.6|2.0}}||Running cost base, see below||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|12||B||{{ottdp|0.6|2.0}}||Sprite ID (FD for new graphics)||yes&lt;br /&gt;
|-&lt;br /&gt;
|13||B||{{ottdp|0.6|2.0}}||Dual-headed flag; 1 if dual-headed engine, 0 otherwise||should be zero also for front&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|0.6|2.0}}||Cargo capacity||yes&lt;br /&gt;
|-&lt;br /&gt;
|15||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;&amp;lt;br/&amp;gt;&lt;br /&gt;
{{ottd|15.0}} Since 15.0, a default cargo translation table corresponding to the climate is used if one is not provided.&lt;br /&gt;
||yes&lt;br /&gt;
|-&lt;br /&gt;
|16||B||{{ottdp|0.6|2.0}}||Weight in tons||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|17||B||{{ottdp|0.6|2.0}}||Cost factor||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|18||B||{{ottdp|&amp;amp;lt;0.7|2.0}}&amp;lt;ref&amp;gt;This property is not used by OpenTTDs NoAI API.&amp;lt;/ref&amp;gt;||Engine rank for the AI (AI selects the highest-rank engine of those it can buy)||no&lt;br /&gt;
|-&lt;br /&gt;
|19||B||{{ottdp|0.6|2.0}} {{grfFrom|1}}||Engine traction type (see below)||no&lt;br /&gt;
|-&lt;br /&gt;
|1A||B/B*&amp;lt;ref&amp;gt;{{ottdp|0.7|no|ottdrev=r13831}} Since OpenTTD r13831 this is an extended byte.&amp;lt;/ref&amp;gt;||{{ottdp|0.6|2.0}} {{grfFrom|1}}||Not a property, but an action: sort the purchase list.||no&lt;br /&gt;
|-&lt;br /&gt;
|1B||W||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Power added by each wagon connected to this engine, see below||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|1C||B||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Refit cost, using 50% of the [[BaseCosts|purchase price cost base]]||yes&lt;br /&gt;
|-&lt;br /&gt;
|1D||D||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Bit mask of cargo types available for refitting, see column 2 (bit value) in [[CargoTypes]]. &amp;lt;b&amp;gt;Obsoleted by properties 2C/2D&amp;lt;/b&amp;gt;||yes&lt;br /&gt;
|-&lt;br /&gt;
|1E||B||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Callback flags bit mask, see below||yes&lt;br /&gt;
|-&lt;br /&gt;
|1F||B||{{ottdp|0.6|2.5|ttdprev=alpha 19}}||Coefficient of tractive effort||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|20||B||{{ottdp|1.1|2.5|ttdprev=alpha 27}}||Coefficient of air drag||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|21||B||{{ottdp|0.6|2.0}} {{grfFrom|2}}||Make vehicle shorter by this amount, see below||yes&lt;br /&gt;
|-&lt;br /&gt;
|22||B||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Set visual effect type (steam/smoke/sparks) as well as position, see below||yes&lt;br /&gt;
|-&lt;br /&gt;
|23||B||{{ottdp|0.6|2.5}} {{grfFrom|6}}||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||B||{{ottdp|0.6|2.5|ttdprev=alpha 44}}||High byte of vehicle weight, weight will be prop.24*256+prop.16||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|25||B||{{ottdp|0.6|2.5|ttdprev=alpha 44}}||User-defined bit mask to set when checking veh. var. 42||yes&lt;br /&gt;
|-&lt;br /&gt;
|26||B||{{ottdp|0.6|2.5|ttdprev=alpha 44}}||Retire vehicle early, this many years before the end of phase 2 (see [[Action0General]])||no&lt;br /&gt;
|-&lt;br /&gt;
|27||B||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Miscellaneous flags||partly&lt;br /&gt;
|-&lt;br /&gt;
|28||W||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Refittable cargo classes||yes&lt;br /&gt;
|-&lt;br /&gt;
|29||W||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Non-refittable cargo classes||yes&lt;br /&gt;
|-&lt;br /&gt;
|2A||D||{{ottdp|0.6|2.5|ottdrev=r7191|ttdprev=r1210}}||Long format introduction date||no&lt;br /&gt;
|-&lt;br /&gt;
|2B||W||{{ottdp|1.2|no|ottdrev=r22713}}||Custom cargo ageing period||yes&lt;br /&gt;
|-&lt;br /&gt;
|2C||B n*B||{{ottdp|1.2|no|ottdrev=r23291}}||List of always refittable cargo types||yes&lt;br /&gt;
|-&lt;br /&gt;
|2D||B n*B||{{ottdp|1.2|no|ottdrev=r23291}}||List of never refittable cargo types||yes&lt;br /&gt;
|-&lt;br /&gt;
|2E||W||{{ottdp|12|no|ottdrev=g2183fd4dab}}||Maximum curve speed modifier||yes&lt;br /&gt;
|-&lt;br /&gt;
|2F||W||{{ottdp|13|no}}||Vehicle variant group||no&lt;br /&gt;
|-&lt;br /&gt;
|30||D||{{ottdp|13|no}}||Extra flags||??&lt;br /&gt;
|-&lt;br /&gt;
|31||B||{{ottdp|14|no|ottdrev=g2d73076056}}||Additional callback flags bit mask, see below||yes&lt;br /&gt;
|-&lt;br /&gt;
|32||W||{{ottdp|15|no|ottdrev=gd2496b6ec4}}||Cargo classes required for refittability||yes&lt;br /&gt;
|-&lt;br /&gt;
|33||W n*W||{{ottdp|15}}||List of badges||??&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
== Track type (05) ==&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;
{{ottdp|1.0|no}} 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;quot;wagonspeedlimit&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;quot;default&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;
{| |-&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;
&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;
{| |-&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;
&lt;br /&gt;
&#039;&#039;&#039;Running cost base 4C36 (diesel)&#039;&#039;&#039;&lt;br /&gt;
&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;
&lt;br /&gt;
&#039;&#039;&#039;Running cost base 4C3C (electric)&#039;&#039;&#039;&lt;br /&gt;
&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;
&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;
{| |-&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;
&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;
{| |-&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;
{{ottdp|1.1|no}} 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 is not a property as such, but an action. &amp;amp;nbsp;It forces TTDPatch to shuffle the vehicle this &amp;quot;property&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.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no|2.0}} 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;
&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;
{{ottdp|0.7|no|ottdrev=r13831}} This property is an extended byte in OpenTTD since r13831!&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;
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;
== Refit cost (1C) ==&lt;br /&gt;
&lt;br /&gt;
Refit cost, using 50% of the [[BaseCosts|purchase price 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 (27) is set, auto-refitting is allowed.&lt;br /&gt;
&lt;br /&gt;
== Callbacks (1E, 31) ==&lt;br /&gt;
For trains, the following [[callbacks]] have to be enabled by setting the corresponding bit in properties 1E and 31 (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;
|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;
|8||100||161||{{ottd|14|ottdrev=gf5394ed2ef}}Engine name&lt;br /&gt;
|-&lt;br /&gt;
|9||200||163||{{ottdp|15|no|ottdrev=gd2496b6ec4}}Custom refit&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;
These callbacks 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;
!Variable 0C value!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|1D||Can wagon be attached&lt;br /&gt;
|-&lt;br /&gt;
|23||Additional text in purchase screen&lt;br /&gt;
|-&lt;br /&gt;
|31||Start/stop check&lt;br /&gt;
|-&lt;br /&gt;
|32||32-day callback&lt;br /&gt;
|-&lt;br /&gt;
|36||Change Vehicle Properties&lt;br /&gt;
|-&lt;br /&gt;
|15E||Refit cost&lt;br /&gt;
|}&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&amp;lt;sub&amp;gt;adh&amp;lt;/sub&amp;gt; (i.e. the vehicle weight that rests on powered axles) times the coefficient of friction µ between the wheels and the rails to the total vehicle weight W, times 255, and convert to hex:&lt;br /&gt;
&lt;br /&gt;
prop. 1F = HEX ((W&amp;lt;sub&amp;gt;adh&amp;lt;/sub&amp;gt; * µ / W) * 255)&lt;br /&gt;
&lt;br /&gt;
With prop. 1F having a value of FF, the tractive effort is equal to the vehicle weight, for 80, it is half, and so on. If not set, a default of 4C is used, for a fraction of 0.30, corresponding to Wadh=W and a coefficient of friction of 0.30, which is the value used by the patch before TTDPatch 2.0.1 alpha 19.&lt;br /&gt;
&lt;br /&gt;
Sometimes you know the real-life tractive effort instead of adhesive weight and coefficient of friction. To help calculating prop. 1F in that case, here&#039;s a small example using the NS 1600 (Electric) with a mass of 84 tons and real-life tractive effort (TE&amp;lt;sub&amp;gt;real&amp;lt;/sub&amp;gt;) of 259 kN. To quickly find the value for property 1F you fill in the following formula:&lt;br /&gt;
&lt;br /&gt;
prop. 1F = HEX ((TE&amp;lt;sub&amp;gt;real&amp;lt;/sub&amp;gt; / (Mass * g) * 255)&lt;br /&gt;
&lt;br /&gt;
That may look confusing but you already know all variables:&lt;br /&gt;
&lt;br /&gt;
prop. 1F = HEX ((259 / (84 * 9.8) * 255)&lt;br /&gt;
&lt;br /&gt;
prop. 1F = HEX (0.3146 *255) = HEX(80.229)&lt;br /&gt;
&lt;br /&gt;
HEX calculations only work with figures in the natural domain: each figure has to be a positive and round figure. Therefore the value you convert to HEX isn&#039;t 80.229 but 80:&lt;br /&gt;
&lt;br /&gt;
HEX 80 = 50&lt;br /&gt;
&lt;br /&gt;
Property 1F for the NS 1600 (Electric) would then be: 1F 50.&lt;br /&gt;
&lt;br /&gt;
== Coefficient of air drag (20) ==&lt;br /&gt;
&lt;br /&gt;
This property sets the air drag coefficient c2 used for the realistic acceleration model, from 01 (no airdrag) to FF (most air drag) in arbitrary units. 00 means to use the default value that depends on the top speed (to simulate the fact that high-speed engines are more streamlined).&lt;br /&gt;
&lt;br /&gt;
The default values are the following:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!top speed (mph/1.6)!!	&amp;lt;16!!	16!!	24!!	32!!	48!!	64!!	96!!	128!!	192!!	256!!	...&lt;br /&gt;
|-&lt;br /&gt;
|c2||	192||	128||	96||	64||	48||	32||	24||	16||	12||	8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For higher speeds, the series is continued in the same manner.&lt;br /&gt;
&lt;br /&gt;
Air drag in Newtons will then be c2*v*v with v in m/s, although it is probably futile to attempt to make c2 a realistic number due to the lack of TTD&#039;s consistent scaling. If a train doesn&#039;t reach its historical top speed, you might try setting the value of prop. 20 one or two steps lower than the default above, otherwise it&#039;s probably a good idea to leave it at the default.&lt;br /&gt;
&lt;br /&gt;
== Shorter train vehicles (21) ==&lt;br /&gt;
&lt;br /&gt;
This property reduces the length of train vehicles, in units of 1/8th (12.5%). The value 00 means the vehicle has the full length, 01 means shorter by 1/8th (12.5%), up to 05=shorter by 5/8ths (62.5%). Larger numbers will not work properly&lt;br /&gt;
&amp;lt;ref&amp;gt;{{ottdp|1.0|no|ottdrev=r15793}} This restriction has been removed in OpenTTD r15793. Every vehicle can have a length between 1/8 and 8/8 independent of its position in the chain.&amp;lt;/ref&amp;gt;,&lt;br /&gt;
except at the end of the train&lt;br /&gt;
&amp;lt;ref&amp;gt;{{ottdp|&amp;amp;lt;1.0|}} This means that it is only safe to use values larger than 05 in the length callback making sure that they are only returned for the very last vehicle in the train. Otherwise the train will occasionally fall apart, with the wagons after the shortest one stopping to move.&amp;lt;/ref&amp;gt;. The vehicle length is set whenever it leaves a depot. This property does not work for the first vehicle in a train (i.e. the engine).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Visual effects and wagon power (22) ==&lt;br /&gt;
&lt;br /&gt;
By default, the visual effect of train engines is determined by the traction type (property 19). With this option you can change the type of effect as well as the position of it relative to the vehicle. (Note: for TTDPatch and OpenTTD up to r21229 only the positioning of steam actually works. For {{ottdp|1.1|no|ottdrev=r21230}} positioning diesel smoke and electric sparks works as well) The position of the effect provides a range from 0 to F that is added to the type of the effect.&lt;br /&gt;
&lt;br /&gt;
Position 0 corresponds to a point half a vehicle length ahead of the vehicle, 4 is the front of the vehicle, 8 the middle, C the end and F is a half length behind the vehicle. Intermediate values are in-between.&lt;br /&gt;
&lt;br /&gt;
Additionally, this property can be used to disable powered wagons of this type, although that is usually done with [[Callbacks#Visual_effect_and_wagon_power_.2810.29| callback 10]] instead (which has the same meaning as prop. 22, but is more flexible).&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Range	!!Effect type&lt;br /&gt;
|-&lt;br /&gt;
|00..0F||Use the default effect type, but reposition it. For engines this is defined via property 19, wagons have no default effect.&lt;br /&gt;
|-&lt;br /&gt;
|10..1F||Steam puffs&lt;br /&gt;
|-&lt;br /&gt;
|20..2F||Diesel fumes&lt;br /&gt;
|-&lt;br /&gt;
|30..3F||Electric sparks&lt;br /&gt;
|-&lt;br /&gt;
|40||Disable visual effect&lt;br /&gt;
|-&lt;br /&gt;
|41..7F||{{ottdp|1.5|no|ottdrev=r26747}} Create effects with [[Callbacks#Advanced_effect_creation_.28160.29|Callback 160]] using one of these spawning models:&lt;br /&gt;
* 41 Steam: Gradually less effects when approaching max speed&lt;br /&gt;
* 42 Diesel: Effect proportional to acceleration, no effect when idling at top speed&lt;br /&gt;
* 43 Electric: Random effect, gradually less likely when approaching max spped&lt;br /&gt;
* 44-7F Reserved&lt;br /&gt;
|-&lt;br /&gt;
|80+00..80+7F||Same as 00..7F above, but disable wagon power&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, 28 would make the wagon powered and emit diesel fumes, but 80+28 = A8 would only emit the diesel fumes without adding power.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous flags (27) ==&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!!	Version !!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||	1||{{ottdp|0.6|2.5}}||	Vehicle tilts in curves, and thus gets speed bonus &amp;lt;ref&amp;gt;The tilting speed bonus only applies if all vehicles in the train have this bit set. In TTDPatch it requires the &amp;quot;curves&amp;quot; switch to be on. For realistic curves, it gives the train two free curving pieces with no speed decrease, and for other settings, it increases the curves setting by one (0-&amp;gt;1, 1-&amp;gt;2, 2-&amp;gt;2). In OpenTTD, the curve speed limit increases by 20% if &#039;realistic&#039; acceleration is enabled, else there is no effect.&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1||	2||{{ottdp|0.6|2.5}}||	Uses two company colors&lt;br /&gt;
|-&lt;br /&gt;
|2||	4||{{ottdp|0.6|2.5}}||	Vehicle is a multiple unit (DMU/EMU), for colour selection&lt;br /&gt;
|-&lt;br /&gt;
|3||	8||Varies|| {{ottdp|1.1|no|ottdrev=r21966}}Vehicle can be flipped around in the depot. &amp;lt;br&amp;gt;{{ottdp|13|no|no}}This flag is no longer required, vehicles can always be flipped. &lt;br /&gt;
&amp;lt;ref&amp;gt;From {{ottd|13|no}} onwards, OpenTTD will again allow all vehicles to flip, and will automatically adjust offsets accordingly. From {{ottd|13|no}}, if this flag is set, OpenTTD will not automatically apply the correct offsets for vehicles &amp;lt; 8/8 long, and will defer to offsets set by the grf. Do not set this flag unless you need it for a specific reason.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For {{ottd|1.1|r21966}} up to {{ottdp|12|no|no}} when you enable flipping of a vehicle in a depot you must make sure that the graphics are correctly aligned when flipped as well. Especially in the case of shortened vehicles.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Prior to {{ottd|1.1|r21966}} all non-multiheaded/non-articulated vehicles would be able to flip around in the depot. As such {{ottd|1.1|r21966}} disables a &amp;quot;feature&amp;quot; in OpenTTD, but often it makes no sense to flip vehicles around (symetric vehicles) or the graphics are wrong (most shortened vehicles), and thus only enabling this when the NewGRF developer says it is possible is better.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For all relevant OpenTTD versions, the flipping bit has no effect for multiheaded or articulated vehicles as they cannot be flipped in depot. &lt;br /&gt;
&amp;lt;/ref&amp;gt;&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 1C specifies zero cost&lt;br /&gt;
|-&lt;br /&gt;
|5||   20||{{ottdp|1.2|no|ottdrev=r23861}}|| Use cargo multiplier for default cargo (and load amount). 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;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cargo classes (28, 29, 32) ==&lt;br /&gt;
&lt;br /&gt;
To make vehicle sets more compatible with future new cargo definitions, these three properties allow vehicles to define what type of cargo they should be refittable to. A wagon will be refittable to all cargo types that match any of the classes set in prop. 28 &#039;&#039;and&#039;&#039; have all of the classes set in prop. 32, except for the ones that match any of the classes set in prop. 29. In addition, afterwards those cargo types listed in prop. 1D will be toggled. In terms of logic, it is&lt;br /&gt;
&lt;br /&gt;
Refit list = (cargos from prop. 28 filtered by prop. 32 AND NOT cargos from prop. 29) XOR cargos from prop. 1D&lt;br /&gt;
&lt;br /&gt;
This means, if a cargo type is in the list because it matches props 28/31 but not prop 29, having the respective bit set in prop. 1D will disable it again. Conversely, if the cargo type is not in the list, the bit in prop. 1D will add it. This way, if props. 28/29 are unset, prop. 1D will retain the original meaning, but it is still able to selectively add or remove certain cargo types even if props. 28/29 are used.&lt;br /&gt;
&lt;br /&gt;
As a consequence, you have both full control over the cargo types that you know of (using prop. 1D), and those you don&#039;t know of yet (using props. 28/29). Leave the bits for cargos that you don&#039;t know of unset in prop. 1D, and set/clear the bits for known cargos to add/remove them from the list as appropriate.&lt;br /&gt;
&lt;br /&gt;
{{ottd|1.2|r23291}} It is recommended to use properties 2C and 2D instead of property 1D, as property 1D behaves badly if the cargo classes of a cargo are ever changed.&lt;br /&gt;
&lt;br /&gt;
The class list is a bit mask. See the action0 cargos page for bits and classes defined so far.&lt;br /&gt;
&lt;br /&gt;
Take a look at [[Action0Cargos#Cargo classes 16|Action0 for cargos]] for the 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 three properties, an additive, a filter, 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;
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 [[VariationalAction2/Vehicles#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;
About the interaction with other properties take a look at the summary page about [[VehicleRefitting|vehicle refitting]].&lt;br /&gt;
&lt;br /&gt;
Disclaimer: there is no guarantee that classes won&#039;t vary over time or between sets. The classes of a cargo may change between different versions of a specific industry/cargo newgrf, or different classes may be set for the same cargo label by different industry/cargo newgrfs. Feel free to use classes in your set for conveniently refitting to cargos, but if you - the vehicle author - care about specific cargos being transported in specific vehicles, use label based refits (changing labels without a very good reason is considered to be bad practice).&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.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no|}} In TTDPatch, dates after 2044 will be limited to 2044.&lt;br /&gt;
&lt;br /&gt;
== Custom cargo ageing period (2B) ==&lt;br /&gt;
&lt;br /&gt;
This property allows to modify the period in ticks after which cargo carried by the vehicle is aged. By default, cargo is aged every 185 ticks. A value of 0 disables ageing of cargo. This property can be modified via [[Callbacks#Change_vehicle_properties_.2836.29|callback 36]].&lt;br /&gt;
&lt;br /&gt;
Changing this value from the default does not automatically make the vehicle earn more or less.  Predicting the effect is complicated, as it depends on many things, including: vehicle speed, route length, route delays, transfer credits, the payment curve set by the cargo, and whether the cargo is already aged from a previous transfer when the vehicle loads it.&lt;br /&gt;
&lt;br /&gt;
Authors are advised that tests show this property can lead to disappointment. Avoid, or use with caution.&lt;br /&gt;
&lt;br /&gt;
== List of always refittable cargo types (2C, 2D) ==&lt;br /&gt;
&lt;br /&gt;
These two properties allows to unconditionally include or exclude cargo types for refittability independent of any of the other refit properties or the cargo classes. If you specify a cargo type that is not available, the cargo type will be silently ignored.&lt;br /&gt;
&lt;br /&gt;
The format for both properties is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;2C/2D &amp;amp;lt;nvar&amp;amp;gt; (&amp;amp;lt;Index into cargo type table&amp;amp;gt;){n}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That is you give the number of cargos in a single byte followed by a list of that length of indexes into the cargo translation table ([[CargoTypes|Type A]]).&lt;br /&gt;
&lt;br /&gt;
== Maximum curve speed modifier (2E) ==&lt;br /&gt;
&lt;br /&gt;
This property allows to give vehicles a maximum curve speed modifier. The given value is treated as a signed word with 8 fractional bits. This property can be modified via [[Callbacks#Change_vehicle_properties_.2836.29|callback 36]].&lt;br /&gt;
&lt;br /&gt;
The modifier is applied after the normal curve speed calculation is done using the formula max_curve_speed * (1 + prop 2E). This means that the default property value of 0 is equivalent to no change. While values less than -1.0 are technically possible, the resulting vehicle curve speed is clamped at 2 mph-ish to make sure vehicles don&#039;t become permanently stuck.&lt;br /&gt;
&lt;br /&gt;
If different vehicles in a train have different curve speed modifiers, the lowest value wins.&lt;br /&gt;
&lt;br /&gt;
== Vehicle variant group (2F) ==&lt;br /&gt;
&lt;br /&gt;
This property supports grouping vehicles in the purchase menu (also the autoreplace menu). The property value is the ID of another vehicle in the same GRF which will act as the parent for vehicles in the group.&lt;br /&gt;
&lt;br /&gt;
Groups can also be nested (this is experimental as of December 2022 and may change with testing).&lt;br /&gt;
&lt;br /&gt;
See also [[Action0Trains#Extra flags (30)|vehicle extra flags]] which can influence the behaviour of vehicles in variant groups.&lt;br /&gt;
&lt;br /&gt;
See also https://github.com/OpenTTD/OpenTTD/pull/10220&lt;br /&gt;
&lt;br /&gt;
== Extra flags (30) ==&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!!	Version !!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||	1||{{ottdp|13|no}}||	Disable &amp;quot;New Vehicle&amp;quot; news message for this engine&lt;br /&gt;
|-&lt;br /&gt;
|1||	2||{{ottdp|13|no}}||	Disable &amp;quot;Exclusive Preview&amp;quot; for this engine&lt;br /&gt;
|-&lt;br /&gt;
|2||	4||{{ottdp|13|no}}||	Variants - Include this variant when primary engine has &amp;quot;Exclusive Preview&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|3||	8||{{ottdp|13|no}}||		Variants - (Attempt to) Synchronize reliability the primary engine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Extra callback flags (31) ==&lt;br /&gt;
&lt;br /&gt;
See [[#Callbacks_.281E.2C_31.29]]&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;
{| |-&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;br /&gt;
|}&lt;br /&gt;
Since nfo version 7, so-called [[GRFActionsDetailed#Byte order|&amp;quot;escape sequences&amp;quot;]] have been introduced in an attempt to offer a more human-readable form.&lt;br /&gt;
&lt;br /&gt;
Below is the same example as above, with escape sequences being used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-1 * 0 00 00 \b3 01 \b*2 // \b&amp;amp;lt;number of props to change&amp;amp;gt; \b*&amp;amp;lt;vehicle ID&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;09 \w192 // value for speed (192 Km/h)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;0B \w3800 // value for power (3800 hp)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;12 FD // use new graphics&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Badges&amp;diff=4923</id>
		<title>Action0/Badges</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Badges&amp;diff=4923"/>
		<updated>2025-02-17T14:48:56Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;&#039;Action 0 properties for badges&#039;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Action 0 - Properties for badges =&lt;br /&gt;
&lt;br /&gt;
Defining properties of badges.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Number&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Version&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|08&lt;br /&gt;
|{{ottdp|15}}&lt;br /&gt;
|S&lt;br /&gt;
|Badge label. A zero-terminated string.&lt;br /&gt;
|-&lt;br /&gt;
|09&lt;br /&gt;
|{{ottdp|15}}&lt;br /&gt;
|D&lt;br /&gt;
|Flags.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Badge label (08) ==&lt;br /&gt;
&lt;br /&gt;
These are globally unique strings.&lt;br /&gt;
&lt;br /&gt;
Badge labels comprise a badge class, for grouping similar badges, and badge name, separated by a &#039;/&#039;.&lt;br /&gt;
&lt;br /&gt;
Classes and names are arbitrary, but to be useful must follow a standard scheme. For instance, the badge label power/steam will define a badge for steam powered vehicles within the power class.&lt;br /&gt;
&lt;br /&gt;
== Flags (09) ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Bit&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Copy. Badge can be copied to related entity (e.g. badge on a railtype can be copied to rail vehicles of that railtype.)&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|NameListStop. Stops adding more names to the visible name list.&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4&lt;br /&gt;
|NameListFirstOnly. Add this name to the visible name list only if this is the first name.&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|8&lt;br /&gt;
|UseCompanyColour. Apply appropriate company colour palette to the icon. If the icon is applied to a vehicle with 2CC support, then the 2CC palette will be used.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Badges&amp;diff=4922</id>
		<title>Action0/Badges</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Badges&amp;diff=4922"/>
		<updated>2025-02-17T13:33:38Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: Created page with &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Action 0 properties for badges&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;  = Action 0 - Properties for badges =  Defining properties of badges.  == Properties ==  {| class=&amp;quot;wikitable&amp;quot; |- !&amp;#039;&amp;#039;&amp;#039;Number&amp;#039;&amp;#039;&amp;#039; !&amp;#039;&amp;#039;&amp;#039;V...&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;&#039;Action 0 properties for badges&#039;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Action 0 - Properties for badges =&lt;br /&gt;
&lt;br /&gt;
Defining properties of badges.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Number&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Version&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|08&lt;br /&gt;
|{{ottdp|1.15}}&lt;br /&gt;
|S&lt;br /&gt;
|Badge label. A zero-terminated string.&lt;br /&gt;
|-&lt;br /&gt;
|09&lt;br /&gt;
|{{ottdp|1.15}}&lt;br /&gt;
|D&lt;br /&gt;
|Flags.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Badge label (08) ==&lt;br /&gt;
&lt;br /&gt;
These are globally unique strings.&lt;br /&gt;
&lt;br /&gt;
Badge labels comprise a badge class, for grouping similar badges, and badge name, separated by a &#039;/&#039;.&lt;br /&gt;
&lt;br /&gt;
Classes and names are arbitrary, but to be useful must follow a standard scheme. For instance, the badge label power/steam will define a badge for steam powered vehicles within the power class.&lt;br /&gt;
&lt;br /&gt;
== Flags (09) ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Bit&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Copy. Badge can be copied to related entity (e.g. badge on a railtype can be copied to rail vehicles of that railtype.)&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|NameListStop. Stops adding more names to the visible name list.&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4&lt;br /&gt;
|NameListFirstOnly. Add this name to the visible name list only if this is the first name.&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|8&lt;br /&gt;
|UseCompanyColour. Apply appropriate company colour palette to the icon. If the icon is applied to a vehicle with 2CC support, then the 2CC palette will be used.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Main_Page&amp;diff=4921</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Main_Page&amp;diff=4921"/>
		<updated>2025-02-17T13:26:17Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Sprite types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sprite types ==&lt;br /&gt;
;[[Action0]] - Defines new properties for anything added or changed by the NewGRF&lt;br /&gt;
:{| |-&lt;br /&gt;
|rowspan=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;width:3em&amp;quot;|&#039;&#039;&#039;0&#039;&#039;&#039;&lt;br /&gt;
| [[Action0/Vehicles | Vehicles]]&lt;br /&gt;
| [[Action0/Vehicles/Trains | Trains]]&lt;br /&gt;
| [[Action0/Vehicles/RoadVehicles | RoadVehicles]]&lt;br /&gt;
| [[Action0/Vehicles/Ships | Ships]]&lt;br /&gt;
| [[Action0/Vehicles/Planes | Aircraft]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Action0/Stations | Stations]]&lt;br /&gt;
| [[Action0/Canals | Canals &amp;amp; Rivers]]&lt;br /&gt;
| [[Action0/Bridges | Bridges]]&lt;br /&gt;
| [[Action0/Houses | Houses]]&lt;br /&gt;
| [[Action0/Global Settings | Global Settings]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Action0/Industry Tiles | Industry Tiles]]&lt;br /&gt;
| [[Action0/Industries | Industries]]&lt;br /&gt;
| [[Action0/Cargos | Cargos]]&lt;br /&gt;
| [[Action0/Sound Effects | Sound Effects]]&lt;br /&gt;
| [[Action0/Airports | Airports]]&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Signals&#039;&#039;&lt;br /&gt;
| [[Action0/Objects | Objects]]&lt;br /&gt;
| [[Action0/Railtypes | Railtypes]]&lt;br /&gt;
| [[Action0/Airport Tiles | Airport Tiles]]&lt;br /&gt;
| [[Action0/Roadtypes | Roadtypes]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Action0/Tramtypes | Tramtypes]]&lt;br /&gt;
| [[Action0/Road Stops| Road Stops]]&lt;br /&gt;
| [[Action0/Badges | Badges]]&lt;br /&gt;
| &#039;&#039;Towns&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
;[[Action1]] - Defines one or more graphics sets&lt;br /&gt;
;[[Action2]] - Defines graphics set IDs&lt;br /&gt;
* Basic Action2&lt;br /&gt;
:{| |-&lt;br /&gt;
|rowspan=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;width:3em&amp;quot;|&#039;&#039;&#039;2&#039;&#039;&#039;&lt;br /&gt;
|colspan=5| [[Action2/Vehicles | Vehicles]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Action2/Stations | Stations]]&lt;br /&gt;
| [[Action2/Single Set | Canals &amp;amp; Rivers]]&lt;br /&gt;
| &#039;&#039;Bridges&#039;&#039;&lt;br /&gt;
| [[Action2/Sprite Layout | Houses]]&lt;br /&gt;
| &#039;&#039;Global Settings&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[Action2/Sprite Layout | Industry Tiles]]&lt;br /&gt;
| [[Action2/Industries | Industries]]&lt;br /&gt;
| [[Action2/Single Set | Cargos]]&lt;br /&gt;
| [[Action2/Only Callback Failure | Sound Effects]]&lt;br /&gt;
| [[Action2/Single Set | Airports]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Action2/Only Callback Failure | Signals]]&lt;br /&gt;
| [[Action2/Sprite Layout | Objects]]&lt;br /&gt;
| [[Action2/Single Set | Railtypes]]&lt;br /&gt;
| [[Action2/Sprite Layout | Airport Tiles]]&lt;br /&gt;
| [[Action2/Single Set | Roadtypes]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Action2/Single Set | Tramtypes]]&lt;br /&gt;
| [[Action2/Sprite Layout | Road Stops]]&lt;br /&gt;
| [[Action2/Single Set | Badges]]&lt;br /&gt;
| &#039;&#039;Towns&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
* [[VariationalAction2]] - A conditional switch that determines a [[Callbacks|callback]] result or chains to another Action 2&lt;br /&gt;
: [[VarAction2Advanced]] - Advanced features of Variational Action 2&lt;br /&gt;
: [[GlobalVariables | Global Variables]]&lt;br /&gt;
:{| |-&lt;br /&gt;
|rowspan=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;width:3em&amp;quot;|&#039;&#039;&#039;VA2&#039;&#039;&#039;&lt;br /&gt;
|colspan=5| [[VariationalAction2/Vehicles | Vehicles]]&lt;br /&gt;
|-&lt;br /&gt;
| [[VariationalAction2/Stations | Stations]]&lt;br /&gt;
| [[VariationalAction2/Canals | Canals &amp;amp; Rivers]]&lt;br /&gt;
| [[VariationalAction2/Bridges | Bridges]]&lt;br /&gt;
| [[VariationalAction2/Houses | Houses]]&lt;br /&gt;
| &#039;&#039;Global Settings&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[VariationalAction2/Industry Tiles | Industry Tiles]]&lt;br /&gt;
| [[VariationalAction2/Industries | Industries]]&lt;br /&gt;
| [[VariationalAction2/Cargos | Cargos]]&lt;br /&gt;
| &#039;&#039;Sound Effects&#039;&#039;&lt;br /&gt;
| [[VariationalAction2/Airports | Airports]]&lt;br /&gt;
|-&lt;br /&gt;
| [[VariationalAction2/Signals | Signals]]&lt;br /&gt;
| [[VariationalAction2/Objects | Objects]]&lt;br /&gt;
| [[VariationalAction2/Railtypes | Railtypes]]&lt;br /&gt;
| [[VariationalAction2/Airport Tiles | Airport Tiles]]&lt;br /&gt;
| [[VariationalAction2/Roadtypes | Roadtypes]]&lt;br /&gt;
|-&lt;br /&gt;
| [[VariationalAction2/Tramtypes | Tramtypes]]&lt;br /&gt;
| [[VariationalAction2/Road Stops | Road Stops]]&lt;br /&gt;
| [[VariationalAction2/Badges | Badges]]&lt;br /&gt;
| [[VariationalAction2/Towns | Towns]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
* [[RandomAction2]] - A randomized Variational Action 2&lt;br /&gt;
:{| |-&lt;br /&gt;
|rowspan=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;width:3em&amp;quot;|&#039;&#039;&#039;R&#039;&#039;&#039;&lt;br /&gt;
|colspan=5| [[RandomAction2#Vehicles | Vehicles]]&lt;br /&gt;
|-&lt;br /&gt;
| [[RandomAction2#Stations | Stations]]&lt;br /&gt;
| [[RandomAction2#Canals | Canals &amp;amp; Rivers]]&lt;br /&gt;
| &#039;&#039;Bridges&#039;&#039;&lt;br /&gt;
| [[RandomAction2#Town_building_triggers | Houses]]&lt;br /&gt;
| &#039;&#039;Global Settings&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[RandomAction2#Industry_tile_triggers | Industry Tiles]]&lt;br /&gt;
| [[RandomAction2#Industry_tile_triggers | Industries]]&lt;br /&gt;
| &#039;&#039;Cargos&#039;&#039;&lt;br /&gt;
| &#039;&#039;Sound Effects&#039;&#039;&lt;br /&gt;
| [[RandomAction2#Stations | Airports]]&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Signals&#039;&#039;&lt;br /&gt;
| [[RandomAction2#Objects | Objects]]&lt;br /&gt;
| [[RandomAction2#Rail_types | Railtypes]]&lt;br /&gt;
| [[RandomAction2#Stations | Airport Tiles]]&lt;br /&gt;
| [[RandomAction2#Road_types | Roadtypes]]&lt;br /&gt;
|-&lt;br /&gt;
| [[RandomAction2#Tram_types | Tramtypes]]&lt;br /&gt;
| [[RandomAction2#Road_stops | Road Stops]]&lt;br /&gt;
| &#039;&#039;Badges&#039;&#039;&lt;br /&gt;
| &#039;&#039;Towns&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* [[Callbacks]] - List of available callbacks&lt;br /&gt;
&lt;br /&gt;
;[[Action3]] - Associates Action 2s with an Action 0&lt;br /&gt;
:{| |-&lt;br /&gt;
|rowspan=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;width:3em&amp;quot;|&#039;&#039;&#039;3&#039;&#039;&#039;&lt;br /&gt;
|colspan=5| [[Action3 | Vehicles]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Action3 | Stations]]&lt;br /&gt;
| [[Action3/Canals | Canals &amp;amp; Rivers]]&lt;br /&gt;
| &#039;&#039;Bridges&#039;&#039;&lt;br /&gt;
| [[Action3 | Houses]]&lt;br /&gt;
| &#039;&#039;Global Settings&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[Action3 | Industry Tiles]]&lt;br /&gt;
| [[Action3 | Industries]]&lt;br /&gt;
| [[Action3 | Cargos]]&lt;br /&gt;
| [[Action3 | Sound Effects]]&lt;br /&gt;
| [[Action3 | Airports]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Action3 | Signals]]&lt;br /&gt;
| [[Action3 | Objects]]&lt;br /&gt;
| [[Action3/Railtypes | Railtypes]]&lt;br /&gt;
| [[Action3 | Airport Tiles]]&lt;br /&gt;
| [[Action3/Roadtypes | Roadtypes]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Action3/Tramtypes | Tramtypes]]&lt;br /&gt;
| [[Action3 | Road Stops]]&lt;br /&gt;
| [[Action3/Badges | Badges]]&lt;br /&gt;
| &#039;&#039;Towns&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
: [[Action3LiveryOverride]] - Change wagon livery to match the engine&lt;br /&gt;
;[[Action4]] - Defines text strings&lt;br /&gt;
;[[Action5]] - Replaces base set sprites not present in the original TTD.&lt;br /&gt;
;[[Action6]] - Modifies the contents of the following sprite&lt;br /&gt;
;[[Action7]] - Conditionally skips sprites or jumps to a label&lt;br /&gt;
: [[TTDPatchFlags| GameConfigFlags]] - Configuration flags for Action 7/9 Variable 85&lt;br /&gt;
;[[Action8]] - Defines GRFID, Name and Description&lt;br /&gt;
;[[Action9]] - (see action 7 above)&lt;br /&gt;
;[[ActionA]] - Replaces TTD base set sprites&lt;br /&gt;
;[[ActionB]] - Generates an error message&lt;br /&gt;
;[[ActionC]] - Does nothing (can be used to embed comments)&lt;br /&gt;
;[[ActionD]] - Assigns parameters and calculates results&lt;br /&gt;
* [[ReadingOtherGRFParameters]] - Reading another GRF file&#039;s parameters&lt;br /&gt;
* [[ReadingPatchVariables| ReadingGameSettings]] - Reading game configuration settings&lt;br /&gt;
* [[GRFResourceManagement]] - Preventing conflicts with limited resources&lt;br /&gt;
;[[ActionE]] - Deactivates a NewGRF file&lt;br /&gt;
;[[ActionF]] - Defines new town name styles&lt;br /&gt;
;[[Action10]] - Defines a label for action 7/9&lt;br /&gt;
;[[Action11]] - Defines new sounds&lt;br /&gt;
;[[Action12]] - Adds Unicode font glyphs&lt;br /&gt;
;[[Action13]] - Translates GRF-specific strings&lt;br /&gt;
;[[Action14]] - Static NewGRF information (OpenTTD only)&lt;br /&gt;
;[[RealSprites]] - Sprites that actually are drawn on the screen&lt;br /&gt;
;[[RecolorSprites]] - Changing other sprites&#039; colors&lt;br /&gt;
&lt;br /&gt;
== Graphics properties ==&lt;br /&gt;
* [[PalettesAndCoordinates#Palettes | Palettes]] - Palettes used by the game&lt;br /&gt;
* [[PalettesAndCoordinates#Coordinates | Coordinates]] - Coordinates used for sprite alignement&lt;br /&gt;
&lt;br /&gt;
== TTD defaults ==&lt;br /&gt;
* [[DefaultHouseProps]] - Default property values for TTD&#039;s houses&lt;br /&gt;
* [[IndustryTileDefaultProps]] - Default property values for TTD&#039;s industry tiles&lt;br /&gt;
* [[IndustryDefaultProps]] - Default properties values for TTD&#039;s industries&lt;br /&gt;
* [[CargoDefaultProps]] - Default property values for TTD&#039;s cargo types&lt;br /&gt;
* [[VehicleIDs]] - Default vehicle IDs&lt;br /&gt;
* [[NML:Default_Vehicle_Properties]] - Default Vehicle Properties (NML)&lt;br /&gt;
* [[AirportTypes]] - Default Airport IDs&lt;br /&gt;
* [[AirportTileDefaultProps]] - Default airport tile properties&lt;br /&gt;
&lt;br /&gt;
== NewGRF commons ==&lt;br /&gt;
* [[Action0Cargos#CargoClasses_.2816.29 | Cargo classes]] - Commonly used cargo classes&lt;br /&gt;
* [[CargoTypes | Cargo labels]] - Commonly used cargo labels&lt;br /&gt;
* [[ObjectLabels | Object classes]] - Commonly used object clases&lt;br /&gt;
* [[TracktypeLabels | Rail/road/tram type labels]] - Commonly used labels for rail/road/tram types&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
* [[Features]] - List of all features and feature-specific actions.&lt;br /&gt;
* [[BaseCosts | Base Costs]]&lt;br /&gt;
* [[VehicleRefitting | Vehicle Refitting]]&lt;br /&gt;
* [[GrfLoadingStages | GRF loading stages]]&lt;br /&gt;
* [[GlobalVariables | Global variables]]&lt;br /&gt;
* [[Storages | Storages]]&lt;br /&gt;
* [[StringCodes | String control codes]]&lt;br /&gt;
* [[TextIDs | Text IDs (TTD + TTDPatch + NewGRF defined)]]&lt;br /&gt;
* [[GRFActionsDetailed | Syntax details]]&lt;br /&gt;
* [[Version numbers | Types of version numbers used throughout the specs]]&lt;br /&gt;
* [[DebuggingGRFCode | Debugging NewGRFs]]&lt;br /&gt;
* [[SpriteErrors | TTDPatch error codes on loading NewGRFs]]&lt;br /&gt;
&lt;br /&gt;
== Game mechanics ==&lt;br /&gt;
* [[TownZones | Town zones]]&lt;br /&gt;
* [[NMLMain | NML]]&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Main_Page&amp;diff=4920</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Main_Page&amp;diff=4920"/>
		<updated>2025-02-17T13:25:33Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Sprite types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sprite types ==&lt;br /&gt;
;[[Action0]] - Defines new properties for anything added or changed by the NewGRF&lt;br /&gt;
:{| |-&lt;br /&gt;
|rowspan=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;width:3em&amp;quot;|&#039;&#039;&#039;0&#039;&#039;&#039;&lt;br /&gt;
| [[Action0/Vehicles | Vehicles]]&lt;br /&gt;
| [[Action0/Vehicles/Trains | Trains]]&lt;br /&gt;
| [[Action0/Vehicles/RoadVehicles | RoadVehicles]]&lt;br /&gt;
| [[Action0/Vehicles/Ships | Ships]]&lt;br /&gt;
| [[Action0/Vehicles/Planes | Aircraft]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Action0/Stations | Stations]]&lt;br /&gt;
| [[Action0/Canals | Canals &amp;amp; Rivers]]&lt;br /&gt;
| [[Action0/Bridges | Bridges]]&lt;br /&gt;
| [[Action0/Houses | Houses]]&lt;br /&gt;
| [[Action0/Global Settings | Global Settings]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Action0/Industry Tiles | Industry Tiles]]&lt;br /&gt;
| [[Action0/Industries | Industries]]&lt;br /&gt;
| [[Action0/Cargos | Cargos]]&lt;br /&gt;
| [[Action0/Sound Effects | Sound Effects]]&lt;br /&gt;
| [[Action0/Airports | Airports]]&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Signals&#039;&#039;&lt;br /&gt;
| [[Action0/Objects | Objects]]&lt;br /&gt;
| [[Action0/Railtypes | Railtypes]]&lt;br /&gt;
| [[Action0/Airport Tiles | Airport Tiles]]&lt;br /&gt;
| [[Action0/Roadtypes | Roadtypes]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Action0/Tramtypes | Tramtypes]]&lt;br /&gt;
| [[Action0/Road Stops| Road Stops]]&lt;br /&gt;
| [[Action0/Badges | Badges]]&lt;br /&gt;
| &#039;&#039;Towns&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
;[[Action1]] - Defines one or more graphics sets&lt;br /&gt;
;[[Action2]] - Defines graphics set IDs&lt;br /&gt;
* Basic Action2&lt;br /&gt;
:{| |-&lt;br /&gt;
|rowspan=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;width:3em&amp;quot;|&#039;&#039;&#039;2&#039;&#039;&#039;&lt;br /&gt;
|colspan=5| [[Action2/Vehicles | Vehicles]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Action2/Stations | Stations]]&lt;br /&gt;
| [[Action2/Single Set | Canals &amp;amp; Rivers]]&lt;br /&gt;
| &#039;&#039;Bridges&#039;&#039;&lt;br /&gt;
| [[Action2/Sprite Layout | Houses]]&lt;br /&gt;
| &#039;&#039;Global Settings&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[Action2/Sprite Layout | Industry Tiles]]&lt;br /&gt;
| [[Action2/Industries | Industries]]&lt;br /&gt;
| [[Action2/Single Set | Cargos]]&lt;br /&gt;
| [[Action2/Only Callback Failure | Sound Effects]]&lt;br /&gt;
| [[Action2/Single Set | Airports]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Action2/Only Callback Failure | Signals]]&lt;br /&gt;
| [[Action2/Sprite Layout | Objects]]&lt;br /&gt;
| [[Action2/Single Set | Railtypes]]&lt;br /&gt;
| [[Action2/Sprite Layout | Airport Tiles]]&lt;br /&gt;
| [[Action2/Single Set | Roadtypes]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Action2/Single Set | Tramtypes]]&lt;br /&gt;
| [[Action2/Sprite Layout | Road Stops]]&lt;br /&gt;
| &#039;&#039;Towns&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
* [[VariationalAction2]] - A conditional switch that determines a [[Callbacks|callback]] result or chains to another Action 2&lt;br /&gt;
: [[VarAction2Advanced]] - Advanced features of Variational Action 2&lt;br /&gt;
: [[GlobalVariables | Global Variables]]&lt;br /&gt;
:{| |-&lt;br /&gt;
|rowspan=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;width:3em&amp;quot;|&#039;&#039;&#039;VA2&#039;&#039;&#039;&lt;br /&gt;
|colspan=5| [[VariationalAction2/Vehicles | Vehicles]]&lt;br /&gt;
|-&lt;br /&gt;
| [[VariationalAction2/Stations | Stations]]&lt;br /&gt;
| [[VariationalAction2/Canals | Canals &amp;amp; Rivers]]&lt;br /&gt;
| [[VariationalAction2/Bridges | Bridges]]&lt;br /&gt;
| [[VariationalAction2/Houses | Houses]]&lt;br /&gt;
| &#039;&#039;Global Settings&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[VariationalAction2/Industry Tiles | Industry Tiles]]&lt;br /&gt;
| [[VariationalAction2/Industries | Industries]]&lt;br /&gt;
| [[VariationalAction2/Cargos | Cargos]]&lt;br /&gt;
| &#039;&#039;Sound Effects&#039;&#039;&lt;br /&gt;
| [[VariationalAction2/Airports | Airports]]&lt;br /&gt;
|-&lt;br /&gt;
| [[VariationalAction2/Signals | Signals]]&lt;br /&gt;
| [[VariationalAction2/Objects | Objects]]&lt;br /&gt;
| [[VariationalAction2/Railtypes | Railtypes]]&lt;br /&gt;
| [[VariationalAction2/Airport Tiles | Airport Tiles]]&lt;br /&gt;
| [[VariationalAction2/Roadtypes | Roadtypes]]&lt;br /&gt;
|-&lt;br /&gt;
| [[VariationalAction2/Tramtypes | Tramtypes]]&lt;br /&gt;
| [[VariationalAction2/Road Stops | Road Stops]]&lt;br /&gt;
| [[VariationalAction2/Badges | Badges]]&lt;br /&gt;
| [[VariationalAction2/Towns | Towns]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
* [[RandomAction2]] - A randomized Variational Action 2&lt;br /&gt;
:{| |-&lt;br /&gt;
|rowspan=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;width:3em&amp;quot;|&#039;&#039;&#039;R&#039;&#039;&#039;&lt;br /&gt;
|colspan=5| [[RandomAction2#Vehicles | Vehicles]]&lt;br /&gt;
|-&lt;br /&gt;
| [[RandomAction2#Stations | Stations]]&lt;br /&gt;
| [[RandomAction2#Canals | Canals &amp;amp; Rivers]]&lt;br /&gt;
| &#039;&#039;Bridges&#039;&#039;&lt;br /&gt;
| [[RandomAction2#Town_building_triggers | Houses]]&lt;br /&gt;
| &#039;&#039;Global Settings&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[RandomAction2#Industry_tile_triggers | Industry Tiles]]&lt;br /&gt;
| [[RandomAction2#Industry_tile_triggers | Industries]]&lt;br /&gt;
| &#039;&#039;Cargos&#039;&#039;&lt;br /&gt;
| &#039;&#039;Sound Effects&#039;&#039;&lt;br /&gt;
| [[RandomAction2#Stations | Airports]]&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Signals&#039;&#039;&lt;br /&gt;
| [[RandomAction2#Objects | Objects]]&lt;br /&gt;
| [[RandomAction2#Rail_types | Railtypes]]&lt;br /&gt;
| [[RandomAction2#Stations | Airport Tiles]]&lt;br /&gt;
| [[RandomAction2#Road_types | Roadtypes]]&lt;br /&gt;
|-&lt;br /&gt;
| [[RandomAction2#Tram_types | Tramtypes]]&lt;br /&gt;
| [[RandomAction2#Road_stops | Road Stops]]&lt;br /&gt;
| &#039;&#039;Badges&#039;&#039;&lt;br /&gt;
| &#039;&#039;Towns&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* [[Callbacks]] - List of available callbacks&lt;br /&gt;
&lt;br /&gt;
;[[Action3]] - Associates Action 2s with an Action 0&lt;br /&gt;
:{| |-&lt;br /&gt;
|rowspan=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;width:3em&amp;quot;|&#039;&#039;&#039;3&#039;&#039;&#039;&lt;br /&gt;
|colspan=5| [[Action3 | Vehicles]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Action3 | Stations]]&lt;br /&gt;
| [[Action3/Canals | Canals &amp;amp; Rivers]]&lt;br /&gt;
| &#039;&#039;Bridges&#039;&#039;&lt;br /&gt;
| [[Action3 | Houses]]&lt;br /&gt;
| &#039;&#039;Global Settings&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[Action3 | Industry Tiles]]&lt;br /&gt;
| [[Action3 | Industries]]&lt;br /&gt;
| [[Action3 | Cargos]]&lt;br /&gt;
| [[Action3 | Sound Effects]]&lt;br /&gt;
| [[Action3 | Airports]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Action3 | Signals]]&lt;br /&gt;
| [[Action3 | Objects]]&lt;br /&gt;
| [[Action3/Railtypes | Railtypes]]&lt;br /&gt;
| [[Action3 | Airport Tiles]]&lt;br /&gt;
| [[Action3/Roadtypes | Roadtypes]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Action3/Tramtypes | Tramtypes]]&lt;br /&gt;
| [[Action3 | Road Stops]]&lt;br /&gt;
| [[Action3/Badges | Badges]]&lt;br /&gt;
| &#039;&#039;Towns&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
: [[Action3LiveryOverride]] - Change wagon livery to match the engine&lt;br /&gt;
;[[Action4]] - Defines text strings&lt;br /&gt;
;[[Action5]] - Replaces base set sprites not present in the original TTD.&lt;br /&gt;
;[[Action6]] - Modifies the contents of the following sprite&lt;br /&gt;
;[[Action7]] - Conditionally skips sprites or jumps to a label&lt;br /&gt;
: [[TTDPatchFlags| GameConfigFlags]] - Configuration flags for Action 7/9 Variable 85&lt;br /&gt;
;[[Action8]] - Defines GRFID, Name and Description&lt;br /&gt;
;[[Action9]] - (see action 7 above)&lt;br /&gt;
;[[ActionA]] - Replaces TTD base set sprites&lt;br /&gt;
;[[ActionB]] - Generates an error message&lt;br /&gt;
;[[ActionC]] - Does nothing (can be used to embed comments)&lt;br /&gt;
;[[ActionD]] - Assigns parameters and calculates results&lt;br /&gt;
* [[ReadingOtherGRFParameters]] - Reading another GRF file&#039;s parameters&lt;br /&gt;
* [[ReadingPatchVariables| ReadingGameSettings]] - Reading game configuration settings&lt;br /&gt;
* [[GRFResourceManagement]] - Preventing conflicts with limited resources&lt;br /&gt;
;[[ActionE]] - Deactivates a NewGRF file&lt;br /&gt;
;[[ActionF]] - Defines new town name styles&lt;br /&gt;
;[[Action10]] - Defines a label for action 7/9&lt;br /&gt;
;[[Action11]] - Defines new sounds&lt;br /&gt;
;[[Action12]] - Adds Unicode font glyphs&lt;br /&gt;
;[[Action13]] - Translates GRF-specific strings&lt;br /&gt;
;[[Action14]] - Static NewGRF information (OpenTTD only)&lt;br /&gt;
;[[RealSprites]] - Sprites that actually are drawn on the screen&lt;br /&gt;
;[[RecolorSprites]] - Changing other sprites&#039; colors&lt;br /&gt;
&lt;br /&gt;
== Graphics properties ==&lt;br /&gt;
* [[PalettesAndCoordinates#Palettes | Palettes]] - Palettes used by the game&lt;br /&gt;
* [[PalettesAndCoordinates#Coordinates | Coordinates]] - Coordinates used for sprite alignement&lt;br /&gt;
&lt;br /&gt;
== TTD defaults ==&lt;br /&gt;
* [[DefaultHouseProps]] - Default property values for TTD&#039;s houses&lt;br /&gt;
* [[IndustryTileDefaultProps]] - Default property values for TTD&#039;s industry tiles&lt;br /&gt;
* [[IndustryDefaultProps]] - Default properties values for TTD&#039;s industries&lt;br /&gt;
* [[CargoDefaultProps]] - Default property values for TTD&#039;s cargo types&lt;br /&gt;
* [[VehicleIDs]] - Default vehicle IDs&lt;br /&gt;
* [[NML:Default_Vehicle_Properties]] - Default Vehicle Properties (NML)&lt;br /&gt;
* [[AirportTypes]] - Default Airport IDs&lt;br /&gt;
* [[AirportTileDefaultProps]] - Default airport tile properties&lt;br /&gt;
&lt;br /&gt;
== NewGRF commons ==&lt;br /&gt;
* [[Action0Cargos#CargoClasses_.2816.29 | Cargo classes]] - Commonly used cargo classes&lt;br /&gt;
* [[CargoTypes | Cargo labels]] - Commonly used cargo labels&lt;br /&gt;
* [[ObjectLabels | Object classes]] - Commonly used object clases&lt;br /&gt;
* [[TracktypeLabels | Rail/road/tram type labels]] - Commonly used labels for rail/road/tram types&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
* [[Features]] - List of all features and feature-specific actions.&lt;br /&gt;
* [[BaseCosts | Base Costs]]&lt;br /&gt;
* [[VehicleRefitting | Vehicle Refitting]]&lt;br /&gt;
* [[GrfLoadingStages | GRF loading stages]]&lt;br /&gt;
* [[GlobalVariables | Global variables]]&lt;br /&gt;
* [[Storages | Storages]]&lt;br /&gt;
* [[StringCodes | String control codes]]&lt;br /&gt;
* [[TextIDs | Text IDs (TTD + TTDPatch + NewGRF defined)]]&lt;br /&gt;
* [[GRFActionsDetailed | Syntax details]]&lt;br /&gt;
* [[Version numbers | Types of version numbers used throughout the specs]]&lt;br /&gt;
* [[DebuggingGRFCode | Debugging NewGRFs]]&lt;br /&gt;
* [[SpriteErrors | TTDPatch error codes on loading NewGRFs]]&lt;br /&gt;
&lt;br /&gt;
== Game mechanics ==&lt;br /&gt;
* [[TownZones | Town zones]]&lt;br /&gt;
* [[NMLMain | NML]]&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action11&amp;diff=4913</id>
		<title>Action11</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action11&amp;diff=4913"/>
		<updated>2025-01-06T15:53:37Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
{{ottdp|0.6|2.5|ttdprev=2.0.1 alpha 57}}&lt;br /&gt;
&lt;br /&gt;
This action allows the definition of binary included sound samples.&lt;br /&gt;
&lt;br /&gt;
Action 11 may only appear at most once per .grf file.&lt;br /&gt;
The newly defined sounds will be numbered consecutively, starting from 73 (49h) (numbers 0..72 represent original sounds). When you need to refer to your new sounds, you will have to use this numbering.&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;pre&amp;gt;&amp;lt;sprite-number&amp;gt; * &amp;lt;length&amp;gt; 11 &amp;lt;number&amp;gt;&amp;lt;/pre&amp;gt;&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;
|11 ||B||Action 11&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;number&amp;gt; ||W ||Number of binary include sprites that follow&lt;br /&gt;
|}&lt;br /&gt;
&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 11.&lt;br /&gt;
&lt;br /&gt;
=== number ===&lt;br /&gt;
&lt;br /&gt;
This defines the number of binary include sprites that follow.&lt;br /&gt;
&lt;br /&gt;
These can only be added using GRFCodec 0.9.7 or later, using the following format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;17 ** sounds/e67_horn.wav&lt;br /&gt;
18 ** sounds/sheep.wav&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All files included this way must use WAV format, PCM encoding:&lt;br /&gt;
* mono&lt;br /&gt;
* 8-bit or {{ottdp|1.0|no}} 16-bit&lt;br /&gt;
* 11025 Hz, 22050 Hz, or {{ottdp|1.0|no}} 44100 Hz &amp;lt;ref&amp;gt;Technically OpenTTD 0.6 already supported resampling of any sample rate, but playback only used 11025 Hz anyway. Since OpenTTD 1.0 the default playback rate is 44100 Hz.&amp;lt;/ref&amp;gt;&lt;br /&gt;
When using [[Version_numbers#GRF_container_version|GRF container version 1]], the file size cannot exceed 64 kB.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Since OpenTTD 15, compressed sound effects are supported in Ogg Opus format, with no restriction on quality, bit depth or sample rate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For those need to know or are inordinately curious, the actual encoding of a binary include is the same as a pseudosprite:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;sprite-number&amp;gt; * &amp;lt;length&amp;gt; FF &amp;lt;name-len&amp;gt; &amp;lt;name&amp;gt; 00 &amp;lt;data&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Element !![[GRFActionsDetailed|Size]] !! Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;name-len&amp;gt; ||B ||The return value of strlen(&amp;lt;name&amp;gt;);&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;name&amp;gt; ||S ||The name of the included file, with any leading directories stripped&lt;br /&gt;
|-&lt;br /&gt;
|00 ||B ||Null byte terminating the string (not included in size)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;data&amp;gt; ||V ||A byte-for-byte copy of the contents of the file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Importing sound effects from other grf files ==&lt;br /&gt;
{{ottdp|0.6|2.5|ttdprev=2.0.1 alpha 61}}&lt;br /&gt;
Since TTDPatch 2.0.1 alpha 61, it is possible to import sound effects from other grf files (or even the current file). &amp;amp;nbsp;This does not copy the sound effect data (thus reducing memory usage), but does provide a new sound effect entry with its own action 0 properties.&lt;br /&gt;
&lt;br /&gt;
This is a way of either combining useful sound effects in a single grf file and using them in several, or to duplicate sounds with different amplification or priority settings without doubling the memory usage.&lt;br /&gt;
&lt;br /&gt;
The referenced grf file can be anywhere in newgrf(w).cfg and does not have to be active. &amp;amp;nbsp;If it is not loaded, no sound will be played but that is not an error condition. This makes it possible to separate sound effects and graphics into two files, to allow people with little memory to not load the sound effects yet get working graphics.&lt;br /&gt;
&lt;br /&gt;
The format of such an import sprite is the following (replacing a &amp;quot;**&amp;quot; binary sprite within the action 11 sprite block):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;sprite-number&amp;gt; * &amp;lt;length&amp;gt; FE 00 &amp;lt;GRFID&amp;gt; &amp;lt;number&amp;gt;&amp;lt;/pre&amp;gt;&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;
|FE ||B ||Code to identify a non-binary sprite in an action 11 block&lt;br /&gt;
|-&lt;br /&gt;
|00 ||B ||Code to identify a sound effect import&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;GRFID&amp;gt; ||D ||GRFID of grf file to import sound effect from, may be the current one too&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;number&amp;gt; ||W ||Sound effect number to import&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that unlike most other reference to sound numbers, the number here is simply the number within the referenced grf file&#039;s action 11 block, and does not refer to TTD&#039;s samples for numbers 0..72. Also, when importing the sound effect, the action 0 properties are not imported and have to be set separately.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Look at this tt-forums-page for how to add sounds to a train: [http://www.tt-forums.net/viewtopic.php?f=26&amp;amp;t=5033&amp;amp;p=735013#p735013]&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Houses&amp;diff=4908</id>
		<title>NML:Houses</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Houses&amp;diff=4908"/>
		<updated>2024-12-23T09:23:54Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* House IDs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
==House IDs==&lt;br /&gt;
House IDs are local to the NewGRF, you are free to choose any ID in the 0..255-range. You should start your item definition with the &#039;substitute&#039;-property, which allocates a new house. The value of this property should be the ID of a [[NML:List_of_default_house_properties|default house type]], which will be used instead of your item if it is not available for whatever reason (for example, missing NewGRF).&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Since OpenTTD 15 the allowed ID range is increased to 0..4095.&lt;br /&gt;
&lt;br /&gt;
Although the majority of all original houses occupy a single tile, it is possible to define a larger house of up to 2x2 tiles. For this, you should set the fourth &#039;size&#039; parameter in the item-block. Valid values are HOUSE_SIZE_XXX, XXX = &amp;lt;nowiki&amp;gt;[1X1 | 1X2 | 2X1 | 2X2]&amp;lt;/nowiki&amp;gt;. This size should match the size of the substitute house type.&lt;br /&gt;
&lt;br /&gt;
Note, setting the 4th parameter requires to also set the 3rd parameter. If you want automatic id assignment (mind the notes on the [[NML:Item|Item page]]), you need to set the 3rd parameter to -1. Example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
 item(FEAT_HOUSES, item_brewery, -1, HOUSE_SIZE_2X2) {&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Multi-tile houses===&lt;br /&gt;
Internally, due to the way NewGRF houses work, a multi-tile house will occupy more than one item ID. If you assign item ID X to a house, item IDs X+1 (for a 2-tile house) and (X+1) .. (X+3) (for a 4-tile house) will also be used. Normally you don&#039;t have to care about this, but there are two exceptions:&lt;br /&gt;
* If you manually assign numeric ids to your houses. You are recommended to just set all ids to -1 and let NML figure it out for you.&lt;br /&gt;
* When working with several variables that work with house type IDs. Keep in mind that tiles of a multi-tile house may have IDs X .. X + N - 1, with X being the assigned id and N the number of house tiles.&lt;br /&gt;
&lt;br /&gt;
==House properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! property&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| substitute&lt;br /&gt;
| 0 ... 109&lt;br /&gt;
| Number of the default house that replaces this one, if this house is not available for some reason. &#039;&#039;&#039;This property &#039;&#039;must&#039;&#039; be set first, before any other properties or graphics.&#039;&#039;&#039; All properties of the old type are copied to your new house, except for the church / stadium flags (see below). The old house must have the same size as the new house, see the list of [[NML:List_of_default_house_properties|default house types]] for a list of possible substitute IDs.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| string&lt;br /&gt;
| for example string(STR_NAME_EIFFEL_TOWER)&lt;br /&gt;
|-&lt;br /&gt;
| override&lt;br /&gt;
| 0 ... 109&lt;br /&gt;
| id of the default house which this house replaces (and thus disabling the default). This is ignored, if the default house has already been overridden (disabling it another time is pointless). You can define this property multiple times. Your house and the overridden house must have the same size, see the list of [[NML:List_of_default_house_properties|default house types]].&lt;br /&gt;
|-&lt;br /&gt;
| building_flags.&lt;br /&gt;
| bitmask(HOUSE_FLAG_XXX,...)&lt;br /&gt;
|&lt;br /&gt;
;HOUSE_FLAG_NOT_SLOPED&lt;br /&gt;
:Can only be built on flat terrain. Note that 2x2 buildings will always only be built on flat land, even if this bit isn&#039;t set.&lt;br /&gt;
;HOUSE_FLAG_ANIMATE&lt;br /&gt;
:Enable animation unconditionally on (the beginning of) construction. If not set, animation can still be started (conditionally) via the callbacks &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;anim_control&amp;lt;/code&amp;gt;, &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;construction_anim&amp;lt;/code&amp;gt; or &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;watched_cargo_accepted&amp;lt;/code&amp;gt;.&lt;br /&gt;
;HOUSE_FLAG_CHURCH&lt;br /&gt;
:House is a church (only 1  will be built per town)&lt;br /&gt;
;HOUSE_FLAG_STADIUM&lt;br /&gt;
:House is a stadium (only 1 will be built per town)&lt;br /&gt;
;HOUSE_FLAG_ONLY_SE&lt;br /&gt;
:Can only be built in the scenario editor&lt;br /&gt;
;HOUSE_FLAG_PROTECTED&lt;br /&gt;
:Will not be removed by the game&lt;br /&gt;
;HOUSE_FLAG_SYNC_CALLBACK&lt;br /&gt;
:Animation callback &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;anim_control&amp;lt;/code&amp;gt; is called at the same time for all tiles.&lt;br /&gt;
;HOUSE_FLAG_RANDOM_ANIMATION&lt;br /&gt;
:Enable random bits in the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;anim_next_frame&amp;lt;/code&amp;gt;-callback.&lt;br /&gt;
|-&lt;br /&gt;
| population&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Number of inhabitants the building adds to the town, if present. This also affects how many passengers the house generates, unless the &amp;lt;code&amp;gt;cargo_production&amp;lt;/code&amp;gt; callback is used.&lt;br /&gt;
|-&lt;br /&gt;
| mail_multiplier&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Affects how much mail the building generates. Not used if the &amp;lt;code&amp;gt;cargo_production&amp;lt;/code&amp;gt; callback is used.&lt;br /&gt;
|-&lt;br /&gt;
| accepted_cargos&lt;br /&gt;
| Array with up to 3 [cargo_id, amount]-pairs. &lt;br /&gt;
{{nml|0.5}}{{ottdp|1.9|no}} Array with up to 16 [cargo_id, amount]-pairs.&lt;br /&gt;
| The cargos that are accepted by each tile of the house. CargoID is a cargo type from your cargo translation table, amount is the acceptance of the given cargo in 1/8 units.&amp;lt;br /&amp;gt; Example: to make a tile fully accept both PASS and MAIL you could use this: &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;accepted_cargos: [[PASS, 8], [MAIL, 8]];&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt; Example: for a house tile that doesn&#039;t accept any cargos at all you&#039;d use: &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;accepted_cargos: [];&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| local_authority_impact&lt;br /&gt;
| 0 ... 65525&lt;br /&gt;
| amount of happiness decrease of the city council, if the building is destroyed. Town ratings can vary between -1000 (appalling) and +1000 (outstanding). &lt;br /&gt;
|-&lt;br /&gt;
| removal_cost_multiplier&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| probability&lt;br /&gt;
| 0 ... 15 (float)&lt;br /&gt;
| Probability with respect to the default houses (=1). Mind that these are relative probabilities with respect to all houses defined. If all probabilities are defined as 16, they&#039;ll all have the same probability as if they had all a probability of 1.&lt;br /&gt;
|-&lt;br /&gt;
| years_available&lt;br /&gt;
| array of two int&lt;br /&gt;
| [xx, yy] where xx and yy indicate the introduction year and the last year the building can be built&lt;br /&gt;
|-&lt;br /&gt;
| minimum_lifetime&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| number of years the building will remain at least&lt;br /&gt;
|-&lt;br /&gt;
| availability_mask&lt;br /&gt;
|&lt;br /&gt;
[bitmask([[NML:List of town zones|town zones]]), bitmask(CLIMATE_XXX, ...)]&lt;br /&gt;
|&lt;br /&gt;
An array with two bitmasks, the first bitmask is a mask of town zones where this house is available. The second bitmask is a mask of climates combined with the special value ABOVE_SNOWLINE which you need to set for houses available in the arctic climate above the snowline.&amp;lt;br /&amp;gt; Examples:&lt;br /&gt;
&lt;br /&gt;
* Available in the centre town zone in toyland only: &amp;lt;code&amp;gt;[bitmask(TOWNZONE_CENTRE), bitmask(CLIMATE_TOYLAND)]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Available in all town zones in the arctic climate both above and below the snowline: &amp;lt;code&amp;gt;[ALL_TOWNZONES, bitmask(CLIMATE_ARCTIC, ABOVE_SNOWLINE)]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Available everywhere except on the town edge: &amp;lt;code&amp;gt;[ALL_TOWNZONES &amp;amp;amp; ~bitmask(TOWNZONE_EDGE), ALL_CLIMATES | bitmask(ABOVE_SNOWLINE)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| callback_flags&lt;br /&gt;
| bitmask(HOUSE_CBF_XX)&lt;br /&gt;
|&lt;br /&gt;
Do not set this, unless you use [[NML:Old style callbacks|old-style callbacks]].&lt;br /&gt;
|-&lt;br /&gt;
| random_colours&lt;br /&gt;
| array of 4, each COLOUR_XXX&lt;br /&gt;
|&lt;br /&gt;
colour values in an array, refer to the table [[NML:List of default colour translation palettes#Company colour helper functions|here]] for a list of possible values.&lt;br /&gt;
|-&lt;br /&gt;
| refresh_multiplier&lt;br /&gt;
| 0 ... 63&lt;br /&gt;
| Defines the frequency with which the tile will be re-randomized which has an impact for random animation. The tile will be processed by the periodic tile processing loop every (X + 1)*256 ticks, with X being the value of this property.&lt;br /&gt;
|-&lt;br /&gt;
| animation_info&lt;br /&gt;
| Array [ANIMATION_XXX, frame-count]&lt;br /&gt;
| &lt;br /&gt;
Type of animation and its length (1...128 frames):&lt;br /&gt;
&lt;br /&gt;
;ANIMATION_LOOPING&lt;br /&gt;
;ANIMATION_NON_LOOPING&lt;br /&gt;
|-&lt;br /&gt;
| animation_speed&lt;br /&gt;
| 2 ... 16&lt;br /&gt;
|&lt;br /&gt;
Speed of animation, see [[NML:Animation speed|animation speed table]] for the meaning of the values.&lt;br /&gt;
|-&lt;br /&gt;
| building_class&lt;br /&gt;
| 0 .. 254&lt;br /&gt;
| An arbitrary number. You can check for the presence of buildings of the same class when building new buildings or using animation. Only the north tile of a multi-tile building is assigned a class.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| watched_cargo_types&lt;br /&gt;
| array of values from your [[NML:Cargotable|cargo table]]&lt;br /&gt;
| {{ottdp|1.2|2.6|ottdrev=r23072|ttdprev=r1677}}List of cargo types to watch, to be used with the &amp;lt;code style:darkgreen&amp;gt;watched_cargo_accepted&amp;lt;/code&amp;gt; callback.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==House variables==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| construction_state&lt;br /&gt;
| 0..3&lt;br /&gt;
| Current construction state of the house tile. 0..2 = under construction, 3 = finished.&lt;br /&gt;
|-&lt;br /&gt;
| pseudo_random_bits&lt;br /&gt;
| 0..3&lt;br /&gt;
| Some pseudo-random bits, based on the tile position. TTD houses use this to randomize their appearance.&lt;br /&gt;
|-&lt;br /&gt;
| random_bits&lt;br /&gt;
| 0..255&lt;br /&gt;
| 8 random bits, also used for [[NML:Random_switch|random switch]]-blocks. Initially these are the same for all tiles of a multi-tile house.&lt;br /&gt;
|-&lt;br /&gt;
| age&lt;br /&gt;
| 0..255&lt;br /&gt;
| Age of the house in years, limited to 255&lt;br /&gt;
|-&lt;br /&gt;
| town_zone&lt;br /&gt;
| [[NML:List of town zones|town zone]]&lt;br /&gt;
| The town zone of the current tile&lt;br /&gt;
|-&lt;br /&gt;
| terrain_type&lt;br /&gt;
| TILETYPE_XX&lt;br /&gt;
| TILETYPE_NORMAL, TILETYPE_DESERT, TILETYPE_RAIN_FOREST, TILETYPE_SNOW&lt;br /&gt;
|-&lt;br /&gt;
| same_house_count_town&lt;br /&gt;
| 0..255&lt;br /&gt;
| Number of the houses with the same ID in the same town as this house&lt;br /&gt;
|-&lt;br /&gt;
| same_house_count_map&lt;br /&gt;
| 0..255&lt;br /&gt;
| Number of the houses with the same ID on the entire map&lt;br /&gt;
|-&lt;br /&gt;
| same_class_count_town&lt;br /&gt;
| 0..255&lt;br /&gt;
| Number of the houses with the same &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;building_class&amp;lt;/code&amp;gt; in the same town as this house. The class of the north tile of the use is used for this purpose, as other tiles don&#039;t normally have a class.&lt;br /&gt;
|-&lt;br /&gt;
| same_class_count_map&lt;br /&gt;
| 0..255&lt;br /&gt;
| Number of the houses with the same &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;building_class&amp;lt;/code&amp;gt; on the entire map.  The class of the north tile of the use is used for this purpose, as other tiles don&#039;t normally have a class.&lt;br /&gt;
|-&lt;br /&gt;
| generating_town&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| 1 a random town is currently being created, 0 otherwise. Note that while generating a random town, [[NML:Towns#Town variables|town variables]] &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;population&amp;lt;/code&amp;gt; and &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;building_count&amp;lt;/code&amp;gt; are incorrect. The population variable contains the population of buildings generated &#039;&#039;yet&#039;&#039;, the final value may be larger. The building_count is surely higher than the final value will be.&lt;br /&gt;
|-&lt;br /&gt;
| animation_frame&lt;br /&gt;
| 0..255&lt;br /&gt;
| Current animation frame&lt;br /&gt;
|-&lt;br /&gt;
| x_coordinate&lt;br /&gt;
| 0..4095&lt;br /&gt;
| X-coordinate (top right -&amp;amp;gt; bottom left) of the tile on the map&lt;br /&gt;
|-&lt;br /&gt;
| y_coordinate&lt;br /&gt;
| 0..4095&lt;br /&gt;
| Y-coordinate (top left -&amp;amp;gt; bottom right) of the tile on the map&lt;br /&gt;
|-&lt;br /&gt;
| relative_x&lt;br /&gt;
| 0..1&lt;br /&gt;
| X-coordinate (top right -&amp;amp;gt; bottom left) of the tile relative to the northernmost tile.&lt;br /&gt;
|-&lt;br /&gt;
| relative_y&lt;br /&gt;
| 0..1&lt;br /&gt;
| Y-coordinate (top left -&amp;amp;gt; bottom right) of the tile relative to the northernmost tile.&lt;br /&gt;
|-&lt;br /&gt;
| relative_pos&lt;br /&gt;
| 0xYYXX&lt;br /&gt;
|&lt;br /&gt;
A combination of relative_x and relative_y in the format 0xYYXX. Useful if you want to check for a single position. The [[NML:Builtin functions|builtin function]] relative_coord(x, y) may be useful when making comparisons.&lt;br /&gt;
|-&lt;br /&gt;
| house_tile&lt;br /&gt;
| HOUSE_TILE_XXX, XXX = &amp;lt;nowiki&amp;gt;[NORTH | EAST | WEST | SOUTH]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| What tile of a multi-tile house this is.&lt;br /&gt;
|-&lt;br /&gt;
| house_type_id&lt;br /&gt;
| 0..255&lt;br /&gt;
| Item ID of this house type, that was assigned to the item. See the note above about [[#Multi-tile houses|multi-tile houses]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following variables require one or more arguments&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! arguments&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| old_house_count_town&lt;br /&gt;
| ID of old house type (0..109)&lt;br /&gt;
| 0..255&lt;br /&gt;
| Number of old houses with a given ID in the same town as the current house&lt;br /&gt;
|-&lt;br /&gt;
| old_house_count_map&lt;br /&gt;
| ID of old house type (0..109)&lt;br /&gt;
| 0..255&lt;br /&gt;
| Number of old houses with a given ID on the whole map&lt;br /&gt;
|-&lt;br /&gt;
| other_house_count_town&lt;br /&gt;
| ID of house defined in this NewGRF (0..255)&lt;br /&gt;
| 0..255&lt;br /&gt;
| Number of houses with a given ID in the same town as the current house.&lt;br /&gt;
|-&lt;br /&gt;
| other_house_count_map&lt;br /&gt;
| ID of house defined in this NewGRF (0..255)&lt;br /&gt;
| 0..255&lt;br /&gt;
| Number of houses with a given ID on the whole map&lt;br /&gt;
|-&lt;br /&gt;
| other_class_count_town&lt;br /&gt;
| ID of house defined in this NewGRF (0..255)&lt;br /&gt;
| 0..255&lt;br /&gt;
| Number of houses, with the same class as the house with the given ID, in the same town as the current house&lt;br /&gt;
|-&lt;br /&gt;
| other_class_count_map&lt;br /&gt;
| ID of house defined in this NewGRF (0..255)&lt;br /&gt;
| 0..255&lt;br /&gt;
| Number of houses, with the same class as the house with the given ID, on the whole map&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_slope&lt;br /&gt;
| x- and y-offset (both signed, range -8..7)&lt;br /&gt;
| SLOPE_XXX&lt;br /&gt;
| See [[NML:List of tile slopes|tile slopes]] for an overview of possible values&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_is_water&lt;br /&gt;
| x- and y-offset (both signed, range -8..7)&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| 1 if the tile is water, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_terrain_type&lt;br /&gt;
| x- and y-offset (both signed, range -8..7)&lt;br /&gt;
| TILETYPE_XX&lt;br /&gt;
| TILETYPE_NORMAL, TILETYPE_DESERT, TILETYPE_RAIN_FOREST, TILETYPE_SNOW&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_water_class&lt;br /&gt;
| x- and y-offset (both signed, range -8..7)&lt;br /&gt;
| WATER_CLASS_XXX&lt;br /&gt;
| XXX = [NONE &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; SEA &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; CANAL &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; RIVER] Note that tiles for which &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;nearby_tile_is_water&amp;lt;/code&amp;gt; is 0 may still have a water class, e.g. industry tiles with water beneath them.&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_height&lt;br /&gt;
| x- and y-offset (both signed, range -8..7)&lt;br /&gt;
| 0..255 (currently limited to 0..15)&lt;br /&gt;
| Height of the lowest corner of the tile. 1 unit is one height level of 8 pixels.&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_class&lt;br /&gt;
| x- and y-offset (both signed, range -8..7)&lt;br /&gt;
|&lt;br /&gt;
[[NML:List of tile classes|Tile class]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_animation_frame&lt;br /&gt;
| x- and y-offset (both signed, range -8..7)&lt;br /&gt;
| 0..255&lt;br /&gt;
| Animation frame of the given tile&lt;br /&gt;
|-&lt;br /&gt;
| cargo_accepted_nearby_ever&lt;br /&gt;
| cargo type, x- and y-offset &amp;lt;ref name=&amp;quot;cargo_accepted_nearby&amp;quot;&amp;gt;Cargo type should be from your cargo translation table. X- and y-offset are optional, if provided both must be in range -128..127. A station is considered nearby if the tile is in the station&#039;s acceptance area. This is the purpose of the x- and y-offset, as other tiles may have other stations nearby.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| 1 if the given cargo type was ever accepted at a nearby station, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| cargo_accepted_nearby_last_month&lt;br /&gt;
| cargo type, x- and y-offset &amp;lt;ref name=&amp;quot;cargo_accepted_nearby&amp;quot; /&amp;gt;&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| 1 if the given cargo type was accepted at a nearby station in the last month, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| cargo_accepted_nearby_this_month&lt;br /&gt;
| cargo type, x- and y-offset &amp;lt;ref name=&amp;quot;cargo_accepted_nearby&amp;quot; /&amp;gt;&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| 1 if the given cargo type was ever accepted at a nearby station in this month, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| cargo_accepted_nearby_last_bigtick&lt;br /&gt;
| cargo type, x- and y-offset &amp;lt;ref name=&amp;quot;cargo_accepted_nearby&amp;quot; /&amp;gt;&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| 1 if the given cargo type was ever accepted at a nearby station since the last periodic processing, which happens every 250 ticks. 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| cargo_accepted_nearby_watched&lt;br /&gt;
| cargo type, x- and y-offset &amp;lt;ref name=&amp;quot;cargo_accepted_nearby&amp;quot; /&amp;gt;&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| 1 if the given cargo type was one of the cargo types that triggered the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;watched_cargo_accepted&amp;lt;/code&amp;gt;-callback (only during this callback), 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| nearest_house_matching_criterion&lt;br /&gt;
| radius (1..63) and criterion (SEARCH_HOUSE_BY_XXX, XXX = [&amp;lt;nowiki&amp;gt;TYPE | CLASS | GRFID&amp;lt;/nowiki&amp;gt;])&lt;br /&gt;
| 1..63, or 0 if not found&lt;br /&gt;
| Perform a circular search for a house matching either the id, &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;building_class&amp;lt;/code&amp;gt; or GRFID of this house, depending on the second parameter. The first parameter specifies the maximum search radius. Return value is the Manhattan distance of the closest matching house tile, or 0 if no match was found. Note that tiles of the originating house never match. See also the note above about [[#Multi-tile houses|multi-tile houses]].&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_house_id&lt;br /&gt;
| x- and y-offset (both signed, range -8..7)&lt;br /&gt;
| -1, or 0 .. 767&lt;br /&gt;
| Return value is -1 if the tile is not a house tile, X (0..255) if the tile contains old house type X, 256+X if the tile contains a house from this NewGRF with ID X, 512+X if the tile contains a house from a different NewGRF with ID X. See the note above about [[#Multi-tile houses|multi-tile houses]].&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_house_class&lt;br /&gt;
| x- and y-offset (both signed, range -8..7)&lt;br /&gt;
| -1, 0, or 256 .. 767&lt;br /&gt;
| Return value is -1 if the tile is not a house tile, 0 if the house tile does not have a class (this includes all old house types), 256+X (X = 0..255) if the house has been defined by this NewGRF with &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;building_class&amp;lt;/code&amp;gt; X or 512+X if the house has been defined by a different NewGRF with &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;building_class&amp;lt;/code&amp;gt; X. Note that for a multi-tile house, generally only the north tile has a sensible class value.&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_house_grfid&lt;br /&gt;
| x- and y-offset (both signed, range -8..7)&lt;br /&gt;
| -1, 0 or a GRFID&lt;br /&gt;
| Return value is -1 if the tile is not a house tile, 0 if the house tile contains an old house type, or else the GRFID of the NewGRF defining the house.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==House callbacks==&lt;br /&gt;
Unless noted otherwise, callbacks may be called for any of the tiles of a multi-tile house.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! callback&lt;br /&gt;
! return value&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| default&lt;br /&gt;
| Sprite layout&lt;br /&gt;
| Graphics for the house tile&lt;br /&gt;
|-&lt;br /&gt;
| graphics_xxx, xxx = &amp;lt;nowiki&amp;gt;[north | east | south | west]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Sprite layout&lt;br /&gt;
| Tile-specific graphics for one of the tiles of a multi-tile house. Of course, this is callback is called for that tile only.&lt;br /&gt;
|-&lt;br /&gt;
| random_trigger&lt;br /&gt;
| N/A&lt;br /&gt;
|&lt;br /&gt;
See [[NML:Random switch|random switch]] for more information.&lt;br /&gt;
|-&lt;br /&gt;
| anim_next_frame&lt;br /&gt;
| Next animation frame or CB_RESULT_XXX&lt;br /&gt;
| Called for every animation frame, returns the next frame to display. Alternatively, return CB_RESULT_NEXT_FRAME or CB_RESULT_STOP_ANIMATION to show the next frame or stop animation, respectively. Returning a sound effect in the high byte will cause that sound effect to be played.&lt;br /&gt;
* &amp;lt;code&amp;gt;extra_callback_info1&amp;lt;/code&amp;gt;: 32 random bits, if enabled in the &amp;lt;code&amp;gt;building_flags&amp;lt;/code&amp;gt; property.&lt;br /&gt;
Note: Every time the animation frame is changed the map tile will be refreshed, even if the selected graphics stay the same. Therefore using the animation frame as a timer should be avoided, and animation triggers should be preferred instead.&lt;br /&gt;
|-&lt;br /&gt;
| anim_control&lt;br /&gt;
| Next animation frame or CB_RESULT_XXX&lt;br /&gt;
| Called every 256 ticks. Return the animation frame to show, or CB_RESULT_XXX with XXX = &amp;lt;nowiki&amp;gt;[CB_RESULT_START_ANIMATION | STOP_ANIMATION | DO_NOTHING]&amp;lt;/nowiki&amp;gt; to respectively start the animation in its current frame, stop the animation or do nothing. Returning a sound effect in the high byte will cause that sound effect to be played.&lt;br /&gt;
* &amp;lt;code&amp;gt;extra_callback_info1&amp;lt;/code&amp;gt;: 32 random bits. The low 16 bits are always different for each house tile, but the high 16 bits are the same for each tile if synchronized animation is enabled in the &amp;lt;code&amp;gt;building_flags&amp;lt;/code&amp;gt;-property.&lt;br /&gt;
Note: Every time the animation frame is changed the map tile will be refreshed, even if the selected graphics stay the same. Therefore using the animation frame as a timer should be avoided, and animation triggers should be preferred instead.&lt;br /&gt;
|-&lt;br /&gt;
| construction_anim&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;anim_control&amp;lt;/code&amp;gt;&lt;br /&gt;
| Works the same as the &amp;lt;code&amp;gt;anim_control&amp;lt;/code&amp;gt; callback, except that it&#039;s called when the construction state changes.&lt;br /&gt;
|-&lt;br /&gt;
| watched_cargo_accepted&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;anim_control&amp;lt;/code&amp;gt;&lt;br /&gt;
| Works the same as the &amp;lt;code&amp;gt;anim_control&amp;lt;/code&amp;gt; callback, except that it&#039;s called when one of the watched cargo types is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| anim_speed&lt;br /&gt;
| 0 .. 16&lt;br /&gt;
| Decide the time an animation frame should last. Return value is interpreted as (num_ticks = 2^anim_speed), which each tick lasting 30 ms. Avoid using this callback if possible, since it has to be called each tick for every animated tile. This can be used to create animation frames that last between 30 ms and 33 minutes.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_type_accept&lt;br /&gt;
| type1 + (type2 &amp;amp;lt;&amp;amp;lt; 5) + (type3 &amp;amp;lt;&amp;amp;lt; 10)&lt;br /&gt;
| Decide the cargo types that this tile accepts. If this callback is not implemented or fails, the values from &amp;lt;code&amp;gt;accepted_cargo&amp;lt;/code&amp;gt; are used instead. Bits 0..4: First cargo type. Bits 5..9: Second cargo type. Bits 10..14: Third cargo type.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_amount_accept&lt;br /&gt;
| amt1 + (amt2 &amp;amp;lt;&amp;amp;lt; 4) + (amt3 &amp;amp;lt;&amp;amp;lt; 8)&lt;br /&gt;
| Acceptance for each cargo amount in 1/8th. If this callback is not implemented or fails, the values from the acceptance properties are used instead. Cargo types are from the &amp;lt;code&amp;gt;cargo_type_accept&amp;lt;/code&amp;gt; callback, or the &amp;lt;code&amp;gt;accepted_cargo&amp;lt;/code&amp;gt; property if that callback failed. Bits 0..3: Acceptance of first cargo type. Bits 4..7: Acceptance of second cargo type. Bits 8..11: Acceptance of third cargo type.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_production&lt;br /&gt;
| (cargo_type * 256) + amount, or &amp;lt;code&amp;gt;CB_RESULT_HOUSE_NO_MORE_PRODUCTION&amp;lt;/code&amp;gt;&lt;br /&gt;
| Called every 256 ticks. The return value specifies what cargo and what amount is produced. The callback is called multiple times until &amp;lt;code&amp;gt;CB_RESULT_HOUSE_NO_MORE_PRODUCTION&amp;lt;/code&amp;gt; is returned.&lt;br /&gt;
* &amp;lt;code&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;: The number of iterations so far.&lt;br /&gt;
* &amp;lt;code&amp;gt;extra_callback_info2&amp;lt;/code&amp;gt;: 32 random bits.&lt;br /&gt;
|-&lt;br /&gt;
| foundations&lt;br /&gt;
| CB_RESULT[_NO]_FOUNDATIONS&lt;br /&gt;
| Return CB_RESULT_FOUNDATIONS to draw standard foundations (default) or CB_RESULT_NO_FOUNDATIONS to not draw them.&lt;br /&gt;
|-&lt;br /&gt;
| autoslope&lt;br /&gt;
| CB_RESULT[_NO]_AUTOSLOPE&lt;br /&gt;
| Return CB_RESULT_AUTOSLOPE to allow autoslope (altering the ground below a tile) or CB_RESULT_NO_AUTOSLOPE to disallow it.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| String&lt;br /&gt;
| Name of the building (when using tile query tool)&lt;br /&gt;
|-&lt;br /&gt;
| colour&lt;br /&gt;
| Palette number&lt;br /&gt;
|&lt;br /&gt;
Used to recolour the building. See here [[NML:List of default colour translation palettes|here]] for an overview of default palettes.&lt;br /&gt;
|-&lt;br /&gt;
| construction_check&lt;br /&gt;
| 0 or 1&lt;br /&gt;
| Return 1 to allow building the house or 0 to disallow. Called only for the north tile.&lt;br /&gt;
|-&lt;br /&gt;
| destruction&lt;br /&gt;
| 0 or 1&lt;br /&gt;
| Called periodically. Return 0 to keep the building or 1 to destroy it. Called only for the north tile.&lt;br /&gt;
|-&lt;br /&gt;
| protection&lt;br /&gt;
| 0 or 1&lt;br /&gt;
| Return 0 to allow destruction, or 1 to disallow&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Houses&amp;diff=4907</id>
		<title>Action0/Houses</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Houses&amp;diff=4907"/>
		<updated>2024-12-23T09:22:53Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
For town buildings (or simply houses), the offset defines the first house ID for this action 0. House IDs, like station IDs, are unique within each grf file, and in total each game can only have 255 IDs in TTDPatch and 512 IDs in OpenTTD for all active grf files. &lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Since OpenTTD 15, the limits are increased to 4096 IDs, both per-grf and in total.&lt;br /&gt;
&lt;br /&gt;
To start using a house ID, you must first define it by setting its property 08 (see below). If you try to modify a house ID whose property 08 isn&#039;t set, your request is ignored, but not reported as an error, either.&lt;br /&gt;
&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.5|ttdprev=alpha 34}}||Substitute building type&lt;br /&gt;
|-&lt;br /&gt;
|09||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Building flags&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Availability years&lt;br /&gt;
|-&lt;br /&gt;
|0B||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Population&lt;br /&gt;
|-&lt;br /&gt;
|0C||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Mail generation multiplier&lt;br /&gt;
|-&lt;br /&gt;
|0D||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Passenger acceptance&lt;br /&gt;
|-&lt;br /&gt;
|0E||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Mail acceptance&lt;br /&gt;
|-&lt;br /&gt;
|0F||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Goods, food or fizzy drinks acceptance&lt;br /&gt;
|-&lt;br /&gt;
|10||W||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||LA rating decrease on removal (should be set to the same value for every tile for multi-tile buildings)&lt;br /&gt;
|-&lt;br /&gt;
|11||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Removal cost multiplier (should be set to the same value for every tile for multi-tile buildings)&lt;br /&gt;
|-&lt;br /&gt;
|12||W||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Building name ID&lt;br /&gt;
|-&lt;br /&gt;
|13||W||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Building availability mask&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||House callback flags&lt;br /&gt;
|-&lt;br /&gt;
|15||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||House override byte&lt;br /&gt;
|-&lt;br /&gt;
|16||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Periodic refresh multiplier&lt;br /&gt;
|-&lt;br /&gt;
|17||4*B||{{ottdp|0.6|2.5|ttdprev=alpha 35}}||Four random colours to use&lt;br /&gt;
|-&lt;br /&gt;
|18||B||{{ottdp|0.6|2.5|ttdprev=alpha 35}}||Relative probability of appearing&lt;br /&gt;
|-&lt;br /&gt;
|19||B||{{ottdp|0.6|2.5|ttdprev=alpha 38}}||Extra flags&lt;br /&gt;
|-&lt;br /&gt;
|1A||B||{{ottdp|0.6|2.5|ttdprev=alpha 39}}||Animation frames&lt;br /&gt;
|-&lt;br /&gt;
|1B||B||{{ottdp|0.6|2.5|ttdprev=alpha 39}}||Animation speed&lt;br /&gt;
|-&lt;br /&gt;
|1C||B||{{ottdp|0.6|2.5|ttdprev=alpha 43}}||Class of the building type&lt;br /&gt;
|-&lt;br /&gt;
|1D||B||{{ottdp|0.6|2.5|ttdprev=alpha 55 vcs 2}}||Callback flags 2&lt;br /&gt;
|-&lt;br /&gt;
|1E||D||{{ottdp|0.6|2.5|ttdprev=alpha 55 vcs 2}}||Accepted cargo types&lt;br /&gt;
|-&lt;br /&gt;
|1F||B||{{ottdp|0.6|2.6|ttdprev=r1554}}||Minimum life span in years&lt;br /&gt;
|-&lt;br /&gt;
|20||V||{{ottdp|1.2|2.6|ottdrev=r23072|ttdprev=r1677}}||Cargo acceptance watch list&lt;br /&gt;
|-&lt;br /&gt;
|21||W||{{ottdp|0.7|no|ottdrev=r13437}}||Long year (zero based) of minimum appearance&lt;br /&gt;
|-&lt;br /&gt;
|22||W||{{ottdp|0.7|no|ottdrev=r13437}}||Long year (zero based) of maximum appearance&lt;br /&gt;
|-&lt;br /&gt;
|23||V||{{ottdp|1.9|no|ottdrev=48b334cf}}||Tile acceptance list &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When a town decides to expand, each active house type (both old and new ones) has a uniform probability to appear, so the more new houses you define, the fewer old TTD buildings will appear.&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Substitute building type (08) ===&lt;br /&gt;
&lt;br /&gt;
This building type will be used instead of your new one if your definition isn&#039;t available for any reason (the grf file is not found, for example).&lt;br /&gt;
&lt;br /&gt;
Don&#039;t set a substitute building type that is larger than your new one (for example, don&#039;t set 14 (stadium) for an 1x1 building) because this may corrupt savegames. Setting this property automatically copies every property of the substitute building to your new building, so you don&#039;t have to change properties that are the same as the substitute.&lt;br /&gt;
&lt;br /&gt;
House flags 40 and 80 are exceptions; these flags are never set automatically. Only the first property 08 setting copies properties; if you later change it, properties will stay.&lt;br /&gt;
&lt;br /&gt;
There&#039;s a special use of this property beginning from alpha 72: if you set it to FFh, you can disable an old house type. In this case, the ID used must be the number of old house type you want to disable. Disabling only prevents building the type in towns; houses already present on the map will stay unchanged. The type can still be overridden, and overriding affects houses present on the map.&lt;br /&gt;
&lt;br /&gt;
If this house&#039;s action 3 appears before this property is set, the action 3 will have no effect.&lt;br /&gt;
&lt;br /&gt;
=== Building flags (09) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||This is a 1x1 building&lt;br /&gt;
|-&lt;br /&gt;
|1||2||This building can be built only on flat land (if clear, foundations are automatically displayed on sloped land)&lt;br /&gt;
|-&lt;br /&gt;
|2||4||This is a 2x1 building&amp;lt;ref name=&amp;quot;large&amp;quot;&amp;gt;If your building isn&#039;t 1x1, set flags for the north tile, then define the next 1 or 3 tiles tiles (by setting their property 8). The only bit that can be set in the flags of additional tiles is bit 5 (animation). There should be no property 8 setting between the first tile and the additional tiles.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3||8||This is a 1x2 building&amp;lt;ref name=&amp;quot;large&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4||10||This is a 2x2 building&amp;lt;ref name=&amp;quot;large&amp;quot; /&amp;gt;&amp;lt;ref&amp;gt;For 2x2 buildings, the first additional tile is the east one, the second is the west part and the third is the south part. You probably want to set the substitute for additional tiles to a TTD additional tile whose flags are already zero. 2x2 buildings are always built on flat land no matter how bit 1 is set.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|5||20||Animation flag, set in tiles 04 and 05 (large office block). New buildings have a different animation scheme than large office blocks, but animation is still enabled with this bit.&amp;lt;ref&amp;gt;The animation flag works on a per-tile basis, so you should enable it for additional tiles of multi-tile buildings as well if you want all tiles to be animated.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|6||40||This building is a church&amp;lt;ref name=&amp;quot;only1&amp;quot;&amp;gt;Only one church and one stadium can exist in a town. The town won&#039;t build buildings with the according flag set until the old church/stadium is removed. (This can be done by either the town or a player)&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|7||80||This building is a stadium&amp;lt;ref name=&amp;quot;only1&amp;quot; /&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Availability years (0A) ===&lt;br /&gt;
&lt;br /&gt;
The low byte is the minimum year, the high is the maximum. The building can only be built between these two years (inclusive). 1920 is added to both bytes before using the values.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no| }}&lt;br /&gt;
Since the year counting stops in TTDPatch in 2070 even with [[ttwiki:EternalGame|EternalGame]] on, start years above 150 mean &amp;quot;never&amp;quot;, and end years above 150 mean &amp;quot;forever&amp;quot;. In OpenTTD there is no limit for the maximum year (resp. it is 5000000).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; Don&#039;t set the start year below 1930 (0Ah) unless you know what you&#039;re doing!&lt;br /&gt;
&lt;br /&gt;
{{ttdp|}} If TTDPatch finds a building that is available before 1930, it will not build old building types until that year, so you have to provide at least one custom building type that is available before 1930 for every [[TownZones|town zone]], or TTD may deadlock while trying to create a random game or expand a town.&lt;br /&gt;
&lt;br /&gt;
{{ottd|}} The availability of all active houses with the lowest availability year is set to start from year 0, so that always at least one house is available irrespective of starting year. Thus, if you de-activate default houses or set an introduction date prior to the default houses introduction year 1930, you should have at least for each [[TownZones|town zone]] a house with the same earliest availability year or you might end up with a situation where no house can be placed in a [[TownZones|town zone]].&lt;br /&gt;
&lt;br /&gt;
=== Population (0B) and Mail generation multiplier (0C) ===&lt;br /&gt;
[[Image:House_production.png|frame|right|Actual house production roughly depends on squared value of the population / mail generation multiplier.]]&lt;br /&gt;
&lt;br /&gt;
The population of the town will be increased by the amount set in prop. 0B if this building is built. Additional house parts should have a population of zero. The higher this value is, the more passengers this building generates.&lt;br /&gt;
&lt;br /&gt;
The higher the mail generation multiplier is, the more mail the building generates. For multi-tile buildings, mail generation is done in per-tile basis, so you can specify different values for every tile, although distributing the generation equally between tiles is suggested.&lt;br /&gt;
&lt;br /&gt;
This is how exactly passengers are generated: In each periodic processing (i.e. every 256 ticks), a random value 0&amp;lt;=X&amp;lt;=255 is generated for each house tile. If X isn&#039;t smaller than the population of the tile, no passengers are generated. Otherwise, X/8+1 passengers are generated (rounded down). If there is a recession going on, the number of generated passengers is halved, but this division gets rounded up instead of down. Mail generation happens in a similar manner, but with a new random value, and checking against the mail generation multiplier instead of the population.&lt;br /&gt;
&lt;br /&gt;
You can further customize how the cargo is generated with the [[Callbacks#Custom_cargo_production_.282E.29 |callback 2E]].&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Passenger (0D), Mail (0E) and Good/Food/Fizzy drinks (0F) acceptance ===&lt;br /&gt;
&lt;br /&gt;
The acceptance is given in units of 1/8th and must not be larger than 8 eighths.&lt;br /&gt;
&lt;br /&gt;
For property 0F, positive values indicate that the building accepts goods, and negative values (i.e. FF = 1/8th, FE = 2/8ths etc.) indicate acceptance of food or fizzy drinks, depending on the climate.&lt;br /&gt;
&lt;br /&gt;
All the above three values can be set independently for tiles of multi-tile buildings, since every tile is processed individually when determining what a station accepts.&lt;br /&gt;
&lt;br /&gt;
The type of accepted cargo can be modified using [[Action0Houses#Accepted_cargo_types|property 1E]].&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no| }} Note that in TTDPatch the officefood switch may modify acceptance in the sub-arctic and subtropical climates.&lt;br /&gt;
&lt;br /&gt;
=== Building name ID (12) ===&lt;br /&gt;
&lt;br /&gt;
The ID of the text that should be displayed in the land query window. The name can also be set by [[Action4|action 4]] (see there). Should be set to the same value for every tile for multi-tile buildings.&lt;br /&gt;
&lt;br /&gt;
=== Building availability mask (13) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0..4||1,2,4,8,10||which [[VariationalAction2/Houses#Town zone (42)|town zone(s)]] the building can be built in&lt;br /&gt;
|-&lt;br /&gt;
|11||800||can appear in sub-arctic climate above the snow line&lt;br /&gt;
|-&lt;br /&gt;
|12||1000||can appear in temperate climate&lt;br /&gt;
|-&lt;br /&gt;
|13||2000||can appear in sub-arctic climate below the snow line&lt;br /&gt;
|-&lt;br /&gt;
|14||4000||can appear in subtropical climate&lt;br /&gt;
|-&lt;br /&gt;
|15||8000||can appear in toyland climate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This property should be set to zero for additional building tiles.&lt;br /&gt;
&lt;br /&gt;
=== House callback flags (14,1D) ===&lt;br /&gt;
&lt;br /&gt;
For houses, the following [[callbacks]] can be defined by setting the corresponding bit in property 14:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Variable 0C value!!Version!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||17||{{ottdp| | }}||decide whether the house can be built on a given tile&lt;br /&gt;
|-&lt;br /&gt;
|1||2||1A||{{ottdp| | }}||decide the following frame of the animations&lt;br /&gt;
|-&lt;br /&gt;
|2||4||1B||{{ottdp| | }}||periodically start/stop the animation&lt;br /&gt;
|-&lt;br /&gt;
|3||8||1C||{{ottdp| | }}||change animation when construction state changes&lt;br /&gt;
|-&lt;br /&gt;
|4||10||1E||{{ottdp| | }}||decide the color of the building&lt;br /&gt;
|-&lt;br /&gt;
|5||20||1F||{{ottdp| | }}||decide the cargos amounts accepted&lt;br /&gt;
|-&lt;br /&gt;
|6||40||20||{{ottdp| | }}||decide the length of the current animation frame&lt;br /&gt;
|-&lt;br /&gt;
|7||80||21||{{ottdp| | }}||trigger destruction of building&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Property 1D was introduced after all bits of property 14 were filled. Its usage is the same, only the meaning of bits is different:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Variable 0C value!!Version!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||2A||{{ottdp| | }}||decide the cargo types accepted&lt;br /&gt;
|-&lt;br /&gt;
|1||2||2E||{{ottdp| | }}||custom cargo production&lt;br /&gt;
|-&lt;br /&gt;
|2||4||143||{{ottdp| | }}||conditional protection&lt;br /&gt;
|-&lt;br /&gt;
|3||8||14E||{{ottdp|1.0|2.6|ottdrev=r17558|ttdprev=2249}}||decide if default foundations need to be drawn&lt;br /&gt;
|-&lt;br /&gt;
|4||10||14F||{{ottdp|1.0|2.6|ottdrev=r17558|ttdprev=2249}}||allow or deny autosloping below the tile&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 variational Action2 for callbacks.&lt;br /&gt;
&lt;br /&gt;
Callback flags are ignored for additional building tiles.&lt;br /&gt;
&lt;br /&gt;
=== House override byte (15) ===&lt;br /&gt;
&lt;br /&gt;
Setting this property makes this building appear instead of the given old TTD building type. Setting the property is ignored if the given old house type is already overridden. You can set this property more than once to override more old building types.&lt;br /&gt;
&lt;br /&gt;
No new house of the overridden types will be built in towns.&lt;br /&gt;
&lt;br /&gt;
This property works in a per-tile basis, so you override tiles of old multi-tile buildings individually, although the old type will still be built if you don&#039;t override its north tile.&lt;br /&gt;
&lt;br /&gt;
=== Periodic refresh multiplier (16) ===&lt;br /&gt;
&lt;br /&gt;
This is used for random triggers, and sets how often the tile is re-randomized. When set to X, the tile will be re-randomized on every (X+1)-th periodic processing. (In other words, every (X+1)*256 game ticks.) If you want all tiles to be re-randomized, you must set this (but not necessarily to the same value) for each tile.&lt;br /&gt;
&lt;br /&gt;
If callback 1B is enabled in property 14, it is also called after re-randomizing random bits.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.1|2.5|ttdprev=2.5 beta 9}} In TTDPatch versions before TTDPatch 2.6 r1639 and TTDPatch 2.5 beta 9 (including beta 9), this variable could have any value between 0 and 255. After these versions, the upper limit has been lowered to 63. To maintain compatibility, values above 63 will be interpreted as 63.&lt;br /&gt;
&lt;br /&gt;
=== Random colours (17) ===&lt;br /&gt;
&lt;br /&gt;
This specifies four colors used for random painting (see [[Action2HousesIndustryTiles]]). Each byte of the dword defines a color, the values are the same as in Action2, except that numbering starts from zero instead of 775. If not set, this defaults to 04 08 0c 06 (red, blue, orange and green, the colors of the modern office building). Can be set to different values for tiles of multi-tile buildings.&lt;br /&gt;
&lt;br /&gt;
=== Probability (18) ===&lt;br /&gt;
&lt;br /&gt;
This sets the relative probability of this house being built. Old TTD house types have a probability of 16, and this is the default for new types as well.&lt;br /&gt;
&lt;br /&gt;
Increase (or better multiply) this value to make your building appear relatively more often, or decrease (divide) it to make it rarer. If you set this to zero, the house type never appears. The minimal useful value 1 means it&#039;s sixteen times less probable to build this type than a normal type, while the maximum setting of 255 means it&#039;s almost sixteen times more probable.&lt;br /&gt;
&lt;br /&gt;
The probability is relative since the absolute probability depends on the count and probability of other houses as well: the more types are available (and the higher their probabilities are), the less the chance is that your type will be chosen.&lt;br /&gt;
&lt;br /&gt;
=== Extra Flags (19) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Version!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||{{ottdp|0.6|2.5}}||This building appears during the generation of a town, but not later, i.e. will appear in random games, but new ones won&#039;t be built during the game. Useful for buildings that are intended to be historical.&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|0.6|2.5}}||This building is protected, i.e. towns and AI players won&#039;t remove it. Human players can still remove it, so you may need to set a high remove cost/rating to make them think twice.&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|0.6|2.5}}||Synchronized [[Callbacks#Animation_control_.281B.2F25.2F140.2F152.2F159.29| callback 1B]]. (for multi-tile buildings)&amp;lt;ref&amp;gt;If synchronized callbacks are enabled, callback 1B will be called when the periodic processing reaches the main tile of the building, and not when it reaches the current tile. This is useful if your animation must run synchronously on every tile of the building. If this bit is set, callback 1B is called according to the main tile&#039;s property 16, not the current one, to make sure every tile stays in sync.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3||8||{{ottdp|0.6|2.5|ttdprev=beta 2}}||[[Callbacks#Next animation frame (1A/26/141/153/158) |Callback 1A]] needs random bits&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Animation Frames (1A) ===&lt;br /&gt;
&lt;br /&gt;
The bottom seven bits define how many frames the animation consists of, minus one. (I.e. 0 means 1 frame, 1 means 2 frames etc.) The highest bit has another purpose (see below), so the biggest supported value is 7F (128 frames).&lt;br /&gt;
&lt;br /&gt;
The highest bit is set if the animation is looping, i.e. it should start again from the first frame after showing the last frame. Non-looping animations stop after the last frame, leaving it on the screen. Both kinds of animations start automatically when the building is created. It&#039;s recommended to use callback 1B with non-looping animations, so they are played multiple times.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|0.6|2.5|ottdrev=r12347|ttdprev=r1639}} In TTDPatch versions before TTDPatch 2.6 r1639 and TTDPatch 2.5 beta 9 (including beta 9) and OpenTTD before r12347, the frame number was limited to 32. If you intend to maintain compatibility with those versions, you should not use animations longer than 32 frames.&lt;br /&gt;
&lt;br /&gt;
=== Animation Speed (1B) ===&lt;br /&gt;
&lt;br /&gt;
This is the amount of time between switching frames.&lt;br /&gt;
&lt;br /&gt;
The default value is 2, which means the switch occurs every 108 milliseconds. Increasing this value by one doubles the wait, i.e. 3 will cause 216 ms delay, while 4 will pause 432 ms, and so on. Values below 2 have the same effect as 2, so the default is the fastest possible setting. The maximum is 16, which means 1769 seconds (approx. half an hour) delay. Settings above this value may cause strange behaviour.&lt;br /&gt;
&lt;br /&gt;
=== Building Class (1C) ===&lt;br /&gt;
&lt;br /&gt;
Types that were given the same class byte are considered to be in the same class. If you don&#039;t explicitly set this value, the type is considered to have no class (it won&#039;t be considered to be class 0). The scope of a class is the current GRF file, so two types are never in the same class if they were defined by different GRF files. Currently, this property affects variable 44 only.&lt;br /&gt;
&lt;br /&gt;
This property is a per-tile one, you can set it for additional tiles as well. It&#039;s a better idea, however, to set it for the main tile only, since var. 44 counts tiles, not buildings, and you may count multi-tile multiple times otherwise.&lt;br /&gt;
&lt;br /&gt;
=== Accepted cargo types (1E) ===&lt;br /&gt;
&lt;br /&gt;
There may be cases when you want your house to accept something other than the default types (passenger, mail, goods and food). This property allows you to do that. If this property is set to FFFFFFFFh (the default), the meaning of properties 0D, 0E and 0F aren&#039;t changed, that is, they are the passenger, mail and goods/food acceptances, accordingly. If this property isn&#039;t FFFFFFFFh, the first three bytes must be climate-dependent cargo slot numbers (the fourth byte is ignored). In this case property 0D is the amount of acceptance of the first cargo type given, 0E is the same for the second type and 0F is the same for the third type.&lt;br /&gt;
&lt;br /&gt;
From GRF version 7 and above, the meaning of this property changes: instead of climate-dependent cargo slot numbers, you have to give climate-independent cargo IDs. If your GRF has a cargo translation table, then this ID is the index in that table; otherwise, it&#039;s the cargo slot number. Acceptance of cargoes not currently present will automatically be disabled.&lt;br /&gt;
&lt;br /&gt;
{{ottd|15.0}} Since 15.0, a default cargo translation table corresponding to the climate is used if one is not provided.&lt;br /&gt;
&lt;br /&gt;
=== Minimum life span in years (1F) ===&lt;br /&gt;
&lt;br /&gt;
Towns are prevented from destroying the house if it hasn&#039;t yet reached the age given here. The default is 0, which means towns are free to remove the house any time they like. Please note that this setting doesn&#039;t prevent AI players from removing the house; only towns are affected. If you need to protect your building from AI players as well, you can set the &amp;quot;protected&amp;quot; flag (property 19 bit 1), or use [[Callbacks#Protect building conditionally (143) |callback 143]] and use your custom code to decide who (and when) is allowed to remove the building.&lt;br /&gt;
&lt;br /&gt;
For this to operate consequently on multi-tile buildings, you must set the same minimum lifespan for all tiles of the building.&lt;br /&gt;
&lt;br /&gt;
=== Cargo acceptance watch list (20) ===&lt;br /&gt;
&lt;br /&gt;
This property is a list of cargo types, types whose acceptance should be watched. The first byte is the length of the list, the remaining bytes identify cargo types. {{grfFrom|7}} If your GRF is version 7 or above, and has a cargo translation table, the bytes are indexes in the table; otherwise, they are cargo slot numbers. When a cargo from this list is accepted by the current tile, [[Callbacks#Watched cargo accepted (148) |callback 148]] is called on &#039;&#039;all&#039;&#039; tiles of the building. See [[Callbacks#Watched cargo accepted (148) |callback 148]] for more details about how this happens.&lt;br /&gt;
&lt;br /&gt;
{{ttdp|}} This property has no effect if the station2 structure isn&#039;t present. The station2 structure is present if any of the following is true:&lt;br /&gt;
* Generalfixes is on, and miscmods.noextendstationrange is off&lt;br /&gt;
* Any of fifoloading, newcargos or irregularstations is on&lt;br /&gt;
&lt;br /&gt;
=== Availability years (long format) - Minimum (21) - Maximum (22) ===&lt;br /&gt;
&lt;br /&gt;
Those two properties allow to specify a range of dates (based on year zero(0) that are not limited to the 1930 dates. So earlier buildings can be introduced. Be sure to add substantial houses to the sets, if you do not wat to have uniform towns, since the current earliest houses will remain in their current 1920 era. Mind also the warning wrt. introduction years as described at property 0A.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15|no}} A value of FFFF is treated as the game&#039;s MAX_YEAR instead of a literal year 65535.&lt;br /&gt;
&lt;br /&gt;
=== Tile acceptance list (23) ===&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=48b334cf}} &lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
 &amp;lt;numinput&amp;gt; (&amp;lt;cargotype&amp;gt; &amp;lt;acceptance&amp;gt;)*&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Variable!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||numinput||Number of (&amp;lt;cargotype&amp;gt; &amp;lt;acceptance&amp;gt;) pairs to follow,&lt;br /&gt;
|-&lt;br /&gt;
|B||cargotype||Cargotype (from CTT) to accept.&lt;br /&gt;
|-&lt;br /&gt;
|B||acceptance||Acceptance in 1/8 units.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This property defines up to 16 cargotypes, which are accepted by the house.&lt;br /&gt;
Use this property instead of property 0D..0F.&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Houses&amp;diff=4906</id>
		<title>Action0/Houses</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Houses&amp;diff=4906"/>
		<updated>2024-12-23T09:22:43Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
For town buildings (or simply houses), the offset defines the first house ID for this action 0. House IDs, like station IDs, are unique within each grf file, and in total each game can only have 255 IDs in TTDPatch and 512 IDs in OpenTTD for all active grf files. &lt;br /&gt;
&lt;br /&gt;
{{ottdp|15} Since OpenTTD 15, the limits are increased to 4096 IDs, both per-grf and in total.&lt;br /&gt;
&lt;br /&gt;
To start using a house ID, you must first define it by setting its property 08 (see below). If you try to modify a house ID whose property 08 isn&#039;t set, your request is ignored, but not reported as an error, either.&lt;br /&gt;
&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.5|ttdprev=alpha 34}}||Substitute building type&lt;br /&gt;
|-&lt;br /&gt;
|09||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Building flags&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Availability years&lt;br /&gt;
|-&lt;br /&gt;
|0B||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Population&lt;br /&gt;
|-&lt;br /&gt;
|0C||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Mail generation multiplier&lt;br /&gt;
|-&lt;br /&gt;
|0D||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Passenger acceptance&lt;br /&gt;
|-&lt;br /&gt;
|0E||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Mail acceptance&lt;br /&gt;
|-&lt;br /&gt;
|0F||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Goods, food or fizzy drinks acceptance&lt;br /&gt;
|-&lt;br /&gt;
|10||W||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||LA rating decrease on removal (should be set to the same value for every tile for multi-tile buildings)&lt;br /&gt;
|-&lt;br /&gt;
|11||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Removal cost multiplier (should be set to the same value for every tile for multi-tile buildings)&lt;br /&gt;
|-&lt;br /&gt;
|12||W||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Building name ID&lt;br /&gt;
|-&lt;br /&gt;
|13||W||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Building availability mask&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||House callback flags&lt;br /&gt;
|-&lt;br /&gt;
|15||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||House override byte&lt;br /&gt;
|-&lt;br /&gt;
|16||B||{{ottdp|0.6|2.5|ttdprev=alpha 34}}||Periodic refresh multiplier&lt;br /&gt;
|-&lt;br /&gt;
|17||4*B||{{ottdp|0.6|2.5|ttdprev=alpha 35}}||Four random colours to use&lt;br /&gt;
|-&lt;br /&gt;
|18||B||{{ottdp|0.6|2.5|ttdprev=alpha 35}}||Relative probability of appearing&lt;br /&gt;
|-&lt;br /&gt;
|19||B||{{ottdp|0.6|2.5|ttdprev=alpha 38}}||Extra flags&lt;br /&gt;
|-&lt;br /&gt;
|1A||B||{{ottdp|0.6|2.5|ttdprev=alpha 39}}||Animation frames&lt;br /&gt;
|-&lt;br /&gt;
|1B||B||{{ottdp|0.6|2.5|ttdprev=alpha 39}}||Animation speed&lt;br /&gt;
|-&lt;br /&gt;
|1C||B||{{ottdp|0.6|2.5|ttdprev=alpha 43}}||Class of the building type&lt;br /&gt;
|-&lt;br /&gt;
|1D||B||{{ottdp|0.6|2.5|ttdprev=alpha 55 vcs 2}}||Callback flags 2&lt;br /&gt;
|-&lt;br /&gt;
|1E||D||{{ottdp|0.6|2.5|ttdprev=alpha 55 vcs 2}}||Accepted cargo types&lt;br /&gt;
|-&lt;br /&gt;
|1F||B||{{ottdp|0.6|2.6|ttdprev=r1554}}||Minimum life span in years&lt;br /&gt;
|-&lt;br /&gt;
|20||V||{{ottdp|1.2|2.6|ottdrev=r23072|ttdprev=r1677}}||Cargo acceptance watch list&lt;br /&gt;
|-&lt;br /&gt;
|21||W||{{ottdp|0.7|no|ottdrev=r13437}}||Long year (zero based) of minimum appearance&lt;br /&gt;
|-&lt;br /&gt;
|22||W||{{ottdp|0.7|no|ottdrev=r13437}}||Long year (zero based) of maximum appearance&lt;br /&gt;
|-&lt;br /&gt;
|23||V||{{ottdp|1.9|no|ottdrev=48b334cf}}||Tile acceptance list &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When a town decides to expand, each active house type (both old and new ones) has a uniform probability to appear, so the more new houses you define, the fewer old TTD buildings will appear.&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Substitute building type (08) ===&lt;br /&gt;
&lt;br /&gt;
This building type will be used instead of your new one if your definition isn&#039;t available for any reason (the grf file is not found, for example).&lt;br /&gt;
&lt;br /&gt;
Don&#039;t set a substitute building type that is larger than your new one (for example, don&#039;t set 14 (stadium) for an 1x1 building) because this may corrupt savegames. Setting this property automatically copies every property of the substitute building to your new building, so you don&#039;t have to change properties that are the same as the substitute.&lt;br /&gt;
&lt;br /&gt;
House flags 40 and 80 are exceptions; these flags are never set automatically. Only the first property 08 setting copies properties; if you later change it, properties will stay.&lt;br /&gt;
&lt;br /&gt;
There&#039;s a special use of this property beginning from alpha 72: if you set it to FFh, you can disable an old house type. In this case, the ID used must be the number of old house type you want to disable. Disabling only prevents building the type in towns; houses already present on the map will stay unchanged. The type can still be overridden, and overriding affects houses present on the map.&lt;br /&gt;
&lt;br /&gt;
If this house&#039;s action 3 appears before this property is set, the action 3 will have no effect.&lt;br /&gt;
&lt;br /&gt;
=== Building flags (09) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||This is a 1x1 building&lt;br /&gt;
|-&lt;br /&gt;
|1||2||This building can be built only on flat land (if clear, foundations are automatically displayed on sloped land)&lt;br /&gt;
|-&lt;br /&gt;
|2||4||This is a 2x1 building&amp;lt;ref name=&amp;quot;large&amp;quot;&amp;gt;If your building isn&#039;t 1x1, set flags for the north tile, then define the next 1 or 3 tiles tiles (by setting their property 8). The only bit that can be set in the flags of additional tiles is bit 5 (animation). There should be no property 8 setting between the first tile and the additional tiles.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3||8||This is a 1x2 building&amp;lt;ref name=&amp;quot;large&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4||10||This is a 2x2 building&amp;lt;ref name=&amp;quot;large&amp;quot; /&amp;gt;&amp;lt;ref&amp;gt;For 2x2 buildings, the first additional tile is the east one, the second is the west part and the third is the south part. You probably want to set the substitute for additional tiles to a TTD additional tile whose flags are already zero. 2x2 buildings are always built on flat land no matter how bit 1 is set.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|5||20||Animation flag, set in tiles 04 and 05 (large office block). New buildings have a different animation scheme than large office blocks, but animation is still enabled with this bit.&amp;lt;ref&amp;gt;The animation flag works on a per-tile basis, so you should enable it for additional tiles of multi-tile buildings as well if you want all tiles to be animated.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|6||40||This building is a church&amp;lt;ref name=&amp;quot;only1&amp;quot;&amp;gt;Only one church and one stadium can exist in a town. The town won&#039;t build buildings with the according flag set until the old church/stadium is removed. (This can be done by either the town or a player)&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|7||80||This building is a stadium&amp;lt;ref name=&amp;quot;only1&amp;quot; /&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Availability years (0A) ===&lt;br /&gt;
&lt;br /&gt;
The low byte is the minimum year, the high is the maximum. The building can only be built between these two years (inclusive). 1920 is added to both bytes before using the values.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no| }}&lt;br /&gt;
Since the year counting stops in TTDPatch in 2070 even with [[ttwiki:EternalGame|EternalGame]] on, start years above 150 mean &amp;quot;never&amp;quot;, and end years above 150 mean &amp;quot;forever&amp;quot;. In OpenTTD there is no limit for the maximum year (resp. it is 5000000).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; Don&#039;t set the start year below 1930 (0Ah) unless you know what you&#039;re doing!&lt;br /&gt;
&lt;br /&gt;
{{ttdp|}} If TTDPatch finds a building that is available before 1930, it will not build old building types until that year, so you have to provide at least one custom building type that is available before 1930 for every [[TownZones|town zone]], or TTD may deadlock while trying to create a random game or expand a town.&lt;br /&gt;
&lt;br /&gt;
{{ottd|}} The availability of all active houses with the lowest availability year is set to start from year 0, so that always at least one house is available irrespective of starting year. Thus, if you de-activate default houses or set an introduction date prior to the default houses introduction year 1930, you should have at least for each [[TownZones|town zone]] a house with the same earliest availability year or you might end up with a situation where no house can be placed in a [[TownZones|town zone]].&lt;br /&gt;
&lt;br /&gt;
=== Population (0B) and Mail generation multiplier (0C) ===&lt;br /&gt;
[[Image:House_production.png|frame|right|Actual house production roughly depends on squared value of the population / mail generation multiplier.]]&lt;br /&gt;
&lt;br /&gt;
The population of the town will be increased by the amount set in prop. 0B if this building is built. Additional house parts should have a population of zero. The higher this value is, the more passengers this building generates.&lt;br /&gt;
&lt;br /&gt;
The higher the mail generation multiplier is, the more mail the building generates. For multi-tile buildings, mail generation is done in per-tile basis, so you can specify different values for every tile, although distributing the generation equally between tiles is suggested.&lt;br /&gt;
&lt;br /&gt;
This is how exactly passengers are generated: In each periodic processing (i.e. every 256 ticks), a random value 0&amp;lt;=X&amp;lt;=255 is generated for each house tile. If X isn&#039;t smaller than the population of the tile, no passengers are generated. Otherwise, X/8+1 passengers are generated (rounded down). If there is a recession going on, the number of generated passengers is halved, but this division gets rounded up instead of down. Mail generation happens in a similar manner, but with a new random value, and checking against the mail generation multiplier instead of the population.&lt;br /&gt;
&lt;br /&gt;
You can further customize how the cargo is generated with the [[Callbacks#Custom_cargo_production_.282E.29 |callback 2E]].&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Passenger (0D), Mail (0E) and Good/Food/Fizzy drinks (0F) acceptance ===&lt;br /&gt;
&lt;br /&gt;
The acceptance is given in units of 1/8th and must not be larger than 8 eighths.&lt;br /&gt;
&lt;br /&gt;
For property 0F, positive values indicate that the building accepts goods, and negative values (i.e. FF = 1/8th, FE = 2/8ths etc.) indicate acceptance of food or fizzy drinks, depending on the climate.&lt;br /&gt;
&lt;br /&gt;
All the above three values can be set independently for tiles of multi-tile buildings, since every tile is processed individually when determining what a station accepts.&lt;br /&gt;
&lt;br /&gt;
The type of accepted cargo can be modified using [[Action0Houses#Accepted_cargo_types|property 1E]].&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no| }} Note that in TTDPatch the officefood switch may modify acceptance in the sub-arctic and subtropical climates.&lt;br /&gt;
&lt;br /&gt;
=== Building name ID (12) ===&lt;br /&gt;
&lt;br /&gt;
The ID of the text that should be displayed in the land query window. The name can also be set by [[Action4|action 4]] (see there). Should be set to the same value for every tile for multi-tile buildings.&lt;br /&gt;
&lt;br /&gt;
=== Building availability mask (13) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0..4||1,2,4,8,10||which [[VariationalAction2/Houses#Town zone (42)|town zone(s)]] the building can be built in&lt;br /&gt;
|-&lt;br /&gt;
|11||800||can appear in sub-arctic climate above the snow line&lt;br /&gt;
|-&lt;br /&gt;
|12||1000||can appear in temperate climate&lt;br /&gt;
|-&lt;br /&gt;
|13||2000||can appear in sub-arctic climate below the snow line&lt;br /&gt;
|-&lt;br /&gt;
|14||4000||can appear in subtropical climate&lt;br /&gt;
|-&lt;br /&gt;
|15||8000||can appear in toyland climate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This property should be set to zero for additional building tiles.&lt;br /&gt;
&lt;br /&gt;
=== House callback flags (14,1D) ===&lt;br /&gt;
&lt;br /&gt;
For houses, the following [[callbacks]] can be defined by setting the corresponding bit in property 14:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Variable 0C value!!Version!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||17||{{ottdp| | }}||decide whether the house can be built on a given tile&lt;br /&gt;
|-&lt;br /&gt;
|1||2||1A||{{ottdp| | }}||decide the following frame of the animations&lt;br /&gt;
|-&lt;br /&gt;
|2||4||1B||{{ottdp| | }}||periodically start/stop the animation&lt;br /&gt;
|-&lt;br /&gt;
|3||8||1C||{{ottdp| | }}||change animation when construction state changes&lt;br /&gt;
|-&lt;br /&gt;
|4||10||1E||{{ottdp| | }}||decide the color of the building&lt;br /&gt;
|-&lt;br /&gt;
|5||20||1F||{{ottdp| | }}||decide the cargos amounts accepted&lt;br /&gt;
|-&lt;br /&gt;
|6||40||20||{{ottdp| | }}||decide the length of the current animation frame&lt;br /&gt;
|-&lt;br /&gt;
|7||80||21||{{ottdp| | }}||trigger destruction of building&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Property 1D was introduced after all bits of property 14 were filled. Its usage is the same, only the meaning of bits is different:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Variable 0C value!!Version!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||2A||{{ottdp| | }}||decide the cargo types accepted&lt;br /&gt;
|-&lt;br /&gt;
|1||2||2E||{{ottdp| | }}||custom cargo production&lt;br /&gt;
|-&lt;br /&gt;
|2||4||143||{{ottdp| | }}||conditional protection&lt;br /&gt;
|-&lt;br /&gt;
|3||8||14E||{{ottdp|1.0|2.6|ottdrev=r17558|ttdprev=2249}}||decide if default foundations need to be drawn&lt;br /&gt;
|-&lt;br /&gt;
|4||10||14F||{{ottdp|1.0|2.6|ottdrev=r17558|ttdprev=2249}}||allow or deny autosloping below the tile&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 variational Action2 for callbacks.&lt;br /&gt;
&lt;br /&gt;
Callback flags are ignored for additional building tiles.&lt;br /&gt;
&lt;br /&gt;
=== House override byte (15) ===&lt;br /&gt;
&lt;br /&gt;
Setting this property makes this building appear instead of the given old TTD building type. Setting the property is ignored if the given old house type is already overridden. You can set this property more than once to override more old building types.&lt;br /&gt;
&lt;br /&gt;
No new house of the overridden types will be built in towns.&lt;br /&gt;
&lt;br /&gt;
This property works in a per-tile basis, so you override tiles of old multi-tile buildings individually, although the old type will still be built if you don&#039;t override its north tile.&lt;br /&gt;
&lt;br /&gt;
=== Periodic refresh multiplier (16) ===&lt;br /&gt;
&lt;br /&gt;
This is used for random triggers, and sets how often the tile is re-randomized. When set to X, the tile will be re-randomized on every (X+1)-th periodic processing. (In other words, every (X+1)*256 game ticks.) If you want all tiles to be re-randomized, you must set this (but not necessarily to the same value) for each tile.&lt;br /&gt;
&lt;br /&gt;
If callback 1B is enabled in property 14, it is also called after re-randomizing random bits.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.1|2.5|ttdprev=2.5 beta 9}} In TTDPatch versions before TTDPatch 2.6 r1639 and TTDPatch 2.5 beta 9 (including beta 9), this variable could have any value between 0 and 255. After these versions, the upper limit has been lowered to 63. To maintain compatibility, values above 63 will be interpreted as 63.&lt;br /&gt;
&lt;br /&gt;
=== Random colours (17) ===&lt;br /&gt;
&lt;br /&gt;
This specifies four colors used for random painting (see [[Action2HousesIndustryTiles]]). Each byte of the dword defines a color, the values are the same as in Action2, except that numbering starts from zero instead of 775. If not set, this defaults to 04 08 0c 06 (red, blue, orange and green, the colors of the modern office building). Can be set to different values for tiles of multi-tile buildings.&lt;br /&gt;
&lt;br /&gt;
=== Probability (18) ===&lt;br /&gt;
&lt;br /&gt;
This sets the relative probability of this house being built. Old TTD house types have a probability of 16, and this is the default for new types as well.&lt;br /&gt;
&lt;br /&gt;
Increase (or better multiply) this value to make your building appear relatively more often, or decrease (divide) it to make it rarer. If you set this to zero, the house type never appears. The minimal useful value 1 means it&#039;s sixteen times less probable to build this type than a normal type, while the maximum setting of 255 means it&#039;s almost sixteen times more probable.&lt;br /&gt;
&lt;br /&gt;
The probability is relative since the absolute probability depends on the count and probability of other houses as well: the more types are available (and the higher their probabilities are), the less the chance is that your type will be chosen.&lt;br /&gt;
&lt;br /&gt;
=== Extra Flags (19) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Version!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||{{ottdp|0.6|2.5}}||This building appears during the generation of a town, but not later, i.e. will appear in random games, but new ones won&#039;t be built during the game. Useful for buildings that are intended to be historical.&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|0.6|2.5}}||This building is protected, i.e. towns and AI players won&#039;t remove it. Human players can still remove it, so you may need to set a high remove cost/rating to make them think twice.&lt;br /&gt;
|-&lt;br /&gt;
|2||4||{{ottdp|0.6|2.5}}||Synchronized [[Callbacks#Animation_control_.281B.2F25.2F140.2F152.2F159.29| callback 1B]]. (for multi-tile buildings)&amp;lt;ref&amp;gt;If synchronized callbacks are enabled, callback 1B will be called when the periodic processing reaches the main tile of the building, and not when it reaches the current tile. This is useful if your animation must run synchronously on every tile of the building. If this bit is set, callback 1B is called according to the main tile&#039;s property 16, not the current one, to make sure every tile stays in sync.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3||8||{{ottdp|0.6|2.5|ttdprev=beta 2}}||[[Callbacks#Next animation frame (1A/26/141/153/158) |Callback 1A]] needs random bits&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Animation Frames (1A) ===&lt;br /&gt;
&lt;br /&gt;
The bottom seven bits define how many frames the animation consists of, minus one. (I.e. 0 means 1 frame, 1 means 2 frames etc.) The highest bit has another purpose (see below), so the biggest supported value is 7F (128 frames).&lt;br /&gt;
&lt;br /&gt;
The highest bit is set if the animation is looping, i.e. it should start again from the first frame after showing the last frame. Non-looping animations stop after the last frame, leaving it on the screen. Both kinds of animations start automatically when the building is created. It&#039;s recommended to use callback 1B with non-looping animations, so they are played multiple times.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|0.6|2.5|ottdrev=r12347|ttdprev=r1639}} In TTDPatch versions before TTDPatch 2.6 r1639 and TTDPatch 2.5 beta 9 (including beta 9) and OpenTTD before r12347, the frame number was limited to 32. If you intend to maintain compatibility with those versions, you should not use animations longer than 32 frames.&lt;br /&gt;
&lt;br /&gt;
=== Animation Speed (1B) ===&lt;br /&gt;
&lt;br /&gt;
This is the amount of time between switching frames.&lt;br /&gt;
&lt;br /&gt;
The default value is 2, which means the switch occurs every 108 milliseconds. Increasing this value by one doubles the wait, i.e. 3 will cause 216 ms delay, while 4 will pause 432 ms, and so on. Values below 2 have the same effect as 2, so the default is the fastest possible setting. The maximum is 16, which means 1769 seconds (approx. half an hour) delay. Settings above this value may cause strange behaviour.&lt;br /&gt;
&lt;br /&gt;
=== Building Class (1C) ===&lt;br /&gt;
&lt;br /&gt;
Types that were given the same class byte are considered to be in the same class. If you don&#039;t explicitly set this value, the type is considered to have no class (it won&#039;t be considered to be class 0). The scope of a class is the current GRF file, so two types are never in the same class if they were defined by different GRF files. Currently, this property affects variable 44 only.&lt;br /&gt;
&lt;br /&gt;
This property is a per-tile one, you can set it for additional tiles as well. It&#039;s a better idea, however, to set it for the main tile only, since var. 44 counts tiles, not buildings, and you may count multi-tile multiple times otherwise.&lt;br /&gt;
&lt;br /&gt;
=== Accepted cargo types (1E) ===&lt;br /&gt;
&lt;br /&gt;
There may be cases when you want your house to accept something other than the default types (passenger, mail, goods and food). This property allows you to do that. If this property is set to FFFFFFFFh (the default), the meaning of properties 0D, 0E and 0F aren&#039;t changed, that is, they are the passenger, mail and goods/food acceptances, accordingly. If this property isn&#039;t FFFFFFFFh, the first three bytes must be climate-dependent cargo slot numbers (the fourth byte is ignored). In this case property 0D is the amount of acceptance of the first cargo type given, 0E is the same for the second type and 0F is the same for the third type.&lt;br /&gt;
&lt;br /&gt;
From GRF version 7 and above, the meaning of this property changes: instead of climate-dependent cargo slot numbers, you have to give climate-independent cargo IDs. If your GRF has a cargo translation table, then this ID is the index in that table; otherwise, it&#039;s the cargo slot number. Acceptance of cargoes not currently present will automatically be disabled.&lt;br /&gt;
&lt;br /&gt;
{{ottd|15.0}} Since 15.0, a default cargo translation table corresponding to the climate is used if one is not provided.&lt;br /&gt;
&lt;br /&gt;
=== Minimum life span in years (1F) ===&lt;br /&gt;
&lt;br /&gt;
Towns are prevented from destroying the house if it hasn&#039;t yet reached the age given here. The default is 0, which means towns are free to remove the house any time they like. Please note that this setting doesn&#039;t prevent AI players from removing the house; only towns are affected. If you need to protect your building from AI players as well, you can set the &amp;quot;protected&amp;quot; flag (property 19 bit 1), or use [[Callbacks#Protect building conditionally (143) |callback 143]] and use your custom code to decide who (and when) is allowed to remove the building.&lt;br /&gt;
&lt;br /&gt;
For this to operate consequently on multi-tile buildings, you must set the same minimum lifespan for all tiles of the building.&lt;br /&gt;
&lt;br /&gt;
=== Cargo acceptance watch list (20) ===&lt;br /&gt;
&lt;br /&gt;
This property is a list of cargo types, types whose acceptance should be watched. The first byte is the length of the list, the remaining bytes identify cargo types. {{grfFrom|7}} If your GRF is version 7 or above, and has a cargo translation table, the bytes are indexes in the table; otherwise, they are cargo slot numbers. When a cargo from this list is accepted by the current tile, [[Callbacks#Watched cargo accepted (148) |callback 148]] is called on &#039;&#039;all&#039;&#039; tiles of the building. See [[Callbacks#Watched cargo accepted (148) |callback 148]] for more details about how this happens.&lt;br /&gt;
&lt;br /&gt;
{{ttdp|}} This property has no effect if the station2 structure isn&#039;t present. The station2 structure is present if any of the following is true:&lt;br /&gt;
* Generalfixes is on, and miscmods.noextendstationrange is off&lt;br /&gt;
* Any of fifoloading, newcargos or irregularstations is on&lt;br /&gt;
&lt;br /&gt;
=== Availability years (long format) - Minimum (21) - Maximum (22) ===&lt;br /&gt;
&lt;br /&gt;
Those two properties allow to specify a range of dates (based on year zero(0) that are not limited to the 1930 dates. So earlier buildings can be introduced. Be sure to add substantial houses to the sets, if you do not wat to have uniform towns, since the current earliest houses will remain in their current 1920 era. Mind also the warning wrt. introduction years as described at property 0A.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15|no}} A value of FFFF is treated as the game&#039;s MAX_YEAR instead of a literal year 65535.&lt;br /&gt;
&lt;br /&gt;
=== Tile acceptance list (23) ===&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=48b334cf}} &lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
 &amp;lt;numinput&amp;gt; (&amp;lt;cargotype&amp;gt; &amp;lt;acceptance&amp;gt;)*&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Size!!Variable!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|B||numinput||Number of (&amp;lt;cargotype&amp;gt; &amp;lt;acceptance&amp;gt;) pairs to follow,&lt;br /&gt;
|-&lt;br /&gt;
|B||cargotype||Cargotype (from CTT) to accept.&lt;br /&gt;
|-&lt;br /&gt;
|B||acceptance||Acceptance in 1/8 units.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This property defines up to 16 cargotypes, which are accepted by the house.&lt;br /&gt;
Use this property instead of property 0D..0F.&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Vehicles&amp;diff=4904</id>
		<title>NML:Vehicles</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Vehicles&amp;diff=4904"/>
		<updated>2024-12-03T12:47:15Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: Add articulated vehicle ID limit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
==Properties common to all vehicle types==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! property&lt;br /&gt;
! value range&lt;br /&gt;
! available for&amp;lt;br /&amp;gt;articulated&amp;lt;br /&amp;gt;vehicle&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;name&amp;lt;/code&amp;gt;&lt;br /&gt;
| (string)&lt;br /&gt;
| yes&lt;br /&gt;
| for example &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;string(STR_NAME_HEREFORD_TRAM)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;climates_available&amp;lt;/code&amp;gt;&lt;br /&gt;
| bitmask(CLIMATE_XXX, CLIMATE_YYY, ...)&lt;br /&gt;
| set to &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;NO_CLIMATE&amp;lt;/code&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
;CLIMATE_TEMPERATE&lt;br /&gt;
;CLIMATE_ARCTIC&lt;br /&gt;
;CLIMATE_TROPICAL&lt;br /&gt;
;CLIMATE_TOYLAND&lt;br /&gt;
;NO_CLIMATE&lt;br /&gt;
:Vehicle is availble in no climate (e.g. for articulated parts)&lt;br /&gt;
;ALL_CLIMATES&lt;br /&gt;
:Vehicle is available irrespective of climate&lt;br /&gt;
&lt;br /&gt;
To make a vehicle available in all climates except toyland you could use: &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;ALL_CLIMATES &amp;amp;amp; ~bitmask(CLIMATE_TOYLAND)&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;introduction_date&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;date&amp;lt;/code&amp;gt;(yyyy,mm,dd)&lt;br /&gt;
| no&lt;br /&gt;
| Valid range for yyyy is 0 ... 5000000. In TTDPatch, dates after 2044 will be limited to 2044. Unless the engine is introduced within two years after game-start (always 1920 in TTDPatch), a random number of days between 0 and 511 will be added to this.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;model_life&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 254 (years) or &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;VEHICLE_NEVER_EXPIRES&amp;lt;/code&amp;gt;&lt;br /&gt;
| no&lt;br /&gt;
|&lt;br /&gt;
Number of years a model is &amp;quot;supported&amp;quot; by the manufacturer, see [[#Engine life cycle|below]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;retire_early&amp;lt;/code&amp;gt;&lt;br /&gt;
| -128 ... 127 (years)&lt;br /&gt;
| no&lt;br /&gt;
|&lt;br /&gt;
Retire the vehicle (make it unavailable in the purchase menu) this many years before reliability starts dropping, see [[#Engine life cycle|below]]. May be negative.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;vehicle_life&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 255 (years)&lt;br /&gt;
| no&lt;br /&gt;
| Life length of an individual vehicle, before it is considered too old and in need of replacement.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;reliability_decay&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| no&lt;br /&gt;
| Default vehicles use 20. The higher the value the faster reliability decays, the more frequent service is needed. 0 means reliability never decreases if the vehicle is not too old&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;refittable_cargo_classes&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
bit set of [[NML:Cargos#Cargo classes|cargo classes]]&lt;br /&gt;
| yes&lt;br /&gt;
| for example: &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(CC_BULK, CC_COVERED)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;non_refittable_cargo_classes&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
bit set of [[NML:Cargos#Cargo classes|cargo classes]]&lt;br /&gt;
| yes&lt;br /&gt;
| for example: &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(CC_OVERSIZED, CC_SPECIAL)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;refittable_cargo_types&amp;lt;/code&amp;gt;&lt;br /&gt;
| bit mask of entries into the cargo translation table&lt;br /&gt;
| yes&lt;br /&gt;
| As of NML 0.3, do not use this. Use cargo_[dis]allow_refit (see below) instead.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;cargo_allow_refit&amp;lt;/code&amp;gt;&lt;br /&gt;
| Array of cargo labels from the [[NML:Cargotable|cargotable]]&lt;br /&gt;
| Yes&lt;br /&gt;
| {{ottdp|1.2|no|ottdrev=r23291}} A list of cargo types to allow refitting to, irrespective of cargo classes. Example: &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;[COAL, IORE]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;cargo_disallow_refit&amp;lt;/code&amp;gt;&lt;br /&gt;
| Array of cargo labels from the [[NML:Cargotable|cargotable]]&lt;br /&gt;
| Yes&lt;br /&gt;
| {{ottdp|1.2|no|ottdrev=r23291}} A list of cargo types to disallow refitting to, irrespective of cargo classes. Example: &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;[MAIL]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;loading_speed&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 255 (cargo units)&lt;br /&gt;
| yes&lt;br /&gt;
| Units of cargo loaded per time unit. Default vehicles use 5 for trains and road vehicles, 10 for ships and 20 for aircraft. This amount of cargo is loaded to or unloaded from the vehicle every 40 ticks for trains, every 20 ticks for road vehicles and aircraft and every 10 ticks for ships.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;cost_factor&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Set to 0&lt;br /&gt;
| multiplier to the base purchase cost&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;running_cost_factor&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Set to 0&lt;br /&gt;
| multiplier to the base running costs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;cargo_age_period&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 65535&lt;br /&gt;
| yes&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.2|r22713}} This property specifies after how many ticks cargo is aged. Default value is 185. 74 ticks is equal to 1 day. If set to 0, cargo does not age. Repeated tests have shown that the gameplay effects of this property often do not match the expectations of grf authors. Explaining why requires a detailed understanding of the OpenTTD cargo aging algorithm, and how that works with e.g. different map sizes, vehicle speeds, multi-leg feeder systems, etc. TL;DR avoid using this property unless you absolutely understand the effect it will have.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;variant_group&amp;lt;/code&amp;gt;&lt;br /&gt;
| Vehicle ID or alternatively the vehicle numeric ID (0 ... 65535)&lt;br /&gt;
| no&lt;br /&gt;
|&lt;br /&gt;
{{ottd|13}} This property supports grouping vehicles in the purchase menu (also the autoreplace menu). The property value is the ID of another vehicle in the same GRF which will act as the parent for vehicles in the group.&lt;br /&gt;
&lt;br /&gt;
Groups can also be nested (this is experimental as of December 2022 and may change with testing).&lt;br /&gt;
&lt;br /&gt;
See also vehicle extra_flags which can influence the behaviour of vehicles in variant groups.&lt;br /&gt;
&lt;br /&gt;
See also https://github.com/OpenTTD/OpenTTD/pull/10220&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;extra_flags&amp;lt;/code&amp;gt;&lt;br /&gt;
| bitmask(VEHICLE_FLAG_XXX, ...)&lt;br /&gt;
| no&lt;br /&gt;
| {{ottd|13}} &lt;br /&gt;
;VEHICLE_FLAG_DISABLE_NEW_VEHICLE_MESSAGE&lt;br /&gt;
: Disable &amp;quot;New Vehicle&amp;quot; news message for this engine&lt;br /&gt;
;VEHICLE_FLAG_DISABLE_EXCLUSIVE_PREVIEW&lt;br /&gt;
: Disable &amp;quot;Exclusive Preview&amp;quot; for this engine&lt;br /&gt;
;VEHICLE_FLAG_SYNC_VARIANT_EXCLUSIVE_PREVIEW&lt;br /&gt;
: Variants - Include this variant when primary engine has &amp;quot;Exclusive Preview&amp;quot;&lt;br /&gt;
;VEHICLE_FLAG_SYNC_VARIANT_RELIABILITY&lt;br /&gt;
: Variants - (Attempt to) Synchronize reliability the primary engine.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Refittability===&lt;br /&gt;
&lt;br /&gt;
To determine whether your vehicle can be refitted to a certain cargo, OpenTTD uses the following table&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! Cargo matches refittable_cargo_classes&lt;br /&gt;
! Cargo matches non_refittable_cargo_classes&lt;br /&gt;
! Cargo in cargo_allow_refit&lt;br /&gt;
! Cargo in cargo_disallow_refit&lt;br /&gt;
! Result&lt;br /&gt;
|-&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| Doesn&#039;t matter&lt;br /&gt;
| No&lt;br /&gt;
| Refittable&lt;br /&gt;
|-&lt;br /&gt;
| No&lt;br /&gt;
| Doesn&#039;t matter&lt;br /&gt;
| No&lt;br /&gt;
| Doesn&#039;t matter&lt;br /&gt;
| Not refittable&lt;br /&gt;
|-&lt;br /&gt;
| Doesn&#039;t matter&lt;br /&gt;
| Doesn&#039;t matter&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| Refittable&lt;br /&gt;
|-&lt;br /&gt;
| Doesn&#039;t matter&lt;br /&gt;
| Doesn&#039;t matter&lt;br /&gt;
| Doesn&#039;t matter&lt;br /&gt;
| Yes&lt;br /&gt;
| Not refittable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For those that prefer boolean logic, the formula is as follows:&lt;br /&gt;
&lt;br /&gt;
refittable = ((cargo classes in refittable_cargo_classes AND NOT cargo classes in non_refittable_cargo_classes) OR cargo in cargo_allow_refit) AND NOT (cargo in cargo_disallow_refit)&lt;br /&gt;
&lt;br /&gt;
In general, you should use refittable_cargo_classes and non_refittable_cargo_classes to decide to which cargos your vehicle is refittable, and only then use cargo_allow_refit and cargo_disallow_refit to allow/disallow specific cargos.&lt;br /&gt;
&lt;br /&gt;
===Engine life cycle===&lt;br /&gt;
&lt;br /&gt;
The life cycle of a vehicle model consists of three phases, as outlined in the following table. The length of each phase and the starting, peak, and final reliabilities are randomized for each engine when starting a new game. Also note that phase 2 (the vehicle&#039;s peak performance) is actually about 8 years shorter than the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;model_life&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! phase&lt;br /&gt;
! duration&lt;br /&gt;
! reliability&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 7 to 38 months&lt;br /&gt;
| increases from 48-73% to 75-100%&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;model_life&amp;lt;/code&amp;gt; - 8 years + (0 to 15 months)&lt;br /&gt;
| stays constant at peak, 75-100%&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 10 to 20.6 years&lt;br /&gt;
| decreases from peak to 25-50%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;model_life&amp;lt;/code&amp;gt; is set to &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;VEHICLE_NEVER_EXPIRES&amp;lt;/code&amp;gt;, the engine remains in phase 2 forever.&lt;br /&gt;
&lt;br /&gt;
Normally, the vehicle is removed from the purchase menu at the and of phase 3. However if you set the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;retire_early&amp;lt;/code&amp;gt; property, it will be retired this many years before (or after, if the value is negative) the end of phase 2.&lt;br /&gt;
&lt;br /&gt;
==Train properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! property&lt;br /&gt;
! value range&lt;br /&gt;
! available for&amp;lt;br /&amp;gt;articulated&amp;lt;br /&amp;gt;vehicle&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;sprite_id&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;SPRITE_ID_NEW_TRAIN&amp;lt;/code&amp;gt;&lt;br /&gt;
| yes&lt;br /&gt;
| Set this property to enable new graphics&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;speed&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 65000 (float, speed units)&lt;br /&gt;
| no&lt;br /&gt;
| Max speed for engines, speed limit for wagons&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;misc_flags&amp;lt;/code&amp;gt;&lt;br /&gt;
| bitmask(TRAIN_FLAG_XXX, ...)&lt;br /&gt;
| FLIP should not be set, TILT and MU TO the same value as the 1st part&lt;br /&gt;
| &lt;br /&gt;
;TRAIN_FLAG_TILT&lt;br /&gt;
: enable the tilt bonus (20% speed in curves, if all vehicles in consist have it set).  See also curve_speed_mod property.&lt;br /&gt;
;TRAIN_FLAG_2CC&lt;br /&gt;
:Enable use of the 2nd company colour&lt;br /&gt;
;TRAIN_FLAG_MU&lt;br /&gt;
:act as multiple unit (used for livery selection only)&lt;br /&gt;
;TRAIN_FLAG_FLIP&lt;br /&gt;
:Allow vehicle to be flipped (reversed) in depot. {{ottdp|13|no|no}} this flag is no longer required, flip is always allowed, except for multi-header or articulated vehicles which cannot be flipped.  For vehicles shorter than 8/8, see [[Action0/Vehicles/Trains#cite_note-6|this note about sprite offsets]]&lt;br /&gt;
;TRAIN_FLAG_AUTOREFIT&lt;br /&gt;
:Allow autoreffitting. To enable autorefit, furthermore the [[#Vehicle callbacks|refit_cost]]-callback has to allow it, or else (if this callback is not implemented or fails) the &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;refit_cost&amp;lt;/code&amp;gt;-property (see below) must be set to 0.&lt;br /&gt;
;TRAIN_FLAG_NO_BREAKDOWN_SMOKE&lt;br /&gt;
:{{nml|0.3}} {{ottdp|1.3|no|ottdrev=r24124}} Disable breakdown smoke effect&lt;br /&gt;
;TRAIN_FLAG_SPRITE_STACK&lt;br /&gt;
:{{ottdp|1.7|no|ottdrev=r27668}} Enable [[NML:Vehicles#Composing_vehicles_from_multiple_sprites|composition from multiple sprites]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;refit_cost&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| yes&lt;br /&gt;
| in 50% units of the purchase price cost base&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;callback_flags&amp;lt;/code&amp;gt;&lt;br /&gt;
| bitmask(VEH_CBF_XXX, ...)&lt;br /&gt;
| yes&lt;br /&gt;
|&lt;br /&gt;
Do not set this, unless you use [[NML:Old style callbacks|old-style callbacks]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;track_type&amp;lt;/code&amp;gt;&lt;br /&gt;
| item from railtypetable&lt;br /&gt;
| must be the same as front&lt;br /&gt;
| Default railtype table: RAIL, MONO, MGLV. If you install a railtypetable yourself you&#039;ll always get the railtype you specified. If you want a vehicle to run on electric rail and you don&#039;t have a railtypetable, set &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;track_type&amp;lt;/code&amp;gt; to RAIL and make sure that you set &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;engine_class&amp;lt;/code&amp;gt; to &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;ENGINE_CLASS_ELECTRIC&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;ai_special_flag&amp;lt;/code&amp;gt;&lt;br /&gt;
| [&amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;AI_FLAG_PASSENGER&amp;lt;/code&amp;gt; &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;AI_FLAG_CARGO&amp;lt;/code&amp;gt;]&lt;br /&gt;
| no&lt;br /&gt;
| &lt;br /&gt;
;&amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;AI_FLAG_PASSENGER&amp;lt;/code&amp;gt;&lt;br /&gt;
:Tell computer players that it&#039;s an engine that should only be used for passenger service.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;power&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 65000 hp (float, power units)&lt;br /&gt;
| Set to 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;running_cost_base&amp;lt;/code&amp;gt;&lt;br /&gt;
| RUNNING_COST_XXX&lt;br /&gt;
| Set to RUNNING_COST_NONE&lt;br /&gt;
| &lt;br /&gt;
;RUNNING_COST_STEAM&lt;br /&gt;
;RUNNING_COST_DIESEL&lt;br /&gt;
;RUNNING_COST_ELECTRIC&lt;br /&gt;
;RUNNING_COST_ROADVEH&lt;br /&gt;
;RUNNING_COST_NONE&lt;br /&gt;
:no running costs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;dual_headed&amp;lt;/code&amp;gt;&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| Set to 0 for all parts of an articulated vehicle&lt;br /&gt;
| 1 = dual_headed, otherwise normal engine&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;default_cargo_type&amp;lt;/code&amp;gt;&lt;br /&gt;
| An identifier from the [[NML:Cargotable|cargo table]], or DEFAULT_CARGO_FIRST_REFITTABLE&lt;br /&gt;
| Yes&lt;br /&gt;
| If the vehicle is refittable to at least one cargo, but the chosen default cargo is not available or is set to DEFAULT_CARGO_FIRST_REFITTABLE, then the first refittable cargo is used. The first refittable is chosen according to the order in your [[NML:Cargotable|cargo table]]. If this property is set to a valid cargo but the vehicle cannot refit to any cargo type, then the vehicle will be able to carry only this cargo, but it cannot be refitted (like e.g. the default train wagons).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;cargo_capacity&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 .. 255&lt;br /&gt;
| yes&lt;br /&gt;
| By default, passenger capacity is 4x, and mail/goods capacity 2x larger than capacity for other cargoes. The capacity set here is used for the default (i.e. first refittable) cargo. Use the &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;cargo_capacity&amp;lt;/code&amp;gt; callback to avoid this effect.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;weight&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 .. 1279 ton (float, mass units)&lt;br /&gt;
| Set to 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;ai_engine_rank&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| no&lt;br /&gt;
| TTDPatch only: Higher values make the engine for the TTDPatch AI more attractive&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;engine_class&amp;lt;/code&amp;gt;&lt;br /&gt;
| ENGINE_CLASS_XXX&lt;br /&gt;
| no&lt;br /&gt;
| &lt;br /&gt;
Defines which livery colour settings apply to the vehicle.  It also sets the corresponding sound effect of the engine, and if visual_effect_and_powered is not set, the visual effect as well.&lt;br /&gt;
;ENGINE_CLASS_STEAM&lt;br /&gt;
;ENGINE_CLASS_DIESEL&lt;br /&gt;
;ENGINE_CLASS_ELECTRIC&lt;br /&gt;
;ENGINE_CLASS_MONORAIL&lt;br /&gt;
;ENGINE_CLASS_MAGLEV&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;extra_power_per_wagon&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 65000 hp (float, power units)&lt;br /&gt;
| Set to 0&lt;br /&gt;
| Only wagons with a livery override for this engine will add power&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;tractive_effort_coefficient&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 1 (float)&lt;br /&gt;
| Set to 0&lt;br /&gt;
| Fraction of the vehicle weight that is available as tractive effort. Tractive effort (in kN) is calculated as (TE coefficient) * 9.8 * weight (in tons), with 9.8 being an approximation of the acceleration of gravity (9.81 m/s).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;air_drag_coefficient&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 1 (float)&lt;br /&gt;
| Set to 0&lt;br /&gt;
| Coefficient of the relative air drag, in arbitrary units. The default value is approximately (8 / max_speed), with max_speed in km/h, clamped to the range 0.004 .. 0.75.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;length&amp;lt;/code&amp;gt;&lt;br /&gt;
| 1 ... 8&lt;br /&gt;
| yes&lt;br /&gt;
| Length of the vehicle in arbitrary units. Use a value of 8 (equal to the predefined constant VEHICLE_LENGTH) for a full-length vehicle.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;visual_effect_and_powered&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;visual_effect_and_powered&amp;lt;/code&amp;gt; (VISUAL_EFFECT_XXX, offset, &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;ENABLE_WAGON_POWER&amp;lt;/code&amp;gt; or &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;DISABLE_WAGON_POWER&amp;lt;/code&amp;gt;)&lt;br /&gt;
| yes&lt;br /&gt;
|&lt;br /&gt;
There are two methods to set the visual effect of a vehicle:&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;visual_effect_and_powered&amp;lt;/code&amp;gt;: Easy method for simple effects.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;effect_spawn_model_and_powered&amp;lt;/code&amp;gt; + callback &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;create_effect&amp;lt;/code&amp;gt;: {{ottdp|1.5|no|ottdrev=r26747}} Harder to use, but also more powerful.&lt;br /&gt;
For each vehicle you have to decide for the method. You cannot use them both for the same vehicle &#039;item&#039;.&lt;br /&gt;
&lt;br /&gt;
Set the type of visual effect for the vehicle and its positional offset with respect to the vehicle. An offset of 0 is default, negative values mean more to the front and positive values are backwards. Minimum offset is -8, maximum is 7.&lt;br /&gt;
&lt;br /&gt;
;VISUAL_EFFECT_DEFAULT&lt;br /&gt;
:No effect, unless for the default vehicles&lt;br /&gt;
;VISUAL_EFFECT_STEAM&lt;br /&gt;
:Steam like from steam engine&lt;br /&gt;
;VISUAL_EFFECT_DIESEL&lt;br /&gt;
:Steam from internal combustion engine&lt;br /&gt;
;VISUAL_EFFECT_ELECTRIC&lt;br /&gt;
:Electric sparks&lt;br /&gt;
;VISUAL_EFFECT_DISABLE&lt;br /&gt;
:No effect&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;effect_spawn_model_and_powered&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;EFFECT_SPAWN_MODEL_XXX&amp;lt;/code&amp;gt; or &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;EFFECT_SPAWN_MODEL_XXX &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; ENABLE_WAGON_POWER&amp;lt;/code&amp;gt;&lt;br /&gt;
| yes&lt;br /&gt;
|&lt;br /&gt;
There are two methods to set the visual effect of a vehicle:&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;visual_effect_and_powered&amp;lt;/code&amp;gt;: Easy method for simple effects.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;effect_spawn_model_and_powered&amp;lt;/code&amp;gt; + callback &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;create_effect&amp;lt;/code&amp;gt;: {{ottdp|1.5|no|ottdrev=r26747}} Harder to use, but also more powerful.&lt;br /&gt;
For each vehicle you have to decide for the method. You cannot use them both for the same vehicle &#039;item&#039;.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.5|no|ottdrev=r26747}} Set the spawning model of visual effects for the vehicle, that is when the vehicle emits visual effects.&lt;br /&gt;
The visual appearance itself is defined by the callback &#039;create_effect&#039;.&lt;br /&gt;
&lt;br /&gt;
;EFFECT_SPAWN_MODEL_NONE&lt;br /&gt;
: Do not spawn any effects.&lt;br /&gt;
;EFFECT_SPAWN_MODEL_STEAM&lt;br /&gt;
: Gradually less effects when approaching max speed.&lt;br /&gt;
;EFFECT_SPAWN_MODEL_DIESEL&lt;br /&gt;
: Effect proportional to acceleration, no effect when idling at top speed.&lt;br /&gt;
;EFFECT_SPAWN_MODEL_ELECTRIC&lt;br /&gt;
: Random effect, gradually less likely when approaching max speed.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;extra_weight_per_wagon&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 255 ton (float, mass units)&lt;br /&gt;
| Set to 0&lt;br /&gt;
| Adds extra weight for powered wagons, see &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;extra_power_per_wagon&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span #id=&amp;quot;bitmask_vehicle_info&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;bitmask_vehicle_info&amp;lt;/code&amp;gt;&lt;br /&gt;
| 8-bit bitmask&lt;br /&gt;
| yes&lt;br /&gt;
|&lt;br /&gt;
Used for obtaining [[#bitmask consist info|&amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;bitmask_consist_info&amp;lt;/code&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;curve_speed_mod&amp;lt;/code&amp;gt;&lt;br /&gt;
| -128 ... 127.996 (float)&lt;br /&gt;
| yes&lt;br /&gt;
| {{nml|0.7}} {{ottd|12.0}} Maximum curve speed modifier.&lt;br /&gt;
&lt;br /&gt;
The modifier is applied after the normal curve speed calculation is done using the formula max_curve_speed * (1 + curve_speed_mod). This means that the default property value of 0 is equivalent to no change. Negative values are supported, but the resulting vehicle curve speed is clamped at 2 mph-ish to make sure vehicles don&#039;t become permanently stuck.&lt;br /&gt;
&lt;br /&gt;
If different vehicles in a train have different curve speed modifiers, the lowest value wins.&lt;br /&gt;
&lt;br /&gt;
See also TRAIN_FLAG_TILT, which is an older and less flexible way of managing vehicle curve speed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Road vehicle properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! property&lt;br /&gt;
! value range&lt;br /&gt;
! available for&amp;lt;br /&amp;gt;articulated&amp;lt;br /&amp;gt;vehicle&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| sprite_id&lt;br /&gt;
| SPRITE_ID_NEW_ROADVEH&lt;br /&gt;
| yes&lt;br /&gt;
| Set this property to enable new graphics&lt;br /&gt;
|-&lt;br /&gt;
| speed&lt;br /&gt;
| 0 ... 511km/h (float, speed units)&lt;br /&gt;
| no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| road_type &#039;&#039;or&#039;&#039; tram_type &lt;br /&gt;
| item from [[NML:Railtypetable-Roadtypetable-Tramtypetable|roadtypetable]] or [[NML:Railtypetable-Roadtypetable-Tramtypetable|tramtypetable]]&lt;br /&gt;
| must be the same as front&lt;br /&gt;
| Only &#039;&#039;one&#039;&#039; of these properties may be set.  &lt;br /&gt;
If &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;tram_type&amp;lt;/code&amp;gt; is set, &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;ROADVEH_FLAG_TRAM&amp;lt;/code&amp;gt; must also be set for the vehicle in &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;misc_flags&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If not set, road vehicles will default to ROAD and tram vehicles will default to RAIL (this does not overlap with railtype RAIL).&lt;br /&gt;
|-&lt;br /&gt;
| misc_flags&lt;br /&gt;
| bitmask(ROADVEH_FLAG_XXX, ...)&lt;br /&gt;
| partly; tram flag must the same&lt;br /&gt;
| &lt;br /&gt;
;ROADVEH_FLAG_TRAM&lt;br /&gt;
:The vehicle requires tram tracks to run on&lt;br /&gt;
;ROADVEH_FLAG_2CC&lt;br /&gt;
:Enable 2nd company colour&lt;br /&gt;
;ROADVEH_FLAG_AUTOREFIT&lt;br /&gt;
:Allow autorefitting. To enable autorefit, furthermore the [[#Vehicle callbacks|refit_cost]]-callback has to allow it, or else (if this callback is not implemented or fails) the &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;refit_cost&amp;lt;/code&amp;gt;-property (see below) must be set to 0.&lt;br /&gt;
;ROADVEH_FLAG_NO_BREAKDOWN_SMOKE&lt;br /&gt;
:{{nml|0.3}} {{ottdp|1.3|no|ottdrev=r24124}} Disable breakdown smoke effect&lt;br /&gt;
;ROADVEH_FLAG_SPRITE_STACK&lt;br /&gt;
:{{ottdp|1.7|no|ottdrev=r27668}} Enable [[NML:Vehicles#Composing_vehicles_from_multiple_sprites|composition from multiple sprites]].&lt;br /&gt;
|-&lt;br /&gt;
| refit_cost&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| yes&lt;br /&gt;
| in 25% units of the purchase price cost base&lt;br /&gt;
|-&lt;br /&gt;
| callback_flags&lt;br /&gt;
| bitmask(VEH_CBF_XXX, ...)&lt;br /&gt;
| yes&lt;br /&gt;
|&lt;br /&gt;
Do not set this, unless you use [[NML:Old style callbacks|old-style callbacks]].&lt;br /&gt;
|-&lt;br /&gt;
| running_cost_base&lt;br /&gt;
| RUNNING_COST_XXX&lt;br /&gt;
| set to RUNNING_COST_NONE&lt;br /&gt;
| &lt;br /&gt;
;RUNNING_COST_STEAM&lt;br /&gt;
;RUNNING_COST_DIESEL&lt;br /&gt;
;RUNNING_COST_ELECTRIC&lt;br /&gt;
;RUNNING_COST_ROADVEH&lt;br /&gt;
;RUNNING_COST_NONE&lt;br /&gt;
:no running costs&lt;br /&gt;
|-&lt;br /&gt;
| power&lt;br /&gt;
| 0 ... 2550hp (float, power units)&lt;br /&gt;
| Set to 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| weight&lt;br /&gt;
| 0 ... 63.75ton (float, mass units)&lt;br /&gt;
| Set to 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| tractive_effort_coefficient&lt;br /&gt;
| 0 ... 1 (float)&lt;br /&gt;
| Set to 0&lt;br /&gt;
| Fraction of the vehicle weight that is available as tractive effort. Tractive effort (in kN) is calculated as (TE coefficient) * 10 * weight (in tons), with 10 being an approximation of the acceleration of gravity (9.81 m/s). Default value is 0.3.&lt;br /&gt;
|-&lt;br /&gt;
| air_drag_coefficient&lt;br /&gt;
| 0 ... 1 (float)&lt;br /&gt;
| Set to 0&lt;br /&gt;
| Coefficient of the relative air drag, in arbitrary units. The default value is approximately (8 / max_speed), with max_speed in km/h, clamped to the range 0.004 .. 0.75.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;default_cargo_type&amp;lt;/code&amp;gt;&lt;br /&gt;
| An identifier from the [[NML:Cargotable|cargo table]], or DEFAULT_CARGO_FIRST_REFITTABLE&lt;br /&gt;
| Yes&lt;br /&gt;
| If the vehicle is refittable to at least one cargo, but the chosen default cargo is not available or is set to DEFAULT_CARGO_FIRST_REFITTABLE, then the first refittable cargo is used. The first refittable is chosen according to the order in your [[NML:Cargotable|cargo table]]. If this property is set to a valid cargo but the vehicle cannot refit to any cargo type, then the vehicle will be able to carry only this cargo, but it cannot be refitted (like e.g. the default train wagons).&lt;br /&gt;
|-&lt;br /&gt;
| cargo_capacity&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| yes&lt;br /&gt;
| By default, passenger capacity is 4x, and mail/goods capacity 2x larger than capacity for other cargoes. The capacity set here is used for the default (i.e. first refittable) cargo. Use the &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;cargo_capacity&amp;lt;/code&amp;gt; callback to avoid this effect.&lt;br /&gt;
|-&lt;br /&gt;
| sound_effect&lt;br /&gt;
| SOUND_XXX&lt;br /&gt;
| no&lt;br /&gt;
|&lt;br /&gt;
See available [[NML:List of sound effects|sound effects]].&lt;br /&gt;
&amp;lt;br/&amp;gt;{{ottdp|1.6|no|ottdrev=r27507}} Since OpenTTD r27507 also &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;sound(&amp;quot;sound.wav&amp;quot;)&amp;lt;/code&amp;gt; and &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;import_sound(grfid, number)&amp;lt;/code&amp;gt; are valid here.&lt;br /&gt;
|-&lt;br /&gt;
| visual_effect&lt;br /&gt;
| visual_effect( VISUAL_EFFECT_XXX, offset)&lt;br /&gt;
| yes&lt;br /&gt;
| &lt;br /&gt;
There are two methods to set the visual effect of a vehicle:&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;visual_effect&amp;lt;/code&amp;gt;: Easy method for simple effects.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;effect_spawn_model&amp;lt;/code&amp;gt; + callback &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;create_effect&amp;lt;/code&amp;gt;: {{ottdp|1.5|no|ottdrev=r26747}} Harder to use, but also more powerful.&lt;br /&gt;
For each vehicle you have to decide for the method. You cannot use them both for the same vehicle &#039;item&#039;.&lt;br /&gt;
&lt;br /&gt;
Set the type of visual effect for the vehicle and its positional offset with respect to the vehicle. An offset of 0 is default, negative values mean more to the front and positive values are backwards. Minimum offset is -8, maximum is 7.&lt;br /&gt;
&lt;br /&gt;
;VISUAL_EFFECT_DEFAULT&lt;br /&gt;
:No effect, unless for the default vehicles&lt;br /&gt;
;VISUAL_EFFECT_STEAM&lt;br /&gt;
:Steam like from steam engine&lt;br /&gt;
;VISUAL_EFFECT_DIESEL&lt;br /&gt;
:Steam from internal combustion engine&lt;br /&gt;
;VISUAL_EFFECT_ELECTRIC&lt;br /&gt;
:Electric sparks&lt;br /&gt;
;VISUAL_EFFECT_DISABLE&lt;br /&gt;
:No effect&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;effect_spawn_model&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;EFFECT_SPAWN_MODEL_XXX&amp;lt;/code&amp;gt;&lt;br /&gt;
| yes&lt;br /&gt;
|&lt;br /&gt;
There are two methods to set the visual effect of a vehicle:&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;visual_effect&amp;lt;/code&amp;gt;: Easy method for simple effects.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;effect_spawn_model&amp;lt;/code&amp;gt; + callback &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;create_effect&amp;lt;/code&amp;gt;: {{ottdp|1.5|no|ottdrev=r26747}} Harder to use, but also more powerful.&lt;br /&gt;
For each vehicle you have to decide for the method. You cannot use them both for the same vehicle &#039;item&#039;.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.5|no|ottdrev=r26747}} Set the spawning model of visual effects for the vehicle, that is when the vehicle emits visual effects.&lt;br /&gt;
The visual appearance itself is defined by the callback &#039;create_effect&#039;.&lt;br /&gt;
&lt;br /&gt;
;EFFECT_SPAWN_MODEL_NONE&lt;br /&gt;
: Do not spawn any effects.&lt;br /&gt;
;EFFECT_SPAWN_MODEL_STEAM&lt;br /&gt;
: Gradually less effects when approaching max speed.&lt;br /&gt;
;EFFECT_SPAWN_MODEL_DIESEL&lt;br /&gt;
: Effect proportional to acceleration, no effect when idling at top speed.&lt;br /&gt;
;EFFECT_SPAWN_MODEL_ELECTRIC&lt;br /&gt;
: Random effect, gradually less likely when approaching max speed.&lt;br /&gt;
|-&lt;br /&gt;
| length&lt;br /&gt;
| 1 ... 8&lt;br /&gt;
| yes&lt;br /&gt;
| Length of the vehicle in arbitrary units. Use a value of 8 (equal to the predefined constant VEHICLE_LENGTH) for a full-length vehicle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Ship properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! property&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| sprite_id&lt;br /&gt;
| SPRITE_ID_NEW_SHIP&lt;br /&gt;
| Set this property to enable new graphics&lt;br /&gt;
|-&lt;br /&gt;
| speed&lt;br /&gt;
| 0 ... 127 km/h (float, speed units)&lt;br /&gt;
| {{ottd|14}}{{nml|7.5}} 0 .. 32767 km/h (float, speed units)&lt;br /&gt;
|-&lt;br /&gt;
| misc_flags&lt;br /&gt;
| bitmask(SHIP_FLAG_XXX)&lt;br /&gt;
| Bitmask with to possible flags, set to 0 to disable all. &lt;br /&gt;
&lt;br /&gt;
;SHIP_FLAG_2CC&lt;br /&gt;
:Enable use of the 2nd company colour&lt;br /&gt;
;SHIP_FLAG_AUTOREFIT&lt;br /&gt;
:llow autorefitting. To enable autorefit, furthermore the [[#Vehicle callbacks|refit_cost]]-callback has to allow it, or else (if this callback is not implemented or fails) the &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;refit_cost&amp;lt;/code&amp;gt;-property (see below) must be set to 0.&lt;br /&gt;
;SHIP_FLAG_NO_BREAKDOWN_SMOKE&lt;br /&gt;
:{{nml|0.3}} {{ottdp|1.3|no|ottdrev=r24124}} Disable breakdown smoke effect&lt;br /&gt;
;SHIP_FLAG_SPRITE_STACK&lt;br /&gt;
:{{ottdp|1.7|no|ottdrev=r27668}} Enable [[NML:Vehicles#Composing_vehicles_from_multiple_sprites|composition from multiple sprites]].&lt;br /&gt;
|-&lt;br /&gt;
| refit_cost&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| in 1/32 of the default refit cost base&lt;br /&gt;
|-&lt;br /&gt;
| callback_flags&lt;br /&gt;
| bitmask(VEH_CBF_XXX, ...)&lt;br /&gt;
|&lt;br /&gt;
Do not set this, unless you use [[NML:Old style callbacks|old-style callbacks]].&lt;br /&gt;
|-&lt;br /&gt;
| is_refittable&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| 0=false, 1=true. Note: if you do not set this property to 1, then refittable_cargo_classes / non_refittable_cargo_classes have no effect.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;default_cargo_type&amp;lt;/code&amp;gt;&lt;br /&gt;
| An identifier from the [[NML:Cargotable|cargo table]], or DEFAULT_CARGO_FIRST_REFITTABLE&lt;br /&gt;
| If the vehicle is refittable to at least one cargo, but the chosen default cargo is not available or is set to DEFAULT_CARGO_FIRST_REFITTABLE, then the first refittable cargo is used. The first refittable is chosen according to the order in your [[NML:Cargotable|cargo table]]. If this property is set to a valid cargo but the vehicle cannot refit to any cargo type, then the vehicle will be able to carry only this cargo, but it cannot be refitted (like e.g. the default train wagons).&lt;br /&gt;
|-&lt;br /&gt;
| cargo_capacity&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| For ships (unlike other vehicle types) the capacity set here is not affected by the cargo type.&lt;br /&gt;
|-&lt;br /&gt;
| sound_effect&lt;br /&gt;
| SOUND_XXX&lt;br /&gt;
|&lt;br /&gt;
See available [[NML:List of sound effects|sound effects]].&lt;br /&gt;
&amp;lt;br/&amp;gt;{{ottdp|1.6|no|ottdrev=r27507}} Since OpenTTD r27507 also &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;sound(&amp;quot;sound.wav&amp;quot;)&amp;lt;/code&amp;gt; and &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;import_sound(grfid, number)&amp;lt;/code&amp;gt; are valid here.&lt;br /&gt;
|-&lt;br /&gt;
| ocean_speed_fraction&lt;br /&gt;
| 0 ... 1 (float)&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.2|r22639}} fraction of base speed on ocean tiles (default: 1)&lt;br /&gt;
|-&lt;br /&gt;
| canal_speed_fraction&lt;br /&gt;
| 0 ... 1 (float)&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.2|r22639}} fraction of base speed on canal tiles (default: 1)&lt;br /&gt;
|-&lt;br /&gt;
| visual_effect&lt;br /&gt;
| visual_effect(VISUAL_EFFECT_XXX, offset)&lt;br /&gt;
|&lt;br /&gt;
There are two methods to set the visual effect of a vehicle:&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;visual_effect&amp;lt;/code&amp;gt;: Easy method for simple effects.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;effect_spawn_model&amp;lt;/code&amp;gt; + callback &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;create_effect&amp;lt;/code&amp;gt;: {{ottdp|1.5|no|ottdrev=r26747}} Harder to use, but also more powerful.&lt;br /&gt;
For each vehicle you have to decide for the method. You cannot use them both for the same vehicle &#039;item&#039;.&lt;br /&gt;
&lt;br /&gt;
XXX=[DEFAULT &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; STEAM &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; DIESEL &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; ELECTRIC &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; DISABLE], it is the type of the visual effect you want for this ship. Default means no effect. Offset is the position of the effect. 0 is default, negative values mean more to the front and positive values are backwards. Minimum offset is -8, maximum is 7.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;effect_spawn_model&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;EFFECT_SPAWN_MODEL_XXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
There are two methods to set the visual effect of a vehicle:&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;visual_effect&amp;lt;/code&amp;gt;: Easy method for simple effects.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;effect_spawn_model&amp;lt;/code&amp;gt; + callback &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;create_effect&amp;lt;/code&amp;gt;: {{ottdp|1.5|no|ottdrev=r26747}} Harder to use, but also more powerful.&lt;br /&gt;
For each vehicle you have to decide for the method. You cannot use them both for the same vehicle &#039;item&#039;.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.5|no|ottdrev=r26747}} Set the spawning model of visual effects for the vehicle, that is when the vehicle emits visual effects.&lt;br /&gt;
The visual appearance itself is defined by the callback &#039;create_effect&#039;.&lt;br /&gt;
&lt;br /&gt;
;EFFECT_SPAWN_MODEL_NONE&lt;br /&gt;
: Do not spawn any effects.&lt;br /&gt;
;EFFECT_SPAWN_MODEL_STEAM&lt;br /&gt;
: Gradually less effects when approaching max speed.&lt;br /&gt;
;EFFECT_SPAWN_MODEL_DIESEL&lt;br /&gt;
: Effect proportional to acceleration, no effect when idling at top speed.&lt;br /&gt;
;EFFECT_SPAWN_MODEL_ELECTRIC&lt;br /&gt;
: Random effect, gradually less likely when approaching max speed.&lt;br /&gt;
|-&lt;br /&gt;
| acceleration&lt;br /&gt;
| 1 ... 255&lt;br /&gt;
| {{ottd|14}} Acceleration in units of ~0.5 km/h per tick. 1 is the default and is the acceleration of default ships.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Aircraft properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! property&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| sprite_id&lt;br /&gt;
| SPRITE_ID_NEW_AIRCRAFT&lt;br /&gt;
| Set this property to enable new graphics&lt;br /&gt;
|-&lt;br /&gt;
| speed&lt;br /&gt;
| 0 .. 3280 km/h (float, speed units)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| range&lt;br /&gt;
| 0 .. 2894&lt;br /&gt;
| {{nml|0.3}} {{ottdp|1.2|no|ottdrev=r23504}} Maximum (euclidean) distance the aircraft can cover between two airports. Set to 0 for unlimited range.&lt;br /&gt;
|-&lt;br /&gt;
| misc_flags&lt;br /&gt;
| bitmask(AIRCRAFT_FLAG_2CC, AIRCRAFT_FLAG_AUTOREFIT)&lt;br /&gt;
| Bitmask with to possible flags, set to 0 to disable all. &lt;br /&gt;
&lt;br /&gt;
;AIRCRAFT_FLAG_2CC&lt;br /&gt;
:Enable 2nd company colour&lt;br /&gt;
;AIRCRAFT_FLAG_AUTOREFIT&lt;br /&gt;
:Allow autorefitting. To enable autorefit, furthermore the [[#Vehicle callbacks|refit_cost]]-callback has to allow it, or else (if this callback is not implemented or fails) the &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;refit_cost&amp;lt;/code&amp;gt;-property (see below) must be set to 0.&lt;br /&gt;
;AIRCRAFT_FLAG_NO_BREAKDOWN_SMOKE&lt;br /&gt;
:{{nml|0.3}} {{ottdp|1.3|no|ottdrev=r24124}} Disable breakdown smoke effect&lt;br /&gt;
;AIRCRAFT_FLAG_SPRITE_STACK&lt;br /&gt;
:{{ottdp|1.7|no|ottdrev=r27668}} Enable [[NML:Vehicles#Composing_vehicles_from_multiple_sprites|composition from multiple sprites]]. This also affects custom rotor sprites.&lt;br /&gt;
|-&lt;br /&gt;
| refit_cost&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| in 1/32 of default refit cost base&lt;br /&gt;
|-&lt;br /&gt;
| callback_flags&lt;br /&gt;
| bitmask(VEH_CBF_XXX, ...)&lt;br /&gt;
|&lt;br /&gt;
Do not set this, unless you use [[NML:Old style callbacks|old-style callbacks]].&lt;br /&gt;
|-&lt;br /&gt;
| aircraft_type&lt;br /&gt;
| AIRCRAFT_TYPE_XXX&lt;br /&gt;
| &lt;br /&gt;
;AIRCRAFT_TYPE_HELICOPTER&lt;br /&gt;
:Can land on helipad&lt;br /&gt;
;AIRCRAFT_TYPE_SMALL&lt;br /&gt;
:Can land on all airports with runway&lt;br /&gt;
;AIRCRAFT_TYPE_LARGE&lt;br /&gt;
:Can land on all airports with runway. But have a high crash chance on small airports&lt;br /&gt;
|-&lt;br /&gt;
| acceleration&lt;br /&gt;
| {{ottd|1.3.1}} 0 ... 255 &amp;lt;br/&amp;gt; {{ottd|&amp;amp;lt;1.3.1}} 0 ... 19&lt;br /&gt;
| {{ottd|1.3.1}} Default aircraft use values in the range 18 to 50 (= 6.75 to 18.75 mph/tick = 499.5 to 1387.5 mph/day), which is generally considered quite fast.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{ottd|&amp;amp;lt;1.3.1}} In older OpenTTD, aircraft provided by NewGRF accelerate 166% faster than intended.&lt;br /&gt;
|-&lt;br /&gt;
| passenger_capacity&lt;br /&gt;
| 0 ... 65536&lt;br /&gt;
| Capacity for the passenger compartment. See also the notes at &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;mail_capacity&amp;lt;/code&amp;gt; below.&lt;br /&gt;
|-&lt;br /&gt;
| mail_capacity&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Capacity for the mail compartment, if refitted to a cargo in the CC_PASSENGERS class. When refitted to other cargoes, this capacity is added to the passenger capacity to determine the base capacity. The actual capacity is set to this base capacity divided by 1 for mail, 2 for goods and 4 for all other cargoes. To override this effect, use the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;passenger_capacity&amp;lt;/code&amp;gt; and &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;mail_capacity&amp;lt;/code&amp;gt; callbacks.&lt;br /&gt;
|-&lt;br /&gt;
| sound_effect&lt;br /&gt;
| SOUND_XXX&lt;br /&gt;
|&lt;br /&gt;
See available [[NML:List of sound effects|sound effects]].&lt;br /&gt;
&amp;lt;br/&amp;gt;{{ottdp|1.6|no|ottdrev=r27507}} Since OpenTTD r27507 also &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;sound(&amp;quot;sound.wav&amp;quot;)&amp;lt;/code&amp;gt; and &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;import_sound(grfid, number)&amp;lt;/code&amp;gt; are valid here.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Vehicle variables==&lt;br /&gt;
&lt;br /&gt;
Below an overview of all vehicle-specific variables. Note that in the purchase list, the vehicle is not built yet and as such many variables are not available. All general variables are available, refer to the table for info on vehicle-specific variables. Trying to access a non-available variable invokes undefined behaviour. Please note that while all variables are available for all vehicles types, some of them only make sense for one or more vehicle types. For example checking current_railtype for a non-rail vehicle doesn&#039;t make sense at all, similarly checking current_roadtype for a tram won&#039;t return a useful result.&lt;br /&gt;
&lt;br /&gt;
===Variables without parameter===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! available in&amp;lt;br /&amp;gt;purchase list?&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| position_in_consist&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| The position of the current vehicle-part from the start of the vehicle. The engine will get value 0, the first wagon (or second engine) gets value 1, etc.&lt;br /&gt;
|-&lt;br /&gt;
| position_in_consist_from_end&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| Same as position_in_consist but counted from the end. The last wagon will get value 0.&lt;br /&gt;
|-&lt;br /&gt;
| num_vehs_in_consist&lt;br /&gt;
| 1 ... 256&lt;br /&gt;
| No&lt;br /&gt;
| The total number of vehicles-parts in this vehicle. For aircraft this will include the shadow and the rotor.&lt;br /&gt;
|-&lt;br /&gt;
| position_in_vehid_chain&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| See position_in_consist, but not of the complete vehicle but only all consecutive parts with the same id.&lt;br /&gt;
|-&lt;br /&gt;
| position_in_vehid_chain_from_end&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| See position_in_consist_from_end, but not of the complete vehicle but only all consecutive parts with the same id.&lt;br /&gt;
|-&lt;br /&gt;
| num_vehs_in_vehid_chain&lt;br /&gt;
| 1 ... 256&lt;br /&gt;
| No&lt;br /&gt;
| See num_vehs_in_consist, but not of the complete vehicle but only all consecutive parts with the same id.&lt;br /&gt;
|-&lt;br /&gt;
| position_in_articulated_veh&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| {{nml|0.3}} {{ottdp|1.4|no|ottdrev=r26157}} The position of the current articulated vehicle from the start of the vehicle. The first will get value 0, the second one gets value 1, etc.&lt;br /&gt;
|-&lt;br /&gt;
| position_in_articulated_veh_from_end&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| {{nml|0.3}} {{ottdp|1.4|no|ottdrev=r26157}} The position of the current articulated vehicle from the end of the vehicle. The last will get value 0, the second last one gets value 1, etc.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_classes_in_consist&lt;br /&gt;
| Bitmask of CC_XXX&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
[[NML:Cargos#Cargo classes|cargo classes]]&lt;br /&gt;
|-&lt;br /&gt;
| most_common_cargo_type&lt;br /&gt;
|&lt;br /&gt;
[[NML:Cargos#Cargo properties|Cargo label]]&lt;br /&gt;
| No&lt;br /&gt;
| The most common cargo type in the consist.  Prior to nml r2320 this was known as most_common_refit, and didn&#039;t work, and was also incorrectly documented :)&lt;br /&gt;
|-&lt;br /&gt;
| most_common_cargo_subtype&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| The most common cargo subtype for most_common_cargo_type&lt;br /&gt;
|-&lt;br /&gt;
| bitmask_consist_info&lt;br /&gt;
| Bitmask 8 bit&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
Binary OR of the values of [[#bitmask vehicle info|bitmask_vehicle_info]] of all vehicles (engines, wagons) in the consist. Only available for rail vehicles.&lt;br /&gt;
|-&lt;br /&gt;
| company_num&lt;br /&gt;
| 0 ... 14&lt;br /&gt;
| Yes&lt;br /&gt;
| company number of the vehicle owner. TTDPatch only supports up to 8 companies (0 ... 7)&lt;br /&gt;
|-&lt;br /&gt;
| company_type&lt;br /&gt;
| PLAYERTYPE_XX&lt;br /&gt;
| Yes&lt;br /&gt;
| &lt;br /&gt;
;PLAYERTYPE_HUMAN&lt;br /&gt;
:human player&lt;br /&gt;
;PLAYERTYPE_AI&lt;br /&gt;
:AI player&lt;br /&gt;
;PLAYERTYPE_HUMAN_IN_AI&lt;br /&gt;
:human managing AI company&lt;br /&gt;
;PLAYERTYPE_AI_IN_HUMAN&lt;br /&gt;
:AI managing human company&lt;br /&gt;
&lt;br /&gt;
OpenTTD only uses PLAYERTYPE_HUMAN and PLAYERTYPE_AI. If you cheat yourself to be part of an AI company OpenTTD will still report PLAYERTYPE_AI for the company with yourself and the AI and it&#039;ll report PLAYERTYPE_HUMAN for the now uncontrolled company.&lt;br /&gt;
|-&lt;br /&gt;
| company_colour1&lt;br /&gt;
| COLOUR_XXX&lt;br /&gt;
| Yes&lt;br /&gt;
|&lt;br /&gt;
Refer to the table [[NML:List of default colour translation palettes#Company colour helper functions|here]] for possible values.&lt;br /&gt;
|-&lt;br /&gt;
| company_colour2&lt;br /&gt;
| COLOUR_XXX&lt;br /&gt;
| Yes&lt;br /&gt;
|&lt;br /&gt;
Same as company_colour1, if no 2nd company colour is chosen. Refer to the table [[NML:List of default colour translation palettes#Company colour helper functions|here]] for possible values.&lt;br /&gt;
|-&lt;br /&gt;
| aircraft_height&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| Height difference between the aircraft and its shadow. 8 Units are equivalent to one height level on the map.&lt;br /&gt;
|-&lt;br /&gt;
| airport_type&lt;br /&gt;
| AIRPORTTYPE_XX&lt;br /&gt;
| No&lt;br /&gt;
| &lt;br /&gt;
;AIRPORTTYPE_SMALL&lt;br /&gt;
;AIRPORTTYPE_LARGE&lt;br /&gt;
;AIRPORTTYPE_HELIPORT&lt;br /&gt;
;AIRPORTTYPE_OILRIG&lt;br /&gt;
|-&lt;br /&gt;
| curv_info_prev_cur&lt;br /&gt;
| -2 ... 2&lt;br /&gt;
| No&lt;br /&gt;
| Difference in direction between the previous (towards engine) vehicle and this vehicle. Curvature to the right is positive. 1 unit is 45 degrees.&lt;br /&gt;
|-&lt;br /&gt;
| curv_info_cur_next&lt;br /&gt;
| -2 ... 2&lt;br /&gt;
| No&lt;br /&gt;
| Difference in direction between this vehicle and the next (towards rear end) vehicle. Curvature to the right is positive. 1 unit is 45 degrees.&lt;br /&gt;
|-&lt;br /&gt;
| curv_info_prev_next&lt;br /&gt;
| -4 ... 4&lt;br /&gt;
| No&lt;br /&gt;
| Difference in direction between the previous (towards engine) and next (towards rear end) vehicle. Curvature to the right is positive. 1 unit is 45 degrees. Equal to &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;curve_invo_prev_cur + curv_info_cur_next&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| curv_info&lt;br /&gt;
| vehicle_curv_info(&#039;&#039;prev_cur&#039;&#039;, &#039;&#039;cur_next&#039;&#039;)&#039;&#039;&#039;&#039;&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
Returns a magic number that represents the curvature state of the prev-cur-next vehicle triplet. Do not try to make sense of this magic number, use the [[NML:Builtin functions|builtin function]] &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;vehicle_curv_info()&amp;lt;/code&amp;gt; instead to make comparisons. &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;curv_info == vehicle_curv_info(a, b)&amp;lt;/code&amp;gt; is equivalent to &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;(curv_info_prev_cur == a) &amp;amp;amp;&amp;amp;amp; (curv_info_cur_next == b)&amp;lt;/code&amp;gt;, however the former can easily be used in a switch-block.&lt;br /&gt;
|-&lt;br /&gt;
| motion_counter&lt;br /&gt;
| 0 ... 0xFFFFFF&lt;br /&gt;
| Yes, always 0&lt;br /&gt;
| Is increased every time the vehicle moves a single step on the map. Useful for driving animations.&lt;br /&gt;
For that, make the animation use a number of frames, which is a power of two, i.e. 2, 4, 8, 16, 32, ... frames, and then use the lower n bits of motion_counter.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_type_in_veh&lt;br /&gt;
| entry in cargo translation table&lt;br /&gt;
| Yes, for the default cargo&lt;br /&gt;
| 0xFF if not present in the table&lt;br /&gt;
|-&lt;br /&gt;
| cargo_unit_weight&lt;br /&gt;
| weight per unit in 1/16t&lt;br /&gt;
| Yes, for the default cargo&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| cargo_classes&lt;br /&gt;
| Bitmask of [[NML:Cargos#Cargo properties|cargo class]]&lt;br /&gt;
| Yes, for the default cargo&lt;br /&gt;
| class of the currently transported cargo&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_available&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| Yes&lt;br /&gt;
| Value is 1 if the vehicle is available on the open market&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_testing&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| Yes&lt;br /&gt;
| Value is 1 if the vehicle is currently being tested&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_offered&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| Yes&lt;br /&gt;
| Value is 1 if the vehicle is currently being offered for exclusive preview&lt;br /&gt;
|-&lt;br /&gt;
| build_year&lt;br /&gt;
| 0 ... 5000000&lt;br /&gt;
| Yes&lt;br /&gt;
| 0-based year when the vehicle was built, current year if the vehicle is not built yet&lt;br /&gt;
|-&lt;br /&gt;
| direction&lt;br /&gt;
| DIRECTION_XX&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
See [[NML:List of direction constants|here]] for an overview of possible values and their meaning.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_capacity&lt;br /&gt;
| 0 ... 65535&lt;br /&gt;
| No&lt;br /&gt;
| Cargo capacity (number of units) of the vehicle&lt;br /&gt;
|-&lt;br /&gt;
| cargo_count&lt;br /&gt;
| 0 ... 65535&lt;br /&gt;
| No&lt;br /&gt;
| Number of cargo units of cargo in the vehicle&lt;br /&gt;
|-&lt;br /&gt;
| cargo_subtype&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Yes, always 0&lt;br /&gt;
| Cargo subtype, used to provide more than one refit option for the same cargo type. See also the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;cargo_subtype_text&amp;lt;/code&amp;gt; callback.&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_powered&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Vehicle provides power and is on the correct track type&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_not_powered&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Vehicle is either on a wrong track type or it doesn&#039;t provide power at all&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_potentially_powered&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Vehicle provides power, if it is on a suitable track type&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_flipped&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Value is 1 if the sprite is reversed via flip-vehicle-in-depot (trains only), or if it&#039;s the rear-most part of a dual-head engine.&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_reversed&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Value is 1 if the vehicle has reversed an odd number of times&lt;br /&gt;
|-&lt;br /&gt;
| built_during_preview&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Value is 1 if the vehicle was built during the exclusive preview stage&lt;br /&gt;
|-&lt;br /&gt;
| current_railtype&lt;br /&gt;
| Entry from railtype translation table or 0xFF&lt;br /&gt;
| No&lt;br /&gt;
| This variable is useless due to equivalent railtypes, use tile_xxx_railtype instead.  If you do use this variable, it will not work as expected unless you&#039;ve defined a railtype translation table. If the train is running on a railtype that is not listed in your railtype translation table this variable will contain 0xFF.&lt;br /&gt;
|-&lt;br /&gt;
| current_roadtype&lt;br /&gt;
| Entry from current_roadtype translation table or 0xFF&lt;br /&gt;
| No&lt;br /&gt;
| {{nml|0.5}} {{ottdp|1.10|no}} This variable is useless due to equivalent roadtypes, use tile_xxx_roadtype instead.  Don&#039;t use this variable unless you&#039;ve defined a roadtype translation table. If the road vehicle is running on a roadtype that is not listed in your roadtype translation table this variable will contain 0xFF. Checking this for a tram is not supported and will not return a useful result.&lt;br /&gt;
|-&lt;br /&gt;
| current_tramtype&lt;br /&gt;
| Entry from tramtype translation table or 0xFF&lt;br /&gt;
| No&lt;br /&gt;
| {{nml|0.5}} {{ottdp|1.10|no}} This variable is useless due to equivalent tramtypes, use tile_xxx_tramtype instead. Don&#039;t use this variable unless you&#039;ve defined a tramtype translation table. If the road vehicle is running on a tramtype that is not listed in your tramtype translation table this variable will contain 0xFF. Checking this for a road vehicle that is not a tram is not supported and will not return a useful result.&lt;br /&gt;
|-&lt;br /&gt;
| tile_has_catenary&lt;br /&gt;
| No&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| {{ottdp|1.11|no}} True if the track_type on the tile has catenary. This is a little simplified as it is intended for sprite changes (e.g. raise/lower pantograph) and only checks for &amp;quot;some catenary&amp;quot;. To distinguish different types of electric track, AC and DC voltages etc, ... use tile_xxx_railtype/tile_xxx_roadtype/tile_xxx_tramtype instead.&lt;br /&gt;
|-&lt;br /&gt;
| waiting_triggers&lt;br /&gt;
|&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
Random triggers waiting to be matched. (see [[NML:Random switch|Random switch]])&lt;br /&gt;
|-&lt;br /&gt;
| random_bits&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
Random data that can be used to randomize certain descisions. (see [[NML:Random switch|Random switch]])&lt;br /&gt;
|-&lt;br /&gt;
| grfid&lt;br /&gt;
| 0 ... 0xFFFFFFFF&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
GRFID that defined the [[NML:Graphics|graphics]]-block for this vehicle. To compare this with other grfids, use the [[NML:Builtin functions|builtin function]] &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;str2number()&amp;lt;/code&amp;gt; to convert the other GRFID to a number as well.&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_type_id&lt;br /&gt;
| 0 ... 65535 or a name defined in item block&lt;br /&gt;
| No&lt;br /&gt;
| GRF-local ID of the vehicle, equal to the item ID. Note that vehicles from other NewGRFs may have the same ID, so you&#039;ll generally have to check the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;grfid&amp;lt;/code&amp;gt; as well.&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_hidden&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Value is 1 if the vehicle is hidden in a depot or tunnel.&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_stopped&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Value is 1 if the vehicle is stopped, or if it is braking for a stop (trains only).&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_crashed&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Value is 1 if the vehicle has crashed.&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_broken&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Value is 1 if the vehicle is broken down.&lt;br /&gt;
|-&lt;br /&gt;
| date_of_last_service&lt;br /&gt;
| date(year, month, day)&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| breakdowns_since_last_service&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| Number of breakdowns since the last service&lt;br /&gt;
|-&lt;br /&gt;
| reliability&lt;br /&gt;
| 0 ... 100&lt;br /&gt;
| No&lt;br /&gt;
| Reliability (percentage)&lt;br /&gt;
|-&lt;br /&gt;
| age_in_days&lt;br /&gt;
| 0 ... 65535&lt;br /&gt;
| No&lt;br /&gt;
| Vehicle age in days.&lt;br /&gt;
|-&lt;br /&gt;
| max_age_in_days&lt;br /&gt;
| 0 ... 65535&lt;br /&gt;
| No&lt;br /&gt;
| Maximum vehicle age in days.&lt;br /&gt;
|-&lt;br /&gt;
| current_speed&lt;br /&gt;
| (speed units)&lt;br /&gt;
| No&lt;br /&gt;
| The current speed of the vehicle in m/s&lt;br /&gt;
|-&lt;br /&gt;
| max_speed&lt;br /&gt;
| (speed units)&lt;br /&gt;
| No&lt;br /&gt;
| The maximum speed of the vehicle in m/s&lt;br /&gt;
|-&lt;br /&gt;
| current_max_speed&lt;br /&gt;
| (speed units)&lt;br /&gt;
| No&lt;br /&gt;
| {{nml|0.3}} {{ottdp|1.3|no|ottdrev=r24246}} Current maximum speed of the vehicle in m/s. This includes e.g. track or timetable limits. Only valid for front vehicle.&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_in_depot&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Value is 1 if the vehicle is inside a depot&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_unloading&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| {{ottdp|1.5|2.5|ottdrev=r26430}} Value is 1 if the vehicle is unloading at a station and has not yet started loading new cargo.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Variables that require an argument===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! Argument&lt;br /&gt;
! value range&lt;br /&gt;
! available in&amp;lt;br /&amp;gt;purchase list?&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| count_veh_id&lt;br /&gt;
| The vehicle ID to look for.&lt;br /&gt;
| 0..255&lt;br /&gt;
| No&lt;br /&gt;
| The number of vehicles in the current consist that have the given ID.&lt;br /&gt;
|-&lt;br /&gt;
| other_veh_curv_info&lt;br /&gt;
| Offset in the chain from the current vehicle.&amp;lt;ref name=&amp;quot;offset&amp;quot;&amp;gt;Argument range is -128..127. Positive values are interpreted as towards the end, negative values as towards the front. If the offset is outside the vehicle chain, the result value will be 0.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| -4..4&lt;br /&gt;
| No&lt;br /&gt;
| Difference in direction between the other vehicle and this vehicle. Curvature to the right is positive. 1 unit is 45 degrees.&lt;br /&gt;
|-&lt;br /&gt;
| other_veh_is_hidden&lt;br /&gt;
| Offset in the chain from the current vehicle.&amp;lt;ref name=&amp;quot;offset&amp;quot;/&amp;gt;&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| 1 the other vehicle is hidden in a depot or tunnel, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| other_veh_x_offset&lt;br /&gt;
| Offset in the chain from the current vehicle.&amp;lt;ref name=&amp;quot;offset&amp;quot;/&amp;gt;&lt;br /&gt;
| -128..127&lt;br /&gt;
| No&lt;br /&gt;
| Signed difference in X-position (top-right to bottom-left) between the other vehicle and this vehicle.&lt;br /&gt;
|-&lt;br /&gt;
| other_veh_y_offset&lt;br /&gt;
| Offset in the chain from the current vehicle.&amp;lt;ref name=&amp;quot;offset&amp;quot;/&amp;gt;&lt;br /&gt;
| -128..127&lt;br /&gt;
| No&lt;br /&gt;
| Signed difference in Y-position (top-left to bottom-right) between the other vehicle and this vehicle.&lt;br /&gt;
|-&lt;br /&gt;
| other_veh_z_offset&lt;br /&gt;
| Offset in the chain from the current vehicle.&amp;lt;ref name=&amp;quot;offset&amp;quot;/&amp;gt;&lt;br /&gt;
| -128..127&lt;br /&gt;
| No&lt;br /&gt;
| Signed difference in Z-position (upwards) between the other vehicle and this vehicle.&lt;br /&gt;
|-&lt;br /&gt;
| tile_supports_railtype &amp;lt;br /&amp;gt; tile_supports_roadtype &amp;lt;br /&amp;gt; tile_supports_tramtype&lt;br /&gt;
| Entry from rail/road/tram translation table&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| {{ottdp|1.11|no}} Vehicles of the track_type label used as parameter are compatible with the rail/road/tram track_type on the current tile. Example: &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;tile_supports_railtype(ELRL)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tile_powers_railtype &amp;lt;br /&amp;gt; tile_powers_roadtype &amp;lt;br /&amp;gt;tile_powers_tramtype&lt;br /&gt;
| Entry from rail/road/tram translation table&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| {{ottdp|1.11|no}} Vehicles of the track_type label used as parameter are powered on the rail/road/tram track_type on the current tile. Example: &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;tile_powers_railtype(ELRL)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tile_is_railtype &amp;lt;br /&amp;gt; tile_is_roadtype &amp;lt;br /&amp;gt; tile_is_tramtype&lt;br /&gt;
| Entry from rail/road/tram translation table&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| {{ottdp|1.11|no}} The track_type label used as parameter is identical or equivalent (listed as alternate label in rail-/road-/tram-type property 1D) to the rail/road/tram track_type on the current tile. Example: &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;tile_is_railtype(ELRL)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Vehicle callbacks==&lt;br /&gt;
The following table contains a list of available vehicle callbacks. Additionally, it&#039;s possible to provide cargo-specific graphics, using the identifier from the [[NML:Cargotable|cargo table]] as callback name. These callbacks will be used if the vehicle is refitted to the corresponding cargo type. If no cargo-specific graphics match the cargo that the vehicle is carrying, the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;default&amp;lt;/code&amp;gt; callback is used instead. Cargo-specific graphics callbacks are never called from the purchase menu, refer to the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;purchase&amp;lt;/code&amp;gt; callback below instead.&lt;br /&gt;
&lt;br /&gt;
Note that the above affects &#039;&#039;&#039;graphics only&#039;&#039;&#039;, other callbacks are unaffected.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Available for&lt;br /&gt;
! In purchase menu?&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| default&lt;br /&gt;
| All&lt;br /&gt;
| Yes, unless &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;purchase&amp;lt;/code&amp;gt; is set separately&lt;br /&gt;
| Sprite group&lt;br /&gt;
| &#039;Normal&#039; vehicle graphics, if no cargo-specific graphics apply. See also the section on [[#Sprites in GUI|GUI sprites]].&lt;br /&gt;
|-&lt;br /&gt;
| purchase&lt;br /&gt;
| All&lt;br /&gt;
| Yes, only&lt;br /&gt;
| Sprite group&lt;br /&gt;
| Graphics to show in the buy menu (only the horizontal view is needed, except for dual-headed trains. With the &amp;lt;code&amp;gt;dual_headed&amp;lt;/code&amp;gt; property set, special rules for the purchase menu sprite apply: two sprites are drawn (for front and back) as if the vehicle is normally constructed. If you supply one purchase menu sprite, it will be used for both vehicle parts in the purchase menu. Provide a set of 8 sprites, and the 7th resp. 3rd sprite will be drawn; provide a set of 8 blank sprites except the 7th if you want to fully control a single purchase menu sprite for a dual-headed engine. ) See also the section on [[#Sprites in GUI|GUI sprites]].&lt;br /&gt;
|-&lt;br /&gt;
| rotor&lt;br /&gt;
| Aircraft (helicopters)&lt;br /&gt;
| No&lt;br /&gt;
| Sprite group&lt;br /&gt;
| Graphics for the helicopter rotor (4 sprites; 1 stopped and 3 moving)&lt;br /&gt;
|-&lt;br /&gt;
| random_trigger&lt;br /&gt;
| All&lt;br /&gt;
| No&lt;br /&gt;
| N/A&lt;br /&gt;
| See [[NML:Random switch|random switch]] for more information.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_subtype_text&lt;br /&gt;
| All&lt;br /&gt;
| No&lt;br /&gt;
| String, or CB_RESULT_NO_TEXT&lt;br /&gt;
| &amp;lt;b&amp;gt;NOTE: As of OpenTTD 13, this feature is considered deprecated for most uses. Use variants instead.&amp;lt;/b&amp;gt; With this callback, you can display extra text after the cargo in the vehicle information window. This callback is called during refitting, with succesively increased values of the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;cargo_subtype&amp;lt;/code&amp;gt; variable, until the callback returns CB_RESULT_NO_TEXT. All returned strings are then displayed as refit options. The chosen refit option is saved in the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;cargo_subtype&amp;lt;/code&amp;gt; variable, so it can be used to select specific sprites for the vehicle&#039;s current cargo subtype.&lt;br /&gt;
|-&lt;br /&gt;
| additional_text&lt;br /&gt;
| All&lt;br /&gt;
| Yes, only&lt;br /&gt;
| String&lt;br /&gt;
| Additional text to show in the purchase list.&lt;br /&gt;
|-&lt;br /&gt;
| colour_mapping&lt;br /&gt;
| All&lt;br /&gt;
| Yes, unless &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;purchase_colour_mapping&amp;lt;/code&amp;gt; is set separately&lt;br /&gt;
| Recolour sprite number&lt;br /&gt;
|&lt;br /&gt;
With this callback, you can use a different recolour sprite instead of the standard 1cc / 2cc company colour remappings. See [[NML:List of default colour translation palettes|here]] for a list of default palettes. See the [[NML:Builtin functions|builtin function]] &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;reserve_sprites()&amp;lt;/code&amp;gt; for info on how to allocate your own sprite. For performance, the result is cached and only updated if the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt; every_32_days&amp;lt;/code&amp;gt; callback requires so. Add CB_RESULT_COLOUR_MAPPING_ADD_CC to the result to add the company colour to the sprites, this requires 16 (1cc) or 256 (2cc) sprites in total.&lt;br /&gt;
|-&lt;br /&gt;
| start_stop&lt;br /&gt;
| All&lt;br /&gt;
| No&lt;br /&gt;
| String or CB_RESULT_NO_TEXT&lt;br /&gt;
| Called when starting or stopping a vehicle. Mainly useful to prevent vehicles from leaving the depot unless a certain condition is met. Return CB_RESULT_NO_TEXT to allow or a string (containing an error message) to disallow starting/stopping.&lt;br /&gt;
|-&lt;br /&gt;
| every_32_days&lt;br /&gt;
| All&lt;br /&gt;
| No&lt;br /&gt;
| bitmask(CB_RESULT_32_DAYS_XXX, ...)&lt;br /&gt;
| Called every 32 days. Set CB_RESULT_32_DAYS_TRIGGER in the bitmask to trigger TRIGGER_VEHICLE_32_CALLBACK. Set CB_RESULT_32_DAYS_COLOUR_MAPPING in the bitmask to update the colour mapping by re-running the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;colour_mapping&amp;lt;/code&amp;gt; callback.&lt;br /&gt;
|-&lt;br /&gt;
| sound_effect&lt;br /&gt;
| All&lt;br /&gt;
| No&lt;br /&gt;
| SOUND_XXX, sound(&amp;quot;sound.wav&amp;quot;), import_sound(grfid, number) or CB_RESULT_NO_SOUND&lt;br /&gt;
|&lt;br /&gt;
Called to play various vehicle sounds.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt; The sound event, see the [[#Sound events|table]] below.&lt;br /&gt;
Return SOUND_XXX (see [[NML:List_of_sound_effects|here]]) to return a default sound. &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;sound(&amp;quot;soundfile&amp;quot;)&amp;lt;/code&amp;gt; imports a sound from a .wav file. &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;import_sound(grfid, number)&amp;lt;/code&amp;gt; imports a sound from another grf. A failed (or not implemented) callback will cause the default sound to be played. Return CB_RESULT_NO_SOUND to play no sound at all.&lt;br /&gt;
|-&lt;br /&gt;
| articulated_part&lt;br /&gt;
| Trains, Road Vehicles&lt;br /&gt;
| Yes (no separate callback)&lt;br /&gt;
| Vehicle ID, or CB_RESULT_NO_MORE_ARTICULATED_PARTS&lt;br /&gt;
| With this callback, you can add articulated parts (e.g. tenders) to your vehicle. Called repeatedly, until CB_RESULT_NO_MORE_ARTICULATED_PARTS is returned. After each call, the returned vehicleID is added to your vehicle.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt; contains 1 during the first call, 2 during the second, etc.&lt;br /&gt;
Note that callback may be called from the purchase list, using vehicle variables is not possible. Or CB_RESULT_REVERSED_VEHICLE to the returned vehicle ID to display the vehicle backwards. &lt;br /&gt;
&lt;br /&gt;
The vehicle ID for the articulated part must be in the range 0 .. 16383.&lt;br /&gt;
&lt;br /&gt;
For NML 0.2 and lower the vehicle ID of the articulated part must be in the range 0 .. 127.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| can_attach_wagon&lt;br /&gt;
| Trains&lt;br /&gt;
| No&lt;br /&gt;
| String or CB_RESULT_ATTACH_XXX&lt;br /&gt;
| Called when a wagon is being attached, to allow or disallow attaching. If a wagon is inserted in the middle, all wagons are removed and attached one-by-one in the new order. This callback has to be defined at the engine. The scopes behave different than usual though:&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;SELF&amp;lt;/code&amp;gt; refers to the wagon being attached. (despite the callback being defined at the engine)&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;PARENT&amp;lt;/code&amp;gt; refers to the consist of the engine up to the wagon before &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;SELF&amp;lt;/code&amp;gt;, i.e. not (yet) including the wagon being attached.&lt;br /&gt;
Return a string to disallow with the string as error message. Return CB_RESULT_ATTACH_DISALLOW to disallow with standard message (&amp;quot;incompatible railtypes&amp;quot;), CB_RESULT_ATTACH_ALLOW to allow or CB_RESULT_ATTACH_ALLOW_IF_RAILTYPES to allow if the railtypes match (default).&lt;br /&gt;
|-&lt;br /&gt;
| refit_cost&lt;br /&gt;
| {{ottdp|1.2|no|ottdrev=r23089}} All&lt;br /&gt;
| Yes&lt;br /&gt;
| -8192 .. 8191 as refit cost. Add &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_AUTOREFIT&amp;lt;/code&amp;gt; if you want to allow autorefit.&lt;br /&gt;
| When returning a negative value, encode the cost as (cost &amp;amp; &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_REFIT_COST_MASK&amp;lt;/code&amp;gt;) before (possibly) adding &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_AUTOREFIT&amp;lt;/code&amp;gt;. To allow autorefitting, the corresponding bit in the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;misc_flags&amp;lt;/code&amp;gt; must be set as well.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;: The new cargo type.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 8, 8)&amp;lt;/code&amp;gt;: The new cargo subtype (see &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;cargo_subtype_text&amp;lt;/code&amp;gt;-callback).&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 16, 16)&amp;lt;/code&amp;gt;: A bitmask of the [[NML:Cargos#Cargo_classes|cargo classes]] of the target cargo type. &lt;br /&gt;
Note that this callback may also be called when the vehicle does not exist yet, so the available variables are limited.&lt;br /&gt;
|-&lt;br /&gt;
| create_effect&lt;br /&gt;
| {{ottdp|1.5|no|ottdrev=r26747}} Trains, Road Vehicles, Ships&lt;br /&gt;
| No&lt;br /&gt;
| 0 .. 3 for number of effects. Optionally add &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_CREATE_EFFECT_CENTER&amp;lt;/code&amp;gt; and/or &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_CREATE_EFFECT_NO_ROTATION&amp;lt;/code&amp;gt;&lt;br /&gt;
| Called when a effect spawning model is defined via &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;effect_spawn_model&amp;lt;/code&amp;gt; resp. &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;effect_spawn_model_and_powered&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The result specifies how many effects shall be created.&lt;br /&gt;
The position and appearance of the individual effects is returned via registers 0x100 to 0x103:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
switch (FEAT_XXX, SELF, switch_name, [&lt;br /&gt;
  STORE_TEMP(create_effect(EFFECT_SPRITE_XXX, 8, -3, 10), 0x100), // first effect,&lt;br /&gt;
  STORE_TEMP(create_effect(EFFECT_SPRITE_YYY, 8,  3, 10), 0x101)  // second effect, ...&lt;br /&gt;
]) {&lt;br /&gt;
return 2; // number of effects&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The register values are created using the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;create_effect(&#039;&#039;effect_sprite&#039;&#039;, &#039;&#039;l_x_offset&#039;&#039;, &#039;&#039;t_y_offset&#039;&#039;, &#039;&#039;z_offset&#039;&#039;)&amp;lt;/code&amp;gt; function:&lt;br /&gt;
* &#039;&#039;effect_sprite&#039;&#039;: Sprite for the effect. One of &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;EFFECT_SPRITE_&amp;lt;/code&amp;gt;[&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;NONE&amp;lt;/code&amp;gt;|&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;STEAM&amp;lt;/code&amp;gt;|&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;DIESEL&amp;lt;/code&amp;gt;|&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;ELECTRIC&amp;lt;/code&amp;gt;|&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;AIRCRAFT_BREAKDOWN_SMOKE&amp;lt;/code&amp;gt;].&lt;br /&gt;
* &#039;&#039;l_x_offset&#039;&#039;: Longitudinal or X position of the effect, depending on callback result &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_CREATE_EFFECT_NO_ROTATION&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;t_y_offset&#039;&#039;: Transversal or Y position of the effect, depending on callback result &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_CREATE_EFFECT_NO_ROTATION&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;z_offset&#039;&#039;: Z position of the effect.&lt;br /&gt;
&lt;br /&gt;
Additional to the number of effects, the callback result may specify these flags:&lt;br /&gt;
;&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_CREATE_EFFECT_CENTER&amp;lt;/code&amp;gt;&lt;br /&gt;
:(Train and road vehicle only) If set, position effect relative to vehicle center instead of relative to vehicle sprite. (behaves the same for vehicles with length 8/8) &lt;br /&gt;
;&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_CREATE_EFFECT_NO_ROTATION&amp;lt;/code&amp;gt;&lt;br /&gt;
*If not set, the parameters to &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;effect_sprite&amp;lt;/code&amp;gt; describe longitudinal/transversal positions, which are rotate wrt. vehicle orientation.&lt;br /&gt;
*If set, the parameters to &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;effect_sprite&amp;lt;/code&amp;gt; describe X and Y positions, which are not automatically rotated.&lt;br /&gt;
|-&lt;br /&gt;
| reverse_build_probability&lt;br /&gt;
| {{nml|0.7.5}} {{ottd|14.0}} Trains&lt;br /&gt;
| No&lt;br /&gt;
| 0 .. 100&lt;br /&gt;
| Probability of reversing rail vehicle, i.e. facing forward or backward, when purchased.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following callbacks all have an equivalent property. The property description applies here also, except where otherwise noted.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Available for&lt;br /&gt;
! In purchase menu?&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| loading_speed&lt;br /&gt;
| All&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| speed&lt;br /&gt;
| All&lt;br /&gt;
| Yes, unless &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;purchase_speed&amp;lt;/code&amp;gt; is set separately&lt;br /&gt;
| Units are not (yet) available&lt;br /&gt;
|-&lt;br /&gt;
| cost_factor&lt;br /&gt;
| All&lt;br /&gt;
| Yes, only&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| running_cost_factor&lt;br /&gt;
| All&lt;br /&gt;
| Yes, unless &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;purchase_running_cost_factor&amp;lt;/code&amp;gt; is set separately&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| cargo_age_period&lt;br /&gt;
| All&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| cargo_capacity&lt;br /&gt;
| All except aircraft&lt;br /&gt;
| Yes, unless &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;purchase_cargo_capacity&amp;lt;/code&amp;gt; is set separately&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| passenger_capacity&lt;br /&gt;
| Aircraft&lt;br /&gt;
| Yes, unless &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;purchase_passenger_capacity&amp;lt;/code&amp;gt; is set separately&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| mail_capacity&lt;br /&gt;
| Aircraft&lt;br /&gt;
| Yes, unless &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;purchase_mail_capacity&amp;lt;/code&amp;gt; is set separately&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| range&lt;br /&gt;
| Aircraft&lt;br /&gt;
| Yes, unless &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;purchase_range&amp;lt;/code&amp;gt; is set separately&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| visual_effect_and_powered&lt;br /&gt;
| Trains&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| visual_effect&lt;br /&gt;
| Road Vehicles, Ships&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| effect_spawn_model_and_powered&lt;br /&gt;
| Trains&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| effect_spawn_model&lt;br /&gt;
| Road Vehicles, Ships&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| power&lt;br /&gt;
| Trains, Road Vehicles&lt;br /&gt;
| Yes, unless &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;purchase_power&amp;lt;/code&amp;gt; is set separately&lt;br /&gt;
| Units are not (yet) available&lt;br /&gt;
|-&lt;br /&gt;
| weight&lt;br /&gt;
| Trains, Road Vehicles&lt;br /&gt;
| Yes, unless &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;purchase_weight&amp;lt;/code&amp;gt; is set separately&lt;br /&gt;
| Units are not (yet) available&lt;br /&gt;
|-&lt;br /&gt;
| length&lt;br /&gt;
| Trains, Road vehicles&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| tractive_effort_coefficient&lt;br /&gt;
| Trains, Road Vehicles&lt;br /&gt;
| Yes, unless &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;purchase_tractive_effort_coefficient&amp;lt;/code&amp;gt; is set separately&lt;br /&gt;
| Value range is 0 .. 255 instead of 0 .. 1.&lt;br /&gt;
|-&lt;br /&gt;
| bitmask_vehicle_info&lt;br /&gt;
| Trains&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| curve_speed_mod&lt;br /&gt;
| {{nml|0.7}} {{ottd|12.0}} Trains&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| {{nml|0.7.2}} {{ottd|14.0}} All&lt;br /&gt;
| Yes&lt;br /&gt;
| Can be used to display vehicle name differently depending on context (purchase menu, depot, nested variant depth etc). &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;extra_callback_info1&amp;lt;/code&amp;gt; contains detailed information about context - please see https://newgrf-specs.tt-wiki.net/wiki/Callbacks#Engine_name_.28161.29&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sprites in GUI===&lt;br /&gt;
{{ottdp|1.2|no|ottdrev=r23080}} Since OpenTTD r23080 you can use variable &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt; to display different sprites in the GUI and on the map. Currently these cases are available:&lt;br /&gt;
{| |-&lt;br /&gt;
! getbits(extra_callback_info1, 0, 8) !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Vehicle is drawn in a viewport, i.e. on the map.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01..0x0F || reserved&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Vehicle is drawn in the depot GUI. &amp;lt;ref&amp;gt;OpenTTD also uses this value with the purchase-list chain (cargotype FF) to determine the gridsize in ship and aircraft depots.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || Vehicle is drawn in the vehicle details GUI. (This includes the refit GUI.)&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Vehicle is drawn in the vehicle list.&lt;br /&gt;
|-&lt;br /&gt;
| 0x13..0x1F || reserved for other future GUIs.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Vehicle is drawn in the purchase list. (This includes the autoreplace GUI.)&lt;br /&gt;
|-&lt;br /&gt;
| 0x21 || Vehicle is drawn in the exclusive preview GUI or in the advertisement news.&lt;br /&gt;
|-&lt;br /&gt;
| 0x22..0x2F || reserved for other future GUIs with non-purchased vehicles.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30..0xFF || reserved&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
The cases 0x20..0x2F are called using the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;purchase&amp;lt;/code&amp;gt;-callback, the other cases are called for the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;default&amp;lt;/code&amp;gt;- or cargo-specific callbacks. Exception is the the special depot-gridsize call, which uses the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;purchase&amp;lt;/code&amp;gt;-callback.&lt;br /&gt;
&lt;br /&gt;
===Composing vehicles from multiple sprites===&lt;br /&gt;
{{ottdp|1.7|no|ottdrev=r27668}} Since OpenTTD r27668 you can draw vehicles by drawing multiple sprites on top of each other.&lt;br /&gt;
* The sprites can use different recolouring.&lt;br /&gt;
* When using 32bpp sprites, the sprites can use the alpha channel to blend with the other sprites. In particular you can use this to alpha-blend company colours over other sprites.&lt;br /&gt;
&lt;br /&gt;
To enable this, you need to set &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;XXX_FLAG_SPRITE_STACK&amp;lt;/code&amp;gt; in the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;misc_flags&amp;lt;/code&amp;gt; property.&lt;br /&gt;
&lt;br /&gt;
When enabled, sprites are resolved multiple times while incrementing an iteration number, that can be read via&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 8, 8)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For OpenTTD 1.7 to 12.0, this is limited to at most 4 sprites per articulated part.&lt;br /&gt;
&lt;br /&gt;
Increased to 8 sprites per articulated part for OpenTTD 13.0 {{ottdp|13.0|no}}&lt;br /&gt;
&lt;br /&gt;
In addition you need to set register 100 as additional result:&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;STORE_TEMP(CB_FLAG_MORE_SPRITES | recolouring, 0x100)&amp;lt;/code&amp;gt; if there are more sprites to draw.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;STORE_TEMP(recolouring, 0x100)&amp;lt;/code&amp;gt; if there are no more sprites to draw.&lt;br /&gt;
&amp;quot;recolouring&amp;quot; can be:&lt;br /&gt;
* &amp;lt;code&amp;gt;PALETTE_USE_DEFAULT&amp;lt;/code&amp;gt; to use the default vehicle recolouring.&lt;br /&gt;
* &amp;lt;code&amp;gt;PALETTE_IDENTITY&amp;lt;/code&amp;gt; to use no recolouring&lt;br /&gt;
* Any other default or custom recolouring sprite.&lt;br /&gt;
&lt;br /&gt;
===Sound events===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| SOUND_EVENT_START&lt;br /&gt;
| Vehicle leaves station or depot, plane takes off&lt;br /&gt;
|-&lt;br /&gt;
| SOUND_EVENT_TUNNEL&lt;br /&gt;
| Vehicle enters tunnel&lt;br /&gt;
|-&lt;br /&gt;
| SOUND_EVENT_BREAKDOWN&lt;br /&gt;
| Vehicle breaks down (not for planes)&lt;br /&gt;
|-&lt;br /&gt;
| SOUND_EVENT_RUNNING&lt;br /&gt;
| Once per engine tick, but no more than once per vehicle motion&lt;br /&gt;
|-&lt;br /&gt;
| SOUND_EVENT_TOUCHDOWN&lt;br /&gt;
| Aircraft touches down&lt;br /&gt;
|-&lt;br /&gt;
| SOUND_EVENT_VISUAL_EFFECT&lt;br /&gt;
| Visual effect is generated (steam plume, diesel smoke, electric spark)&lt;br /&gt;
|-&lt;br /&gt;
| SOUND_EVENT_RUNNING_16&lt;br /&gt;
| Every 16 engine ticks if in motion&lt;br /&gt;
|-&lt;br /&gt;
| SOUND_EVENT_STOPPED&lt;br /&gt;
| Every 16 engine ticks if stopped&lt;br /&gt;
|-&lt;br /&gt;
| SOUND_EVENT_LOAD_UNLOAD&lt;br /&gt;
| Consist loads or unloads cargo&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Vehicle IDs ==&lt;br /&gt;
Picking an item ID requires keeping two cases in mind: OpenTTD with the engine pool enabled and OpenTTD with engine pool disabled / TTDPatch. The status of the engine pool may be checked with the global variable [[NML:General#General_variables|dynamic_engines]].&lt;br /&gt;
&lt;br /&gt;
Note that while vehicle ID affects the order in which vehicles appear in the purchase menu, this can be overridden using the [[NML:Sorting vehicles in the purchase list|sort block]].&lt;br /&gt;
&lt;br /&gt;
=== Engine pool enabled ===&lt;br /&gt;
With the engine pool enabled, each NewGRF has its own ID range, NewGRFs don&#039;t influence each other. IDs may freely be chosen between 0 and 65535. If the chosen ID belongs to an existing vehicle, this vehicle is overridden by your vehicle. If another NewGRF is already overriding that vehicle, a new vehicle will be allocated, but all the properties will be copied from the old vehicle. If you define an ID for which no original vehicle exists, a new (blank) vehicle is allocated.&lt;br /&gt;
&lt;br /&gt;
This behaviour can be modified using an [[NML:Overriding_vehicles_in_other_NewGRFs|engine_override]], this allows changing the properties of vehicles defined in other NewGRFs instead of allocating a new vehicle.&lt;br /&gt;
&lt;br /&gt;
=== TTDPatch / Engine pool disabled ===&lt;br /&gt;
Each new vehicle has to replace an existing vehicle. If multiple NewGRFs try to replace the same vehicle, the last NewGRF loaded &#039;wins&#039;. [[VehicleIDs|This page]] contains a list of valid vehicle IDs for each vehicle type, look in the &#039;NML ID&#039; column. Note that IDs are not bound to a specific sort of vehicle (e.g. monorail wagons) but to a feature (e.g. trains, road vehicles).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In general, you should take the following steps:&lt;br /&gt;
* If your NewGRF is intended as a complete replacement for the default vehicles, disable the relevant default vehicles using [[NML:Disable_items|disable_item]].&lt;br /&gt;
* Re-use IDs of existing vehicles as much as possible.&lt;br /&gt;
* If your NewGRF uses IDs outside of the normal range (for example, because you there are more vehicles than slots available), let your code check if dynamic_engies is enabled. If not, skip the vehicles outside the normal range (using an if-statement) and make sure that the remaining vehicles allow for reasonable gameplay. It is recommended to issue a warning to the user about this. Alternatively, it is also possible to disable your entire NewGRF. If you don&#039;t do this check and dynamic_engines is off, OpenTTD may disable your NewGRF with the somewhat cryptic message &#039;Attempt to use invalid ID&#039;, which will likely lead to bug reports about your NewGRF and/or your OpenTTD.&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Articulated_engine&amp;diff=4903</id>
		<title>Callback: Articulated engine</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Articulated_engine&amp;diff=4903"/>
		<updated>2024-12-03T10:42:26Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: Added note about ID numbers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Articulated engine (16) ==&lt;br /&gt;
&lt;br /&gt;
This allows building articulated engines or wagons, i.e. vehicles made from several individual vehicles.&lt;br /&gt;
If this callback is in use, additional vehicles will be added as long as the callback says so.&lt;br /&gt;
&lt;br /&gt;
{{grfTill|7}} For GRF version 7 and below the return value uses 8 bits.&lt;br /&gt;
Bit 0 to 6 define the ID of the vehicle to add. If 80 is added to the ID, the vehicle will be reversed. Returning FF means to finish the articulated vehicle, and not attach more parts. Therefore IDs used for articulated parts must be less than 7E (7F if not reversed).&lt;br /&gt;
&lt;br /&gt;
{{grfFrom|8}} For GRF version 8 and above the return value uses 15 bits.&lt;br /&gt;
Bit 0 to 13 define the ID of the vehicle to add. If 4000 is added to the ID, the vehicle will be reversed. Returning 7FFF means to finish the articulated vehicle, and not attach more parts. Therefore IDs used for articulated parts must be less than 3FFE (3FFF if not reversed).&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 the first byte of 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;
{{ottdp|0.6|2.5|ttdprev=beta 8}} If more than the first vehicle contains cargo, the callback must work in the buy menu as well. 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;
{{ottd| }} 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;
[[Category:Callbacks]]&lt;/div&gt;</summary>
		<author><name>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/Planes&amp;diff=4879</id>
		<title>Action0/Vehicles/Planes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/Planes&amp;diff=4879"/>
		<updated>2024-11-11T15:02:01Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: Obsolete prop 13&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 planes.&lt;br /&gt;
&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}}||Is helicopter? 2=no, 0=yes&lt;br /&gt;
|-&lt;br /&gt;
|0A||B||{{ottdp|0.6|2.0}}||Is large? 0=no, 1=yes (i.e. can&#039;t safely land on small airports)&lt;br /&gt;
|-&lt;br /&gt;
|0B||B||{{ottdp|0.6|2.0}}||Cost factor&lt;br /&gt;
|-&lt;br /&gt;
|0C||B||{{ottdp|0.6|2.0}}||Speed in units of 8 mph, that is: property = (speed in mph) / 8&lt;br /&gt;
|-&lt;br /&gt;
|0D||B||{{ottdp|0.6|2.0}}||Acceleration in units of 3/8 mph/tick, that is: property = (acceleration in mph/tick) * 8/3 &amp;lt;ref&amp;gt;{{ottd|&amp;amp;lt;1.3.1}} In OpenTTD before r25115 the units for acceleration were messed up. The unit used was about 1 mph/tick, so aircraft accelerated more than twice as fast. Also values bigger than 19 failed.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|0E||B||{{ottdp|0.6|2.0}}||Running cost factor&lt;br /&gt;
|-&lt;br /&gt;
|0F||W||{{ottdp|0.6|2.0}}||Primary cargo capacity (passenger or refitted cargo)&lt;br /&gt;
|-&lt;br /&gt;
|11||B||{{ottdp|0.6|2.0}}||Secondary cargo capacity (mail)&lt;br /&gt;
|-&lt;br /&gt;
|12||B||{{ottdp|0.6|2.0}}||Sound effect&lt;br /&gt;
|-&lt;br /&gt;
|13||D||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Bit mask of cargo types available for refitting, see column 2 (Bit Value) in [[CargoTypes]]. &amp;lt;b&amp;gt;Obsoleted by properties 1D/1E&amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Callback flags bit mask, see below&lt;br /&gt;
|-&lt;br /&gt;
|15||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;
|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 58}}||Miscellaneous vehicle flags&lt;br /&gt;
|-&lt;br /&gt;
|18||W||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Refittable cargo classes, see [[Action0Trains#Cargo classes 28 29|train prop. 28]]&lt;br /&gt;
|-&lt;br /&gt;
|19||W||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Non-refittable cargo classes, see [[Action0Trains#Cargo classes 28 29|train prop. 29]]&lt;br /&gt;
|-&lt;br /&gt;
|1A||D||{{ottdp|0.6|2.5|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||W||{{ottdp|1.2|no|ottdrev=r22713}}||Custom cargo ageing period&lt;br /&gt;
|-&lt;br /&gt;
|1D||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;
|1E||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;
|1F||W||{{ottdp|1.2|no|ottdrev=r23504}}||Aircraft range in tiles. Distance is euclidean, a value of 0 means range is unlimited&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;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Primary (0F) and secondary (11) cargo capacity ===&lt;br /&gt;
Aircraft can transport up to two cargo types.&lt;br /&gt;
The first (primary) cargo type can be changed when refitting the aircraft.&lt;br /&gt;
&lt;br /&gt;
The secondary cargo type is always mail, and is only present when the primary cargo type is part of the [[Action0/Cargos#CargoClasses_.2816.29|passenger cargo class]].&lt;br /&gt;
&lt;br /&gt;
See also the page about [[VehicleRefitting|vehicle refitting]].&lt;br /&gt;
&lt;br /&gt;
=== Sound effect (12) ===&lt;br /&gt;
&lt;br /&gt;
The following sound effects are used by planes (note, the setting is ignored for helicopters):&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!!Sound&lt;br /&gt;
|-&lt;br /&gt;
|06||Propeller sound 1&lt;br /&gt;
|-&lt;br /&gt;
|07||Jet sound 1&lt;br /&gt;
|-&lt;br /&gt;
|3B||Supersonic&lt;br /&gt;
|-&lt;br /&gt;
|3D||Jet sound 2&lt;br /&gt;
|-&lt;br /&gt;
|45||Propeller sound 2&lt;br /&gt;
|-&lt;br /&gt;
|46||Jet sound 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&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;
{{ottdp|1.11|no|ottdrev=6198a47}} Since OpenTTD g6198a47 this prop can be used to to set custom Action11 sound effects for helicopers. Default sound effects are ignored as before.&lt;br /&gt;
&lt;br /&gt;
=== Callbacks (14, 22) ===&lt;br /&gt;
For planes, the following [[callbacks]] have to be enabled by setting the corresponding bit in property 14 (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 (15) ===&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 15 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;
Note: This also applies to the rotor sprite, if custom rotor sprites are used.&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 1A|trains]] for details.&lt;br /&gt;
&lt;br /&gt;
=== Custom cargo ageing period (1C) ===&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>Peter1138</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/Ships&amp;diff=4878</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=4878"/>
		<updated>2024-11-11T15:01:22Z</updated>

		<summary type="html">&lt;p&gt;Peter1138: Obsolete prop 11&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;&amp;lt;br/&amp;gt;&lt;br /&gt;
{{ottd|15.0}} Since 15.0, a default cargo translation table corresponding to the climate is used if one is not provided.&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]]. &amp;lt;b&amp;gt;Obsoleted by properties 1E/1F&amp;lt;/b&amp;gt;&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>Peter1138</name></author>
	</entry>
</feed>