<?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=Zephyris</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=Zephyris"/>
	<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/wiki/Special:Contributions/Zephyris"/>
	<updated>2026-05-14T09:26:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action5&amp;diff=5214</id>
		<title>Action5</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action5&amp;diff=5214"/>
		<updated>2026-01-06T07:58:42Z</updated>

		<summary type="html">&lt;p&gt;Zephyris: /* Description */ Add bridge deck overlays to table&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;
|1B,9B||{{ottdp|15|no}}||Bridge deck overlay sprites, 4 sets of 6 for each of road, rail, monorail and maglev||24&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;
&lt;br /&gt;
==== 1A / 9A Overlay rocks sprites ====&lt;br /&gt;
Overlay sprites to draw snowy rocks. These are drawn on top of the snowy or partially snowy ground sprites when a rocky tile has snow on it.&lt;br /&gt;
&lt;br /&gt;
95 sprites are required. This corresponds to 5 sets of 19 sprites, one for each of the 19 slopes in the same order as terrain sprites in the base graphics. The 5 sets are 1 stage of plain rocks (currently unused) and 4 stages of snowy rocks (from 1/4 to 4/4). All 4 stages of snowy rocks are required - if you do not want to define sprites specific to all of these stages then simply re-use sprites across multiple stages.&lt;br /&gt;
&lt;br /&gt;
==== 1B / 9B Bridge deck overlay sprites ====&lt;br /&gt;
Sprites to overlay onto bridge decks when using vanilla infrastructure (road, rail, monorail and maglev) with NewGRF bridges.&lt;br /&gt;
&lt;br /&gt;
24 sprites are required. This corresponds to 4 sets of 6 sprites, in the order.&lt;br /&gt;
# rail&lt;br /&gt;
# monorail&lt;br /&gt;
# maglev&lt;br /&gt;
# road&lt;br /&gt;
&lt;br /&gt;
For the individual sprites, for rail infrastructure:&lt;br /&gt;
# SW-NE flat&lt;br /&gt;
# NW-SE flat&lt;br /&gt;
# Slope up from SW&lt;br /&gt;
# Slope up from SW&lt;br /&gt;
# Slope up from NW&lt;br /&gt;
# Slope up from NW&lt;br /&gt;
&lt;br /&gt;
For roads, the order of 1 and 2 are swapped.&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>Zephyris</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action5&amp;diff=5146</id>
		<title>Action5</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action5&amp;diff=5146"/>
		<updated>2026-01-03T18:11:04Z</updated>

		<summary type="html">&lt;p&gt;Zephyris: /* 1A / 9A Overlay rocks sprites */&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;
&lt;br /&gt;
==== 1A / 9A Overlay rocks sprites ====&lt;br /&gt;
Overlay sprites to draw snowy rocks. These are drawn on top of the snowy or partially snowy ground sprites when a rocky tile has snow on it.&lt;br /&gt;
&lt;br /&gt;
95 sprites are required. This corresponds to 5 sets of 19 sprites, one for each of the 19 slopes in the same order as terrain sprites in the base graphics. The 5 sets are 1 stage of plain rocks (currently unused) and 4 stages of snowy rocks (from 1/4 to 4/4). All 4 stages of snowy rocks are required - if you do not want to define sprites specific to all of these stages then simply re-use sprites across multiple stages.&lt;br /&gt;
&lt;br /&gt;
==== 1B / 9B Bridge deck overlay sprites ====&lt;br /&gt;
Sprites to overlay onto bridge decks when using vanilla infrastructure (road, rail, monorail and maglev) with NewGRF bridges.&lt;br /&gt;
&lt;br /&gt;
24 sprites are required. This corresponds to 4 sets of 6 sprites, in the order.&lt;br /&gt;
# rail&lt;br /&gt;
# monorail&lt;br /&gt;
# maglev&lt;br /&gt;
# road&lt;br /&gt;
&lt;br /&gt;
For the individual sprites, for rail infrastructure:&lt;br /&gt;
# SW-NE flat&lt;br /&gt;
# NW-SE flat&lt;br /&gt;
# Slope up from SW&lt;br /&gt;
# Slope up from SW&lt;br /&gt;
# Slope up from NW&lt;br /&gt;
# Slope up from NW&lt;br /&gt;
&lt;br /&gt;
For roads, the order of 1 and 2 are swapped.&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>Zephyris</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Replace_new_sprites&amp;diff=5145</id>
		<title>NML:Replace new sprites</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Replace_new_sprites&amp;diff=5145"/>
		<updated>2026-01-03T18:02:35Z</updated>

		<summary type="html">&lt;p&gt;Zephyris: Also list BRIDGE_DECKS&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavBlocksyntax}}&lt;br /&gt;
&lt;br /&gt;
Over time, several features have been added to OpenTTD that require new sprites. As these sprites are not present in the original base graphics and only found in the extra grf of each base set. They cannot be replaced using a normal &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;replace&amp;lt;/code&amp;gt; block. Instead, a &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;replacenew&amp;lt;/code&amp;gt; block has to be used. The semantics are like this:&lt;br /&gt;
&lt;br /&gt;
 replacenew [&amp;amp;lt;block-name&amp;amp;gt;](&amp;amp;lt;type&amp;amp;gt;, [&amp;amp;lt;image-file&amp;amp;gt;[, &amp;amp;lt;offset&amp;amp;gt;]]) {&lt;br /&gt;
 	[[NML:Realsprites|list of realsprites]]&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;&amp;amp;lt;block_name&amp;amp;gt;&amp;lt;/code&amp;gt; is optional but required, if you want to define [[NML:Alternative sprites|alternative sprites]] for the sprite block so that it can be referenced there.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;&amp;amp;lt;type&amp;amp;gt;&amp;lt;/code&amp;gt; parameter indicates the type of sprites that will be replaced. It should be an identifier from the first column of the following table.&lt;br /&gt;
&lt;br /&gt;
For information on what sprites are needed and in what order, it&#039;s generally best to look at the OpenGFX source [https://github.com/OpenTTD/OpenGFX/tree/master/sprites/extra], in the sprites/extra directory.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
! Type&lt;br /&gt;
! Number of sprites&lt;br /&gt;
|-&lt;br /&gt;
| SIGNALS &amp;lt;ref&amp;gt;In older versions this was named PRE_SIGNAL, PRE_SIGNAL_SEMAPHORE and PRE_SIGNAL_SEMAPHORE_PBS.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 240&lt;br /&gt;
|-&lt;br /&gt;
| CATENARY&lt;br /&gt;
| 48&lt;br /&gt;
|-&lt;br /&gt;
| FOUNDATIONS_SLOPES&lt;br /&gt;
| 74&lt;br /&gt;
|-&lt;br /&gt;
| FOUNDATIONS_SLOPES_HALFTILES&lt;br /&gt;
| 90&lt;br /&gt;
|- &lt;br /&gt;
&amp;lt;!-- This is not usable anyway, as NML 0.3 is grf v8&lt;br /&gt;
| TTDP_GUI_25&lt;br /&gt;
| 73&amp;lt;ref name=&amp;quot;no_offset&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| TTDP_GUI&lt;br /&gt;
| 93&amp;lt;ref name=&amp;quot;no_offset&amp;quot; /&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| CANALS&lt;br /&gt;
| 65&lt;br /&gt;
|-&lt;br /&gt;
| ONE_WAY_ROAD&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| COLOURMAP_2CC&lt;br /&gt;
| 256&lt;br /&gt;
|-&lt;br /&gt;
| TRAMWAY&lt;br /&gt;
| 113 {{ottdp|1.10|no}} {{nml|0.5}} 119&lt;br /&gt;
|-&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
| SNOWY_TEMPERATE_TREES&lt;br /&gt;
| 133&amp;lt;ref name=&amp;quot;no_offset&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| COAST_TILES&lt;br /&gt;
| 16&amp;lt;ref name=&amp;quot;no_offset&amp;quot;&amp;gt;This type does not support the use of an offset. Thus the exact amount of sprites must be supplied.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| COAST_TILES_BASEGFX&lt;br /&gt;
| 10&amp;lt;ref name=&amp;quot;no_offset&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| COAST_TILES_DIAGONAL&lt;br /&gt;
| 18&amp;lt;ref name=&amp;quot;no_offset&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
| NEW_SIGNALS&lt;br /&gt;
| any &amp;lt;ref name=&amp;quot;not_supported&amp;quot;&amp;gt;Any number of sprites is allowed here, however both OpenTTD and NML don&#039;t (yet) support the other features required to use these sprites.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| SLOPED_RAILS&lt;br /&gt;
| 12&lt;br /&gt;
|-&lt;br /&gt;
| AIRPORTS&lt;br /&gt;
| 15&lt;br /&gt;
|-&lt;br /&gt;
| ROAD_STOPS&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| AQUEDUCTS&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| AUTORAIL&lt;br /&gt;
| 55&lt;br /&gt;
|-&lt;br /&gt;
| FLAGS&lt;br /&gt;
| 36&lt;br /&gt;
|-&lt;br /&gt;
| OTTD_GUI&lt;br /&gt;
| 191&lt;br /&gt;
|-&lt;br /&gt;
| AIRPORT_PREVIEW&lt;br /&gt;
| 9&lt;br /&gt;
|-&lt;br /&gt;
| RAILTYPE_TUNNELS&lt;br /&gt;
| 16&lt;br /&gt;
|-&lt;br /&gt;
| OTTD_RECOLOUR&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| ROAD_WAYPOINTS&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| OVERLAY_ROCKS&lt;br /&gt;
| 95&lt;br /&gt;
|-&lt;br /&gt;
| BRIDGE_DECKS&lt;br /&gt;
| 24&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Parameter two &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;&amp;amp;lt;image-file&amp;amp;gt;&amp;lt;/code&amp;gt; (optional) is a literal (quoted) string that specifies the default file where the sprites are located. This may be overridden per-sprite.&lt;br /&gt;
&lt;br /&gt;
Parameter &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;&amp;amp;lt;offset&amp;amp;gt;&amp;lt;/code&amp;gt; is optional and has a default value of 0. Setting this value sets an offset into the block of sprites, so only a subset of the sprites (starting at &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;offset&amp;lt;/code&amp;gt;) will be replaced. An offset is not allowed in the case of the sprite types marked with &amp;lt;ref name=&amp;quot;no_offset&amp;quot; /&amp;gt;. Don&#039;t use offsets, if you want you NewGRF compatible with TTDPatch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zephyris</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Replace_new_sprites&amp;diff=4952</id>
		<title>NML:Replace new sprites</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Replace_new_sprites&amp;diff=4952"/>
		<updated>2025-03-04T21:06:02Z</updated>

		<summary type="html">&lt;p&gt;Zephyris: Add OVERLAY_ROCKS, added to support recent Action5 type 1A overlay rocks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavBlocksyntax}}&lt;br /&gt;
&lt;br /&gt;
Over time, several features have been added to OpenTTD that require new sprites. As these sprites are not present in the original base graphics and only found in the extra grf of each base set. They cannot be replaced using a normal &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;replace&amp;lt;/code&amp;gt; block. Instead, a &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;replacenew&amp;lt;/code&amp;gt; block has to be used. The semantics are like this:&lt;br /&gt;
&lt;br /&gt;
 replacenew [&amp;amp;lt;block-name&amp;amp;gt;](&amp;amp;lt;type&amp;amp;gt;, [&amp;amp;lt;image-file&amp;amp;gt;[, &amp;amp;lt;offset&amp;amp;gt;]]) {&lt;br /&gt;
 	[[NML:Realsprites|list of realsprites]]&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;&amp;amp;lt;block_name&amp;amp;gt;&amp;lt;/code&amp;gt; is optional but required, if you want to define [[NML:Alternative sprites|alternative sprites]] for the sprite block so that it can be referenced there.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;&amp;amp;lt;type&amp;amp;gt;&amp;lt;/code&amp;gt; parameter indicates the type of sprites that will be replaced. It should be an identifier from the first column of the following table.&lt;br /&gt;
&lt;br /&gt;
For information on what sprites are needed and in what order, it&#039;s generally best to look at the OpenGFX source [https://github.com/OpenTTD/OpenGFX/tree/master/sprites/extra], in the sprites/extra directory.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
! Type&lt;br /&gt;
! Number of sprites&lt;br /&gt;
|-&lt;br /&gt;
| SIGNALS &amp;lt;ref&amp;gt;In older versions this was named PRE_SIGNAL, PRE_SIGNAL_SEMAPHORE and PRE_SIGNAL_SEMAPHORE_PBS.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 240&lt;br /&gt;
|-&lt;br /&gt;
| CATENARY&lt;br /&gt;
| 48&lt;br /&gt;
|-&lt;br /&gt;
| FOUNDATIONS_SLOPES&lt;br /&gt;
| 74&lt;br /&gt;
|-&lt;br /&gt;
| FOUNDATIONS_SLOPES_HALFTILES&lt;br /&gt;
| 90&lt;br /&gt;
|- &lt;br /&gt;
&amp;lt;!-- This is not usable anyway, as NML 0.3 is grf v8&lt;br /&gt;
| TTDP_GUI_25&lt;br /&gt;
| 73&amp;lt;ref name=&amp;quot;no_offset&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| TTDP_GUI&lt;br /&gt;
| 93&amp;lt;ref name=&amp;quot;no_offset&amp;quot; /&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| CANALS&lt;br /&gt;
| 65&lt;br /&gt;
|-&lt;br /&gt;
| ONE_WAY_ROAD&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| COLOURMAP_2CC&lt;br /&gt;
| 256&lt;br /&gt;
|-&lt;br /&gt;
| TRAMWAY&lt;br /&gt;
| 113 {{ottdp|1.10|no}} {{nml|0.5}} 119&lt;br /&gt;
|-&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
| SNOWY_TEMPERATE_TREES&lt;br /&gt;
| 133&amp;lt;ref name=&amp;quot;no_offset&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| COAST_TILES&lt;br /&gt;
| 16&amp;lt;ref name=&amp;quot;no_offset&amp;quot;&amp;gt;This type does not support the use of an offset. Thus the exact amount of sprites must be supplied.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| COAST_TILES_BASEGFX&lt;br /&gt;
| 10&amp;lt;ref name=&amp;quot;no_offset&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| COAST_TILES_DIAGONAL&lt;br /&gt;
| 18&amp;lt;ref name=&amp;quot;no_offset&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
| NEW_SIGNALS&lt;br /&gt;
| any &amp;lt;ref name=&amp;quot;not_supported&amp;quot;&amp;gt;Any number of sprites is allowed here, however both OpenTTD and NML don&#039;t (yet) support the other features required to use these sprites.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| SLOPED_RAILS&lt;br /&gt;
| 12&lt;br /&gt;
|-&lt;br /&gt;
| AIRPORTS&lt;br /&gt;
| 15&lt;br /&gt;
|-&lt;br /&gt;
| ROAD_STOPS&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| AQUEDUCTS&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| AUTORAIL&lt;br /&gt;
| 55&lt;br /&gt;
|-&lt;br /&gt;
| FLAGS&lt;br /&gt;
| 36&lt;br /&gt;
|-&lt;br /&gt;
| OTTD_GUI&lt;br /&gt;
| 191&lt;br /&gt;
|-&lt;br /&gt;
| AIRPORT_PREVIEW&lt;br /&gt;
| 9&lt;br /&gt;
|-&lt;br /&gt;
| RAILTYPE_TUNNELS&lt;br /&gt;
| 16&lt;br /&gt;
|-&lt;br /&gt;
| OTTD_RECOLOUR&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| ROAD_WAYPOINTS&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| OVERLAY_ROCKS&lt;br /&gt;
| 95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Parameter two &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;&amp;amp;lt;image-file&amp;amp;gt;&amp;lt;/code&amp;gt; (optional) is a literal (quoted) string that specifies the default file where the sprites are located. This may be overridden per-sprite.&lt;br /&gt;
&lt;br /&gt;
Parameter &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;&amp;amp;lt;offset&amp;amp;gt;&amp;lt;/code&amp;gt; is optional and has a default value of 0. Setting this value sets an offset into the block of sprites, so only a subset of the sprites (starting at &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;offset&amp;lt;/code&amp;gt;) will be replaced. An offset is not allowed in the case of the sprite types marked with &amp;lt;ref name=&amp;quot;no_offset&amp;quot; /&amp;gt;. Don&#039;t use offsets, if you want you NewGRF compatible with TTDPatch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zephyris</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action5&amp;diff=4951</id>
		<title>Action5</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action5&amp;diff=4951"/>
		<updated>2025-03-04T20:58:33Z</updated>

		<summary type="html">&lt;p&gt;Zephyris: /* Description */ Add more detailed description of overlay rock sprites&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;
&lt;br /&gt;
==== 1A / 9A Overlay rocks sprites ====&lt;br /&gt;
Overlay sprites to draw snowy rocks. These are drawn on top of the snowy or partially snowy ground sprites when a rocky tile has snow on it.&lt;br /&gt;
&lt;br /&gt;
95 sprites are required. This corresponds to 5 sets of 19 sprites, one for each of the 19 slopes in the same order as terrain sprites in the base graphics. The 5 sets are 1 stage of plain rocks (currently unused) and 4 stages of snowy rocks (from 1/4 to 4/4). All 4 stages of snowy rocks are required - if you do not want to define sprites specific to all of these stages then simply re-use sprites across multiple stages.&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>Zephyris</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Spriteset&amp;diff=4917</id>
		<title>NML:Spriteset</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Spriteset&amp;diff=4917"/>
		<updated>2025-01-18T21:36:51Z</updated>

		<summary type="html">&lt;p&gt;Zephyris: More clearly point to realsprite page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavBlocksyntax}}&lt;br /&gt;
&lt;br /&gt;
A spriteset associates a name with a number piece of an existing image file and describes the offsets with respect to some origin the graphics will be painted within the game. Different features and situations require that a single set has a certain amount of actual sprites associated. E.g. a vehicle usually requires eight sprites in order to provide on view for each of the eight possible ingame orientations of a vehicle.&lt;br /&gt;
&lt;br /&gt;
 spriteset (&amp;amp;lt;spriteset-name&amp;amp;gt;[, &amp;amp;lt;image-file&amp;amp;gt;]) {&lt;br /&gt;
 	[[NML:Realsprites|list of realsprites]]&lt;br /&gt;
 	...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Parameter &amp;amp;lt;spriteset-name&amp;amp;gt; specifies the name of this spriteset. This name is used to refer to the spriteset later on.&lt;br /&gt;
&lt;br /&gt;
Parameter two &amp;amp;lt;image-file&amp;amp;gt; (optional) is a literal (quoted) string that specifies the default file where the sprites are located. This may be overridden per-sprite (see [[NML:Realsprites|Real sprites]]).&lt;br /&gt;
&lt;br /&gt;
Within the spriteset are a list of [[NML:Realsprites|Real sprites]], which defines the position and size of the sprite within the image file, its alignment offsets and any other real sprite properties.&lt;br /&gt;
&lt;br /&gt;
Each sprite may be prefixed with a label, see [[NML:Spritelayout#Sprite| sprite layouts]] for more info. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
 	some_label: [... real sprite ...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How to use a sprite set depends on the feature:&lt;br /&gt;
&lt;br /&gt;
* For canals, cargos, airports (not tiles!) and railtypes, you can refer to sprite sets directly from the graphics block, or use intermediate (random)switches to make a descision.&lt;br /&gt;
* For vehicles, the same as above is possible. However, to facilitate the common case of having multiple loading stages, you can also define [[NML:Spritegroup|sprite groups]], see below. These sprite groups are then used in place of a single sprite set.&lt;br /&gt;
* Stations, houses, industry tiles, objects and airport tiles all define the look of a tile. This often requires more than one sprite, for example a concrete ground sprite with a building sprite on top of it. To combine and arrange these sprites a [[NML:Spritelayout|sprite layout]] is used, directly referring to sprite sets is not possible here&lt;br /&gt;
* Features not mentioned here have no use for sprite sets, as such they are not supported by NML.&lt;/div&gt;</summary>
		<author><name>Zephyris</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Replace_new_sprites&amp;diff=4911</id>
		<title>NML:Replace new sprites</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Replace_new_sprites&amp;diff=4911"/>
		<updated>2025-01-01T22:17:59Z</updated>

		<summary type="html">&lt;p&gt;Zephyris: Add ROAD_WAYPOINTS, added to support recent Action5 type 19 road waypoints&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavBlocksyntax}}&lt;br /&gt;
&lt;br /&gt;
Over time, several features have been added to OpenTTD that require new sprites. As these sprites are not present in the original base graphics and only found in the extra grf of each base set. They cannot be replaced using a normal &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;replace&amp;lt;/code&amp;gt; block. Instead, a &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;replacenew&amp;lt;/code&amp;gt; block has to be used. The semantics are like this:&lt;br /&gt;
&lt;br /&gt;
 replacenew [&amp;amp;lt;block-name&amp;amp;gt;](&amp;amp;lt;type&amp;amp;gt;, [&amp;amp;lt;image-file&amp;amp;gt;[, &amp;amp;lt;offset&amp;amp;gt;]]) {&lt;br /&gt;
 	[[NML:Realsprites|list of realsprites]]&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;&amp;amp;lt;block_name&amp;amp;gt;&amp;lt;/code&amp;gt; is optional but required, if you want to define [[NML:Alternative sprites|alternative sprites]] for the sprite block so that it can be referenced there.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;&amp;amp;lt;type&amp;amp;gt;&amp;lt;/code&amp;gt; parameter indicates the type of sprites that will be replaced. It should be an identifier from the first column of the following table.&lt;br /&gt;
&lt;br /&gt;
For information on what sprites are needed and in what order, it&#039;s generally best to look at the OpenGFX source [https://github.com/OpenTTD/OpenGFX/tree/master/sprites/extra], in the sprites/extra directory.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
! Type&lt;br /&gt;
! Number of sprites&lt;br /&gt;
|-&lt;br /&gt;
| SIGNALS &amp;lt;ref&amp;gt;In older versions this was named PRE_SIGNAL, PRE_SIGNAL_SEMAPHORE and PRE_SIGNAL_SEMAPHORE_PBS.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 240&lt;br /&gt;
|-&lt;br /&gt;
| CATENARY&lt;br /&gt;
| 48&lt;br /&gt;
|-&lt;br /&gt;
| FOUNDATIONS_SLOPES&lt;br /&gt;
| 74&lt;br /&gt;
|-&lt;br /&gt;
| FOUNDATIONS_SLOPES_HALFTILES&lt;br /&gt;
| 90&lt;br /&gt;
|- &lt;br /&gt;
&amp;lt;!-- This is not usable anyway, as NML 0.3 is grf v8&lt;br /&gt;
| TTDP_GUI_25&lt;br /&gt;
| 73&amp;lt;ref name=&amp;quot;no_offset&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| TTDP_GUI&lt;br /&gt;
| 93&amp;lt;ref name=&amp;quot;no_offset&amp;quot; /&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| CANALS&lt;br /&gt;
| 65&lt;br /&gt;
|-&lt;br /&gt;
| ONE_WAY_ROAD&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| COLOURMAP_2CC&lt;br /&gt;
| 256&lt;br /&gt;
|-&lt;br /&gt;
| TRAMWAY&lt;br /&gt;
| 113 {{ottdp|1.10|no}} {{nml|0.5}} 119&lt;br /&gt;
|-&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
| SNOWY_TEMPERATE_TREES&lt;br /&gt;
| 133&amp;lt;ref name=&amp;quot;no_offset&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| COAST_TILES&lt;br /&gt;
| 16&amp;lt;ref name=&amp;quot;no_offset&amp;quot;&amp;gt;This type does not support the use of an offset. Thus the exact amount of sprites must be supplied.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| COAST_TILES_BASEGFX&lt;br /&gt;
| 10&amp;lt;ref name=&amp;quot;no_offset&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| COAST_TILES_DIAGONAL&lt;br /&gt;
| 18&amp;lt;ref name=&amp;quot;no_offset&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
| NEW_SIGNALS&lt;br /&gt;
| any &amp;lt;ref name=&amp;quot;not_supported&amp;quot;&amp;gt;Any number of sprites is allowed here, however both OpenTTD and NML don&#039;t (yet) support the other features required to use these sprites.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| SLOPED_RAILS&lt;br /&gt;
| 12&lt;br /&gt;
|-&lt;br /&gt;
| AIRPORTS&lt;br /&gt;
| 15&lt;br /&gt;
|-&lt;br /&gt;
| ROAD_STOPS&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| AQUEDUCTS&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| AUTORAIL&lt;br /&gt;
| 55&lt;br /&gt;
|-&lt;br /&gt;
| FLAGS&lt;br /&gt;
| 36&lt;br /&gt;
|-&lt;br /&gt;
| OTTD_GUI&lt;br /&gt;
| 191&lt;br /&gt;
|-&lt;br /&gt;
| AIRPORT_PREVIEW&lt;br /&gt;
| 9&lt;br /&gt;
|-&lt;br /&gt;
| RAILTYPE_TUNNELS&lt;br /&gt;
| 16&lt;br /&gt;
|-&lt;br /&gt;
| OTTD_RECOLOUR&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| ROAD_WAYPOINTS&lt;br /&gt;
| 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Parameter two &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;&amp;amp;lt;image-file&amp;amp;gt;&amp;lt;/code&amp;gt; (optional) is a literal (quoted) string that specifies the default file where the sprites are located. This may be overridden per-sprite.&lt;br /&gt;
&lt;br /&gt;
Parameter &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;&amp;amp;lt;offset&amp;amp;gt;&amp;lt;/code&amp;gt; is optional and has a default value of 0. Setting this value sets an offset into the block of sprites, so only a subset of the sprites (starting at &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;offset&amp;lt;/code&amp;gt;) will be replaced. An offset is not allowed in the case of the sprite types marked with &amp;lt;ref name=&amp;quot;no_offset&amp;quot; /&amp;gt;. Don&#039;t use offsets, if you want you NewGRF compatible with TTDPatch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zephyris</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Vehicles&amp;diff=4708</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=4708"/>
		<updated>2024-01-30T09:02:52Z</updated>

		<summary type="html">&lt;p&gt;Zephyris: /* Ship properties */&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) * 10 * weight (in tons), with 10 being an approximation of the acceleration of gravity (9.81 m/s). A good value for rail tracks is 0.3.&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)&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;
| 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;
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;
| 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;
&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>Zephyris</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Canals&amp;diff=3774</id>
		<title>NML:Canals</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Canals&amp;diff=3774"/>
		<updated>2018-01-11T20:41:36Z</updated>

		<summary type="html">&lt;p&gt;Zephyris: /* Canal properties */ FEAT_CANAL should be FEAT_CANALS&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
== Canal ids ==&lt;br /&gt;
The used item ID defines what sprites this item provides. Item IDs should be picked from the following table (WF_XXX).&lt;br /&gt;
&lt;br /&gt;
The &#039;normal sprites&#039; column contains the amount of sprites that should be provided for this feature. If the appropriate bit in the graphics_flags-property (see below) the amount of sprites stated in the &#039;alternative sprites&#039; column must be provided instead.&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
!name&lt;br /&gt;
!use&lt;br /&gt;
!normal sprites&lt;br /&gt;
!alternative sprites&lt;br /&gt;
|-&lt;br /&gt;
|WF_WATERCLIFFS&lt;br /&gt;
|{{ottdp|1.1|2.6|ottdrev=r20352|ttdprev=r1573}} water for canals / locks&lt;br /&gt;
|4 slope sprites&lt;br /&gt;
|1 flat ground sprite followed by 4 slope sprites&lt;br /&gt;
|-&lt;br /&gt;
|WF_LOCKS&lt;br /&gt;
|{{ottdp|0.6|2.5}} Locks&lt;br /&gt;
|24&lt;br /&gt;
|undefined&lt;br /&gt;
|-&lt;br /&gt;
|WF_DIKES&lt;br /&gt;
|{{ottdp|0.6|2.5}} Dikes&lt;br /&gt;
|12&lt;br /&gt;
|undefined&lt;br /&gt;
|-&lt;br /&gt;
|WF_CANAL_GUI&lt;br /&gt;
|{{ottdp|no|2.5}} Canal GUI&lt;br /&gt;
|1&lt;br /&gt;
|undefined&lt;br /&gt;
|-&lt;br /&gt;
|WF_FLAT_DOCKS&lt;br /&gt;
|{{ottdp|no|2.5}} Flat docks&lt;br /&gt;
|4&lt;br /&gt;
|undefined&lt;br /&gt;
|-&lt;br /&gt;
|WF_RIVER_SLOPE&lt;br /&gt;
|{{ottdp|1.1|2.6|ottdrev=r20352|ttdprev=r1573}} River water&lt;br /&gt;
|4&lt;br /&gt;
|1 flat ground sprite followed by 4 slope sprites&lt;br /&gt;
|-&lt;br /&gt;
|WF_RIVERBANKS&lt;br /&gt;
|{{ottdp|0.6|2.6}} Riverbanks&lt;br /&gt;
|12*5 (Last 4 for slopes)&lt;br /&gt;
|undefined&lt;br /&gt;
|-&lt;br /&gt;
|WF_RIVER_GUI&lt;br /&gt;
|{{ottdp|no|2.6}} River GUI&lt;br /&gt;
|2&lt;br /&gt;
|undefined&lt;br /&gt;
|-&lt;br /&gt;
|WF_BUOY&lt;br /&gt;
|{{ottdp|1.2|no|ottdrev=r22973}} Buoy&lt;br /&gt;
|1&lt;br /&gt;
|undefined&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Canal properties==&lt;br /&gt;
&lt;br /&gt;
  item (FEAT_CANALS, item_name, id) { ... }&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| graphic_flags&lt;br /&gt;
| bitmask(flags)&lt;br /&gt;
| There is currently only one possible bit: &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;WATERFEATURE_ALTERNATIVE_SPRITES&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Canal variables ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
|tile_height&lt;br /&gt;
|0 .. max_tile_height&lt;br /&gt;
| {{nml|0.2}} Tile height in pixels (=tiles * 8).&lt;br /&gt;
{{nml|0.3}} Tile height in tiles.&lt;br /&gt;
|-&lt;br /&gt;
|terrain_type&lt;br /&gt;
| TILETYPE_XXX&lt;br /&gt;
| &lt;br /&gt;
;TILETYPE_NORMAL&lt;br /&gt;
:Normal grass in all climates&lt;br /&gt;
;TILETYPE_DESERT&lt;br /&gt;
;TILETYPE_RAIN_FOREST&lt;br /&gt;
:In tropical climate only: some tiles in the mountains, distant from desert and sea&lt;br /&gt;
;TILETYPE_SNOW&lt;br /&gt;
|-&lt;br /&gt;
|dike_map&lt;br /&gt;
|bitmask(CANAL_DIRECTION_XXX, ...)&lt;br /&gt;
|{{ottdp|1.4|no|ottdrev=r25229}} bitmask of the directions where there is a dike: CANAL_DIRECTION_XXX where XXX:&lt;br /&gt;
; along the grid:&lt;br /&gt;
:NORTHEAST = 0&lt;br /&gt;
:SOUTHEAST = 1&lt;br /&gt;
:SOUTHWEST = 2&lt;br /&gt;
:NORTHWEST = 3&lt;br /&gt;
; vertical and horizontal:&lt;br /&gt;
:EAST      = 4&lt;br /&gt;
:SOUTH     = 5&lt;br /&gt;
:WEST      = 6&lt;br /&gt;
:NORTH     = 7&lt;br /&gt;
|-&lt;br /&gt;
|random_bits&lt;br /&gt;
|0 .. 255&lt;br /&gt;
|random bits of that tile&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Canal callbacks ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&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;
|spriteset&lt;br /&gt;
|graphics for the canal id&lt;br /&gt;
|-&lt;br /&gt;
|sprite_offset&lt;br /&gt;
|&lt;br /&gt;
|numeric offset into the spriteset for the canal id&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Zephyris</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=RealSprites&amp;diff=3272</id>
		<title>RealSprites</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=RealSprites&amp;diff=3272"/>
		<updated>2012-08-15T09:52:59Z</updated>

		<summary type="html">&lt;p&gt;Zephyris: /* Type */ 8ppp -&amp;gt; 8bpp&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Real sprites are the graphical part of .grf files; they are what the user actually sees in-game.&lt;br /&gt;
&lt;br /&gt;
There are two distinctly different ways to write real sprites, depending on the info version you use. TTDPatch and OpenTTD until version 1.2 only understand [[Version_numbers#GRF_container_version|GRF container version 1]] resp. [[Version_numbers#NFO_version|info version 7]].&lt;br /&gt;
&lt;br /&gt;
== Info version 7 ==&lt;br /&gt;
Available in {{ottdp||}}&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
A real sprite has the following format:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Sprite-number&amp;gt; &amp;lt;filename&amp;gt; &amp;lt;xpos&amp;gt; &amp;lt;ypos&amp;gt; &amp;lt;compression&amp;gt; &amp;lt;ysize&amp;gt; &amp;lt;xsize&amp;gt; &amp;lt;xrel&amp;gt; &amp;lt;yrel&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;filename&amp;gt;||string&amp;lt;ref&amp;gt;Unlike strings in pseudo-sprites, this string should not have a terminating &amp;quot;00&amp;quot; and should not be placed in quotes.&amp;lt;/ref&amp;gt;||The name of the .pcx or .png file in which the sprite will be found&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;xpos&amp;gt;||dec||The x position of the upper-left corner of the sprite in the file&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;ypos&amp;gt;||dec||The y position of the upper-left corner of the sprite in the file&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;compression&amp;gt;||B||The &amp;quot;compression&amp;quot;; see below&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;ysize&amp;gt;||dec||The y size of the sprite&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;xsize&amp;gt;||dec||The x size of the sprite&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;xrel&amp;gt;||dec||The x position of the upper-left corner of the sprite, relative to the &amp;quot;center&amp;quot; (usually negative)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;yrel&amp;gt;||dec||The y position of the upper-left corner of the sprite, relative to the &amp;quot;center&amp;quot; (usually negative)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
This specifies the name and path of the .pcx file. The path may be specified one of two ways:&lt;br /&gt;
# An absolute path. (eg C:\GRF\sprites\filename.pcx)&lt;br /&gt;
# A relative path; these are specified relative to the location of the .grf file. (eg sprites\filename.pcx)&lt;br /&gt;
&lt;br /&gt;
For most purposes, relative paths are preferred, since .nfo files with relative paths are more portable than .nfo files with absolute paths.&lt;br /&gt;
&lt;br /&gt;
==== xpos, ypos, ysize, and xsize ====&lt;br /&gt;
&lt;br /&gt;
These are pretty easy to set, as long as you remember that the order is X, Y, Y, X, and not X, Y, X, Y.&lt;br /&gt;
&lt;br /&gt;
Also, no sprite may contain zero pixels; ysize and xsize must both be at least 1.&lt;br /&gt;
&lt;br /&gt;
Note: there is a bug in grfcodec 0.9.7 and earlier that prevents them from properly encoding a sprite with a smaller ypos value than any earlier sprite. The best way to circumvent this bug is to upgrade to the newest version.&lt;br /&gt;
&lt;br /&gt;
==== compression ====&lt;br /&gt;
&lt;br /&gt;
Unlike the other numbers, the compression is a hexadecimal bit-field. Currently, the following bits are supported:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!bit!!value!!meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||Color index 0 is transparent (should &#039;&#039;&#039;always&#039;&#039;&#039; be set; ignored if bit 3 is set)&lt;br /&gt;
|-&lt;br /&gt;
|1||2||Store compressed sprite in memory&lt;br /&gt;
|-&lt;br /&gt;
|3||8||Sprite is in chunked data format (aka &amp;quot;tile compression&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
|6||40||Sprite should not be cropped. (obeyed by GRFCodec r1604 and later)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The only valid values for compression are 00, 01, 02, 03 and 09 (except the special flag 0x40 that is only important for grfcodec).&lt;br /&gt;
Values 00 - 03 are handled the same by OpenTTD. If you don&#039;t care about the difference for TTDPatch either use 01 or 09.&lt;br /&gt;
&lt;br /&gt;
The best value depends on which and how many pixels are transparent: If the non-transparent pixels are arranged to bigger blocks along the pixellines (like for ground tiles or diagonal views of vehicles) use 09 (chunked data format). If there are no transparent pixels or transparent pixels and non-transparent alternate a lot along the pixellines use 01.&lt;br /&gt;
&lt;br /&gt;
If you are interested in improving drawing for TTDPatch (does not make a difference for OpenTTD): You can use 00 resp. 02 if there are NO transparent pixels at all. 00 is slightly quicker than 01. 02 is a valid value but does not make a lot of sense.&lt;br /&gt;
&lt;br /&gt;
You can use 02 resp. 03 to store the sprite compressed in memory. Drawing will be slower, but the sprite needs less memory while it is not used. Useful for big sprites which are hardly used (like the newpaper &amp;quot;tycoon of the century&amp;quot; at game end)&lt;br /&gt;
&lt;br /&gt;
It is generally a bad idea to use any other value, as that may cause problems. FF is an especially bad idea.&lt;br /&gt;
&lt;br /&gt;
==== xrel and yrel ====&lt;br /&gt;
&lt;br /&gt;
These two numbers will probably become the bane of your existence.&lt;br /&gt;
&lt;br /&gt;
TTD stores a single point for every sprite. xrel and yrel specify how far right and down (respectively) to go from the TTD point to the upper-left hand corner of the sprite.&lt;br /&gt;
&lt;br /&gt;
Halving xsize and ysize and negating the results produces a decent starting point for these values, and further adjustments may be done manually, e.g within OpenTTD by activating the [http://wiki.openttd.org/NewGRF_Debugging NewGRF developer tools] and using the sprite aligner or in TTDPatch 2.0.1 alpha 69 and later with the [http://www.tt-wiki.net/wiki/GRFAuthorHelperWindow GRFAuthorHelperWindow].&lt;br /&gt;
&lt;br /&gt;
==== Ranges ====&lt;br /&gt;
&lt;br /&gt;
The ranges for the four numbers after the compression are as follows:&lt;br /&gt;
&lt;br /&gt;
ysize: 1..255&lt;br /&gt;
&lt;br /&gt;
xsize: 1..65535&lt;br /&gt;
&lt;br /&gt;
xrel: -32768..32767&lt;br /&gt;
&lt;br /&gt;
yrel: -32768..32767&lt;br /&gt;
&lt;br /&gt;
ysize*xsize may not exceed 65535.&lt;br /&gt;
&lt;br /&gt;
==== Other notes ====&lt;br /&gt;
&lt;br /&gt;
It is a common practice, in action 1 blocks, to use the pseudosprite &amp;quot;-1 * 1 00&amp;quot; to take the place of a real sprite that will never be used. The most common use is for vehicle sets that will only be used in the purchase window. This reduces the size of the .grf file when compared to replacing them with one-pixel sprites (but not when compared to splitting the action 1 and making the second one define only one sprite), but does not save real-sprite slots. If TTD ever attempts to draw one of these sprites, it will, at best, crash.&lt;br /&gt;
&lt;br /&gt;
== Info version 32 ==&lt;br /&gt;
Available in {{ottdp|1.2|ottdrev=r23890}}&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Sprite-number&amp;gt; &amp;lt;filename&amp;gt; 8bpp &amp;lt;xpos&amp;gt; &amp;lt;ypos&amp;gt; &amp;lt;xsize&amp;gt; &amp;lt;ysize&amp;gt; &amp;lt;xrel&amp;gt; &amp;lt;yrel&amp;gt; normal &amp;lt;flags&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;Sprite-number&amp;gt; &amp;lt;filename&amp;gt; 8bpp  &amp;lt;xpos&amp;gt; &amp;lt;ypos&amp;gt; &amp;lt;xsize&amp;gt; &amp;lt;ysize&amp;gt; &amp;lt;xrel&amp;gt; &amp;lt;yrel&amp;gt; normal      &amp;lt;flags&amp;gt;&lt;br /&gt;
  |               &amp;lt;filename&amp;gt; 8bpp  &amp;lt;xpos&amp;gt; &amp;lt;ypos&amp;gt; &amp;lt;xsize&amp;gt; &amp;lt;ysize&amp;gt; &amp;lt;xrel&amp;gt; &amp;lt;yrel&amp;gt; &amp;lt;zoomlevel&amp;gt; &amp;lt;flags&amp;gt;&lt;br /&gt;
  |               &amp;lt;filename&amp;gt; 32bpp &amp;lt;xpos&amp;gt; &amp;lt;ypos&amp;gt; &amp;lt;xsize&amp;gt; &amp;lt;ysize&amp;gt; &amp;lt;xrel&amp;gt; &amp;lt;yrel&amp;gt; &amp;lt;zoomlevel&amp;gt; &amp;lt;flags&amp;gt;&lt;br /&gt;
  |               &amp;lt;filename&amp;gt; mask  &amp;lt;xpos&amp;gt; &amp;lt;pos&amp;gt;&lt;br /&gt;
                  ...&lt;br /&gt;
==== Sprite-number ====&lt;br /&gt;
This is a sequential sprite number, maximum value is 2**32&lt;br /&gt;
==== Filename ====&lt;br /&gt;
The graphics filename which the real sprite is found in&lt;br /&gt;
==== Type ====&lt;br /&gt;
Sprite type. The type of the 1st sprite must always be 8bpp and of &#039;normal&#039; zoom level (see below). Subsequent lines for alternative sprites can be of any type and zoom level. Available types are:&lt;br /&gt;
{|&lt;br /&gt;
!Name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|8bpp || Sprite with 8 bit colour depth in one of the accepted palettes&lt;br /&gt;
|-&lt;br /&gt;
|32bpp|| True colour sprite with 32 bit colour depth&lt;br /&gt;
|-&lt;br /&gt;
|mask || If used, this type must follow a &#039;32bpp&#039; entry immediately. Itself it is a 8bpp paletted sprite of the exact same size of the preceeding 32bpp sprite. It defines the colour translation for this preceeding 32bpp sprite: Palette entry 0 means to draw the 32bpp as usual, the other colours define a replacement colour where then the preceeding 32bpp sprite is interpreted as giving intensity and alpha channel information.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== xpos, ypos ====&lt;br /&gt;
The coordinates of the upper left corner of the sprite within the graphics file.&lt;br /&gt;
==== xsize, ysize ====&lt;br /&gt;
The width and height of the sprite within the graphics file. The valid value range is from 1 to 65535 for both.&lt;br /&gt;
==== xrel, yrel ====&lt;br /&gt;
The position of the upper-left corner of the sprite, relative to the &amp;quot;center&amp;quot; (usually negative). The valid value range is from -32768 to 32767.&lt;br /&gt;
==== zoom level ====&lt;br /&gt;
OpenTTD supports a number of zoom levels. For &#039;normal&#039; zoom level a tile has a width of 64 pixels and a height of 31 (see coordinates). Available zoom levels are:&lt;br /&gt;
{|&lt;br /&gt;
!name  !!zoom level!!Tile size!!Description&lt;br /&gt;
|-&lt;br /&gt;
|normal|| (normal) || 64 x 31 || The standard&lt;br /&gt;
|-&lt;br /&gt;
|zo8   || 8x out   || 8 x 3   || 3rd zoomed-out state (maximum zoomed-out)&lt;br /&gt;
|-&lt;br /&gt;
|zo4   || 4x out   || 16 x 7  || 2nd zoomed-out state&lt;br /&gt;
|-&lt;br /&gt;
|zo2   || 2x out   || 32 x 15 || 1st zoomed-out state&lt;br /&gt;
|-&lt;br /&gt;
|zi2   || 2x in    || 128 x 62 || 1st zoomed-in state&lt;br /&gt;
|-&lt;br /&gt;
|zi4   || 4x in    || 256 x 124 || 2nd zoomed-in state (fullly zoomed-in)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flags ====&lt;br /&gt;
Flags allow to describe certain special treatment of the sprites:&lt;br /&gt;
{|&lt;br /&gt;
!name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|nocrop  || Disallow grfcodec to crop transparent pixels off the sprite to the minimum size possible without loosing information. Use this when the actual sprite size matters (i.e. when child sprites rely on it).&lt;br /&gt;
|-&lt;br /&gt;
|chunked || Store the sprite compressed. It saves space for &#039;diagonal&#039; sprites with lots of transparency like diagonal views of vehicles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transparency and glass effect ==&lt;br /&gt;
&lt;br /&gt;
Transparency and glass effects can be achieved by means of [[RecolorSprites]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
The best way to see real sprites is to decode one of TTD&#039;s standard .grf files. With very few exceptions, all sprites in those files are real sprites; the few that are not are RecolorSprites.&lt;br /&gt;
&lt;br /&gt;
Example real sprites can also be found at the bottom of [[Action1]] or [[ActionA]].&lt;br /&gt;
&lt;br /&gt;
Those sprites use absolute paths. Removing the C:\TTD\ part of each filename would work just as well, assuming you want the .grf file to appear in C:\TTD.&lt;br /&gt;
&lt;br /&gt;
Info version 32:&lt;br /&gt;
    3 sprites/58_8.png 8bpp 0 0 128 64 -63 -23 normal nocrop&lt;br /&gt;
    | sprites/58_x2_8.png 8bpp 0 0 256 128 -127 -46 zi2 chunked nocrop // comment&lt;br /&gt;
    | sprites/58_x2_32.png 32bpp 0 0 256 128 -127 -46 zi2 chunked nocrop &lt;br /&gt;
    | sprites/58_x2_32m.png mask 0 0&lt;/div&gt;</summary>
		<author><name>Zephyris</name></author>
	</entry>
</feed>