<?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=Lakie</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=Lakie"/>
	<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/wiki/Special:Contributions/Lakie"/>
	<updated>2026-05-07T04:18:19Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Objects&amp;diff=1072</id>
		<title>Action0/Objects</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Objects&amp;diff=1072"/>
		<updated>2011-06-13T22:28:27Z</updated>

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

		<summary type="html">&lt;p&gt;Lakie: Attempt to fix the majority of the formatting and links. Not sure about the use of pre blocks however.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;Defining an action 2 for houses, industry tiles and object&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 2 for houses and industry tiles=&lt;br /&gt;
&lt;br /&gt;
Defining an action 2 for houses, industry tiles and objects&lt;br /&gt;
&lt;br /&gt;
For houses, industry, and object tiles, the action 2 data defines a spritelayout for a tile. There are two formats available:&lt;br /&gt;
*Basic format for a single groundsprite and a single building sprite.&lt;br /&gt;
*Extended format for combining multiple sprites.&lt;br /&gt;
&lt;br /&gt;
==Basic format for tiles with a single building sprite==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 02 07/09/0F &amp;amp;lt;set-id&amp;amp;gt; 00 &amp;amp;lt;groundsprite&amp;amp;gt; &amp;amp;lt;buildingsprite&amp;amp;gt; &amp;amp;lt;xoffset&amp;amp;gt; &amp;amp;lt;yoffset&amp;amp;gt; &amp;amp;lt;xextent&amp;amp;gt; &amp;amp;lt;yextent&amp;amp;gt; &amp;amp;lt;zextent&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Element!![[GRFActionsDetailed|Size]]!!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;Sprite-number&amp;amp;gt;||dec||A sequential sprite number&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;length&amp;amp;gt;||dec||The total number of bytes used in this action&lt;br /&gt;
|-&lt;br /&gt;
|02||B||Defines action 02&lt;br /&gt;
|-&lt;br /&gt;
|07/09/0F||B||feature 7=town buildings, 9=industry tiles or 0F = objects&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;set-id&amp;amp;gt;||B||ID for this definition&lt;br /&gt;
|-&lt;br /&gt;
|00||B||Literal 0 (to distinguish this definition from random/variational lists)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;groundsprite&amp;amp;gt;||D||Ground sprite for the building (see format below)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;buildingsprite&amp;amp;gt;||D||The sprite of the building (see format below), can be zero to indicate that no building sprite should be displayed (useful for early building stages)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;xofs&amp;amp;gt;||B||x-offset from northern tile corner (as a signed byte)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;yofs&amp;amp;gt;||B||y-offset from northern tile corner (as a signed byte)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;xextent&amp;amp;gt;||B||size of sprite in x direction&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;yextent&amp;amp;gt;||B||size of sprite in y direction&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;zextent&amp;amp;gt;||B||size of sprite in z direction&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the above, xofs, yofs, xextent, yextent and zextent define the 3D bounding box of the building sprite not including the ground sprite. The z-offset is always zero for buildings (TTD doesn&#039;t support floating buildings). Please note that xofs/xextent and yofs/yextent pairs that place the bounding box off the tile are not recommended.&lt;br /&gt;
&lt;br /&gt;
==Extended format using multiple combined sprites==&lt;br /&gt;
&lt;br /&gt;
Since 2.0.1 alpha 55 vcs 3, houses, industry (and object) tiles support an extended syntax as well, which looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 02 07/09/0F &amp;amp;lt;set-id&amp;amp;gt; &amp;amp;lt;num-sprites&amp;amp;gt; &amp;amp;lt;groundsprite&amp;amp;gt; [&amp;amp;lt;buildingsprite&amp;amp;gt; (&amp;amp;lt;xoffset&amp;amp;gt; &amp;amp;lt;yoffset&amp;amp;gt; &amp;amp;lt;zoffset&amp;amp;gt; &amp;amp;lt;xextent&amp;amp;gt; &amp;amp;lt;yextent&amp;amp;gt; &amp;amp;lt;zextent&amp;amp;gt;) | (&amp;amp;lt;xpixeloffset&amp;amp;gt; &amp;amp;lt;ypixeloffset&amp;amp;gt; 80)] ...&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Element!![[GRFActionsDetailed|Size]]!!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;Sprite-number&amp;amp;gt;||dec||A sequential sprite number&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;length&amp;amp;gt;||dec||The total number of bytes used in this action&lt;br /&gt;
|-&lt;br /&gt;
|02||B||Defines action 02&lt;br /&gt;
|-&lt;br /&gt;
|07/09/0F||B||feature 7=town buildings, 9=industry tiles or 0F = objects&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;set-id&amp;amp;gt;||B||ID for this definition&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;num-sprites&amp;amp;gt;||B||Number of following building sprites (the groundsprite mustn&#039;t be counted). Allowed range: 1 to 63 (0x01 to 0x3F). Adding 0x40 makes the layout an Advanced Spritelayout with register modifiers (since OpenTTD r22518; to be documented).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;groundsprite&amp;amp;gt;||D||Ground sprite for the building (see format below)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;buildingsprite&amp;amp;gt;||D||The sprite to be drawn. Unlike the basic format, zero isn&#039;t allowed here.&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;| -- for sprites defining a new bounding box --&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;xofs&amp;amp;gt;||B||x-offset from northern tile corner (as a signed byte)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;yofs&amp;amp;gt;||B||y-offset from northern tile corner (as a signed byte)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;zofs&amp;amp;gt;||B||z-offset from the ground&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;xextent&amp;amp;gt;||B||size of sprite in x direction&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;yextent&amp;amp;gt;||B||size of sprite in y direction&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;zextent&amp;amp;gt;||B||size of sprite in z direction&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;| -- for sprites sharing their bounding box with the previous sprite --&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;xpixeloffset&amp;amp;gt;||B||x offset from the top left corner of the previous sprite&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;lt;ypixeloffset&amp;amp;gt;||B||y offset from the top left corner of the previous sprite&lt;br /&gt;
|-&lt;br /&gt;
|80||B||a literal 80h byte to distinguish from new-bounding-box definitions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: restrictions for sprites sharing their bounding box are the same as explained for [[Action0Stations#Sprite_layout_(09)| station tiles.]]&lt;br /&gt;
&lt;br /&gt;
Since OpenTTD r18959 you can draw multiple ground sprites for a tile, which is useful if you want to use the usual grass/water/concrete groundtile, but still need to add features to it without using a new bounding box. To do so use the syntax of sprites sharing the previous bounding box, but use it before the first bounding box definition. xpixeloffset and ypixeloffset refer to the usual spot of groundtiles.&lt;br /&gt;
&lt;br /&gt;
The same feature is also partially supported in TTDPatch since 2.6 r2313: TTDPatch ignores the xpixeloffset and ypixeloffset fields and always uses (0,0) for the offset. If you are developing a GRF that needs to be compatible with both OpenTTD and TTDPatch, you should always keep xpixeloffset and ypixeloffset zero to get the same effect in both games.&lt;br /&gt;
&lt;br /&gt;
==Sprite definition==&lt;br /&gt;
&lt;br /&gt;
The ground and building sprite fields have the following format:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Bits!!Content&lt;br /&gt;
|-&lt;br /&gt;
|0-13||Sprite number, exact meaning specified by bit 31&lt;br /&gt;
|-&lt;br /&gt;
|14-15||0: draw sprite normally, 1: draw sprite in transparent mode, 2: recolor sprite&lt;br /&gt;
|-&lt;br /&gt;
|16-29||Color translation special sprite number, see below&lt;br /&gt;
|-&lt;br /&gt;
|30||If set, sprite is drawn normally even in transparent buildings mode (for building sprites only; supported in 2.0.1 alpha 57 or later)&lt;br /&gt;
|-&lt;br /&gt;
|31||Sprite type, see below&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Since 2.0.1 alpha 57, the groundsprite value can be zero if no ground sprite is needed (this is useful if you need to draw custom foundations, see [[Callbacks#Decide_drawing_default_foundations_30_14E_150_|example]]). Ground sprites are always drawn normally, so bit 30 is ignored for them. Bit 30 may get a different meaning for ground sprites in a later version of TTDPatch, so please leave it zero for now. This does not apply to additional groundsprites using the &amp;amp;quot;&amp;amp;lt;xpixeloffset&amp;amp;gt; &amp;amp;lt;ypixeloffset&amp;amp;gt; 80&amp;amp;quot;-syntax (see above); for these bit 30 has the same meaning as for building sprites.&lt;br /&gt;
&lt;br /&gt;
===Colour translation special sprite number===&lt;br /&gt;
&lt;br /&gt;
This is used only if bits 14 or 15 are nonzero. Bits 16-29 must be the number of a regular TTD sprite containing a colour translation table (see below for available translation tables). For transparent mode, a suitable translation table is needed, e.g. that of TTD&amp;amp;acute;s sprite number 802 (s.b.). See [[RecolorSprites]] for more information on the usage of transparent and recolouring sprites.&lt;br /&gt;
&lt;br /&gt;
For houses, if no recolour sprite is given but recolouring is turned on in bits 14-15, there are two possibilities:&lt;br /&gt;
* If you have callback 1E enabled, it is called to determine the colour mapping.&lt;br /&gt;
* If callback 1E is disabled or fails, one of the colours specified in property 17 will be chosen randomly.&lt;br /&gt;
&lt;br /&gt;
See [[RecolorSprites]] for a list of available colour translations.&lt;br /&gt;
&lt;br /&gt;
For industry tiles, if this field is zero, but recolouring is turned on in bits 14 or 15, the colour of the containing industry will automatically be applied.&lt;br /&gt;
&lt;br /&gt;
The ground sprite should be exactly the same size and shape as TTD&#039;s flat tile. In general, it shouldn&#039;t contain anything that has a z-dimension because any non-ground sprite will cover it.&lt;br /&gt;
&lt;br /&gt;
Useful values for ground sprites:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Sprite number (decimal)!!Contents&lt;br /&gt;
|-&lt;br /&gt;
|3924||bare land&lt;br /&gt;
|-&lt;br /&gt;
|3981||grass&lt;br /&gt;
|-&lt;br /&gt;
|4061||water&lt;br /&gt;
|-&lt;br /&gt;
|4550||snow or desert (depending on climate)&lt;br /&gt;
|-&lt;br /&gt;
|1420||concrete&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Please note that all the ground sprite becomes visible in &amp;amp;quot;transparent buildings&amp;amp;quot; mode, so you should draw parts that seem to be hidden as well.&lt;br /&gt;
&lt;br /&gt;
===Sprite type===&lt;br /&gt;
&lt;br /&gt;
If bit 31 is clear, the bottom 14 bits contain a regular TTD sprite number.&lt;br /&gt;
&lt;br /&gt;
If bit 31 is set, the bottom 14 bits contain a number of a sprite set in the most recent action 1, and the used sprite is decided according to the current construction state and the number of sprites in the set:&lt;br /&gt;
* if there&#039;s only one sprite, it&#039;s used always&lt;br /&gt;
* if there are two sprites, the first is used during construction (stages 0-2), and the second is used for the finished building (stage 3)&lt;br /&gt;
* if there are three sprites, the first will be used in the beginning of the construction (stage 0), the second will be used during the rest of the construction (stages 1 and 2) and the third will be used for the complete building (stage 3)&lt;br /&gt;
* if there are four or more sprites, the first four will be used for the four construction stages. Sprites after the first four are always ignored.&lt;/div&gt;</summary>
		<author><name>Lakie</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Objects&amp;diff=1065</id>
		<title>Action0/Objects</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Objects&amp;diff=1065"/>
		<updated>2011-06-13T21:03:53Z</updated>

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

		<summary type="html">&lt;p&gt;Lakie: Change the links to use the correct characters and not the &amp;quot;.&amp;lt;hex&amp;gt;&amp;quot;.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;Variational Action 2 Variables for Objects&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Variational Action 2 Variables for Objects=&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Variable!!Size!!Content&lt;br /&gt;
|-&lt;br /&gt;
|40||D||Relative position, like [[VarAction2IndustryTiles#Relative_position_(43)|Industry Tile var43]]&lt;br /&gt;
|-&lt;br /&gt;
|41||W||Tile information, see below&lt;br /&gt;
|-&lt;br /&gt;
|42||D||Construction date from year 0&lt;br /&gt;
|-&lt;br /&gt;
|43||B||Animation counter, see below&lt;br /&gt;
|-&lt;br /&gt;
|44||B||Object founder information&lt;br /&gt;
|-&lt;br /&gt;
|45||D||Get town zone and Manhattan distance of closest town&lt;br /&gt;
|-&lt;br /&gt;
|46||D||Get square of Euclidian distance of closest town&lt;br /&gt;
|-&lt;br /&gt;
|47||B||Object colour&lt;br /&gt;
|-&lt;br /&gt;
|48||B||Object views&lt;br /&gt;
|-&lt;br /&gt;
|60||W||Get object type at offset&lt;br /&gt;
|-&lt;br /&gt;
|61||B||Get random bits at offset&lt;br /&gt;
|-&lt;br /&gt;
|62||D||Land info of nearby tiles&lt;br /&gt;
|-&lt;br /&gt;
|63||W||Animation counter of nearby tile&lt;br /&gt;
|-&lt;br /&gt;
|64||D||Count of object, distance of closest instance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Tile information (41)==&lt;br /&gt;
&lt;br /&gt;
The return value has the format of ss0t where t is the terrain type which the tile is on, same values as [[VarAction2Canals|canal var81]].&lt;br /&gt;
&lt;br /&gt;
As of TTDPatch r2088, ss contains the slope data of the tile, same format as for [[VarAction2IndustryTiles#Land_info_of_nearby_tiles_(60)| industrytile var60]]. The meaning of the individual bits is:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Bit!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||West corner is above the lowest&lt;br /&gt;
|-&lt;br /&gt;
|1||South corner is above the lowest&lt;br /&gt;
|-&lt;br /&gt;
|2||East corner is above the lowest&lt;br /&gt;
|-&lt;br /&gt;
|3||North corner is above the lowest&lt;br /&gt;
|-&lt;br /&gt;
|4||The tile is a steep slope (*)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
(*) - Steep slopes have this bit plus 3 points raised, giving them values of 0x17, 0x1B, 0x1D and 0x1E.&lt;br /&gt;
&lt;br /&gt;
==Animation Counter (43)==&lt;br /&gt;
&lt;br /&gt;
This byte gets the actual value of the animation counter (note that action0, property 10, bit 6 must be set for this to work).&lt;br /&gt;
&lt;br /&gt;
==Object founder information (44)==&lt;br /&gt;
&lt;br /&gt;
This byte contains the ID of the company that funded the object, or 10h if the object was placed in the scenario editor.&lt;br /&gt;
&lt;br /&gt;
==Get town zone and Manhattan distance of closest town (45)==&lt;br /&gt;
&lt;br /&gt;
Like [[VarAction2Industries#Get_town_zone_and_Manhattan_distance_of_closest_town_(65)|industry var65]] but instead of an offset the current tile is used.&lt;br /&gt;
&lt;br /&gt;
==Get square of Euclidian distance of closest town (46)==&lt;br /&gt;
&lt;br /&gt;
Like [[VarAction2Industries#Get_square_of_Euclidean_distance_of_closest_town_(66)|industry var66]] but instead of an offset the current tile is used.&lt;br /&gt;
&lt;br /&gt;
==Object colour (47)==&lt;br /&gt;
&lt;br /&gt;
This byte returns the colour of the object.&lt;br /&gt;
&lt;br /&gt;
(since TTDPatch r2351 and OpenTTD r21259)&lt;br /&gt;
&lt;br /&gt;
==Get object views (48)==&lt;br /&gt;
&lt;br /&gt;
Returned value stands for a particular view of an object. Number and rank of set-IDs must match the value given in the object&#039;s action0 prop17, i.e. for an object with 4 views, prop48 may return values 0 .. 4. Since OpenTTD r21455.&lt;br /&gt;
&lt;br /&gt;
==Get object type at offset (60)==&lt;br /&gt;
&lt;br /&gt;
The parameter of this variable is an offset from the current tile. The low nibble contains the signed X offset (that is 0h=0, 1h=+1 ... 7h=+7, 8h=-8, 9h=-7 ... Fh=-1), the high nibble contains the Y offset. Therefore the parameter 00h accesses the current tile itself. The high word of the return value is currently reserved, and the low word can be:&lt;br /&gt;
&lt;br /&gt;
* 00xxh if the tile is an object tile and was defined in the current GRF with ID xx.&lt;br /&gt;
* FFFEh if the tile is an object tile that was defined in another GRF file or it&#039;s a default object.&lt;br /&gt;
* FFFFh if the tile isn&#039;t an object tile.&lt;br /&gt;
&lt;br /&gt;
==Get random bits at offset (61)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2Industries#Get_random_tile_bits_at_offset_(61)|industry var61]]. The offset it from the current tile and is signed.&lt;br /&gt;
&lt;br /&gt;
To get the random bits from a tile using a offset relative to the north tile of the object, see the example below.&lt;br /&gt;
&lt;br /&gt;
==Land info of nearby tiles (62)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2IndustryTiles#Land_info_of_nearby_tiles_(60)|industry tile var60]]. The offset it from the current tile and is signed.&lt;br /&gt;
&lt;br /&gt;
To get the land info from a tile using a offset relative to the north tile of the object, see the example below.&lt;br /&gt;
&lt;br /&gt;
==Animation counter of nearby tile (63)==&lt;br /&gt;
&lt;br /&gt;
Returns the var43 of another tile given by the signed offset.&lt;br /&gt;
&lt;br /&gt;
To get the animation counter from a tile using a offset relative to the north tile of the object, see the example below.&lt;br /&gt;
&lt;br /&gt;
==Count of object, distance of closest instance (64)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2Industries#Count_of_industry,_distance_of_closest_instance_(67,_68)|industry var67]]. The distance is from the current tile.&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
==Getting the north tile random bits==&lt;br /&gt;
&lt;br /&gt;
The following code uses variable 40, 61 and 7B to read the random bits of the north tile of the object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;    0 * 0    02 0F xx 81&lt;br /&gt;
                       40      30 FF   // Get relative position of object tile as yx&lt;br /&gt;
               \2^     1A      20 77   // Negate the numbers in bits 0..3 and 4..7 ...&lt;br /&gt;
               \2+     1A      20 11   // ... (here we can optionally insert another (positive) offset, to get some other tile relative to the north tile)&lt;br /&gt;
               \2^     1A      20 88   // ... (we need to split the xor in two parts, so bits 0..3 do not influence bits 4..7)&lt;br /&gt;
               \2rst   7B 61   00 FF   // Get the random bits at the northern tile&lt;br /&gt;
                        ...&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lakie</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=VariationalAction2/Objects&amp;diff=1063</id>
		<title>VariationalAction2/Objects</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=VariationalAction2/Objects&amp;diff=1063"/>
		<updated>2011-06-13T20:58:30Z</updated>

		<summary type="html">&lt;p&gt;Lakie: Fix the industries var67 link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;Variational Action 2 Variables for Objects&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Variational Action 2 Variables for Objects=&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Variable!!Size!!Content&lt;br /&gt;
|-&lt;br /&gt;
|40||D||Relative position, like [[VarAction2IndustryTiles#Relative_position_.2843.29|Industry Tile var43]]&lt;br /&gt;
|-&lt;br /&gt;
|41||W||Tile information, see below&lt;br /&gt;
|-&lt;br /&gt;
|42||D||Construction date from year 0&lt;br /&gt;
|-&lt;br /&gt;
|43||B||Animation counter, see below&lt;br /&gt;
|-&lt;br /&gt;
|44||B||Object founder information&lt;br /&gt;
|-&lt;br /&gt;
|45||D||Get town zone and Manhattan distance of closest town&lt;br /&gt;
|-&lt;br /&gt;
|46||D||Get square of Euclidian distance of closest town&lt;br /&gt;
|-&lt;br /&gt;
|47||B||Object colour&lt;br /&gt;
|-&lt;br /&gt;
|48||B||Object views&lt;br /&gt;
|-&lt;br /&gt;
|60||W||Get object type at offset&lt;br /&gt;
|-&lt;br /&gt;
|61||B||Get random bits at offset&lt;br /&gt;
|-&lt;br /&gt;
|62||D||Land info of nearby tiles&lt;br /&gt;
|-&lt;br /&gt;
|63||W||Animation counter of nearby tile&lt;br /&gt;
|-&lt;br /&gt;
|64||D||Count of object, distance of closest instance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Tile information (41)==&lt;br /&gt;
&lt;br /&gt;
The return value has the format of ss0t where t is the terrain type which the tile is on, same values as [[VarAction2Canals|canal var81]].&lt;br /&gt;
&lt;br /&gt;
As of TTDPatch r2088, ss contains the slope data of the tile, same format as for [[VarAction2IndustryTiles#Land_info_of_nearby_tiles_.2860.29| industrytile var60]]. The meaning of the individual bits is:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Bit!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||West corner is above the lowest&lt;br /&gt;
|-&lt;br /&gt;
|1||South corner is above the lowest&lt;br /&gt;
|-&lt;br /&gt;
|2||East corner is above the lowest&lt;br /&gt;
|-&lt;br /&gt;
|3||North corner is above the lowest&lt;br /&gt;
|-&lt;br /&gt;
|4||The tile is a steep slope (*)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
(*) - Steep slopes have this bit plus 3 points raised, giving them values of 0x17, 0x1B, 0x1D and 0x1E.&lt;br /&gt;
&lt;br /&gt;
==Animation Counter (43)==&lt;br /&gt;
&lt;br /&gt;
This byte gets the actual value of the animation counter (note that action0, property 10, bit 6 must be set for this to work).&lt;br /&gt;
&lt;br /&gt;
==Object founder information (44)==&lt;br /&gt;
&lt;br /&gt;
This byte contains the ID of the company that funded the object, or 10h if the object was placed in the scenario editor.&lt;br /&gt;
&lt;br /&gt;
==Get town zone and Manhattan distance of closest town (45)==&lt;br /&gt;
&lt;br /&gt;
Like [[VarAction2Industries#Get_town_zone_and_Manhattan_distance_of_closest_town_.2865.29|industry var65]] but instead of an offset the current tile is used.&lt;br /&gt;
&lt;br /&gt;
==Get square of Euclidian distance of closest town (46)==&lt;br /&gt;
&lt;br /&gt;
Like [[VarAction2Industries#Get_square_of_Euclidean_distance_of_closest_town_.2866.29|industry var66]] but instead of an offset the current tile is used.&lt;br /&gt;
&lt;br /&gt;
==Object colour (47)==&lt;br /&gt;
&lt;br /&gt;
This byte returns the colour of the object.&lt;br /&gt;
&lt;br /&gt;
(since TTDPatch r2351 and OpenTTD r21259)&lt;br /&gt;
&lt;br /&gt;
==Get object views (48)==&lt;br /&gt;
&lt;br /&gt;
Returned value stands for a particular view of an object. Number and rank of set-IDs must match the value given in the object&#039;s action0 prop17, i.e. for an object with 4 views, prop48 may return values 0 .. 4. Since OpenTTD r21455.&lt;br /&gt;
&lt;br /&gt;
==Get object type at offset (60)==&lt;br /&gt;
&lt;br /&gt;
The parameter of this variable is an offset from the current tile. The low nibble contains the signed X offset (that is 0h=0, 1h=+1 ... 7h=+7, 8h=-8, 9h=-7 ... Fh=-1), the high nibble contains the Y offset. Therefore the parameter 00h accesses the current tile itself. The high word of the return value is currently reserved, and the low word can be:&lt;br /&gt;
&lt;br /&gt;
* 00xxh if the tile is an object tile and was defined in the current GRF with ID xx.&lt;br /&gt;
* FFFEh if the tile is an object tile that was defined in another GRF file or it&#039;s a default object.&lt;br /&gt;
* FFFFh if the tile isn&#039;t an object tile.&lt;br /&gt;
&lt;br /&gt;
==Get random bits at offset (61)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2Industries#Get_random_tile_bits_at_offset_.2861.29|industry var61]]. The offset it from the current tile and is signed.&lt;br /&gt;
&lt;br /&gt;
To get the random bits from a tile using a offset relative to the north tile of the object, see the example below.&lt;br /&gt;
&lt;br /&gt;
==Land info of nearby tiles (62)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2IndustryTiles#Land_info_of_nearby_tiles_.2860.29|industry tile var60]]. The offset it from the current tile and is signed.&lt;br /&gt;
&lt;br /&gt;
To get the land info from a tile using a offset relative to the north tile of the object, see the example below.&lt;br /&gt;
&lt;br /&gt;
==Animation counter of nearby tile (63)==&lt;br /&gt;
&lt;br /&gt;
Returns the var43 of another tile given by the signed offset.&lt;br /&gt;
&lt;br /&gt;
To get the animation counter from a tile using a offset relative to the north tile of the object, see the example below.&lt;br /&gt;
&lt;br /&gt;
==Count of object, distance of closest instance (64)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2Industries#Count_of_industry.2C_distance_of_closest_instance_.2867.2C_68.29|industry var67]]. The distance is from the current tile.&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
==Getting the north tile random bits==&lt;br /&gt;
&lt;br /&gt;
The following code uses variable 40, 61 and 7B to read the random bits of the north tile of the object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;    0 * 0    02 0F xx 81&lt;br /&gt;
                       40      30 FF   // Get relative position of object tile as yx&lt;br /&gt;
               \2^     1A      20 77   // Negate the numbers in bits 0..3 and 4..7 ...&lt;br /&gt;
               \2+     1A      20 11   // ... (here we can optionally insert another (positive) offset, to get some other tile relative to the north tile)&lt;br /&gt;
               \2^     1A      20 88   // ... (we need to split the xor in two parts, so bits 0..3 do not influence bits 4..7)&lt;br /&gt;
               \2rst   7B 61   00 FF   // Get the random bits at the northern tile&lt;br /&gt;
                        ...&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lakie</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=VariationalAction2/Objects&amp;diff=1062</id>
		<title>VariationalAction2/Objects</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=VariationalAction2/Objects&amp;diff=1062"/>
		<updated>2011-06-13T20:56:38Z</updated>

		<summary type="html">&lt;p&gt;Lakie: Attempt to clean up this page and mend the links.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;Variational Action 2 Variables for Objects&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Variational Action 2 Variables for Objects=&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Variable!!Size!!Content&lt;br /&gt;
|-&lt;br /&gt;
|40||D||Relative position, like [[VarAction2IndustryTiles#Relative_position_.2843.29|Industry Tile var43]]&lt;br /&gt;
|-&lt;br /&gt;
|41||W||Tile information, see below&lt;br /&gt;
|-&lt;br /&gt;
|42||D||Construction date from year 0&lt;br /&gt;
|-&lt;br /&gt;
|43||B||Animation counter, see below&lt;br /&gt;
|-&lt;br /&gt;
|44||B||Object founder information&lt;br /&gt;
|-&lt;br /&gt;
|45||D||Get town zone and Manhattan distance of closest town&lt;br /&gt;
|-&lt;br /&gt;
|46||D||Get square of Euclidian distance of closest town&lt;br /&gt;
|-&lt;br /&gt;
|47||B||Object colour&lt;br /&gt;
|-&lt;br /&gt;
|48||B||Object views&lt;br /&gt;
|-&lt;br /&gt;
|60||W||Get object type at offset&lt;br /&gt;
|-&lt;br /&gt;
|61||B||Get random bits at offset&lt;br /&gt;
|-&lt;br /&gt;
|62||D||Land info of nearby tiles&lt;br /&gt;
|-&lt;br /&gt;
|63||W||Animation counter of nearby tile&lt;br /&gt;
|-&lt;br /&gt;
|64||D||Count of object, distance of closest instance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Tile information (41)==&lt;br /&gt;
&lt;br /&gt;
The return value has the format of ss0t where t is the terrain type which the tile is on, same values as [[VarAction2Canals|canal var81]].&lt;br /&gt;
&lt;br /&gt;
As of TTDPatch r2088, ss contains the slope data of the tile, same format as for [[VarAction2IndustryTiles#Land_info_of_nearby_tiles_.2860.29| industrytile var60]]. The meaning of the individual bits is:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Bit!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||West corner is above the lowest&lt;br /&gt;
|-&lt;br /&gt;
|1||South corner is above the lowest&lt;br /&gt;
|-&lt;br /&gt;
|2||East corner is above the lowest&lt;br /&gt;
|-&lt;br /&gt;
|3||North corner is above the lowest&lt;br /&gt;
|-&lt;br /&gt;
|4||The tile is a steep slope (*)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
(*) - Steep slopes have this bit plus 3 points raised, giving them values of 0x17, 0x1B, 0x1D and 0x1E.&lt;br /&gt;
&lt;br /&gt;
==Animation Counter (43)==&lt;br /&gt;
&lt;br /&gt;
This byte gets the actual value of the animation counter (note that action0, property 10, bit 6 must be set for this to work).&lt;br /&gt;
&lt;br /&gt;
==Object founder information (44)==&lt;br /&gt;
&lt;br /&gt;
This byte contains the ID of the company that funded the object, or 10h if the object was placed in the scenario editor.&lt;br /&gt;
&lt;br /&gt;
==Get town zone and Manhattan distance of closest town (45)==&lt;br /&gt;
&lt;br /&gt;
Like [[VarAction2Industries#Get_town_zone_and_Manhattan_distance_of_closest_town_.2865.29|industry var65]] but instead of an offset the current tile is used.&lt;br /&gt;
&lt;br /&gt;
==Get square of Euclidian distance of closest town (46)==&lt;br /&gt;
&lt;br /&gt;
Like [[VarAction2Industries#Get_square_of_Euclidean_distance_of_closest_town_.2866.29|industry var66]] but instead of an offset the current tile is used.&lt;br /&gt;
&lt;br /&gt;
==Object colour (47)==&lt;br /&gt;
&lt;br /&gt;
This byte returns the colour of the object.&lt;br /&gt;
&lt;br /&gt;
(since TTDPatch r2351 and OpenTTD r21259)&lt;br /&gt;
&lt;br /&gt;
==Get object views (48)==&lt;br /&gt;
&lt;br /&gt;
Returned value stands for a particular view of an object. Number and rank of set-IDs must match the value given in the object&#039;s action0 prop17, i.e. for an object with 4 views, prop48 may return values 0 .. 4. Since OpenTTD r21455.&lt;br /&gt;
&lt;br /&gt;
==Get object type at offset (60)==&lt;br /&gt;
&lt;br /&gt;
The parameter of this variable is an offset from the current tile. The low nibble contains the signed X offset (that is 0h=0, 1h=+1 ... 7h=+7, 8h=-8, 9h=-7 ... Fh=-1), the high nibble contains the Y offset. Therefore the parameter 00h accesses the current tile itself. The high word of the return value is currently reserved, and the low word can be:&lt;br /&gt;
&lt;br /&gt;
* 00xxh if the tile is an object tile and was defined in the current GRF with ID xx.&lt;br /&gt;
* FFFEh if the tile is an object tile that was defined in another GRF file or it&#039;s a default object.&lt;br /&gt;
* FFFFh if the tile isn&#039;t an object tile.&lt;br /&gt;
&lt;br /&gt;
==Get random bits at offset (61)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2Industries#Get_random_tile_bits_at_offset_.2861.29|industry var61]]. The offset it from the current tile and is signed.&lt;br /&gt;
&lt;br /&gt;
To get the random bits from a tile using a offset relative to the north tile of the object, see the example below.&lt;br /&gt;
&lt;br /&gt;
==Land info of nearby tiles (62)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2IndustryTiles#Land_info_of_nearby_tiles_.2860.29|industry tile var60]]. The offset it from the current tile and is signed.&lt;br /&gt;
&lt;br /&gt;
To get the land info from a tile using a offset relative to the north tile of the object, see the example below.&lt;br /&gt;
&lt;br /&gt;
==Animation counter of nearby tile (63)==&lt;br /&gt;
&lt;br /&gt;
Returns the var43 of another tile given by the signed offset.&lt;br /&gt;
&lt;br /&gt;
To get the animation counter from a tile using a offset relative to the north tile of the object, see the example below.&lt;br /&gt;
&lt;br /&gt;
==Count of object, distance of closest instance (64)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2Industries#Count_of_industry_distance_of_closest_instance_.2867.2C_68.29|industry var67]]. The distance is from the current tile.&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
==Getting the north tile random bits==&lt;br /&gt;
&lt;br /&gt;
The following code uses variable 40, 61 and 7B to read the random bits of the north tile of the object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;    0 * 0    02 0F xx 81&lt;br /&gt;
                       40      30 FF   // Get relative position of object tile as yx&lt;br /&gt;
               \2^     1A      20 77   // Negate the numbers in bits 0..3 and 4..7 ...&lt;br /&gt;
               \2+     1A      20 11   // ... (here we can optionally insert another (positive) offset, to get some other tile relative to the north tile)&lt;br /&gt;
               \2^     1A      20 88   // ... (we need to split the xor in two parts, so bits 0..3 do not influence bits 4..7)&lt;br /&gt;
               \2rst   7B 61   00 FF   // Get the random bits at the northern tile&lt;br /&gt;
                        ...&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lakie</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Objects&amp;diff=1061</id>
		<title>Action0/Objects</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Objects&amp;diff=1061"/>
		<updated>2011-06-13T20:28:31Z</updated>

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

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

		<summary type="html">&lt;p&gt;Lakie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Variational Action 2 Variables for Objects&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Variational Action 2 Variables for Objects=&lt;br /&gt;
&lt;br /&gt;
||Variable|Size|Content&lt;br /&gt;
&lt;br /&gt;
40|D|Relative position, like [[VarAction2IndustryTiles|Industry Tile var43]]&lt;br /&gt;
&lt;br /&gt;
41|W|Tile information, see below&lt;br /&gt;
&lt;br /&gt;
42|D|Construction date from year 0&lt;br /&gt;
&lt;br /&gt;
43|B|Animation counter, see below&lt;br /&gt;
&lt;br /&gt;
44|B|Object founder information&lt;br /&gt;
&lt;br /&gt;
45|D|Get town zone and Manhattan distance of closest town&lt;br /&gt;
&lt;br /&gt;
46|D|Get square of Euclidian distance of closest town&lt;br /&gt;
&lt;br /&gt;
47|B|Object colour&lt;br /&gt;
&lt;br /&gt;
48|B|Object views&lt;br /&gt;
&lt;br /&gt;
60|W|Get object type at offset&lt;br /&gt;
&lt;br /&gt;
61|B|Get random bits at offset&lt;br /&gt;
&lt;br /&gt;
62|D|Land info of nearby tiles&lt;br /&gt;
&lt;br /&gt;
63|W|Animation counter of nearby tile&lt;br /&gt;
&lt;br /&gt;
64|D|Count of object, distance of closest instance||&lt;br /&gt;
&lt;br /&gt;
==Tile information (41)==&lt;br /&gt;
&lt;br /&gt;
The return value has the format of ss0t where t is the terrain type which the tile is on, same values as [[VarAction2Canals|canal var81]].&lt;br /&gt;
&lt;br /&gt;
As of TTDPatch r2088, ss contains the slope data of the tile, same format as for [[VarAction2IndustryTiles| industrytile var60]]. The meaning of the individual bits is:&lt;br /&gt;
&lt;br /&gt;
||Bit|Meaning&lt;br /&gt;
&lt;br /&gt;
0|West corner is above the lowest&lt;br /&gt;
&lt;br /&gt;
1|South corner is above the lowest&lt;br /&gt;
&lt;br /&gt;
2|East corner is above the lowest&lt;br /&gt;
&lt;br /&gt;
3|North corner is above the lowest&lt;br /&gt;
&lt;br /&gt;
4|The tile is a steep slope (*)||&lt;br /&gt;
&lt;br /&gt;
(*) - Steep slopes have this bit plus 3 points raised, giving them values of 0x17, 0x1B, 0x1D and 0x1E.&lt;br /&gt;
&lt;br /&gt;
==Animation Counter (43)==&lt;br /&gt;
&lt;br /&gt;
This byte gets the actual value of the animation counter (note that action0, property 10, bit 6 must be set for this to work).&lt;br /&gt;
&lt;br /&gt;
==Object founder information (44)==&lt;br /&gt;
&lt;br /&gt;
This byte contains the ID of the company that funded the object, or 10h if the object was placed in the scenario editor.&lt;br /&gt;
&lt;br /&gt;
==Get town zone and Manhattan distance of closest town (45)==&lt;br /&gt;
&lt;br /&gt;
Like [[VarAction2Industries#Get_town_zone_and_Manhattan_distance_of_closest_town_65_|industry var65]] but instead of an offset the current tile is used.&lt;br /&gt;
&lt;br /&gt;
==Get square of Euclidian distance of closest town (46)==&lt;br /&gt;
&lt;br /&gt;
Like [[VarAction2Industries#Get_square_of_Euclidean_distance_of_closest_town_66_|industry var66]] but instead of an offset the current tile is used.&lt;br /&gt;
&lt;br /&gt;
==Object colour (47)==&lt;br /&gt;
&lt;br /&gt;
This byte returns the colour of the object.&lt;br /&gt;
&lt;br /&gt;
(since TTDPatch r2351 and OpenTTD r21259)&lt;br /&gt;
&lt;br /&gt;
==Get object views (48)==&lt;br /&gt;
&lt;br /&gt;
Returned value stands for a particular view of an object. Number and rank of set-IDs must match the value given in the object&#039;s action0 prop17, i.e. for an object with 4 views, prop48 may return values 0 .. 4. Since OpenTTD r21455.&lt;br /&gt;
&lt;br /&gt;
==Get object type at offset (60)==&lt;br /&gt;
&lt;br /&gt;
The parameter of this variable is an offset from the current tile. The low nibble contains the signed X offset (that is 0h=0, 1h=+1 ... 7h=+7, 8h=-8, 9h=-7 ... Fh=-1), the high nibble contains the Y offset. Therefore the parameter 00h accesses the current tile itself. The high word of the return value is currently reserved, and the low word can be:&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp;* 00xxh if the tile is an object tile and was defined in the current GRF with ID xx.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp;* FFFEh if the tile is an object tile that was defined in another GRF file or it&#039;s a default object.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp;* FFFFh if the tile isn&#039;t an object tile.&lt;br /&gt;
&lt;br /&gt;
==Get random bits at offset (61)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2Industries#Get_random_tile_bits_at_offset_61_|industry var61]]. The offset it from the current tile and is signed.&lt;br /&gt;
&lt;br /&gt;
To get the random bits from a tile using a offset relative to the north tile of the object, see the example below.&lt;br /&gt;
&lt;br /&gt;
==Land info of nearby tiles (62)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2IndustryTiles#Land_info_of_nearby_tiles_60_|industry tile var60]]. The offset it from the current tile and is signed.&lt;br /&gt;
&lt;br /&gt;
To get the land ifno from a tile using a offset relative to the north tile of the object, see the example below.&lt;br /&gt;
&lt;br /&gt;
==Animation counter of nearby tile (63)==&lt;br /&gt;
&lt;br /&gt;
Returns the var 43 of another tile given by the signed offset.&lt;br /&gt;
&lt;br /&gt;
To get the animation counter from a tile using a offset relative to the north tile of the object, see the example below.&lt;br /&gt;
&lt;br /&gt;
==Count of object, distance of closest instance (64)==&lt;br /&gt;
&lt;br /&gt;
Returns the same values as [[VarAction2Industries#Count_of_industry_distance_of_closest_instance_67_68_|industry var67]]. The distance is from the current tile.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
The following code uses variable 40, 61 and 7B to read the random bits of the north tile of the object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;~pp~&lt;br /&gt;
&lt;br /&gt;
-1 * -1 &amp;amp;nbsp; 02 0F xx 81&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; 40 &amp;amp;nbsp; &amp;amp;nbsp;30 FF &amp;amp;nbsp; // Get relative position of object tile as yx&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;\\2&amp;lt;/pre&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;1A &amp;amp;nbsp; &amp;amp;nbsp;20 77 &amp;amp;nbsp; // Negate the numbers in bits 0..3 and 4..7 ...&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;\\2+ &amp;amp;nbsp; &amp;amp;nbsp;1A &amp;amp;nbsp; &amp;amp;nbsp;20 11 &amp;amp;nbsp; // ... (here we can optionally insert another (positive) offset, to get some other tile relative to the north tile)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;\\2&amp;lt;pre&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;1A &amp;amp;nbsp; &amp;amp;nbsp;20 88 &amp;amp;nbsp; // ... (we need to split the xor in two parts, so bits 0..3 do not influence bits 4..7)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;\\2rst &amp;amp;nbsp;7B 61 00 FF &amp;amp;nbsp; // Get the random bits at the northern tile&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ... &amp;amp;nbsp;~/pp~&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lakie</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Objects&amp;diff=140</id>
		<title>Action0/Objects</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Objects&amp;diff=140"/>
		<updated>2010-09-10T17:07:47Z</updated>

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

		<summary type="html">&lt;p&gt;Lakie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Defining an action 2 for houses, industry tiles and object&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 2 for houses, industry tiles and objects=&lt;br /&gt;
&lt;br /&gt;
Defining an action 2 for houses and industry tiles&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
For houses, industry, and object tiles, the action 2 data looks as follows:&lt;br /&gt;
&lt;br /&gt;
(basic format)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 02 07/09 &amp;amp;lt;set-id&amp;amp;gt; 00 &amp;amp;lt;groundsprite&amp;amp;gt; &amp;amp;lt;buildingsprite&amp;amp;gt; &amp;amp;lt;xoffset&amp;amp;gt; &amp;amp;lt;yoffset&amp;amp;gt; &amp;amp;lt;xextent&amp;amp;gt; &amp;amp;lt;yextent&amp;amp;gt; &amp;amp;lt;zextent&amp;amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes used in this action&lt;br /&gt;
&lt;br /&gt;
02|B|Defines action 02&lt;br /&gt;
&lt;br /&gt;
07/09|B|feature 7=town buildings or 9=industry tiles&lt;br /&gt;
&lt;br /&gt;
set-id|B|ID for this definition&lt;br /&gt;
&lt;br /&gt;
00|B|Literal 0 (to distinguish this definition from random/variational lists)&lt;br /&gt;
&lt;br /&gt;
groundsprite|D|Ground sprite for the building (see format below)&lt;br /&gt;
&lt;br /&gt;
buildingsprite|D|The sprite of the building (see format below), can be zero to indicate that no building sprite should be displayed (useful for early building stages)&lt;br /&gt;
&lt;br /&gt;
xofs|B|x-offset from northern tile corner (as a signed byte)&lt;br /&gt;
&lt;br /&gt;
yofs|B|y-offset from northern tile corner (as a signed byte)&lt;br /&gt;
&lt;br /&gt;
xextent|B|size of sprite in x direction&lt;br /&gt;
&lt;br /&gt;
yextent|B|size of sprite in y direction&lt;br /&gt;
&lt;br /&gt;
zextent|B|size of sprite in z direction||&lt;br /&gt;
&lt;br /&gt;
In the above, xofs, yofs, xextent, yextent and zextent define the 3D bounding box of the building sprite not including the ground sprite. The z-offset is always zero for buildings (TTD doesn&#039;t support floating buildings).&lt;br /&gt;
&lt;br /&gt;
xofs/xextent and yofs/yextent pairs that place the bounding box off the tile are not recommended.&lt;br /&gt;
&lt;br /&gt;
Since 2.0.1 alpha 55 vcs 3, houses, industry and object tiles support an extended syntax as well, which looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 02 07/09 &amp;amp;lt;set-id&amp;amp;gt; &amp;amp;lt;num-sprites&amp;amp;gt; &amp;amp;lt;groundsprite&amp;amp;gt; [&amp;amp;lt;buildingsprite&amp;amp;gt; (&amp;amp;lt;xoffset&amp;amp;gt; &amp;amp;lt;yoffset&amp;amp;gt; &amp;amp;lt;zoffset&amp;amp;gt; &amp;amp;lt;xextent&amp;amp;gt; &amp;amp;lt;yextent&amp;amp;gt; &amp;amp;lt;zextent&amp;amp;gt;) | (&amp;amp;lt;xpixeloffset&amp;amp;gt; &amp;amp;lt;ypixeloffset&amp;amp;gt; 80)]...&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes used in this action&lt;br /&gt;
&lt;br /&gt;
02|B|Defines action 02&lt;br /&gt;
&lt;br /&gt;
07/09|B|feature 7=town buildings or 9=industry tiles&lt;br /&gt;
&lt;br /&gt;
set-id|B|ID for this definition&lt;br /&gt;
&lt;br /&gt;
num-sprites|B|Number of following building sprites (the groundsprite mustn&#039;t be counted). Must not be zero.&lt;br /&gt;
&lt;br /&gt;
groundsprite|D|Ground sprite for the building (see format below)&lt;br /&gt;
&lt;br /&gt;
buildingsprite|D|The sprite to be drawn. Unlike the basic format, zero isn&#039;t allowed here.&lt;br /&gt;
&lt;br /&gt;
-- for sprites defining a new bounding box --&lt;br /&gt;
&lt;br /&gt;
xofs|B|x-offset from northern tile corner (as a signed byte)&lt;br /&gt;
&lt;br /&gt;
yofs|B|y-offset from northern tile corner (as a signed byte)&lt;br /&gt;
&lt;br /&gt;
zofs|B|z-offset from the ground&lt;br /&gt;
&lt;br /&gt;
xextent|B|size of sprite in x direction&lt;br /&gt;
&lt;br /&gt;
yextent|B|size of sprite in y direction&lt;br /&gt;
&lt;br /&gt;
zextent|B|size of sprite in z direction&lt;br /&gt;
&lt;br /&gt;
-- for sprites sharing their bounding box with the previous sprite&lt;br /&gt;
&lt;br /&gt;
xpixeloffset|B|x offset from the top left corner of the previous sprite&lt;br /&gt;
&lt;br /&gt;
ypixeloffset|B|y offset from the top left corner of the previous sprite&lt;br /&gt;
&lt;br /&gt;
80|B|a literal 80h byte to distinguish from new-bounding-box definitions||&lt;br /&gt;
&lt;br /&gt;
Note: restrictions for sprites sharing their bounding box are the same as explained for [[Action0Stations#Sprite_layout_09_| station tiles.]]&lt;br /&gt;
&lt;br /&gt;
Since OpenTTD r18959 you can draw multiple ground sprites for a tile, which is useful if you want to use the usual grass/water/concrete groundtile, but still need to add features to it without using a new bounding box. To do so use the syntax of sprites sharing the previous bounding box, but use it before the first bounding box definition. xpixeloffset and ypixeloffset refer to the usual spot of groundtiles. The same feature is also partially supported in TTDPatch since 2.6 r2313: TTDPatch ignores the xpixeloffset and ypixeloffset fields and always uses (0,0) for the offset. If you are developing a GRF that needs to be compatible with both OpenTTD and TTDPatch, you should always keep xpixeloffset and ypixeloffset zero to get the same effect in both games.&lt;br /&gt;
&lt;br /&gt;
-=Details=-&lt;br /&gt;
&lt;br /&gt;
==Sprite definition==&lt;br /&gt;
&lt;br /&gt;
The ground and building sprite fields have the following format:&lt;br /&gt;
&lt;br /&gt;
||Bits|Content&lt;br /&gt;
&lt;br /&gt;
0-13|Sprite number, exact meaning specified by bit 31&lt;br /&gt;
&lt;br /&gt;
14-15|0: draw sprite normally, 1: draw sprite in transparent mode, 2: recolor sprite&lt;br /&gt;
&lt;br /&gt;
16-29|Color translation special sprite number, see below&lt;br /&gt;
&lt;br /&gt;
30|If set, sprite is drawn normally even in transparent buildings mode (for building sprites only; supported in 2.0.1 alpha 57 or later)&lt;br /&gt;
&lt;br /&gt;
31|Sprite type, see below||&lt;br /&gt;
&lt;br /&gt;
Since 2.0.1 alpha 57, the groundsprite value can be zero if no ground sprite is needed (this is useful if you need to draw custom foundations). Ground sprites are always drawn normally, so bit 30 is ignored for them. Bit 30 may get a different meaning for ground sprites in a later version of TTDPatch, so please leave it zero for now. This does not apply to additional groundsprites using the &amp;amp;quot;&amp;amp;lt;xpixeloffset&amp;amp;gt; &amp;amp;lt;ypixeloffset&amp;amp;gt; 80&amp;amp;quot;-syntax (see above); for these bit 30 has the same meaning as for building sprites.&lt;br /&gt;
&lt;br /&gt;
===Colour translation special sprite number===&lt;br /&gt;
&lt;br /&gt;
This is used only if bits 14 or 15 are nonzero. Bits 16-29 must be the number of a regular TTD sprite containing a colour translation table (see below for available translation tables). For transparent mode, a suitable translation table is needed, e.g. that of TTD&amp;amp;acute;s sprite number 802 (s.b.). See [[RecolorSprites]] for more information on the usage of transparent and recolouring sprites.&lt;br /&gt;
&lt;br /&gt;
For houses, if no recolour sprite is given but recolouring is turned on in bits 14-15, there are two possiblities:&lt;br /&gt;
* If you have callback 1E enabled, it is called to determine the colour mapping.&lt;br /&gt;
* If callback 1E is disabled or fails, one of the colours specified in property 17 will be chosen randomly.&lt;br /&gt;
&lt;br /&gt;
For industry tiles, if this field is zero, but recolouring is turned on in bits 14 or 15, the colour of the containing industry will automatically be applied.&lt;br /&gt;
&lt;br /&gt;
For the colour translation, you can use the following sprite numbers:&lt;br /&gt;
&lt;br /&gt;
||Sprite number (decimal)|Translated colour&lt;br /&gt;
&lt;br /&gt;
translations for &amp;amp;quot;player colour&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
775|dark blue&lt;br /&gt;
&lt;br /&gt;
776|pale green&lt;br /&gt;
&lt;br /&gt;
777|pink&lt;br /&gt;
&lt;br /&gt;
778|yellow&lt;br /&gt;
&lt;br /&gt;
779|red&lt;br /&gt;
&lt;br /&gt;
780|light blue&lt;br /&gt;
&lt;br /&gt;
781|green&lt;br /&gt;
&lt;br /&gt;
782|dark green&lt;br /&gt;
&lt;br /&gt;
783|blue&lt;br /&gt;
&lt;br /&gt;
784|cream&lt;br /&gt;
&lt;br /&gt;
785|mauve&lt;br /&gt;
&lt;br /&gt;
786|purple&lt;br /&gt;
&lt;br /&gt;
787|orange&lt;br /&gt;
&lt;br /&gt;
788|brown&lt;br /&gt;
&lt;br /&gt;
789|grey&lt;br /&gt;
&lt;br /&gt;
790|white&lt;br /&gt;
&lt;br /&gt;
translations for &amp;amp;quot;brownish red&amp;amp;quot; colour&lt;br /&gt;
&lt;br /&gt;
795|blue&lt;br /&gt;
&lt;br /&gt;
796|brown&lt;br /&gt;
&lt;br /&gt;
797|white (ignoring original intensity)&lt;br /&gt;
&lt;br /&gt;
798|red&lt;br /&gt;
&lt;br /&gt;
799|green&lt;br /&gt;
&lt;br /&gt;
800|white (darker parts are blueish)&lt;br /&gt;
&lt;br /&gt;
801|yellow&lt;br /&gt;
&lt;br /&gt;
special colour translations&lt;br /&gt;
&lt;br /&gt;
802|makes the whole sprite darker&lt;br /&gt;
&lt;br /&gt;
803|maps the sprite to grey tones (for the newspaper)&lt;br /&gt;
&lt;br /&gt;
804|maps the sprite to even darker grey tones (crash debris?)||&lt;br /&gt;
&lt;br /&gt;
In the above table, &amp;amp;quot;player colour&amp;amp;quot; means the &amp;amp;quot;magic blue&amp;amp;quot; color used, for example, on the vehicles, while &amp;amp;quot;brownish red&amp;amp;quot; means the &amp;amp;quot;magic&amp;amp;quot; color used on some town buildings (on the tall office block, for example). Mapping 775 is an identity function (maps each color to itself), so you can use it in cases where a remapping is needed, but you don&#039;t want to recolor anything.&lt;br /&gt;
&lt;br /&gt;
The ground sprite should be exactly the same size and shape as TTD&#039;s flat tile. In general, it shouldn&#039;t contain anything that has a Z dimension because any non-ground sprite will cover it.&lt;br /&gt;
&lt;br /&gt;
Useful values for ground sprites:&lt;br /&gt;
&lt;br /&gt;
||Sprite number (decimal)|Contents&lt;br /&gt;
&lt;br /&gt;
3924|bare land&lt;br /&gt;
&lt;br /&gt;
3981|grass&lt;br /&gt;
&lt;br /&gt;
4061|water&lt;br /&gt;
&lt;br /&gt;
4550|snow or desert (depending on climate)&lt;br /&gt;
&lt;br /&gt;
1420|concrete||&lt;br /&gt;
&lt;br /&gt;
Please note that all the ground sprite becomes visible in &amp;amp;quot;transparent buildings&amp;amp;quot; mode, so you should draw parts that seem to be hidden as well.&lt;br /&gt;
&lt;br /&gt;
===Sprite type===&lt;br /&gt;
&lt;br /&gt;
If bit 31 is clear, the bottom 14 bits contain a regular TTD sprite number.&lt;br /&gt;
&lt;br /&gt;
If bit 31 is set, the bottom 14 bits contain a number of a sprite set in the most recent action 1, and the used sprite is decided according to the current construction state and the number of sprites in the set:&lt;br /&gt;
*if there&#039;s only one sprite, it&#039;s used always&lt;br /&gt;
*if there are two sprites, the first is used during construction (stages 0-2), and the second is used for the finished building (stage 3)&lt;br /&gt;
*if there are three sprites, the first will be used in the beginning of the construction (stage 0), the second will be used during the rest of the construction (stages 1 and 2) and the third will be used for the complete building (stage 3)&lt;br /&gt;
*if there are four or more sprites, the first four will be used for the four construction stages. Sprites after the first four are always ignored.&lt;br /&gt;
&lt;br /&gt;
===Object buy menu sprite===&lt;br /&gt;
&lt;br /&gt;
Currently only the ground sprite is used for menu.&lt;br /&gt;
&lt;br /&gt;
In internal builds however, all sprites defined in an extended format style sprite are used. (Lakie)&lt;/div&gt;</summary>
		<author><name>Lakie</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action3&amp;diff=394</id>
		<title>Action3</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action3&amp;diff=394"/>
		<updated>2010-07-19T17:40:45Z</updated>

		<summary type="html">&lt;p&gt;Lakie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Associate vehicles with graphics set IDs&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 3=&lt;br /&gt;
&lt;br /&gt;
Associate vehicles/stations with graphics set IDs.&lt;br /&gt;
&lt;br /&gt;
-=Introduction=-&lt;br /&gt;
&lt;br /&gt;
Action 3 tells the patch what graphics set ID (from [[Action2|action 2]]) to use for a certain feature (vehicle, station, industry, railtype,...).&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
The format of the data is feature-dependent.&lt;br /&gt;
&lt;br /&gt;
The data is&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 03 &amp;amp;lt;feature&amp;amp;gt; &amp;amp;lt;n-id&amp;amp;gt; &amp;amp;lt;ids...&amp;amp;gt; &amp;amp;lt;num-cid&amp;amp;gt; (&amp;amp;lt;cargo-type&amp;amp;gt; &amp;amp;lt;cid&amp;amp;gt;)... &amp;amp;lt;def-cid&amp;amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes used in this action&lt;br /&gt;
&lt;br /&gt;
03|B|Defines action 03&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;feature&amp;amp;gt;|B|What type of vehicle or stations do the IDs refer to&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;n-id&amp;amp;gt;|B|Number of vehicles/stations this action 3 associates graphics with&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;ids...&amp;amp;gt;|B/B*|Vehicle or stations IDs of the vehicles this action 3 associates graphics with. There must be as many IDs as &amp;amp;lt;n-id&amp;amp;gt; specifies&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;num-cid&amp;amp;gt;|B|Number of different cargo types to support&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;cargo-type&amp;amp;gt;|B|Cargo type for which to use the following cargo ID&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;cid&amp;amp;gt;|W|Cargo ID (from action 2) to use for this cargo type&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;def-cid&amp;amp;gt;|W|Default cargo ID to use if none of the above matches||&lt;br /&gt;
&lt;br /&gt;
-=Filling in the terms=-&lt;br /&gt;
&lt;br /&gt;
===Sprite-number===&lt;br /&gt;
&lt;br /&gt;
This is just the number you are at.&lt;br /&gt;
&lt;br /&gt;
===Length===&lt;br /&gt;
&lt;br /&gt;
Count the number of bytes in this action.&lt;br /&gt;
&lt;br /&gt;
===feature===&lt;br /&gt;
&lt;br /&gt;
This sets the type of feature that you wish to change. Set it to:&lt;br /&gt;
&lt;br /&gt;
00 for trains&lt;br /&gt;
&lt;br /&gt;
01 for road vehicles&lt;br /&gt;
&lt;br /&gt;
02 for ships&lt;br /&gt;
&lt;br /&gt;
03 for planes&lt;br /&gt;
&lt;br /&gt;
04 for stations&lt;br /&gt;
&lt;br /&gt;
05 for canals&lt;br /&gt;
&lt;br /&gt;
07 for houses&lt;br /&gt;
&lt;br /&gt;
09 for industry tiles&lt;br /&gt;
&lt;br /&gt;
0A for industries&lt;br /&gt;
&lt;br /&gt;
0B for cargos&lt;br /&gt;
&lt;br /&gt;
0F for Objects&lt;br /&gt;
&lt;br /&gt;
10 for Railtypes&lt;br /&gt;
&lt;br /&gt;
===n-id===&lt;br /&gt;
&lt;br /&gt;
How many items (vehicles, stations,...) this action 3 defines new graphics for. If this is more than one, all items listed will get the same graphics. If this value has bit 7 set (i.e. 80 added), it is a wagon override. See [[Action3LiveryOverride|Action 3 - Livery Override]] for more info on this feature.&lt;br /&gt;
&lt;br /&gt;
You can make a definition with n-id equal to zero (and thus no ids that follow). &amp;amp;nbsp;This creates a generic feature-specific definition not associated with any particular vehicle. &amp;amp;nbsp;At the moment, this is used for generic callbacks, but might be extended to other functions eventually.&lt;br /&gt;
&lt;br /&gt;
===ids===&lt;br /&gt;
&lt;br /&gt;
Vehicle or stations IDs to use this action 3 for. All IDs are counted from the first of their class, i.e. the first road vehicle has 00, as does the first plane, the first ship, and the first train vehicle.&lt;br /&gt;
&lt;br /&gt;
In OpenTTD since r13482, each ID is an extended byte for vehicles, otherwise the ID is a regular byte.&lt;br /&gt;
&lt;br /&gt;
For feature 05 canals:&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;ID&#039;&#039;&#039;|&#039;&#039;&#039;Description&#039;&#039;&#039;|&#039;&#039;&#039;Number of sprites&#039;&#039;&#039;|&lt;br /&gt;
&lt;br /&gt;
00|Watercliffs|4*&lt;br /&gt;
&lt;br /&gt;
01|Locks|24&lt;br /&gt;
&lt;br /&gt;
02|Dikes|12&lt;br /&gt;
&lt;br /&gt;
03|Icons|1*&lt;br /&gt;
&lt;br /&gt;
04|Flat docks|4&lt;br /&gt;
&lt;br /&gt;
05|River Slope|4*&lt;br /&gt;
&lt;br /&gt;
06|River waterside|12*5 (Last 4 for slopes)&lt;br /&gt;
&lt;br /&gt;
07|River GUI|2||&lt;br /&gt;
&lt;br /&gt;
Note: The Number of sprites for feature 05 canals may change via a graphic flag set in Action0Canals&lt;br /&gt;
&lt;br /&gt;
For town buildings, the IDs are the house IDs, and specifying a house ID that haven&#039;t been defined before (by setting its property 08) doesn&#039;t do anything, but doesn&#039;t cause an error, either. Note that you don&#039;t necessarily have to assign a cargo ID to a house ID, the old TTD sprite of the substitute type will be used if you don&#039;t do so. &amp;amp;nbsp;Industry tile IDs work in the same manner.&lt;br /&gt;
&lt;br /&gt;
===num-cid===&lt;br /&gt;
&lt;br /&gt;
Number of cargo type definitions that follow. Can be zero if only the default follows.&lt;br /&gt;
&lt;br /&gt;
For features 05 canals, 07 houses, 09 industry tiles, 0A industries, and 0B cargos this must always be zero.&lt;br /&gt;
&lt;br /&gt;
===cargo-type and cid===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;For vehicles (features 00 ... 03) and stations (feature 04)&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cargo-type for which the cid applies. &amp;amp;nbsp;If the vehicle is built to use this type of cargo, or if it is refitted for it, the given cargo ID (from action 2) is used as its graphics. &amp;amp;nbsp;See column &amp;amp;quot;type A&amp;amp;quot; in the table at [[CargoTypes]] for a list of cargo-type values.&lt;br /&gt;
&lt;br /&gt;
If the grf file has installed a [[Action0GeneralVariables#Cargo_translation_table_09_|cargo translation table]], the cargo type here refers to the cargo with the label in the given slot of the translation table, e.g. if you use cargo-type=08, it refers to the cargo that has the label in the ninth slot (numbered 08) in the translation table.&lt;br /&gt;
&lt;br /&gt;
If defined, cargo-type FF is used for graphics shown in the purchase or construction window.&lt;br /&gt;
&lt;br /&gt;
For stations, you can additionally define a special cargo-type of FE which prevents the default from being used (which would show the sum of all cargo). &amp;amp;nbsp;Instead, the given cid is displayed with no cargo at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;For railtypes (feature 10)&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Railtypes action 3 is available only in OpenTTD &amp;amp;gt; r19056 and re-use the &#039;cargo&#039; type definition in order to define the type of graphics defined by the associated action 2 (chain) and 1:&lt;br /&gt;
&lt;br /&gt;
||&#039;cargo&#039; type|sprite type|#sprites|usage&lt;br /&gt;
&lt;br /&gt;
00|Icons and cursors(a)|16|4 rail directions, autorail, depot, tunnel and convert rail.&lt;br /&gt;
&lt;br /&gt;
01|Track overlays for junctions and PBS(a)|10|6 flat and 4 slope pieces. Sprites should contain only the track, with no landscape.&lt;br /&gt;
&lt;br /&gt;
02|Underlay(a)|16|6 flat and 4 slope, and 1 X crossing pieces &#039;&#039;with track&#039;&#039;, and 5 junction pieces without track. Sprites should contain the track and the &#039;ballast&#039; below it. No landscape should be drawn.&lt;br /&gt;
&lt;br /&gt;
03|Tunnel(a)|4|1 sprite for each direction. Sprite is overlay for track in existing tunnel graphics. The original ground sprite is drawn, then the overlay, then possibly a train and the original tunnel head is drawn over the top. This keeps compatibility with different landscape types.&lt;br /&gt;
&lt;br /&gt;
04|Catenary wire|28|Follows the same layout for wires of the first 28 sprites as Action5 type 5.&lt;br /&gt;
&lt;br /&gt;
05|Catenary pylons|8|Follows the same layout for pylons of the 8 sprites after the wires as Action5 type 5.&lt;br /&gt;
&lt;br /&gt;
06|Bridge surfaces(a)|6|10 sprites if we ever include diagonal bridges.&lt;br /&gt;
&lt;br /&gt;
07|Level crossing overlay(a)|10|1 rail overlay and 4 light sprites for X and Y.(b)&lt;br /&gt;
&lt;br /&gt;
08|Depots|6|2 sprites for each southish, 1 sprite for each northish. Follows the original layout for depot sprites.(c)&lt;br /&gt;
&lt;br /&gt;
09|Fences|8|X, Y, Vertical, Horizontal, SW slope, SE slope, NE slope and NW slope. Follows the same layout as original original fence sprites at sprite 1301. ||&lt;br /&gt;
&lt;br /&gt;
(a) These sprites must be provided, the others may be left out, if not needed.&lt;br /&gt;
&lt;br /&gt;
(b) Level crossing sprites:&lt;br /&gt;
&lt;br /&gt;
||Sprite number for X|Sprite number for Y|Usage&lt;br /&gt;
&lt;br /&gt;
0| &amp;amp;nbsp; &amp;amp;nbsp;1| &amp;amp;nbsp; &amp;amp;nbsp;Rail overlay&lt;br /&gt;
&lt;br /&gt;
2| &amp;amp;nbsp; &amp;amp;nbsp;3| &amp;amp;nbsp; &amp;amp;nbsp;North light&lt;br /&gt;
&lt;br /&gt;
4| &amp;amp;nbsp; &amp;amp;nbsp;5| &amp;amp;nbsp; &amp;amp;nbsp;East light&lt;br /&gt;
&lt;br /&gt;
6| &amp;amp;nbsp; &amp;amp;nbsp;7| &amp;amp;nbsp; &amp;amp;nbsp;West light&lt;br /&gt;
&lt;br /&gt;
8| &amp;amp;nbsp; &amp;amp;nbsp;9| &amp;amp;nbsp; &amp;amp;nbsp;South light||&lt;br /&gt;
&lt;br /&gt;
(c)Depot sprites:&lt;br /&gt;
&lt;br /&gt;
||Sprite number|Usage&lt;br /&gt;
&lt;br /&gt;
0| &amp;amp;nbsp; &amp;amp;nbsp;NE wall for SE-entry depot.&lt;br /&gt;
&lt;br /&gt;
1| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for SE-entry depot.&lt;br /&gt;
&lt;br /&gt;
2| &amp;amp;nbsp; &amp;amp;nbsp;NW wall for SW-entry depot.&lt;br /&gt;
&lt;br /&gt;
3| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for SW-entry depot.&lt;br /&gt;
&lt;br /&gt;
4| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for NE-entry depot.&lt;br /&gt;
&lt;br /&gt;
5| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for NW-entry depot. ||&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;For canals, houses, industry tiels, industries and cargos (features 05, 07, 09, 0A and 0B)&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As -+&amp;amp;lt;num-cid&amp;amp;gt;+- is zero for features 05 canals, 07 houses, 09 industry tiles, 0A industries, and 0B cargos, -+&amp;amp;lt;cargo-type&amp;amp;gt;+- and -+&amp;amp;lt;cid&amp;amp;gt;+- need to be skipped and you only have to set -+&amp;amp;lt;def-cid&amp;amp;gt;+-.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;For Objects (feature 0F)&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Objects support a buy menu sprite, similar to vehicles (cargo-type FF).&lt;br /&gt;
&lt;br /&gt;
This menu action2 chain is use in preference to the default action2 chain for callback 149.&lt;br /&gt;
&lt;br /&gt;
===def-cid===&lt;br /&gt;
&lt;br /&gt;
Default cargo ID if no entry from the cargo-type list above matches, or if there are no special cargo-types listed at all.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
Below is an example of what a real Action 3 pseudo-sprite could look like for a train engine.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; 13 * 7 &amp;amp;nbsp; 03 00 01 02 00 00 00&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Byte&#039;&#039;&#039;|&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
13|&amp;amp;lt;sprite-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
7|&amp;amp;lt;length&amp;amp;gt; of the action in bytes; start counting at 03 (&amp;amp;lt;action&amp;amp;gt;)&lt;br /&gt;
&lt;br /&gt;
03|&amp;amp;lt;action&amp;amp;gt;: sets this pseudo-sprite to function as action 3&lt;br /&gt;
&lt;br /&gt;
00|&amp;amp;lt;feature&amp;amp;gt;: 00 for Trains&lt;br /&gt;
&lt;br /&gt;
01|&amp;amp;lt;n-id&amp;amp;gt;: One ID to change in this case&lt;br /&gt;
&lt;br /&gt;
02|&amp;amp;lt;ids...&amp;amp;gt;: vehicle ID (02 - Ploddyphut Choo-Choo)&lt;br /&gt;
&lt;br /&gt;
00|&amp;amp;lt;num-cid&amp;amp;gt;: This Engine doesn&#039;t have cargo-specific graphics&lt;br /&gt;
&lt;br /&gt;
00 00|&amp;amp;lt;def-cid&amp;amp;gt;: Use Action2 ID 00, because it is a word value you add 00||&lt;/div&gt;</summary>
		<author><name>Lakie</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=RandomAction2&amp;diff=726</id>
		<title>RandomAction2</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=RandomAction2&amp;diff=726"/>
		<updated>2009-04-17T00:51:13Z</updated>

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

		<summary type="html">&lt;p&gt;Lakie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Defining an action 2 for houses, industry tiles and object&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 2 for houses, industry tiles and object=&lt;br /&gt;
&lt;br /&gt;
Defining an action 2 for houses and industry tiles&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
For houses and industry tiles, the action 2 data looks as follows:&lt;br /&gt;
&lt;br /&gt;
(basic format)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 02 07/09 &amp;amp;lt;set-id&amp;amp;gt; 00 &amp;amp;lt;groundsprite&amp;amp;gt; &amp;amp;lt;buildingsprite&amp;amp;gt; &amp;amp;lt;xoffset&amp;amp;gt; &amp;amp;lt;yoffset&amp;amp;gt; &amp;amp;lt;xextent&amp;amp;gt; &amp;amp;lt;yextent&amp;amp;gt; &amp;amp;lt;zextent&amp;amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes used in this action&lt;br /&gt;
&lt;br /&gt;
02|B|Defines action 02&lt;br /&gt;
&lt;br /&gt;
07/09|B|feature 7=town buildings or 9=industry tiles&lt;br /&gt;
&lt;br /&gt;
set-id|B|ID for this definition&lt;br /&gt;
&lt;br /&gt;
00|B|Literal 0 (to distinguish this definition from random/variational lists)&lt;br /&gt;
&lt;br /&gt;
groundsprite|D|Ground sprite for the building (see format below)&lt;br /&gt;
&lt;br /&gt;
buildingsprite|D|The sprite of the building (see format below), can be zero to indicate that no building sprite should be displayed (useful for early building stages)&lt;br /&gt;
&lt;br /&gt;
xofs|B|x-offset from northern tile corner (as a signed byte)&lt;br /&gt;
&lt;br /&gt;
yofs|B|y-offset from northern tile corner (as a signed byte)&lt;br /&gt;
&lt;br /&gt;
xextent|B|size of sprite in x direction&lt;br /&gt;
&lt;br /&gt;
yextent|B|size of sprite in y direction&lt;br /&gt;
&lt;br /&gt;
zextent|B|size of sprite in z direction||&lt;br /&gt;
&lt;br /&gt;
In the above, xofs, yofs, xextent, yextent and zextent define the 3D bounding box of the building sprite not including the ground sprite. The z-offset is always zero for buildings (TTD doesn&#039;t support floating buildings).&lt;br /&gt;
&lt;br /&gt;
xofs/xextent and yofs/yextent pairs that place the bounding box off the tile are not recommended.&lt;br /&gt;
&lt;br /&gt;
Since 2.0.1 alpha 55 vcs 3, houses and industry tiles support an extended syntax as well, which looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 02 07/09 &amp;amp;lt;set-id&amp;amp;gt; &amp;amp;lt;num-sprites&amp;amp;gt; &amp;amp;lt;groundsprite&amp;amp;gt; [&amp;amp;lt;buildingsprite&amp;amp;gt; (&amp;amp;lt;xoffset&amp;amp;gt; &amp;amp;lt;yoffset&amp;amp;gt; &amp;amp;lt;zoffset&amp;amp;gt; &amp;amp;lt;xextent&amp;amp;gt; &amp;amp;lt;yextent&amp;amp;gt; &amp;amp;lt;zextent&amp;amp;gt;) | (&amp;amp;lt;xpixeloffset&amp;amp;gt; &amp;amp;lt;ypixeloffset&amp;amp;gt; 80)]...&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes used in this action&lt;br /&gt;
&lt;br /&gt;
02|B|Defines action 02&lt;br /&gt;
&lt;br /&gt;
07/09|B|feature 7=town buildings or 9=industry tiles&lt;br /&gt;
&lt;br /&gt;
set-id|B|ID for this definition&lt;br /&gt;
&lt;br /&gt;
num-sprites|B|Number of following building sprites (the groundsprite mustn&#039;t be counted). Must not be zero.&lt;br /&gt;
&lt;br /&gt;
groundsprite|D|Ground sprite for the building (see format below)&lt;br /&gt;
&lt;br /&gt;
buildingsprite|D|The sprite to be drawn. Unlike the basic format, zero isn&#039;t allowed here.&lt;br /&gt;
&lt;br /&gt;
-- for sprites defining a new bounding box --&lt;br /&gt;
&lt;br /&gt;
xofs|B|x-offset from northern tile corner (as a signed byte)&lt;br /&gt;
&lt;br /&gt;
yofs|B|y-offset from northern tile corner (as a signed byte)&lt;br /&gt;
&lt;br /&gt;
zofs|B|z-offset from the ground&lt;br /&gt;
&lt;br /&gt;
xextent|B|size of sprite in x direction&lt;br /&gt;
&lt;br /&gt;
yextent|B|size of sprite in y direction&lt;br /&gt;
&lt;br /&gt;
zextent|B|size of sprite in z direction&lt;br /&gt;
&lt;br /&gt;
-- for sprites sharing their bounding box with the previous sprite&lt;br /&gt;
&lt;br /&gt;
xpixeloffset|B|x offset from the top left corner of the previous sprite&lt;br /&gt;
&lt;br /&gt;
ypixeloffset|B|y offset from the top left corner of the previous sprite&lt;br /&gt;
&lt;br /&gt;
80|B|a literal 80h byte to distinguish from new-bounding-box definitions||&lt;br /&gt;
&lt;br /&gt;
Note: restrictions for sprites sharing their bounding box are the same as explained for [[Action0Stations#Sprite_layout_09_| station tiles.]]&lt;br /&gt;
&lt;br /&gt;
-=Details=-&lt;br /&gt;
&lt;br /&gt;
==Sprite definition==&lt;br /&gt;
&lt;br /&gt;
The ground and building sprite fields have the following format:&lt;br /&gt;
&lt;br /&gt;
||Bits|Content&lt;br /&gt;
&lt;br /&gt;
0-13|Sprite number, exact meaning specified by bit 31&lt;br /&gt;
&lt;br /&gt;
14-15|0: draw sprite normally, 1: draw sprite in transparent mode, 2: recolor sprite&lt;br /&gt;
&lt;br /&gt;
16-29|Color translation special sprite number, see below&lt;br /&gt;
&lt;br /&gt;
30|If set, sprite is drawn normally even in transparent buildings mode (for building sprites only; supported in 2.0.1 alpha 57 or later)&lt;br /&gt;
&lt;br /&gt;
31|Sprite type, see below||&lt;br /&gt;
&lt;br /&gt;
Since 2.0.1 alpha 57, the groundsprite value can be zero if no ground sprite is needed (this is useful if you need to draw custom foundations). Ground sprites are always drawn normally, so bit 30 is ignored for them. Bit 30 may get a different meaning for ground sprites in a later version of TTDPatch, so please leave it zero for now.&lt;br /&gt;
&lt;br /&gt;
===Colour translation special sprite number===&lt;br /&gt;
&lt;br /&gt;
This is used only if bits 14 or 15 are nonzero. Bits 16-29 must be the number of a regular TTD sprite containing a colour translation table (see below for available translation tables). For transparent mode, a suitable translation table is needed, e.g. that of TTD&amp;amp;acute;s sprite number 802 (s.b.). See [[RecolorSprites]] for more information on the usage of transparent and recolouring sprites.&lt;br /&gt;
&lt;br /&gt;
For houses, if no recolour sprite is given but recolouring is turned on in bits 14-15, there are two possiblities:&lt;br /&gt;
* If you have callback 1E enabled, it is called to determine the colour mapping.&lt;br /&gt;
* If callback 1E is disabled or fails, one of the colours specified in property 17 will be chosen randomly.&lt;br /&gt;
&lt;br /&gt;
For industry tiles, if this field is zero, but recolouring is turned on in bits 14 or 15, the colour of the containing industry will automatically be applied.&lt;br /&gt;
&lt;br /&gt;
For the colour translation, you can use the following sprite numbers:&lt;br /&gt;
&lt;br /&gt;
||Sprite number (decimal)|Translated colour&lt;br /&gt;
&lt;br /&gt;
translations for &amp;amp;quot;player colour&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
775|dark blue&lt;br /&gt;
&lt;br /&gt;
776|pale green&lt;br /&gt;
&lt;br /&gt;
777|pink&lt;br /&gt;
&lt;br /&gt;
778|yellow&lt;br /&gt;
&lt;br /&gt;
779|red&lt;br /&gt;
&lt;br /&gt;
780|light blue&lt;br /&gt;
&lt;br /&gt;
781|green&lt;br /&gt;
&lt;br /&gt;
782|dark green&lt;br /&gt;
&lt;br /&gt;
783|blue&lt;br /&gt;
&lt;br /&gt;
784|cream&lt;br /&gt;
&lt;br /&gt;
785|mauve&lt;br /&gt;
&lt;br /&gt;
786|purple&lt;br /&gt;
&lt;br /&gt;
787|orange&lt;br /&gt;
&lt;br /&gt;
788|brown&lt;br /&gt;
&lt;br /&gt;
789|grey&lt;br /&gt;
&lt;br /&gt;
790|white&lt;br /&gt;
&lt;br /&gt;
translations for &amp;amp;quot;brownish red&amp;amp;quot; colour&lt;br /&gt;
&lt;br /&gt;
795|blue&lt;br /&gt;
&lt;br /&gt;
796|brown&lt;br /&gt;
&lt;br /&gt;
797|white (ignoring original intensity)&lt;br /&gt;
&lt;br /&gt;
798|red&lt;br /&gt;
&lt;br /&gt;
799|green&lt;br /&gt;
&lt;br /&gt;
800|white (darker parts are blueish)&lt;br /&gt;
&lt;br /&gt;
801|yellow&lt;br /&gt;
&lt;br /&gt;
special colour translations&lt;br /&gt;
&lt;br /&gt;
802|makes the whole sprite darker&lt;br /&gt;
&lt;br /&gt;
803|maps the sprite to grey tones (for the newspaper)&lt;br /&gt;
&lt;br /&gt;
804|maps the sprite to even darker grey tones (crash debris?)||&lt;br /&gt;
&lt;br /&gt;
In the above table, &amp;amp;quot;player colour&amp;amp;quot; means the &amp;amp;quot;magic blue&amp;amp;quot; color used, for example, on the vehicles, while &amp;amp;quot;brownish red&amp;amp;quot; means the &amp;amp;quot;magic&amp;amp;quot; color used on some town buildings (on the tall office block, for example). Mapping 775 is an identity function (maps each color to itself), so you can use it in cases where a remapping is needed, but you don&#039;t want to recolor anything.&lt;br /&gt;
&lt;br /&gt;
The ground sprite should be exactly the same size and shape as TTD&#039;s flat tile. In general, it shouldn&#039;t contain anything that has a Z dimension because any non-ground sprite will cover it.&lt;br /&gt;
&lt;br /&gt;
Useful values for ground sprites:&lt;br /&gt;
&lt;br /&gt;
||Sprite number (decimal)|Contents&lt;br /&gt;
&lt;br /&gt;
3924|bare land&lt;br /&gt;
&lt;br /&gt;
3981|grass&lt;br /&gt;
&lt;br /&gt;
4550|snow or desert (depending on climate)&lt;br /&gt;
&lt;br /&gt;
1420|concrete||&lt;br /&gt;
&lt;br /&gt;
Please note that all the ground sprite becomes visible in &amp;amp;quot;transparent buildings&amp;amp;quot; mode, so you should draw parts that seem to be hidden as well.&lt;br /&gt;
&lt;br /&gt;
===Sprite type===&lt;br /&gt;
&lt;br /&gt;
If bit 31 is clear, the bottom 14 bits contain a regular TTD sprite number.&lt;br /&gt;
&lt;br /&gt;
If bit 31 is set, the bottom 14 bits contain a number of a sprite set in the most recent action 1, and the used sprite is decided according to the current construction state and the number of sprites in the set:&lt;br /&gt;
*if there&#039;s only one sprite, it&#039;s used always&lt;br /&gt;
*if there are two sprites, the first is used during construction (stages 0-2), and the second is used for the finished building (stage 3)&lt;br /&gt;
*if there are three sprites, the first will be used in the beginning of the construction (stage 0), the second will be used during the rest of the construction (stages 1 and 2) and the third will be used for the complete building (stage 3)&lt;br /&gt;
*if there are four or more sprites, the first four will be used for the four construction stages. Sprites after the first four are always ignored.&lt;/div&gt;</summary>
		<author><name>Lakie</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action3&amp;diff=400</id>
		<title>Action3</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action3&amp;diff=400"/>
		<updated>2008-09-13T18:39:37Z</updated>

		<summary type="html">&lt;p&gt;Lakie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Associate vehicles with graphics set IDs&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 3=&lt;br /&gt;
&lt;br /&gt;
Associate vehicles/stations with graphics set IDs.&lt;br /&gt;
&lt;br /&gt;
-=Introduction=-&lt;br /&gt;
&lt;br /&gt;
Action 3 tells the patch what graphics set ID (from [[Action2|action 2]]) to use for a certain vehicle or station.&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
The format of the data is feature-dependent.&lt;br /&gt;
&lt;br /&gt;
The data is&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 03 &amp;amp;lt;feature&amp;amp;gt; &amp;amp;lt;n-id&amp;amp;gt; &amp;amp;lt;ids...&amp;amp;gt; &amp;amp;lt;num-cid&amp;amp;gt; (&amp;amp;lt;cargo-type&amp;amp;gt; &amp;amp;lt;cid&amp;amp;gt;)... &amp;amp;lt;def-cid&amp;amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes used in this action&lt;br /&gt;
&lt;br /&gt;
03|B|Defines action 03&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;feature&amp;amp;gt;|B|What type of vehicle or stations do the IDs refer to&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;n-id&amp;amp;gt;|B|Number of vehicles/stations this action 3 associates graphics with&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;ids...&amp;amp;gt;|B/B*|Vehicle or stations IDs of the vehicles this action 3 associates graphics with. There must be as many IDs as &amp;amp;lt;n-vid&amp;amp;gt; specifies&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;num-cid&amp;amp;gt;|B|Number of different cargo types to support&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;cargo-type&amp;amp;gt;|B|Cargo type for which to use the following cargo ID&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;cid&amp;amp;gt;|W|Cargo ID (from action 2) to use for this cargo type&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;def-cid&amp;amp;gt;|W|Default cargo ID to use if none of the above matches||&lt;br /&gt;
&lt;br /&gt;
-=Filling in the terms=-&lt;br /&gt;
&lt;br /&gt;
===Sprite-number===&lt;br /&gt;
&lt;br /&gt;
This is just the number you are at.&lt;br /&gt;
&lt;br /&gt;
===Length===&lt;br /&gt;
&lt;br /&gt;
Count the number of bytes in this action.&lt;br /&gt;
&lt;br /&gt;
===feature===&lt;br /&gt;
&lt;br /&gt;
This sets the type of feature that you wish to change. Set it to:&lt;br /&gt;
&lt;br /&gt;
00 for trains&lt;br /&gt;
&lt;br /&gt;
01 for road vehicles&lt;br /&gt;
&lt;br /&gt;
02 for ships&lt;br /&gt;
&lt;br /&gt;
03 for planes&lt;br /&gt;
&lt;br /&gt;
04 for stations&lt;br /&gt;
&lt;br /&gt;
05 for canals&lt;br /&gt;
&lt;br /&gt;
07 for houses&lt;br /&gt;
&lt;br /&gt;
09 for industry tiles&lt;br /&gt;
&lt;br /&gt;
0A for industries&lt;br /&gt;
&lt;br /&gt;
0B for cargos&lt;br /&gt;
&lt;br /&gt;
0F for Objects&lt;br /&gt;
&lt;br /&gt;
===n-id===&lt;br /&gt;
&lt;br /&gt;
How many vehicles or stations this action 3 defines new graphics for. If this is more than one, all vehicles listed will get the same graphics. If this value has bit 7 set (i.e. 80 added), it is a wagon override. See [[Action3LiveryOverride|Action 3 - Livery Override]] for more info on this feature.&lt;br /&gt;
&lt;br /&gt;
You can make a definition with n-id equal to zero (and thus no ids that follow). &amp;amp;nbsp;This creates a generic feature-specific definition not associated with any particular vehicle. &amp;amp;nbsp;At the moment, this is used for generic callbacks, but might be extended to other functions eventually.&lt;br /&gt;
&lt;br /&gt;
===ids===&lt;br /&gt;
&lt;br /&gt;
Vehicle or stations IDs to use this action 3 for. All vehicle IDs are counted from the first of their class, i.e. the first road vehicle has 00, as does the first plane, the first ship, and the first train vehicle.&lt;br /&gt;
&lt;br /&gt;
In OpenTTD since r13482, each ID is an extended byte for vehicles, otherwise the ID is a regular byte.&lt;br /&gt;
&lt;br /&gt;
For feature 05 canals:&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;ID&#039;&#039;&#039;|&#039;&#039;&#039;Description&#039;&#039;&#039;|&#039;&#039;&#039;Number of sprites&#039;&#039;&#039;|&lt;br /&gt;
&lt;br /&gt;
00|Watercliffs|4*&lt;br /&gt;
&lt;br /&gt;
01|Locks|24&lt;br /&gt;
&lt;br /&gt;
02|Dikes|12&lt;br /&gt;
&lt;br /&gt;
03|Icons|1*&lt;br /&gt;
&lt;br /&gt;
04|Flat docks|4&lt;br /&gt;
&lt;br /&gt;
05|River Slope|4*&lt;br /&gt;
&lt;br /&gt;
06|River waterside|12*5 (Last 4 for slopes)&lt;br /&gt;
&lt;br /&gt;
07|River GUI|2||&lt;br /&gt;
&lt;br /&gt;
Note: The Number of sprites for feature 05 canals may change via a graphic flag set in Action0Canals&lt;br /&gt;
&lt;br /&gt;
For town buildings, the IDs are the house IDs, and specifying a house ID that haven&#039;t been defined before (by setting its property 08) doesn&#039;t do anything, but doesn&#039;t cause an error, either. Note that you don&#039;t necessarily have to assign a cargo ID to a house ID, the old TTD sprite of the substitute type will be used if you don&#039;t do so. &amp;amp;nbsp;Industry tile IDs work in the same manner.&lt;br /&gt;
&lt;br /&gt;
===num-cid===&lt;br /&gt;
&lt;br /&gt;
Number of cargo type definitions that follow. Can be zero if only the default follows.&lt;br /&gt;
&lt;br /&gt;
For feature 05 canals, 07 houses, 09 industry tiles, 0A industries, and 0B cargos this must always be zero.&lt;br /&gt;
&lt;br /&gt;
===cargo-type and cid===&lt;br /&gt;
&lt;br /&gt;
The cargo-type for which the cid applies. &amp;amp;nbsp;If the vehicle is built to use this type of cargo, or if it is refitted for it, the given cargo ID (from action 2) is used as its graphics. &amp;amp;nbsp;See column &amp;amp;quot;type A&amp;amp;quot; in the table at [[CargoTypes]] for a list of cargo-type values.&lt;br /&gt;
&lt;br /&gt;
If defined, cargo-type FF is used for graphics shown in the purchase or construction window.&lt;br /&gt;
&lt;br /&gt;
For stations, you can additionally define a special cargo-type of FE which prevents the default from being used (which would show the sum of all cargo). &amp;amp;nbsp;Instead, the given cid is displayed with no cargo at all.&lt;br /&gt;
&lt;br /&gt;
If the grf file has installed a [[Action0GeneralVariables#Cargo_translation_table_09_|cargo translation table]], the cargo type here refers to the cargo with the label in the given slot of the translation table, e.g. if you use cargo-type=08, it refers to the cargo that has the label in the ninth slot (numbered 08) in the translation table.&lt;br /&gt;
&lt;br /&gt;
===def-cid===&lt;br /&gt;
&lt;br /&gt;
Default cargo ID if no entry from the cargo-type list above matches, or if there are no special cargo-types listed at all.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
Below is an example of what a real Action 3 pseudo-sprite could look like for a train engine.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; 13 * 7 &amp;amp;nbsp; 03 00 01 02 00 00 00&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Byte&#039;&#039;&#039;|&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
13|&amp;amp;lt;sprite-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
7|&amp;amp;lt;length&amp;amp;gt; of the action in bytes; start counting at 03 (&amp;amp;lt;action&amp;amp;gt;)&lt;br /&gt;
&lt;br /&gt;
03|&amp;amp;lt;action&amp;amp;gt;: sets this pseudo-sprite to function as action 3&lt;br /&gt;
&lt;br /&gt;
00|&amp;amp;lt;feature&amp;amp;gt;: 00 for Trains&lt;br /&gt;
&lt;br /&gt;
01|&amp;amp;lt;n-id&amp;amp;gt;: One ID to change in this case&lt;br /&gt;
&lt;br /&gt;
02|&amp;amp;lt;ids...&amp;amp;gt;: vehicle ID (02 - Ploddyphut Choo-Choo)&lt;br /&gt;
&lt;br /&gt;
00|&amp;amp;lt;num-cid&amp;amp;gt;: This Engine doesn&#039;t have cargo-specific graphics&lt;br /&gt;
&lt;br /&gt;
00 00|&amp;amp;lt;def-cid&amp;amp;gt;: Use Action2 ID 00, because it is a word value you add 00||&lt;/div&gt;</summary>
		<author><name>Lakie</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action12&amp;diff=282</id>
		<title>Action12</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action12&amp;diff=282"/>
		<updated>2006-02-11T22:28:20Z</updated>

		<summary type="html">&lt;p&gt;Lakie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Load font glyphs&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 12=&lt;br /&gt;
&lt;br /&gt;
Load font glyphs&lt;br /&gt;
&lt;br /&gt;
-=Description=-&lt;br /&gt;
&lt;br /&gt;
This action allows defining glyphs for any [http://www.unicode.org/|Unicode] character in the BMP (Basic Multilingual Plane), i.e. up to U+FFFF.&lt;br /&gt;
&lt;br /&gt;
Available since 2.0.1 alpha 73.&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
The data looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+&amp;amp;lt;sprite-number&amp;amp;gt; * &amp;amp;lt;length&amp;amp;gt; 12 &amp;amp;lt;num-def&amp;amp;gt; &amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;(&amp;amp;lt;font&amp;amp;gt; &amp;amp;lt;num-char&amp;amp;gt; &amp;amp;lt;base-char&amp;amp;gt;){n}&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes in the action&lt;br /&gt;
&lt;br /&gt;
12|B|Action 12&lt;br /&gt;
&lt;br /&gt;
num-def|B|Number of definitions&lt;br /&gt;
&lt;br /&gt;
font|B|Font for which to provide glyphs&lt;br /&gt;
&lt;br /&gt;
num-char|B|Number of consecutive glyphs&lt;br /&gt;
&lt;br /&gt;
base-char|W|First Unicode character for which to provide glyphs||&lt;br /&gt;
&lt;br /&gt;
Following the action 12 must be the real sprites for all glyphs, as many sprites as all &amp;amp;lt;num-char&amp;amp;gt; added up.&lt;br /&gt;
&lt;br /&gt;
-=Filling in the terms=-&lt;br /&gt;
&lt;br /&gt;
===sprite-number===&lt;br /&gt;
&lt;br /&gt;
The current sprite number.&lt;br /&gt;
&lt;br /&gt;
===length===&lt;br /&gt;
&lt;br /&gt;
The total number of bytes in this action 12.&lt;br /&gt;
&lt;br /&gt;
===num-def===&lt;br /&gt;
&lt;br /&gt;
This specifies how many definitions follow, each having &amp;amp;lt;font&amp;amp;gt;, &amp;amp;lt;basechar&amp;amp;gt; and &amp;amp;lt;numchar&amp;amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===font===&lt;br /&gt;
&lt;br /&gt;
The font to define glyphs for. The value can be 0 for the normal size, 1 for the small size, or 2 for the large size font.&lt;br /&gt;
&lt;br /&gt;
===num-char===&lt;br /&gt;
&lt;br /&gt;
The number of characters in the range.&lt;br /&gt;
&lt;br /&gt;
===base-char===&lt;br /&gt;
&lt;br /&gt;
The first Unicode character in a range to provide glyphs for. &amp;amp;nbsp;This can be any Unicode character in the BMP.&lt;br /&gt;
&lt;br /&gt;
Note that all characters of a definition (i.e., &amp;amp;lt;font&amp;amp;gt; &amp;amp;lt;basechar&amp;amp;gt; &amp;amp;lt;numchar&amp;amp;gt; triplet) must fit within a &amp;amp;quot;block&amp;amp;quot; of 128 characters, i.e. you cannot define characters U+00E0..U+011F with one definition; instead you must split it into U+00E0..U+00FF and U+0100..U+011F because those are two different blocks.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+ 583 * 9 12 02 00 08 F8 00 0C 00 01+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Byte&#039;&#039;&#039;|&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
583|&amp;amp;lt;sprite-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
9|&amp;amp;lt;length&amp;amp;gt; of the action in bytes; start counting at 12 (&amp;amp;lt;action&amp;amp;gt;)&lt;br /&gt;
&lt;br /&gt;
12|&amp;amp;lt;action&amp;amp;gt;: sets this pseudo-sprite to function as action 12&lt;br /&gt;
&lt;br /&gt;
02|&amp;amp;lt;num-def&amp;amp;gt;: we&#039;re defining two ranges of characters&lt;br /&gt;
&lt;br /&gt;
00|&amp;amp;lt;font&amp;amp;gt;: first range, defining font 0 (normal size)&lt;br /&gt;
&lt;br /&gt;
08|&amp;amp;lt;num-char&amp;amp;gt;: defining 8 characters in a row&lt;br /&gt;
&lt;br /&gt;
F8 00|&amp;amp;lt;base-char&amp;amp;gt;: character U+00F8 is the first character&lt;br /&gt;
&lt;br /&gt;
00|&amp;amp;lt;font&amp;amp;gt;: second range, also defining font 0 (normal size)&lt;br /&gt;
&lt;br /&gt;
0C|&amp;amp;lt;num-char&amp;amp;gt;: defining another 12 characters&lt;br /&gt;
&lt;br /&gt;
00 01|&amp;amp;lt;base-char&amp;amp;gt;: character U+0100 is the first character||&lt;br /&gt;
&lt;br /&gt;
Therefore, this action 12 defines glyphs for Unicode characters U+00F8..U+010B. They are split into two definitions because a definition cannot cross a block boundary.&lt;br /&gt;
&lt;br /&gt;
After this action 12 follow 20 real sprites containing the glyphs for the above characters.&lt;/div&gt;</summary>
		<author><name>Lakie</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=ActionA&amp;diff=491</id>
		<title>ActionA</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=ActionA&amp;diff=491"/>
		<updated>2004-07-28T23:24:18Z</updated>

		<summary type="html">&lt;p&gt;Lakie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Modify TTD&#039;s sprites&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action A=&lt;br /&gt;
&lt;br /&gt;
Modify TTD&#039;s sprites.&lt;br /&gt;
&lt;br /&gt;
-=Introduction=-&lt;br /&gt;
&lt;br /&gt;
Unlike actions 1 and 5, which add new sprites for new features or vehicles, action A modifies TTD&#039;s built-in sprites.&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
The data looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 0A &amp;amp;lt;num-sets&amp;amp;gt; &amp;amp;lt;num-sprites&amp;amp;gt; &amp;amp;lt;first-sprite&amp;amp;gt;...+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes used in this action&lt;br /&gt;
&lt;br /&gt;
0A|B|Defines action 0A&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;num-sets&amp;amp;gt;|B|How many consecutive sets of sprites to replace&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;num-sprites&amp;amp;gt;|B|How many consecutives sprites in this set&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;first-sprites&amp;amp;gt;|W|Number of first sprite in this set||&lt;br /&gt;
&lt;br /&gt;
The set of &amp;amp;lt;num-sprites&amp;amp;gt; and &amp;amp;lt;first-sprites&amp;amp;gt; is repeated as often as &amp;amp;lt;num-sets&amp;amp;gt; specifies.&lt;br /&gt;
&lt;br /&gt;
The following sprites will be real sprites that replace the given TTD sprites. &amp;amp;nbsp;There must be as many of them as num-sprites of all sets added up.&lt;br /&gt;
&lt;br /&gt;
-=Filling in the terms=-&lt;br /&gt;
&lt;br /&gt;
===Sprite-number===&lt;br /&gt;
&lt;br /&gt;
This is just the number you are at.&lt;br /&gt;
&lt;br /&gt;
===Length===&lt;br /&gt;
&lt;br /&gt;
Count the number of bytes in this action.&lt;br /&gt;
&lt;br /&gt;
===num-sets===&lt;br /&gt;
&lt;br /&gt;
This sets how many different sets of sprites to replace. Each set are a number of consecutive sprites.&lt;br /&gt;
&lt;br /&gt;
===num-sprites===&lt;br /&gt;
&lt;br /&gt;
How many consecutive sprites to replace in this particular set.&lt;br /&gt;
&lt;br /&gt;
===first-sprite===&lt;br /&gt;
&lt;br /&gt;
The first sprite number to replace in this set.&lt;br /&gt;
&lt;br /&gt;
-=Notes=-&lt;br /&gt;
&lt;br /&gt;
You can find the sprite numbers by looking in trg1.pcx, they&#039;re the little numbers above each sprite, except for the climate-specific sprites which are more complicated.&lt;br /&gt;
&lt;br /&gt;
Unlike actions 1 and 5, the real sprites of action A do not count towards the sprite limit of 11484 total active sprites.&lt;br /&gt;
&lt;br /&gt;
To replace Sprites in other climates, you first need to find out what the sprite number is trg1.grf&lt;br /&gt;
&lt;br /&gt;
You set it to replace that number and add an Action7 which turns it off if it is not in the right climate.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
Below is an example of what a real Action A pseudo-sprite could look like with the sprite entries under it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;3 * 5 &amp;amp;nbsp; &amp;amp;nbsp; 0A 01 0C 3A 08&lt;br /&gt;
&lt;br /&gt;
4 c:\ttd\sprites\farmset.pcx 66 8 09 31 64 -31 0&lt;br /&gt;
&lt;br /&gt;
5 c:\ttd\sprites\farmset.pcx 146 8 09 31 64 -31 0&lt;br /&gt;
&lt;br /&gt;
6 c:\ttd\sprites\farmset.pcx 226 8 09 45 48 -15 -11&lt;br /&gt;
&lt;br /&gt;
7 c:\ttd\sprites\farmset.pcx 290 8 09 33 22 1 -10&lt;br /&gt;
&lt;br /&gt;
8 c:\ttd\sprites\farmset.pcx 322 8 09 31 64 -31 0&lt;br /&gt;
&lt;br /&gt;
9 c:\ttd\sprites\farmset.pcx 402 8 09 29 57 -26 -4&lt;br /&gt;
&lt;br /&gt;
10 c:\ttd\sprites\farmset.pcx 466 8 09 31 64 -31 0&lt;br /&gt;
&lt;br /&gt;
11 c:\ttd\sprites\farmset.pcx 546 8 09 31 39 -19 -6&lt;br /&gt;
&lt;br /&gt;
12 c:\ttd\sprites\farmset.pcx 594 8 09 31 64 -31 0&lt;br /&gt;
&lt;br /&gt;
13 c:\ttd\sprites\farmset.pcx 674 8 09 49 28 -6 -28&lt;br /&gt;
&lt;br /&gt;
14 c:\ttd\sprites\farmset.pcx 722 8 09 31 64 -31 0&lt;br /&gt;
&lt;br /&gt;
15 c:\ttd\sprites\farmset.pcx 2 72 09 30 55 -29 0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Byte&#039;&#039;&#039;|&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
3|&amp;amp;lt;sprite-number&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
5|&amp;amp;lt;length&amp;amp;gt; of the action in bytes; start counting at 0A (&amp;amp;lt;action&amp;amp;gt;)&lt;br /&gt;
&lt;br /&gt;
0A|&amp;amp;lt;action&amp;amp;gt;: sets this pseudo-sprite to function as action A&lt;br /&gt;
&lt;br /&gt;
01|&amp;amp;lt;num-sets&amp;amp;gt;: sets it to 1 set to replace&lt;br /&gt;
&lt;br /&gt;
0C|&amp;amp;lt;num-sprites&amp;amp;gt;: sets it to 12 sprites in this set.&lt;br /&gt;
&lt;br /&gt;
3A 08|&amp;amp;lt;first-sprite&amp;amp;gt;: First Sprite of the set (3A 08 - Farms)||&lt;/div&gt;</summary>
		<author><name>Lakie</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=ActionA&amp;diff=492</id>
		<title>ActionA</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=ActionA&amp;diff=492"/>
		<updated>2004-07-28T23:03:12Z</updated>

		<summary type="html">&lt;p&gt;Lakie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Modify TTD&#039;s sprites&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action A=&lt;br /&gt;
&lt;br /&gt;
Modify TTD&#039;s sprites.&lt;br /&gt;
&lt;br /&gt;
-=Introduction=-&lt;br /&gt;
&lt;br /&gt;
Unlike actions 1 and 5, which add new sprites for new features or vehicles, action A modifies TTD&#039;s built-in sprites.&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
The data looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 0A &amp;amp;lt;num-sets&amp;amp;gt; &amp;amp;lt;num-sprites&amp;amp;gt; &amp;amp;lt;first-sprite&amp;amp;gt;...+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes used in this action&lt;br /&gt;
&lt;br /&gt;
0A|B|Defines action 0A&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;num-sets&amp;amp;gt;|B|How many consecutive sets of sprites to replace&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;num-sprites&amp;amp;gt;|B|How many consecutives sprites in this set&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;first-sprites&amp;amp;gt;|W|Number of first sprite in this set||&lt;br /&gt;
&lt;br /&gt;
The set of &amp;amp;lt;num-sprites&amp;amp;gt; and &amp;amp;lt;first-sprites&amp;amp;gt; is repeated as often as &amp;amp;lt;num-sets&amp;amp;gt; specifies.&lt;br /&gt;
&lt;br /&gt;
The following sprites will be real sprites that replace the given TTD sprites. &amp;amp;nbsp;There must be as many of them as num-sprites of all sets added up.&lt;br /&gt;
&lt;br /&gt;
-=Filling in the terms=-&lt;br /&gt;
&lt;br /&gt;
===Sprite-number===&lt;br /&gt;
&lt;br /&gt;
This is just the number you are at.&lt;br /&gt;
&lt;br /&gt;
===Length===&lt;br /&gt;
&lt;br /&gt;
Count the number of bytes in this action.&lt;br /&gt;
&lt;br /&gt;
===num-sets===&lt;br /&gt;
&lt;br /&gt;
This sets how many different sets of sprites to replace. Each set are a number of consecutive sprites.&lt;br /&gt;
&lt;br /&gt;
===num-sprites===&lt;br /&gt;
&lt;br /&gt;
How many consecutive sprites to replace in this particular set.&lt;br /&gt;
&lt;br /&gt;
===first-sprite===&lt;br /&gt;
&lt;br /&gt;
The first sprite number to replace in this set.&lt;br /&gt;
&lt;br /&gt;
-=Notes=-&lt;br /&gt;
&lt;br /&gt;
You can find the sprite numbers by looking in trg1.pcx, they&#039;re the little numbers above each sprite, except for the climate-specific sprites which are more complicated.&lt;br /&gt;
&lt;br /&gt;
Unlike actions 1 and 5, the real sprites of action A do not count towards the sprite limit of 11484 total active sprites.&lt;br /&gt;
&lt;br /&gt;
To replace Sprites in other climates, you first need to find out what the sprite number is trg1.grf&lt;br /&gt;
&lt;br /&gt;
You set it to replace that number and add an Action7 which turns it off if it is not in the right climate.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&#039;color:#808080&#039;&amp;gt;Something to go here&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lakie</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=ActionA&amp;diff=493</id>
		<title>ActionA</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=ActionA&amp;diff=493"/>
		<updated>2004-07-28T23:00:55Z</updated>

		<summary type="html">&lt;p&gt;Lakie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Modify TTD&#039;s sprites&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action A=&lt;br /&gt;
&lt;br /&gt;
Modify TTD&#039;s sprites.&lt;br /&gt;
&lt;br /&gt;
-=Introduction=-&lt;br /&gt;
&lt;br /&gt;
Unlike actions 1 and 5, which add new sprites for new features or vehicles, action A modifies TTD&#039;s built-in sprites.&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
The data looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; -+&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; 0A &amp;amp;lt;num-sets&amp;amp;gt; &amp;amp;lt;num-sprites&amp;amp;gt; &amp;amp;lt;first-sprite&amp;amp;gt;...+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Element&#039;&#039;&#039;|[[GRFActionsDetailed|&#039;&#039;&#039;Size&#039;&#039;&#039;]]|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Sprite-number&amp;amp;gt;|dec|A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;length&amp;amp;gt;|dec|The total number of bytes used in this action&lt;br /&gt;
&lt;br /&gt;
0A|B|Defines action 0A&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;num-sets&amp;amp;gt;|B|How many consecutive sets of sprites to replace&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;num-sprites&amp;amp;gt;|B|How many consecutives sprites in this set&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;first-sprites&amp;amp;gt;|W|Number of first sprite in this set||&lt;br /&gt;
&lt;br /&gt;
The set of &amp;amp;lt;num-sprites&amp;amp;gt; and &amp;amp;lt;first-sprites&amp;amp;gt; is repeated as often as &amp;amp;lt;num-sets&amp;amp;gt; specifies.&lt;br /&gt;
&lt;br /&gt;
The following sprites will be real sprites that replace the given TTD sprites. &amp;amp;nbsp;There must be as many of them as num-sprites of all sets added up.&lt;br /&gt;
&lt;br /&gt;
-=Filling in the terms=-&lt;br /&gt;
&lt;br /&gt;
===Sprite-number===&lt;br /&gt;
&lt;br /&gt;
This is just the number you are at.&lt;br /&gt;
&lt;br /&gt;
===Length===&lt;br /&gt;
&lt;br /&gt;
Count the number of bytes in this action.&lt;br /&gt;
&lt;br /&gt;
===num-sets===&lt;br /&gt;
&lt;br /&gt;
This sets how many different sets of sprites to replace. Each set are a number of consecutive sprites.&lt;br /&gt;
&lt;br /&gt;
===num-sprites===&lt;br /&gt;
&lt;br /&gt;
How many consecutive sprites to replace in this particular set.&lt;br /&gt;
&lt;br /&gt;
===first-sprite===&lt;br /&gt;
&lt;br /&gt;
The first sprite number to replace in this set.&lt;br /&gt;
&lt;br /&gt;
-=Notes=-&lt;br /&gt;
&lt;br /&gt;
You can find the sprite numbers by looking in trg1.pcx, they&#039;re the little numbers above each sprite, except for the climate-specific sprites which are more complicated.&lt;br /&gt;
&lt;br /&gt;
Unlike actions 1 and 5, the real sprites of action A do not count towards the sprite limit of 11484 total active sprites.&lt;br /&gt;
&lt;br /&gt;
To replace Sprites in other climates, you first need to find out what the sprite number is trg1.grf&lt;br /&gt;
&lt;br /&gt;
You set it to replace that number and add an Action7 which turns it off if itis not in the right climate.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&#039;color:#808080&#039;&amp;gt;Something to go here&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lakie</name></author>
	</entry>
</feed>