<?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=Andythenorth</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=Andythenorth"/>
	<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/wiki/Special:Contributions/Andythenorth"/>
	<updated>2026-05-27T10:12:42Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Cargos&amp;diff=5223</id>
		<title>NML:Cargos</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Cargos&amp;diff=5223"/>
		<updated>2026-01-17T18:49:40Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* Cargo classes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
==Cargo IDs==&lt;br /&gt;
For cargos, the item ID corresponds to the cargo type slot of the cargo. TTD default cargos occupy slots 0-11, so if you want to define a new cargo be sure to set this ID to 12 or higher. It is recommended to set the &#039;number&#039;-property to the same value as the item ID.&lt;br /&gt;
&lt;br /&gt;
==Cargo properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| number&lt;br /&gt;
| 0..63&lt;br /&gt;
| Number of the cargo for bitmasks. Prior to {{ottd|1.9}} this was clamped to 0..31. This mostly affects old NewGRFs that don&#039;t have a cargo translation table.&lt;br /&gt;
|-&lt;br /&gt;
| type_name&lt;br /&gt;
| string&lt;br /&gt;
| String to use as cargo type name. Example: &amp;quot;Passengers&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_CARGO_PLURAL_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| unit_name&lt;br /&gt;
| string&lt;br /&gt;
| String to use for the name of one unit from the cargo type. Currently used for subsidies only (First Passenger service to..). Example string: &amp;quot;Passenger&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_CARGO_SINGULAR_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| units_of_cargo&lt;br /&gt;
| string&lt;br /&gt;
| String used to show the &amp;quot;short cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 tonnes&amp;quot; or &amp;quot;20.000 litres&amp;quot;. Example: &amp;quot;{COMMA} item{P &amp;quot;&amp;quot; s}&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_PASSENGERS and further), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| items_of_cargo&lt;br /&gt;
| string&lt;br /&gt;
| String used to show the &amp;quot;long cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 tonnes of coal&amp;quot; or &amp;quot;20.000 litres of water&amp;quot;. Example: &amp;quot;{COMMA} item{P &amp;quot;&amp;quot; s} of livestock&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_QUANTITY_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| type_abbreviation&lt;br /&gt;
| string&lt;br /&gt;
| String used for the two-letter cargo type abbreviation. Must start with a {TINYFONT} string-code. Example: &amp;quot;{TINYFONT}XX&amp;quot;. Make sure to avoid multiple cargos having the same abbreviation. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_ABBREV_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| sprite&lt;br /&gt;
| sprite&lt;br /&gt;
| TTD sprite number for the icon of the cargo. Alternatively, set to NEW_CARGO_SPRITE and use a graphics block to define a custom sprite.&lt;br /&gt;
|-&lt;br /&gt;
| weight&lt;br /&gt;
| float 0..255&lt;br /&gt;
| Weight of one unit of the cargo (in tons)&lt;br /&gt;
|-&lt;br /&gt;
| penalty_lowerbound&lt;br /&gt;
| 0..255&lt;br /&gt;
| Delivery time until penalty is applied. The units depend on the vehicle used (see vehicle property &#039;cargo_age_period&#039;), by default 1 unit = 2.5 days.&lt;br /&gt;
|-&lt;br /&gt;
| single_penalty_length&lt;br /&gt;
| 0..255&lt;br /&gt;
| Length of the interval where a single penalty is applied&lt;br /&gt;
|-&lt;br /&gt;
| price_factor&lt;br /&gt;
| float&lt;br /&gt;
| Payment for delivering 10 units of cargo across a distance of 20 squares (in British Pounds), when delivering in less than &#039;penalty_lowerbound&#039; time (no time penalty).&lt;br /&gt;
|-&lt;br /&gt;
| station_list_colour&lt;br /&gt;
| 0..255&lt;br /&gt;
|&lt;br /&gt;
Colour for the station list window (index from the [[NML:Graphic files|default (DOS) palette]])&lt;br /&gt;
|-&lt;br /&gt;
| cargo_payment_list_colour&lt;br /&gt;
| 0..255&lt;br /&gt;
|&lt;br /&gt;
Colour for the cargo payment list window (index from the [[NML:Graphic files|default (DOS) palette]])&lt;br /&gt;
|-&lt;br /&gt;
| is_freight&lt;br /&gt;
| 0 or 1&lt;br /&gt;
| Freight status (for the freighttrains switch); 0=not freight, 1=is freight&lt;br /&gt;
|-&lt;br /&gt;
| cargo_classes&lt;br /&gt;
|&lt;br /&gt;
bitmask([[#Cargo classes|cargo classes]])&lt;br /&gt;
| Cargo classes&lt;br /&gt;
|-&lt;br /&gt;
| cargo_label&lt;br /&gt;
| 4 letters&lt;br /&gt;
| [[CargoTypes|Cargo label]], as used in the [[NML:Cargotable|cargo table]]&lt;br /&gt;
|-&lt;br /&gt;
| town_growth_effect&lt;br /&gt;
| TOWNGROWTH_XXX&lt;br /&gt;
|&lt;br /&gt;
Effect for town growth, see [[#Cargo effects on town growth|Cargo effects on town growth]]&lt;br /&gt;
|-&lt;br /&gt;
| town_growth_multiplier&lt;br /&gt;
| float 0..255&lt;br /&gt;
| {{ottd|no}} Multiplier for town growth. To be used in conjuction with town_growth_effect, when that is not TOWNGROWTH_NONE. For example, a value of 4 makes your cargo have the same effect on town growth as 4 units of food/goods/etc.&lt;br /&gt;
|-&lt;br /&gt;
| callback_flags&lt;br /&gt;
| bitmask(flags)&lt;br /&gt;
|&lt;br /&gt;
Do not set this, unless you use [[NML:Old style callbacks|old-style callbacks]].&lt;br /&gt;
|-&lt;br /&gt;
| capacity_multiplier&lt;br /&gt;
| float 0 .. 255&lt;br /&gt;
| {{ottd|1.2|r22860}} This defines the capacity of vehicles carrying this cargo type, if the vehicle sets no specific capacity to this specific cargo type. Set this property to the amount of cargo a vehicle shall carry, which can carry 1 ton of coal or 1000 thousand litres of water (whatever comparison is more suitable for your cargotype). Depending on whether your cargo type is light or heavy you should set this property either comparing the weight or the volume. Default values are 4 for passengers, 2 for mail, goods and sweets and 1 for all other cargos.&lt;br /&gt;
|-&lt;br /&gt;
| town_production_effect&lt;br /&gt;
| TOWNPRODUCTION_XXX&lt;br /&gt;
| {{ottdp|14.0|no}} Effect for town production, see [[#Town production effect|Town production effect]]&lt;br /&gt;
|-&lt;br /&gt;
| town_production_multiplier&lt;br /&gt;
| float 0..255&lt;br /&gt;
| {{ottdp|14.0|no}} Multiplier for town production, to be used in conjunction with town_production_effect, when that is not TOWNPRODUCTION_NONE. For example, a value of 4 makes a town produce 4 times as much cargo as normal.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Cargo payment is computed from &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;price_factor&amp;lt;/code&amp;gt;, amount of cargo transported, distance, and a time delivery factor. Unit of the delivery time is 185 ticks, roughly 2.5 days. The factor is constant (with value 255) if delivery time is less than &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;penalty_lowerbound&amp;lt;/code&amp;gt;. It goes down with rate 1 between &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;penalty_lowerbound + single_penalty_length&amp;lt;/code&amp;gt;, and goes down with rate 2 if the delivery time is even longer. Time delivery factor is never less than 31.&lt;br /&gt;
&lt;br /&gt;
===Cargo classes===&lt;br /&gt;
&lt;br /&gt;
Available cargo classes are listed in the following table. Cargos may be in more than one class. Cargo classes are always used as a bitmask, use the built-in function &amp;lt;code&amp;gt;bitmask()&amp;lt;/code&amp;gt;. For example, &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(CC_EXPRESS, CC_REFRIGERATED)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The history of cargo classes is complex, and the meanings here may not be consistent with how classes are actually used by some grfs.&lt;br /&gt;
&lt;br /&gt;
FIRS and Iron Horse do not conform to the classes here, and use the FRAX Cargo Class Scheme, please see: https://grf.farm/polar-fox/frax_latest.html&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! type of cargo&lt;br /&gt;
|-&lt;br /&gt;
| CC_PASSENGERS&lt;br /&gt;
| passengers, also tourists (ECS)&lt;br /&gt;
|-&lt;br /&gt;
| CC_MAIL&lt;br /&gt;
| mail&lt;br /&gt;
|-&lt;br /&gt;
| CC_EXPRESS&lt;br /&gt;
| express goods, also tourists (ECS)&lt;br /&gt;
|-&lt;br /&gt;
| CC_ARMOURED&lt;br /&gt;
| valuables, diamonds, gold and alike&lt;br /&gt;
|-&lt;br /&gt;
| CC_BULK&lt;br /&gt;
| coal, ore, grain,...&lt;br /&gt;
|-&lt;br /&gt;
| CC_PIECE_GOODS&lt;br /&gt;
| containers, crates, livestock&lt;br /&gt;
|-&lt;br /&gt;
| CC_LIQUID&lt;br /&gt;
| oil, milk, water, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_REFRIGERATED&lt;br /&gt;
| food, milk, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_HAZARDOUS&lt;br /&gt;
| chemicals?, uranium, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_COVERED&lt;br /&gt;
| grain, cement, fruit, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_OVERSIZED&lt;br /&gt;
| vehicles, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_POWDERIZED&lt;br /&gt;
| cement, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_NON_POURABLE&amp;lt;br&amp;gt;CC_NEO_BULK&lt;br /&gt;
| sugar cane, wool or straw bales, ... (these are synonyms for cargos that are bulk, but can&#039;t be handled in e.g. hoppers)&lt;br /&gt;
|-&lt;br /&gt;
| CC_POTABLE&lt;br /&gt;
| exclude from non-food-grade vehicles&lt;br /&gt;
|-&lt;br /&gt;
| CC_NON_POTABLE&lt;br /&gt;
| exclude from food-grade vehicles&lt;br /&gt;
|-&lt;br /&gt;
| CC_SPECIAL&lt;br /&gt;
| Deprecated, do not set.&lt;br /&gt;
|-&lt;br /&gt;
| NO_CARGO_CLASS&lt;br /&gt;
| Special value that you can used to instead of 0.&lt;br /&gt;
|-&lt;br /&gt;
| ALL_NORMAL_CARGO_CLASSES&lt;br /&gt;
| Bitmask of all cargo classes except CC_SPECIAL. This is the same as &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(CC_PASSENGERS, CC_MAIL, ..., CC_NON_POTABLE)&amp;lt;/code&amp;gt;. Note: This is already a bitmask, don&#039;t use the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(..)&amp;lt;/code&amp;gt; function with this.&lt;br /&gt;
|-&lt;br /&gt;
| ALL_CARGO_CLASSES&lt;br /&gt;
| Bitmask of all cargo classes. Same as &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;ALL_NORMAL_CARGO_CLASSES | bitmask(CC_SPECIAL)&amp;lt;/code&amp;gt; Note: This is already a bitmask, don&#039;t use the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(..)&amp;lt;/code&amp;gt; function with this.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Cargo effects on town growth===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! value&lt;br /&gt;
! effect&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_PASSENGERS&lt;br /&gt;
| Affect towns as passengers do&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_MAIL&lt;br /&gt;
| Affect towns as mail does&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_GOODS&lt;br /&gt;
| Affect towns as goods/candy does&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_WATER&lt;br /&gt;
| Affect towns as water does (second required cargo for towngrowth in the desert)&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_FOOD&lt;br /&gt;
| Affect towns as food/fizzy drinks do (first required cargo for towngrowth in desert/above snowline)&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_NONE&lt;br /&gt;
| Don&#039;t affect town growth (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If no cargos in the game are defined as TOWNGROWTH_FOOD, towns above the snowline will not require food to grow. If no cargos in the game are defined as TOWNGROWTH_FOOD or TOWNGROWTH_WATER, towns in desert will not require food or water to grow. This can be used positively for gameplay purposes, and is otherwise worth being aware of as an unintended side effect when designing cargos.&lt;br /&gt;
&lt;br /&gt;
There are some additional effects of these flags on subsidies and town cargo transport statistics.  See the nfo docs for details: https://newgrf-specs.tt-wiki.net/wiki/Action0/Cargos#Substitute_type_and_multiplier_for_town_growth_.2818.2C_19.29&lt;br /&gt;
&lt;br /&gt;
===Town production effect===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! value&lt;br /&gt;
! effect&lt;br /&gt;
|-&lt;br /&gt;
| TOWNPRODUCTION_PASSENGERS&lt;br /&gt;
| Town produces cargo as like passengers&lt;br /&gt;
|-&lt;br /&gt;
| TOWNPRODUCTION_MAIL&lt;br /&gt;
| Town produces cargo as like mail&lt;br /&gt;
|-&lt;br /&gt;
| TOWNPRODUCTION_NONE&lt;br /&gt;
| Town does not produce cargo (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Cargo variables==&lt;br /&gt;
&lt;br /&gt;
Cargos have no variables (yet).&lt;br /&gt;
&lt;br /&gt;
==Cargo callbacks==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! callback&lt;br /&gt;
! return value&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| default&lt;br /&gt;
| Sprite set (with 1 sprite)&lt;br /&gt;
| Graphics for the cargo icon (only if property &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;sprite&amp;lt;/code&amp;gt; is set to NEW_CARGO_SPRITE)&lt;br /&gt;
|-&lt;br /&gt;
| station_rating&lt;br /&gt;
| -16384 .. 16383&lt;br /&gt;
| See detailed explanation below&lt;br /&gt;
|-&lt;br /&gt;
| profit&lt;br /&gt;
| -12748 .. 12748&lt;br /&gt;
| Called whenever cargo is delivered.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 16):&amp;lt;/code&amp;gt; The manhattan distance the cargo was transported.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 16, 8):&amp;lt;/code&amp;gt; The amount of cargo delivered.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 24, 8):&amp;lt;/code&amp;gt; The time spent en-route (1 unit = 2.5 days).&lt;br /&gt;
The returned value is multiplied by the amount and the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;price_factor&amp;lt;/code&amp;gt; to determine the income the player receives. Returning negative values is possible, it makes players pay for the delivery.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Station rating callback===&lt;br /&gt;
&lt;br /&gt;
The station rating callback is quite complicated and deserves some detailed explanation. The default station rating calculation works as follows:&lt;br /&gt;
&lt;br /&gt;
Internally, station rating is byte with values 0 .. 255, representing respectively 0% and 100%. Every 2.5 days, the transportation &#039;performance&#039; is calculated using some factors outlined below. The station rating is then set to this performance value, with the caveat that the rating change cannot exceed 2 points. Therefore, rating changes are always slow, this callback cannot change this. The initial rating is 175 points (69%). The following factors are parts of the performance, their effects are summed.&lt;br /&gt;
&lt;br /&gt;
====Time since the cargo was last picked up====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Time units (days)&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;gt;21 (&amp;amp;gt;52.5 days)&lt;br /&gt;
| 0 (0%)&lt;br /&gt;
|-&lt;br /&gt;
| 13 .. 21 (32.5 days .. 52.5 days)&lt;br /&gt;
| 25 (10%)&lt;br /&gt;
|-&lt;br /&gt;
| 7 .. 12 (17.5 days .. 32.5 days)&lt;br /&gt;
| 50 (20%)&lt;br /&gt;
|-&lt;br /&gt;
| 4 .. 6 (10 days .. 17.5 days)&lt;br /&gt;
| 95 (37%)&lt;br /&gt;
|-&lt;br /&gt;
| 0..3 (0 days..10 days)&lt;br /&gt;
| 130 (51%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The time unit used equals 185 engine ticks, or 2.5 TTD days. For ships, the time units are divided by 4 before calculating this component, so ships have four times more time before the ratings start dropping.&lt;br /&gt;
&lt;br /&gt;
====Amount of cargo waiting====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Amount of cargo&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;gt;1500&lt;br /&gt;
| -90 (-35%)&lt;br /&gt;
|-&lt;br /&gt;
| 1001..1500&lt;br /&gt;
| -35 (-14%)&lt;br /&gt;
|-&lt;br /&gt;
| 601..1000&lt;br /&gt;
| 0 (0%)&lt;br /&gt;
|-&lt;br /&gt;
| 301..600&lt;br /&gt;
| 10 (4%)&lt;br /&gt;
|-&lt;br /&gt;
| 101..300&lt;br /&gt;
| 30 (12%)&lt;br /&gt;
|-&lt;br /&gt;
| 0..100&lt;br /&gt;
| 40 (16%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Max. speed of the last vehicle picking up the cargo====&lt;br /&gt;
&lt;br /&gt;
This calculation is somewhat complicated. The maximum speed of the vehicle is expressed in &amp;quot;speed units&amp;quot;. For trains and road vehicles, the speed unit is 1 km/h; for ships, it&#039;s 0.5 km/h; for aircraft, it&#039;s 8 mph. If the max. speed is above 255 speed units, 255 is used instead. If the vehicle is slower than 85 units, no points are awarded; otherwise, you get (speed_units-85)/4 points. Therefore, the maximum you can get is 42 points, or 16%.&lt;br /&gt;
&lt;br /&gt;
====Age of the last carrier picking up the cargo====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Age of vehicle (years)&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 10 (4%)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 20 (8%)&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 33 (13%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In TTDPatch this changes when the &#039;newagerating&#039; switch is enabled&lt;br /&gt;
&lt;br /&gt;
====Bonus for AI companies (TTDPatch only)====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! AI intelligence setting&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| Low&lt;br /&gt;
| 0 (0%)&lt;br /&gt;
|-&lt;br /&gt;
| Medium&lt;br /&gt;
| 31 (12%)&lt;br /&gt;
|-&lt;br /&gt;
| High&lt;br /&gt;
| 63 (25%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Bonus for statue in nearest town====&lt;br /&gt;
&lt;br /&gt;
If your company has erected a statue in the nearest town, you get 26 points (10%) bonus to all cargo ratings.&lt;br /&gt;
&lt;br /&gt;
====Callback parameters====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;:&lt;br /&gt;
{| |-&lt;br /&gt;
!value!!meaning&lt;br /&gt;
|-&lt;br /&gt;
|0x10||the last vehicle entering the station was a train&lt;br /&gt;
|-&lt;br /&gt;
|0x11||the last vehicle entering the station was a road vehicle&lt;br /&gt;
|-&lt;br /&gt;
|0x12||the last vehicle entering the station was a ship&lt;br /&gt;
|-&lt;br /&gt;
|0x13||the last vehicle entering the station was an aircraft&lt;br /&gt;
|-&lt;br /&gt;
|0||no vehicle entered the station yet, or (TTDPatch) the last one entering was sold&lt;br /&gt;
|}&lt;br /&gt;
Please note that there&#039;s only one &amp;quot;last vehicle type&amp;quot; field per station, so the vehicle this refers to may not have picked up any of your cargo.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 8)&amp;lt;/code&amp;gt;: The time since the cargo was last picked up, in the time units described above (1 unit = 2.5 days independent of vehicle type)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 8, 16)&amp;lt;/code&amp;gt;: The amount of cargo waiting.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 24, 8)&amp;lt;/code&amp;gt;: The speed of the last vehicle picking the cargo up, in the speed units described above (if no vehicle entered the station yet, the value is 0xFF).&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Effect of callback====&lt;br /&gt;
&lt;br /&gt;
The return value of the callback replaces the first three components (time since pickup, amount of cargo, max speed) of the calculation. The bonus for statues, TTDPatch AIs and new vehicles is always in effect, you cannot (yet) change this.&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Cargos&amp;diff=5222</id>
		<title>Action0/Cargos</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Cargos&amp;diff=5222"/>
		<updated>2026-01-17T18:49:26Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* CargoClasses (16) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The [[ttwiki:NewCargos|NewCargos]] switch of TTDPatch allows modifying the existing 12 cargos per climate, and allows adding 20 new cargos per climate as well. These cargo slots are numbered from 0 to 31, where slots 0-11 are used by default TTD cargos and slots 12-31 contain uninitialized garbage by default (so you can&#039;t trust them having meaningful information, you must set all of their properties).&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=11ab3c4e}} OpenTTD 1.9 increases the number of cargos to 64.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||B||{{ottdp|0.6|2.5}}||Bit number for bitmasks&lt;br /&gt;
|-&lt;br /&gt;
|09||W||{{ottdp|0.6|2.5}}||TextID for the cargo type name&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|0.6|2.5}}||TextID for the name of one unit from the cargo type&lt;br /&gt;
|-&lt;br /&gt;
|0B||W||{{ottdp|0.6|2.5}}||TextID to be displayed for 1 unit of cargo&lt;br /&gt;
|-&lt;br /&gt;
|0C||W||{{ottdp|0.6|2.5}}||TextID to be displayed for multiple units of cargo&lt;br /&gt;
|-&lt;br /&gt;
|0D||W||{{ottdp|0.6|2.5}}||TextID for cargo type abbreviation&lt;br /&gt;
|-&lt;br /&gt;
|0E||W||{{ottdp|0.6|2.5}}||Sprite number for the icon of the cargo&lt;br /&gt;
|-&lt;br /&gt;
|0F||B||{{ottdp|0.6|2.5}}||Weight of one unit of the cargo&lt;br /&gt;
|-&lt;br /&gt;
|10,11||B||{{ottdp|0.6|2.5}}||Penalty times&lt;br /&gt;
|-&lt;br /&gt;
|12||D||{{ottdp|0.6|2.5}}||Base price&lt;br /&gt;
|-&lt;br /&gt;
|13||B||{{ottdp|0.6|2.5}}||Color for the station list window&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|0.6|2.5}}||Color for the cargo payment list window&lt;br /&gt;
|-&lt;br /&gt;
|15||B||{{ottdp|0.6|2.5}}||Freight status (for freight-weight-multiplier setting); 0=not freight, 1=is freight&lt;br /&gt;
|-&lt;br /&gt;
|16||W||{{ottdp|0.6|2.5}}||Cargo classes&lt;br /&gt;
|-&lt;br /&gt;
|17||D||{{ottdp|0.6|2.5}}||Cargo label&lt;br /&gt;
|-&lt;br /&gt;
|18||B||{{ottdp|0.6|2.5|ttdprev=alpha 72}}||Substitute type for town growth&lt;br /&gt;
|-&lt;br /&gt;
|19||W||{{ottdp|no|2.5|ttdprev=alpha 72}}||Multiplier for town growth&lt;br /&gt;
|-&lt;br /&gt;
|1A||B||{{ottdp|0.6|2.5|ttdprev=alpha 72}}||Callback flags&lt;br /&gt;
|-&lt;br /&gt;
|1B||W||{{ottdp|1.1|no|ottdrev=r21224}}||TextID for displaying the units of a cargo&lt;br /&gt;
|-&lt;br /&gt;
|1C||W||{{ottdp|1.1|no|ottdrev=r21224}}||TextID for displaying the amount of cargo&lt;br /&gt;
|-&lt;br /&gt;
|1D||W||{{ottdp|1.2|no|ottdrev=r23860}}||Capacity mulitplier&lt;br /&gt;
|-&lt;br /&gt;
|1E||B||{{ottdp|14.0|no}}||Town Production effect&lt;br /&gt;
|-&lt;br /&gt;
|1F||W||{{ottdp|14.0|no}}||Town Production multiplier&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Bit number for bitmasks (08) ===&lt;br /&gt;
&lt;br /&gt;
This value must be used in [[Action3]] and in cargo bit mask properties such as refit masks. Values 1C-1F should be safe to use (if they aren&#039;t already taken, of course) if you intend to maintain compatibility with GRFs unaware of the newcargos switch. Further assuming that no active GRFs support the toyland climate, you can use values 11-1A as well.&lt;br /&gt;
&lt;br /&gt;
Additionally, you can use the value FFh to disable the given cargo slot. This way, it won&#039;t appear in cargo type lists, but it won&#039;t be removed from things already on the map. If you disable a cargo, you&#039;ll probably want to zero out the cargo label (property 17) as well.&lt;br /&gt;
&lt;br /&gt;
This property only affects GRFs which do not have a [[Action0/Global Settings#Cargo_translation_table_.2809.29 | cargo translation table]]. GRFs with such a table generally use the index of the cargo in the table instead of the value of this property to access a cargo. As such this property is more or less a default value for GRFs without cargo translation table. If you are unsure what value to assign to this property, set it to the same value as the cargo slot ID.&lt;br /&gt;
&lt;br /&gt;
=== TextID for the cargo type name (09) ===&lt;br /&gt;
&lt;br /&gt;
This textID should refer to the name of the cargo, capitalized, to match the TTD style (e.g. &amp;quot;Passengers&amp;quot;, &amp;quot;Coal&amp;quot;, &amp;quot;Gold Ore&amp;quot;, &amp;quot;Milk&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
You can reuse existing [[TextIDs]] or create custom strings using [[Action4]] with an offset in the DCxx range. Note that you need to set language-id bit 7 as well in the Action4 for a custom string. (Also applies to properties 0A to 0D)&lt;br /&gt;
&lt;br /&gt;
=== TextID for one unit of the type (0A) ===&lt;br /&gt;
&lt;br /&gt;
This textID should refer to the cargo type name in the singular. Currently, this ID is used only in subsidy messages (&amp;quot;First Passenger service...&amp;quot; instead of &amp;quot;First Passengers service...&amp;quot;, for example)&lt;br /&gt;
&lt;br /&gt;
=== TextID for 1 unit of cargo (0B) ===&lt;br /&gt;
&lt;br /&gt;
This textID will be used to display the amount of the cargo if there&#039;s exactly 1 unit waiting. Although there&#039;s only one unit waiting, you&#039;ll still have to use either the special character 7C (print signed word) or 87 (print amount in litres and add suffix &amp;quot; litres&amp;quot;) so TTD removes the amount from its internal reference stack. For example, if you have a new cargo named &amp;quot;gold ore&amp;quot;, this should be &amp;quot;\7C ton of gold ore&amp;quot;, which will expand to &amp;quot;1 ton of gold ore&amp;quot;. On the other hand, a liquid cargo named &amp;quot;milk&amp;quot; should be something like &amp;quot;\87 of milk&amp;quot;, which will expand to either &amp;quot;100 litres of milk&amp;quot; or &amp;quot;1,000 litres of milk&amp;quot; (The multiplier for liquid cargos depends on miscmods.dontfixlitres. If it&#039;s on, the multiplier is 100, otherwise it&#039;s 1000)&lt;br /&gt;
&lt;br /&gt;
=== TextID for multiple units of cargo (0C) ===&lt;br /&gt;
&lt;br /&gt;
This textID will be used to display the amount of cargo if the amount waiting isn&#039;t exactly 1. You&#039;ll need the same special characters as above, but now they will be expanded according to the actual cargo waiting. Sticking to the example above, you&#039;ll need &amp;quot;\7C tons of gold ore&amp;quot; and &amp;quot;\87 of milk&amp;quot;, which can expand to &amp;quot;42 tons of gold ore&amp;quot; and &amp;quot;42,000 litres of milk&amp;quot;, accordingly. You will note that liquid cargos can have the same textID for both property 0B and 0C since they always use the plural form.&lt;br /&gt;
&lt;br /&gt;
=== TextID for cargo type abbreviation (0D) ===&lt;br /&gt;
&lt;br /&gt;
This textID will be used in the station list window to represent the cargo waiting. It should be a two-letter abbreviation prefixed by the special character 0E to switch to the microscopic font. The microscopic font has every letter capitalized, so capitalization isn&#039;t important here. Continuing the above example, gold ore could have this as &amp;quot;GO&amp;quot; and milk as &amp;quot;MK&amp;quot; (&amp;quot;ML&amp;quot; is already taken by mail).&lt;br /&gt;
&lt;br /&gt;
=== Sprite number for icon (0E) ===&lt;br /&gt;
&lt;br /&gt;
This is a sprite number of an old TTD sprite to be displayed in the station window for this cargo, or FFFFh if the icon should be found by following the action 3 associated with this cargo. The icon must not be bigger than 10x10 pixels. One icon will be shown for every 10 units of the cargo waiting, up to 23 icons, which is the maximum.&lt;br /&gt;
&lt;br /&gt;
=== Weight of one unit of the cargo (0F) ===&lt;br /&gt;
&lt;br /&gt;
This property defines the weight of 1 unit from the cargo, which will be used to calculate the weight of the vehicles when loaded. The unit is 1/16 ton (which is 62.5 kg). With the examples above, gold ore should have this as 16 (since 1 ton of gold ore should weigh exactly 1 ton), while milk should have this slightly above 16 (milk is denser than water).&lt;br /&gt;
&lt;br /&gt;
=== Penalty times and price factor (10,11,12) ===&lt;br /&gt;
&lt;br /&gt;
These three values define how much is paid for the delivery of the cargo type. The price factor is subject to inflation, but GRFs needn&#039;t care about this, the programme will adjust the price for them.&lt;br /&gt;
&lt;br /&gt;
The income generated from cargo delivery is calculated as:&lt;br /&gt;
&lt;br /&gt;
income=((((distance/2) * timefactor * amount_moved) &amp;gt;&amp;gt; 7) * cargopricefactor) &amp;gt;&amp;gt; 13&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
; a &amp;gt;&amp;gt; b : means a is arithmetically shifted right by b bits&lt;br /&gt;
; distance : is the Manhattan distance between the two station signs&lt;br /&gt;
; amount_moved : is the number of cargo units moved&lt;br /&gt;
; cargopricefactor : is the value you set in property 12. Inflation will be applied automatically on it.&lt;br /&gt;
; timefactor : is a multiplier in the range 0..255, calculated in the following way: (T1 is the value of property 10, T2 is the value of property 11, t is the time the delivery took, the unit is 185 game ticks (roughly 2.5 game days) )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    if t&amp;lt;=T1 then timefactor=255&lt;br /&gt;
    else if t&amp;lt;=(T1+T2) then timefactor=255-(t-T1)&lt;br /&gt;
    else timefactor=255-(t-T1)-(t-T1-T2)&lt;br /&gt;
    if the above rules result in a timefactor less than 31, 31 is used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Color for the station list window (13) ===&lt;br /&gt;
&lt;br /&gt;
This color index will be used to draw the rectangle representing the amount waiting from the current cargo type in the station list window. The index should be given for the DOS palette. OpenTTD and TTDPatch will automatically translate the index for the Windows palette, if they use the windows base graphics.&lt;br /&gt;
&lt;br /&gt;
=== Color for the cargo payment list window (14) ===&lt;br /&gt;
&lt;br /&gt;
The graph of the current cargo will be drawn using this color in the cargo payment rates graph. The index should be given for the DOS palette, the Windows version of TTDPatch will automatically translate the index for the Windows palette.&lt;br /&gt;
&lt;br /&gt;
=== CargoClasses (16) ===&lt;br /&gt;
&lt;br /&gt;
See [[Action0Trains#Cargo classes .2828.2C_29.29|train prop. 28/29]] for a description of the utility of this property.&lt;br /&gt;
&lt;br /&gt;
The history of cargo classes is complex, and the meanings here may not be consistent with how classes are actually used by some grfs.&lt;br /&gt;
&lt;br /&gt;
FIRS and Iron Horse do not conform to the classes here, and use the FRAX Cargo Class Scheme, please see: https://grf.farm/polar-fox/frax_latest.html&lt;br /&gt;
&lt;br /&gt;
This is a bit mask of all cargo classes to which this cargo could belong.&lt;br /&gt;
The following classes are available:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
!bit&lt;br /&gt;
!value&lt;br /&gt;
!class name&lt;br /&gt;
!wagon type&amp;lt;ref name=vehicle&amp;gt;Suggestion for vehicle types which transport this cargo&amp;lt;/ref&amp;gt;&lt;br /&gt;
!usage&amp;lt;ref name=refitusage&amp;gt;Suggestion how to best make use of this class in the refit masks of vehicles&amp;lt;br&amp;gt;OR to be included in the &#039;allowed classes&#039; (train prop. 28), AND NOT in the &#039;disallowed classes&#039; (train prop. 29)&amp;lt;/ref&amp;gt;&lt;br /&gt;
!vehicle tips&amp;lt;ref name=vehicleuse&amp;gt;Suggestions this class should be used in the property which excludes a class of cargos from a vehicle. One specific type of cargo could appear both as liquid or as piece goods (e.g. milk), which depends on the actual representation. Thus excluding the other would disallow refit to that cargo.&amp;lt;/ref&amp;gt;&lt;br /&gt;
!industry tips&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Passengers&lt;br /&gt;
|passenger wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|do not combine with other flags&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mail&lt;br /&gt;
|closed or mail wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|do not combine with other flags&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4&lt;br /&gt;
|Express&lt;br /&gt;
|closed or mail wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude, suitable for airplane or maglev&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|8&lt;br /&gt;
|Armored&lt;br /&gt;
|armored or mail wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|do not combine with other flags&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|10&lt;br /&gt;
|Bulk (Uncountable)&lt;br /&gt;
|open or hopper wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|may be combined with Piece Goods or Liquid to simulate multiple modes of transport&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|20&lt;br /&gt;
|Piece Goods (Countable)&lt;br /&gt;
|closed or open wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|may be combined with Bulk or Liquid to simulate multiple modes of transport&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|40&lt;br /&gt;
|Liquid&lt;br /&gt;
|tank wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|may be combined with Piece Goods or Bulk to simulate multiple modes of transport&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|80&lt;br /&gt;
|Refrigerated&lt;br /&gt;
|refrigerated wagon&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when Piece Goods included&lt;br /&gt;
|also set Piece Goods&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|100&lt;br /&gt;
|Hazardous&lt;br /&gt;
|unknown&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when special wagons are provided.&lt;br /&gt;
|combine with Piece Goods, Liquid, Bulk or Express&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|200&lt;br /&gt;
|Covered (weather protected)&lt;br /&gt;
|closed wagon, any other wagon with tarpaulin or weather cover&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|do not exclude for Liquid&lt;br /&gt;
|combine with Piece Goods or Bulk&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|400&lt;br /&gt;
|Oversized&lt;br /&gt;
|stake/flatbed wagon&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when Piece Goods included&lt;br /&gt;
|combine with Piece Goods&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|800&lt;br /&gt;
|Powderized (dry powdered materials that flow under air pressure)&lt;br /&gt;
|powder/silo vehicle equipped for compressed air unloading&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when Bulk included&lt;br /&gt;
|combine with Bulk&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|1000&lt;br /&gt;
|Non-pourable&lt;br /&gt;
|open wagon, but not hopper wagon&lt;br /&gt;
|AND NOT&lt;br /&gt;
|only exclude, when Bulk included&lt;br /&gt;
|combine with Bulk&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|2000&lt;br /&gt;
|Potable&lt;br /&gt;
| exclude from non-food-grade vehicles&lt;br /&gt;
| AND NOT&lt;br /&gt;
| exclude&lt;br /&gt;
| set for all food-grade freight cargos&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|4000&lt;br /&gt;
|Non-potable.&lt;br /&gt;
| exclude from food-grade vehicles&lt;br /&gt;
| AND NOT&lt;br /&gt;
| exclude&lt;br /&gt;
| set for all non-food-grade freight cargos&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|8000&lt;br /&gt;
|special&lt;br /&gt;
|and not&lt;br /&gt;
|none&lt;br /&gt;
|special use&lt;br /&gt;
|do not set&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only cargos which are in class 0 (passengers) will appear in bus stations. Only cargos which are &#039;&#039;not&#039;&#039; in class 0 will appear in truck stations.&lt;br /&gt;
&lt;br /&gt;
Disclaimer: there is no guarantee that classes won&#039;t vary over time or between sets.  The classes of a cargo may change between different versions of a specific industry/cargo newgrf, or different classes may be set for the same cargo label by different industry/cargo newgrfs.   Feel free to use classes in your set for conveniently refitting to cargos, but if you - the vehicle author - care about specific cargos being transported in specific vehicles, use label based refits (changing labels without a very good reason is considered to be bad practice).&lt;br /&gt;
&lt;br /&gt;
=== Cargo label (17) ===&lt;br /&gt;
&lt;br /&gt;
Cargo labels are globally [[CargoTypes#Cargo Labels|unique identifiers]] for a cargo type. They are used to allow vehicle grfs to easily support many cargo types, whether they are active or not and no matter what slot or bit they are using.&lt;br /&gt;
&lt;br /&gt;
Read about the [[Action0/Global Settings#Cargo translation table 09|cargo translation table]] for further info.&lt;br /&gt;
&lt;br /&gt;
=== Substitute type and multiplier for town growth (18, 19) ===&lt;br /&gt;
&lt;br /&gt;
These properties allow you to modify how a cargo type affects town growth. Property 18 can contain one of the following values:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Value!!Meaning!!{{ottdp|0.7|no}} Details&amp;lt;ref&amp;gt;This is the interpretation of OpenTTD. For TTDPatch see [http://www.tt-wiki.net/wiki/NewTownGrowthSwitches NewTownGrowthMechanism], which is quite different/unrelated.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|00||Affect towns as passengers do||Cargo produced by houses is added to the statistics in the town GUI.&lt;br /&gt;
|-&lt;br /&gt;
|02||Affect towns as mail does||Cargo produced by houses is added to the statistics in the town GUI.&lt;br /&gt;
|-&lt;br /&gt;
|05||Affect towns as goods/candy does||See note about subsidies below.&lt;br /&gt;
|-&lt;br /&gt;
|09||Affect towns as water does||Second required cargo for towngrowth in the desert&lt;br /&gt;
|-&lt;br /&gt;
|0B||Affect towns as food/fizzy drinks do||First required cargo for towngrowth in desert/above snowline. Alse see note about subsidies below.&lt;br /&gt;
|-&lt;br /&gt;
|FF||Don&#039;t affect town growth (default)|| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no|2.5|ttdprev=alpha 72}} The incoming cargo amount is multiplied by property 19, then divided by 256 before it is added to the town statistics. This allows you to have smaller or bigger impact than original cargoes do. &lt;br /&gt;
&lt;br /&gt;
If no cargos in the game are defined as food (0B), towns above the snowline will not require food to grow. If no cargos in the game are defined as food (0B) or water (09), towns in desert will not require food or water to grow.  This can be used positively for gameplay purposes, and is otherwise worth being aware of as an unintended side effect when designing cargos.&lt;br /&gt;
&lt;br /&gt;
Please note that cargoes accepted by industries affect the closest town as well; for example, if you have an industry that accepts passengers, every passenger brought to the industry affects the town just like if they were transported to the town directly. Usually, it&#039;s not a good idea to have industries that process such cargoes; they should be accepted by towns only.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|0.6-1.1|no}} In OpenTTD up to 1.1 (not 1.2) property 18 also affects the creation of subsidies. Usually subsidies apply to cargo transportation between two industries. For cargos with substitution-type 05 or 0B the destination will be a town instead. Independent of property 18 subsidies from town to town are only created for cargo slot 0 (Passengers).&lt;br /&gt;
&lt;br /&gt;
=== Callback flags (1A) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Var. 0C!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||39||Custom profit calculation&lt;br /&gt;
|-&lt;br /&gt;
|1||2||145||Custom station rating calculation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TextID for displaying the units of a cargo (1B) ===&lt;br /&gt;
&lt;br /&gt;
This textID is used by OpenTTD to show the &amp;quot;short cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 litres&amp;quot; or &amp;quot;10 tonnes&amp;quot;. This textID must be set after property 0B. The text this textID refers to should properly handle plurals, e.g. &amp;quot;\7B item\9A\15\80\9A\10\9A\11s\9A\12&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The default for this textID depends on the default for property 0B; if the default 0B string has &amp;quot;litre&amp;quot;, then the default for this textID will be the unit for litres. OpenTTD maps the following textIDs so you don&#039;t need to provide translations:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!textID!!String&lt;br /&gt;
|-&lt;br /&gt;
|004f||&amp;lt;num&amp;gt; passenger(s)&lt;br /&gt;
|-&lt;br /&gt;
|0050||&amp;lt;num&amp;gt; tonne(s)&lt;br /&gt;
|-&lt;br /&gt;
|0051||&amp;lt;num&amp;gt; bag(s)&lt;br /&gt;
|-&lt;br /&gt;
|0052||&amp;lt;num&amp;gt; litre(s)&lt;br /&gt;
|-&lt;br /&gt;
|0053||&amp;lt;num&amp;gt; item(s)&lt;br /&gt;
|-&lt;br /&gt;
|0054||&amp;lt;num&amp;gt; crate(s)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;tonne&amp;quot; and &amp;quot;litre&amp;quot; strings (textID 0050 and 0052) are automatically updated based on the user settings of unit display, e.g. they &amp;quot;tonne&amp;quot; might become &amp;quot;kg&amp;quot;. The &amp;quot;(s)&amp;quot; is for display purposes; in reality that is a choice list.&lt;br /&gt;
&lt;br /&gt;
=== TextID for displaying the amount of cargo (1C) ===&lt;br /&gt;
&lt;br /&gt;
This textID is used by OpenTTD to show the &amp;quot;long cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 litres of water&amp;quot; or &amp;quot;10 tonnes of coal&amp;quot;. This textID must be set after property 0c. The text this textID refers to should properly handle plurals, e.g. &amp;quot;\7B item\9A\15\80\9A\10\9A\11s\9A\12 of livestock&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The default for this textID depends on the default for property 0C, but with support for plurals. For &amp;quot;X litre(s)&amp;quot; or &amp;quot;X tonne(s)&amp;quot; you should respectively use string codes 87 and 9A 0D.&lt;br /&gt;
&lt;br /&gt;
=== Capacity multiplier (1D) ===&lt;br /&gt;
&lt;br /&gt;
This defines the capacity (and indirectly loading speed) of vehicles carrying this cargo type, if the vehicle sets no specific capacity to this specific cargo type.&lt;br /&gt;
&lt;br /&gt;
Set this property to the amount of cargo a vehicle shall carry, which can carry 0x100 (256) tons of coal or 0x100 (256) thousand litres of water (whatever comparison is more suitable for your cargotype). Depending on whether your cargo type is light or heavy you should set this property either comparing the weight or the volume.&lt;br /&gt;
&lt;br /&gt;
The default value of this property is:&lt;br /&gt;
{| |-&lt;br /&gt;
! Cargo slot !! Default cargo in this slot !! Property 1D !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 00 || PASS || 0x400 || A vehicle carrying 1 ton of coal, can carry 4 passengers.&lt;br /&gt;
|-&lt;br /&gt;
| 02 || MAIL || 0x200 || A vehicle carrying 1 ton of coal, can carry 2 bags of mail.&lt;br /&gt;
|-&lt;br /&gt;
| 05 || GOOD, SWET || 0x200 || A vehicle carrying 1 ton of coal, can carry 2 crates of goods/sweets.&lt;br /&gt;
|-&lt;br /&gt;
| xx || (everything else) || 0x100 || All other slots default to 0x100, i.e. 1 unit of cargo equals 1 ton of coal.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Town Production effect (1E) ===&lt;br /&gt;
&lt;br /&gt;
This properties allow you to directly modify how a town produces cargo. Property 1E can contain one of the following values:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|00||Towns produce cargo as passengers&lt;br /&gt;
|-&lt;br /&gt;
|02||Towns produce cargo as mail&lt;br /&gt;
|-&lt;br /&gt;
|FF||Towns don&#039;t produce cargo (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Town Production multiplier (1F) ===&lt;br /&gt;
&lt;br /&gt;
Set this property to the amount of cargo a town will produce, relative to the normal amount for that town production effect (passengers or mail.) The default value is 0x100 (256), use a lower value to produce less cargo, or a higher value to produce more cargo.&lt;br /&gt;
&lt;br /&gt;
Properties 1E and 1F are an alternative to the cargo production callback of houses, and allow for cargo to be set up to be produced by towns without having to redefine any houses, although it is not as flexible.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Objects&amp;diff=5153</id>
		<title>NML:Objects</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Objects&amp;diff=5153"/>
		<updated>2026-01-03T19:54:33Z</updated>

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

		<summary type="html">&lt;p&gt;Andythenorth: /* Airport tile callbacks */ animation trigger var 0x10 changed: Lower 16 bits are random per tile. Upper 16 bits are the same for all tiles, if the trigger applies to multiple tiles.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
Airports and airport tiles can only be defined in OpenTTD {{ottd|1.1|r19459}} or later.&lt;br /&gt;
&lt;br /&gt;
==Airport (tile) IDs==&lt;br /&gt;
Airport and airport tile IDs are local to the NewGRF, you are free to choose any ID in the 0..255-range. For airport tiles, you should start your item definition with the &#039;substitute&#039;-property, which allocates a new airport tile. The value of this property should be the ID of a [[AirportTileDefaultProps|default airport tile]], which will be used instead of your item if it is not available for whatever reason (for example, missing NewGRF).&lt;br /&gt;
&lt;br /&gt;
Furthermore, you can set the &#039;override&#039;-property, which will cause the existing airport tile to be replaced with your item. For airports, there only is an &#039;override&#039;-property, which acts as a combined substitute and override.&lt;br /&gt;
&lt;br /&gt;
==Airport properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| override&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r19459}} The id of airport to replace / override, see [[AirportTypes]]. &#039;&#039;&#039;This property &#039;&#039;must&#039;&#039; be set first, before any other properties or graphics.&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| layouts&lt;br /&gt;
| list of layouts&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r20377}}&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| string&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r19459}} Name of the airport&lt;br /&gt;
|-&lt;br /&gt;
| years_available&lt;br /&gt;
| [start year, last year]&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r19459}} List of the availablility years: first and last year it can be built&lt;br /&gt;
|-&lt;br /&gt;
| ttd_airport-type&lt;br /&gt;
| 0 ... 3&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r19459}} Substitute TTDPatch airport type&lt;br /&gt;
|-&lt;br /&gt;
| catchment_area&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r19459}} Catchment area of the airport in tiles around its perimeter&lt;br /&gt;
|-&lt;br /&gt;
| noise_level&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r19459}} Noise generation of this airport&lt;br /&gt;
|-&lt;br /&gt;
| maintenance_cost&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.2|r23415}} Maintenance cost factor for this airport&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Airport tile properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| override&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r19204}} The id of airport tile to override, see [[AirportTypes]]. &#039;&#039;&#039;This property &#039;&#039;must&#039;&#039; be set first, before any other properties or graphics.&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| substitute&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r19204}} The id of airport tile to replace&lt;br /&gt;
|-&lt;br /&gt;
| callback_flags&lt;br /&gt;
| bitmask&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r19204}} Do not set this, unless you use [[NML:Old style callbacks|old-style callbacks]].&lt;br /&gt;
|-&lt;br /&gt;
| animation_info&lt;br /&gt;
| Array [ANIMATION_XXX, frame-count]&lt;br /&gt;
|{{ottd|1.1|r19204}} XXX = [LOOPING &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; NON_LOOPING], 1..253 frames&lt;br /&gt;
|-&lt;br /&gt;
| animation_speed&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r19204}} See [[NML:Animation speed|speed settings]]&lt;br /&gt;
|-&lt;br /&gt;
| animation_triggers&lt;br /&gt;
| bitmask(ANIM_TRIGGER_APT_XXX, ... )&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r19204}} Bitmask of triggers that will trigger the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;anim_control&amp;lt;/code&amp;gt; callback, see the [[#Animation triggers|table]] below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Airport variables==&lt;br /&gt;
&lt;br /&gt;
A number of variables are shared between airports and stations. These are listed on the [[NML:Stations#Base station variables|stations]] page.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| layout&lt;br /&gt;
| 0 .. (number of layouts - 1)&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r20364}} Layout number of the airport (index in the layouts array)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Airport tile variables==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| terrain_type&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| town_radius_group&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| relative_x&lt;br /&gt;
| 0..255&lt;br /&gt;
| X-coordinate (top right -&amp;amp;gt; bottom left) of the tile relative to the northernmost tile.&lt;br /&gt;
|-&lt;br /&gt;
| relative_y&lt;br /&gt;
| 0..255&lt;br /&gt;
| Y-coordinate (top left -&amp;amp;gt; bottom right) of the tile relative to the northernmost tile.&lt;br /&gt;
|-&lt;br /&gt;
| relative_pos&lt;br /&gt;
| 0xYYXX&lt;br /&gt;
|&lt;br /&gt;
A combination of relative_x and relative_y in the format 0xYYXX. Useful if you want to check for a single position. The [[NML:Builtin functions|builtin function]] relative_coord(x, y) may be useful when making comparisons.&lt;br /&gt;
|-&lt;br /&gt;
| animation_frame&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| random_bits_station&lt;br /&gt;
| 0..65535&lt;br /&gt;
| 16 random bits, shared between all station parts (rail station parts, airports tiles, ...)&lt;br /&gt;
|-&lt;br /&gt;
| random_bits_tile&lt;br /&gt;
| 0..15&lt;br /&gt;
| 4 random bits, specific to this station tile.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following variables require a signed x,y offset as parameters. The offset is relative to the current tile. Offset 0,0 means the current tile.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_slope&lt;br /&gt;
| SLOPE_XXX&lt;br /&gt;
|&lt;br /&gt;
See [[NML:List of tile slopes|tile slopes]] for an overview of possible values&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_is_same_airport&lt;br /&gt;
| 1 if the tile is part of the same airport, 0 otherwise&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_is_water&lt;br /&gt;
| 1 if the tile is water, 0 otherwise&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_terrain_type&lt;br /&gt;
| TILETYPE_XX&lt;br /&gt;
| TILETYPE_NORMAL, TILETYPE_DESERT, TILETYPE_RAIN_FOREST, TILETYPE_SNOW&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_water_class&lt;br /&gt;
| WATER_CLASS_XXX&lt;br /&gt;
| XXX = [NONE &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; SEA &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; CANAL &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; RIVER] Note that tiles for which &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;nearby_tile_is_water&amp;lt;/code&amp;gt; is 0 may still have a water class, e.g. industry tiles with water beneath them.&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_height&lt;br /&gt;
| 0..120&lt;br /&gt;
| The height of the lowest corner of the given tile.&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_class&lt;br /&gt;
|&lt;br /&gt;
[[NML:List of tile classes|Tile class]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_animation_frame&lt;br /&gt;
| 0..255&lt;br /&gt;
| Animation frame of the given tile&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_airporttile_id&lt;br /&gt;
| 0x00aa, 0xFFbb, 0xFFFE or 0xFFFF&lt;br /&gt;
| 0x00aa: The tile is an airport tile that is part of this GRF, the tile id is aa.&amp;lt;br /&amp;gt; 0xFFbb: The tile is an original airport tile with id bb.&amp;lt;br /&amp;gt; 0xFFFE: The tile is an airport tile defined in another GRF.&amp;lt;br /&amp;gt; 0xFFFF: The tile is not an airport tile or it belongs to another airport.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Airport callbacks==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! callback&lt;br /&gt;
! return value&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| default&lt;br /&gt;
| Sprite set (with 1 sprite)&lt;br /&gt;
| Preview graphics to use in the build menu. One sprite per layout may be given, use the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;layout&amp;lt;/code&amp;gt; to distinguish between layouts.&lt;br /&gt;
|-&lt;br /&gt;
| additional_text&lt;br /&gt;
| String&lt;br /&gt;
| Additional text to show in the buy menu. String may differ per layout, use the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;layout&amp;lt;/code&amp;gt; variable for this.&lt;br /&gt;
|-&lt;br /&gt;
| layout_name&lt;br /&gt;
| String&lt;br /&gt;
| Name of the airport layout in the variable &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;layout&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that, although the airport isn&#039;t built yet, the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;layout&amp;lt;/code&amp;gt; variable is always available and set to the layout the user has selected in the GUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Airport tile callbacks==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! callback&lt;br /&gt;
! return value&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| default&lt;br /&gt;
| Sprite layout&lt;br /&gt;
| Graphics for an airport tile&lt;br /&gt;
|-&lt;br /&gt;
| anim_next_frame&lt;br /&gt;
| Next animation frame or CB_RESULT_XXX&lt;br /&gt;
| Called for every animation frame, returns the next frame to display. Alternatively, return CB_RESULT_NEXT_FRAME or CB_RESULT_STOP_ANIMATION to show the next frame or stop animation, respectively. Returning a sound effect in the high byte will cause that sound effect to be played.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;extra_callback_info1&amp;lt;/code&amp;gt;: 32 random bits.&lt;br /&gt;
|-&lt;br /&gt;
| anim_control&lt;br /&gt;
| Next animation frame or CB_RESULT_XXX&lt;br /&gt;
|&lt;br /&gt;
Called whenever an animation trigger happens. Return the animation frame to show, or CB_RESULT_XXX with XXX = [CB_RESULT_START_ANIMATION &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; STOP_ANIMATION &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; DO_NOTHING] to respectively start the animation in its current frame, stop the animation or do nothing. Returning a sound effect in the high byte will cause that sound effect to be played.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;extra_callback_info1&amp;lt;/code&amp;gt;: 32 random bits. {{ottdp|15|no}} Lower 16 bits are random per tile. Upper 16 bits are the same for all tiles, if the trigger applies to multiple tiles.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 8)&amp;lt;/code&amp;gt;: Reason for callback trigger, see the [[#Animation triggers|table]] below. Note that you need to enable the wanted triggers in the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;animation_triggers&amp;lt;/code&amp;gt; property.&lt;br /&gt;
|-&lt;br /&gt;
| anim_speed&lt;br /&gt;
| 0 .. 16&lt;br /&gt;
| Decide the time an animation frame should last. Return value is interpreted as (num_ticks = 2^anim_speed), which each tick lasting 30 ms. Avoid using this callback if possible, since it has to be called each tick for every animated tile. This can be used to create animation frames that last between 30 ms and 33 minutes.&lt;br /&gt;
|-&lt;br /&gt;
| foundations&lt;br /&gt;
| CB_RESULT[_NO]_FOUNDATIONS&lt;br /&gt;
| Return CB_RESULT_FOUNDATIONS to draw standard foundations (default) or CB_RESULT_NO_FOUNDATIONS to not draw them.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Animation triggers===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Animation trigger&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| ANIM_TRIGGER_APT_BUILT&lt;br /&gt;
| Airport is built (all tiles at the same time)&lt;br /&gt;
|-&lt;br /&gt;
| ANIM_TRIGGER_APT_TILELOOP&lt;br /&gt;
| Airport tile is processed in the tileloop (at different times for different tiles)&lt;br /&gt;
|-&lt;br /&gt;
| ANIM_TRIGGER_APT_NEW_CARGO&lt;br /&gt;
| New cargo arrives at the airport (all tiles at the same time)&lt;br /&gt;
|-&lt;br /&gt;
| ANIM_TRIGGER_APT_CARGO_TAKEN&lt;br /&gt;
| All cargo of a cargo type is removed from the airport (all tiles at the same time)&lt;br /&gt;
|-&lt;br /&gt;
| ANIM_TRIGGER_APT_250_TICKS&lt;br /&gt;
| Every 250 ticks (all tiles at the same time)&lt;br /&gt;
|-&lt;br /&gt;
| ANIM_TRIGGER_APT_AIRPLANE_LANDS&lt;br /&gt;
| {{ottd|1.9}} Triggered when an airplane (not a helicopter!) lands at airport (single tile only)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Vehicles&amp;diff=5148</id>
		<title>NML:Vehicles</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Vehicles&amp;diff=5148"/>
		<updated>2026-01-03T18:49:49Z</updated>

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

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

		<summary type="html">&lt;p&gt;Andythenorth: /* Tramtype variables */ document railtype, roadtype, tramtype variables&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
Tramtypes can only be defined in OpenTTD {{ottd|1.10}} and {{nml|0.5}} or later. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tramtype IDs==&lt;br /&gt;
Tramtypes and Roadtypes share a pool of 63 IDs. Either feature can use as many IDs as needed (i.e. it is not limited to 32 per type), but both features combined are limited to 63 in total. NewGRF-local IDs may freely be chosen, but must be in the 0..62 range. If other tramtype/roadtype GRFs are loaded, it may be that there are not enough slots available. To prevent your entire NewGRF from being deactivated with the &#039;Attempt to use invalid ID&#039;-error, you can use the following code:&lt;br /&gt;
&lt;br /&gt;
 if (tramtype_available(&amp;quot;LABL&amp;quot;) || loading_stage == LOADING_STAGE_RESERVE)&lt;br /&gt;
     ... item definition ...&lt;br /&gt;
 } else if (loading_stage == LOADING_STAGE_ACTIVATE) {&lt;br /&gt;
     ... warning / error ...&lt;br /&gt;
 }&lt;br /&gt;
The warning / error is optional, but can be used to inform the user about the missing tramtypes.&lt;br /&gt;
&lt;br /&gt;
== Vehicle and Tramtype availability ==&lt;br /&gt;
&lt;br /&gt;
Vehicle and tramtype availability and compatibility is influenced by multiple properties.&lt;br /&gt;
Generally, the vehicle defines which tramtype it is, and the tramtypes define the compatibility between each other.&lt;br /&gt;
* Remember that the road vehicle flag &#039;ROADVEH_FLAG_TRAM&#039; must be set in order for a road vehicle to be considered a tram.&lt;br /&gt;
* A vehicle exists, if its tramtype (road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;tram_type&amp;lt;/code&amp;gt;) is defined. Otherwise the vehicle is disabled.&lt;br /&gt;
* When a vehicle is introduced, it always introduces its tramtype (road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;tram_type&amp;lt;/code&amp;gt;).&lt;br /&gt;
* A tramtype is introduced, if at least one of the following conditions is met:&lt;br /&gt;
** A vehicle is introduced, that references the tramtype (road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;tram_type&amp;lt;/code&amp;gt;).&lt;br /&gt;
** Another tramtype is introduced, that references the tramtype via the introduced tramtype list (tramtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;introduces_tramtype_list&amp;lt;/code&amp;gt;).&lt;br /&gt;
** The introduction date (tramtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;introduction_date&amp;lt;/code&amp;gt;) is passed and all required tramtypes (tramtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;requires_tramtype_list &amp;lt;/code&amp;gt;) are available.&lt;br /&gt;
&lt;br /&gt;
Via tramtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;powered_tramtype_list&amp;lt;/code&amp;gt; multiple tramtypes can be defined, which shall be considered equivalent to a tramtype.&lt;br /&gt;
This affects the interpretation of road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;tram_type&amp;lt;/code&amp;gt;. If road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;tram_type&amp;lt;/code&amp;gt; references an undefined tramtype, then tramtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;powered_tramtype_list&amp;lt;/code&amp;gt; is checked for all defined tramtypes, whether the vehicle can be reassigned to some other tramtype. Otherwise the vehicle is disabled.&lt;br /&gt;
&lt;br /&gt;
==Tramtype properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! property&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| label&lt;br /&gt;
| 4-byte string&lt;br /&gt;
| names of default tram types: &amp;quot;RAIL&amp;quot; and &amp;quot;ELRL&amp;quot;. See the [[TramtypeLabels|List of tramtype labels]] in the NewGRF Specs for currently defined custom labels.&lt;br /&gt;
|-&lt;br /&gt;
| introduction_date&lt;br /&gt;
| date(yyyy,mm,dd)&lt;br /&gt;
| Valid range for yyyy is 0 ... 5000000.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| string&lt;br /&gt;
| Name of this tramtype&lt;br /&gt;
|-&lt;br /&gt;
| toolbar_caption&lt;br /&gt;
| string&lt;br /&gt;
| Caption of the build tram toolbar. In earlier versions this is the same as the &#039;name&#039;&lt;br /&gt;
|-&lt;br /&gt;
| menu_text&lt;br /&gt;
| string&lt;br /&gt;
| Shown in the dropdown menu for all tramtypes&lt;br /&gt;
|-&lt;br /&gt;
| build_window_caption&lt;br /&gt;
| string&lt;br /&gt;
| Caption of the build vehicle window&lt;br /&gt;
|-&lt;br /&gt;
| autoreplace_text&lt;br /&gt;
| string&lt;br /&gt;
| String for the autoreplace window&lt;br /&gt;
|-&lt;br /&gt;
| new_engine_text&lt;br /&gt;
| string&lt;br /&gt;
| String for the &amp;quot;We have invented a new &amp;amp;lt;tram type&amp;amp;gt; engine&amp;quot; news message&lt;br /&gt;
|-&lt;br /&gt;
| powered_tramtype_list&lt;br /&gt;
| list of tramtype labels&lt;br /&gt;
| Provide a list of tram types that tram vehicles of this type are powered on, e.g. [&amp;quot;RAIL&amp;quot;, &amp;quot;ELRL&amp;quot;].  Note that there is no &amp;quot;compatible_tramtype_list&amp;quot; since there is no difference between &amp;quot;powered&amp;quot; and &amp;quot;compatible&amp;quot; for tramtypes&lt;br /&gt;
|-&lt;br /&gt;
| tramtype_flags&lt;br /&gt;
| bitmask(TRAMTYPE_FLAG_XXX, ...)&lt;br /&gt;
|&lt;br /&gt;
;CATENARY&lt;br /&gt;
:Enable catenary&lt;br /&gt;
;NO_LEVEL_CROSSING&lt;br /&gt;
:Disable level crossings&lt;br /&gt;
;NO_HOUSES&lt;br /&gt;
:Disallows house construction&lt;br /&gt;
;HIDDEN&lt;br /&gt;
:Hides the tramtype from players, but remains available to towns...which can&#039;t use them&lt;br /&gt;
;TOWN_BUILD&lt;br /&gt;
:Towns don&#039;t build tramtracks...so not sure what the purpose of this is&lt;br /&gt;
|-&lt;br /&gt;
| construction_cost&lt;br /&gt;
| 0 ... 65525&lt;br /&gt;
| Per piece of track as multiplier to PR_BUILD_ROAD base cost. Default cost factors are 8 and 16 for RAIL and ELRL, respectively.&lt;br /&gt;
|-&lt;br /&gt;
| speed_limit&lt;br /&gt;
| 0 ... 65525 km/h (speed units)&lt;br /&gt;
| A speed limit of 0 means unlimited speed&lt;br /&gt;
|-&lt;br /&gt;
| map_colour&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Entry in the colour palette.&lt;br /&gt;
|-&lt;br /&gt;
| requires_tramtype_list&lt;br /&gt;
| list of tramtype labels&lt;br /&gt;
| List of tram types that need to be available to the company of the player for this tram type to be introduced at (or after) the introduction date. This limit does not apply when the tram type is introduced by the introduction of a vehicle.&lt;br /&gt;
|-&lt;br /&gt;
| introduces_tramtype_list&lt;br /&gt;
| list of tramtype labels&lt;br /&gt;
| List of tram types that get introduced when this tram type is introduced. For example, to make sure that when a fast tram type is introduced the slow variant exists.&lt;br /&gt;
|-&lt;br /&gt;
| sort_order&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Number which defines the sort order among tram types. If this entry is not defined, it gets assigned sort order n*10+7 for the n-th tramtype.&lt;br /&gt;
|-&lt;br /&gt;
| maintenance_cost&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Maintenance cost factor for each piece of tram of this tramtype. Default cost factors are 16 and 24 for RAIL and ELRL, respectively.&lt;br /&gt;
|-&lt;br /&gt;
| alternative_tramtype_list&lt;br /&gt;
| list of tramtype labels&lt;br /&gt;
| List of tram types which this tram type will act as fallback for, if the corresponding tram type is not defined separately&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Sort order===&lt;br /&gt;
&lt;br /&gt;
The sort_order influences the sort order of the drop down lists with tram types. Default values are as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! Value&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 07&lt;br /&gt;
| normal tram&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| electrified tram&lt;br /&gt;
|-&lt;br /&gt;
| n7&lt;br /&gt;
| tramtype #n&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus the tram type that (internally) gets index 8 will get a default value of 87. These defaults are to keep the ordering when this property is not supported as they were.&lt;br /&gt;
&lt;br /&gt;
==Tramtype variables==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| terrain_type&lt;br /&gt;
| TILETYPE_NORMAL, TILETYPE_DESERT, TILETYPE_RAIN_FOREST, TILETYPE_SNOW&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| enhanced_tunnels&lt;br /&gt;
| 0&lt;br /&gt;
| Reserved for future use, always returns 0 in OpenTTD. Should custom tunnel entrances be implemented, other values than 0 might be returned&lt;br /&gt;
|-&lt;br /&gt;
| level_crossing_status&lt;br /&gt;
| LEVEL_CROSSING_CLOSED, LEVEL_CROSSING_OPEN&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| build_date&lt;br /&gt;
| 0 .. 5000000&lt;br /&gt;
| for depots only: build date of the depot in days since 0&lt;br /&gt;
|-&lt;br /&gt;
| town_zone&lt;br /&gt;
| [[NML:List of town zones|town zone]]&lt;br /&gt;
| Town zone of the tile&lt;br /&gt;
|-&lt;br /&gt;
| random_bits&lt;br /&gt;
|&lt;br /&gt;
| 2 pseudo random bits&lt;br /&gt;
|-&lt;br /&gt;
| railtype&lt;br /&gt;
| Entry from railtype translation table or RAILTYPE_OTHER_GRF or RAILTYPE_NO_ROAD&lt;br /&gt;
| railtype present on the tile&lt;br /&gt;
|-&lt;br /&gt;
| roadtype&lt;br /&gt;
| Entry from roadtype translation table or ROADTYPE_OTHER_GRF or ROADTYPE_NO_ROAD&lt;br /&gt;
| roadtype present on the tile&lt;br /&gt;
|-&lt;br /&gt;
| tramtype&lt;br /&gt;
| Entry from tramtype translation table or TRAMTYPE_OTHER_GRF or TRAMTYPE_NO_ROAD&lt;br /&gt;
| tramtype present on the tile&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Tramtype callbacks==&lt;br /&gt;
&lt;br /&gt;
For tram types a number of callbacks are used to define tram type graphics. Each should refer to a sprite set containing the relevant sprites. Refer to the [[#Example sprites|example sprites]] or the example tramtype grf in the NML repository, for an example on what sprites are needed in what order.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! callbacks&lt;br /&gt;
! number of sprites&lt;br /&gt;
! meaning&lt;br /&gt;
|-&lt;br /&gt;
| gui&lt;br /&gt;
| 12&lt;br /&gt;
| 6 gui icons, 6 cursors&lt;br /&gt;
|-&lt;br /&gt;
| track_overlay&amp;lt;ref name=leftout&amp;gt;Either all or none of these sprites should be provided.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 19&lt;br /&gt;
| 11 track combinations, 4 slopes, and 4 dead ends. These sprites are required&lt;br /&gt;
|-&lt;br /&gt;
| underlay&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 19&lt;br /&gt;
| 11 track combinations, 4 slopes, and 4 dead ends. These sprites are required&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
|-&lt;br /&gt;
| tunnels&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 4&lt;br /&gt;
| 1 sprite for each direction. Sprite is overlay for tram in existing tunnel graphics. The original ground sprite is drawn, then the overlay, then possibly a tram vehicle and the original tunnel head is drawn over the top. This keeps compatibility with different landscape types. Sprite order: SW, NW, NE, SE.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| catenary_front&lt;br /&gt;
| 29&lt;br /&gt;
| 11 track combinations, 4 slopes, 4 dead ends, 4 tunnels, 2 bridge middle, 4 bridge ramps&lt;br /&gt;
|-&lt;br /&gt;
| catenary_back&lt;br /&gt;
| 29&lt;br /&gt;
| 11 track combinations, 4 slopes, 4 dead ends, 4 tunnels (unused), 2 bridge middle, 4 bridge ramps&lt;br /&gt;
|-&lt;br /&gt;
| bridge_surfaces&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 6&lt;br /&gt;
| 2 bridge middle, 4 bridge ramps&lt;br /&gt;
|-&lt;br /&gt;
| depots&lt;br /&gt;
| 6&lt;br /&gt;
| If not present, the default depot sprites (depending on catenary flag) plus track overlay are drawn.&lt;br /&gt;
If present, the depot sprites are expected to include track overlay graphics.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
|-&lt;br /&gt;
| tunnel_overlay&amp;lt;ref name=tunnel_overlay&amp;gt;Above &#039;all or none&#039; sprites must be supplied, if these sprites are to be used.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 4&lt;br /&gt;
| If this callback is defined, tunnels for this tramtype will be drawn differently. First, a grass underlay base sprite is drawn, then the &#039;tunnels&#039;-sprite. Next, tram vehicle sprites if applicable and then a grass overlay and finally the sprite from this type (tunnel_overlay). The grass sprites are defined in the base set and do not contain any parts of the tracks or portal, so these have to be fully provided by the tramtype sprites.&lt;br /&gt;
* &amp;lt;code style:darkgreen&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;: 0 for normal tunnels, without any extra features (like tracks above). All other values are reserved for future extensions.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
Note that there is no &amp;quot;default&amp;quot; graphics callback.&lt;br /&gt;
&lt;br /&gt;
===Example sprites===&lt;br /&gt;
==== gui ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_gui.png]]&lt;br /&gt;
&lt;br /&gt;
==== underlay ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_underlay.png]]&lt;br /&gt;
&lt;br /&gt;
==== overlay ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_overlay.png]]&lt;br /&gt;
&lt;br /&gt;
==== catenary_front ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_catenary_front.png]]&lt;br /&gt;
&lt;br /&gt;
==== catenary_back ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_catenary_back.png]]&lt;br /&gt;
&lt;br /&gt;
==== depots ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_depot.png]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
!Sprite Number&lt;br /&gt;
!Usage&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;NE wall for SE-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for SE-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;NW wall for SW-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for SW-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for NE-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for NW-entry depot.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== bridge_surfaces ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_bridge.png]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==== tunnel_overlay ====&lt;br /&gt;
&lt;br /&gt;
If this callback is defined, tunnels for this tramtype will be drawn differently.&lt;br /&gt;
&lt;br /&gt;
First, a grass underlay base sprite is drawn, then the &#039;tunnels&#039;-sprite. Next, tram vehicle sprites if applicable and then a grass overlay and finally the sprite from this callback. The grass sprites are defined in the base set and do not contain any parts of the tracks or portal, so these have to be fully provided by the tramtype sprites.&lt;br /&gt;
&lt;br /&gt;
Illustration: [[File:TramtypeTunnelExample.png]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example code===&lt;br /&gt;
&lt;br /&gt;
A typical implementation for tramtypes can look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
 item(FEAT_TRAMTYPES, dctram, 0x01) {&lt;br /&gt;
     property {&lt;br /&gt;
         label:                      &amp;quot;DCTM&amp;quot;;&lt;br /&gt;
         name:                       string(STR_DC_TRAM);&lt;br /&gt;
         menu_text:                  string(STR_DC_TRAM);&lt;br /&gt;
         build_window_caption:       string(STR_BUILD_CAPTION);&lt;br /&gt;
         autoreplace_text:           string(STR_AUTOREPLACE);&lt;br /&gt;
         new_engine_text:            string(STR_NEW_ENGINE);&lt;br /&gt;
         powered_tramtype_list:      [&amp;quot;DCTM&amp;quot;,&amp;quot;ELRL&amp;quot;];                          // These trams are compatible with other electric trams&lt;br /&gt;
         tramtype_flags:             bitmask(TRAMTYPE_FLAG_CATENARY);          // These tramways require catenary&lt;br /&gt;
         construction_cost:          24;                                       // Electric tramways are pricey&lt;br /&gt;
         speed_limit:                50 km/h;&lt;br /&gt;
     }&lt;br /&gt;
     graphics {&lt;br /&gt;
         underlay:        ground_switch_underlay;    // defines the tramtrack underlay&lt;br /&gt;
         overlay:         track_overlay_switch;      // defines the tramtrack overlay&lt;br /&gt;
         tunnels:         tunnel_switch;             // defines the track drawn on a tunnel tile&lt;br /&gt;
         depots:          depot_switch;              // defines the depot sprites&lt;br /&gt;
         bridge_surfaces: bridge_terrain_switch;     // defines the overlay drawn over bridges depending on climate&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The switches and graphics blocks are defined in the usual way as described in sections [[NML:Switch|switches]], [[NML:Random switch|random switches]] and [[NML:Graphics|graphics block]] sections.&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Roadtypes&amp;diff=5143</id>
		<title>NML:Roadtypes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Roadtypes&amp;diff=5143"/>
		<updated>2026-01-03T17:58:14Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* Roadtype variables */ FML wiki formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
Roadtypes can only be defined in OpenTTD {{ottd|1.10}} and {{nml|0.5}} or later. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Roadtype IDs==&lt;br /&gt;
Roadtypes and Tramtypes share a pool of 63 IDs. Either feature can use as many IDs as needed (i.e. it is not limited to 32 per type), but both features combined are limited to 63 in total. NewGRF-local IDs may freely be chosen, but must be in the 0..62 range. If other roadtype/tramtype GRFs are loaded, it may be that there are not enough slots available. To prevent your entire NewGRF from being deactivated with the &#039;Attempt to use invalid ID&#039;-error, you can use the following code:&lt;br /&gt;
&lt;br /&gt;
 if (roadtype_available(&amp;quot;LABL&amp;quot;) || loading_stage == LOADING_STAGE_RESERVE)&lt;br /&gt;
     ... item definition ...&lt;br /&gt;
 } else if (loading_stage == LOADING_STAGE_ACTIVATE) {&lt;br /&gt;
     ... warning / error ...&lt;br /&gt;
 }&lt;br /&gt;
The warning / error is optional, but can be used to inform the user about the missing roadtypes.&lt;br /&gt;
&lt;br /&gt;
== Vehicle and Roadtype availability ==&lt;br /&gt;
&lt;br /&gt;
Vehicle and roadtype availability and compatibility is influenced by multiple properties.&lt;br /&gt;
Generally, the vehicle defines which roadtype it is, and the roadtypes define the compatibility between each other.&lt;br /&gt;
* A vehicle exists, if its roadtype (road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;road_type&amp;lt;/code&amp;gt;) is defined. Otherwise the vehicle is disabled.&lt;br /&gt;
* When a vehicle is introduced, it always introduces its roadtype (road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;road_type&amp;lt;/code&amp;gt;).&lt;br /&gt;
* A roadtype is introduced, if at least one of the following conditions is met:&lt;br /&gt;
** A vehicle is introduced, that references the roadtype (road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;road_type&amp;lt;/code&amp;gt;).&lt;br /&gt;
** Another roadtype is introduced, that references the roadtype via the introduced roadtype list (roadtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;introduces_roadtype_list&amp;lt;/code&amp;gt;).&lt;br /&gt;
** The introduction date (roadtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;introduction_date&amp;lt;/code&amp;gt;) is passed and all required roadtypes (roadtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;requires_roadtype_list &amp;lt;/code&amp;gt;) are available.&lt;br /&gt;
&lt;br /&gt;
Via roadtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;powered_roadtype_list&amp;lt;/code&amp;gt; multiple roadtypes can be defined, which shall be considered equivalent to a roadtype.&lt;br /&gt;
This affects the interpretation of road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;road_type&amp;lt;/code&amp;gt;. If road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;road_type&amp;lt;/code&amp;gt; references an undefined roadtype, then&lt;br /&gt;
roadtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;powered_roadtype_list&amp;lt;/code&amp;gt; is checked for all defined roadtypes, whether the vehicle can be reassigned to some other roadtype.&lt;br /&gt;
Otherwise the vehicle is disabled.&lt;br /&gt;
&lt;br /&gt;
==Roadtype properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! property&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| label&lt;br /&gt;
| 4-byte string&lt;br /&gt;
| names of default road types: &amp;quot;ROAD&amp;quot; and &amp;quot;ELRD&amp;quot;. See the [[RoadtypeLabels|List of roadtype labels]] in the NewGRF Specs for currently defined custom labels.&lt;br /&gt;
|-&lt;br /&gt;
| introduction_date&lt;br /&gt;
| date(yyyy,mm,dd)&lt;br /&gt;
| Valid range for yyyy is 0 ... 5000000.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| string&lt;br /&gt;
| Name of this roadtype&lt;br /&gt;
|-&lt;br /&gt;
| toolbar_caption&lt;br /&gt;
| string&lt;br /&gt;
| Caption of the build road toolbar&lt;br /&gt;
|-&lt;br /&gt;
| menu_text&lt;br /&gt;
| string&lt;br /&gt;
| Shown in the dropdown menu for all roadtypes&lt;br /&gt;
|-&lt;br /&gt;
| build_window_caption&lt;br /&gt;
| string&lt;br /&gt;
| Caption of the build vehicle window&lt;br /&gt;
|-&lt;br /&gt;
| autoreplace_text&lt;br /&gt;
| string&lt;br /&gt;
| String for the autoreplace window&lt;br /&gt;
|-&lt;br /&gt;
| new_engine_text&lt;br /&gt;
| string&lt;br /&gt;
| String for the &amp;quot;We have invented a new &amp;amp;lt;road type&amp;amp;gt; engine&amp;quot; news message&lt;br /&gt;
|-&lt;br /&gt;
| powered_roadtype_list&lt;br /&gt;
| list of roadtype labels&lt;br /&gt;
| Provide a list of road types that road vehicles of this type are powered on, e.g. [&amp;quot;ROAD&amp;quot;, &amp;quot;ELRD&amp;quot;]. Note that there is no &amp;quot;compatible_roadtype_list&amp;quot; since there is no difference between &amp;quot;powered&amp;quot; and &amp;quot;compatible&amp;quot; for roadtypes&lt;br /&gt;
|-&lt;br /&gt;
| roadtype_flags&lt;br /&gt;
| bitmask(ROADTYPE_FLAG_XXX, ...)&lt;br /&gt;
|&lt;br /&gt;
;CATENARY&lt;br /&gt;
:Enable catenary&lt;br /&gt;
;NO_LEVEL_CROSSING&lt;br /&gt;
:Disable level crossings&lt;br /&gt;
;NO_HOUSES&lt;br /&gt;
:Disallows house construction&lt;br /&gt;
;HIDDEN&lt;br /&gt;
:Hides the roadtype from players, but remains available to towns&lt;br /&gt;
;TOWN_BUILD&lt;br /&gt;
:Enables the roadtype to be built by towns, picked by highest speed (defaults to ROAD if no speed limits?)&lt;br /&gt;
|-&lt;br /&gt;
| construction_cost&lt;br /&gt;
| 0 ... 65525&lt;br /&gt;
| Per piece of road as multiplier to PR_BUILD_ROAD base cost. Default cost factors are 8 and 16 for ROAD and ELRD, respectively.&lt;br /&gt;
|-&lt;br /&gt;
| speed_limit&lt;br /&gt;
| 0 ... 65525 km/h (speed units)&lt;br /&gt;
| A speed limit of 0 means unlimited speed&lt;br /&gt;
|-&lt;br /&gt;
| map_colour&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Entry in the colour palette.&lt;br /&gt;
|-&lt;br /&gt;
| requires_roadtype_list&lt;br /&gt;
| list of roadtype labels&lt;br /&gt;
| List of road types that need to be available to the company of the player for this road type to be introduced at (or after) the introduction date. This limit does not apply when the road type is introduced by the introduction of a vehicle.&lt;br /&gt;
|-&lt;br /&gt;
| introduces_roadtype_list&lt;br /&gt;
| list of roadtype labels&lt;br /&gt;
| List of road types that get introduced when this road type is introduced. For example, to make sure that when a fast road type is introduced the slow variant exists.&lt;br /&gt;
|-&lt;br /&gt;
| sort_order&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Number which defines the sort order among road types. If this entry is not defined, it gets assigned sort order n*10+7 for the n-th roadtype.&lt;br /&gt;
|-&lt;br /&gt;
| maintenance_cost&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Maintenance cost factor for each piece of road of this roadtype. Default cost factors are 16 and 24 for ROAD and ELRD, respectively.&lt;br /&gt;
|-&lt;br /&gt;
| alternative_roadtype_list&lt;br /&gt;
| list of roadtype labels&lt;br /&gt;
| List of road types which this road type will act as fallback for, if the corresponding road type is not defined separately&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Sort order===&lt;br /&gt;
&lt;br /&gt;
The sort_order influences the sort order of the drop down lists with road types. Default values are as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! Value&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 07&lt;br /&gt;
| normal road&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| electrified road&lt;br /&gt;
|-&lt;br /&gt;
| n7&lt;br /&gt;
| roadtype #n&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus the road type that (internally) gets index 8 will get a default value of 87. These defaults are to keep the ordering when this property is not supported as they were.&lt;br /&gt;
&lt;br /&gt;
==Roadtype variables==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| terrain_type&lt;br /&gt;
| TILETYPE_NORMAL, TILETYPE_DESERT, TILETYPE_RAIN_FOREST, TILETYPE_SNOW&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| enhanced_tunnels&lt;br /&gt;
| 0&lt;br /&gt;
| Reserved for future use, always returns 0 in OpenTTD. Should custom tunnel entrances be implemented, other values than 0 might be returned&lt;br /&gt;
|-&lt;br /&gt;
| level_crossing_status&lt;br /&gt;
| LEVEL_CROSSING_CLOSED, LEVEL_CROSSING_OPEN&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| build_date&lt;br /&gt;
| 0 .. 5000000&lt;br /&gt;
| for depots only: build date of the depot in days since 0&lt;br /&gt;
|-&lt;br /&gt;
| town_zone&lt;br /&gt;
| [[NML:List of town zones|town zone]]&lt;br /&gt;
| Town zone of the tile&lt;br /&gt;
|-&lt;br /&gt;
| random_bits&lt;br /&gt;
|&lt;br /&gt;
| 2 pseudo random bits, based on tile location&lt;br /&gt;
|-&lt;br /&gt;
| railtype&lt;br /&gt;
| Entry from railtype translation table or RAILTYPE_OTHER_GRF or RAILTYPE_NO_ROAD&lt;br /&gt;
| railtype present on the tile&lt;br /&gt;
|-&lt;br /&gt;
| roadtype&lt;br /&gt;
| Entry from roadtype translation table or ROADTYPE_OTHER_GRF or ROADTYPE_NO_ROAD&lt;br /&gt;
| roadtype present on the tile&lt;br /&gt;
|-&lt;br /&gt;
| tramtype&lt;br /&gt;
| Entry from tramtype translation table or TRAMTYPE_OTHER_GRF or TRAMTYPE_NO_ROAD&lt;br /&gt;
| tramtype present on the tile&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Roadtype callbacks==&lt;br /&gt;
&lt;br /&gt;
For road types a number of callbacks are used to define road type graphics. Each should refer to a sprite set containing the relevant sprites. Refer to the [[#Example sprites|example sprites]] or the example roadtype grf in the NML repository, for an example on what sprites are needed in what order.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! callbacks&lt;br /&gt;
! number of sprites&lt;br /&gt;
! meaning&lt;br /&gt;
|-&lt;br /&gt;
| gui&lt;br /&gt;
| 12&lt;br /&gt;
| 6 gui icons, 6 cursors&lt;br /&gt;
|-&lt;br /&gt;
| track_overlay&amp;lt;ref name=leftout&amp;gt;Either all or none of these sprites should be provided.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 19&lt;br /&gt;
| 11 roadbit combinations, 4 slopes, and 4 dead ends. These sprites are optional for roadtypes.&lt;br /&gt;
|-&lt;br /&gt;
| underlay&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 19&lt;br /&gt;
| 11 roadbit combinations, 4 slopes, and 4 dead ends. These sprites are required.&lt;br /&gt;
|-&lt;br /&gt;
| tunnels&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 4&lt;br /&gt;
| {{ottd|13}} and {{nml|0.7.2}} 1 sprite for each direction. Sprite is overlay for road in existing tunnel graphics. The original ground sprite is drawn, then the overlay, then possibly a road vehicle and the original tunnel head is drawn over the top. This keeps compatibility with different landscape types. Sprite order: SW, NW, NE, SE.&lt;br /&gt;
|-&lt;br /&gt;
| catenary_front&lt;br /&gt;
| 29&lt;br /&gt;
| 11 roadbit combinations, 4 slopes, 4 dead ends, 4 tunnels, 2 bridge middle, 4 bridge ramps&lt;br /&gt;
|-&lt;br /&gt;
| catenary_back&lt;br /&gt;
| 29&lt;br /&gt;
| 11 roadbit combinations, 4 slopes, 4 dead ends, 4 tunnels (unused), 2 bridge middle, 4 bridge ramps&lt;br /&gt;
|-&lt;br /&gt;
| bridge_surfaces&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 6&lt;br /&gt;
| 2 bridge middle, 4 bridge ramps&lt;br /&gt;
|-&lt;br /&gt;
| depots&lt;br /&gt;
| 6&lt;br /&gt;
| If not present, the default depot sprites (depending on catenary flag) plus track overlay are drawn.&lt;br /&gt;
If present, the depot sprites are expected to include track overlay graphics.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
|-&lt;br /&gt;
| tunnel_overlay&amp;lt;ref name=tunnel_overlay&amp;gt;Above &#039;all or none&#039; sprites must be supplied, if these sprites are to be used.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 4&lt;br /&gt;
| If this callback is defined, tunnels for this roadtype will be drawn differently. First, a grass underlay base sprite is drawn, then the &#039;tunnels&#039;-sprite. Next, road vehicle sprites if applicable and then a grass overlay and finally the sprite from this type (tunnel_overlay). The grass sprites are defined in the base set and do not contain any parts of the tracks or portal, so these have to be fully provided by the roadtype sprites.&lt;br /&gt;
* &amp;lt;code style:darkgreen&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;: 0 for normal tunnels, without any extra features (like tracks above). All other values are reserved for future extensions.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| roadstops&lt;br /&gt;
| 4&lt;br /&gt;
| Overlays for drive-in road stops&lt;br /&gt;
|-&lt;br /&gt;
| direction_markings&lt;br /&gt;
| 18&lt;br /&gt;
| {{ottd|13}} and {{nml|0.7.4}} Overlays for one-way roads: repeat (arrow facing SW, arrow NE, impassable NE-SW, arrow NW, arrow SE, impassable NW-SE) for flat, N corner raised, S corner raised.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
Note that there is no &amp;quot;default&amp;quot; graphics callback.&lt;br /&gt;
&lt;br /&gt;
===Example sprites===&lt;br /&gt;
==== gui ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_gui.png]]&lt;br /&gt;
&lt;br /&gt;
==== underlay ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_underlay.png]]&lt;br /&gt;
&lt;br /&gt;
==== catenary_front ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_catenary_front.png]]&lt;br /&gt;
&lt;br /&gt;
==== catenary_back ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_catenary_back.png]]&lt;br /&gt;
&lt;br /&gt;
==== depots ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_depot.png]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
!Sprite Number&lt;br /&gt;
!Usage&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;NE wall for SE-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for SE-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;NW wall for SW-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for SW-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for NE-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for NW-entry depot.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== bridge_surfaces ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_bridge.png]]&lt;br /&gt;
&lt;br /&gt;
==== roadstops ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_drivein.png]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==== tunnel_overlay ====&lt;br /&gt;
&lt;br /&gt;
If this callback is defined, tunnels for this roadtype will be drawn differently.&lt;br /&gt;
&lt;br /&gt;
First, a grass underlay base sprite is drawn, then the &#039;tunnels&#039;-sprite. Next, road vehicle sprites if applicable and then a grass overlay and finally the sprite from this callback. The grass sprites are defined in the base set and do not contain any parts of the tracks or portal, so these have to be fully provided by the roadtype sprites.&lt;br /&gt;
&lt;br /&gt;
Illustration: [[File:RoadtypeTunnelExample.png]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== direction_markings ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_oneway.png]]&lt;br /&gt;
&lt;br /&gt;
===Example code===&lt;br /&gt;
&lt;br /&gt;
A typical implementation for roadtypes can look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
 item(FEAT_ROADTYPES, highway, 0x01) {&lt;br /&gt;
     property {&lt;br /&gt;
         label:                      &amp;quot;HWY_&amp;quot;;&lt;br /&gt;
         name:                       string(STR_HWY);&lt;br /&gt;
         menu_text:                  string(STR_HWY);&lt;br /&gt;
         build_window_caption:       string(STR_BUILD_CAPTION);&lt;br /&gt;
         autoreplace_text:           string(STR_AUTOREPLACE);&lt;br /&gt;
         new_engine_text:            string(STR_NEW_ENGINE);&lt;br /&gt;
         powered_roadtype_list:      [&amp;quot;HWY_&amp;quot;,&amp;quot;ROAD&amp;quot;];                          // Highways are compatible with other roads&lt;br /&gt;
         roadtype_flags:             bitmask(ROADTYPE_FLAG_NO_LEVEL_CROSSING, ROADTYPE_FLAG_NO_HOUSES); // Highways should not have level crossings or houses&lt;br /&gt;
         construction_cost:          32;                                       // Highways are expensive&lt;br /&gt;
         speed_limit:                100 km/h;&lt;br /&gt;
     }&lt;br /&gt;
     graphics {&lt;br /&gt;
         underlay:        ground_switch_underlay;    // defines the usual roads&lt;br /&gt;
         depots:          depot_switch;              // defines the depot sprites&lt;br /&gt;
         bridge_surfaces: bridge_terrain_switch;     // defines the overlay drawn over bridges depending on climate&lt;br /&gt;
         roadstops:       roadstops_switch;          // defines the look of roadstop pavement&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The switches and graphics blocks are defined in the usual way as described in sections [[NML:Switch|switches]], [[NML:Random switch|random switches]] and [[NML:Graphics|graphics block]] sections.&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Roadtypes&amp;diff=5142</id>
		<title>NML:Roadtypes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Roadtypes&amp;diff=5142"/>
		<updated>2026-01-03T17:57:50Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* Roadtype variables */ fix paste error&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
Roadtypes can only be defined in OpenTTD {{ottd|1.10}} and {{nml|0.5}} or later. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Roadtype IDs==&lt;br /&gt;
Roadtypes and Tramtypes share a pool of 63 IDs. Either feature can use as many IDs as needed (i.e. it is not limited to 32 per type), but both features combined are limited to 63 in total. NewGRF-local IDs may freely be chosen, but must be in the 0..62 range. If other roadtype/tramtype GRFs are loaded, it may be that there are not enough slots available. To prevent your entire NewGRF from being deactivated with the &#039;Attempt to use invalid ID&#039;-error, you can use the following code:&lt;br /&gt;
&lt;br /&gt;
 if (roadtype_available(&amp;quot;LABL&amp;quot;) || loading_stage == LOADING_STAGE_RESERVE)&lt;br /&gt;
     ... item definition ...&lt;br /&gt;
 } else if (loading_stage == LOADING_STAGE_ACTIVATE) {&lt;br /&gt;
     ... warning / error ...&lt;br /&gt;
 }&lt;br /&gt;
The warning / error is optional, but can be used to inform the user about the missing roadtypes.&lt;br /&gt;
&lt;br /&gt;
== Vehicle and Roadtype availability ==&lt;br /&gt;
&lt;br /&gt;
Vehicle and roadtype availability and compatibility is influenced by multiple properties.&lt;br /&gt;
Generally, the vehicle defines which roadtype it is, and the roadtypes define the compatibility between each other.&lt;br /&gt;
* A vehicle exists, if its roadtype (road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;road_type&amp;lt;/code&amp;gt;) is defined. Otherwise the vehicle is disabled.&lt;br /&gt;
* When a vehicle is introduced, it always introduces its roadtype (road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;road_type&amp;lt;/code&amp;gt;).&lt;br /&gt;
* A roadtype is introduced, if at least one of the following conditions is met:&lt;br /&gt;
** A vehicle is introduced, that references the roadtype (road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;road_type&amp;lt;/code&amp;gt;).&lt;br /&gt;
** Another roadtype is introduced, that references the roadtype via the introduced roadtype list (roadtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;introduces_roadtype_list&amp;lt;/code&amp;gt;).&lt;br /&gt;
** The introduction date (roadtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;introduction_date&amp;lt;/code&amp;gt;) is passed and all required roadtypes (roadtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;requires_roadtype_list &amp;lt;/code&amp;gt;) are available.&lt;br /&gt;
&lt;br /&gt;
Via roadtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;powered_roadtype_list&amp;lt;/code&amp;gt; multiple roadtypes can be defined, which shall be considered equivalent to a roadtype.&lt;br /&gt;
This affects the interpretation of road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;road_type&amp;lt;/code&amp;gt;. If road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;road_type&amp;lt;/code&amp;gt; references an undefined roadtype, then&lt;br /&gt;
roadtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;powered_roadtype_list&amp;lt;/code&amp;gt; is checked for all defined roadtypes, whether the vehicle can be reassigned to some other roadtype.&lt;br /&gt;
Otherwise the vehicle is disabled.&lt;br /&gt;
&lt;br /&gt;
==Roadtype properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! property&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| label&lt;br /&gt;
| 4-byte string&lt;br /&gt;
| names of default road types: &amp;quot;ROAD&amp;quot; and &amp;quot;ELRD&amp;quot;. See the [[RoadtypeLabels|List of roadtype labels]] in the NewGRF Specs for currently defined custom labels.&lt;br /&gt;
|-&lt;br /&gt;
| introduction_date&lt;br /&gt;
| date(yyyy,mm,dd)&lt;br /&gt;
| Valid range for yyyy is 0 ... 5000000.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| string&lt;br /&gt;
| Name of this roadtype&lt;br /&gt;
|-&lt;br /&gt;
| toolbar_caption&lt;br /&gt;
| string&lt;br /&gt;
| Caption of the build road toolbar&lt;br /&gt;
|-&lt;br /&gt;
| menu_text&lt;br /&gt;
| string&lt;br /&gt;
| Shown in the dropdown menu for all roadtypes&lt;br /&gt;
|-&lt;br /&gt;
| build_window_caption&lt;br /&gt;
| string&lt;br /&gt;
| Caption of the build vehicle window&lt;br /&gt;
|-&lt;br /&gt;
| autoreplace_text&lt;br /&gt;
| string&lt;br /&gt;
| String for the autoreplace window&lt;br /&gt;
|-&lt;br /&gt;
| new_engine_text&lt;br /&gt;
| string&lt;br /&gt;
| String for the &amp;quot;We have invented a new &amp;amp;lt;road type&amp;amp;gt; engine&amp;quot; news message&lt;br /&gt;
|-&lt;br /&gt;
| powered_roadtype_list&lt;br /&gt;
| list of roadtype labels&lt;br /&gt;
| Provide a list of road types that road vehicles of this type are powered on, e.g. [&amp;quot;ROAD&amp;quot;, &amp;quot;ELRD&amp;quot;]. Note that there is no &amp;quot;compatible_roadtype_list&amp;quot; since there is no difference between &amp;quot;powered&amp;quot; and &amp;quot;compatible&amp;quot; for roadtypes&lt;br /&gt;
|-&lt;br /&gt;
| roadtype_flags&lt;br /&gt;
| bitmask(ROADTYPE_FLAG_XXX, ...)&lt;br /&gt;
|&lt;br /&gt;
;CATENARY&lt;br /&gt;
:Enable catenary&lt;br /&gt;
;NO_LEVEL_CROSSING&lt;br /&gt;
:Disable level crossings&lt;br /&gt;
;NO_HOUSES&lt;br /&gt;
:Disallows house construction&lt;br /&gt;
;HIDDEN&lt;br /&gt;
:Hides the roadtype from players, but remains available to towns&lt;br /&gt;
;TOWN_BUILD&lt;br /&gt;
:Enables the roadtype to be built by towns, picked by highest speed (defaults to ROAD if no speed limits?)&lt;br /&gt;
|-&lt;br /&gt;
| construction_cost&lt;br /&gt;
| 0 ... 65525&lt;br /&gt;
| Per piece of road as multiplier to PR_BUILD_ROAD base cost. Default cost factors are 8 and 16 for ROAD and ELRD, respectively.&lt;br /&gt;
|-&lt;br /&gt;
| speed_limit&lt;br /&gt;
| 0 ... 65525 km/h (speed units)&lt;br /&gt;
| A speed limit of 0 means unlimited speed&lt;br /&gt;
|-&lt;br /&gt;
| map_colour&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Entry in the colour palette.&lt;br /&gt;
|-&lt;br /&gt;
| requires_roadtype_list&lt;br /&gt;
| list of roadtype labels&lt;br /&gt;
| List of road types that need to be available to the company of the player for this road type to be introduced at (or after) the introduction date. This limit does not apply when the road type is introduced by the introduction of a vehicle.&lt;br /&gt;
|-&lt;br /&gt;
| introduces_roadtype_list&lt;br /&gt;
| list of roadtype labels&lt;br /&gt;
| List of road types that get introduced when this road type is introduced. For example, to make sure that when a fast road type is introduced the slow variant exists.&lt;br /&gt;
|-&lt;br /&gt;
| sort_order&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Number which defines the sort order among road types. If this entry is not defined, it gets assigned sort order n*10+7 for the n-th roadtype.&lt;br /&gt;
|-&lt;br /&gt;
| maintenance_cost&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Maintenance cost factor for each piece of road of this roadtype. Default cost factors are 16 and 24 for ROAD and ELRD, respectively.&lt;br /&gt;
|-&lt;br /&gt;
| alternative_roadtype_list&lt;br /&gt;
| list of roadtype labels&lt;br /&gt;
| List of road types which this road type will act as fallback for, if the corresponding road type is not defined separately&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Sort order===&lt;br /&gt;
&lt;br /&gt;
The sort_order influences the sort order of the drop down lists with road types. Default values are as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! Value&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 07&lt;br /&gt;
| normal road&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| electrified road&lt;br /&gt;
|-&lt;br /&gt;
| n7&lt;br /&gt;
| roadtype #n&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus the road type that (internally) gets index 8 will get a default value of 87. These defaults are to keep the ordering when this property is not supported as they were.&lt;br /&gt;
&lt;br /&gt;
==Roadtype variables==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| terrain_type&lt;br /&gt;
| TILETYPE_NORMAL, TILETYPE_DESERT, TILETYPE_RAIN_FOREST, TILETYPE_SNOW&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| enhanced_tunnels&lt;br /&gt;
| 0&lt;br /&gt;
| Reserved for future use, always returns 0 in OpenTTD. Should custom tunnel entrances be implemented, other values than 0 might be returned&lt;br /&gt;
|-&lt;br /&gt;
| level_crossing_status&lt;br /&gt;
| LEVEL_CROSSING_CLOSED, LEVEL_CROSSING_OPEN&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| build_date&lt;br /&gt;
| 0 .. 5000000&lt;br /&gt;
| for depots only: build date of the depot in days since 0&lt;br /&gt;
|-&lt;br /&gt;
| town_zone&lt;br /&gt;
| [[NML:List of town zones|town zone]]&lt;br /&gt;
| Town zone of the tile&lt;br /&gt;
|-&lt;br /&gt;
| random_bits&lt;br /&gt;
|&lt;br /&gt;
| 2 pseudo random bits, based on tile location&lt;br /&gt;
| -&lt;br /&gt;
| railtype&lt;br /&gt;
| Entry from railtype translation table or RAILTYPE_OTHER_GRF or RAILTYPE_NO_ROAD&lt;br /&gt;
| railtype present on the tile&lt;br /&gt;
|-&lt;br /&gt;
| roadtype&lt;br /&gt;
| Entry from roadtype translation table or ROADTYPE_OTHER_GRF or ROADTYPE_NO_ROAD&lt;br /&gt;
| roadtype present on the tile&lt;br /&gt;
|-&lt;br /&gt;
| tramtype&lt;br /&gt;
| Entry from tramtype translation table or TRAMTYPE_OTHER_GRF or TRAMTYPE_NO_ROAD&lt;br /&gt;
| tramtype present on the tile&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Roadtype callbacks==&lt;br /&gt;
&lt;br /&gt;
For road types a number of callbacks are used to define road type graphics. Each should refer to a sprite set containing the relevant sprites. Refer to the [[#Example sprites|example sprites]] or the example roadtype grf in the NML repository, for an example on what sprites are needed in what order.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! callbacks&lt;br /&gt;
! number of sprites&lt;br /&gt;
! meaning&lt;br /&gt;
|-&lt;br /&gt;
| gui&lt;br /&gt;
| 12&lt;br /&gt;
| 6 gui icons, 6 cursors&lt;br /&gt;
|-&lt;br /&gt;
| track_overlay&amp;lt;ref name=leftout&amp;gt;Either all or none of these sprites should be provided.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 19&lt;br /&gt;
| 11 roadbit combinations, 4 slopes, and 4 dead ends. These sprites are optional for roadtypes.&lt;br /&gt;
|-&lt;br /&gt;
| underlay&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 19&lt;br /&gt;
| 11 roadbit combinations, 4 slopes, and 4 dead ends. These sprites are required.&lt;br /&gt;
|-&lt;br /&gt;
| tunnels&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 4&lt;br /&gt;
| {{ottd|13}} and {{nml|0.7.2}} 1 sprite for each direction. Sprite is overlay for road in existing tunnel graphics. The original ground sprite is drawn, then the overlay, then possibly a road vehicle and the original tunnel head is drawn over the top. This keeps compatibility with different landscape types. Sprite order: SW, NW, NE, SE.&lt;br /&gt;
|-&lt;br /&gt;
| catenary_front&lt;br /&gt;
| 29&lt;br /&gt;
| 11 roadbit combinations, 4 slopes, 4 dead ends, 4 tunnels, 2 bridge middle, 4 bridge ramps&lt;br /&gt;
|-&lt;br /&gt;
| catenary_back&lt;br /&gt;
| 29&lt;br /&gt;
| 11 roadbit combinations, 4 slopes, 4 dead ends, 4 tunnels (unused), 2 bridge middle, 4 bridge ramps&lt;br /&gt;
|-&lt;br /&gt;
| bridge_surfaces&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 6&lt;br /&gt;
| 2 bridge middle, 4 bridge ramps&lt;br /&gt;
|-&lt;br /&gt;
| depots&lt;br /&gt;
| 6&lt;br /&gt;
| If not present, the default depot sprites (depending on catenary flag) plus track overlay are drawn.&lt;br /&gt;
If present, the depot sprites are expected to include track overlay graphics.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
|-&lt;br /&gt;
| tunnel_overlay&amp;lt;ref name=tunnel_overlay&amp;gt;Above &#039;all or none&#039; sprites must be supplied, if these sprites are to be used.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 4&lt;br /&gt;
| If this callback is defined, tunnels for this roadtype will be drawn differently. First, a grass underlay base sprite is drawn, then the &#039;tunnels&#039;-sprite. Next, road vehicle sprites if applicable and then a grass overlay and finally the sprite from this type (tunnel_overlay). The grass sprites are defined in the base set and do not contain any parts of the tracks or portal, so these have to be fully provided by the roadtype sprites.&lt;br /&gt;
* &amp;lt;code style:darkgreen&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;: 0 for normal tunnels, without any extra features (like tracks above). All other values are reserved for future extensions.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| roadstops&lt;br /&gt;
| 4&lt;br /&gt;
| Overlays for drive-in road stops&lt;br /&gt;
|-&lt;br /&gt;
| direction_markings&lt;br /&gt;
| 18&lt;br /&gt;
| {{ottd|13}} and {{nml|0.7.4}} Overlays for one-way roads: repeat (arrow facing SW, arrow NE, impassable NE-SW, arrow NW, arrow SE, impassable NW-SE) for flat, N corner raised, S corner raised.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
Note that there is no &amp;quot;default&amp;quot; graphics callback.&lt;br /&gt;
&lt;br /&gt;
===Example sprites===&lt;br /&gt;
==== gui ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_gui.png]]&lt;br /&gt;
&lt;br /&gt;
==== underlay ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_underlay.png]]&lt;br /&gt;
&lt;br /&gt;
==== catenary_front ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_catenary_front.png]]&lt;br /&gt;
&lt;br /&gt;
==== catenary_back ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_catenary_back.png]]&lt;br /&gt;
&lt;br /&gt;
==== depots ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_depot.png]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
!Sprite Number&lt;br /&gt;
!Usage&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;NE wall for SE-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for SE-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;NW wall for SW-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for SW-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for NE-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for NW-entry depot.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== bridge_surfaces ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_bridge.png]]&lt;br /&gt;
&lt;br /&gt;
==== roadstops ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_drivein.png]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==== tunnel_overlay ====&lt;br /&gt;
&lt;br /&gt;
If this callback is defined, tunnels for this roadtype will be drawn differently.&lt;br /&gt;
&lt;br /&gt;
First, a grass underlay base sprite is drawn, then the &#039;tunnels&#039;-sprite. Next, road vehicle sprites if applicable and then a grass overlay and finally the sprite from this callback. The grass sprites are defined in the base set and do not contain any parts of the tracks or portal, so these have to be fully provided by the roadtype sprites.&lt;br /&gt;
&lt;br /&gt;
Illustration: [[File:RoadtypeTunnelExample.png]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== direction_markings ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_oneway.png]]&lt;br /&gt;
&lt;br /&gt;
===Example code===&lt;br /&gt;
&lt;br /&gt;
A typical implementation for roadtypes can look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
 item(FEAT_ROADTYPES, highway, 0x01) {&lt;br /&gt;
     property {&lt;br /&gt;
         label:                      &amp;quot;HWY_&amp;quot;;&lt;br /&gt;
         name:                       string(STR_HWY);&lt;br /&gt;
         menu_text:                  string(STR_HWY);&lt;br /&gt;
         build_window_caption:       string(STR_BUILD_CAPTION);&lt;br /&gt;
         autoreplace_text:           string(STR_AUTOREPLACE);&lt;br /&gt;
         new_engine_text:            string(STR_NEW_ENGINE);&lt;br /&gt;
         powered_roadtype_list:      [&amp;quot;HWY_&amp;quot;,&amp;quot;ROAD&amp;quot;];                          // Highways are compatible with other roads&lt;br /&gt;
         roadtype_flags:             bitmask(ROADTYPE_FLAG_NO_LEVEL_CROSSING, ROADTYPE_FLAG_NO_HOUSES); // Highways should not have level crossings or houses&lt;br /&gt;
         construction_cost:          32;                                       // Highways are expensive&lt;br /&gt;
         speed_limit:                100 km/h;&lt;br /&gt;
     }&lt;br /&gt;
     graphics {&lt;br /&gt;
         underlay:        ground_switch_underlay;    // defines the usual roads&lt;br /&gt;
         depots:          depot_switch;              // defines the depot sprites&lt;br /&gt;
         bridge_surfaces: bridge_terrain_switch;     // defines the overlay drawn over bridges depending on climate&lt;br /&gt;
         roadstops:       roadstops_switch;          // defines the look of roadstop pavement&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The switches and graphics blocks are defined in the usual way as described in sections [[NML:Switch|switches]], [[NML:Random switch|random switches]] and [[NML:Graphics|graphics block]] sections.&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Roadtypes&amp;diff=5141</id>
		<title>NML:Roadtypes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Roadtypes&amp;diff=5141"/>
		<updated>2026-01-03T17:57:28Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* Roadtype variables */ document railtype, roadtype, tramtype variables&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
Roadtypes can only be defined in OpenTTD {{ottd|1.10}} and {{nml|0.5}} or later. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Roadtype IDs==&lt;br /&gt;
Roadtypes and Tramtypes share a pool of 63 IDs. Either feature can use as many IDs as needed (i.e. it is not limited to 32 per type), but both features combined are limited to 63 in total. NewGRF-local IDs may freely be chosen, but must be in the 0..62 range. If other roadtype/tramtype GRFs are loaded, it may be that there are not enough slots available. To prevent your entire NewGRF from being deactivated with the &#039;Attempt to use invalid ID&#039;-error, you can use the following code:&lt;br /&gt;
&lt;br /&gt;
 if (roadtype_available(&amp;quot;LABL&amp;quot;) || loading_stage == LOADING_STAGE_RESERVE)&lt;br /&gt;
     ... item definition ...&lt;br /&gt;
 } else if (loading_stage == LOADING_STAGE_ACTIVATE) {&lt;br /&gt;
     ... warning / error ...&lt;br /&gt;
 }&lt;br /&gt;
The warning / error is optional, but can be used to inform the user about the missing roadtypes.&lt;br /&gt;
&lt;br /&gt;
== Vehicle and Roadtype availability ==&lt;br /&gt;
&lt;br /&gt;
Vehicle and roadtype availability and compatibility is influenced by multiple properties.&lt;br /&gt;
Generally, the vehicle defines which roadtype it is, and the roadtypes define the compatibility between each other.&lt;br /&gt;
* A vehicle exists, if its roadtype (road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;road_type&amp;lt;/code&amp;gt;) is defined. Otherwise the vehicle is disabled.&lt;br /&gt;
* When a vehicle is introduced, it always introduces its roadtype (road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;road_type&amp;lt;/code&amp;gt;).&lt;br /&gt;
* A roadtype is introduced, if at least one of the following conditions is met:&lt;br /&gt;
** A vehicle is introduced, that references the roadtype (road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;road_type&amp;lt;/code&amp;gt;).&lt;br /&gt;
** Another roadtype is introduced, that references the roadtype via the introduced roadtype list (roadtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;introduces_roadtype_list&amp;lt;/code&amp;gt;).&lt;br /&gt;
** The introduction date (roadtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;introduction_date&amp;lt;/code&amp;gt;) is passed and all required roadtypes (roadtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;requires_roadtype_list &amp;lt;/code&amp;gt;) are available.&lt;br /&gt;
&lt;br /&gt;
Via roadtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;powered_roadtype_list&amp;lt;/code&amp;gt; multiple roadtypes can be defined, which shall be considered equivalent to a roadtype.&lt;br /&gt;
This affects the interpretation of road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;road_type&amp;lt;/code&amp;gt;. If road vehicle property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;road_type&amp;lt;/code&amp;gt; references an undefined roadtype, then&lt;br /&gt;
roadtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;powered_roadtype_list&amp;lt;/code&amp;gt; is checked for all defined roadtypes, whether the vehicle can be reassigned to some other roadtype.&lt;br /&gt;
Otherwise the vehicle is disabled.&lt;br /&gt;
&lt;br /&gt;
==Roadtype properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! property&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| label&lt;br /&gt;
| 4-byte string&lt;br /&gt;
| names of default road types: &amp;quot;ROAD&amp;quot; and &amp;quot;ELRD&amp;quot;. See the [[RoadtypeLabels|List of roadtype labels]] in the NewGRF Specs for currently defined custom labels.&lt;br /&gt;
|-&lt;br /&gt;
| introduction_date&lt;br /&gt;
| date(yyyy,mm,dd)&lt;br /&gt;
| Valid range for yyyy is 0 ... 5000000.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| string&lt;br /&gt;
| Name of this roadtype&lt;br /&gt;
|-&lt;br /&gt;
| toolbar_caption&lt;br /&gt;
| string&lt;br /&gt;
| Caption of the build road toolbar&lt;br /&gt;
|-&lt;br /&gt;
| menu_text&lt;br /&gt;
| string&lt;br /&gt;
| Shown in the dropdown menu for all roadtypes&lt;br /&gt;
|-&lt;br /&gt;
| build_window_caption&lt;br /&gt;
| string&lt;br /&gt;
| Caption of the build vehicle window&lt;br /&gt;
|-&lt;br /&gt;
| autoreplace_text&lt;br /&gt;
| string&lt;br /&gt;
| String for the autoreplace window&lt;br /&gt;
|-&lt;br /&gt;
| new_engine_text&lt;br /&gt;
| string&lt;br /&gt;
| String for the &amp;quot;We have invented a new &amp;amp;lt;road type&amp;amp;gt; engine&amp;quot; news message&lt;br /&gt;
|-&lt;br /&gt;
| powered_roadtype_list&lt;br /&gt;
| list of roadtype labels&lt;br /&gt;
| Provide a list of road types that road vehicles of this type are powered on, e.g. [&amp;quot;ROAD&amp;quot;, &amp;quot;ELRD&amp;quot;]. Note that there is no &amp;quot;compatible_roadtype_list&amp;quot; since there is no difference between &amp;quot;powered&amp;quot; and &amp;quot;compatible&amp;quot; for roadtypes&lt;br /&gt;
|-&lt;br /&gt;
| roadtype_flags&lt;br /&gt;
| bitmask(ROADTYPE_FLAG_XXX, ...)&lt;br /&gt;
|&lt;br /&gt;
;CATENARY&lt;br /&gt;
:Enable catenary&lt;br /&gt;
;NO_LEVEL_CROSSING&lt;br /&gt;
:Disable level crossings&lt;br /&gt;
;NO_HOUSES&lt;br /&gt;
:Disallows house construction&lt;br /&gt;
;HIDDEN&lt;br /&gt;
:Hides the roadtype from players, but remains available to towns&lt;br /&gt;
;TOWN_BUILD&lt;br /&gt;
:Enables the roadtype to be built by towns, picked by highest speed (defaults to ROAD if no speed limits?)&lt;br /&gt;
|-&lt;br /&gt;
| construction_cost&lt;br /&gt;
| 0 ... 65525&lt;br /&gt;
| Per piece of road as multiplier to PR_BUILD_ROAD base cost. Default cost factors are 8 and 16 for ROAD and ELRD, respectively.&lt;br /&gt;
|-&lt;br /&gt;
| speed_limit&lt;br /&gt;
| 0 ... 65525 km/h (speed units)&lt;br /&gt;
| A speed limit of 0 means unlimited speed&lt;br /&gt;
|-&lt;br /&gt;
| map_colour&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Entry in the colour palette.&lt;br /&gt;
|-&lt;br /&gt;
| requires_roadtype_list&lt;br /&gt;
| list of roadtype labels&lt;br /&gt;
| List of road types that need to be available to the company of the player for this road type to be introduced at (or after) the introduction date. This limit does not apply when the road type is introduced by the introduction of a vehicle.&lt;br /&gt;
|-&lt;br /&gt;
| introduces_roadtype_list&lt;br /&gt;
| list of roadtype labels&lt;br /&gt;
| List of road types that get introduced when this road type is introduced. For example, to make sure that when a fast road type is introduced the slow variant exists.&lt;br /&gt;
|-&lt;br /&gt;
| sort_order&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Number which defines the sort order among road types. If this entry is not defined, it gets assigned sort order n*10+7 for the n-th roadtype.&lt;br /&gt;
|-&lt;br /&gt;
| maintenance_cost&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Maintenance cost factor for each piece of road of this roadtype. Default cost factors are 16 and 24 for ROAD and ELRD, respectively.&lt;br /&gt;
|-&lt;br /&gt;
| alternative_roadtype_list&lt;br /&gt;
| list of roadtype labels&lt;br /&gt;
| List of road types which this road type will act as fallback for, if the corresponding road type is not defined separately&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Sort order===&lt;br /&gt;
&lt;br /&gt;
The sort_order influences the sort order of the drop down lists with road types. Default values are as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! Value&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 07&lt;br /&gt;
| normal road&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| electrified road&lt;br /&gt;
|-&lt;br /&gt;
| n7&lt;br /&gt;
| roadtype #n&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus the road type that (internally) gets index 8 will get a default value of 87. These defaults are to keep the ordering when this property is not supported as they were.&lt;br /&gt;
&lt;br /&gt;
==Roadtype variables==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| terrain_type&lt;br /&gt;
| TILETYPE_NORMAL, TILETYPE_DESERT, TILETYPE_RAIN_FOREST, TILETYPE_SNOW&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| enhanced_tunnels&lt;br /&gt;
| 0&lt;br /&gt;
| Reserved for future use, always returns 0 in OpenTTD. Should custom tunnel entrances be implemented, other values than 0 might be returned&lt;br /&gt;
|-&lt;br /&gt;
| level_crossing_status&lt;br /&gt;
| LEVEL_CROSSING_CLOSED, LEVEL_CROSSING_OPEN&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| build_date&lt;br /&gt;
| 0 .. 5000000&lt;br /&gt;
| for depots only: build date of the depot in days since 0&lt;br /&gt;
|-&lt;br /&gt;
| town_zone&lt;br /&gt;
| [[NML:List of town zones|town zone]]&lt;br /&gt;
| Town zone of the tile&lt;br /&gt;
|-&lt;br /&gt;
| random_bits&lt;br /&gt;
|&lt;br /&gt;
| 2 pseudo random bits, based on tile location&lt;br /&gt;
| railtype&lt;br /&gt;
| Entry from railtype translation table or RAILTYPE_OTHER_GRF or RAILTYPE_NO_ROAD&lt;br /&gt;
| railtype present on the tile&lt;br /&gt;
|-&lt;br /&gt;
| roadtype&lt;br /&gt;
| Entry from roadtype translation table or ROADTYPE_OTHER_GRF or ROADTYPE_NO_ROAD&lt;br /&gt;
| roadtype present on the tile&lt;br /&gt;
|-&lt;br /&gt;
| tramtype&lt;br /&gt;
| Entry from tramtype translation table or TRAMTYPE_OTHER_GRF or TRAMTYPE_NO_ROAD&lt;br /&gt;
| tramtype present on the tile&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Roadtype callbacks==&lt;br /&gt;
&lt;br /&gt;
For road types a number of callbacks are used to define road type graphics. Each should refer to a sprite set containing the relevant sprites. Refer to the [[#Example sprites|example sprites]] or the example roadtype grf in the NML repository, for an example on what sprites are needed in what order.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! callbacks&lt;br /&gt;
! number of sprites&lt;br /&gt;
! meaning&lt;br /&gt;
|-&lt;br /&gt;
| gui&lt;br /&gt;
| 12&lt;br /&gt;
| 6 gui icons, 6 cursors&lt;br /&gt;
|-&lt;br /&gt;
| track_overlay&amp;lt;ref name=leftout&amp;gt;Either all or none of these sprites should be provided.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 19&lt;br /&gt;
| 11 roadbit combinations, 4 slopes, and 4 dead ends. These sprites are optional for roadtypes.&lt;br /&gt;
|-&lt;br /&gt;
| underlay&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 19&lt;br /&gt;
| 11 roadbit combinations, 4 slopes, and 4 dead ends. These sprites are required.&lt;br /&gt;
|-&lt;br /&gt;
| tunnels&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 4&lt;br /&gt;
| {{ottd|13}} and {{nml|0.7.2}} 1 sprite for each direction. Sprite is overlay for road in existing tunnel graphics. The original ground sprite is drawn, then the overlay, then possibly a road vehicle and the original tunnel head is drawn over the top. This keeps compatibility with different landscape types. Sprite order: SW, NW, NE, SE.&lt;br /&gt;
|-&lt;br /&gt;
| catenary_front&lt;br /&gt;
| 29&lt;br /&gt;
| 11 roadbit combinations, 4 slopes, 4 dead ends, 4 tunnels, 2 bridge middle, 4 bridge ramps&lt;br /&gt;
|-&lt;br /&gt;
| catenary_back&lt;br /&gt;
| 29&lt;br /&gt;
| 11 roadbit combinations, 4 slopes, 4 dead ends, 4 tunnels (unused), 2 bridge middle, 4 bridge ramps&lt;br /&gt;
|-&lt;br /&gt;
| bridge_surfaces&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 6&lt;br /&gt;
| 2 bridge middle, 4 bridge ramps&lt;br /&gt;
|-&lt;br /&gt;
| depots&lt;br /&gt;
| 6&lt;br /&gt;
| If not present, the default depot sprites (depending on catenary flag) plus track overlay are drawn.&lt;br /&gt;
If present, the depot sprites are expected to include track overlay graphics.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
|-&lt;br /&gt;
| tunnel_overlay&amp;lt;ref name=tunnel_overlay&amp;gt;Above &#039;all or none&#039; sprites must be supplied, if these sprites are to be used.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 4&lt;br /&gt;
| If this callback is defined, tunnels for this roadtype will be drawn differently. First, a grass underlay base sprite is drawn, then the &#039;tunnels&#039;-sprite. Next, road vehicle sprites if applicable and then a grass overlay and finally the sprite from this type (tunnel_overlay). The grass sprites are defined in the base set and do not contain any parts of the tracks or portal, so these have to be fully provided by the roadtype sprites.&lt;br /&gt;
* &amp;lt;code style:darkgreen&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;: 0 for normal tunnels, without any extra features (like tracks above). All other values are reserved for future extensions.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| roadstops&lt;br /&gt;
| 4&lt;br /&gt;
| Overlays for drive-in road stops&lt;br /&gt;
|-&lt;br /&gt;
| direction_markings&lt;br /&gt;
| 18&lt;br /&gt;
| {{ottd|13}} and {{nml|0.7.4}} Overlays for one-way roads: repeat (arrow facing SW, arrow NE, impassable NE-SW, arrow NW, arrow SE, impassable NW-SE) for flat, N corner raised, S corner raised.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
Note that there is no &amp;quot;default&amp;quot; graphics callback.&lt;br /&gt;
&lt;br /&gt;
===Example sprites===&lt;br /&gt;
==== gui ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_gui.png]]&lt;br /&gt;
&lt;br /&gt;
==== underlay ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_underlay.png]]&lt;br /&gt;
&lt;br /&gt;
==== catenary_front ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_catenary_front.png]]&lt;br /&gt;
&lt;br /&gt;
==== catenary_back ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_catenary_back.png]]&lt;br /&gt;
&lt;br /&gt;
==== depots ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_depot.png]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
!Sprite Number&lt;br /&gt;
!Usage&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;NE wall for SE-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for SE-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;NW wall for SW-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for SW-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for NE-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for NW-entry depot.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== bridge_surfaces ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_bridge.png]]&lt;br /&gt;
&lt;br /&gt;
==== roadstops ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_drivein.png]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==== tunnel_overlay ====&lt;br /&gt;
&lt;br /&gt;
If this callback is defined, tunnels for this roadtype will be drawn differently.&lt;br /&gt;
&lt;br /&gt;
First, a grass underlay base sprite is drawn, then the &#039;tunnels&#039;-sprite. Next, road vehicle sprites if applicable and then a grass overlay and finally the sprite from this callback. The grass sprites are defined in the base set and do not contain any parts of the tracks or portal, so these have to be fully provided by the roadtype sprites.&lt;br /&gt;
&lt;br /&gt;
Illustration: [[File:RoadtypeTunnelExample.png]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== direction_markings ====&lt;br /&gt;
&lt;br /&gt;
[[File:Nrt_oneway.png]]&lt;br /&gt;
&lt;br /&gt;
===Example code===&lt;br /&gt;
&lt;br /&gt;
A typical implementation for roadtypes can look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
 item(FEAT_ROADTYPES, highway, 0x01) {&lt;br /&gt;
     property {&lt;br /&gt;
         label:                      &amp;quot;HWY_&amp;quot;;&lt;br /&gt;
         name:                       string(STR_HWY);&lt;br /&gt;
         menu_text:                  string(STR_HWY);&lt;br /&gt;
         build_window_caption:       string(STR_BUILD_CAPTION);&lt;br /&gt;
         autoreplace_text:           string(STR_AUTOREPLACE);&lt;br /&gt;
         new_engine_text:            string(STR_NEW_ENGINE);&lt;br /&gt;
         powered_roadtype_list:      [&amp;quot;HWY_&amp;quot;,&amp;quot;ROAD&amp;quot;];                          // Highways are compatible with other roads&lt;br /&gt;
         roadtype_flags:             bitmask(ROADTYPE_FLAG_NO_LEVEL_CROSSING, ROADTYPE_FLAG_NO_HOUSES); // Highways should not have level crossings or houses&lt;br /&gt;
         construction_cost:          32;                                       // Highways are expensive&lt;br /&gt;
         speed_limit:                100 km/h;&lt;br /&gt;
     }&lt;br /&gt;
     graphics {&lt;br /&gt;
         underlay:        ground_switch_underlay;    // defines the usual roads&lt;br /&gt;
         depots:          depot_switch;              // defines the depot sprites&lt;br /&gt;
         bridge_surfaces: bridge_terrain_switch;     // defines the overlay drawn over bridges depending on climate&lt;br /&gt;
         roadstops:       roadstops_switch;          // defines the look of roadstop pavement&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The switches and graphics blocks are defined in the usual way as described in sections [[NML:Switch|switches]], [[NML:Random switch|random switches]] and [[NML:Graphics|graphics block]] sections.&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Railtypes&amp;diff=5140</id>
		<title>NML:Railtypes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Railtypes&amp;diff=5140"/>
		<updated>2026-01-03T17:56:36Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* Railtype variables */ document railtype, roadtype, tramtype&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
Railtypes can only be defined in OpenTTD {{ottd|1.0|r18969}} or later. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Railtype IDs==&lt;br /&gt;
Railtype IDs are limited to 64 in total. NewGRF-local IDs may freely be chosen, but must be in the 0..63 range. If other railtype GRFs are loaded, it may be that there are not enough railtype slots available. To prevent your entire NewGRF from being deactivated with the &#039;Attempt to use invalid ID&#039;-error, you can use the following code:&lt;br /&gt;
&lt;br /&gt;
 if (railtype_available(&amp;quot;LABL&amp;quot;) || loading_stage == LOADING_STAGE_RESERVE)&lt;br /&gt;
     ... item definition ...&lt;br /&gt;
 } else if (loading_stage == LOADING_STAGE_ACTIVATE) {&lt;br /&gt;
     ... warning / error ...&lt;br /&gt;
 }&lt;br /&gt;
The warning / error is optional, but can be used to inform the user about the missing railtypes.&lt;br /&gt;
&lt;br /&gt;
== Vehicle and Railtype availability ==&lt;br /&gt;
&lt;br /&gt;
Vehicle and railtype availability and compatibility is influenced by multiple properties.&lt;br /&gt;
Generally, the vehicle defines which railtype it is, and the railtypes define the compatibility between each other.&lt;br /&gt;
* A vehicle exists, if its railtype (train property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;track_type&amp;lt;/code&amp;gt;) is defined. Otherwise the vehicle is disabled.&lt;br /&gt;
* When a vehicle is introduced, it always introduces its railtype (train property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;track_type&amp;lt;/code&amp;gt;).&lt;br /&gt;
* A railtype is introduced, if at least one of the following conditions is met:&lt;br /&gt;
** A vehicle is introduced, that references the railtype (train property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;track_type&amp;lt;/code&amp;gt;).&lt;br /&gt;
** Another railtype is introduced, that references the railtype via the introduced railtype list (railtype propery &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;introduces_railtype_list&amp;lt;/code&amp;gt;).&lt;br /&gt;
** The introduction date (railtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;introduction_date&amp;lt;/code&amp;gt;) is passed and all required railtypes (railtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;requires_railtype_list &amp;lt;/code&amp;gt;) are available.&lt;br /&gt;
&lt;br /&gt;
Via railtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;compatible_railtype_list&amp;lt;/code&amp;gt; multiple railtypes can be defined, which shall be considered equivalent to a railtype.&lt;br /&gt;
This affects the interpretation of train property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;track_type&amp;lt;/code&amp;gt;. If train property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;track_type&amp;lt;/code&amp;gt; references an undefined railtype, then&lt;br /&gt;
railtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;compatible_railtype_list&amp;lt;/code&amp;gt; is checked for all defined railtypes, whether the vehicle can be reassigned to some other railtype.&lt;br /&gt;
Otherwise the vehicle is disabled.  However note also that &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;alternative_railtype_list&amp;lt;/code&amp;gt; provides an alternative/complementary approach to handling undefined railtypes.&lt;br /&gt;
&lt;br /&gt;
Note that when routing trains onto railtypes, the compatibility is only evaluated for the lead engine of a consist. This means that trains will run on incompatible rail types if they are in a consist where the lead engine is compatible with the rail type. This applies to both engines and wagons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Railtype properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! property&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| label&lt;br /&gt;
| 4-byte string&lt;br /&gt;
| names of default rail types: &amp;quot;RAIL&amp;quot;, &amp;quot;ELRL&amp;quot;, &amp;quot;MONO&amp;quot;, &amp;quot;MGLV&amp;quot;. See the [[RailtypeLabels|List of railtype labels]] in the NewGRF Specs for currently defined custom labels.&lt;br /&gt;
|-&lt;br /&gt;
| introduction_date&lt;br /&gt;
| date(yyyy,mm,dd)&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r21842}} Valid range for yyyy is 0 ... 5000000.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| string&lt;br /&gt;
| Name of this railtype&lt;br /&gt;
|-&lt;br /&gt;
| toolbar_caption&lt;br /&gt;
| string&lt;br /&gt;
| {{ottdp|1.2|no|ottdrev=23129}} Caption of the build rail toolbar. In earlier versions this is the same as the &#039;name&#039;&lt;br /&gt;
|-&lt;br /&gt;
| menu_text&lt;br /&gt;
| string&lt;br /&gt;
| Shown in the dropdown menu for all railtypes&lt;br /&gt;
|-&lt;br /&gt;
| build_window_caption&lt;br /&gt;
| string&lt;br /&gt;
| Caption of the build vehicle window&lt;br /&gt;
|-&lt;br /&gt;
| autoreplace_text&lt;br /&gt;
| string&lt;br /&gt;
| String for the autoreplace window&lt;br /&gt;
|-&lt;br /&gt;
| new_engine_text&lt;br /&gt;
| string&lt;br /&gt;
| String for the &amp;quot;We have invented a new &amp;amp;lt;rail type&amp;amp;gt; engine&amp;quot; news message&lt;br /&gt;
|-&lt;br /&gt;
| compatible_railtype_list&lt;br /&gt;
| list of railtype labels&lt;br /&gt;
| Provide a list of rail types that trains of this type can also run on. e.g. [&amp;quot;RAIL&amp;quot;, &amp;quot;ELRL&amp;quot;, &amp;quot;MONO&amp;quot;]. Note that when routing trains, the compatibility is only evaluated for the lead engine of a consist. This means that trains will run on incompatible rail types if they are in a consist where the lead engine is compatible with the rail type. This applies to both engines and wagons.&lt;br /&gt;
|-&lt;br /&gt;
| powered_railtype_list&lt;br /&gt;
| list of railtype labels&lt;br /&gt;
| Provide a list of rail types that trains of this type are powered on.&lt;br /&gt;
|-&lt;br /&gt;
| railtype_flags&lt;br /&gt;
| bitmask(RAILTYPE_FLAG_XXX, ...)&lt;br /&gt;
|&lt;br /&gt;
; CATENARY&lt;br /&gt;
: Enable catenary&lt;br /&gt;
; NO_LEVEL_CROSSING&lt;br /&gt;
: Disable level crossings&lt;br /&gt;
; HIDDEN {{ottd|1.9}}&lt;br /&gt;
: Hides railtype from player&lt;br /&gt;
; PRECOMBINED {{ottd|1.10}}&lt;br /&gt;
: Enable use of precombined overlay sprites&lt;br /&gt;
; ALLOW_90DEG {{ottd|1.10}}&lt;br /&gt;
: Always allow 90 degree turns&lt;br /&gt;
; DISALLOW_90DEG {{ottd|1.10}}&lt;br /&gt;
: Always prohibit 90 degree turns (takes precedence over ALLOW_90DEG)&lt;br /&gt;
|-&lt;br /&gt;
| curve_speed_multiplier&lt;br /&gt;
| 0...255&lt;br /&gt;
| max curve speed is defined as multiple of the base curve speed (see below)&lt;br /&gt;
|-&lt;br /&gt;
| station_graphics&lt;br /&gt;
| RAILTYPE_STATION_NORMAL, RAILTYPE_STATION_MONORAIL, RAILTYPE_STATION_MAGLEV&lt;br /&gt;
| Type of station graphics to use for the default stations&lt;br /&gt;
|-&lt;br /&gt;
| construction_cost&lt;br /&gt;
| 0 ... 65525&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r19307}} per piece of track as multiplier to PR_BUILD_RAIL base cost. Default cost factors are 8, 12, 16 and 24 for RAIL, ELRL, MONO and MGLV.&lt;br /&gt;
|-&lt;br /&gt;
| speed_limit&lt;br /&gt;
| 0 ... 65525 km/h (speed units)&lt;br /&gt;
| A speed limit of 0 means unlimited speed&lt;br /&gt;
|-&lt;br /&gt;
| acceleration_model&lt;br /&gt;
| ACC_MODEL_RAIL, ACC_MODEL_MONORAIL, ACC_MODEL_MAGLEV&lt;br /&gt;
| ACC_MODEL_RAIL and ACC_MODEL_MONORAIL behave the same currently&lt;br /&gt;
|-&lt;br /&gt;
| map_colour&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r19307}} entry in the colour palette.&lt;br /&gt;
|-&lt;br /&gt;
| requires_railtype_list&lt;br /&gt;
| list of railtype labels&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r21842}} List of rail types on that need to be available to the company of the player for this rail type to be introduced at (or after) the introduction date. This limit does not apply when the rail type is introduced by the introduction of a vehicle.&lt;br /&gt;
|-&lt;br /&gt;
| introduces_railtype_list&lt;br /&gt;
| list of railtype labels&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r21841}} List of rail types that get introduced when this rail type is introduced. For example, to make sure that when a fast rail type is introduced the slow variant exists.&lt;br /&gt;
|-&lt;br /&gt;
| sort_order&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r21866}} number which defines the sort order among rail types. If this entry is not defined, it gets assigned sort order n*10+7 for the n-th railtype.&lt;br /&gt;
|-&lt;br /&gt;
| maintenance_cost&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.2|r23415}} Maintenance cost factor for each piece of tracks of this railtype. Default cost factors are 8, 12, 16 and 24 for RAIL, ELRL, MONO and MGLV.&lt;br /&gt;
|-&lt;br /&gt;
| alternative_railtype_list&lt;br /&gt;
| list of railtype labels&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.2|r23758}} List of rail types which this rail type will act as fallback for, if the corresponding rail type is not defined separately&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Sort order===&lt;br /&gt;
&lt;br /&gt;
The sort_order influences the sort order of the drop down lists with rail types. Default values are as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! Value&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 07&lt;br /&gt;
| normal rail&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| electrified rail&lt;br /&gt;
|-&lt;br /&gt;
| 27&lt;br /&gt;
| monorail&lt;br /&gt;
|-&lt;br /&gt;
| 37&lt;br /&gt;
| maglev&lt;br /&gt;
|-&lt;br /&gt;
| n7&lt;br /&gt;
| railtype #n&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus the rail type that (internally) gets index 8 will get a default value of 87. These defaults are to keep the ordering when this property is not supported as they were.&lt;br /&gt;
&lt;br /&gt;
===Base speeds for curves===&lt;br /&gt;
&lt;br /&gt;
The base speeds relevant for the curve_speed_multiplier are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! curve length&lt;br /&gt;
! base speed [km/h]&lt;br /&gt;
|-&lt;br /&gt;
| 0 (90 degree turn)&lt;br /&gt;
| 30&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 44&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 55&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 66&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 75&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 84&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| 91&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 98&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 103&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| 108&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| 111&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| 114&lt;br /&gt;
|-&lt;br /&gt;
| 12+&lt;br /&gt;
| 115&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Railtype variables==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| terrain_type&lt;br /&gt;
| TILETYPE_NORMAL, TILETYPE_DESERT, TILETYPE_RAIN_FOREST, TILETYPE_SNOW&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| enhanced_tunnels&lt;br /&gt;
| 0&lt;br /&gt;
| Reserved for future use, always returns 0 in OpenTTD. Should custom tunnel entrances be implemented, other values than 0 might be returned&lt;br /&gt;
|-&lt;br /&gt;
| level_crossing_status&lt;br /&gt;
| LEVEL_CROSSING_CLOSED, LEVEL_CROSSING_OPEN&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| build_date&lt;br /&gt;
| 0 .. 5000000&lt;br /&gt;
| for depots only: build date of the depot in days since 0&lt;br /&gt;
|-&lt;br /&gt;
| town_zone&lt;br /&gt;
| [[NML:List of town zones|town zone]]&lt;br /&gt;
| Town zone of the tile. (Only available for level crossings and depots.)&lt;br /&gt;
|-&lt;br /&gt;
| random_bits&lt;br /&gt;
|&lt;br /&gt;
| 2 pseudo-random bits, based on tile location&lt;br /&gt;
|-&lt;br /&gt;
| railtype&lt;br /&gt;
| Entry from railtype translation table or RAILTYPE_OTHER_GRF or RAILTYPE_NO_ROAD&lt;br /&gt;
| railtype present on the tile&lt;br /&gt;
|-&lt;br /&gt;
| roadtype&lt;br /&gt;
| Entry from roadtype translation table or ROADTYPE_OTHER_GRF or ROADTYPE_NO_ROAD&lt;br /&gt;
| roadtype present on the tile&lt;br /&gt;
|-&lt;br /&gt;
| tramtype&lt;br /&gt;
| Entry from tramtype translation table or TRAMTYPE_OTHER_GRF or TRAMTYPE_NO_ROAD&lt;br /&gt;
| tramtype present on the tile&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Railtype callbacks==&lt;br /&gt;
&lt;br /&gt;
For rail types a number of callbacks are used to define rail type graphics. Each should refer to a sprite set containing the relevant sprites. Refer to the [[#Example sprites|example sprites]] or the example railtype grf in the NML repository, for an example on what sprites are needed in what order.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! callbacks&lt;br /&gt;
! number of sprites&lt;br /&gt;
! meaning&lt;br /&gt;
|-&lt;br /&gt;
| gui&lt;br /&gt;
| 16&lt;br /&gt;
| 4 rail directions, autorail, depot, tunnel and convert rail sprites for rail menu.&lt;br /&gt;
|-&lt;br /&gt;
| track_overlay&amp;lt;ref name=leftout&amp;gt;Either all or none of these sprites should be provided.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 10&lt;br /&gt;
| 6 flat and 4 slope sprites. Track without landscape. Used in junctions, and also with path signals, if the &amp;quot;Show reserved tracks&amp;quot; option is enabled in the game settings.&lt;br /&gt;
|-&lt;br /&gt;
| underlay&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 16&lt;br /&gt;
| 6 flat and 4 slope, one crossing WITH track, 5 junction pieces without track. Tracks with ballast but without landscape.&lt;br /&gt;
|-&lt;br /&gt;
| tunnels&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 4&lt;br /&gt;
| 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. Sprite order: SW, NW, NE, SE.&lt;br /&gt;
|-&lt;br /&gt;
| catenary_wire&lt;br /&gt;
| 28&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| catenary_pylons&lt;br /&gt;
| 8&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| bridge_surfaces&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| level_crossings&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 10&lt;br /&gt;
| For each direction: one track sprite and 4 sprites for road lights etc&lt;br /&gt;
|-&lt;br /&gt;
| depots&amp;lt;ref name=depotr22854&amp;gt;{{ottd|1.2|r22854}} In OpenTTD prior to r22854, depot sprites would not be used if the above &#039;all or none&#039; sprites were not supplied.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 6&lt;br /&gt;
| 2 sprites for each south-ish, 1 sprite for each north-ish depot. Like original depots.&lt;br /&gt;
|-&lt;br /&gt;
| fences&lt;br /&gt;
| 8 / 16&lt;br /&gt;
| x, y, vertical, horizontal, SW, SE, NE and NW slopes like original fences at sprite 1301. {{ottdp|1.6|no|ottdrev=r27343}} Since OpenTTD r27343 there is also a 16 sprites version, see below.&lt;br /&gt;
|-&lt;br /&gt;
| tunnel_overlay&amp;lt;ref name=tunnel_overlay&amp;gt;Above &#039;all or none&#039; sprites must be supplied, if these sprites are to be used.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 4&lt;br /&gt;
| If this callback is defined, tunnels for this railtype will be drawn differently. First, a grass underlay base sprite is drawn, then the &#039;tunnels&#039;-sprite. Next, train sprites if applicable and then a grass overlay and finally the sprite from this type (tunnel_overlay). The grass sprites are defined in the base set and do not contain any parts of the tracks or portal, so these have to be fully provided by the railtype sprites.&lt;br /&gt;
* &amp;lt;code style:darkgreen&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;: 0 for normal tunnels, without any extra features (like tracks above). All other values are reserved for future extensions.&lt;br /&gt;
|-&lt;br /&gt;
| signals&lt;br /&gt;
| 8&lt;br /&gt;
| {{ottd|1.3|r24367}} 1 sprite for each direction, order is SW(-facing), NE, NW, SE, E, W, S, N. For more information, see [[#signals|below]]&lt;br /&gt;
|-&lt;br /&gt;
| precombined&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 63&lt;br /&gt;
| {{ottd|1.10}} 1 sprite for each combination of track on a tile. The index is determined by treating each track piece as a bit in the order X Y N S W E, subtracting 1, see [[#Precombined overlay sprites|below]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
If a callback is not implemented or fails, graphics from the fallback railtype (picked via the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;station_graphics&amp;lt;/code&amp;gt; property) will be used instead.&amp;lt;br /&amp;gt;&lt;br /&gt;
Note that there is no &amp;quot;default graphics&amp;quot;-callback.&lt;br /&gt;
&lt;br /&gt;
===Example sprites===&lt;br /&gt;
==== gui ====&lt;br /&gt;
&lt;br /&gt;
[[File:railtype_gui.png]]&lt;br /&gt;
&lt;br /&gt;
==== track_overlay ====&lt;br /&gt;
&lt;br /&gt;
[[File:railtype_overlay.png]]&lt;br /&gt;
&lt;br /&gt;
==== underlay ====&lt;br /&gt;
&lt;br /&gt;
[[File:railtype_underlay.png]]&lt;br /&gt;
&lt;br /&gt;
==== level_crossings ====&lt;br /&gt;
&lt;br /&gt;
You can define a special track piece which crosses the road and for each of two directions and each of the corners of the tile a separate sprite for a light, sign, or whatever should go there.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Sprite number for X&lt;br /&gt;
!Sprite number for Y&lt;br /&gt;
!Useage&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;1&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Rail overlay&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;3&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;North light&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;5&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;East light&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;7&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;West light&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;9&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;South light&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[File:railtype_levelcrossing.png]]&lt;br /&gt;
&lt;br /&gt;
==== depots ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
!Sprite Number&lt;br /&gt;
!Usage&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;NE wall for SE-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for SE-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;NW wall for SW-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for SW-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for NE-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for NW-entry depot.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fences ====&lt;br /&gt;
&lt;br /&gt;
[[File:railtype_fences.png]]&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.6|no|ottdrev=r27343}} Since OpenTTD r27343 there is also a 16 sprites version, this allows to use different sprites resp. offsets for the fences on either track side.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
! Sprite number !! Tile slope !! Track bit !! Fence position !! Version&lt;br /&gt;
|-&lt;br /&gt;
| 0 || flat || X || NW || {{ottdp|1.0|no|ottdrev=r19056}}&lt;br /&gt;
|-&lt;br /&gt;
| 1 || flat || Y || NE || {{ottdp|1.0|no|ottdrev=r19056}}&lt;br /&gt;
|-&lt;br /&gt;
| 2 || flat || left || E || {{ottdp|1.0|no|ottdrev=r19056}}&lt;br /&gt;
|-&lt;br /&gt;
| 3 || flat || upper || S || {{ottdp|1.0|no|ottdrev=r19056}}&lt;br /&gt;
|-&lt;br /&gt;
| 4 || SW || X || NW || {{ottdp|1.0|no|ottdrev=r19056}}&lt;br /&gt;
|-&lt;br /&gt;
| 5 || SE || Y || NE || {{ottdp|1.0|no|ottdrev=r19056}}&lt;br /&gt;
|-&lt;br /&gt;
| 6 || NE || X || NW || {{ottdp|1.0|no|ottdrev=r19056}}&lt;br /&gt;
|-&lt;br /&gt;
| 7 || NW || Y || NE || {{ottdp|1.0|no|ottdrev=r19056}}&lt;br /&gt;
|-&lt;br /&gt;
| 8 || flat || X || SE || {{ottdp|1.6|no|ottdrev=r27343}}&lt;br /&gt;
|-&lt;br /&gt;
| 9 || flat || Y || SW || {{ottdp|1.6|no|ottdrev=r27343}}&lt;br /&gt;
|-&lt;br /&gt;
| 10 || flat || left || W || {{ottdp|1.6|no|ottdrev=r27343}}&lt;br /&gt;
|-&lt;br /&gt;
| 11 || flat || upper || N || {{ottdp|1.6|no|ottdrev=r27343}}&lt;br /&gt;
|-&lt;br /&gt;
| 12 || SW || X || SE || {{ottdp|1.6|no|ottdrev=r27343}}&lt;br /&gt;
|-&lt;br /&gt;
| 13 || SE || Y || SW || {{ottdp|1.6|no|ottdrev=r27343}}&lt;br /&gt;
|-&lt;br /&gt;
| 14 || NE || X || SE || {{ottdp|1.6|no|ottdrev=r27343}}&lt;br /&gt;
|-&lt;br /&gt;
| 15 || NW || Y || SW || {{ottdp|1.6|no|ottdrev=r27343}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== tunnel_overlay ====&lt;br /&gt;
&lt;br /&gt;
If this callback is defined, tunnels for this railtype will be drawn differently.&lt;br /&gt;
&lt;br /&gt;
First, a grass underlay base sprite is drawn, then the &#039;tunnels&#039;-sprite. Next, train sprites if applicable and then a grass overlay and finally the sprite from this callback. The grass sprites are defined in the base set and do not contain any parts of the tracks or portal, so these have to be fully provided by the railtype sprites.&lt;br /&gt;
&lt;br /&gt;
Illustration: [[File:RailtypeTunnelExample.png]]&lt;br /&gt;
&lt;br /&gt;
==== signals ====&lt;br /&gt;
&lt;br /&gt;
This callback can be used to supply custom signal graphics.&lt;br /&gt;
&lt;br /&gt;
The resulting sprite set must consist of 8 sprites, corresponding to the following signal directions: SW-facing, NE-facing, NW-facing, SE-facing, E-facing, W-facing, S-facing, N-facing. If resolving fails or results in an empty sprite group, the matching base set sprite will be used instead.&lt;br /&gt;
&lt;br /&gt;
Variable &amp;lt;code style:darkgreen&amp;gt;extra_callback_info2&amp;lt;/code&amp;gt; contains the state, variant and type of the signal. Use the builtin function &amp;lt;code style:darkgreen&amp;gt;getbits()&amp;lt;/code&amp;gt; in the following fashion to access the information:&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
Signal state: &amp;lt;code style:darkgreen&amp;gt;getbits(extra_callback_info2, 0, 8)&amp;lt;/code&amp;gt;:&lt;br /&gt;
{| |-&lt;br /&gt;
! Result !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 00 || Red signal&lt;br /&gt;
|-&lt;br /&gt;
| 01 || Green signal&lt;br /&gt;
|-&lt;br /&gt;
| all other values || Reserved&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
Signal variant: &amp;lt;code style:darkgreen&amp;gt;getbits(extra_callback_info2, 8, 8)&amp;lt;/code&amp;gt;:&lt;br /&gt;
{| |-&lt;br /&gt;
! Result !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 00 || Light (electric) signal&lt;br /&gt;
|-&lt;br /&gt;
| 01 || Semaphore&lt;br /&gt;
|-&lt;br /&gt;
| all other values || Reserved&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
Signal type: &amp;lt;code style:darkgreen&amp;gt;getbits(extra_callback_info2, 16, 8)&amp;lt;/code&amp;gt;:&lt;br /&gt;
{| |-&lt;br /&gt;
! Result !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 00 || Normal block signal&lt;br /&gt;
|-&lt;br /&gt;
| 01 || Entry pre-signal&lt;br /&gt;
|-&lt;br /&gt;
| 02 || Exit pre-signal&lt;br /&gt;
|-&lt;br /&gt;
| 03 || Combo pre-signal&lt;br /&gt;
|-&lt;br /&gt;
| 04 || Two-way path signal&lt;br /&gt;
|-&lt;br /&gt;
| 05 || One-way path signal&lt;br /&gt;
|-&lt;br /&gt;
| all other values || Reserved&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
Variable &amp;lt;code style:darkgreen&amp;gt;extra_callback_info1&amp;lt;/code&amp;gt; contains the drawing context.&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style:darkgreen&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;:&lt;br /&gt;
{| |-&lt;br /&gt;
! Result !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Signal is drawn in a viewport, i.e. on the map.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Signal is drawn in the signal GUI. The returned sprite set must still have 8 sprites, but OpenTTD will only use the 7th sprite, so all other sprites can be empty.&lt;br /&gt;
|-&lt;br /&gt;
| all other values || Reserved&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Precombined overlay sprites====&lt;br /&gt;
&lt;br /&gt;
[[File:Rails_combined.png]]&lt;br /&gt;
&lt;br /&gt;
===Example code===&lt;br /&gt;
&lt;br /&gt;
A typical implementation for railtypes can look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
 item(FEAT_RAILTYPES, elrail, 0x01) {&lt;br /&gt;
     property {&lt;br /&gt;
         label:                      &amp;quot;SHIN&amp;quot;;&lt;br /&gt;
         name:                       string(STR_EL_RAIL);&lt;br /&gt;
         menu_text:                  string(STR_EL_RAIL);&lt;br /&gt;
         build_window_caption:       string(STR_BUILD_CAPTION);&lt;br /&gt;
         autoreplace_text:           string(STR_AUTOREPLACE);&lt;br /&gt;
         new_engine_text:            string(STR_NEW_ENGINE);&lt;br /&gt;
         compatile_railtype_list:    [&amp;quot;SHIN&amp;quot;,&amp;quot;RAIL&amp;quot;,&amp;quot;ELRL&amp;quot;];                   // Tracks of rail and electrified rail are compatible&lt;br /&gt;
         powered_railtype_list:      [&amp;quot;ELRL&amp;quot;,&amp;quot;SHIN&amp;quot;];                          // But we only have power when we have electricity&lt;br /&gt;
         railtype_flags:             bitmask(RAILTYPE_FLAG_NO_LEVEL_CROSSING); // High speed tracks should not have level crossings&lt;br /&gt;
         curve_speed_multiplier:     1;&lt;br /&gt;
         station_graphics:           RAILTYPE_STATION_MAGLEV;                  // We want the most modern stations&lt;br /&gt;
         construction_cost:          32;                                       // should be pretty steep&lt;br /&gt;
         speed_limit:                500 km/h;&lt;br /&gt;
         acceleration_model:         ACC_MODEL_RAIL;                           // This is still rail, though&lt;br /&gt;
     }&lt;br /&gt;
     graphics {&lt;br /&gt;
         track_overlay:   ground_switch_overlay;     // defines the sprites drawn as overlay for junctions and highlight&lt;br /&gt;
         underlay:        ground_switch_underlay;    // defines the usual tracks and the underlay for junctions&lt;br /&gt;
         level_crossings: level_crossing_switch;     // defines level crossings including traffic lights and blocking bars&lt;br /&gt;
         tunnels:         tunnel_switch;             // defines the tracks drawn on a tunnel tile&lt;br /&gt;
         depots:          depot_switch_electric;     // defines the depot sprites&lt;br /&gt;
         bridge_surfaces: bridge_terrain_switch;     // defines the overlay drawn over bridges&lt;br /&gt;
         fences:          fences_set;                // defines the look of fences&lt;br /&gt;
         // we don&#039;t define catenary wire and pylons, thus we use the default which comes with the base graphics.&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The switches and graphics blocks are defined in the usual way as described in sections [[NML:Switch|switches]], [[NML:Random switch|random switches]] and [[NML:Graphics|graphics block]] sections.&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Builtin_functions&amp;diff=5139</id>
		<title>NML:Builtin functions</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Builtin_functions&amp;diff=5139"/>
		<updated>2026-01-03T17:38:31Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: Undo revision 5136 by Andythenorth (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavExpressions}}&lt;br /&gt;
&lt;br /&gt;
Available builtin functions are&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| min(&#039;&#039;v1&#039;&#039;, &#039;&#039;v2&#039;&#039;)&lt;br /&gt;
| Return the smallest value&lt;br /&gt;
|-&lt;br /&gt;
| max(&#039;&#039;v1&#039;&#039;, &#039;&#039;v2&#039;&#039;)&lt;br /&gt;
| Return the biggest value&lt;br /&gt;
|-&lt;br /&gt;
| date(&#039;&#039;year&#039;&#039;, &#039;&#039;month&#039;&#039;, &#039;&#039;day&#039;&#039;)&lt;br /&gt;
| If all values are constants, returns the number of days since year 0. If the year is a variable, the month and day should be 1.&lt;br /&gt;
|-&lt;br /&gt;
| day_of_year(&#039;&#039;month&#039;&#039;, &#039;&#039;day&#039;&#039;)&lt;br /&gt;
| Return the day of the year since January 1st. Both values must be compile-time constants.&lt;br /&gt;
|-&lt;br /&gt;
| bitmask(&#039;&#039;bitpos1&#039;&#039;, ...)&lt;br /&gt;
| Compose an integer by switching the bits at the given positions on (indexed starting at 1).&lt;br /&gt;
|-&lt;br /&gt;
| STORE_TEMP(&#039;&#039;value&#039;&#039;, &#039;&#039;address&#039;&#039;)&lt;br /&gt;
| Store value in temporary storage. Temporary storage holds data until the final &amp;quot;return&amp;quot; of the current switch-chain of the current callback. Addresses 0..127 are available for the GRF to use. Addresses 0x100 and above have special purposes, which are described where they are used.&lt;br /&gt;
|-&lt;br /&gt;
| STORE_PERM(&#039;&#039;value&#039;&#039;, &#039;&#039;address&#039;&#039;)&lt;br /&gt;
| Store value in permanent storage (industries, airports, towns only). Addresses {{ottd|&amp;amp;lt;1.9}} 0..15, {{ottd|1.9}} 0..255 are available for the GRF to use. Note that accessing permanent town registers thrashes the contents of temporary register 0x100.&lt;br /&gt;
|-&lt;br /&gt;
| LOAD_TEMP(&#039;&#039;address&#039;&#039;)&lt;br /&gt;
| Get value from temporary storage. Addresses 0..127 are available for the GRF to use.&lt;br /&gt;
|-&lt;br /&gt;
| LOAD_PERM(&#039;&#039;address [, grfid]&#039;&#039;)&lt;br /&gt;
| Get value from permanent storage (industries, airports, towns only). For towns only, specifying a grfid (4-byte string, optional) allows reading the storage of other grfs. Note that accessing permanent town registers thrashes the contents of temporary register 0x100.&lt;br /&gt;
|-&lt;br /&gt;
| hasbit(&#039;&#039;value&#039;&#039;, &#039;&#039;bit_num&#039;&#039;)&lt;br /&gt;
| Test whether a bit in a value is on&lt;br /&gt;
|-&lt;br /&gt;
| getbits(&#039;&#039;value&#039;&#039;, &#039;&#039;first&#039;&#039;, &#039;&#039;amount&#039;&#039;)&lt;br /&gt;
| {{nml|0.4.1}} Extract some bits from a value. Result is (value &amp;gt;&amp;gt; first) &amp;amp; (1 &amp;lt;&amp;lt; amount - 1)&lt;br /&gt;
|-&lt;br /&gt;
| {{ottd|&amp;amp;le;1.11}} version_openttd(&#039;&#039;major&#039;&#039;, &#039;&#039;minor&#039;&#039;, &#039;&#039;revision&#039;&#039;[, &#039;&#039;build&#039;&#039;]) &amp;lt;br&amp;gt; {{ottd|&amp;amp;ge;12}} version_openttd(&#039;&#039;major&#039;&#039;, &#039;&#039;minor&#039;&#039;)&lt;br /&gt;
| Return the constant representing an OpenTTD version, for example&lt;br /&gt;
* OpenTTD 1.4.0: &amp;quot;version_openttd(1, 4, 0)&amp;quot;&lt;br /&gt;
* OpenTTD 13.0: &amp;quot;version_openttd(13, 0)&amp;quot;&lt;br /&gt;
{{ottd|&amp;amp;le;1.8}} Old versions before OpenTTD 1.9 also could check for specific SVN revisions. This is no longer available.&lt;br /&gt;
|-&lt;br /&gt;
| cargotype_available(&#039;&#039;cargotype&#039;&#039;)&lt;br /&gt;
| Check if a certain cargo type is available in this game. &#039;&#039;cargotype&#039;&#039; must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| railtype_available(&#039;&#039;railtype&#039;&#039;)&lt;br /&gt;
| Check if a railtype is available in this game. &#039;&#039;railtype&#039;&#039; must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| roadtype_available(&#039;&#039;roadtype&#039;&#039;)&lt;br /&gt;
| Check if a roadtype is available in this game. &#039;&#039;roadtype&#039;&#039; must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| tramtype_available(&#039;&#039;tramtype_available&#039;&#039;)&lt;br /&gt;
| Check if a tramtype_available is available in this game. &#039;&#039;tramtype_available&#039;&#039; must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| grf_current_status(&#039;&#039;grfid[, mask]&#039;&#039;)&lt;br /&gt;
| 1 if the given GRF is currently active 0, otherwise. If &#039;&#039;mask&#039;&#039; is set, only the bits set in the mask will be tested. Both parameters must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| grf_future_status(&#039;&#039;grfid[, mask]&#039;&#039;)&lt;br /&gt;
| Same as above, but tests whether the grf will become active instead of whether it&#039;s currently active.&lt;br /&gt;
|-&lt;br /&gt;
| grf_order_behind(&#039;&#039;grfid[, mask]&#039;&#039;)&lt;br /&gt;
| Same as above, but tests whether current grf will become active in the order behind the referenced grf.&lt;br /&gt;
|-&lt;br /&gt;
| create_effect(&#039;&#039;effect_sprite&#039;&#039;, &#039;&#039;l_x_offset&#039;&#039;, &#039;&#039;t_y_offset&#039;&#039;, &#039;&#039;z_offset&#039;&#039;)&lt;br /&gt;
| Helper function for the vehicle callback &#039;create_effect&#039;.&lt;br /&gt;
* &#039;&#039;effect_sprite&#039;&#039;: Sprite for the effect. One of EFFECT_SPRITE_[NONE|STEAM|DIESEL|ELECTRIC|AIRCRAFT_BREAKDOWN_SMOKE].&lt;br /&gt;
* &#039;&#039;l_x_offset&#039;&#039;: Longitudinal or X position of the effect, depending on callback result CB_RESULT_CREATE_EFFECT_NO_ROTATION.&lt;br /&gt;
* &#039;&#039;t_y_offset&#039;&#039;: Transversal or Y position of the effect, depending on callback result CB_RESULT_CREATE_EFFECT_NO_ROTATION.&lt;br /&gt;
* &#039;&#039;z_offset&#039;&#039;: Z position of the effect.&lt;br /&gt;
|-&lt;br /&gt;
| visual_effect_and_powered(&#039;&#039;effect&#039;&#039;, &#039;&#039;offset&#039;&#039;, &#039;&#039;powered&#039;&#039;)&lt;br /&gt;
| Helper function for the train property and callback visual_effect_and_powered.&lt;br /&gt;
|-&lt;br /&gt;
| visual_effect(&#039;&#039;effect&#039;&#039;, &#039;&#039;offset&#039;&#039;)&lt;br /&gt;
| Helper function for the road vehicle and ship property and callback visual_effect.&lt;br /&gt;
|-&lt;br /&gt;
| str2number(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Interpret the given string as a dword and return the value as integer.&lt;br /&gt;
|-&lt;br /&gt;
| cargotype(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Return the index of the given cargo type in the cargo translation table.&lt;br /&gt;
|-&lt;br /&gt;
| railtype(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Return the index of the given railtype in the railtype translation table.&lt;br /&gt;
|-&lt;br /&gt;
| roadtype(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Return the index of the given roadtype in the roadtype translation table.&lt;br /&gt;
|-&lt;br /&gt;
| tramtype(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Return the index of the given tramtype in the tramtype translation table.&lt;br /&gt;
|-&lt;br /&gt;
| reserve_sprites(&#039;&#039;number of sprites&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Reserve a number of sprites in the TTD sprite range. This is needed if you want to use your own recolour sprites. Example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
 param[10] = reserve_sprites(1);&lt;br /&gt;
 replace(param[10]) {&lt;br /&gt;
 	recolour_sprite {&lt;br /&gt;
 		// your colour remap.&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
 spritelayout xyz {&lt;br /&gt;
 	building {&lt;br /&gt;
 		...&lt;br /&gt;
 		recolour: param[10];&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| int(&#039;&#039;v1&#039;&#039;)&lt;br /&gt;
| Converts v1 to an int. This is done by cutting off everything after the decimal point, i.e. rounding toward zero.&lt;br /&gt;
|-&lt;br /&gt;
| round(&#039;&#039;v1&#039;&#039;)&lt;br /&gt;
| {{nml|0.5.4}} Converts v1 to an int. This is done by rounding towards the closest integer.&lt;br /&gt;
|-&lt;br /&gt;
| abs(&#039;&#039;v1&#039;&#039;)&lt;br /&gt;
| Return the absolute value of v1.&lt;br /&gt;
|-&lt;br /&gt;
| acos / asin / atan / cos / sin / tan&lt;br /&gt;
| Standard trigonometric functions.&lt;br /&gt;
|-&lt;br /&gt;
| sqrt&lt;br /&gt;
| {{nml|0.5.4}} Square root.&lt;br /&gt;
|-&lt;br /&gt;
| CMP(&#039;&#039;param1, param2&#039;&#039;)&lt;br /&gt;
| Compares param1 and param2 (considering them as signed values). Returns CMP_LESS if param1 is less than param2, CMP_EQUAL if they are equal and CMP_GREATER if param1 is greater than param2.&lt;br /&gt;
|-&lt;br /&gt;
| UCMP(&#039;&#039;param1, param2&#039;&#039;)&lt;br /&gt;
| Compares param1 and param2 (considering them as unsigned values). Returns CMP_LESS if param1 is less than param2, CMP_EQUAL if they are equal and CMP_GREATER if param1 is greater than param2.&lt;br /&gt;
|-&lt;br /&gt;
| rotate(&#039;&#039;value, amount&#039;&#039;)&lt;br /&gt;
| Rotates &#039;&#039;value&#039;&#039; to the right &#039;&#039;amount&#039;&#039; steps. This is always a 32 bits rotation.&lt;br /&gt;
|-&lt;br /&gt;
| sound(&#039;&#039;soundfile[, volume]&#039;&#039;)&lt;br /&gt;
| Import sound from .wav-file &#039;&#039;soundfile&#039;&#039; into the grf file and return its numeric ID. Including a file multiple times will not cause it to be duplicated. Loaded sound files must be in WAV format, PCM encoding:&lt;br /&gt;
* mono&lt;br /&gt;
* 8-bit or {{ottdp|1.0|no}} 16-bit&lt;br /&gt;
* 11025 Hz, 22050 Hz or 44100 Hz.&lt;br /&gt;
&#039;&#039;volume&#039;&#039; is in the [0, 100] range, the default value (if not set) is 100.&lt;br /&gt;
|-&lt;br /&gt;
| import_sound(&#039;&#039;grfid, id[, volume]&#039;&#039;)&lt;br /&gt;
| Import sound from a different grf file. &#039;&#039;grfid&#039;&#039; refers to the grf-file to import the sound from. &#039;&#039;id&#039;&#039; is the zero-based internal ID of the sound within the other grf-file. &#039;&#039;volume&#039;&#039; is in the [0, 100] range, the default value (if not set) is 100.&lt;br /&gt;
|-&lt;br /&gt;
| relative_coord(&#039;&#039;x, y&#039;&#039;)&lt;br /&gt;
| Returns the coordinates in &#039;&#039;0xYYXX&#039;&#039; format. x and y must be in the [0, 255] range.&lt;br /&gt;
|-&lt;br /&gt;
| num_corners_raised(&#039;&#039;slope&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Returns the number of corners raised in a slope. Return value is 0 .. 3 for normal slopes and 4 for steep ones. See also [[NML:List of tile slopes|here]] for more information about slopes. Using this on values that are not slopes results in undefined behaviour.&lt;br /&gt;
|-&lt;br /&gt;
| slope_to_sprite_offset(&#039;&#039;slope&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Returns the sprite offset corresponding to a given slope. Return value is in range 0 .. 18. See also [[NML:List of tile slopes|here]] for more information about slopes. The section on [[NML:Spritelayout|spritelayouts]] contains some more information one possible uses, as well as an example. Using this on values that are not slopes results in undefined behaviour.&lt;br /&gt;
|-&lt;br /&gt;
| palette_1cc(&#039;&#039;colour&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Returns the 1cc palette for the given company colour, see [[NML:List_of_default_colour_translation_palettes#Company colour helper functions|here]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
| palette_2cc(&#039;&#039;colour1&#039;&#039;, &#039;&#039;colour2&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Returns the 2cc palette for the given first and second company colour, see [[NML:List_of_default_colour_translation_palettes#Company colour helper functions|here]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_curv_info(&#039;&#039;prev_cur&#039;&#039;, &#039;&#039;cur_next&#039;&#039;)&lt;br /&gt;
| Returns the curvature state of a vehicle, given the direction differences between the (previous-current) and (current-next) vehicle pairs. For use with the vehicle variable &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;curv_info&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| format_string(&#039;&#039;format&#039;&#039;, args)&lt;br /&gt;
| Use the python string formatting functions to create a literal string. Keep in mind that the output is a literal string which cannot be used by string(). This function can however be used to create filenames.&lt;br /&gt;
|-&lt;br /&gt;
| industry_type(&#039;&#039;ind_type&#039;&#039;, &#039;&#039;ID&#039;&#039;) &lt;br /&gt;
| Defines either an old industry (using the global ID) or a new industry from your grf (using the grf-local ID). Used only by &#039;&#039;conflicting_ind_types&#039;&#039; on [[NML:Industries]].&lt;br /&gt;
&#039;&#039;ind_type&#039;&#039; must be either &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;IND_TYPE_OLD&amp;lt;/code&amp;gt; or &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;IND_TYPE_NEW&amp;lt;/code&amp;gt;. &#039;&#039;ID&#039;&#039; must be in the [0, 127] range.&lt;br /&gt;
|-&lt;br /&gt;
| accept_cargo(&#039;&#039;cargotype&#039;&#039;, produce_cargo(&#039;&#039;cargotype&#039;&#039;, &#039;&#039;factor&#039;&#039;)...)&amp;lt;br&amp;gt;produce_cargo(&#039;&#039;cargotype&#039;&#039;, &#039;&#039;amount&#039;&#039;)&lt;br /&gt;
| Helper functions used to set industry production in the [[NML:Industries#Cargo_types_array|&#039;&#039;cargo_types&#039;&#039; property]].&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Builtin_functions&amp;diff=5138</id>
		<title>NML:Builtin functions</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Builtin_functions&amp;diff=5138"/>
		<updated>2026-01-03T17:38:06Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: Undo revision 5137 by Andythenorth (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavExpressions}}&lt;br /&gt;
&lt;br /&gt;
Available builtin functions are&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| min(&#039;&#039;v1&#039;&#039;, &#039;&#039;v2&#039;&#039;)&lt;br /&gt;
| Return the smallest value&lt;br /&gt;
|-&lt;br /&gt;
| max(&#039;&#039;v1&#039;&#039;, &#039;&#039;v2&#039;&#039;)&lt;br /&gt;
| Return the biggest value&lt;br /&gt;
|-&lt;br /&gt;
| date(&#039;&#039;year&#039;&#039;, &#039;&#039;month&#039;&#039;, &#039;&#039;day&#039;&#039;)&lt;br /&gt;
| If all values are constants, returns the number of days since year 0. If the year is a variable, the month and day should be 1.&lt;br /&gt;
|-&lt;br /&gt;
| day_of_year(&#039;&#039;month&#039;&#039;, &#039;&#039;day&#039;&#039;)&lt;br /&gt;
| Return the day of the year since January 1st. Both values must be compile-time constants.&lt;br /&gt;
|-&lt;br /&gt;
| bitmask(&#039;&#039;bitpos1&#039;&#039;, ...)&lt;br /&gt;
| Compose an integer by switching the bits at the given positions on (indexed starting at 1).&lt;br /&gt;
|-&lt;br /&gt;
| STORE_TEMP(&#039;&#039;value&#039;&#039;, &#039;&#039;address&#039;&#039;)&lt;br /&gt;
| Store value in temporary storage. Temporary storage holds data until the final &amp;quot;return&amp;quot; of the current switch-chain of the current callback. Addresses 0..127 are available for the GRF to use. Addresses 0x100 and above have special purposes, which are described where they are used.&lt;br /&gt;
|-&lt;br /&gt;
| STORE_PERM(&#039;&#039;value&#039;&#039;, &#039;&#039;address&#039;&#039;)&lt;br /&gt;
| Store value in permanent storage (industries, airports, towns only). Addresses {{ottd|&amp;amp;lt;1.9}} 0..15, {{ottd|1.9}} 0..255 are available for the GRF to use. Note that accessing permanent town registers thrashes the contents of temporary register 0x100.&lt;br /&gt;
|-&lt;br /&gt;
| LOAD_TEMP(&#039;&#039;address&#039;&#039;)&lt;br /&gt;
| Get value from temporary storage. Addresses 0..127 are available for the GRF to use.&lt;br /&gt;
|-&lt;br /&gt;
| LOAD_PERM(&#039;&#039;address [, grfid]&#039;&#039;)&lt;br /&gt;
| Get value from permanent storage (industries, airports, towns only). For towns only, specifying a grfid (4-byte string, optional) allows reading the storage of other grfs. Note that accessing permanent town registers thrashes the contents of temporary register 0x100.&lt;br /&gt;
|-&lt;br /&gt;
| hasbit(&#039;&#039;value&#039;&#039;, &#039;&#039;bit_num&#039;&#039;)&lt;br /&gt;
| Test whether a bit in a value is on&lt;br /&gt;
|-&lt;br /&gt;
| getbits(&#039;&#039;value&#039;&#039;, &#039;&#039;first&#039;&#039;, &#039;&#039;amount&#039;&#039;)&lt;br /&gt;
| {{nml|0.4.1}} Extract some bits from a value. Result is (value &amp;gt;&amp;gt; first) &amp;amp; (1 &amp;lt;&amp;lt; amount - 1)&lt;br /&gt;
|-&lt;br /&gt;
| {{ottd|&amp;amp;le;1.11}} version_openttd(&#039;&#039;major&#039;&#039;, &#039;&#039;minor&#039;&#039;, &#039;&#039;revision&#039;&#039;[, &#039;&#039;build&#039;&#039;]) &amp;lt;br&amp;gt; {{ottd|&amp;amp;ge;12}} version_openttd(&#039;&#039;major&#039;&#039;, &#039;&#039;minor&#039;&#039;)&lt;br /&gt;
| Return the constant representing an OpenTTD version, for example&lt;br /&gt;
* OpenTTD 1.4.0: &amp;quot;version_openttd(1, 4, 0)&amp;quot;&lt;br /&gt;
* OpenTTD 13.0: &amp;quot;version_openttd(13, 0)&amp;quot;&lt;br /&gt;
{{ottd|&amp;amp;le;1.8}} Old versions before OpenTTD 1.9 also could check for specific SVN revisions. This is no longer available.&lt;br /&gt;
|-&lt;br /&gt;
| cargotype_available(&#039;&#039;cargotype&#039;&#039;)&lt;br /&gt;
| Check if a certain cargo type is available in this game. &#039;&#039;cargotype&#039;&#039; must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| railtype_available(&#039;&#039;railtype&#039;&#039;)&lt;br /&gt;
| Check if a railtype is available in this game. &#039;&#039;railtype&#039;&#039; must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| roadtype_available(&#039;&#039;roadtype&#039;&#039;)&lt;br /&gt;
| Check if a roadtype is available in this game. &#039;&#039;roadtype&#039;&#039; must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| tramtype_available(&#039;&#039;tramtype_available&#039;&#039;)&lt;br /&gt;
| Check if a tramtype_available is available in this game. &#039;&#039;tramtype_available&#039;&#039; must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| grf_current_status(&#039;&#039;grfid[, mask]&#039;&#039;)&lt;br /&gt;
| 1 if the given GRF is currently active 0, otherwise. If &#039;&#039;mask&#039;&#039; is set, only the bits set in the mask will be tested. Both parameters must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| grf_future_status(&#039;&#039;grfid[, mask]&#039;&#039;)&lt;br /&gt;
| Same as above, but tests whether the grf will become active instead of whether it&#039;s currently active.&lt;br /&gt;
|-&lt;br /&gt;
| grf_order_behind(&#039;&#039;grfid[, mask]&#039;&#039;)&lt;br /&gt;
| Same as above, but tests whether current grf will become active in the order behind the referenced grf.&lt;br /&gt;
|-&lt;br /&gt;
| create_effect(&#039;&#039;effect_sprite&#039;&#039;, &#039;&#039;l_x_offset&#039;&#039;, &#039;&#039;t_y_offset&#039;&#039;, &#039;&#039;z_offset&#039;&#039;)&lt;br /&gt;
| Helper function for the vehicle callback &#039;create_effect&#039;.&lt;br /&gt;
* &#039;&#039;effect_sprite&#039;&#039;: Sprite for the effect. One of EFFECT_SPRITE_[NONE|STEAM|DIESEL|ELECTRIC|AIRCRAFT_BREAKDOWN_SMOKE].&lt;br /&gt;
* &#039;&#039;l_x_offset&#039;&#039;: Longitudinal or X position of the effect, depending on callback result CB_RESULT_CREATE_EFFECT_NO_ROTATION.&lt;br /&gt;
* &#039;&#039;t_y_offset&#039;&#039;: Transversal or Y position of the effect, depending on callback result CB_RESULT_CREATE_EFFECT_NO_ROTATION.&lt;br /&gt;
* &#039;&#039;z_offset&#039;&#039;: Z position of the effect.&lt;br /&gt;
|-&lt;br /&gt;
| visual_effect_and_powered(&#039;&#039;effect&#039;&#039;, &#039;&#039;offset&#039;&#039;, &#039;&#039;powered&#039;&#039;)&lt;br /&gt;
| Helper function for the train property and callback visual_effect_and_powered.&lt;br /&gt;
|-&lt;br /&gt;
| visual_effect(&#039;&#039;effect&#039;&#039;, &#039;&#039;offset&#039;&#039;)&lt;br /&gt;
| Helper function for the road vehicle and ship property and callback visual_effect.&lt;br /&gt;
|-&lt;br /&gt;
| str2number(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Interpret the given string as a dword and return the value as integer.&lt;br /&gt;
|-&lt;br /&gt;
| cargotype(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Return the index of the given cargo type in the cargo translation table.&lt;br /&gt;
|-&lt;br /&gt;
| railtype(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Return the index of the given railtype in the railtype translation table.&lt;br /&gt;
|-&lt;br /&gt;
| roadtype(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Return the index of the given roadtype in the roadtype translation table.&lt;br /&gt;
|-&lt;br /&gt;
| tramtype(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Return the index of the given tramtype in the tramtype translation table.&lt;br /&gt;
|-&lt;br /&gt;
| reserve_sprites(&#039;&#039;number of sprites&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Reserve a number of sprites in the TTD sprite range. This is needed if you want to use your own recolour sprites. Example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
 param[10] = reserve_sprites(1);&lt;br /&gt;
 replace(param[10]) {&lt;br /&gt;
 	recolour_sprite {&lt;br /&gt;
 		// your colour remap.&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
 spritelayout xyz {&lt;br /&gt;
 	building {&lt;br /&gt;
 		...&lt;br /&gt;
 		recolour: param[10];&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| int(&#039;&#039;v1&#039;&#039;)&lt;br /&gt;
| Converts v1 to an int. This is done by cutting off everything after the decimal point, i.e. rounding toward zero.&lt;br /&gt;
|-&lt;br /&gt;
| round(&#039;&#039;v1&#039;&#039;)&lt;br /&gt;
| {{nml|0.5.4}} Converts v1 to an int. This is done by rounding towards the closest integer.&lt;br /&gt;
|-&lt;br /&gt;
| abs(&#039;&#039;v1&#039;&#039;)&lt;br /&gt;
| Return the absolute value of v1.&lt;br /&gt;
|-&lt;br /&gt;
| acos / asin / atan / cos / sin / tan&lt;br /&gt;
| Standard trigonometric functions.&lt;br /&gt;
|-&lt;br /&gt;
| sqrt&lt;br /&gt;
| {{nml|0.5.4}} Square root.&lt;br /&gt;
|-&lt;br /&gt;
| CMP(&#039;&#039;param1, param2&#039;&#039;)&lt;br /&gt;
| Compares param1 and param2 (considering them as signed values). Returns CMP_LESS if param1 is less than param2, CMP_EQUAL if they are equal and CMP_GREATER if param1 is greater than param2.&lt;br /&gt;
|-&lt;br /&gt;
| UCMP(&#039;&#039;param1, param2&#039;&#039;)&lt;br /&gt;
| Compares param1 and param2 (considering them as unsigned values). Returns CMP_LESS if param1 is less than param2, CMP_EQUAL if they are equal and CMP_GREATER if param1 is greater than param2.&lt;br /&gt;
|-&lt;br /&gt;
| rotate(&#039;&#039;value, amount&#039;&#039;)&lt;br /&gt;
| Rotates &#039;&#039;value&#039;&#039; to the right &#039;&#039;amount&#039;&#039; steps. This is always a 32 bits rotation.&lt;br /&gt;
|-&lt;br /&gt;
| sound(&#039;&#039;soundfile[, volume]&#039;&#039;)&lt;br /&gt;
| Import sound from .wav-file &#039;&#039;soundfile&#039;&#039; into the grf file and return its numeric ID. Including a file multiple times will not cause it to be duplicated. Loaded sound files can be in WAV format, PCM encoding:&lt;br /&gt;
* mono&lt;br /&gt;
* 8-bit or {{ottdp|1.0|no}} 16-bit&lt;br /&gt;
* 11025 Hz, 22050 Hz or 44100 Hz.&lt;br /&gt;
&#039;&#039;volume&#039;&#039; is in the [0, 100] range, the default value (if not set) is 100.&lt;br /&gt;
{{ottdp|15}} Since OpenTTD 15, compressed sound effects are supported in Ogg Opus format, with no restriction on quality, bit depth or sample rate.&lt;br /&gt;
|-&lt;br /&gt;
| import_sound(&#039;&#039;grfid, id[, volume]&#039;&#039;)&lt;br /&gt;
| Import sound from a different grf file. &#039;&#039;grfid&#039;&#039; refers to the grf-file to import the sound from. &#039;&#039;id&#039;&#039; is the zero-based internal ID of the sound within the other grf-file. &#039;&#039;volume&#039;&#039; is in the [0, 100] range, the default value (if not set) is 100.&lt;br /&gt;
|-&lt;br /&gt;
| relative_coord(&#039;&#039;x, y&#039;&#039;)&lt;br /&gt;
| Returns the coordinates in &#039;&#039;0xYYXX&#039;&#039; format. x and y must be in the [0, 255] range.&lt;br /&gt;
|-&lt;br /&gt;
| num_corners_raised(&#039;&#039;slope&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Returns the number of corners raised in a slope. Return value is 0 .. 3 for normal slopes and 4 for steep ones. See also [[NML:List of tile slopes|here]] for more information about slopes. Using this on values that are not slopes results in undefined behaviour.&lt;br /&gt;
|-&lt;br /&gt;
| slope_to_sprite_offset(&#039;&#039;slope&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Returns the sprite offset corresponding to a given slope. Return value is in range 0 .. 18. See also [[NML:List of tile slopes|here]] for more information about slopes. The section on [[NML:Spritelayout|spritelayouts]] contains some more information one possible uses, as well as an example. Using this on values that are not slopes results in undefined behaviour.&lt;br /&gt;
|-&lt;br /&gt;
| palette_1cc(&#039;&#039;colour&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Returns the 1cc palette for the given company colour, see [[NML:List_of_default_colour_translation_palettes#Company colour helper functions|here]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
| palette_2cc(&#039;&#039;colour1&#039;&#039;, &#039;&#039;colour2&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Returns the 2cc palette for the given first and second company colour, see [[NML:List_of_default_colour_translation_palettes#Company colour helper functions|here]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_curv_info(&#039;&#039;prev_cur&#039;&#039;, &#039;&#039;cur_next&#039;&#039;)&lt;br /&gt;
| Returns the curvature state of a vehicle, given the direction differences between the (previous-current) and (current-next) vehicle pairs. For use with the vehicle variable &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;curv_info&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| format_string(&#039;&#039;format&#039;&#039;, args)&lt;br /&gt;
| Use the python string formatting functions to create a literal string. Keep in mind that the output is a literal string which cannot be used by string(). This function can however be used to create filenames.&lt;br /&gt;
|-&lt;br /&gt;
| industry_type(&#039;&#039;ind_type&#039;&#039;, &#039;&#039;ID&#039;&#039;) &lt;br /&gt;
| Defines either an old industry (using the global ID) or a new industry from your grf (using the grf-local ID). Used only by &#039;&#039;conflicting_ind_types&#039;&#039; on [[NML:Industries]].&lt;br /&gt;
&#039;&#039;ind_type&#039;&#039; must be either &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;IND_TYPE_OLD&amp;lt;/code&amp;gt; or &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;IND_TYPE_NEW&amp;lt;/code&amp;gt;. &#039;&#039;ID&#039;&#039; must be in the [0, 127] range.&lt;br /&gt;
|-&lt;br /&gt;
| accept_cargo(&#039;&#039;cargotype&#039;&#039;, produce_cargo(&#039;&#039;cargotype&#039;&#039;, &#039;&#039;factor&#039;&#039;)...)&amp;lt;br&amp;gt;produce_cargo(&#039;&#039;cargotype&#039;&#039;, &#039;&#039;amount&#039;&#039;)&lt;br /&gt;
| Helper functions used to set industry production in the [[NML:Industries#Cargo_types_array|&#039;&#039;cargo_types&#039;&#039; property]].&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Builtin_functions&amp;diff=5137</id>
		<title>NML:Builtin functions</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Builtin_functions&amp;diff=5137"/>
		<updated>2026-01-03T17:37:20Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavExpressions}}&lt;br /&gt;
&lt;br /&gt;
Available builtin functions are&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| min(&#039;&#039;v1&#039;&#039;, &#039;&#039;v2&#039;&#039;)&lt;br /&gt;
| Return the smallest value&lt;br /&gt;
|-&lt;br /&gt;
| max(&#039;&#039;v1&#039;&#039;, &#039;&#039;v2&#039;&#039;)&lt;br /&gt;
| Return the biggest value&lt;br /&gt;
|-&lt;br /&gt;
| date(&#039;&#039;year&#039;&#039;, &#039;&#039;month&#039;&#039;, &#039;&#039;day&#039;&#039;)&lt;br /&gt;
| If all values are constants, returns the number of days since year 0. If the year is a variable, the month and day should be 1.&lt;br /&gt;
|-&lt;br /&gt;
| day_of_year(&#039;&#039;month&#039;&#039;, &#039;&#039;day&#039;&#039;)&lt;br /&gt;
| Return the day of the year since January 1st. Both values must be compile-time constants.&lt;br /&gt;
|-&lt;br /&gt;
| bitmask(&#039;&#039;bitpos1&#039;&#039;, ...)&lt;br /&gt;
| Compose an integer by switching the bits at the given positions on (indexed starting at 1).&lt;br /&gt;
|-&lt;br /&gt;
| STORE_TEMP(&#039;&#039;value&#039;&#039;, &#039;&#039;address&#039;&#039;)&lt;br /&gt;
| Store value in temporary storage. Temporary storage holds data until the final &amp;quot;return&amp;quot; of the current switch-chain of the current callback. Addresses 0..127 are available for the GRF to use. Addresses 0x100 and above have special purposes, which are described where they are used.&lt;br /&gt;
|-&lt;br /&gt;
| STORE_PERM(&#039;&#039;value&#039;&#039;, &#039;&#039;address&#039;&#039;)&lt;br /&gt;
| Store value in permanent storage (industries, airports, towns only). Addresses {{ottd|&amp;amp;lt;1.9}} 0..15, {{ottd|1.9}} 0..255 are available for the GRF to use. Note that accessing permanent town registers thrashes the contents of temporary register 0x100.&lt;br /&gt;
|-&lt;br /&gt;
| LOAD_TEMP(&#039;&#039;address&#039;&#039;)&lt;br /&gt;
| Get value from temporary storage. Addresses 0..127 are available for the GRF to use.&lt;br /&gt;
|-&lt;br /&gt;
| LOAD_PERM(&#039;&#039;address [, grfid]&#039;&#039;)&lt;br /&gt;
| Get value from permanent storage (industries, airports, towns only). For towns only, specifying a grfid (4-byte string, optional) allows reading the storage of other grfs. Note that accessing permanent town registers thrashes the contents of temporary register 0x100.&lt;br /&gt;
|-&lt;br /&gt;
| hasbit(&#039;&#039;value&#039;&#039;, &#039;&#039;bit_num&#039;&#039;)&lt;br /&gt;
| Test whether a bit in a value is on&lt;br /&gt;
|-&lt;br /&gt;
| getbits(&#039;&#039;value&#039;&#039;, &#039;&#039;first&#039;&#039;, &#039;&#039;amount&#039;&#039;)&lt;br /&gt;
| {{nml|0.4.1}} Extract some bits from a value. Result is (value &amp;gt;&amp;gt; first) &amp;amp; (1 &amp;lt;&amp;lt; amount - 1)&lt;br /&gt;
|-&lt;br /&gt;
| {{ottd|&amp;amp;le;1.11}} version_openttd(&#039;&#039;major&#039;&#039;, &#039;&#039;minor&#039;&#039;, &#039;&#039;revision&#039;&#039;[, &#039;&#039;build&#039;&#039;]) &amp;lt;br&amp;gt; {{ottd|&amp;amp;ge;12}} version_openttd(&#039;&#039;major&#039;&#039;, &#039;&#039;minor&#039;&#039;)&lt;br /&gt;
| Return the constant representing an OpenTTD version, for example&lt;br /&gt;
* OpenTTD 1.4.0: &amp;quot;version_openttd(1, 4, 0)&amp;quot;&lt;br /&gt;
* OpenTTD 13.0: &amp;quot;version_openttd(13, 0)&amp;quot;&lt;br /&gt;
{{ottd|&amp;amp;le;1.8}} Old versions before OpenTTD 1.9 also could check for specific SVN revisions. This is no longer available.&lt;br /&gt;
|-&lt;br /&gt;
| cargotype_available(&#039;&#039;cargotype&#039;&#039;)&lt;br /&gt;
| Check if a certain cargo type is available in this game. &#039;&#039;cargotype&#039;&#039; must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| railtype_available(&#039;&#039;railtype&#039;&#039;)&lt;br /&gt;
| Check if a railtype is available in this game. &#039;&#039;railtype&#039;&#039; must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| roadtype_available(&#039;&#039;roadtype&#039;&#039;)&lt;br /&gt;
| Check if a roadtype is available in this game. &#039;&#039;roadtype&#039;&#039; must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| tramtype_available(&#039;&#039;tramtype_available&#039;&#039;)&lt;br /&gt;
| Check if a tramtype_available is available in this game. &#039;&#039;tramtype_available&#039;&#039; must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| grf_current_status(&#039;&#039;grfid[, mask]&#039;&#039;)&lt;br /&gt;
| 1 if the given GRF is currently active 0, otherwise. If &#039;&#039;mask&#039;&#039; is set, only the bits set in the mask will be tested. Both parameters must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| grf_future_status(&#039;&#039;grfid[, mask]&#039;&#039;)&lt;br /&gt;
| Same as above, but tests whether the grf will become active instead of whether it&#039;s currently active.&lt;br /&gt;
|-&lt;br /&gt;
| grf_order_behind(&#039;&#039;grfid[, mask]&#039;&#039;)&lt;br /&gt;
| Same as above, but tests whether current grf will become active in the order behind the referenced grf.&lt;br /&gt;
|-&lt;br /&gt;
| create_effect(&#039;&#039;effect_sprite&#039;&#039;, &#039;&#039;l_x_offset&#039;&#039;, &#039;&#039;t_y_offset&#039;&#039;, &#039;&#039;z_offset&#039;&#039;)&lt;br /&gt;
| Helper function for the vehicle callback &#039;create_effect&#039;.&lt;br /&gt;
* &#039;&#039;effect_sprite&#039;&#039;: Sprite for the effect. One of EFFECT_SPRITE_[NONE|STEAM|DIESEL|ELECTRIC|AIRCRAFT_BREAKDOWN_SMOKE].&lt;br /&gt;
* &#039;&#039;l_x_offset&#039;&#039;: Longitudinal or X position of the effect, depending on callback result CB_RESULT_CREATE_EFFECT_NO_ROTATION.&lt;br /&gt;
* &#039;&#039;t_y_offset&#039;&#039;: Transversal or Y position of the effect, depending on callback result CB_RESULT_CREATE_EFFECT_NO_ROTATION.&lt;br /&gt;
* &#039;&#039;z_offset&#039;&#039;: Z position of the effect.&lt;br /&gt;
|-&lt;br /&gt;
| visual_effect_and_powered(&#039;&#039;effect&#039;&#039;, &#039;&#039;offset&#039;&#039;, &#039;&#039;powered&#039;&#039;)&lt;br /&gt;
| Helper function for the train property and callback visual_effect_and_powered.&lt;br /&gt;
|-&lt;br /&gt;
| visual_effect(&#039;&#039;effect&#039;&#039;, &#039;&#039;offset&#039;&#039;)&lt;br /&gt;
| Helper function for the road vehicle and ship property and callback visual_effect.&lt;br /&gt;
|-&lt;br /&gt;
| str2number(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Interpret the given string as a dword and return the value as integer.&lt;br /&gt;
|-&lt;br /&gt;
| cargotype(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Return the index of the given cargo type in the cargo translation table.&lt;br /&gt;
|-&lt;br /&gt;
| railtype(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Return the index of the given railtype in the railtype translation table.&lt;br /&gt;
|-&lt;br /&gt;
| roadtype(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Return the index of the given roadtype in the roadtype translation table.&lt;br /&gt;
|-&lt;br /&gt;
| tramtype(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Return the index of the given tramtype in the tramtype translation table.&lt;br /&gt;
|-&lt;br /&gt;
| reserve_sprites(&#039;&#039;number of sprites&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Reserve a number of sprites in the TTD sprite range. This is needed if you want to use your own recolour sprites. Example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
 param[10] = reserve_sprites(1);&lt;br /&gt;
 replace(param[10]) {&lt;br /&gt;
 	recolour_sprite {&lt;br /&gt;
 		// your colour remap.&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
 spritelayout xyz {&lt;br /&gt;
 	building {&lt;br /&gt;
 		...&lt;br /&gt;
 		recolour: param[10];&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| int(&#039;&#039;v1&#039;&#039;)&lt;br /&gt;
| Converts v1 to an int. This is done by cutting off everything after the decimal point, i.e. rounding toward zero.&lt;br /&gt;
|-&lt;br /&gt;
| round(&#039;&#039;v1&#039;&#039;)&lt;br /&gt;
| {{nml|0.5.4}} Converts v1 to an int. This is done by rounding towards the closest integer.&lt;br /&gt;
|-&lt;br /&gt;
| abs(&#039;&#039;v1&#039;&#039;)&lt;br /&gt;
| Return the absolute value of v1.&lt;br /&gt;
|-&lt;br /&gt;
| acos / asin / atan / cos / sin / tan&lt;br /&gt;
| Standard trigonometric functions.&lt;br /&gt;
|-&lt;br /&gt;
| sqrt&lt;br /&gt;
| {{nml|0.5.4}} Square root.&lt;br /&gt;
|-&lt;br /&gt;
| CMP(&#039;&#039;param1, param2&#039;&#039;)&lt;br /&gt;
| Compares param1 and param2 (considering them as signed values). Returns CMP_LESS if param1 is less than param2, CMP_EQUAL if they are equal and CMP_GREATER if param1 is greater than param2.&lt;br /&gt;
|-&lt;br /&gt;
| UCMP(&#039;&#039;param1, param2&#039;&#039;)&lt;br /&gt;
| Compares param1 and param2 (considering them as unsigned values). Returns CMP_LESS if param1 is less than param2, CMP_EQUAL if they are equal and CMP_GREATER if param1 is greater than param2.&lt;br /&gt;
|-&lt;br /&gt;
| rotate(&#039;&#039;value, amount&#039;&#039;)&lt;br /&gt;
| Rotates &#039;&#039;value&#039;&#039; to the right &#039;&#039;amount&#039;&#039; steps. This is always a 32 bits rotation.&lt;br /&gt;
|-&lt;br /&gt;
| sound(&#039;&#039;soundfile[, volume]&#039;&#039;)&lt;br /&gt;
| Import sound from .wav-file &#039;&#039;soundfile&#039;&#039; into the grf file and return its numeric ID. Including a file multiple times will not cause it to be duplicated. Loaded sound files can be in WAV format, PCM encoding:&lt;br /&gt;
* mono&lt;br /&gt;
* 8-bit or {{ottdp|1.0|no}} 16-bit&lt;br /&gt;
* 11025 Hz, 22050 Hz or 44100 Hz.&lt;br /&gt;
&#039;&#039;volume&#039;&#039; is in the [0, 100] range, the default value (if not set) is 100.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15}} Since OpenTTD 15, compressed sound effects are supported in Ogg Opus format, with no restriction on quality, bit depth or sample rate.&lt;br /&gt;
|-&lt;br /&gt;
| import_sound(&#039;&#039;grfid, id[, volume]&#039;&#039;)&lt;br /&gt;
| Import sound from a different grf file. &#039;&#039;grfid&#039;&#039; refers to the grf-file to import the sound from. &#039;&#039;id&#039;&#039; is the zero-based internal ID of the sound within the other grf-file. &#039;&#039;volume&#039;&#039; is in the [0, 100] range, the default value (if not set) is 100.&lt;br /&gt;
|-&lt;br /&gt;
| relative_coord(&#039;&#039;x, y&#039;&#039;)&lt;br /&gt;
| Returns the coordinates in &#039;&#039;0xYYXX&#039;&#039; format. x and y must be in the [0, 255] range.&lt;br /&gt;
|-&lt;br /&gt;
| num_corners_raised(&#039;&#039;slope&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Returns the number of corners raised in a slope. Return value is 0 .. 3 for normal slopes and 4 for steep ones. See also [[NML:List of tile slopes|here]] for more information about slopes. Using this on values that are not slopes results in undefined behaviour.&lt;br /&gt;
|-&lt;br /&gt;
| slope_to_sprite_offset(&#039;&#039;slope&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Returns the sprite offset corresponding to a given slope. Return value is in range 0 .. 18. See also [[NML:List of tile slopes|here]] for more information about slopes. The section on [[NML:Spritelayout|spritelayouts]] contains some more information one possible uses, as well as an example. Using this on values that are not slopes results in undefined behaviour.&lt;br /&gt;
|-&lt;br /&gt;
| palette_1cc(&#039;&#039;colour&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Returns the 1cc palette for the given company colour, see [[NML:List_of_default_colour_translation_palettes#Company colour helper functions|here]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
| palette_2cc(&#039;&#039;colour1&#039;&#039;, &#039;&#039;colour2&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Returns the 2cc palette for the given first and second company colour, see [[NML:List_of_default_colour_translation_palettes#Company colour helper functions|here]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_curv_info(&#039;&#039;prev_cur&#039;&#039;, &#039;&#039;cur_next&#039;&#039;)&lt;br /&gt;
| Returns the curvature state of a vehicle, given the direction differences between the (previous-current) and (current-next) vehicle pairs. For use with the vehicle variable &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;curv_info&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| format_string(&#039;&#039;format&#039;&#039;, args)&lt;br /&gt;
| Use the python string formatting functions to create a literal string. Keep in mind that the output is a literal string which cannot be used by string(). This function can however be used to create filenames.&lt;br /&gt;
|-&lt;br /&gt;
| industry_type(&#039;&#039;ind_type&#039;&#039;, &#039;&#039;ID&#039;&#039;) &lt;br /&gt;
| Defines either an old industry (using the global ID) or a new industry from your grf (using the grf-local ID). Used only by &#039;&#039;conflicting_ind_types&#039;&#039; on [[NML:Industries]].&lt;br /&gt;
&#039;&#039;ind_type&#039;&#039; must be either &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;IND_TYPE_OLD&amp;lt;/code&amp;gt; or &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;IND_TYPE_NEW&amp;lt;/code&amp;gt;. &#039;&#039;ID&#039;&#039; must be in the [0, 127] range.&lt;br /&gt;
|-&lt;br /&gt;
| accept_cargo(&#039;&#039;cargotype&#039;&#039;, produce_cargo(&#039;&#039;cargotype&#039;&#039;, &#039;&#039;factor&#039;&#039;)...)&amp;lt;br&amp;gt;produce_cargo(&#039;&#039;cargotype&#039;&#039;, &#039;&#039;amount&#039;&#039;)&lt;br /&gt;
| Helper functions used to set industry production in the [[NML:Industries#Cargo_types_array|&#039;&#039;cargo_types&#039;&#039; property]].&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Builtin_functions&amp;diff=5136</id>
		<title>NML:Builtin functions</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Builtin_functions&amp;diff=5136"/>
		<updated>2026-01-03T17:36:50Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: Note Ogg sound file support&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavExpressions}}&lt;br /&gt;
&lt;br /&gt;
Available builtin functions are&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| min(&#039;&#039;v1&#039;&#039;, &#039;&#039;v2&#039;&#039;)&lt;br /&gt;
| Return the smallest value&lt;br /&gt;
|-&lt;br /&gt;
| max(&#039;&#039;v1&#039;&#039;, &#039;&#039;v2&#039;&#039;)&lt;br /&gt;
| Return the biggest value&lt;br /&gt;
|-&lt;br /&gt;
| date(&#039;&#039;year&#039;&#039;, &#039;&#039;month&#039;&#039;, &#039;&#039;day&#039;&#039;)&lt;br /&gt;
| If all values are constants, returns the number of days since year 0. If the year is a variable, the month and day should be 1.&lt;br /&gt;
|-&lt;br /&gt;
| day_of_year(&#039;&#039;month&#039;&#039;, &#039;&#039;day&#039;&#039;)&lt;br /&gt;
| Return the day of the year since January 1st. Both values must be compile-time constants.&lt;br /&gt;
|-&lt;br /&gt;
| bitmask(&#039;&#039;bitpos1&#039;&#039;, ...)&lt;br /&gt;
| Compose an integer by switching the bits at the given positions on (indexed starting at 1).&lt;br /&gt;
|-&lt;br /&gt;
| STORE_TEMP(&#039;&#039;value&#039;&#039;, &#039;&#039;address&#039;&#039;)&lt;br /&gt;
| Store value in temporary storage. Temporary storage holds data until the final &amp;quot;return&amp;quot; of the current switch-chain of the current callback. Addresses 0..127 are available for the GRF to use. Addresses 0x100 and above have special purposes, which are described where they are used.&lt;br /&gt;
|-&lt;br /&gt;
| STORE_PERM(&#039;&#039;value&#039;&#039;, &#039;&#039;address&#039;&#039;)&lt;br /&gt;
| Store value in permanent storage (industries, airports, towns only). Addresses {{ottd|&amp;amp;lt;1.9}} 0..15, {{ottd|1.9}} 0..255 are available for the GRF to use. Note that accessing permanent town registers thrashes the contents of temporary register 0x100.&lt;br /&gt;
|-&lt;br /&gt;
| LOAD_TEMP(&#039;&#039;address&#039;&#039;)&lt;br /&gt;
| Get value from temporary storage. Addresses 0..127 are available for the GRF to use.&lt;br /&gt;
|-&lt;br /&gt;
| LOAD_PERM(&#039;&#039;address [, grfid]&#039;&#039;)&lt;br /&gt;
| Get value from permanent storage (industries, airports, towns only). For towns only, specifying a grfid (4-byte string, optional) allows reading the storage of other grfs. Note that accessing permanent town registers thrashes the contents of temporary register 0x100.&lt;br /&gt;
|-&lt;br /&gt;
| hasbit(&#039;&#039;value&#039;&#039;, &#039;&#039;bit_num&#039;&#039;)&lt;br /&gt;
| Test whether a bit in a value is on&lt;br /&gt;
|-&lt;br /&gt;
| getbits(&#039;&#039;value&#039;&#039;, &#039;&#039;first&#039;&#039;, &#039;&#039;amount&#039;&#039;)&lt;br /&gt;
| {{nml|0.4.1}} Extract some bits from a value. Result is (value &amp;gt;&amp;gt; first) &amp;amp; (1 &amp;lt;&amp;lt; amount - 1)&lt;br /&gt;
|-&lt;br /&gt;
| {{ottd|&amp;amp;le;1.11}} version_openttd(&#039;&#039;major&#039;&#039;, &#039;&#039;minor&#039;&#039;, &#039;&#039;revision&#039;&#039;[, &#039;&#039;build&#039;&#039;]) &amp;lt;br&amp;gt; {{ottd|&amp;amp;ge;12}} version_openttd(&#039;&#039;major&#039;&#039;, &#039;&#039;minor&#039;&#039;)&lt;br /&gt;
| Return the constant representing an OpenTTD version, for example&lt;br /&gt;
* OpenTTD 1.4.0: &amp;quot;version_openttd(1, 4, 0)&amp;quot;&lt;br /&gt;
* OpenTTD 13.0: &amp;quot;version_openttd(13, 0)&amp;quot;&lt;br /&gt;
{{ottd|&amp;amp;le;1.8}} Old versions before OpenTTD 1.9 also could check for specific SVN revisions. This is no longer available.&lt;br /&gt;
|-&lt;br /&gt;
| cargotype_available(&#039;&#039;cargotype&#039;&#039;)&lt;br /&gt;
| Check if a certain cargo type is available in this game. &#039;&#039;cargotype&#039;&#039; must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| railtype_available(&#039;&#039;railtype&#039;&#039;)&lt;br /&gt;
| Check if a railtype is available in this game. &#039;&#039;railtype&#039;&#039; must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| roadtype_available(&#039;&#039;roadtype&#039;&#039;)&lt;br /&gt;
| Check if a roadtype is available in this game. &#039;&#039;roadtype&#039;&#039; must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| tramtype_available(&#039;&#039;tramtype_available&#039;&#039;)&lt;br /&gt;
| Check if a tramtype_available is available in this game. &#039;&#039;tramtype_available&#039;&#039; must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| grf_current_status(&#039;&#039;grfid[, mask]&#039;&#039;)&lt;br /&gt;
| 1 if the given GRF is currently active 0, otherwise. If &#039;&#039;mask&#039;&#039; is set, only the bits set in the mask will be tested. Both parameters must be a literal string of length 4.&lt;br /&gt;
|-&lt;br /&gt;
| grf_future_status(&#039;&#039;grfid[, mask]&#039;&#039;)&lt;br /&gt;
| Same as above, but tests whether the grf will become active instead of whether it&#039;s currently active.&lt;br /&gt;
|-&lt;br /&gt;
| grf_order_behind(&#039;&#039;grfid[, mask]&#039;&#039;)&lt;br /&gt;
| Same as above, but tests whether current grf will become active in the order behind the referenced grf.&lt;br /&gt;
|-&lt;br /&gt;
| create_effect(&#039;&#039;effect_sprite&#039;&#039;, &#039;&#039;l_x_offset&#039;&#039;, &#039;&#039;t_y_offset&#039;&#039;, &#039;&#039;z_offset&#039;&#039;)&lt;br /&gt;
| Helper function for the vehicle callback &#039;create_effect&#039;.&lt;br /&gt;
* &#039;&#039;effect_sprite&#039;&#039;: Sprite for the effect. One of EFFECT_SPRITE_[NONE|STEAM|DIESEL|ELECTRIC|AIRCRAFT_BREAKDOWN_SMOKE].&lt;br /&gt;
* &#039;&#039;l_x_offset&#039;&#039;: Longitudinal or X position of the effect, depending on callback result CB_RESULT_CREATE_EFFECT_NO_ROTATION.&lt;br /&gt;
* &#039;&#039;t_y_offset&#039;&#039;: Transversal or Y position of the effect, depending on callback result CB_RESULT_CREATE_EFFECT_NO_ROTATION.&lt;br /&gt;
* &#039;&#039;z_offset&#039;&#039;: Z position of the effect.&lt;br /&gt;
|-&lt;br /&gt;
| visual_effect_and_powered(&#039;&#039;effect&#039;&#039;, &#039;&#039;offset&#039;&#039;, &#039;&#039;powered&#039;&#039;)&lt;br /&gt;
| Helper function for the train property and callback visual_effect_and_powered.&lt;br /&gt;
|-&lt;br /&gt;
| visual_effect(&#039;&#039;effect&#039;&#039;, &#039;&#039;offset&#039;&#039;)&lt;br /&gt;
| Helper function for the road vehicle and ship property and callback visual_effect.&lt;br /&gt;
|-&lt;br /&gt;
| str2number(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Interpret the given string as a dword and return the value as integer.&lt;br /&gt;
|-&lt;br /&gt;
| cargotype(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Return the index of the given cargo type in the cargo translation table.&lt;br /&gt;
|-&lt;br /&gt;
| railtype(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Return the index of the given railtype in the railtype translation table.&lt;br /&gt;
|-&lt;br /&gt;
| roadtype(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Return the index of the given roadtype in the roadtype translation table.&lt;br /&gt;
|-&lt;br /&gt;
| tramtype(&#039;&#039;4-byte long string&#039;&#039;)&lt;br /&gt;
| Return the index of the given tramtype in the tramtype translation table.&lt;br /&gt;
|-&lt;br /&gt;
| reserve_sprites(&#039;&#039;number of sprites&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Reserve a number of sprites in the TTD sprite range. This is needed if you want to use your own recolour sprites. Example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
 param[10] = reserve_sprites(1);&lt;br /&gt;
 replace(param[10]) {&lt;br /&gt;
 	recolour_sprite {&lt;br /&gt;
 		// your colour remap.&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
 spritelayout xyz {&lt;br /&gt;
 	building {&lt;br /&gt;
 		...&lt;br /&gt;
 		recolour: param[10];&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| int(&#039;&#039;v1&#039;&#039;)&lt;br /&gt;
| Converts v1 to an int. This is done by cutting off everything after the decimal point, i.e. rounding toward zero.&lt;br /&gt;
|-&lt;br /&gt;
| round(&#039;&#039;v1&#039;&#039;)&lt;br /&gt;
| {{nml|0.5.4}} Converts v1 to an int. This is done by rounding towards the closest integer.&lt;br /&gt;
|-&lt;br /&gt;
| abs(&#039;&#039;v1&#039;&#039;)&lt;br /&gt;
| Return the absolute value of v1.&lt;br /&gt;
|-&lt;br /&gt;
| acos / asin / atan / cos / sin / tan&lt;br /&gt;
| Standard trigonometric functions.&lt;br /&gt;
|-&lt;br /&gt;
| sqrt&lt;br /&gt;
| {{nml|0.5.4}} Square root.&lt;br /&gt;
|-&lt;br /&gt;
| CMP(&#039;&#039;param1, param2&#039;&#039;)&lt;br /&gt;
| Compares param1 and param2 (considering them as signed values). Returns CMP_LESS if param1 is less than param2, CMP_EQUAL if they are equal and CMP_GREATER if param1 is greater than param2.&lt;br /&gt;
|-&lt;br /&gt;
| UCMP(&#039;&#039;param1, param2&#039;&#039;)&lt;br /&gt;
| Compares param1 and param2 (considering them as unsigned values). Returns CMP_LESS if param1 is less than param2, CMP_EQUAL if they are equal and CMP_GREATER if param1 is greater than param2.&lt;br /&gt;
|-&lt;br /&gt;
| rotate(&#039;&#039;value, amount&#039;&#039;)&lt;br /&gt;
| Rotates &#039;&#039;value&#039;&#039; to the right &#039;&#039;amount&#039;&#039; steps. This is always a 32 bits rotation.&lt;br /&gt;
|-&lt;br /&gt;
| sound(&#039;&#039;soundfile[, volume]&#039;&#039;)&lt;br /&gt;
| Import sound from .wav-file &#039;&#039;soundfile&#039;&#039; into the grf file and return its numeric ID. Including a file multiple times will not cause it to be duplicated. Loaded sound files can be in WAV format, PCM encoding:&lt;br /&gt;
* mono&lt;br /&gt;
* 8-bit or {{ottdp|1.0|no}} 16-bit&lt;br /&gt;
* 11025 Hz, 22050 Hz or 44100 Hz.&lt;br /&gt;
&#039;&#039;volume&#039;&#039; is in the [0, 100] range, the default value (if not set) is 100.&lt;br /&gt;
{{ottdp|15}} Since OpenTTD 15, compressed sound effects are supported in Ogg Opus format, with no restriction on quality, bit depth or sample rate.&lt;br /&gt;
|-&lt;br /&gt;
| import_sound(&#039;&#039;grfid, id[, volume]&#039;&#039;)&lt;br /&gt;
| Import sound from a different grf file. &#039;&#039;grfid&#039;&#039; refers to the grf-file to import the sound from. &#039;&#039;id&#039;&#039; is the zero-based internal ID of the sound within the other grf-file. &#039;&#039;volume&#039;&#039; is in the [0, 100] range, the default value (if not set) is 100.&lt;br /&gt;
|-&lt;br /&gt;
| relative_coord(&#039;&#039;x, y&#039;&#039;)&lt;br /&gt;
| Returns the coordinates in &#039;&#039;0xYYXX&#039;&#039; format. x and y must be in the [0, 255] range.&lt;br /&gt;
|-&lt;br /&gt;
| num_corners_raised(&#039;&#039;slope&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Returns the number of corners raised in a slope. Return value is 0 .. 3 for normal slopes and 4 for steep ones. See also [[NML:List of tile slopes|here]] for more information about slopes. Using this on values that are not slopes results in undefined behaviour.&lt;br /&gt;
|-&lt;br /&gt;
| slope_to_sprite_offset(&#039;&#039;slope&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Returns the sprite offset corresponding to a given slope. Return value is in range 0 .. 18. See also [[NML:List of tile slopes|here]] for more information about slopes. The section on [[NML:Spritelayout|spritelayouts]] contains some more information one possible uses, as well as an example. Using this on values that are not slopes results in undefined behaviour.&lt;br /&gt;
|-&lt;br /&gt;
| palette_1cc(&#039;&#039;colour&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Returns the 1cc palette for the given company colour, see [[NML:List_of_default_colour_translation_palettes#Company colour helper functions|here]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
| palette_2cc(&#039;&#039;colour1&#039;&#039;, &#039;&#039;colour2&#039;&#039;)&lt;br /&gt;
|&lt;br /&gt;
Returns the 2cc palette for the given first and second company colour, see [[NML:List_of_default_colour_translation_palettes#Company colour helper functions|here]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_curv_info(&#039;&#039;prev_cur&#039;&#039;, &#039;&#039;cur_next&#039;&#039;)&lt;br /&gt;
| Returns the curvature state of a vehicle, given the direction differences between the (previous-current) and (current-next) vehicle pairs. For use with the vehicle variable &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;curv_info&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| format_string(&#039;&#039;format&#039;&#039;, args)&lt;br /&gt;
| Use the python string formatting functions to create a literal string. Keep in mind that the output is a literal string which cannot be used by string(). This function can however be used to create filenames.&lt;br /&gt;
|-&lt;br /&gt;
| industry_type(&#039;&#039;ind_type&#039;&#039;, &#039;&#039;ID&#039;&#039;) &lt;br /&gt;
| Defines either an old industry (using the global ID) or a new industry from your grf (using the grf-local ID). Used only by &#039;&#039;conflicting_ind_types&#039;&#039; on [[NML:Industries]].&lt;br /&gt;
&#039;&#039;ind_type&#039;&#039; must be either &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;IND_TYPE_OLD&amp;lt;/code&amp;gt; or &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;IND_TYPE_NEW&amp;lt;/code&amp;gt;. &#039;&#039;ID&#039;&#039; must be in the [0, 127] range.&lt;br /&gt;
|-&lt;br /&gt;
| accept_cargo(&#039;&#039;cargotype&#039;&#039;, produce_cargo(&#039;&#039;cargotype&#039;&#039;, &#039;&#039;factor&#039;&#039;)...)&amp;lt;br&amp;gt;produce_cargo(&#039;&#039;cargotype&#039;&#039;, &#039;&#039;amount&#039;&#039;)&lt;br /&gt;
| Helper functions used to set industry production in the [[NML:Industries#Cargo_types_array|&#039;&#039;cargo_types&#039;&#039; property]].&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Vehicles&amp;diff=5135</id>
		<title>NML:Vehicles</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Vehicles&amp;diff=5135"/>
		<updated>2026-01-03T17:23:03Z</updated>

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

		<summary type="html">&lt;p&gt;Andythenorth: Since https://github.com/OpenTTD/nml/pull/309,  &amp;#039;all spritesets used in a layout must have the same number of sprites&amp;#039; no longer applies&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavBlocksyntax}}&lt;br /&gt;
&lt;br /&gt;
Stations, houses, industry tiles, objects, and airport tiles use spritelayouts to define layouts how sprites are supposed to be arranged on a tile. A &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;spritelayout&amp;lt;/code&amp;gt; can combine multiple sprites into one entity, which represents everything that is to be drawn on a particular tile. A simple example to illustrate how it works:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
 spritelayout airport_building1 {&lt;br /&gt;
 	ground { sprite: GROUNDSPRITE_NORMAL; }&lt;br /&gt;
 	childsprite {&lt;br /&gt;
 		sprite: spr_small_dirt_ne; // custom spriteset&lt;br /&gt;
 		always_draw: 1; // also draw in transparent mode&lt;br /&gt;
 	}&lt;br /&gt;
 	building {&lt;br /&gt;
 		sprite: 0xA67; // reuse this existing base set sprite&lt;br /&gt;
 		xoffset: 0x0F;&lt;br /&gt;
 		xextent: 1;&lt;br /&gt;
 		zextent: 6;&lt;br /&gt;
 		recolour_mode: RECOLOUR_REMAP;&lt;br /&gt;
 		palette: PALETTE_USE_DEFAULT;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sprite layout is composed of one or more sprites. Each sprite is defined by a &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;ground&amp;lt;/code&amp;gt;, &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;building&amp;lt;/code&amp;gt; or &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;childsprite&amp;lt;/code&amp;gt; block. What block to use depends on how the sprite is to be placed on the tile.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;ground&amp;lt;/code&amp;gt; sprites are drawn at the base of the tile, like grass and concrete, rails etc. in normal TTD. With a few exceptions (e.g. when using custom foundations), you should always provide a ground sprite, even when the building above fully covers it. This because in transparent mode, the building becomes invisible. A tile can only have one ground sprite.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;building&amp;lt;/code&amp;gt; sprites are drawn on top of the ground sprite. To determine their location and drawing order (what goes in front of what), they have a 3D bounding box.&lt;br /&gt;
* With &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;childsprite&amp;lt;/code&amp;gt;(s), you can effectively compose sprites from multiple parts. When placing these after a building sprite, they will use the same bounding box as the previous building sprite. When placing them before the first building sprite, they will have no bounding box, as if they would use the &#039;bounding box&#039; of the ground tile. Multiple childsprites may be used per ground / building sprite.&lt;br /&gt;
&lt;br /&gt;
The sprite order is genrally determined by the sprite sorter, that evaluates the bounding box (see below) of each sprite. Child sprites are always part of the building (or ground) sprite that precedes them. In the GUI, sprites are always drawn in the order specified in the layout, so be sure to get this correct for spritelayouts that are to be displayed there.&lt;br /&gt;
&lt;br /&gt;
Per sprite, a number of parameters may be set. These are listed below. Unless otherwise indicated, each may have a value that is dependant on &#039;&#039;&#039;variables, parameters or registers&#039;&#039;&#039;. Accessed variables are always in the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;SELF&amp;lt;/code&amp;gt; scope. Accessing variables inside the purchase list is &#039;&#039;&#039;not&#039;&#039;&#039; supported, make sure that layouts accessed from there do not use them. Using variables and parameters, it&#039;s possible to create wildly differing looks with few spritelayouts.&lt;br /&gt;
&lt;br /&gt;
===Sprite===&lt;br /&gt;
&lt;br /&gt;
The most important parameter is &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;sprite&amp;lt;/code&amp;gt;, this determines the actual sprite to be drawn. If you set this to a number, a TTD sprite will be drawn, usually from the base set. Pre-defined constants for some base set sprites are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_NORMAL&amp;lt;ref name=&amp;quot;spritenames&amp;quot;&amp;gt;These constants can be used for sprites on flat ground. There are also equivalent sprites for sloped ground, however. These sprites follow the initial ground sprite, the [[NML:Builtin functions|builtin function]] &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;slope_to_sprite_offset(&#039;&#039;slope&#039;&#039;)&amp;lt;/code&amp;gt; may be used to compute the required offset. Refer to the reference on [[NML:List of tile slopes|slopes]] or the [[#Example_.28advanced.29_Spritelayout|example]] below.&amp;lt;/ref&amp;gt;&amp;lt;/code&amp;gt; default terrain type for that climate (temperate, toyland: normal, arctic: without snow, tropical: rainforest).&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_DESERT &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; desert tile&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_DESERT_1_2 &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; transition tile between desert and grass&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_SNOW &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; snowy ground tile&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_SNOW_1_4 &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; 1/4 snowy ground tile&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_SNOW_2_4 &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; half-snowy ground tile&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_SNOW_3_4 &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; 3/4 snowy ground tile&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_SNOW_4_4 &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; snowy ground tile&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_CONCRETE&amp;lt;/code&amp;gt; concrete ground tile&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_WATER&amp;lt;/code&amp;gt; flat water tile, automatically choosen from sea, river and canal sprites, including river and canal borders.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_CLEARED &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; ground tile that has just been bulldozed (with brown colour)&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_RAIL_X &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; ground tile with rail and terrain appropriate ground, NE-SW orientation (provided by railtype)&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_RAIL_Y &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; ground tile with rail and terrain appropriate ground, NW-SE orientation (provided by railtype)&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_ROAD_X &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; ground tile with straight road piece on grass, NE-SW orientation&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_ROAD_Y &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; ground tile with straight road piece on grass, NW-SE orientation&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can set the value to (the name of) a [[NML:Spriteset|spriteset]], to provide a custom sprite. When the value is just a spriteset identifier, a sprite from that set will be selected depending on the construction stage, see below. If you supply an argument (e.g. &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;sprite: some_sprite_set(2);&amp;lt;/code&amp;gt;), the corresponding sprite from the sprite set will be used, with an argument of 0 corresponding to the first sprite. Note that the argument may also be variable, so you could e.g. use &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;sprite: some_set(construction_state);&amp;lt;/code&amp;gt; to use the construction state to select the sprite (as is the default). If the spriteset has labels defined, you can use these labels in the argument expression.&lt;br /&gt;
&lt;br /&gt;
* For stations, objects and airport tiles, there are no construction stages, so the first sprite from the set is used always.&lt;br /&gt;
* For houses and industry tiles, sprite chosen depends on the construction stage and the number of sprites available.&lt;br /&gt;
** If there is only one sprite in the set, it is used always.&lt;br /&gt;
** If there are two sprites, one is used during construction (stages 0-2) and one for the finished building (stage 3)&lt;br /&gt;
** If there are three sprites, one is used for the beginning of construction (stage 0), one for the other construction stages (stages 1-2) and one for the finished building (stage 3).&lt;br /&gt;
** If there are four sprites, one is used for each construction stage.&lt;br /&gt;
** Sprites after the first four are always ignored.&lt;br /&gt;
* For road stops the usage of the ground sprite depends on the [[NML:Roadstops#List of draw mode flags|&#039;&#039;draw_mode&#039;&#039; property]].&lt;br /&gt;
* For objects the usage of the ground sprite may be skipped depending on the [[NML:Objects#List of object flags|&#039;&#039;OBJ_FLAG_DRAW_WATER&#039;&#039; flag]], which has the same effect as &#039;&#039;GROUNDSPRITE_WATER&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Recolouring===&lt;br /&gt;
&lt;br /&gt;
Next, you have the option to apply recolouring, i.e. to change the colours of the sprite. This is done via the following attributes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;recolour_mode&amp;lt;/code&amp;gt;: This must be compile-time constant. Available recolour modes are:&lt;br /&gt;
** &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;RECOLOUR_NONE&amp;lt;/code&amp;gt;: Use no colour translation (default)&lt;br /&gt;
** &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;RECOLOUR_REMAP&amp;lt;/code&amp;gt;: Use a colour translation table as defined by &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;palette&amp;lt;/code&amp;gt;. This tables maps all colours of the sprite to a new colour.&lt;br /&gt;
** &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;RECOLOUR_TRANSPARENT&amp;lt;/code&amp;gt;: Draw the sprite in transparant mode, using a colour translation table as defined by &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;palette&amp;lt;/code&amp;gt;. Normally the palette will be set to PALETTE_TO_TRANSPARANT to draw all underlying colours somewhat darker. Note that the selected palette is applied to the colours of the underlying sprite, whatever that happens to be. The supplied sprite is only used to determine what pixels to recolour.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;palette&amp;lt;/code&amp;gt;: This defines the palette which is used for the colour translation. It may only (and must!) be set when &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;recolour_mode&amp;lt;/code&amp;gt; is set to &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;RECOLOUR_REMAP&amp;lt;/code&amp;gt; or &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;RECOLOUR_TRANSPARENT&amp;lt;/code&amp;gt;. The available values are the same as for &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;sprite&amp;lt;/code&amp;gt;, i.e. you can use either a default sprite or a sprite from a sprite set. In this case, however, the referenced sprite must not be a real sprite, but a [[NML:Recolour sprites|recolour sprite]]. For available default recolour sprites, see the appendix on [[NML:List of default colour translation palettes|available palettes]].&lt;br /&gt;
&lt;br /&gt;
===Display yes/no===&lt;br /&gt;
&lt;br /&gt;
The following attributes allow configuring whether the sprite will be displayed or not.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;hide_sprite&amp;lt;/code&amp;gt;: If set to 1, this sprite will not be drawn at all. Default is 0. If a building sprite is not drawn, all child sprites that share its bounding box are not drawn either. Setting this to a constant value makes little sense, but you can use this to enable/disable drawing certain sprites at runtime depending on certain conditions.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;always_draw&amp;lt;/code&amp;gt;: This must be a compile-time-constant. If set to 1, this sprite will also be drawn when the user has enabled transparant mode. The default value is 0. This is not available for ground sprites (those are drawn always), but it is for child sprites that share their bounding box with the ground sprite.&lt;br /&gt;
&lt;br /&gt;
===Positioning===&lt;br /&gt;
&lt;br /&gt;
How to position the sprite depends on the type of sprite:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;ground&amp;lt;/code&amp;gt;: Ground sprites cannot be positioned.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;building&amp;lt;/code&amp;gt;: A three-dimensional bounding box may be defined. The X-axis runs from top-right to bottom-left and the Y-axis from top-left to bottom-right. Both X and Y are measured in 1/16 length of the the tile border. The Z axis is vertical and measured in pixels.&amp;lt;br/&amp;gt;Extending the bounding box over the edges of a tile is possible, but not recommended as it may lead to glitches. &#039;&#039;&#039;Unless you know exactly what you are doing, please follow the recommendations below. They are most likely exactly what you need&#039;&#039;&#039;.&amp;lt;br/&amp;gt;In NewGRF developer mode in OpenTTD, it&#039;s possible to view the bounding boxes of all sprites by pressing Ctrl+B. In order to use and define a custom bounding box, the following attributes can be used:&lt;br /&gt;
** &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;xoffset&amp;lt;/code&amp;gt;: Offset from the northwestern edge to the start of the bounding box (X). Unit is 1/16 of the tile border. Default value is 0.&lt;br /&gt;
** &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;yoffset&amp;lt;/code&amp;gt;: Offset from the northeastern edge to the start of the bounding box (Y). Unit is 1/16 of the tile border. Default value is 0.&lt;br /&gt;
** &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;zoffset&amp;lt;/code&amp;gt;: Offset from the lowest tile corner (with foundation added) to the start of the bounding box (Z). Unit is pixels. Default value is 0.&lt;br /&gt;
** &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;xextent&amp;lt;/code&amp;gt;: Size of the bounding box, in the X-direction. Must be a compile-time constant. Unit is 1/16 of the tile border. Default value is 16.&lt;br /&gt;
** &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;yextent&amp;lt;/code&amp;gt;: Size of the bounding box, in the Y-direction. Must be a compile-time constant. Unit is 1/16 of the tile border. Default value is 16.&lt;br /&gt;
** &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;zextent&amp;lt;/code&amp;gt;: Size of the bounding box, in the Z-direction. Must be a compile-time constant. Unit is pixels. Default value is 16.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;childsprite&amp;lt;/code&amp;gt;: Child sprites may be positioned relative to their &#039;parent&#039; sprite that defines the bounding box. &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;xoffset&amp;lt;/code&amp;gt; and &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;yoffset&amp;lt;/code&amp;gt; may be set to specify an offset in pixels between the origin of the parent and child sprite. When the parent sprite is the ground sprite, TTDPatch does not support offsets other than 0,0. Note that all child sprites should fit inside the bounding box of the parent sprite to avoid visual glitches.&lt;br /&gt;
&lt;br /&gt;
===Strong recommendations for bounding boxes===&lt;br /&gt;
&lt;br /&gt;
For industries, houses, objects, and non-track station tiles:&lt;br /&gt;
* Use at most one building sprite; and child sprites for everything else.&lt;br /&gt;
** Do not set &#039;&#039;xoffset&#039;&#039;, &#039;&#039;yoffset&#039;&#039; or &#039;&#039;zoffset&#039;&#039;. The default value 0 applies.&lt;br /&gt;
** Do not set &#039;&#039;xextent&#039;&#039; or &#039;&#039;yextent&#039;&#039;. The default value 16 applies.&lt;br /&gt;
** Set &#039;&#039;zextent&#039;&#039; to &amp;quot;&amp;lt;number of occupied height levels&amp;gt; * 8 - 2&amp;quot;. The number of occupied height levels is important for objects allowed under bridges. Otherwise this only needs to be a rough estimate.&lt;br /&gt;
* If no sprite visually extends over the ground sprite, you do not need any building sprite: Child sprites can be used for further sprites.&lt;br /&gt;
&lt;br /&gt;
For rail station track tiles:&lt;br /&gt;
* Use child sprites of the ground sprite for things &amp;quot;below the train&amp;quot;.&lt;br /&gt;
* Use exactly two building sprites, possibly with child sprites.&lt;br /&gt;
* The first building sprite is used for things &amp;quot;behind the train&amp;quot;.&lt;br /&gt;
** Set &#039;&#039;xoffset&#039;&#039;, &#039;&#039;yoffset&#039;&#039;, &#039;&#039;zoffset&#039;&#039; to 0.&lt;br /&gt;
** For track in X direction: Set &#039;&#039;xextent&#039;&#039; to 16, &#039;&#039;yextent&#039;&#039; to 5.&lt;br /&gt;
** For track in Y direction: Set &#039;&#039;xextent&#039;&#039; to 5, &#039;&#039;yextent&#039;&#039; to 16.&lt;br /&gt;
** Set &#039;&#039;zextent&#039;&#039; to &amp;quot;&amp;lt;number of occupied height levels&amp;gt; * 8 - 2&amp;quot;. A rough estimate is good enough.&lt;br /&gt;
* The second building sprite is used for things &amp;quot;in-front or above the train&amp;quot;.&lt;br /&gt;
** For track in X direction: Set &#039;&#039;xoffset&#039;&#039; to 0, &#039;&#039;yoffset&#039;&#039; to 11.&lt;br /&gt;
** For track in Y direction: Set &#039;&#039;xoffset&#039;&#039; to 11, &#039;&#039;yoffset&#039;&#039; to 0.&lt;br /&gt;
** Set &#039;&#039;zoffset&#039;&#039; to 0.&lt;br /&gt;
** For track in X direction: Set &#039;&#039;xextent&#039;&#039; to 16, &#039;&#039;yextent&#039;&#039; to 5.&lt;br /&gt;
** For track in Y direction: Set &#039;&#039;xextent&#039;&#039; to 5, &#039;&#039;yextent&#039;&#039; to 16.&lt;br /&gt;
** Set &#039;&#039;zextent&#039;&#039; to &amp;quot;&amp;lt;number of occupied height levels&amp;gt; * 8 - 2&amp;quot;. A rough estimate is good enough.&lt;br /&gt;
&lt;br /&gt;
===Maximum sprite size===&lt;br /&gt;
&lt;br /&gt;
Ground sprites and their child sprites must not extend over the edges of a regular ground sprite of the slope.&lt;br /&gt;
&lt;br /&gt;
Building sprites and their child sprites:&lt;br /&gt;
* must not extend below the south tile edges,&lt;br /&gt;
* must not extend left/right of the west/east tile corners,&lt;br /&gt;
* must not extend above the north corner by more than 200 pixels including the (default) foundation. If foundations are present, this is reduced by up to 16 pixels (steep slope S) to 184 pixels.&lt;br /&gt;
&lt;br /&gt;
The following image shows the limitations for flat tiles, and the extreme cases of steep slopes:&lt;br /&gt;
&lt;br /&gt;
[[File:Max_tile_sprite_size.png]]&lt;br /&gt;
&lt;br /&gt;
These values apply since {{ottd|1.5}}.&lt;br /&gt;
&lt;br /&gt;
===Example (advanced) Spritelayout===&lt;br /&gt;
&lt;br /&gt;
OpenTTD 1.2 (r22723) allows for nice shorthands in defining multiple views, e.g. for different slopes: Spritelayout can have parameters and may use variables and temporary storage inside of a layout. A common usage for such parametrized spritelayout is taking care of the tile slope and ground type as illustrated in this example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
 spritelayout company_land_layout {&lt;br /&gt;
 	ground {&lt;br /&gt;
 		// normal ground sprite - always draw&lt;br /&gt;
 		sprite: LOAD_TEMP(0) + LOAD_TEMP(1);&lt;br /&gt;
 	}&lt;br /&gt;
 	childsprite {&lt;br /&gt;
 		// company-coloured border - always draw&lt;br /&gt;
 		sprite:        cc_frame(LOAD_TEMP(0));&lt;br /&gt;
 		always_draw:   1;&lt;br /&gt;
 		recolour_mode: RECOLOUR_REMAP;&lt;br /&gt;
 		palette:       PALETTE_USE_DEFAULT;&lt;br /&gt;
 	}&lt;br /&gt;
 	childsprite {&lt;br /&gt;
 		// again the normal ground sprite. Thus in non-transparent view&lt;br /&gt;
 		// only the normal ground sprite is shown. In transparent view&lt;br /&gt;
 		// this acts as sprite which darkens the other two sprites via&lt;br /&gt;
 		// a translation to transparency.&lt;br /&gt;
 		sprite: LOAD_TEMP(0) + LOAD_TEMP(1);&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // A pseudo-switch which sets the temporary parameters for the sprite layout, storing the sprite number&lt;br /&gt;
 // which belongs to the terrain type and the corresponding offset due to the tile slope&lt;br /&gt;
 switch (FEAT_OBJECTS, SELF, company_land_terrain_switch, [&lt;br /&gt;
 			// We store the offset into the spriteset due to the tile slope into the 1st temporary variable&lt;br /&gt;
 			STORE_TEMP(slope_to_sprite_offset(tile_slope), 0),&lt;br /&gt;
 &lt;br /&gt;
 			// We store the offset to the flat groundsprite we use into the 2nd temporary variable&lt;br /&gt;
 			STORE_TEMP(GROUNDSPRITE_NORMAL, 1),&lt;br /&gt;
 			STORE_TEMP(terrain_type == TILETYPE_DESERT      ? GROUNDSPRITE_DESERT : LOAD_TEMP(1), 1),&lt;br /&gt;
 			STORE_TEMP(terrain_type == TILETYPE_SNOW        ? GROUNDSPRITE_SNOW   : LOAD_TEMP(1), 1),&lt;br /&gt;
 &lt;br /&gt;
 			1&lt;br /&gt;
 			]) {&lt;br /&gt;
 	company_land_layout;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Standardized_Railtype_Scheme&amp;diff=5070</id>
		<title>Standardized Railtype Scheme</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Standardized_Railtype_Scheme&amp;diff=5070"/>
		<updated>2025-06-13T17:50:20Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: &amp;quot;Track type and gauge&amp;quot; rather than &amp;quot;Track gauge and type&amp;quot;, to emphasise purpose, as discussed with michi_cc&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This railtype label scheme aims to provide a way to allow players to easily mix and match different train and track sets. It does this by grouping the rail types into what matters from a technical perspective. The scheme provides a standardized way of defining railtype labels, based on track type and gauge, speed class, allowable axle weight and electrification type. To limit combinatorial explosions of rail types, the track properties are abstracted away from strict real-life representations.&lt;br /&gt;
&lt;br /&gt;
It is the explicit intent of this scheme to decouple track sets from vehicle sets to facilitate easy mixing. This way the player can select a track set of choice to go with a train set of choice. It allows the player to play with or without axle load classes, or with or without speed limit classes, simply by loading a track set that does or does not provide these features. In some cases it will also be possible to combine niche track sets, for instance a standard gauge track set with a narrow gauge and a metro track set. Additionally, due to the decoupling, depending on the specific train and track sets used, not all defined vehicles and/or track types might be available in a specific set combination. This is fully intended behaviour.&lt;br /&gt;
&lt;br /&gt;
== When to use the scheme and when &#039;&#039;not&#039;&#039; to use the scheme ==&lt;br /&gt;
&lt;br /&gt;
When to use:&lt;br /&gt;
* If you only want to develop a track or a train set.&lt;br /&gt;
* If you want players to be able to mix-and-match sets.&lt;br /&gt;
* If you are okay with abstractions from real life.&lt;br /&gt;
&lt;br /&gt;
When &#039;&#039;not&#039;&#039; to use:&lt;br /&gt;
* If you consider it a crime against humanity when one of your vehicles or track types is not available in a specific game.&lt;br /&gt;
* If you want your tracks or vehicles to exactly mirror real-life counterparts down to the last mm of gauge width.&lt;br /&gt;
* If your train set is specifically designed to work with your track set only.&lt;br /&gt;
* If you feel the compulsory need to fill all 64 railtype slots.&lt;br /&gt;
&lt;br /&gt;
== The Label Scheme ==&lt;br /&gt;
A railtype label consists of four characters. In this scheme, each position has a different purpose:&lt;br /&gt;
# Track type and gauge class (e.g. standard gauge rail, narrow gauge rail, monorail)&lt;br /&gt;
# Speed limit class&lt;br /&gt;
# Axle load class (maximum allowed axle weight for this track)&lt;br /&gt;
# Energy source type class&lt;br /&gt;
&lt;br /&gt;
In the next sections, each of the four positions will be explained.&lt;br /&gt;
&lt;br /&gt;
=== Track type and gauge class [X***] ===&lt;br /&gt;
The first position in the railtype label defines track type and/or track gauge class. The following classes are currently defined:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! !!Track type/gauge&lt;br /&gt;
|- &lt;br /&gt;
|S ||Standard gauge rail&lt;br /&gt;
|-&lt;br /&gt;
|B ||Broad gauge rail &lt;br /&gt;
|-&lt;br /&gt;
|N ||Narrow gauge rail&lt;br /&gt;
|-&lt;br /&gt;
|n ||Secondary narrow gauge rail (e.g. when providing both metre and cape gauge, always use N in case of just one type of narrow gauge)&lt;br /&gt;
|-&lt;br /&gt;
|D ||Dual gauge rail, standard/broad gauge&lt;br /&gt;
|-&lt;br /&gt;
|d ||Dual gauge rail, standard/narrow gauge&lt;br /&gt;
|-&lt;br /&gt;
|M ||Monorail&lt;br /&gt;
|-&lt;br /&gt;
|L ||Magnetic Levitation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All track types or gauges are abstractions of real-life types and do not correspond to specific examples used in real-life. For example &#039;&#039;&#039;N&#039;&#039;&#039; is any gauge that is smaller than standard gauge, but not corresponding to any specific gauge that exists in real life, just like &#039;&#039;&#039;n&#039;&#039;&#039; is smaller than &#039;&#039;&#039;N&#039;&#039;&#039;, but does not corresponds to a specific real-life gauge.&lt;br /&gt;
&lt;br /&gt;
A train set may define vehicles for gauge &#039;&#039;&#039;n&#039;&#039;&#039; while not defining vehicles for gauge &#039;&#039;&#039;N&#039;&#039;&#039;, but this is likely only useful for sets that are specifically designed to be used along-side other sets, and the used railtype fallbacks should be carefully considered.&lt;br /&gt;
&lt;br /&gt;
=== Speed limit/appearance class [*X**] ===&lt;br /&gt;
The second position in the railtype label defines the speed limit/appearance class. This can be used to provide tracks with different speed limits or appearance variations. The speed limit/appearance class is &#039;&#039;not&#039;&#039; used for trains and a train set should always use the class letter &#039;&#039;&#039;A&#039;&#039;&#039; in this position.&lt;br /&gt;
&lt;br /&gt;
There is no fixed numeric mapping for this class, but speed limits should start at &#039;&#039;&#039;A&#039;&#039;&#039; for the lowest speed limit and progress with &#039;&#039;&#039;B/C/...&#039;&#039;&#039; for higher limits. If you do not want to employ speed limits in your track set, always use the class &#039;&#039;&#039;A&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Additionally this class can also be used to distinguish different track appearances like normal or full width ballast, grass or concrete ground, etc. Train sets must not define vehicles for appearance classes. If you think you have special vehicles that should only run on the appearance class, it is &#039;&#039;not&#039;&#039; appearance but a separate track type/gauge.&lt;br /&gt;
&lt;br /&gt;
=== Axle load class [**X*] ===&lt;br /&gt;
The third position defines the axle weight limit. Heavy trains cannot run on tracks with a low axle weight limit; these trains need more expensive tracks with a higher weight limit. There are five axle load classes &#039;&#039;&#039;A&#039;&#039;&#039; through &#039;&#039;&#039;E&#039;&#039;&#039;. &#039;&#039;&#039;A&#039;&#039;&#039; is for the lowest axle load limit, &#039;&#039;&#039;E&#039;&#039;&#039; for the highest. The exact axle load attached to each class is relative to the track type/gauge and trains in the set. &lt;br /&gt;
&lt;br /&gt;
A train set should set the appropriate axle weight for each train via the railtype label, as to make the set work with track sets that do provide tracks with different weight limits, even if you don&#039;t care about it for your trainset. Ideally, all five standard axle load classes should be used, but a train set may use only some weight classes, as the vehicle rooster might not make it feasible to use all five. The group with the lowest axle weights will get class &#039;&#039;&#039;A&#039;&#039;&#039;, the second lowest class &#039;&#039;&#039;B&#039;&#039;&#039;, etc. up to the group with the highest axle weights which will get class &#039;&#039;&#039;E&#039;&#039;&#039;. If you do not use all classes, try to spread the classes out (don&#039;t use &#039;&#039;&#039;A&#039;&#039;&#039; and &#039;&#039;&#039;B&#039;&#039;&#039; for two classes, but e.g. &#039;&#039;&#039;B&#039;&#039;&#039; and &#039;&#039;&#039;D&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
A track set does not have to provide a dedicated track type for each axle weight limit. A track set that does not provide a dedicated track for each axle load class, must make sure to map all undefined axle load classes to a real railtype using property [[Action0/Railtypes#Alternate_rail_type_labels_.281D.29|1D (NFO)]] or [[NML:Railtypes#Railtype_properties|alternative_railtype_list (NML)]]. This way a train set can rely on all labels for all axle load classes being available. Example: if you only want to provide 2 axle load classes for standard gauge unelectrified with no speed limits, you can map SA&#039;&#039;&#039;A&#039;&#039;&#039;N + SA&#039;&#039;&#039;B&#039;&#039;&#039;N to SA&#039;&#039;&#039;C&#039;&#039;&#039;N and SA&#039;&#039;&#039;D&#039;&#039;&#039;N to SA&#039;&#039;&#039;E&#039;&#039;&#039;N if the cost difference between the two railtypes is high, or SA&#039;&#039;&#039;A&#039;&#039;&#039;N to SA&#039;&#039;&#039;B&#039;&#039;&#039;N and SA&#039;&#039;&#039;C&#039;&#039;&#039;N + SA&#039;&#039;&#039;D&#039;&#039;&#039;N to SA&#039;&#039;&#039;E&#039;&#039;&#039;N if the cost difference is low.&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want to provide any axle load classes in your track set, it doesn&#039;t really matter what axle load class you choose for the track, as you&#039;ll be mapping all other classes to this track anyways. But the lowest or highest class are the obvious choice. Example: if your track set only provides narrow gauge unelectrified track with no speed limits and no axle load limits, you may use NA&#039;&#039;&#039;A&#039;&#039;&#039;N for the track label, and provide NA&#039;&#039;&#039;B&#039;&#039;&#039;N, NA&#039;&#039;&#039;C&#039;&#039;&#039;N, NA&#039;&#039;&#039;D&#039;&#039;&#039;N, NA&#039;&#039;&#039;E&#039;&#039;&#039;N in property [[Action0/Railtypes#Alternate_rail_type_labels_.281D.29|1D (NFO)]] or [[NML:Railtypes#Railtype_properties|alternative_railtype_list (NML)]].&lt;br /&gt;
&lt;br /&gt;
If you need more than five axle load class, you may use lowercase letters for very low axle loads and continue the uppercase letters for very high axle loads. Be advised that your train set may not assume the existence of any other class than &#039;&#039;&#039;A&#039;&#039;&#039; through &#039;&#039;&#039;E&#039;&#039;&#039;, so think about providing appropriate fallbacks in your railtype table. If you make a track set with an extended range, be aware that not all train sets will define trains for these tracks. In general: only do this in case of a train set with a matching track set.&lt;br /&gt;
&lt;br /&gt;
For the lowercase letters, &#039;&#039;&#039;b&#039;&#039;&#039; is lower than &#039;&#039;&#039;a&#039;&#039;&#039;, so for increasing axle load limits: b &amp;lt; a &amp;lt; A &amp;lt; B &amp;lt; C etc.&lt;br /&gt;
&lt;br /&gt;
Note that the axle load classes never map to a specific weight in tonnes. For that reason it does not make sense to add a numeric value for the axle load to the name of a track type or in the extended purchase info of a train. Instead use the relative expressions &#039;very low&#039;, &#039;low&#039;, &#039;medium&#039;, &#039;high&#039; and &#039;very high&#039; or use the class letters directly.&lt;br /&gt;
&lt;br /&gt;
=== Energy source type class [***X] ===&lt;br /&gt;
The last position defines the energy source type class. This is split in generic energy source types like overhead wires and third rail and specialized types like alternating and direct current.&lt;br /&gt;
&lt;br /&gt;
A track set that only uses specialized types, should map the generic types to the most suitable specialized type in the set.&lt;br /&gt;
&lt;br /&gt;
A vehicle set that uses specialized types should define a generic type as fallback, via the railtype table. If such a fallback is omitted, please note that certain vehicles may be unavailable depending on track set loaded.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! !!Generic energy type classes&lt;br /&gt;
|-&lt;br /&gt;
|N ||no electrification&lt;br /&gt;
|-&lt;br /&gt;
|E ||overhead wires/catenary electrification&lt;br /&gt;
|-&lt;br /&gt;
|3 ||3rd rail electrification&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! !!Specialized energy type classes !!Vehicle set fallback&lt;br /&gt;
|-&lt;br /&gt;
|Z ||3rd rail and catenary electrification || 3 or E&lt;br /&gt;
|-&lt;br /&gt;
|4 ||4th rail electrification || 3&lt;br /&gt;
|-&lt;br /&gt;
|Y ||4th rail and catenary electrification || 4 or E&lt;br /&gt;
|-&lt;br /&gt;
|T ||[http://en.wikipedia.org/wiki/Three-phase_AC_railway_electrification three phase AC electrification] || E&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|D ||DC catenary electrification || E&lt;br /&gt;
|-&lt;br /&gt;
|d ||low voltage DC catenary electrification (only when D also used in set) || First A then E&lt;br /&gt;
|-&lt;br /&gt;
|A ||AC catenary electrification || E&lt;br /&gt;
|-&lt;br /&gt;
|a ||low voltage AC catenary electrification (only when A also used in set) || First A then E&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All energy source types are abstractions of real-life types and do not correspond to specific examples used in real-life. For example &#039;&#039;&#039;D&#039;&#039;&#039; and &#039;&#039;&#039;d&#039;&#039;&#039; are treated as two different DC voltage levels, but do not correspond to any specific real-life voltage level used.&lt;br /&gt;
&lt;br /&gt;
A train set may define vehicles for energy source &#039;&#039;&#039;d&#039;&#039;&#039; while not defining vehicles for energy source &#039;&#039;&#039;D&#039;&#039;&#039; (as an example, applies to other energy sources, too), but this is likely only useful for sets that are specifically designed to be used along-side other sets, and the used railtype fallbacks should be carefully considered.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want multi-voltage/current vehicles in your set (i.e. a train that can run on both AC and DC current), you have to define a dedicated railtype for those vehicles. Without the railtype, it&#039;s not possible to define vehicles with this property. If you only have vehicles that can run on either one type of voltage/current or on all types of voltage/current (e.g. a 2-system if you only have &#039;&#039;&#039;A&#039;&#039;&#039; and &#039;&#039;&#039;D&#039;&#039;&#039; tracks, or a 4-system in case of all &#039;&#039;&#039;A&#039;&#039;&#039;, &#039;&#039;&#039;a&#039;&#039;&#039;, &#039;&#039;&#039;D&#039;&#039;&#039; and &#039;&#039;&#039;d&#039;&#039;&#039;), then use the generic class &#039;&#039;&#039;E&#039;&#039;&#039; for vehicles that should be able to run on all different voltage/currents. Also the track set needs to have one at least one railtype with class &#039;&#039;&#039;E&#039;&#039;&#039; defined.&lt;br /&gt;
&lt;br /&gt;
Note that if you want more than one type of multi-voltage/current, you&#039;ll quickly get a combinatory explosion of railtype labels, so plan carefully or do not attempt it. For every different multi-voltage/current vehicle type a dedicated railtype is needed. If you want all possible combinations, then you need to define an additional 8 classes. It is not recommended to make your train/track set this complicated.&lt;br /&gt;
&lt;br /&gt;
Example approach for a 4-system set, with trains that can run on either one or all systems:&lt;br /&gt;
* &#039;&#039;&#039;E&#039;&#039;&#039;: generic catenary-powered electric engines. &amp;quot;universal&amp;quot; [4-system] if any of &#039;&#039;&#039;D&#039;&#039;&#039;/&#039;&#039;&#039;d&#039;&#039;&#039;/&#039;&#039;&#039;A&#039;&#039;&#039;/&#039;&#039;&#039;a&#039;&#039;&#039; are defined.&lt;br /&gt;
* &#039;&#039;&#039;A&#039;&#039;&#039;: generic AC catenary electric engines. 25kV only if &#039;&#039;&#039;a&#039;&#039;&#039; also defined. Vehicle sets should use &#039;&#039;&#039;E&#039;&#039;&#039; as fallback, if defining an engine for &#039;&#039;&#039;A&#039;&#039;&#039;;&lt;br /&gt;
* &#039;&#039;&#039;a&#039;&#039;&#039;: 15kV AC catenary electric engines. Only defined if &#039;&#039;&#039;A&#039;&#039;&#039; also defined. Vehicle sets should use &#039;&#039;&#039;A&#039;&#039;&#039; and &#039;&#039;&#039;E&#039;&#039;&#039; as fallback, if defining an engine for &#039;&#039;&#039;a&#039;&#039;&#039;;&lt;br /&gt;
* &#039;&#039;&#039;D&#039;&#039;&#039;: generic DC catenary electric engines. 3kV if &#039;&#039;&#039;d&#039;&#039;&#039; also defined. Vehicle sets should use &#039;&#039;&#039;E&#039;&#039;&#039; as fallback, if defining an engine for &#039;&#039;&#039;D&#039;&#039;&#039;;&lt;br /&gt;
* &#039;&#039;&#039;d&#039;&#039;&#039;: 1.5kV DC catenary electric engines. Only defined if &#039;&#039;&#039;D&#039;&#039;&#039; also defined. Vehicle sets should use &#039;&#039;&#039;D&#039;&#039;&#039; and &#039;&#039;&#039;E&#039;&#039;&#039; as fallback, if defining an engine for &#039;&#039;&#039;d&#039;&#039;&#039;.&lt;br /&gt;
For a 2-system set, you can simply drop &#039;&#039;&#039;a&#039;&#039;&#039; and &#039;&#039;&#039;d&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Standard labels: RAIL, ELRL, MONO, MGLV ===&lt;br /&gt;
It&#039;s not possible to undefine the standard railtypes RAIL, ELRL, MONO and MGLV. The game will always add those if there are vehicles defined for these track types. As a result, for a track set it&#039;s best not to ignore those standard labels, but rather work with them and define them in the set. If your track set does not have monorail or maglev tracks, there of course is no need to define those. But if your track set defines anything that resembles unelectrified or electrified rail, you should use the RAIL and ELRL labels. Matching labels from the above scheme will then be defined in property [[Action0/Railtypes#Alternate_rail_type_labels_.281D.29|1D (NFO)]] or [[NML:Railtypes#Railtype_properties|alternative_railtype_list (NML)]].&lt;br /&gt;
&lt;br /&gt;
As vehicles from NewGRFs that do not use explicit railtypes will end up on these standard railtypes, you should use RAIL instead of whatever type could be regarded as the most commonly used unelectrified type, ELRL instead of the most commonly used electrified type and so on. The label according to this scheme is then set as an alternate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Summary and notes for track sets ==&lt;br /&gt;
This section summarizes and comments the above for track sets.&lt;br /&gt;
&lt;br /&gt;
; [X***] Track type and gauge class&lt;br /&gt;
* Define at least one track type for every track type/gauge class you want in your set.&lt;br /&gt;
* If you only provide tracks for one type/gauge, consider leaving some free railtypes so a player can load an additional set for some other type.&lt;br /&gt;
; [*X**] Speed limit class&lt;br /&gt;
* Make sure class A is always available, either directly or via an alternate label.&lt;br /&gt;
* Use only class A if you don&#039;t want speed limits;&lt;br /&gt;
* With speed limits, A is the lowest speed limit. Continue with B, C, etc. for increasing speed limits;&lt;br /&gt;
* The speed class can also be used to implement additional eye-candy track types, use letters higher in the alphabet for this.&lt;br /&gt;
; [**X*] Axle load class&lt;br /&gt;
* Always define all classes A through E for every track type class / electrification combination, either:&lt;br /&gt;
** Directly via a real railtype definition;&lt;br /&gt;
** Indirectly via the alternate rail type label list, property [[Action0/Railtypes#Alternate_rail_type_labels_.281D.29|1D (NFO)]] or [[NML:Railtypes#Railtype_properties|alternative_railtype_list (NML)]].&lt;br /&gt;
* Extend the predefined classes only if you also provide a train set that makes use of these.&lt;br /&gt;
; [***X] Energy source type class&lt;br /&gt;
* If your set only uses specialized classes, always map the generic classes to the closest matching specialized type via property 1D.&lt;br /&gt;
* Don&#039;t use specialized sub-types (e.g. d, a) unless you also use the main specialized class (e.g. D, A).&lt;br /&gt;
; Standard labels [RAIL, ELRL, MONO, MGLV]&lt;br /&gt;
* Always re-define the standard labels when possible, instead of what would be the equivalent of the standard label in this scheme.&lt;br /&gt;
* Map the equivalent label(s) from this scheme to the standard labels using property [[Action0/Railtypes#Alternate_rail_type_labels_.281D.29|1D (NFO)]] or [[NML:Railtypes#Railtype_properties|alternative_railtype_list (NML)]].&lt;br /&gt;
; Powered/compatible rail types&lt;br /&gt;
* For the speed limit/appearance class, every type should be powered and compatible with each other.&lt;br /&gt;
* Axle load classes implemented as real railtypes should be powered and compatible in ascending order, i.e. a lower axle load is compatible with a higher axle load, but not vice versa.&lt;br /&gt;
* Different energy sources should be compatible with each other but not powered on each other, expect for multi-system energy source classes.&lt;br /&gt;
* Different track type and gauge classes should be neither powered nor compatible with each other.&lt;br /&gt;
&lt;br /&gt;
Or, put differently, for each type/gauge, select one or more energy source types. For each type/energy combination provide all axle load classes for the speed class &amp;quot;A&amp;quot;, either as a real type or as an alternate of another type. Provide more types with a different speed letter if you want to provide several different speeds or other eye-candy tracks.&lt;br /&gt;
&lt;br /&gt;
== Summary and notes for train sets ==&lt;br /&gt;
This section summarizes and comments the above for train sets.&lt;br /&gt;
&lt;br /&gt;
; [X***] Track type and gauge class&lt;br /&gt;
* Use the track type class that matches the vehicle;&lt;br /&gt;
* Define a fallback type via the railtype table in case you want the vehicle to be available on a different track if no matching track set is loaded.&lt;br /&gt;
** Specialized subtypes like &amp;quot;n&amp;quot; might not always be available. If you want those vehicles to be still available then, fall back the the generic class (e.g. &amp;quot;N&amp;quot;).&lt;br /&gt;
** Think about your set design and how for example standard gauge and narrow gauge vehicles differ to decide if a fallback from narrow gauge to standard gauge has gameplay meaning.&lt;br /&gt;
; [*X**] Speed limit class &lt;br /&gt;
* Always use class A for every vehicle.&lt;br /&gt;
; [**X*] Axle load class&lt;br /&gt;
* Use all classes A through E according to the maximum axle weight of the vehicle.&lt;br /&gt;
* Extend the predefined classes only if you also provide a track set that makes use of these;&lt;br /&gt;
** When extending the predefined classes A through E, define a fallback type via the railtype table in case you want the vehicle to be available if no matching track set is loaded.&lt;br /&gt;
; [***X] Energy source type class&lt;br /&gt;
* Use the energy source type class that matches the vehicle;&lt;br /&gt;
* When using specialized classes, define a fallback type via the railtype table in case you want the vehicle to be available if no matching track set is loaded.&lt;br /&gt;
; Standard labels [RAIL, ELRL, MONO, MGLV]&lt;br /&gt;
* Define a fallback type to the standard labels via the railtype table in case you want the vehicle to be available on the standard tracks if no matching track set is loaded. This is a decision you need to make depending on the design of your train set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be as specific as you want when selecting the railtype, it is the job of the track set to select a playable, reduced subset out of all possible type combinations. This can mean that some vehicles may not appear with some set combinations, but if a player does not want to have e.g. narrow gauge tracks, they might not want  narrow gauge vehicles either.&lt;br /&gt;
&lt;br /&gt;
== In case you&#039;re not convinced by this scheme ==&lt;br /&gt;
Adopting this scheme gives the player freedom to use any track set in combination with any train set that follow the scheme. &lt;br /&gt;
&lt;br /&gt;
This means that you can make your train set compatible with track sets that provide axle load classes, and track sets that provide speed limits, and at the same time with track sets that provide none of this. This way, the player can decide to play with or without axle load classes, or with or without speed limits, simply by loading a track set that does or does not provide these features.&lt;br /&gt;
&lt;br /&gt;
And for your track set, it means that you can make it as simple or as complicated as you want (within the 64 track type limit), while not having to worry about compatibility with train sets.&lt;br /&gt;
&lt;br /&gt;
Still not convinced? Feel free to use railtype labels of your own, but know that you will likely come to regret that at some point in the future.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Forum topic==&lt;br /&gt;
If you want to discuss the standardized railtype scheme or have any questions about it, you can visit [http://www.tt-forums.net/viewtopic.php?t=59379 the forum topic].&lt;br /&gt;
&lt;br /&gt;
==Extensions and best practice==&lt;br /&gt;
See [https://newgrf-specs.tt-wiki.net/wiki/Standardized_Railtype_Scheme_extensions Standardized Railtype Scheme extensions]&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=CargoTypes&amp;diff=4914</id>
		<title>CargoTypes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=CargoTypes&amp;diff=4914"/>
		<updated>2025-01-07T07:30:43Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* Cargo Labels */  typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Cargo labels in OpenTTD&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{grfFrom|8}} In GRF version 8 the value to be used in all vehicle and industry properties, and in [[Action3|action 3]], is the position of the cargo label in the [[Action0/Global_Settings#Cargo_translation_table_.2809.29|cargo translation table]] included in the GRF.&lt;br /&gt;
&lt;br /&gt;
{{grfTill|7}} GRF version 7 and below used different cargo properties for different properties (called &amp;quot;Type A&amp;quot; or &amp;quot;translated&amp;quot; and &amp;quot;Type B&amp;quot; or &amp;quot;untranslated&amp;quot; cargo slots), for historical reasons.  This method is deprecated as it meant relying solely on cargos always using the same slots.  You can see the table of Type A and Type B slots [http://newgrf-specs.tt-wiki.net/index.php?title=CargoTypes&amp;amp;oldid=2861 here] if you really want to.&lt;br /&gt;
&lt;br /&gt;
{{ottd|15.0}} Since 15.0, a default cargo translation table corresponding to the climate (see [[CargoDefaultProps]]) is used if one is not provided.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{grfFrom|8}} In GRF version 8, the default translation table is 32 entries long and maps &amp;quot;Type B&amp;quot; slots to each cargo label.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{grfTill|7}} In GRF version 7, the default translation table is 12 entries long and uses &amp;quot;Type A&amp;quot; slots to each cargo label.&amp;lt;br/&amp;gt;&lt;br /&gt;
The default translation table works just like a GRF provided table: If a cargo label is redefined in a different slot this is correctly translated, and if the cargo label is replaced the cargo type is mapped to invalid.&lt;br /&gt;
&lt;br /&gt;
== Cargo Labels ==&lt;br /&gt;
&lt;br /&gt;
The following cargo labels have been defined so far:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Label&lt;br /&gt;
! Cargo Description&lt;br /&gt;
! [[Action0Cargos#CargoClasses_.2816.29|Cargo classes]]&lt;br /&gt;
! colspan=&amp;quot;7&amp;quot; | Usage&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Basic Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;9&amp;quot; | These cargos are present when no NewGRF is used, or in some common Industry NewGRFs&lt;br /&gt;
|-&lt;br /&gt;
| PASS&lt;br /&gt;
| Passengers&lt;br /&gt;
| 0001 Passengers&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| COAL&lt;br /&gt;
| Coal&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| MAIL&lt;br /&gt;
| Mail&lt;br /&gt;
| 0002 Mail&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| OIL_&lt;br /&gt;
| Oil&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| LVST&lt;br /&gt;
| Livestock&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| GOOD&lt;br /&gt;
| Goods&lt;br /&gt;
| 0004 Express&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| GRAI&lt;br /&gt;
| Grain&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| Temperate; see also WHEA, MAIZ, CERE. YETI &amp;amp; OTIS: 0210 Covered, bulk&lt;br /&gt;
|-&lt;br /&gt;
| WOOD&lt;br /&gt;
| Wood&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| Named Logs in some industry sets (2TT)&lt;br /&gt;
|-&lt;br /&gt;
| IORE&lt;br /&gt;
| Iron Ore&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STEL&lt;br /&gt;
| Steel&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| YETI: Renamed &amp;quot;Balls of Steel&amp;quot;, OTIS: Renamed &amp;quot;Metal&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| VALU&lt;br /&gt;
| Valuables&lt;br /&gt;
| 0008 Armoured&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Temperate; see also GOLD, DIAM&lt;br /&gt;
|-&lt;br /&gt;
| PAPR&lt;br /&gt;
| Paper&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: 0220 Covered, piece goods&lt;br /&gt;
|-&lt;br /&gt;
| WHEA&lt;br /&gt;
| Wheat&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Arctic; see also GRAI, MAIZ, CERE&lt;br /&gt;
|-&lt;br /&gt;
| FOOD&lt;br /&gt;
| Food&lt;br /&gt;
| 0084 Express, refrigerated&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| YETI: 00A0 Refrigerated, piece goods&lt;br /&gt;
|-&lt;br /&gt;
| GOLD&lt;br /&gt;
| Gold&lt;br /&gt;
| 0008 Armoured&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Arctic; see also VALU, DIAM&lt;br /&gt;
|-&lt;br /&gt;
| RUBR&lt;br /&gt;
| Rubber&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| FRUT&lt;br /&gt;
| Fruit&lt;br /&gt;
| 0090 Bulk, refrigerated&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS: 00A4 Express, piece goods, refrigerated, YETI: 00A0 Piece goods, covered.&lt;br /&gt;
|-&lt;br /&gt;
| MAIZ&lt;br /&gt;
| Maize&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Tropic; see also GRAI, WHEA, CERE. OTIS: Renamed &amp;quot;Animal Feed&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| CORE&lt;br /&gt;
| Copper Ore&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| WATR&lt;br /&gt;
| Water&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| OTIS: 0044 Express, liquid&lt;br /&gt;
|-&lt;br /&gt;
| DIAM&lt;br /&gt;
| Diamonds&lt;br /&gt;
| 0008 Armoured&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Tropic; see also VALU, GOLD&lt;br /&gt;
|-&lt;br /&gt;
| SUGR&lt;br /&gt;
| Sugar&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| AORE&lt;br /&gt;
| Bauxite (Aluminium ore)&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| BDMT&lt;br /&gt;
| Building Materials&lt;br /&gt;
| 0220 Piece goods, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS: 0030 Bulk, piece goods. YETI: 0020 Piece goods.&lt;br /&gt;
|-&lt;br /&gt;
| BEAN&lt;br /&gt;
| Beans&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| CZIS renamed to Potatoes&lt;br /&gt;
|-&lt;br /&gt;
| BEER&lt;br /&gt;
| Alcohol&lt;br /&gt;
| 0064 Express, piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| BOOM&lt;br /&gt;
| Explosives&lt;br /&gt;
| 0024 Express, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| OTIS: 0124 Express, Piece goods, hazardous &lt;br /&gt;
|-&lt;br /&gt;
| BRCK&lt;br /&gt;
| Bricks&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CBLK&lt;br /&gt;
| Carbon Black&lt;br /&gt;
| 0230 Piece goods, bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CERA&lt;br /&gt;
| Ceramics&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CERE&lt;br /&gt;
| Cereals&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CLAY&lt;br /&gt;
| Clay&lt;br /&gt;
| 0210 Bulk covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CMNT&lt;br /&gt;
| Cement&lt;br /&gt;
| 0210 Bulk covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| COPR&lt;br /&gt;
| Copper&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CSTI&lt;br /&gt;
| Cast Iron&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CTAR&lt;br /&gt;
| Coal Tar&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| DYES&lt;br /&gt;
| Dyes&lt;br /&gt;
| 0060 Piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ENSP&lt;br /&gt;
| Engineering Supplies&lt;br /&gt;
| 0024 Express, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| 2TT Industries of the Caribbean: named Machinery&lt;br /&gt;
|-&lt;br /&gt;
| FECR&lt;br /&gt;
| Ferrochrome&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| FERT&lt;br /&gt;
| Fertiliser&lt;br /&gt;
| 0030 Bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| OTIS: 0034 Express, piece goods, bulk. XIS: 0230 Covered, piece goods, bulk. ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| FICR&lt;br /&gt;
| Fibre crops&lt;br /&gt;
| 0030 Bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| OTIS: 0230 Piece goods, bulk, covered/sheltered, renamed &amp;quot;Cotton&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| FISH&lt;br /&gt;
| Fish&lt;br /&gt;
| 0084 Express, refrigerated&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| FMSP&lt;br /&gt;
| Farm Supplies&lt;br /&gt;
| 0024 Express, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| GLAS&lt;br /&gt;
| Glass&lt;br /&gt;
| 0420 Piece goods, oversized&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: 0410 Piece goods, bulk&lt;br /&gt;
|-&lt;br /&gt;
| GRVL&lt;br /&gt;
| Stone&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| Renamed from &amp;quot;Gravel / Ballast&amp;quot; XIS: Renamed &amp;quot;Aggregate&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| JAVA&lt;br /&gt;
| Coffee&lt;br /&gt;
| 0024 Piece goods, express&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| KAOL&lt;br /&gt;
| Kaolin (China Clay)&lt;br /&gt;
| 0250 Bulk, liquids, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS: Renamed &amp;quot;Lithium&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| LIME&lt;br /&gt;
| Lime stone&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| MILK&lt;br /&gt;
| Milk&lt;br /&gt;
| 00C4 Express, liquid, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| OLSD&lt;br /&gt;
| Oil seed&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PEAT&lt;br /&gt;
| Peat&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Biomass&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| PETR&lt;br /&gt;
| Petrol / Fuel Oil&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: 0130 Hazardous, liquid&lt;br /&gt;
|-&lt;br /&gt;
| PHOS&lt;br /&gt;
| Phosphate&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Oil sands&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| PLAS&lt;br /&gt;
| Plastic&lt;br /&gt;
| 0060 Piece goods, liquid&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| PORE&lt;br /&gt;
| Pyrite Ore&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Zinc ore&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| POTA&lt;br /&gt;
| Potash&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| RFPR&lt;br /&gt;
| Refined products&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: renamed &amp;quot;Sewage&amp;quot;, XIS: renamed &amp;quot;Petrochemicals&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| SAND&lt;br /&gt;
| Sand&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SCMT&lt;br /&gt;
| Scrap Metal&lt;br /&gt;
| 1010 Bulk, non-pourable&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: Renamed &amp;quot;Waste/Garbage&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| SULP&lt;br /&gt;
| Sulphur&lt;br /&gt;
| 0250 Bulk, liquid, covered/sheltered.&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| ECS: 0210 Bulk, covered/sheltered &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot;&amp;gt;ECS cargo classes changed as of Dec 31, 2010&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| TOUR&lt;br /&gt;
| Tourists&lt;br /&gt;
| 0005 Passengers, express&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| ECS; see also OTI2&lt;br /&gt;
|-&lt;br /&gt;
| TYRE&lt;br /&gt;
| Tyres&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| URAN&lt;br /&gt;
| Uranium&lt;br /&gt;
| 0110 Bulk, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| 2TT: Piece goods, hazardous&lt;br /&gt;
|-&lt;br /&gt;
| VEHI&lt;br /&gt;
| Vehicles&lt;br /&gt;
| 0420 Piece goods, oversized&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS: 0020 Piece goods. OTIS: 0020 Piece goods, renamed &amp;quot;Cars&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| WDPR&lt;br /&gt;
| Wood Products&lt;br /&gt;
| 0030 Bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS &amp;amp; OTIS: Renamed &amp;quot;Timber&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| WOOL&lt;br /&gt;
| Wool&lt;br /&gt;
| 0220 Piece goods, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ZINC&lt;br /&gt;
| Zinc&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Extended Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;9&amp;quot; | these cargos are only present in rare/specialized situations&lt;br /&gt;
|-&lt;br /&gt;
| ACID&lt;br /&gt;
| Acid&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ALUM&lt;br /&gt;
| Aluminium&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| See also METL&lt;br /&gt;
|-&lt;br /&gt;
| BAKE&lt;br /&gt;
| Flour&lt;br /&gt;
| 0A30 Bulk, powderized, piece goods, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CASS&lt;br /&gt;
| Cassava&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CHLO&lt;br /&gt;
| Chlorine&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CHSE&lt;br /&gt;
| Cheese&lt;br /&gt;
| 00C4 Express, liquid, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CIGR&lt;br /&gt;
| Cigars&lt;br /&gt;
| 0024 Piece goods, express&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| COAT&lt;br /&gt;
| Paints &amp;amp; Coatings&lt;br /&gt;
| 0060 Piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| 2TT Lumberjack Industries: renamed Varnish&lt;br /&gt;
|-&lt;br /&gt;
| COBL&lt;br /&gt;
| Cobalt&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| COKE&lt;br /&gt;
| Coke&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ELTR&lt;br /&gt;
| Electricity&lt;br /&gt;
| 8000 Special&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|CZIS uses its own labels... see ELEC and NODC&lt;br /&gt;
|-&lt;br /&gt;
| EOIL&lt;br /&gt;
| Edible Oil&lt;br /&gt;
| 0060 Piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| FRVG&lt;br /&gt;
| Fruit (and optionally Vegetables)&lt;br /&gt;
| 00A4 Express, piece goods, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| See also FRUT&lt;br /&gt;
|-&lt;br /&gt;
| FUEL&lt;br /&gt;
| Natural Gas&lt;br /&gt;
| 0140 Liquid, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Use PETR for refined-oil fuel&lt;br /&gt;
|-&lt;br /&gt;
| FURN&lt;br /&gt;
| Furniture&lt;br /&gt;
| 0230 Piece goods, bulk, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| IRON&lt;br /&gt;
| Pig Iron&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| LYE_&lt;br /&gt;
| Sodium Hydroxide (Lye)&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| MEAT&lt;br /&gt;
| Meat&lt;br /&gt;
| 00A4 Express, piece goods, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| METL&lt;br /&gt;
| Metal&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Aluminium&amp;quot;; See also ALUM&lt;br /&gt;
|-&lt;br /&gt;
| MNO2&lt;br /&gt;
| Manganese&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| MNSP&lt;br /&gt;
| Manufacturing Supplies&lt;br /&gt;
| 0024 Piece goods, express&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Packaging&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| MOLS&lt;br /&gt;
| Molasses&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| MPTS&lt;br /&gt;
| Machine parts&lt;br /&gt;
| 0220 Covered, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NH3_&lt;br /&gt;
| Ammonia&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NHNO&lt;br /&gt;
| [https://en.wikipedia.org/wiki/Ammonium_nitrate NH4NO3 chemical]&lt;br /&gt;
| 0130 Hazardous, bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NUTS&lt;br /&gt;
| Nuts&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NICK&lt;br /&gt;
| Nickel&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NITR&lt;br /&gt;
| Nitrate&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NKOR&lt;br /&gt;
| Nickel ore&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| OTIS: Renamed &amp;quot;Nickel&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| NUKF&lt;br /&gt;
| Nuclear fuel&lt;br /&gt;
| Piece goods, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Improved Town Industries&lt;br /&gt;
|-&lt;br /&gt;
| NUKW&lt;br /&gt;
| Nuclear waste&lt;br /&gt;
| Piece goods, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Improved Town Industries&lt;br /&gt;
|-&lt;br /&gt;
| OILI&lt;br /&gt;
| Oil (imported)&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| OILD&lt;br /&gt;
| Oil (domestic)&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| OTI1&lt;br /&gt;
| Workers&lt;br /&gt;
| 0001 Passengers&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| OTI2&lt;br /&gt;
| Tourists&lt;br /&gt;
| 0001 Passengers&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| OYST&lt;br /&gt;
| Oysters&lt;br /&gt;
| 00A4 Express, piece goods, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| O2__&lt;br /&gt;
| Oxygen&lt;br /&gt;
| 0040 Liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| PACK&lt;br /&gt;
| Packaging&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|Packaging used mostly for food production.&lt;br /&gt;
|-&lt;br /&gt;
| PCL_&lt;br /&gt;
| Parcels&lt;br /&gt;
| 0006 Express, mail&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| PIPE&lt;br /&gt;
| Pipe&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| POWR&lt;br /&gt;
| Electrical Parts&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: 0220 Covered, piece goods, renamed &amp;quot;Electrical Machines&amp;quot;. XIS and CZIS: Renamed &amp;quot;Electrical Machines&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| QLME&lt;br /&gt;
| Quicklime&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| RCYC&lt;br /&gt;
| Recyclables&lt;br /&gt;
| 0030 Bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SALT&lt;br /&gt;
| Salt&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SASH&lt;br /&gt;
| Soda Ash&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SEED&lt;br /&gt;
| Seed&lt;br /&gt;
| 0230 Piece goods, bulk, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SESP&lt;br /&gt;
| Marine Supplies&lt;br /&gt;
| 0024 Express, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SGBT&lt;br /&gt;
| Sugar beet&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| not in tropical&lt;br /&gt;
|-&lt;br /&gt;
| SGCN&lt;br /&gt;
| Sugarcane&lt;br /&gt;
| 1010 Bulk, non-pourable&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| only tropical&lt;br /&gt;
|-&lt;br /&gt;
| SLAG&lt;br /&gt;
| Slag&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SOAP&lt;br /&gt;
| Cleaning Agents&lt;br /&gt;
| 0060 Piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STAL&lt;br /&gt;
| Alloy Steel&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STCB&lt;br /&gt;
| Carbon Steel&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STSE&lt;br /&gt;
| Steel Sections&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STSH&lt;br /&gt;
| Steel Sheet&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STST&lt;br /&gt;
| Stainless Steel&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STWR&lt;br /&gt;
| Steel Wire Rod&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| TATO&lt;br /&gt;
| Potatoes&lt;br /&gt;
| 00A4 Express, piece goods, refrigerated&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| CZIS uses renamed Beans&lt;br /&gt;
|-&lt;br /&gt;
| TEXT&lt;br /&gt;
| Textile&lt;br /&gt;
| 0220 Piece goods, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| TBCO&lt;br /&gt;
| Tobacco&lt;br /&gt;
| 1010 Bulk, non-pourable&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| TWOD&lt;br /&gt;
| Tropic Wood&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| formerly intended as a default cargo&lt;br /&gt;
|-&lt;br /&gt;
| VBOD&lt;br /&gt;
| Vehicle bodies&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| VENG&lt;br /&gt;
| Vehicle Engines&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| VPTS&lt;br /&gt;
| Vehicle Parts&lt;br /&gt;
| 0024 Piece goods, express&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS: 0020 Piece goods, renamed &amp;quot;Parts&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| WSTE&lt;br /&gt;
| Waste&lt;br /&gt;
| 0230 Piece goods, bulk, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Used by Improved Town Industries.&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Fantasy Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;9&amp;quot; | these cargos are for use in fantasy or science fiction settings&lt;br /&gt;
|-&lt;br /&gt;
| BATT&lt;br /&gt;
| Batteries&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| BUBL&lt;br /&gt;
| Bubbles&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| COLA&lt;br /&gt;
| Cola&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| CTCD&lt;br /&gt;
| Cotton Candy (Candyfloss)&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| FZDR&lt;br /&gt;
| Fizzy Drinks&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| PLST&lt;br /&gt;
| Plastic&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland; see also PLAS&lt;br /&gt;
|-&lt;br /&gt;
| SWET&lt;br /&gt;
| Sweets (Candy)&lt;br /&gt;
| 0004 Express&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| TOFF&lt;br /&gt;
| Toffee&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| TOYS&lt;br /&gt;
| Toys&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| YETI&lt;br /&gt;
| Workers, YETI dudes&lt;br /&gt;
| 0404 Express, oversized&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| YETY&lt;br /&gt;
| Tired Workers, Tired YETI dudes&lt;br /&gt;
| 0404 Express, oversized&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ELEC&lt;br /&gt;
| Charged Batteries (electricity from PP)&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| Used as means of electricity transportation.&lt;br /&gt;
|-&lt;br /&gt;
| NODC&lt;br /&gt;
| Uncharged Batteries (return of batteries) aka No Direct Current&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|Used as means of electricity transportation.&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Special Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;9&amp;quot; | these cargos are for use outside industry sets and do not represent transporting anything&lt;br /&gt;
|-&lt;br /&gt;
| GEAR&lt;br /&gt;
| Locomotive regearing&lt;br /&gt;
| 8000 Special&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Using this cargo may make your vehicle set incompatible with some industry sets&lt;br /&gt;
use CB36 instead to set capacity to 0&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Deprecated Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;9&amp;quot; | these cargos are not used by any current industry set, and are listed here for backwards compatibility&lt;br /&gt;
|-&lt;br /&gt;
| RSGR&lt;br /&gt;
| Raw Sugar&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Deprecated see SGBT and SGCN&lt;br /&gt;
|-&lt;br /&gt;
| SCRP&lt;br /&gt;
| Scrap Metal&lt;br /&gt;
| 0010 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Deprecated see SCMT instead&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An overview of FIRS cargos is available [https://grf.farm/firs/code_reference_latest.html here] for the latest version.  Please don&#039;t add FIRS labels here, as they have a history of being outdated or wrong, which is unhelpful to other grf authors.  Thanks.&lt;br /&gt;
&lt;br /&gt;
If you write or publish a NewGRF which introduces a new cargo label, please also add a comment where the new label is used.&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Cargos&amp;diff=4912</id>
		<title>NML:Cargos</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Cargos&amp;diff=4912"/>
		<updated>2025-01-05T20:01:42Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* Cargo classes */ - don&amp;#039;t imply that bitmask(CC_EXPRESS, CC_REFRIGERATED) can be assumed to be food, that just adds to existing confusions.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
==Cargo IDs==&lt;br /&gt;
For cargos, the item ID corresponds to the cargo type slot of the cargo. TTD default cargos occupy slots 0-11, so if you want to define a new cargo be sure to set this ID to 12 or higher. It is recommended to set the &#039;number&#039;-property to the same value as the item ID.&lt;br /&gt;
&lt;br /&gt;
==Cargo properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| number&lt;br /&gt;
| 0..63&lt;br /&gt;
| Number of the cargo for bitmasks. Prior to {{ottd|1.9}} this was clamped to 0..31. This mostly affects old NewGRFs that don&#039;t have a cargo translation table.&lt;br /&gt;
|-&lt;br /&gt;
| type_name&lt;br /&gt;
| string&lt;br /&gt;
| String to use as cargo type name. Example: &amp;quot;Passengers&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_CARGO_PLURAL_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| unit_name&lt;br /&gt;
| string&lt;br /&gt;
| String to use for the name of one unit from the cargo type. Currently used for subsidies only (First Passenger service to..). Example string: &amp;quot;Passenger&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_CARGO_SINGULAR_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| units_of_cargo&lt;br /&gt;
| string&lt;br /&gt;
| String used to show the &amp;quot;short cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 tonnes&amp;quot; or &amp;quot;20.000 litres&amp;quot;. Example: &amp;quot;{COMMA} item{P &amp;quot;&amp;quot; s}&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_PASSENGERS and further), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| items_of_cargo&lt;br /&gt;
| string&lt;br /&gt;
| String used to show the &amp;quot;long cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 tonnes of coal&amp;quot; or &amp;quot;20.000 litres of water&amp;quot;. Example: &amp;quot;{COMMA} item{P &amp;quot;&amp;quot; s} of livestock&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_QUANTITY_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| type_abbreviation&lt;br /&gt;
| string&lt;br /&gt;
| String used for the two-letter cargo type abbreviation. Must start with a {TINYFONT} string-code. Example: &amp;quot;{TINYFONT}XX&amp;quot;. Make sure to avoid multiple cargos having the same abbreviation. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_ABBREV_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| sprite&lt;br /&gt;
| sprite&lt;br /&gt;
| TTD sprite number for the icon of the cargo. Alternatively, set to NEW_CARGO_SPRITE and use a graphics block to define a custom sprite.&lt;br /&gt;
|-&lt;br /&gt;
| weight&lt;br /&gt;
| float 0..255&lt;br /&gt;
| Weight of one unit of the cargo (in tons)&lt;br /&gt;
|-&lt;br /&gt;
| penalty_lowerbound&lt;br /&gt;
| 0..255&lt;br /&gt;
| Delivery time until penalty is applied. The units depend on the vehicle used (see vehicle property &#039;cargo_age_period&#039;), by default 1 unit = 2.5 days.&lt;br /&gt;
|-&lt;br /&gt;
| single_penalty_length&lt;br /&gt;
| 0..255&lt;br /&gt;
| Length of the interval where a single penalty is applied&lt;br /&gt;
|-&lt;br /&gt;
| price_factor&lt;br /&gt;
| float&lt;br /&gt;
| Payment for delivering 10 units of cargo across a distance of 20 squares (in British Pounds), when delivering in less than &#039;penalty_lowerbound&#039; time (no time penalty).&lt;br /&gt;
|-&lt;br /&gt;
| station_list_colour&lt;br /&gt;
| 0..255&lt;br /&gt;
|&lt;br /&gt;
Colour for the station list window (index from the [[NML:Graphic files|default (DOS) palette]])&lt;br /&gt;
|-&lt;br /&gt;
| cargo_payment_list_colour&lt;br /&gt;
| 0..255&lt;br /&gt;
|&lt;br /&gt;
Colour for the cargo payment list window (index from the [[NML:Graphic files|default (DOS) palette]])&lt;br /&gt;
|-&lt;br /&gt;
| is_freight&lt;br /&gt;
| 0 or 1&lt;br /&gt;
| Freight status (for the freighttrains switch); 0=not freight, 1=is freight&lt;br /&gt;
|-&lt;br /&gt;
| cargo_classes&lt;br /&gt;
|&lt;br /&gt;
bitmask([[#Cargo classes|cargo classes]])&lt;br /&gt;
| Cargo classes&lt;br /&gt;
|-&lt;br /&gt;
| cargo_label&lt;br /&gt;
| 4 letters&lt;br /&gt;
| [[CargoTypes|Cargo label]], as used in the [[NML:Cargotable|cargo table]]&lt;br /&gt;
|-&lt;br /&gt;
| town_growth_effect&lt;br /&gt;
| TOWNGROWTH_XXX&lt;br /&gt;
|&lt;br /&gt;
Effect for town growth, see [[#Cargo effects on town growth|Cargo effects on town growth]]&lt;br /&gt;
|-&lt;br /&gt;
| town_growth_multiplier&lt;br /&gt;
| float 0..255&lt;br /&gt;
| {{ottd|no}} Multiplier for town growth. To be used in conjuction with town_growth_effect, when that is not TOWNGROWTH_NONE. For example, a value of 4 makes your cargo have the same effect on town growth as 4 units of food/goods/etc.&lt;br /&gt;
|-&lt;br /&gt;
| callback_flags&lt;br /&gt;
| bitmask(flags)&lt;br /&gt;
|&lt;br /&gt;
Do not set this, unless you use [[NML:Old style callbacks|old-style callbacks]].&lt;br /&gt;
|-&lt;br /&gt;
| capacity_multiplier&lt;br /&gt;
| float 0 .. 255&lt;br /&gt;
| {{ottd|1.2|r22860}} This defines the capacity of vehicles carrying this cargo type, if the vehicle sets no specific capacity to this specific cargo type. Set this property to the amount of cargo a vehicle shall carry, which can carry 1 ton of coal or 1000 thousand litres of water (whatever comparison is more suitable for your cargotype). Depending on whether your cargo type is light or heavy you should set this property either comparing the weight or the volume. Default values are 4 for passengers, 2 for mail, goods and sweets and 1 for all other cargos.&lt;br /&gt;
|-&lt;br /&gt;
| town_production_effect&lt;br /&gt;
| TOWNPRODUCTION_XXX&lt;br /&gt;
| {{ottdp|14.0|no}} Effect for town production, see [[#Town production effect|Town production effect]]&lt;br /&gt;
|-&lt;br /&gt;
| town_production_multiplier&lt;br /&gt;
| float 0..255&lt;br /&gt;
| {{ottdp|14.0|no}} Multiplier for town production, to be used in conjunction with town_production_effect, when that is not TOWNPRODUCTION_NONE. For example, a value of 4 makes a town produce 4 times as much cargo as normal.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Cargo payment is computed from &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;price_factor&amp;lt;/code&amp;gt;, amount of cargo transported, distance, and a time delivery factor. Unit of the delivery time is 185 ticks, roughly 2.5 days. The factor is constant (with value 255) if delivery time is less than &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;penalty_lowerbound&amp;lt;/code&amp;gt;. It goes down with rate 1 between &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;penalty_lowerbound + single_penalty_length&amp;lt;/code&amp;gt;, and goes down with rate 2 if the delivery time is even longer. Time delivery factor is never less than 31.&lt;br /&gt;
&lt;br /&gt;
===Cargo classes===&lt;br /&gt;
&lt;br /&gt;
Available cargo classes are listed in the following table. Cargos may be in more than one class. Cargo classes are always used as a bitmask, use the built-in function &amp;lt;code&amp;gt;bitmask()&amp;lt;/code&amp;gt;. For example, &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(CC_EXPRESS, CC_REFRIGERATED)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The history of cargo classes is complex, and the meanings here may not be consistent with how classes are actually used by some grfs.&lt;br /&gt;
&lt;br /&gt;
FIRS and Iron Horse do not conform to the classes here, and use the FRAX Cargo Class Scheme, please see: https://grf.farm/polar_fox/frax_latest.html&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! type of cargo&lt;br /&gt;
|-&lt;br /&gt;
| CC_PASSENGERS&lt;br /&gt;
| passengers, also tourists (ECS)&lt;br /&gt;
|-&lt;br /&gt;
| CC_MAIL&lt;br /&gt;
| mail&lt;br /&gt;
|-&lt;br /&gt;
| CC_EXPRESS&lt;br /&gt;
| express goods, also tourists (ECS)&lt;br /&gt;
|-&lt;br /&gt;
| CC_ARMOURED&lt;br /&gt;
| valuables, diamonds, gold and alike&lt;br /&gt;
|-&lt;br /&gt;
| CC_BULK&lt;br /&gt;
| coal, ore, grain,...&lt;br /&gt;
|-&lt;br /&gt;
| CC_PIECE_GOODS&lt;br /&gt;
| containers, crates, livestock&lt;br /&gt;
|-&lt;br /&gt;
| CC_LIQUID&lt;br /&gt;
| oil, milk, water, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_REFRIGERATED&lt;br /&gt;
| food, milk, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_HAZARDOUS&lt;br /&gt;
| chemicals?, uranium, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_COVERED&lt;br /&gt;
| grain, cement, fruit, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_OVERSIZED&lt;br /&gt;
| vehicles, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_POWDERIZED&lt;br /&gt;
| cement, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_NON_POURABLE&amp;lt;br&amp;gt;CC_NEO_BULK&lt;br /&gt;
| sugar cane, wool or straw bales, ... (these are synonyms for cargos that are bulk, but can&#039;t be handled in e.g. hoppers)&lt;br /&gt;
|-&lt;br /&gt;
| CC_POTABLE&lt;br /&gt;
| exclude from non-food-grade vehicles&lt;br /&gt;
|-&lt;br /&gt;
| CC_NON_POTABLE&lt;br /&gt;
| exclude from food-grade vehicles&lt;br /&gt;
|-&lt;br /&gt;
| CC_SPECIAL&lt;br /&gt;
| Deprecated, do not set.&lt;br /&gt;
|-&lt;br /&gt;
| NO_CARGO_CLASS&lt;br /&gt;
| Special value that you can used to instead of 0.&lt;br /&gt;
|-&lt;br /&gt;
| ALL_NORMAL_CARGO_CLASSES&lt;br /&gt;
| Bitmask of all cargo classes except CC_SPECIAL. This is the same as &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(CC_PASSENGERS, CC_MAIL, ..., CC_OVERSIZED)&amp;lt;/code&amp;gt;. Note: This is already a bitmask, don&#039;t use the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(..)&amp;lt;/code&amp;gt; function with this.&lt;br /&gt;
|-&lt;br /&gt;
| ALL_CARGO_CLASSES&lt;br /&gt;
| Bitmask of all cargo classes. Same as &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;ALL_NORMAL_CARGO_CLASSES | bitmask(CC_SPECIAL)&amp;lt;/code&amp;gt; Note: This is already a bitmask, don&#039;t use the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(..)&amp;lt;/code&amp;gt; function with this.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Cargo effects on town growth===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! value&lt;br /&gt;
! effect&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_PASSENGERS&lt;br /&gt;
| Affect towns as passengers do&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_MAIL&lt;br /&gt;
| Affect towns as mail does&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_GOODS&lt;br /&gt;
| Affect towns as goods/candy does&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_WATER&lt;br /&gt;
| Affect towns as water does (second required cargo for towngrowth in the desert)&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_FOOD&lt;br /&gt;
| Affect towns as food/fizzy drinks do (first required cargo for towngrowth in desert/above snowline)&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_NONE&lt;br /&gt;
| Don&#039;t affect town growth (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If no cargos in the game are defined as TOWNGROWTH_FOOD, towns above the snowline will not require food to grow. If no cargos in the game are defined as TOWNGROWTH_FOOD or TOWNGROWTH_WATER, towns in desert will not require food or water to grow. This can be used positively for gameplay purposes, and is otherwise worth being aware of as an unintended side effect when designing cargos.&lt;br /&gt;
&lt;br /&gt;
There are some additional effects of these flags on subsidies and town cargo transport statistics.  See the nfo docs for details: https://newgrf-specs.tt-wiki.net/wiki/Action0/Cargos#Substitute_type_and_multiplier_for_town_growth_.2818.2C_19.29&lt;br /&gt;
&lt;br /&gt;
===Town production effect===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! value&lt;br /&gt;
! effect&lt;br /&gt;
|-&lt;br /&gt;
| TOWNPRODUCTION_PASSENGERS&lt;br /&gt;
| Town produces cargo as like passengers&lt;br /&gt;
|-&lt;br /&gt;
| TOWNPRODUCTION_MAIL&lt;br /&gt;
| Town produces cargo as like mail&lt;br /&gt;
|-&lt;br /&gt;
| TOWNPRODUCTION_NONE&lt;br /&gt;
| Town does not produce cargo (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Cargo variables==&lt;br /&gt;
&lt;br /&gt;
Cargos have no variables (yet).&lt;br /&gt;
&lt;br /&gt;
==Cargo callbacks==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! callback&lt;br /&gt;
! return value&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| default&lt;br /&gt;
| Sprite set (with 1 sprite)&lt;br /&gt;
| Graphics for the cargo icon (only if property &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;sprite&amp;lt;/code&amp;gt; is set to NEW_CARGO_SPRITE)&lt;br /&gt;
|-&lt;br /&gt;
| station_rating&lt;br /&gt;
| -16384 .. 16383&lt;br /&gt;
| See detailed explanation below&lt;br /&gt;
|-&lt;br /&gt;
| profit&lt;br /&gt;
| -12748 .. 12748&lt;br /&gt;
| Called whenever cargo is delivered.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 16):&amp;lt;/code&amp;gt; The manhattan distance the cargo was transported.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 16, 8):&amp;lt;/code&amp;gt; The amount of cargo delivered.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 24, 8):&amp;lt;/code&amp;gt; The time spent en-route (1 unit = 2.5 days).&lt;br /&gt;
The returned value is multiplied by the amount and the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;price_factor&amp;lt;/code&amp;gt; to determine the income the player receives. Returning negative values is possible, it makes players pay for the delivery.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Station rating callback===&lt;br /&gt;
&lt;br /&gt;
The station rating callback is quite complicated and deserves some detailed explanation. The default station rating calculation works as follows:&lt;br /&gt;
&lt;br /&gt;
Internally, station rating is byte with values 0 .. 255, representing respectively 0% and 100%. Every 2.5 days, the transportation &#039;performance&#039; is calculated using some factors outlined below. The station rating is then set to this performance value, with the caveat that the rating change cannot exceed 2 points. Therefore, rating changes are always slow, this callback cannot change this. The initial rating is 175 points (69%). The following factors are parts of the performance, their effects are summed.&lt;br /&gt;
&lt;br /&gt;
====Time since the cargo was last picked up====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Time units (days)&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;gt;21 (&amp;amp;gt;52.5 days)&lt;br /&gt;
| 0 (0%)&lt;br /&gt;
|-&lt;br /&gt;
| 13 .. 21 (32.5 days .. 52.5 days)&lt;br /&gt;
| 25 (10%)&lt;br /&gt;
|-&lt;br /&gt;
| 7 .. 12 (17.5 days .. 32.5 days)&lt;br /&gt;
| 50 (20%)&lt;br /&gt;
|-&lt;br /&gt;
| 4 .. 6 (10 days .. 17.5 days)&lt;br /&gt;
| 95 (37%)&lt;br /&gt;
|-&lt;br /&gt;
| 0..3 (0 days..10 days)&lt;br /&gt;
| 130 (51%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The time unit used equals 185 engine ticks, or 2.5 TTD days. For ships, the time units are divided by 4 before calculating this component, so ships have four times more time before the ratings start dropping.&lt;br /&gt;
&lt;br /&gt;
====Amount of cargo waiting====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Amount of cargo&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;gt;1500&lt;br /&gt;
| -90 (-35%)&lt;br /&gt;
|-&lt;br /&gt;
| 1001..1500&lt;br /&gt;
| -35 (-14%)&lt;br /&gt;
|-&lt;br /&gt;
| 601..1000&lt;br /&gt;
| 0 (0%)&lt;br /&gt;
|-&lt;br /&gt;
| 301..600&lt;br /&gt;
| 10 (4%)&lt;br /&gt;
|-&lt;br /&gt;
| 101..300&lt;br /&gt;
| 30 (12%)&lt;br /&gt;
|-&lt;br /&gt;
| 0..100&lt;br /&gt;
| 40 (16%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Max. speed of the last vehicle picking up the cargo====&lt;br /&gt;
&lt;br /&gt;
This calculation is somewhat complicated. The maximum speed of the vehicle is expressed in &amp;quot;speed units&amp;quot;. For trains and road vehicles, the speed unit is 1 km/h; for ships, it&#039;s 0.5 km/h; for aircraft, it&#039;s 8 mph. If the max. speed is above 255 speed units, 255 is used instead. If the vehicle is slower than 85 units, no points are awarded; otherwise, you get (speed_units-85)/4 points. Therefore, the maximum you can get is 42 points, or 16%.&lt;br /&gt;
&lt;br /&gt;
====Age of the last carrier picking up the cargo====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Age of vehicle (years)&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 10 (4%)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 20 (8%)&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 33 (13%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In TTDPatch this changes when the &#039;newagerating&#039; switch is enabled&lt;br /&gt;
&lt;br /&gt;
====Bonus for AI companies (TTDPatch only)====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! AI intelligence setting&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| Low&lt;br /&gt;
| 0 (0%)&lt;br /&gt;
|-&lt;br /&gt;
| Medium&lt;br /&gt;
| 31 (12%)&lt;br /&gt;
|-&lt;br /&gt;
| High&lt;br /&gt;
| 63 (25%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Bonus for statue in nearest town====&lt;br /&gt;
&lt;br /&gt;
If your company has erected a statue in the nearest town, you get 26 points (10%) bonus to all cargo ratings.&lt;br /&gt;
&lt;br /&gt;
====Callback parameters====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;:&lt;br /&gt;
{| |-&lt;br /&gt;
!value!!meaning&lt;br /&gt;
|-&lt;br /&gt;
|0x10||the last vehicle entering the station was a train&lt;br /&gt;
|-&lt;br /&gt;
|0x11||the last vehicle entering the station was a road vehicle&lt;br /&gt;
|-&lt;br /&gt;
|0x12||the last vehicle entering the station was a ship&lt;br /&gt;
|-&lt;br /&gt;
|0x13||the last vehicle entering the station was an aircraft&lt;br /&gt;
|-&lt;br /&gt;
|0||no vehicle entered the station yet, or (TTDPatch) the last one entering was sold&lt;br /&gt;
|}&lt;br /&gt;
Please note that there&#039;s only one &amp;quot;last vehicle type&amp;quot; field per station, so the vehicle this refers to may not have picked up any of your cargo.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 8)&amp;lt;/code&amp;gt;: The time since the cargo was last picked up, in the time units described above (1 unit = 2.5 days independent of vehicle type)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 8, 16)&amp;lt;/code&amp;gt;: The amount of cargo waiting.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 24, 8)&amp;lt;/code&amp;gt;: The speed of the last vehicle picking the cargo up, in the speed units described above (if no vehicle entered the station yet, the value is 0xFF).&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Effect of callback====&lt;br /&gt;
&lt;br /&gt;
The return value of the callback replaces the first three components (time since pickup, amount of cargo, max speed) of the calculation. The bonus for statues, TTDPatch AIs and new vehicles is always in effect, you cannot (yet) change this.&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Cargos&amp;diff=4905</id>
		<title>NML:Cargos</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Cargos&amp;diff=4905"/>
		<updated>2024-12-08T18:01:08Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* Cargo classes */ add CC_POTABLE and CC_NON_POTABLE&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
==Cargo IDs==&lt;br /&gt;
For cargos, the item ID corresponds to the cargo type slot of the cargo. TTD default cargos occupy slots 0-11, so if you want to define a new cargo be sure to set this ID to 12 or higher. It is recommended to set the &#039;number&#039;-property to the same value as the item ID.&lt;br /&gt;
&lt;br /&gt;
==Cargo properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| number&lt;br /&gt;
| 0..63&lt;br /&gt;
| Number of the cargo for bitmasks. Prior to {{ottd|1.9}} this was clamped to 0..31. This mostly affects old NewGRFs that don&#039;t have a cargo translation table.&lt;br /&gt;
|-&lt;br /&gt;
| type_name&lt;br /&gt;
| string&lt;br /&gt;
| String to use as cargo type name. Example: &amp;quot;Passengers&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_CARGO_PLURAL_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| unit_name&lt;br /&gt;
| string&lt;br /&gt;
| String to use for the name of one unit from the cargo type. Currently used for subsidies only (First Passenger service to..). Example string: &amp;quot;Passenger&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_CARGO_SINGULAR_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| units_of_cargo&lt;br /&gt;
| string&lt;br /&gt;
| String used to show the &amp;quot;short cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 tonnes&amp;quot; or &amp;quot;20.000 litres&amp;quot;. Example: &amp;quot;{COMMA} item{P &amp;quot;&amp;quot; s}&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_PASSENGERS and further), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| items_of_cargo&lt;br /&gt;
| string&lt;br /&gt;
| String used to show the &amp;quot;long cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 tonnes of coal&amp;quot; or &amp;quot;20.000 litres of water&amp;quot;. Example: &amp;quot;{COMMA} item{P &amp;quot;&amp;quot; s} of livestock&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_QUANTITY_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| type_abbreviation&lt;br /&gt;
| string&lt;br /&gt;
| String used for the two-letter cargo type abbreviation. Must start with a {TINYFONT} string-code. Example: &amp;quot;{TINYFONT}XX&amp;quot;. Make sure to avoid multiple cargos having the same abbreviation. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_ABBREV_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| sprite&lt;br /&gt;
| sprite&lt;br /&gt;
| TTD sprite number for the icon of the cargo. Alternatively, set to NEW_CARGO_SPRITE and use a graphics block to define a custom sprite.&lt;br /&gt;
|-&lt;br /&gt;
| weight&lt;br /&gt;
| float 0..255&lt;br /&gt;
| Weight of one unit of the cargo (in tons)&lt;br /&gt;
|-&lt;br /&gt;
| penalty_lowerbound&lt;br /&gt;
| 0..255&lt;br /&gt;
| Delivery time until penalty is applied. The units depend on the vehicle used (see vehicle property &#039;cargo_age_period&#039;), by default 1 unit = 2.5 days.&lt;br /&gt;
|-&lt;br /&gt;
| single_penalty_length&lt;br /&gt;
| 0..255&lt;br /&gt;
| Length of the interval where a single penalty is applied&lt;br /&gt;
|-&lt;br /&gt;
| price_factor&lt;br /&gt;
| float&lt;br /&gt;
| Payment for delivering 10 units of cargo across a distance of 20 squares (in British Pounds), when delivering in less than &#039;penalty_lowerbound&#039; time (no time penalty).&lt;br /&gt;
|-&lt;br /&gt;
| station_list_colour&lt;br /&gt;
| 0..255&lt;br /&gt;
|&lt;br /&gt;
Colour for the station list window (index from the [[NML:Graphic files|default (DOS) palette]])&lt;br /&gt;
|-&lt;br /&gt;
| cargo_payment_list_colour&lt;br /&gt;
| 0..255&lt;br /&gt;
|&lt;br /&gt;
Colour for the cargo payment list window (index from the [[NML:Graphic files|default (DOS) palette]])&lt;br /&gt;
|-&lt;br /&gt;
| is_freight&lt;br /&gt;
| 0 or 1&lt;br /&gt;
| Freight status (for the freighttrains switch); 0=not freight, 1=is freight&lt;br /&gt;
|-&lt;br /&gt;
| cargo_classes&lt;br /&gt;
|&lt;br /&gt;
bitmask([[#Cargo classes|cargo classes]])&lt;br /&gt;
| Cargo classes&lt;br /&gt;
|-&lt;br /&gt;
| cargo_label&lt;br /&gt;
| 4 letters&lt;br /&gt;
| [[CargoTypes|Cargo label]], as used in the [[NML:Cargotable|cargo table]]&lt;br /&gt;
|-&lt;br /&gt;
| town_growth_effect&lt;br /&gt;
| TOWNGROWTH_XXX&lt;br /&gt;
|&lt;br /&gt;
Effect for town growth, see [[#Cargo effects on town growth|Cargo effects on town growth]]&lt;br /&gt;
|-&lt;br /&gt;
| town_growth_multiplier&lt;br /&gt;
| float 0..255&lt;br /&gt;
| {{ottd|no}} Multiplier for town growth. To be used in conjuction with town_growth_effect, when that is not TOWNGROWTH_NONE. For example, a value of 4 makes your cargo have the same effect on town growth as 4 units of food/goods/etc.&lt;br /&gt;
|-&lt;br /&gt;
| callback_flags&lt;br /&gt;
| bitmask(flags)&lt;br /&gt;
|&lt;br /&gt;
Do not set this, unless you use [[NML:Old style callbacks|old-style callbacks]].&lt;br /&gt;
|-&lt;br /&gt;
| capacity_multiplier&lt;br /&gt;
| float 0 .. 255&lt;br /&gt;
| {{ottd|1.2|r22860}} This defines the capacity of vehicles carrying this cargo type, if the vehicle sets no specific capacity to this specific cargo type. Set this property to the amount of cargo a vehicle shall carry, which can carry 1 ton of coal or 1000 thousand litres of water (whatever comparison is more suitable for your cargotype). Depending on whether your cargo type is light or heavy you should set this property either comparing the weight or the volume. Default values are 4 for passengers, 2 for mail, goods and sweets and 1 for all other cargos.&lt;br /&gt;
|-&lt;br /&gt;
| town_production_effect&lt;br /&gt;
| TOWNPRODUCTION_XXX&lt;br /&gt;
| Effect for town production, see [[#Town production effect|Town production effect]]&lt;br /&gt;
|-&lt;br /&gt;
| town_production_multiplier&lt;br /&gt;
| float 0..255&lt;br /&gt;
| {{ottd|no}} Multiplier for town production, to be used in conjunction with town_production_effect, when that is not TOWNPRODUCTION_NONE. For example, a value of 4 makes a town produce 4 times as much cargo as normal.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Cargo payment is computed from &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;price_factor&amp;lt;/code&amp;gt;, amount of cargo transported, distance, and a time delivery factor. Unit of the delivery time is 185 ticks, roughly 2.5 days. The factor is constant (with value 255) if delivery time is less than &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;penalty_lowerbound&amp;lt;/code&amp;gt;. It goes down with rate 1 between &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;penalty_lowerbound + single_penalty_length&amp;lt;/code&amp;gt;, and goes down with rate 2 if the delivery time is even longer. Time delivery factor is never less than 31.&lt;br /&gt;
&lt;br /&gt;
===Cargo classes===&lt;br /&gt;
&lt;br /&gt;
Available cargo classes are listed in the following table. Cargos may be in more than one class. Cargo classes are always used as a bitmask, use the built-in function &amp;lt;code&amp;gt;bitmask()&amp;lt;/code&amp;gt;. For example, &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(CC_EXPRESS, CC_REFRIGERATED)&amp;lt;/code&amp;gt; is used for food.&lt;br /&gt;
&lt;br /&gt;
The history of cargo classes is complex, and the meanings here may not be consistent with how classes are actually used by some grfs.&lt;br /&gt;
&lt;br /&gt;
FIRS and Iron Horse do not conform to the classes here, and use the FRAX Cargo Class Scheme, please see: https://grf.farm/polar_fox/frax_latest.html&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! type of cargo&lt;br /&gt;
|-&lt;br /&gt;
| CC_PASSENGERS&lt;br /&gt;
| passengers, also tourists (ECS)&lt;br /&gt;
|-&lt;br /&gt;
| CC_MAIL&lt;br /&gt;
| mail&lt;br /&gt;
|-&lt;br /&gt;
| CC_EXPRESS&lt;br /&gt;
| express goods, also tourists (ECS)&lt;br /&gt;
|-&lt;br /&gt;
| CC_ARMOURED&lt;br /&gt;
| valuables, diamonds, gold and alike&lt;br /&gt;
|-&lt;br /&gt;
| CC_BULK&lt;br /&gt;
| coal, ore, grain,...&lt;br /&gt;
|-&lt;br /&gt;
| CC_PIECE_GOODS&lt;br /&gt;
| containers, crates, livestock&lt;br /&gt;
|-&lt;br /&gt;
| CC_LIQUID&lt;br /&gt;
| oil, milk, water, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_REFRIGERATED&lt;br /&gt;
| food, milk, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_HAZARDOUS&lt;br /&gt;
| chemicals?, uranium, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_COVERED&lt;br /&gt;
| grain, cement, fruit, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_OVERSIZED&lt;br /&gt;
| vehicles, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_POWDERIZED&lt;br /&gt;
| cement, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_NON_POURABLE&amp;lt;br&amp;gt;CC_NEO_BULK&lt;br /&gt;
| sugar cane, wool or straw bales, ... (these are synonyms for cargos that are bulk, but can&#039;t be handled in e.g. hoppers)&lt;br /&gt;
|-&lt;br /&gt;
| CC_POTABLE&lt;br /&gt;
| exclude from non-food-grade vehicles&lt;br /&gt;
|-&lt;br /&gt;
| CC_NON_POTABLE&lt;br /&gt;
| exclude from food-grade vehicles&lt;br /&gt;
|-&lt;br /&gt;
| CC_SPECIAL&lt;br /&gt;
| Deprecated, do not set.&lt;br /&gt;
|-&lt;br /&gt;
| NO_CARGO_CLASS&lt;br /&gt;
| Special value that you can used to instead of 0.&lt;br /&gt;
|-&lt;br /&gt;
| ALL_NORMAL_CARGO_CLASSES&lt;br /&gt;
| Bitmask of all cargo classes except CC_SPECIAL. This is the same as &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(CC_PASSENGERS, CC_MAIL, ..., CC_OVERSIZED)&amp;lt;/code&amp;gt;. Note: This is already a bitmask, don&#039;t use the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(..)&amp;lt;/code&amp;gt; function with this.&lt;br /&gt;
|-&lt;br /&gt;
| ALL_CARGO_CLASSES&lt;br /&gt;
| Bitmask of all cargo classes. Same as &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;ALL_NORMAL_CARGO_CLASSES | bitmask(CC_SPECIAL)&amp;lt;/code&amp;gt; Note: This is already a bitmask, don&#039;t use the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(..)&amp;lt;/code&amp;gt; function with this.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Cargo effects on town growth===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! value&lt;br /&gt;
! effect&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_PASSENGERS&lt;br /&gt;
| Affect towns as passengers do&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_MAIL&lt;br /&gt;
| Affect towns as mail does&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_GOODS&lt;br /&gt;
| Affect towns as goods/candy does&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_WATER&lt;br /&gt;
| Affect towns as water does (second required cargo for towngrowth in the desert)&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_FOOD&lt;br /&gt;
| Affect towns as food/fizzy drinks do (first required cargo for towngrowth in desert/above snowline)&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_NONE&lt;br /&gt;
| Don&#039;t affect town growth (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If no cargos in the game are defined as TOWNGROWTH_FOOD, towns above the snowline will not require food to grow. If no cargos in the game are defined as TOWNGROWTH_FOOD or TOWNGROWTH_WATER, towns in desert will not require food or water to grow. This can be used positively for gameplay purposes, and is otherwise worth being aware of as an unintended side effect when designing cargos.&lt;br /&gt;
&lt;br /&gt;
There are some additional effects of these flags on subsidies and town cargo transport statistics.  See the nfo docs for details: https://newgrf-specs.tt-wiki.net/wiki/Action0/Cargos#Substitute_type_and_multiplier_for_town_growth_.2818.2C_19.29&lt;br /&gt;
&lt;br /&gt;
===Town production effect===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! value&lt;br /&gt;
! effect&lt;br /&gt;
|-&lt;br /&gt;
| TOWNPRODUCTION_PASSENGERS&lt;br /&gt;
| Town produces cargo as like passengers&lt;br /&gt;
|-&lt;br /&gt;
| TOWNPRODUCTION_MAIL&lt;br /&gt;
| Town produces cargo as like mail&lt;br /&gt;
|-&lt;br /&gt;
| TOWNPRODUCTION_NONE&lt;br /&gt;
| Town does not produce cargo (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Cargo variables==&lt;br /&gt;
&lt;br /&gt;
Cargos have no variables (yet).&lt;br /&gt;
&lt;br /&gt;
==Cargo callbacks==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! callback&lt;br /&gt;
! return value&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| default&lt;br /&gt;
| Sprite set (with 1 sprite)&lt;br /&gt;
| Graphics for the cargo icon (only if property &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;sprite&amp;lt;/code&amp;gt; is set to NEW_CARGO_SPRITE)&lt;br /&gt;
|-&lt;br /&gt;
| station_rating&lt;br /&gt;
| -16384 .. 16383&lt;br /&gt;
| See detailed explanation below&lt;br /&gt;
|-&lt;br /&gt;
| profit&lt;br /&gt;
| -12748 .. 12748&lt;br /&gt;
| Called whenever cargo is delivered.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 16):&amp;lt;/code&amp;gt; The manhattan distance the cargo was transported.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 16, 8):&amp;lt;/code&amp;gt; The amount of cargo delivered.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 24, 8):&amp;lt;/code&amp;gt; The time spent en-route (1 unit = 2.5 days).&lt;br /&gt;
The returned value is multiplied by the amount and the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;price_factor&amp;lt;/code&amp;gt; to determine the income the player receives. Returning negative values is possible, it makes players pay for the delivery.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Station rating callback===&lt;br /&gt;
&lt;br /&gt;
The station rating callback is quite complicated and deserves some detailed explanation. The default station rating calculation works as follows:&lt;br /&gt;
&lt;br /&gt;
Internally, station rating is byte with values 0 .. 255, representing respectively 0% and 100%. Every 2.5 days, the transportation &#039;performance&#039; is calculated using some factors outlined below. The station rating is then set to this performance value, with the caveat that the rating change cannot exceed 2 points. Therefore, rating changes are always slow, this callback cannot change this. The initial rating is 175 points (69%). The following factors are parts of the performance, their effects are summed.&lt;br /&gt;
&lt;br /&gt;
====Time since the cargo was last picked up====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Time units (days)&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;gt;21 (&amp;amp;gt;52.5 days)&lt;br /&gt;
| 0 (0%)&lt;br /&gt;
|-&lt;br /&gt;
| 13 .. 21 (32.5 days .. 52.5 days)&lt;br /&gt;
| 25 (10%)&lt;br /&gt;
|-&lt;br /&gt;
| 7 .. 12 (17.5 days .. 32.5 days)&lt;br /&gt;
| 50 (20%)&lt;br /&gt;
|-&lt;br /&gt;
| 4 .. 6 (10 days .. 17.5 days)&lt;br /&gt;
| 95 (37%)&lt;br /&gt;
|-&lt;br /&gt;
| 0..3 (0 days..10 days)&lt;br /&gt;
| 130 (51%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The time unit used equals 185 engine ticks, or 2.5 TTD days. For ships, the time units are divided by 4 before calculating this component, so ships have four times more time before the ratings start dropping.&lt;br /&gt;
&lt;br /&gt;
====Amount of cargo waiting====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Amount of cargo&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;gt;1500&lt;br /&gt;
| -90 (-35%)&lt;br /&gt;
|-&lt;br /&gt;
| 1001..1500&lt;br /&gt;
| -35 (-14%)&lt;br /&gt;
|-&lt;br /&gt;
| 601..1000&lt;br /&gt;
| 0 (0%)&lt;br /&gt;
|-&lt;br /&gt;
| 301..600&lt;br /&gt;
| 10 (4%)&lt;br /&gt;
|-&lt;br /&gt;
| 101..300&lt;br /&gt;
| 30 (12%)&lt;br /&gt;
|-&lt;br /&gt;
| 0..100&lt;br /&gt;
| 40 (16%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Max. speed of the last vehicle picking up the cargo====&lt;br /&gt;
&lt;br /&gt;
This calculation is somewhat complicated. The maximum speed of the vehicle is expressed in &amp;quot;speed units&amp;quot;. For trains and road vehicles, the speed unit is 1 km/h; for ships, it&#039;s 0.5 km/h; for aircraft, it&#039;s 8 mph. If the max. speed is above 255 speed units, 255 is used instead. If the vehicle is slower than 85 units, no points are awarded; otherwise, you get (speed_units-85)/4 points. Therefore, the maximum you can get is 42 points, or 16%.&lt;br /&gt;
&lt;br /&gt;
====Age of the last carrier picking up the cargo====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Age of vehicle (years)&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 10 (4%)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 20 (8%)&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 33 (13%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In TTDPatch this changes when the &#039;newagerating&#039; switch is enabled&lt;br /&gt;
&lt;br /&gt;
====Bonus for AI companies (TTDPatch only)====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! AI intelligence setting&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| Low&lt;br /&gt;
| 0 (0%)&lt;br /&gt;
|-&lt;br /&gt;
| Medium&lt;br /&gt;
| 31 (12%)&lt;br /&gt;
|-&lt;br /&gt;
| High&lt;br /&gt;
| 63 (25%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Bonus for statue in nearest town====&lt;br /&gt;
&lt;br /&gt;
If your company has erected a statue in the nearest town, you get 26 points (10%) bonus to all cargo ratings.&lt;br /&gt;
&lt;br /&gt;
====Callback parameters====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;:&lt;br /&gt;
{| |-&lt;br /&gt;
!value!!meaning&lt;br /&gt;
|-&lt;br /&gt;
|0x10||the last vehicle entering the station was a train&lt;br /&gt;
|-&lt;br /&gt;
|0x11||the last vehicle entering the station was a road vehicle&lt;br /&gt;
|-&lt;br /&gt;
|0x12||the last vehicle entering the station was a ship&lt;br /&gt;
|-&lt;br /&gt;
|0x13||the last vehicle entering the station was an aircraft&lt;br /&gt;
|-&lt;br /&gt;
|0||no vehicle entered the station yet, or (TTDPatch) the last one entering was sold&lt;br /&gt;
|}&lt;br /&gt;
Please note that there&#039;s only one &amp;quot;last vehicle type&amp;quot; field per station, so the vehicle this refers to may not have picked up any of your cargo.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 8)&amp;lt;/code&amp;gt;: The time since the cargo was last picked up, in the time units described above (1 unit = 2.5 days independent of vehicle type)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 8, 16)&amp;lt;/code&amp;gt;: The amount of cargo waiting.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 24, 8)&amp;lt;/code&amp;gt;: The speed of the last vehicle picking the cargo up, in the speed units described above (if no vehicle entered the station yet, the value is 0xFF).&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Effect of callback====&lt;br /&gt;
&lt;br /&gt;
The return value of the callback replaces the first three components (time since pickup, amount of cargo, max speed) of the calculation. The bonus for statues, TTDPatch AIs and new vehicles is always in effect, you cannot (yet) change this.&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Vehicles&amp;diff=4897</id>
		<title>NML:Vehicles</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Vehicles&amp;diff=4897"/>
		<updated>2024-11-23T20:00:50Z</updated>

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

		<summary type="html">&lt;p&gt;Andythenorth: /* Cargo classes */ link to FRAX Cargo Class Scheme&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
==Cargo IDs==&lt;br /&gt;
For cargos, the item ID corresponds to the cargo type slot of the cargo. TTD default cargos occupy slots 0-11, so if you want to define a new cargo be sure to set this ID to 12 or higher. It is recommended to set the &#039;number&#039;-property to the same value as the item ID.&lt;br /&gt;
&lt;br /&gt;
==Cargo properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| number&lt;br /&gt;
| 0..63&lt;br /&gt;
| Number of the cargo for bitmasks. Prior to {{ottd|1.9}} this was clamped to 0..31. This mostly affects old NewGRFs that don&#039;t have a cargo translation table.&lt;br /&gt;
|-&lt;br /&gt;
| type_name&lt;br /&gt;
| string&lt;br /&gt;
| String to use as cargo type name. Example: &amp;quot;Passengers&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_CARGO_PLURAL_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| unit_name&lt;br /&gt;
| string&lt;br /&gt;
| String to use for the name of one unit from the cargo type. Currently used for subsidies only (First Passenger service to..). Example string: &amp;quot;Passenger&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_CARGO_SINGULAR_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| units_of_cargo&lt;br /&gt;
| string&lt;br /&gt;
| String used to show the &amp;quot;short cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 tonnes&amp;quot; or &amp;quot;20.000 litres&amp;quot;. Example: &amp;quot;{COMMA} item{P &amp;quot;&amp;quot; s}&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_PASSENGERS and further), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| items_of_cargo&lt;br /&gt;
| string&lt;br /&gt;
| String used to show the &amp;quot;long cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 tonnes of coal&amp;quot; or &amp;quot;20.000 litres of water&amp;quot;. Example: &amp;quot;{COMMA} item{P &amp;quot;&amp;quot; s} of livestock&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_QUANTITY_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| type_abbreviation&lt;br /&gt;
| string&lt;br /&gt;
| String used for the two-letter cargo type abbreviation. Must start with a {TINYFONT} string-code. Example: &amp;quot;{TINYFONT}XX&amp;quot;. Make sure to avoid multiple cargos having the same abbreviation. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_ABBREV_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| sprite&lt;br /&gt;
| sprite&lt;br /&gt;
| TTD sprite number for the icon of the cargo. Alternatively, set to NEW_CARGO_SPRITE and use a graphics block to define a custom sprite.&lt;br /&gt;
|-&lt;br /&gt;
| weight&lt;br /&gt;
| float 0..255&lt;br /&gt;
| Weight of one unit of the cargo (in tons)&lt;br /&gt;
|-&lt;br /&gt;
| penalty_lowerbound&lt;br /&gt;
| 0..255&lt;br /&gt;
| Delivery time until penalty is applied. The units depend on the vehicle used (see vehicle property &#039;cargo_age_period&#039;), by default 1 unit = 2.5 days.&lt;br /&gt;
|-&lt;br /&gt;
| single_penalty_length&lt;br /&gt;
| 0..255&lt;br /&gt;
| Length of the interval where a single penalty is applied&lt;br /&gt;
|-&lt;br /&gt;
| price_factor&lt;br /&gt;
| float&lt;br /&gt;
| Payment for delivering 10 units of cargo across a distance of 20 squares (in British Pounds), when delivering in less than &#039;penalty_lowerbound&#039; time (no time penalty).&lt;br /&gt;
|-&lt;br /&gt;
| station_list_colour&lt;br /&gt;
| 0..255&lt;br /&gt;
|&lt;br /&gt;
Colour for the station list window (index from the [[NML:Graphic files|default (DOS) palette]])&lt;br /&gt;
|-&lt;br /&gt;
| cargo_payment_list_colour&lt;br /&gt;
| 0..255&lt;br /&gt;
|&lt;br /&gt;
Colour for the cargo payment list window (index from the [[NML:Graphic files|default (DOS) palette]])&lt;br /&gt;
|-&lt;br /&gt;
| is_freight&lt;br /&gt;
| 0 or 1&lt;br /&gt;
| Freight status (for the freighttrains switch); 0=not freight, 1=is freight&lt;br /&gt;
|-&lt;br /&gt;
| cargo_classes&lt;br /&gt;
|&lt;br /&gt;
bitmask([[#Cargo classes|cargo classes]])&lt;br /&gt;
| Cargo classes&lt;br /&gt;
|-&lt;br /&gt;
| cargo_label&lt;br /&gt;
| 4 letters&lt;br /&gt;
| [[CargoTypes|Cargo label]], as used in the [[NML:Cargotable|cargo table]]&lt;br /&gt;
|-&lt;br /&gt;
| town_growth_effect&lt;br /&gt;
| TOWNGROWTH_XXX&lt;br /&gt;
|&lt;br /&gt;
Effect for town growth, see [[#Cargo effects on town growth|Cargo effects on town growth]]&lt;br /&gt;
|-&lt;br /&gt;
| town_growth_multiplier&lt;br /&gt;
| float 0..255&lt;br /&gt;
| {{ottd|no}} Multiplier for town growth. To be used in conjuction with town_growth_effect, when that is not TOWNGROWTH_NONE. For example, a value of 4 makes your cargo have the same effect on town growth as 4 units of food/goods/etc.&lt;br /&gt;
|-&lt;br /&gt;
| callback_flags&lt;br /&gt;
| bitmask(flags)&lt;br /&gt;
|&lt;br /&gt;
Do not set this, unless you use [[NML:Old style callbacks|old-style callbacks]].&lt;br /&gt;
|-&lt;br /&gt;
| capacity_multiplier&lt;br /&gt;
| float 0 .. 255&lt;br /&gt;
| {{ottd|1.2|r22860}} This defines the capacity of vehicles carrying this cargo type, if the vehicle sets no specific capacity to this specific cargo type. Set this property to the amount of cargo a vehicle shall carry, which can carry 1 ton of coal or 1000 thousand litres of water (whatever comparison is more suitable for your cargotype). Depending on whether your cargo type is light or heavy you should set this property either comparing the weight or the volume. Default values are 4 for passengers, 2 for mail, goods and sweets and 1 for all other cargos.&lt;br /&gt;
|-&lt;br /&gt;
| town_production_effect&lt;br /&gt;
| TOWNPRODUCTION_XXX&lt;br /&gt;
| Effect for town production, see [[#Town production effect|Town production effect]]&lt;br /&gt;
|-&lt;br /&gt;
| town_production_multiplier&lt;br /&gt;
| float 0..255&lt;br /&gt;
| {{ottd|no}} Multiplier for town production, to be used in conjunction with town_production_effect, when that is not TOWNPRODUCTION_NONE. For example, a value of 4 makes a town produce 4 times as much cargo as normal.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Cargo payment is computed from &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;price_factor&amp;lt;/code&amp;gt;, amount of cargo transported, distance, and a time delivery factor. Unit of the delivery time is 185 ticks, roughly 2.5 days. The factor is constant (with value 255) if delivery time is less than &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;penalty_lowerbound&amp;lt;/code&amp;gt;. It goes down with rate 1 between &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;penalty_lowerbound + single_penalty_length&amp;lt;/code&amp;gt;, and goes down with rate 2 if the delivery time is even longer. Time delivery factor is never less than 31.&lt;br /&gt;
&lt;br /&gt;
===Cargo classes===&lt;br /&gt;
&lt;br /&gt;
Available cargo classes are listed in the following table. Cargos may be in more than one class. Cargo classes are always used as a bitmask, use the built-in function &amp;lt;code&amp;gt;bitmask()&amp;lt;/code&amp;gt;. For example, &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(CC_EXPRESS, CC_REFRIGERATED)&amp;lt;/code&amp;gt; is used for food.&lt;br /&gt;
&lt;br /&gt;
The history of cargo classes is complex, and the meanings here may not be consistent with how classes are actually used by some grfs.&lt;br /&gt;
&lt;br /&gt;
FIRS and Iron Horse do not conform to the classes here, and use the FRAX Cargo Class Scheme, please see: https://grf.farm/polar_fox/frax_latest.html&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! type of cargo&lt;br /&gt;
|-&lt;br /&gt;
| CC_PASSENGERS&lt;br /&gt;
| passengers, also tourists (ECS)&lt;br /&gt;
|-&lt;br /&gt;
| CC_MAIL&lt;br /&gt;
| mail&lt;br /&gt;
|-&lt;br /&gt;
| CC_EXPRESS&lt;br /&gt;
| express goods, also tourists (ECS)&lt;br /&gt;
|-&lt;br /&gt;
| CC_ARMOURED&lt;br /&gt;
| valuables, diamonds, gold and alike&lt;br /&gt;
|-&lt;br /&gt;
| CC_BULK&lt;br /&gt;
| coal, ore, grain,...&lt;br /&gt;
|-&lt;br /&gt;
| CC_PIECE_GOODS&lt;br /&gt;
| containers, crates, livestock&lt;br /&gt;
|-&lt;br /&gt;
| CC_LIQUID&lt;br /&gt;
| oil, milk, water, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_REFRIGERATED&lt;br /&gt;
| food, milk, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_HAZARDOUS&lt;br /&gt;
| chemicals?, uranium, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_COVERED&lt;br /&gt;
| grain, cement, fruit, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_OVERSIZED&lt;br /&gt;
| vehicles, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_POWDERIZED&lt;br /&gt;
| cement, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_NON_POURABLE&amp;lt;br&amp;gt;CC_NEO_BULK&lt;br /&gt;
| sugar cane, wool or straw bales, ... (these are synonyms for cargos that are bulk, but can&#039;t be handled in e.g. hoppers)&lt;br /&gt;
|-&lt;br /&gt;
| CC_SPECIAL&lt;br /&gt;
| Deprecated, do not set.&lt;br /&gt;
|-&lt;br /&gt;
| NO_CARGO_CLASS&lt;br /&gt;
| Special value that you can used to instead of 0.&lt;br /&gt;
|-&lt;br /&gt;
| ALL_NORMAL_CARGO_CLASSES&lt;br /&gt;
| Bitmask of all cargo classes except CC_SPECIAL. This is the same as &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(CC_PASSENGERS, CC_MAIL, ..., CC_OVERSIZED)&amp;lt;/code&amp;gt;. Note: This is already a bitmask, don&#039;t use the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(..)&amp;lt;/code&amp;gt; function with this.&lt;br /&gt;
|-&lt;br /&gt;
| ALL_CARGO_CLASSES&lt;br /&gt;
| Bitmask of all cargo classes. Same as &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;ALL_NORMAL_CARGO_CLASSES | bitmask(CC_SPECIAL)&amp;lt;/code&amp;gt; Note: This is already a bitmask, don&#039;t use the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(..)&amp;lt;/code&amp;gt; function with this.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Cargo effects on town growth===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! value&lt;br /&gt;
! effect&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_PASSENGERS&lt;br /&gt;
| Affect towns as passengers do&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_MAIL&lt;br /&gt;
| Affect towns as mail does&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_GOODS&lt;br /&gt;
| Affect towns as goods/candy does&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_WATER&lt;br /&gt;
| Affect towns as water does (second required cargo for towngrowth in the desert)&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_FOOD&lt;br /&gt;
| Affect towns as food/fizzy drinks do (first required cargo for towngrowth in desert/above snowline)&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_NONE&lt;br /&gt;
| Don&#039;t affect town growth (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If no cargos in the game are defined as TOWNGROWTH_FOOD, towns above the snowline will not require food to grow. If no cargos in the game are defined as TOWNGROWTH_FOOD or TOWNGROWTH_WATER, towns in desert will not require food or water to grow. This can be used positively for gameplay purposes, and is otherwise worth being aware of as an unintended side effect when designing cargos.&lt;br /&gt;
&lt;br /&gt;
There are some additional effects of these flags on subsidies and town cargo transport statistics.  See the nfo docs for details: https://newgrf-specs.tt-wiki.net/wiki/Action0/Cargos#Substitute_type_and_multiplier_for_town_growth_.2818.2C_19.29&lt;br /&gt;
&lt;br /&gt;
===Town production effect===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! value&lt;br /&gt;
! effect&lt;br /&gt;
|-&lt;br /&gt;
| TOWNPRODUCTION_PASSENGERS&lt;br /&gt;
| Town produces cargo as like passengers&lt;br /&gt;
|-&lt;br /&gt;
| TOWNPRODUCTION_MAIL&lt;br /&gt;
| Town produces cargo as like mail&lt;br /&gt;
|-&lt;br /&gt;
| TOWNPRODUCTION_NONE&lt;br /&gt;
| Town does not produce cargo (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Cargo variables==&lt;br /&gt;
&lt;br /&gt;
Cargos have no variables (yet).&lt;br /&gt;
&lt;br /&gt;
==Cargo callbacks==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! callback&lt;br /&gt;
! return value&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| default&lt;br /&gt;
| Sprite set (with 1 sprite)&lt;br /&gt;
| Graphics for the cargo icon (only if property &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;sprite&amp;lt;/code&amp;gt; is set to NEW_CARGO_SPRITE)&lt;br /&gt;
|-&lt;br /&gt;
| station_rating&lt;br /&gt;
| -16384 .. 16383&lt;br /&gt;
| See detailed explanation below&lt;br /&gt;
|-&lt;br /&gt;
| profit&lt;br /&gt;
| -12748 .. 12748&lt;br /&gt;
| Called whenever cargo is delivered.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 16):&amp;lt;/code&amp;gt; The manhattan distance the cargo was transported.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 16, 8):&amp;lt;/code&amp;gt; The amount of cargo delivered.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 24, 8):&amp;lt;/code&amp;gt; The time spent en-route (1 unit = 2.5 days).&lt;br /&gt;
The returned value is multiplied by the amount and the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;price_factor&amp;lt;/code&amp;gt; to determine the income the player receives. Returning negative values is possible, it makes players pay for the delivery.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Station rating callback===&lt;br /&gt;
&lt;br /&gt;
The station rating callback is quite complicated and deserves some detailed explanation. The default station rating calculation works as follows:&lt;br /&gt;
&lt;br /&gt;
Internally, station rating is byte with values 0 .. 255, representing respectively 0% and 100%. Every 2.5 days, the transportation &#039;performance&#039; is calculated using some factors outlined below. The station rating is then set to this performance value, with the caveat that the rating change cannot exceed 2 points. Therefore, rating changes are always slow, this callback cannot change this. The initial rating is 175 points (69%). The following factors are parts of the performance, their effects are summed.&lt;br /&gt;
&lt;br /&gt;
====Time since the cargo was last picked up====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Time units (days)&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;gt;21 (&amp;amp;gt;52.5 days)&lt;br /&gt;
| 0 (0%)&lt;br /&gt;
|-&lt;br /&gt;
| 13 .. 21 (32.5 days .. 52.5 days)&lt;br /&gt;
| 25 (10%)&lt;br /&gt;
|-&lt;br /&gt;
| 7 .. 12 (17.5 days .. 32.5 days)&lt;br /&gt;
| 50 (20%)&lt;br /&gt;
|-&lt;br /&gt;
| 4 .. 6 (10 days .. 17.5 days)&lt;br /&gt;
| 95 (37%)&lt;br /&gt;
|-&lt;br /&gt;
| 0..3 (0 days..10 days)&lt;br /&gt;
| 130 (51%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The time unit used equals 185 engine ticks, or 2.5 TTD days. For ships, the time units are divided by 4 before calculating this component, so ships have four times more time before the ratings start dropping.&lt;br /&gt;
&lt;br /&gt;
====Amount of cargo waiting====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Amount of cargo&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;gt;1500&lt;br /&gt;
| -90 (-35%)&lt;br /&gt;
|-&lt;br /&gt;
| 1001..1500&lt;br /&gt;
| -35 (-14%)&lt;br /&gt;
|-&lt;br /&gt;
| 601..1000&lt;br /&gt;
| 0 (0%)&lt;br /&gt;
|-&lt;br /&gt;
| 301..600&lt;br /&gt;
| 10 (4%)&lt;br /&gt;
|-&lt;br /&gt;
| 101..300&lt;br /&gt;
| 30 (12%)&lt;br /&gt;
|-&lt;br /&gt;
| 0..100&lt;br /&gt;
| 40 (16%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Max. speed of the last vehicle picking up the cargo====&lt;br /&gt;
&lt;br /&gt;
This calculation is somewhat complicated. The maximum speed of the vehicle is expressed in &amp;quot;speed units&amp;quot;. For trains and road vehicles, the speed unit is 1 km/h; for ships, it&#039;s 0.5 km/h; for aircraft, it&#039;s 8 mph. If the max. speed is above 255 speed units, 255 is used instead. If the vehicle is slower than 85 units, no points are awarded; otherwise, you get (speed_units-85)/4 points. Therefore, the maximum you can get is 42 points, or 16%.&lt;br /&gt;
&lt;br /&gt;
====Age of the last carrier picking up the cargo====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Age of vehicle (years)&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 10 (4%)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 20 (8%)&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 33 (13%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In TTDPatch this changes when the &#039;newagerating&#039; switch is enabled&lt;br /&gt;
&lt;br /&gt;
====Bonus for AI companies (TTDPatch only)====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! AI intelligence setting&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| Low&lt;br /&gt;
| 0 (0%)&lt;br /&gt;
|-&lt;br /&gt;
| Medium&lt;br /&gt;
| 31 (12%)&lt;br /&gt;
|-&lt;br /&gt;
| High&lt;br /&gt;
| 63 (25%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Bonus for statue in nearest town====&lt;br /&gt;
&lt;br /&gt;
If your company has erected a statue in the nearest town, you get 26 points (10%) bonus to all cargo ratings.&lt;br /&gt;
&lt;br /&gt;
====Callback parameters====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;:&lt;br /&gt;
{| |-&lt;br /&gt;
!value!!meaning&lt;br /&gt;
|-&lt;br /&gt;
|0x10||the last vehicle entering the station was a train&lt;br /&gt;
|-&lt;br /&gt;
|0x11||the last vehicle entering the station was a road vehicle&lt;br /&gt;
|-&lt;br /&gt;
|0x12||the last vehicle entering the station was a ship&lt;br /&gt;
|-&lt;br /&gt;
|0x13||the last vehicle entering the station was an aircraft&lt;br /&gt;
|-&lt;br /&gt;
|0||no vehicle entered the station yet, or (TTDPatch) the last one entering was sold&lt;br /&gt;
|}&lt;br /&gt;
Please note that there&#039;s only one &amp;quot;last vehicle type&amp;quot; field per station, so the vehicle this refers to may not have picked up any of your cargo.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 8)&amp;lt;/code&amp;gt;: The time since the cargo was last picked up, in the time units described above (1 unit = 2.5 days independent of vehicle type)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 8, 16)&amp;lt;/code&amp;gt;: The amount of cargo waiting.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 24, 8)&amp;lt;/code&amp;gt;: The speed of the last vehicle picking the cargo up, in the speed units described above (if no vehicle entered the station yet, the value is 0xFF).&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Effect of callback====&lt;br /&gt;
&lt;br /&gt;
The return value of the callback replaces the first three components (time since pickup, amount of cargo, max speed) of the calculation. The bonus for statues, TTDPatch AIs and new vehicles is always in effect, you cannot (yet) change this.&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Cargos&amp;diff=4895</id>
		<title>Action0/Cargos</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Cargos&amp;diff=4895"/>
		<updated>2024-11-23T19:52:30Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* CargoClasses (16) */ link to FRAX&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The [[ttwiki:NewCargos|NewCargos]] switch of TTDPatch allows modifying the existing 12 cargos per climate, and allows adding 20 new cargos per climate as well. These cargo slots are numbered from 0 to 31, where slots 0-11 are used by default TTD cargos and slots 12-31 contain uninitialized garbage by default (so you can&#039;t trust them having meaningful information, you must set all of their properties).&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=11ab3c4e}} OpenTTD 1.9 increases the number of cargos to 64.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||B||{{ottdp|0.6|2.5}}||Bit number for bitmasks&lt;br /&gt;
|-&lt;br /&gt;
|09||W||{{ottdp|0.6|2.5}}||TextID for the cargo type name&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|0.6|2.5}}||TextID for the name of one unit from the cargo type&lt;br /&gt;
|-&lt;br /&gt;
|0B||W||{{ottdp|0.6|2.5}}||TextID to be displayed for 1 unit of cargo&lt;br /&gt;
|-&lt;br /&gt;
|0C||W||{{ottdp|0.6|2.5}}||TextID to be displayed for multiple units of cargo&lt;br /&gt;
|-&lt;br /&gt;
|0D||W||{{ottdp|0.6|2.5}}||TextID for cargo type abbreviation&lt;br /&gt;
|-&lt;br /&gt;
|0E||W||{{ottdp|0.6|2.5}}||Sprite number for the icon of the cargo&lt;br /&gt;
|-&lt;br /&gt;
|0F||B||{{ottdp|0.6|2.5}}||Weight of one unit of the cargo&lt;br /&gt;
|-&lt;br /&gt;
|10,11||B||{{ottdp|0.6|2.5}}||Penalty times&lt;br /&gt;
|-&lt;br /&gt;
|12||D||{{ottdp|0.6|2.5}}||Base price&lt;br /&gt;
|-&lt;br /&gt;
|13||B||{{ottdp|0.6|2.5}}||Color for the station list window&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|0.6|2.5}}||Color for the cargo payment list window&lt;br /&gt;
|-&lt;br /&gt;
|15||B||{{ottdp|0.6|2.5}}||Freight status (for freight-weight-multiplier setting); 0=not freight, 1=is freight&lt;br /&gt;
|-&lt;br /&gt;
|16||W||{{ottdp|0.6|2.5}}||Cargo classes&lt;br /&gt;
|-&lt;br /&gt;
|17||D||{{ottdp|0.6|2.5}}||Cargo label&lt;br /&gt;
|-&lt;br /&gt;
|18||B||{{ottdp|0.6|2.5|ttdprev=alpha 72}}||Substitute type for town growth&lt;br /&gt;
|-&lt;br /&gt;
|19||W||{{ottdp|no|2.5|ttdprev=alpha 72}}||Multiplier for town growth&lt;br /&gt;
|-&lt;br /&gt;
|1A||B||{{ottdp|0.6|2.5|ttdprev=alpha 72}}||Callback flags&lt;br /&gt;
|-&lt;br /&gt;
|1B||W||{{ottdp|1.1|no|ottdrev=r21224}}||TextID for displaying the units of a cargo&lt;br /&gt;
|-&lt;br /&gt;
|1C||W||{{ottdp|1.1|no|ottdrev=r21224}}||TextID for displaying the amount of cargo&lt;br /&gt;
|-&lt;br /&gt;
|1D||W||{{ottdp|1.2|no|ottdrev=r23860}}||Capacity mulitplier&lt;br /&gt;
|-&lt;br /&gt;
|1E||B||{{ottdp|14.0|no}}||Town Production effect&lt;br /&gt;
|-&lt;br /&gt;
|1F||W||{{ottdp|14.0|no}}||Town Production multiplier&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Bit number for bitmasks (08) ===&lt;br /&gt;
&lt;br /&gt;
This value must be used in [[Action3]] and in cargo bit mask properties such as refit masks. Values 1C-1F should be safe to use (if they aren&#039;t already taken, of course) if you intend to maintain compatibility with GRFs unaware of the newcargos switch. Further assuming that no active GRFs support the toyland climate, you can use values 11-1A as well.&lt;br /&gt;
&lt;br /&gt;
Additionally, you can use the value FFh to disable the given cargo slot. This way, it won&#039;t appear in cargo type lists, but it won&#039;t be removed from things already on the map. If you disable a cargo, you&#039;ll probably want to zero out the cargo label (property 17) as well.&lt;br /&gt;
&lt;br /&gt;
This property only affects GRFs which do not have a [[Action0/Global Settings#Cargo_translation_table_.2809.29 | cargo translation table]]. GRFs with such a table generally use the index of the cargo in the table instead of the value of this property to access a cargo. As such this property is more or less a default value for GRFs without cargo translation table. If you are unsure what value to assign to this property, set it to the same value as the cargo slot ID.&lt;br /&gt;
&lt;br /&gt;
=== TextID for the cargo type name (09) ===&lt;br /&gt;
&lt;br /&gt;
This textID should refer to the name of the cargo, capitalized, to match the TTD style (e.g. &amp;quot;Passengers&amp;quot;, &amp;quot;Coal&amp;quot;, &amp;quot;Gold Ore&amp;quot;, &amp;quot;Milk&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
You can reuse existing [[TextIDs]] or create custom strings using [[Action4]] with an offset in the DCxx range. Note that you need to set language-id bit 7 as well in the Action4 for a custom string. (Also applies to properties 0A to 0D)&lt;br /&gt;
&lt;br /&gt;
=== TextID for one unit of the type (0A) ===&lt;br /&gt;
&lt;br /&gt;
This textID should refer to the cargo type name in the singular. Currently, this ID is used only in subsidy messages (&amp;quot;First Passenger service...&amp;quot; instead of &amp;quot;First Passengers service...&amp;quot;, for example)&lt;br /&gt;
&lt;br /&gt;
=== TextID for 1 unit of cargo (0B) ===&lt;br /&gt;
&lt;br /&gt;
This textID will be used to display the amount of the cargo if there&#039;s exactly 1 unit waiting. Although there&#039;s only one unit waiting, you&#039;ll still have to use either the special character 7C (print signed word) or 87 (print amount in litres and add suffix &amp;quot; litres&amp;quot;) so TTD removes the amount from its internal reference stack. For example, if you have a new cargo named &amp;quot;gold ore&amp;quot;, this should be &amp;quot;\7C ton of gold ore&amp;quot;, which will expand to &amp;quot;1 ton of gold ore&amp;quot;. On the other hand, a liquid cargo named &amp;quot;milk&amp;quot; should be something like &amp;quot;\87 of milk&amp;quot;, which will expand to either &amp;quot;100 litres of milk&amp;quot; or &amp;quot;1,000 litres of milk&amp;quot; (The multiplier for liquid cargos depends on miscmods.dontfixlitres. If it&#039;s on, the multiplier is 100, otherwise it&#039;s 1000)&lt;br /&gt;
&lt;br /&gt;
=== TextID for multiple units of cargo (0C) ===&lt;br /&gt;
&lt;br /&gt;
This textID will be used to display the amount of cargo if the amount waiting isn&#039;t exactly 1. You&#039;ll need the same special characters as above, but now they will be expanded according to the actual cargo waiting. Sticking to the example above, you&#039;ll need &amp;quot;\7C tons of gold ore&amp;quot; and &amp;quot;\87 of milk&amp;quot;, which can expand to &amp;quot;42 tons of gold ore&amp;quot; and &amp;quot;42,000 litres of milk&amp;quot;, accordingly. You will note that liquid cargos can have the same textID for both property 0B and 0C since they always use the plural form.&lt;br /&gt;
&lt;br /&gt;
=== TextID for cargo type abbreviation (0D) ===&lt;br /&gt;
&lt;br /&gt;
This textID will be used in the station list window to represent the cargo waiting. It should be a two-letter abbreviation prefixed by the special character 0E to switch to the microscopic font. The microscopic font has every letter capitalized, so capitalization isn&#039;t important here. Continuing the above example, gold ore could have this as &amp;quot;GO&amp;quot; and milk as &amp;quot;MK&amp;quot; (&amp;quot;ML&amp;quot; is already taken by mail).&lt;br /&gt;
&lt;br /&gt;
=== Sprite number for icon (0E) ===&lt;br /&gt;
&lt;br /&gt;
This is a sprite number of an old TTD sprite to be displayed in the station window for this cargo, or FFFFh if the icon should be found by following the action 3 associated with this cargo. The icon must not be bigger than 10x10 pixels. One icon will be shown for every 10 units of the cargo waiting, up to 23 icons, which is the maximum.&lt;br /&gt;
&lt;br /&gt;
=== Weight of one unit of the cargo (0F) ===&lt;br /&gt;
&lt;br /&gt;
This property defines the weight of 1 unit from the cargo, which will be used to calculate the weight of the vehicles when loaded. The unit is 1/16 ton (which is 62.5 kg). With the examples above, gold ore should have this as 16 (since 1 ton of gold ore should weigh exactly 1 ton), while milk should have this slightly above 16 (milk is denser than water).&lt;br /&gt;
&lt;br /&gt;
=== Penalty times and price factor (10,11,12) ===&lt;br /&gt;
&lt;br /&gt;
These three values define how much is paid for the delivery of the cargo type. The price factor is subject to inflation, but GRFs needn&#039;t care about this, the programme will adjust the price for them.&lt;br /&gt;
&lt;br /&gt;
The income generated from cargo delivery is calculated as:&lt;br /&gt;
&lt;br /&gt;
income=((((distance/2) * timefactor * amount_moved) &amp;gt;&amp;gt; 7) * cargopricefactor) &amp;gt;&amp;gt; 13&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
; a &amp;gt;&amp;gt; b : means a is arithmetically shifted right by b bits&lt;br /&gt;
; distance : is the Manhattan distance between the two station signs&lt;br /&gt;
; amount_moved : is the number of cargo units moved&lt;br /&gt;
; cargopricefactor : is the value you set in property 12. Inflation will be applied automatically on it.&lt;br /&gt;
; timefactor : is a multiplier in the range 0..255, calculated in the following way: (T1 is the value of property 10, T2 is the value of property 11, t is the time the delivery took, the unit is 185 game ticks (roughly 2.5 game days) )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    if t&amp;lt;=T1 then timefactor=255&lt;br /&gt;
    else if t&amp;lt;=(T1+T2) then timefactor=255-(t-T1)&lt;br /&gt;
    else timefactor=255-(t-T1)-(t-T1-T2)&lt;br /&gt;
    if the above rules result in a timefactor less than 31, 31 is used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Color for the station list window (13) ===&lt;br /&gt;
&lt;br /&gt;
This color index will be used to draw the rectangle representing the amount waiting from the current cargo type in the station list window. The index should be given for the DOS palette. OpenTTD and TTDPatch will automatically translate the index for the Windows palette, if they use the windows base graphics.&lt;br /&gt;
&lt;br /&gt;
=== Color for the cargo payment list window (14) ===&lt;br /&gt;
&lt;br /&gt;
The graph of the current cargo will be drawn using this color in the cargo payment rates graph. The index should be given for the DOS palette, the Windows version of TTDPatch will automatically translate the index for the Windows palette.&lt;br /&gt;
&lt;br /&gt;
=== CargoClasses (16) ===&lt;br /&gt;
&lt;br /&gt;
See [[Action0Trains#Cargo classes .2828.2C_29.29|train prop. 28/29]] for a description of the utility of this property.&lt;br /&gt;
&lt;br /&gt;
The history of cargo classes is complex, and the meanings here may not be consistent with how classes are actually used by some grfs.&lt;br /&gt;
&lt;br /&gt;
FIRS and Iron Horse do not conform to the classes here, and use the FRAX Cargo Class Scheme, please see: https://grf.farm/polar_fox/frax_latest.html&lt;br /&gt;
&lt;br /&gt;
This is a bit mask of all cargo classes to which this cargo could belong.&lt;br /&gt;
The following classes are available:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
!bit&lt;br /&gt;
!value&lt;br /&gt;
!class name&lt;br /&gt;
!wagon type&amp;lt;ref name=vehicle&amp;gt;Suggestion for vehicle types which transport this cargo&amp;lt;/ref&amp;gt;&lt;br /&gt;
!usage&amp;lt;ref name=refitusage&amp;gt;Suggestion how to best make use of this class in the refit masks of vehicles&amp;lt;br&amp;gt;OR to be included in the &#039;allowed classes&#039; (train prop. 28), AND NOT in the &#039;disallowed classes&#039; (train prop. 29)&amp;lt;/ref&amp;gt;&lt;br /&gt;
!vehicle tips&amp;lt;ref name=vehicleuse&amp;gt;Suggestions this class should be used in the property which excludes a class of cargos from a vehicle. One specific type of cargo could appear both as liquid or as piece goods (e.g. milk), which depends on the actual representation. Thus excluding the other would disallow refit to that cargo.&amp;lt;/ref&amp;gt;&lt;br /&gt;
!industry tips&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Passengers&lt;br /&gt;
|passenger wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|do not combine with other flags&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mail&lt;br /&gt;
|closed or mail wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|do not combine with other flags&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4&lt;br /&gt;
|Express&lt;br /&gt;
|closed or mail wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude, suitable for airplane or maglev&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|8&lt;br /&gt;
|Armored&lt;br /&gt;
|armored or mail wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|do not combine with other flags&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|10&lt;br /&gt;
|Bulk (Uncountable)&lt;br /&gt;
|open or hopper wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|may be combined with Piece Goods or Liquid to simulate multiple modes of transport&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|20&lt;br /&gt;
|Piece Goods (Countable)&lt;br /&gt;
|closed or open wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|may be combined with Bulk or Liquid to simulate multiple modes of transport&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|40&lt;br /&gt;
|Liquid&lt;br /&gt;
|tank wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|may be combined with Piece Goods or Bulk to simulate multiple modes of transport&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|80&lt;br /&gt;
|Refrigerated&lt;br /&gt;
|refrigerated wagon&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when Piece Goods included&lt;br /&gt;
|also set Piece Goods&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|100&lt;br /&gt;
|Hazardous&lt;br /&gt;
|unknown&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when special wagons are provided.&lt;br /&gt;
|combine with Piece Goods, Liquid, Bulk or Express&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|200&lt;br /&gt;
|Covered (weather protected)&lt;br /&gt;
|closed wagon, any other wagon with tarpaulin or weather cover&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|do not exclude for Liquid&lt;br /&gt;
|combine with Piece Goods or Bulk&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|400&lt;br /&gt;
|Oversized&lt;br /&gt;
|stake/flatbed wagon&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when Piece Goods included&lt;br /&gt;
|combine with Piece Goods&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|800&lt;br /&gt;
|Powderized (dry powdered materials that flow under air pressure)&lt;br /&gt;
|powder/silo vehicle equipped for compressed air unloading&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when Bulk included&lt;br /&gt;
|combine with Bulk&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|1000&lt;br /&gt;
|Not Pourable&lt;br /&gt;
|open wagon, but not hopper wagon&lt;br /&gt;
|AND NOT&lt;br /&gt;
|only exclude, when Bulk included&lt;br /&gt;
|combine with Bulk&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|2000&lt;br /&gt;
|Potable&lt;br /&gt;
| exclude from non-food-grade vehicles&lt;br /&gt;
| AND NOT&lt;br /&gt;
| exclude&lt;br /&gt;
| set for all food-grade freight cargos&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|4000&lt;br /&gt;
|Non-potable.&lt;br /&gt;
| exclude from food-grade vehicles&lt;br /&gt;
| AND NOT&lt;br /&gt;
| exclude&lt;br /&gt;
| set for all non-food-grade freight cargos&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|8000&lt;br /&gt;
|special&lt;br /&gt;
|and not&lt;br /&gt;
|none&lt;br /&gt;
|special use&lt;br /&gt;
|do not set&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only cargos which are in class 0 (passengers) will appear in bus stations. Only cargos which are &#039;&#039;not&#039;&#039; in class 0 will appear in truck stations.&lt;br /&gt;
&lt;br /&gt;
Disclaimer: there is no guarantee that classes won&#039;t vary over time or between sets.  The classes of a cargo may change between different versions of a specific industry/cargo newgrf, or different classes may be set for the same cargo label by different industry/cargo newgrfs.   Feel free to use classes in your set for conveniently refitting to cargos, but if you - the vehicle author - care about specific cargos being transported in specific vehicles, use label based refits (changing labels without a very good reason is considered to be bad practice).&lt;br /&gt;
&lt;br /&gt;
=== Cargo label (17) ===&lt;br /&gt;
&lt;br /&gt;
Cargo labels are globally [[CargoTypes#Cargo Labels|unique identifiers]] for a cargo type. They are used to allow vehicle grfs to easily support many cargo types, whether they are active or not and no matter what slot or bit they are using.&lt;br /&gt;
&lt;br /&gt;
Read about the [[Action0/Global Settings#Cargo translation table 09|cargo translation table]] for further info.&lt;br /&gt;
&lt;br /&gt;
=== Substitute type and multiplier for town growth (18, 19) ===&lt;br /&gt;
&lt;br /&gt;
These properties allow you to modify how a cargo type affects town growth. Property 18 can contain one of the following values:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Value!!Meaning!!{{ottdp|0.7|no}} Details&amp;lt;ref&amp;gt;This is the interpretation of OpenTTD. For TTDPatch see [http://www.tt-wiki.net/wiki/NewTownGrowthSwitches NewTownGrowthMechanism], which is quite different/unrelated.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|00||Affect towns as passengers do||Cargo produced by houses is added to the statistics in the town GUI.&lt;br /&gt;
|-&lt;br /&gt;
|02||Affect towns as mail does||Cargo produced by houses is added to the statistics in the town GUI.&lt;br /&gt;
|-&lt;br /&gt;
|05||Affect towns as goods/candy does||See note about subsidies below.&lt;br /&gt;
|-&lt;br /&gt;
|09||Affect towns as water does||Second required cargo for towngrowth in the desert&lt;br /&gt;
|-&lt;br /&gt;
|0B||Affect towns as food/fizzy drinks do||First required cargo for towngrowth in desert/above snowline. Alse see note about subsidies below.&lt;br /&gt;
|-&lt;br /&gt;
|FF||Don&#039;t affect town growth (default)|| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no|2.5|ttdprev=alpha 72}} The incoming cargo amount is multiplied by property 19, then divided by 256 before it is added to the town statistics. This allows you to have smaller or bigger impact than original cargoes do. &lt;br /&gt;
&lt;br /&gt;
If no cargos in the game are defined as food (0B), towns above the snowline will not require food to grow. If no cargos in the game are defined as food (0B) or water (09), towns in desert will not require food or water to grow.  This can be used positively for gameplay purposes, and is otherwise worth being aware of as an unintended side effect when designing cargos.&lt;br /&gt;
&lt;br /&gt;
Please note that cargoes accepted by industries affect the closest town as well; for example, if you have an industry that accepts passengers, every passenger brought to the industry affects the town just like if they were transported to the town directly. Usually, it&#039;s not a good idea to have industries that process such cargoes; they should be accepted by towns only.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|0.6-1.1|no}} In OpenTTD up to 1.1 (not 1.2) property 18 also affects the creation of subsidies. Usually subsidies apply to cargo transportation between two industries. For cargos with substitution-type 05 or 0B the destination will be a town instead. Independent of property 18 subsidies from town to town are only created for cargo slot 0 (Passengers).&lt;br /&gt;
&lt;br /&gt;
=== Callback flags (1A) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Var. 0C!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||39||Custom profit calculation&lt;br /&gt;
|-&lt;br /&gt;
|1||2||145||Custom station rating calculation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TextID for displaying the units of a cargo (1B) ===&lt;br /&gt;
&lt;br /&gt;
This textID is used by OpenTTD to show the &amp;quot;short cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 litres&amp;quot; or &amp;quot;10 tonnes&amp;quot;. This textID must be set after property 0B. The text this textID refers to should properly handle plurals, e.g. &amp;quot;\7B item\9A\15\80\9A\10\9A\11s\9A\12&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The default for this textID depends on the default for property 0B; if the default 0B string has &amp;quot;litre&amp;quot;, then the default for this textID will be the unit for litres. OpenTTD maps the following textIDs so you don&#039;t need to provide translations:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!textID!!String&lt;br /&gt;
|-&lt;br /&gt;
|004f||&amp;lt;num&amp;gt; passenger(s)&lt;br /&gt;
|-&lt;br /&gt;
|0050||&amp;lt;num&amp;gt; tonne(s)&lt;br /&gt;
|-&lt;br /&gt;
|0051||&amp;lt;num&amp;gt; bag(s)&lt;br /&gt;
|-&lt;br /&gt;
|0052||&amp;lt;num&amp;gt; litre(s)&lt;br /&gt;
|-&lt;br /&gt;
|0053||&amp;lt;num&amp;gt; item(s)&lt;br /&gt;
|-&lt;br /&gt;
|0054||&amp;lt;num&amp;gt; crate(s)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;tonne&amp;quot; and &amp;quot;litre&amp;quot; strings (textID 0050 and 0052) are automatically updated based on the user settings of unit display, e.g. they &amp;quot;tonne&amp;quot; might become &amp;quot;kg&amp;quot;. The &amp;quot;(s)&amp;quot; is for display purposes; in reality that is a choice list.&lt;br /&gt;
&lt;br /&gt;
=== TextID for displaying the amount of cargo (1C) ===&lt;br /&gt;
&lt;br /&gt;
This textID is used by OpenTTD to show the &amp;quot;long cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 litres of water&amp;quot; or &amp;quot;10 tonnes of coal&amp;quot;. This textID must be set after property 0c. The text this textID refers to should properly handle plurals, e.g. &amp;quot;\7B item\9A\15\80\9A\10\9A\11s\9A\12 of livestock&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The default for this textID depends on the default for property 0C, but with support for plurals. For &amp;quot;X litre(s)&amp;quot; or &amp;quot;X tonne(s)&amp;quot; you should respectively use string codes 87 and 9A 0D.&lt;br /&gt;
&lt;br /&gt;
=== Capacity multiplier (1D) ===&lt;br /&gt;
&lt;br /&gt;
This defines the capacity (and indirectly loading speed) of vehicles carrying this cargo type, if the vehicle sets no specific capacity to this specific cargo type.&lt;br /&gt;
&lt;br /&gt;
Set this property to the amount of cargo a vehicle shall carry, which can carry 0x100 (256) tons of coal or 0x100 (256) thousand litres of water (whatever comparison is more suitable for your cargotype). Depending on whether your cargo type is light or heavy you should set this property either comparing the weight or the volume.&lt;br /&gt;
&lt;br /&gt;
The default value of this property is:&lt;br /&gt;
{| |-&lt;br /&gt;
! Cargo slot !! Default cargo in this slot !! Property 1D !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 00 || PASS || 0x400 || A vehicle carrying 1 ton of coal, can carry 4 passengers.&lt;br /&gt;
|-&lt;br /&gt;
| 02 || MAIL || 0x200 || A vehicle carrying 1 ton of coal, can carry 2 bags of mail.&lt;br /&gt;
|-&lt;br /&gt;
| 05 || GOOD, SWET || 0x200 || A vehicle carrying 1 ton of coal, can carry 2 crates of goods/sweets.&lt;br /&gt;
|-&lt;br /&gt;
| xx || (everything else) || 0x100 || All other slots default to 0x100, i.e. 1 unit of cargo equals 1 ton of coal.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Town Production effect (1E) ===&lt;br /&gt;
&lt;br /&gt;
This properties allow you to directly modify how a town produces cargo. Property 1E can contain one of the following values:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|00||Towns produce cargo as passengers&lt;br /&gt;
|-&lt;br /&gt;
|02||Towns produce cargo as mail&lt;br /&gt;
|-&lt;br /&gt;
|FF||Towns don&#039;t produce cargo (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Town Production multiplier (1F) ===&lt;br /&gt;
&lt;br /&gt;
Set this property to the amount of cargo a town will produce, relative to the normal amount for that town production effect (passengers or mail.) The default value is 0x100 (256), use a lower value to produce less cargo, or a higher value to produce more cargo.&lt;br /&gt;
&lt;br /&gt;
Properties 1E and 1F are an alternative to the cargo production callback of houses, and allow for cargo to be set up to be produced by towns without having to redefine any houses, although it is not as flexible.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Cargos&amp;diff=4894</id>
		<title>Action0/Cargos</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Cargos&amp;diff=4894"/>
		<updated>2024-11-23T19:49:21Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* CargoClasses (16) */  sentence case not title&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The [[ttwiki:NewCargos|NewCargos]] switch of TTDPatch allows modifying the existing 12 cargos per climate, and allows adding 20 new cargos per climate as well. These cargo slots are numbered from 0 to 31, where slots 0-11 are used by default TTD cargos and slots 12-31 contain uninitialized garbage by default (so you can&#039;t trust them having meaningful information, you must set all of their properties).&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=11ab3c4e}} OpenTTD 1.9 increases the number of cargos to 64.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||B||{{ottdp|0.6|2.5}}||Bit number for bitmasks&lt;br /&gt;
|-&lt;br /&gt;
|09||W||{{ottdp|0.6|2.5}}||TextID for the cargo type name&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|0.6|2.5}}||TextID for the name of one unit from the cargo type&lt;br /&gt;
|-&lt;br /&gt;
|0B||W||{{ottdp|0.6|2.5}}||TextID to be displayed for 1 unit of cargo&lt;br /&gt;
|-&lt;br /&gt;
|0C||W||{{ottdp|0.6|2.5}}||TextID to be displayed for multiple units of cargo&lt;br /&gt;
|-&lt;br /&gt;
|0D||W||{{ottdp|0.6|2.5}}||TextID for cargo type abbreviation&lt;br /&gt;
|-&lt;br /&gt;
|0E||W||{{ottdp|0.6|2.5}}||Sprite number for the icon of the cargo&lt;br /&gt;
|-&lt;br /&gt;
|0F||B||{{ottdp|0.6|2.5}}||Weight of one unit of the cargo&lt;br /&gt;
|-&lt;br /&gt;
|10,11||B||{{ottdp|0.6|2.5}}||Penalty times&lt;br /&gt;
|-&lt;br /&gt;
|12||D||{{ottdp|0.6|2.5}}||Base price&lt;br /&gt;
|-&lt;br /&gt;
|13||B||{{ottdp|0.6|2.5}}||Color for the station list window&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|0.6|2.5}}||Color for the cargo payment list window&lt;br /&gt;
|-&lt;br /&gt;
|15||B||{{ottdp|0.6|2.5}}||Freight status (for freight-weight-multiplier setting); 0=not freight, 1=is freight&lt;br /&gt;
|-&lt;br /&gt;
|16||W||{{ottdp|0.6|2.5}}||Cargo classes&lt;br /&gt;
|-&lt;br /&gt;
|17||D||{{ottdp|0.6|2.5}}||Cargo label&lt;br /&gt;
|-&lt;br /&gt;
|18||B||{{ottdp|0.6|2.5|ttdprev=alpha 72}}||Substitute type for town growth&lt;br /&gt;
|-&lt;br /&gt;
|19||W||{{ottdp|no|2.5|ttdprev=alpha 72}}||Multiplier for town growth&lt;br /&gt;
|-&lt;br /&gt;
|1A||B||{{ottdp|0.6|2.5|ttdprev=alpha 72}}||Callback flags&lt;br /&gt;
|-&lt;br /&gt;
|1B||W||{{ottdp|1.1|no|ottdrev=r21224}}||TextID for displaying the units of a cargo&lt;br /&gt;
|-&lt;br /&gt;
|1C||W||{{ottdp|1.1|no|ottdrev=r21224}}||TextID for displaying the amount of cargo&lt;br /&gt;
|-&lt;br /&gt;
|1D||W||{{ottdp|1.2|no|ottdrev=r23860}}||Capacity mulitplier&lt;br /&gt;
|-&lt;br /&gt;
|1E||B||{{ottdp|14.0|no}}||Town Production effect&lt;br /&gt;
|-&lt;br /&gt;
|1F||W||{{ottdp|14.0|no}}||Town Production multiplier&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Bit number for bitmasks (08) ===&lt;br /&gt;
&lt;br /&gt;
This value must be used in [[Action3]] and in cargo bit mask properties such as refit masks. Values 1C-1F should be safe to use (if they aren&#039;t already taken, of course) if you intend to maintain compatibility with GRFs unaware of the newcargos switch. Further assuming that no active GRFs support the toyland climate, you can use values 11-1A as well.&lt;br /&gt;
&lt;br /&gt;
Additionally, you can use the value FFh to disable the given cargo slot. This way, it won&#039;t appear in cargo type lists, but it won&#039;t be removed from things already on the map. If you disable a cargo, you&#039;ll probably want to zero out the cargo label (property 17) as well.&lt;br /&gt;
&lt;br /&gt;
This property only affects GRFs which do not have a [[Action0/Global Settings#Cargo_translation_table_.2809.29 | cargo translation table]]. GRFs with such a table generally use the index of the cargo in the table instead of the value of this property to access a cargo. As such this property is more or less a default value for GRFs without cargo translation table. If you are unsure what value to assign to this property, set it to the same value as the cargo slot ID.&lt;br /&gt;
&lt;br /&gt;
=== TextID for the cargo type name (09) ===&lt;br /&gt;
&lt;br /&gt;
This textID should refer to the name of the cargo, capitalized, to match the TTD style (e.g. &amp;quot;Passengers&amp;quot;, &amp;quot;Coal&amp;quot;, &amp;quot;Gold Ore&amp;quot;, &amp;quot;Milk&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
You can reuse existing [[TextIDs]] or create custom strings using [[Action4]] with an offset in the DCxx range. Note that you need to set language-id bit 7 as well in the Action4 for a custom string. (Also applies to properties 0A to 0D)&lt;br /&gt;
&lt;br /&gt;
=== TextID for one unit of the type (0A) ===&lt;br /&gt;
&lt;br /&gt;
This textID should refer to the cargo type name in the singular. Currently, this ID is used only in subsidy messages (&amp;quot;First Passenger service...&amp;quot; instead of &amp;quot;First Passengers service...&amp;quot;, for example)&lt;br /&gt;
&lt;br /&gt;
=== TextID for 1 unit of cargo (0B) ===&lt;br /&gt;
&lt;br /&gt;
This textID will be used to display the amount of the cargo if there&#039;s exactly 1 unit waiting. Although there&#039;s only one unit waiting, you&#039;ll still have to use either the special character 7C (print signed word) or 87 (print amount in litres and add suffix &amp;quot; litres&amp;quot;) so TTD removes the amount from its internal reference stack. For example, if you have a new cargo named &amp;quot;gold ore&amp;quot;, this should be &amp;quot;\7C ton of gold ore&amp;quot;, which will expand to &amp;quot;1 ton of gold ore&amp;quot;. On the other hand, a liquid cargo named &amp;quot;milk&amp;quot; should be something like &amp;quot;\87 of milk&amp;quot;, which will expand to either &amp;quot;100 litres of milk&amp;quot; or &amp;quot;1,000 litres of milk&amp;quot; (The multiplier for liquid cargos depends on miscmods.dontfixlitres. If it&#039;s on, the multiplier is 100, otherwise it&#039;s 1000)&lt;br /&gt;
&lt;br /&gt;
=== TextID for multiple units of cargo (0C) ===&lt;br /&gt;
&lt;br /&gt;
This textID will be used to display the amount of cargo if the amount waiting isn&#039;t exactly 1. You&#039;ll need the same special characters as above, but now they will be expanded according to the actual cargo waiting. Sticking to the example above, you&#039;ll need &amp;quot;\7C tons of gold ore&amp;quot; and &amp;quot;\87 of milk&amp;quot;, which can expand to &amp;quot;42 tons of gold ore&amp;quot; and &amp;quot;42,000 litres of milk&amp;quot;, accordingly. You will note that liquid cargos can have the same textID for both property 0B and 0C since they always use the plural form.&lt;br /&gt;
&lt;br /&gt;
=== TextID for cargo type abbreviation (0D) ===&lt;br /&gt;
&lt;br /&gt;
This textID will be used in the station list window to represent the cargo waiting. It should be a two-letter abbreviation prefixed by the special character 0E to switch to the microscopic font. The microscopic font has every letter capitalized, so capitalization isn&#039;t important here. Continuing the above example, gold ore could have this as &amp;quot;GO&amp;quot; and milk as &amp;quot;MK&amp;quot; (&amp;quot;ML&amp;quot; is already taken by mail).&lt;br /&gt;
&lt;br /&gt;
=== Sprite number for icon (0E) ===&lt;br /&gt;
&lt;br /&gt;
This is a sprite number of an old TTD sprite to be displayed in the station window for this cargo, or FFFFh if the icon should be found by following the action 3 associated with this cargo. The icon must not be bigger than 10x10 pixels. One icon will be shown for every 10 units of the cargo waiting, up to 23 icons, which is the maximum.&lt;br /&gt;
&lt;br /&gt;
=== Weight of one unit of the cargo (0F) ===&lt;br /&gt;
&lt;br /&gt;
This property defines the weight of 1 unit from the cargo, which will be used to calculate the weight of the vehicles when loaded. The unit is 1/16 ton (which is 62.5 kg). With the examples above, gold ore should have this as 16 (since 1 ton of gold ore should weigh exactly 1 ton), while milk should have this slightly above 16 (milk is denser than water).&lt;br /&gt;
&lt;br /&gt;
=== Penalty times and price factor (10,11,12) ===&lt;br /&gt;
&lt;br /&gt;
These three values define how much is paid for the delivery of the cargo type. The price factor is subject to inflation, but GRFs needn&#039;t care about this, the programme will adjust the price for them.&lt;br /&gt;
&lt;br /&gt;
The income generated from cargo delivery is calculated as:&lt;br /&gt;
&lt;br /&gt;
income=((((distance/2) * timefactor * amount_moved) &amp;gt;&amp;gt; 7) * cargopricefactor) &amp;gt;&amp;gt; 13&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
; a &amp;gt;&amp;gt; b : means a is arithmetically shifted right by b bits&lt;br /&gt;
; distance : is the Manhattan distance between the two station signs&lt;br /&gt;
; amount_moved : is the number of cargo units moved&lt;br /&gt;
; cargopricefactor : is the value you set in property 12. Inflation will be applied automatically on it.&lt;br /&gt;
; timefactor : is a multiplier in the range 0..255, calculated in the following way: (T1 is the value of property 10, T2 is the value of property 11, t is the time the delivery took, the unit is 185 game ticks (roughly 2.5 game days) )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    if t&amp;lt;=T1 then timefactor=255&lt;br /&gt;
    else if t&amp;lt;=(T1+T2) then timefactor=255-(t-T1)&lt;br /&gt;
    else timefactor=255-(t-T1)-(t-T1-T2)&lt;br /&gt;
    if the above rules result in a timefactor less than 31, 31 is used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Color for the station list window (13) ===&lt;br /&gt;
&lt;br /&gt;
This color index will be used to draw the rectangle representing the amount waiting from the current cargo type in the station list window. The index should be given for the DOS palette. OpenTTD and TTDPatch will automatically translate the index for the Windows palette, if they use the windows base graphics.&lt;br /&gt;
&lt;br /&gt;
=== Color for the cargo payment list window (14) ===&lt;br /&gt;
&lt;br /&gt;
The graph of the current cargo will be drawn using this color in the cargo payment rates graph. The index should be given for the DOS palette, the Windows version of TTDPatch will automatically translate the index for the Windows palette.&lt;br /&gt;
&lt;br /&gt;
=== CargoClasses (16) ===&lt;br /&gt;
&lt;br /&gt;
See [[Action0Trains#Cargo classes .2828.2C_29.29|train prop. 28/29]] for a description of the utility of this property.&lt;br /&gt;
&lt;br /&gt;
This is a bit mask of all cargo classes to which this cargo could belong.&lt;br /&gt;
The following classes are available:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
!bit&lt;br /&gt;
!value&lt;br /&gt;
!class name&lt;br /&gt;
!wagon type&amp;lt;ref name=vehicle&amp;gt;Suggestion for vehicle types which transport this cargo&amp;lt;/ref&amp;gt;&lt;br /&gt;
!usage&amp;lt;ref name=refitusage&amp;gt;Suggestion how to best make use of this class in the refit masks of vehicles&amp;lt;br&amp;gt;OR to be included in the &#039;allowed classes&#039; (train prop. 28), AND NOT in the &#039;disallowed classes&#039; (train prop. 29)&amp;lt;/ref&amp;gt;&lt;br /&gt;
!vehicle tips&amp;lt;ref name=vehicleuse&amp;gt;Suggestions this class should be used in the property which excludes a class of cargos from a vehicle. One specific type of cargo could appear both as liquid or as piece goods (e.g. milk), which depends on the actual representation. Thus excluding the other would disallow refit to that cargo.&amp;lt;/ref&amp;gt;&lt;br /&gt;
!industry tips&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Passengers&lt;br /&gt;
|passenger wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|do not combine with other flags&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mail&lt;br /&gt;
|closed or mail wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|do not combine with other flags&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4&lt;br /&gt;
|Express&lt;br /&gt;
|closed or mail wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude, suitable for airplane or maglev&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|8&lt;br /&gt;
|Armored&lt;br /&gt;
|armored or mail wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|do not combine with other flags&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|10&lt;br /&gt;
|Bulk (Uncountable)&lt;br /&gt;
|open or hopper wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|may be combined with Piece Goods or Liquid to simulate multiple modes of transport&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|20&lt;br /&gt;
|Piece Goods (Countable)&lt;br /&gt;
|closed or open wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|may be combined with Bulk or Liquid to simulate multiple modes of transport&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|40&lt;br /&gt;
|Liquid&lt;br /&gt;
|tank wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|may be combined with Piece Goods or Bulk to simulate multiple modes of transport&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|80&lt;br /&gt;
|Refrigerated&lt;br /&gt;
|refrigerated wagon&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when Piece Goods included&lt;br /&gt;
|also set Piece Goods&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|100&lt;br /&gt;
|Hazardous&lt;br /&gt;
|unknown&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when special wagons are provided.&lt;br /&gt;
|combine with Piece Goods, Liquid, Bulk or Express&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|200&lt;br /&gt;
|Covered (weather protected)&lt;br /&gt;
|closed wagon, any other wagon with tarpaulin or weather cover&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|do not exclude for Liquid&lt;br /&gt;
|combine with Piece Goods or Bulk&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|400&lt;br /&gt;
|Oversized&lt;br /&gt;
|stake/flatbed wagon&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when Piece Goods included&lt;br /&gt;
|combine with Piece Goods&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|800&lt;br /&gt;
|Powderized (dry powdered materials that flow under air pressure)&lt;br /&gt;
|powder/silo vehicle equipped for compressed air unloading&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when Bulk included&lt;br /&gt;
|combine with Bulk&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|1000&lt;br /&gt;
|Not Pourable&lt;br /&gt;
|open wagon, but not hopper wagon&lt;br /&gt;
|AND NOT&lt;br /&gt;
|only exclude, when Bulk included&lt;br /&gt;
|combine with Bulk&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|2000&lt;br /&gt;
|Potable&lt;br /&gt;
| exclude from non-food-grade vehicles&lt;br /&gt;
| AND NOT&lt;br /&gt;
| exclude&lt;br /&gt;
| set for all food-grade freight cargos&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|4000&lt;br /&gt;
|Non-potable.&lt;br /&gt;
| exclude from food-grade vehicles&lt;br /&gt;
| AND NOT&lt;br /&gt;
| exclude&lt;br /&gt;
| set for all non-food-grade freight cargos&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|8000&lt;br /&gt;
|special&lt;br /&gt;
|and not&lt;br /&gt;
|none&lt;br /&gt;
|special use&lt;br /&gt;
|do not set&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only cargos which are in class 0 (passengers) will appear in bus stations. Only cargos which are &#039;&#039;not&#039;&#039; in class 0 will appear in truck stations.&lt;br /&gt;
&lt;br /&gt;
Disclaimer: there is no guarantee that classes won&#039;t vary over time or between sets.  The classes of a cargo may change between different versions of a specific industry/cargo newgrf, or different classes may be set for the same cargo label by different industry/cargo newgrfs.   Feel free to use classes in your set for conveniently refitting to cargos, but if you - the vehicle author - care about specific cargos being transported in specific vehicles, use label based refits (changing labels without a very good reason is considered to be bad practice).&lt;br /&gt;
&lt;br /&gt;
=== Cargo label (17) ===&lt;br /&gt;
&lt;br /&gt;
Cargo labels are globally [[CargoTypes#Cargo Labels|unique identifiers]] for a cargo type. They are used to allow vehicle grfs to easily support many cargo types, whether they are active or not and no matter what slot or bit they are using.&lt;br /&gt;
&lt;br /&gt;
Read about the [[Action0/Global Settings#Cargo translation table 09|cargo translation table]] for further info.&lt;br /&gt;
&lt;br /&gt;
=== Substitute type and multiplier for town growth (18, 19) ===&lt;br /&gt;
&lt;br /&gt;
These properties allow you to modify how a cargo type affects town growth. Property 18 can contain one of the following values:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Value!!Meaning!!{{ottdp|0.7|no}} Details&amp;lt;ref&amp;gt;This is the interpretation of OpenTTD. For TTDPatch see [http://www.tt-wiki.net/wiki/NewTownGrowthSwitches NewTownGrowthMechanism], which is quite different/unrelated.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|00||Affect towns as passengers do||Cargo produced by houses is added to the statistics in the town GUI.&lt;br /&gt;
|-&lt;br /&gt;
|02||Affect towns as mail does||Cargo produced by houses is added to the statistics in the town GUI.&lt;br /&gt;
|-&lt;br /&gt;
|05||Affect towns as goods/candy does||See note about subsidies below.&lt;br /&gt;
|-&lt;br /&gt;
|09||Affect towns as water does||Second required cargo for towngrowth in the desert&lt;br /&gt;
|-&lt;br /&gt;
|0B||Affect towns as food/fizzy drinks do||First required cargo for towngrowth in desert/above snowline. Alse see note about subsidies below.&lt;br /&gt;
|-&lt;br /&gt;
|FF||Don&#039;t affect town growth (default)|| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no|2.5|ttdprev=alpha 72}} The incoming cargo amount is multiplied by property 19, then divided by 256 before it is added to the town statistics. This allows you to have smaller or bigger impact than original cargoes do. &lt;br /&gt;
&lt;br /&gt;
If no cargos in the game are defined as food (0B), towns above the snowline will not require food to grow. If no cargos in the game are defined as food (0B) or water (09), towns in desert will not require food or water to grow.  This can be used positively for gameplay purposes, and is otherwise worth being aware of as an unintended side effect when designing cargos.&lt;br /&gt;
&lt;br /&gt;
Please note that cargoes accepted by industries affect the closest town as well; for example, if you have an industry that accepts passengers, every passenger brought to the industry affects the town just like if they were transported to the town directly. Usually, it&#039;s not a good idea to have industries that process such cargoes; they should be accepted by towns only.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|0.6-1.1|no}} In OpenTTD up to 1.1 (not 1.2) property 18 also affects the creation of subsidies. Usually subsidies apply to cargo transportation between two industries. For cargos with substitution-type 05 or 0B the destination will be a town instead. Independent of property 18 subsidies from town to town are only created for cargo slot 0 (Passengers).&lt;br /&gt;
&lt;br /&gt;
=== Callback flags (1A) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Var. 0C!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||39||Custom profit calculation&lt;br /&gt;
|-&lt;br /&gt;
|1||2||145||Custom station rating calculation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TextID for displaying the units of a cargo (1B) ===&lt;br /&gt;
&lt;br /&gt;
This textID is used by OpenTTD to show the &amp;quot;short cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 litres&amp;quot; or &amp;quot;10 tonnes&amp;quot;. This textID must be set after property 0B. The text this textID refers to should properly handle plurals, e.g. &amp;quot;\7B item\9A\15\80\9A\10\9A\11s\9A\12&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The default for this textID depends on the default for property 0B; if the default 0B string has &amp;quot;litre&amp;quot;, then the default for this textID will be the unit for litres. OpenTTD maps the following textIDs so you don&#039;t need to provide translations:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!textID!!String&lt;br /&gt;
|-&lt;br /&gt;
|004f||&amp;lt;num&amp;gt; passenger(s)&lt;br /&gt;
|-&lt;br /&gt;
|0050||&amp;lt;num&amp;gt; tonne(s)&lt;br /&gt;
|-&lt;br /&gt;
|0051||&amp;lt;num&amp;gt; bag(s)&lt;br /&gt;
|-&lt;br /&gt;
|0052||&amp;lt;num&amp;gt; litre(s)&lt;br /&gt;
|-&lt;br /&gt;
|0053||&amp;lt;num&amp;gt; item(s)&lt;br /&gt;
|-&lt;br /&gt;
|0054||&amp;lt;num&amp;gt; crate(s)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;tonne&amp;quot; and &amp;quot;litre&amp;quot; strings (textID 0050 and 0052) are automatically updated based on the user settings of unit display, e.g. they &amp;quot;tonne&amp;quot; might become &amp;quot;kg&amp;quot;. The &amp;quot;(s)&amp;quot; is for display purposes; in reality that is a choice list.&lt;br /&gt;
&lt;br /&gt;
=== TextID for displaying the amount of cargo (1C) ===&lt;br /&gt;
&lt;br /&gt;
This textID is used by OpenTTD to show the &amp;quot;long cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 litres of water&amp;quot; or &amp;quot;10 tonnes of coal&amp;quot;. This textID must be set after property 0c. The text this textID refers to should properly handle plurals, e.g. &amp;quot;\7B item\9A\15\80\9A\10\9A\11s\9A\12 of livestock&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The default for this textID depends on the default for property 0C, but with support for plurals. For &amp;quot;X litre(s)&amp;quot; or &amp;quot;X tonne(s)&amp;quot; you should respectively use string codes 87 and 9A 0D.&lt;br /&gt;
&lt;br /&gt;
=== Capacity multiplier (1D) ===&lt;br /&gt;
&lt;br /&gt;
This defines the capacity (and indirectly loading speed) of vehicles carrying this cargo type, if the vehicle sets no specific capacity to this specific cargo type.&lt;br /&gt;
&lt;br /&gt;
Set this property to the amount of cargo a vehicle shall carry, which can carry 0x100 (256) tons of coal or 0x100 (256) thousand litres of water (whatever comparison is more suitable for your cargotype). Depending on whether your cargo type is light or heavy you should set this property either comparing the weight or the volume.&lt;br /&gt;
&lt;br /&gt;
The default value of this property is:&lt;br /&gt;
{| |-&lt;br /&gt;
! Cargo slot !! Default cargo in this slot !! Property 1D !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 00 || PASS || 0x400 || A vehicle carrying 1 ton of coal, can carry 4 passengers.&lt;br /&gt;
|-&lt;br /&gt;
| 02 || MAIL || 0x200 || A vehicle carrying 1 ton of coal, can carry 2 bags of mail.&lt;br /&gt;
|-&lt;br /&gt;
| 05 || GOOD, SWET || 0x200 || A vehicle carrying 1 ton of coal, can carry 2 crates of goods/sweets.&lt;br /&gt;
|-&lt;br /&gt;
| xx || (everything else) || 0x100 || All other slots default to 0x100, i.e. 1 unit of cargo equals 1 ton of coal.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Town Production effect (1E) ===&lt;br /&gt;
&lt;br /&gt;
This properties allow you to directly modify how a town produces cargo. Property 1E can contain one of the following values:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|00||Towns produce cargo as passengers&lt;br /&gt;
|-&lt;br /&gt;
|02||Towns produce cargo as mail&lt;br /&gt;
|-&lt;br /&gt;
|FF||Towns don&#039;t produce cargo (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Town Production multiplier (1F) ===&lt;br /&gt;
&lt;br /&gt;
Set this property to the amount of cargo a town will produce, relative to the normal amount for that town production effect (passengers or mail.) The default value is 0x100 (256), use a lower value to produce less cargo, or a higher value to produce more cargo.&lt;br /&gt;
&lt;br /&gt;
Properties 1E and 1F are an alternative to the cargo production callback of houses, and allow for cargo to be set up to be produced by towns without having to redefine any houses, although it is not as flexible.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Cargos&amp;diff=4893</id>
		<title>Action0/Cargos</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Cargos&amp;diff=4893"/>
		<updated>2024-11-23T19:48:54Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* CargoClasses (16) */  bits 13 and 14 defined as potable and non-potable by https://github.com/OpenTTD/OpenTTD/pull/12979&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The [[ttwiki:NewCargos|NewCargos]] switch of TTDPatch allows modifying the existing 12 cargos per climate, and allows adding 20 new cargos per climate as well. These cargo slots are numbered from 0 to 31, where slots 0-11 are used by default TTD cargos and slots 12-31 contain uninitialized garbage by default (so you can&#039;t trust them having meaningful information, you must set all of their properties).&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=11ab3c4e}} OpenTTD 1.9 increases the number of cargos to 64.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||B||{{ottdp|0.6|2.5}}||Bit number for bitmasks&lt;br /&gt;
|-&lt;br /&gt;
|09||W||{{ottdp|0.6|2.5}}||TextID for the cargo type name&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|0.6|2.5}}||TextID for the name of one unit from the cargo type&lt;br /&gt;
|-&lt;br /&gt;
|0B||W||{{ottdp|0.6|2.5}}||TextID to be displayed for 1 unit of cargo&lt;br /&gt;
|-&lt;br /&gt;
|0C||W||{{ottdp|0.6|2.5}}||TextID to be displayed for multiple units of cargo&lt;br /&gt;
|-&lt;br /&gt;
|0D||W||{{ottdp|0.6|2.5}}||TextID for cargo type abbreviation&lt;br /&gt;
|-&lt;br /&gt;
|0E||W||{{ottdp|0.6|2.5}}||Sprite number for the icon of the cargo&lt;br /&gt;
|-&lt;br /&gt;
|0F||B||{{ottdp|0.6|2.5}}||Weight of one unit of the cargo&lt;br /&gt;
|-&lt;br /&gt;
|10,11||B||{{ottdp|0.6|2.5}}||Penalty times&lt;br /&gt;
|-&lt;br /&gt;
|12||D||{{ottdp|0.6|2.5}}||Base price&lt;br /&gt;
|-&lt;br /&gt;
|13||B||{{ottdp|0.6|2.5}}||Color for the station list window&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|0.6|2.5}}||Color for the cargo payment list window&lt;br /&gt;
|-&lt;br /&gt;
|15||B||{{ottdp|0.6|2.5}}||Freight status (for freight-weight-multiplier setting); 0=not freight, 1=is freight&lt;br /&gt;
|-&lt;br /&gt;
|16||W||{{ottdp|0.6|2.5}}||Cargo classes&lt;br /&gt;
|-&lt;br /&gt;
|17||D||{{ottdp|0.6|2.5}}||Cargo label&lt;br /&gt;
|-&lt;br /&gt;
|18||B||{{ottdp|0.6|2.5|ttdprev=alpha 72}}||Substitute type for town growth&lt;br /&gt;
|-&lt;br /&gt;
|19||W||{{ottdp|no|2.5|ttdprev=alpha 72}}||Multiplier for town growth&lt;br /&gt;
|-&lt;br /&gt;
|1A||B||{{ottdp|0.6|2.5|ttdprev=alpha 72}}||Callback flags&lt;br /&gt;
|-&lt;br /&gt;
|1B||W||{{ottdp|1.1|no|ottdrev=r21224}}||TextID for displaying the units of a cargo&lt;br /&gt;
|-&lt;br /&gt;
|1C||W||{{ottdp|1.1|no|ottdrev=r21224}}||TextID for displaying the amount of cargo&lt;br /&gt;
|-&lt;br /&gt;
|1D||W||{{ottdp|1.2|no|ottdrev=r23860}}||Capacity mulitplier&lt;br /&gt;
|-&lt;br /&gt;
|1E||B||{{ottdp|14.0|no}}||Town Production effect&lt;br /&gt;
|-&lt;br /&gt;
|1F||W||{{ottdp|14.0|no}}||Town Production multiplier&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Bit number for bitmasks (08) ===&lt;br /&gt;
&lt;br /&gt;
This value must be used in [[Action3]] and in cargo bit mask properties such as refit masks. Values 1C-1F should be safe to use (if they aren&#039;t already taken, of course) if you intend to maintain compatibility with GRFs unaware of the newcargos switch. Further assuming that no active GRFs support the toyland climate, you can use values 11-1A as well.&lt;br /&gt;
&lt;br /&gt;
Additionally, you can use the value FFh to disable the given cargo slot. This way, it won&#039;t appear in cargo type lists, but it won&#039;t be removed from things already on the map. If you disable a cargo, you&#039;ll probably want to zero out the cargo label (property 17) as well.&lt;br /&gt;
&lt;br /&gt;
This property only affects GRFs which do not have a [[Action0/Global Settings#Cargo_translation_table_.2809.29 | cargo translation table]]. GRFs with such a table generally use the index of the cargo in the table instead of the value of this property to access a cargo. As such this property is more or less a default value for GRFs without cargo translation table. If you are unsure what value to assign to this property, set it to the same value as the cargo slot ID.&lt;br /&gt;
&lt;br /&gt;
=== TextID for the cargo type name (09) ===&lt;br /&gt;
&lt;br /&gt;
This textID should refer to the name of the cargo, capitalized, to match the TTD style (e.g. &amp;quot;Passengers&amp;quot;, &amp;quot;Coal&amp;quot;, &amp;quot;Gold Ore&amp;quot;, &amp;quot;Milk&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
You can reuse existing [[TextIDs]] or create custom strings using [[Action4]] with an offset in the DCxx range. Note that you need to set language-id bit 7 as well in the Action4 for a custom string. (Also applies to properties 0A to 0D)&lt;br /&gt;
&lt;br /&gt;
=== TextID for one unit of the type (0A) ===&lt;br /&gt;
&lt;br /&gt;
This textID should refer to the cargo type name in the singular. Currently, this ID is used only in subsidy messages (&amp;quot;First Passenger service...&amp;quot; instead of &amp;quot;First Passengers service...&amp;quot;, for example)&lt;br /&gt;
&lt;br /&gt;
=== TextID for 1 unit of cargo (0B) ===&lt;br /&gt;
&lt;br /&gt;
This textID will be used to display the amount of the cargo if there&#039;s exactly 1 unit waiting. Although there&#039;s only one unit waiting, you&#039;ll still have to use either the special character 7C (print signed word) or 87 (print amount in litres and add suffix &amp;quot; litres&amp;quot;) so TTD removes the amount from its internal reference stack. For example, if you have a new cargo named &amp;quot;gold ore&amp;quot;, this should be &amp;quot;\7C ton of gold ore&amp;quot;, which will expand to &amp;quot;1 ton of gold ore&amp;quot;. On the other hand, a liquid cargo named &amp;quot;milk&amp;quot; should be something like &amp;quot;\87 of milk&amp;quot;, which will expand to either &amp;quot;100 litres of milk&amp;quot; or &amp;quot;1,000 litres of milk&amp;quot; (The multiplier for liquid cargos depends on miscmods.dontfixlitres. If it&#039;s on, the multiplier is 100, otherwise it&#039;s 1000)&lt;br /&gt;
&lt;br /&gt;
=== TextID for multiple units of cargo (0C) ===&lt;br /&gt;
&lt;br /&gt;
This textID will be used to display the amount of cargo if the amount waiting isn&#039;t exactly 1. You&#039;ll need the same special characters as above, but now they will be expanded according to the actual cargo waiting. Sticking to the example above, you&#039;ll need &amp;quot;\7C tons of gold ore&amp;quot; and &amp;quot;\87 of milk&amp;quot;, which can expand to &amp;quot;42 tons of gold ore&amp;quot; and &amp;quot;42,000 litres of milk&amp;quot;, accordingly. You will note that liquid cargos can have the same textID for both property 0B and 0C since they always use the plural form.&lt;br /&gt;
&lt;br /&gt;
=== TextID for cargo type abbreviation (0D) ===&lt;br /&gt;
&lt;br /&gt;
This textID will be used in the station list window to represent the cargo waiting. It should be a two-letter abbreviation prefixed by the special character 0E to switch to the microscopic font. The microscopic font has every letter capitalized, so capitalization isn&#039;t important here. Continuing the above example, gold ore could have this as &amp;quot;GO&amp;quot; and milk as &amp;quot;MK&amp;quot; (&amp;quot;ML&amp;quot; is already taken by mail).&lt;br /&gt;
&lt;br /&gt;
=== Sprite number for icon (0E) ===&lt;br /&gt;
&lt;br /&gt;
This is a sprite number of an old TTD sprite to be displayed in the station window for this cargo, or FFFFh if the icon should be found by following the action 3 associated with this cargo. The icon must not be bigger than 10x10 pixels. One icon will be shown for every 10 units of the cargo waiting, up to 23 icons, which is the maximum.&lt;br /&gt;
&lt;br /&gt;
=== Weight of one unit of the cargo (0F) ===&lt;br /&gt;
&lt;br /&gt;
This property defines the weight of 1 unit from the cargo, which will be used to calculate the weight of the vehicles when loaded. The unit is 1/16 ton (which is 62.5 kg). With the examples above, gold ore should have this as 16 (since 1 ton of gold ore should weigh exactly 1 ton), while milk should have this slightly above 16 (milk is denser than water).&lt;br /&gt;
&lt;br /&gt;
=== Penalty times and price factor (10,11,12) ===&lt;br /&gt;
&lt;br /&gt;
These three values define how much is paid for the delivery of the cargo type. The price factor is subject to inflation, but GRFs needn&#039;t care about this, the programme will adjust the price for them.&lt;br /&gt;
&lt;br /&gt;
The income generated from cargo delivery is calculated as:&lt;br /&gt;
&lt;br /&gt;
income=((((distance/2) * timefactor * amount_moved) &amp;gt;&amp;gt; 7) * cargopricefactor) &amp;gt;&amp;gt; 13&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
; a &amp;gt;&amp;gt; b : means a is arithmetically shifted right by b bits&lt;br /&gt;
; distance : is the Manhattan distance between the two station signs&lt;br /&gt;
; amount_moved : is the number of cargo units moved&lt;br /&gt;
; cargopricefactor : is the value you set in property 12. Inflation will be applied automatically on it.&lt;br /&gt;
; timefactor : is a multiplier in the range 0..255, calculated in the following way: (T1 is the value of property 10, T2 is the value of property 11, t is the time the delivery took, the unit is 185 game ticks (roughly 2.5 game days) )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    if t&amp;lt;=T1 then timefactor=255&lt;br /&gt;
    else if t&amp;lt;=(T1+T2) then timefactor=255-(t-T1)&lt;br /&gt;
    else timefactor=255-(t-T1)-(t-T1-T2)&lt;br /&gt;
    if the above rules result in a timefactor less than 31, 31 is used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Color for the station list window (13) ===&lt;br /&gt;
&lt;br /&gt;
This color index will be used to draw the rectangle representing the amount waiting from the current cargo type in the station list window. The index should be given for the DOS palette. OpenTTD and TTDPatch will automatically translate the index for the Windows palette, if they use the windows base graphics.&lt;br /&gt;
&lt;br /&gt;
=== Color for the cargo payment list window (14) ===&lt;br /&gt;
&lt;br /&gt;
The graph of the current cargo will be drawn using this color in the cargo payment rates graph. The index should be given for the DOS palette, the Windows version of TTDPatch will automatically translate the index for the Windows palette.&lt;br /&gt;
&lt;br /&gt;
=== CargoClasses (16) ===&lt;br /&gt;
&lt;br /&gt;
See [[Action0Trains#Cargo classes .2828.2C_29.29|train prop. 28/29]] for a description of the utility of this property.&lt;br /&gt;
&lt;br /&gt;
This is a bit mask of all cargo classes to which this cargo could belong.&lt;br /&gt;
The following classes are available:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
!bit&lt;br /&gt;
!value&lt;br /&gt;
!class name&lt;br /&gt;
!wagon type&amp;lt;ref name=vehicle&amp;gt;Suggestion for vehicle types which transport this cargo&amp;lt;/ref&amp;gt;&lt;br /&gt;
!usage&amp;lt;ref name=refitusage&amp;gt;Suggestion how to best make use of this class in the refit masks of vehicles&amp;lt;br&amp;gt;OR to be included in the &#039;allowed classes&#039; (train prop. 28), AND NOT in the &#039;disallowed classes&#039; (train prop. 29)&amp;lt;/ref&amp;gt;&lt;br /&gt;
!vehicle tips&amp;lt;ref name=vehicleuse&amp;gt;Suggestions this class should be used in the property which excludes a class of cargos from a vehicle. One specific type of cargo could appear both as liquid or as piece goods (e.g. milk), which depends on the actual representation. Thus excluding the other would disallow refit to that cargo.&amp;lt;/ref&amp;gt;&lt;br /&gt;
!industry tips&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Passengers&lt;br /&gt;
|passenger wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|do not combine with other flags&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mail&lt;br /&gt;
|closed or mail wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|do not combine with other flags&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4&lt;br /&gt;
|Express&lt;br /&gt;
|closed or mail wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude, suitable for airplane or maglev&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|8&lt;br /&gt;
|Armored&lt;br /&gt;
|armored or mail wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|do not combine with other flags&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|10&lt;br /&gt;
|Bulk (Uncountable)&lt;br /&gt;
|open or hopper wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|may be combined with Piece Goods or Liquid to simulate multiple modes of transport&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|20&lt;br /&gt;
|Piece Goods (Countable)&lt;br /&gt;
|closed or open wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|may be combined with Bulk or Liquid to simulate multiple modes of transport&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|40&lt;br /&gt;
|Liquid&lt;br /&gt;
|tank wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|may be combined with Piece Goods or Bulk to simulate multiple modes of transport&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|80&lt;br /&gt;
|Refrigerated&lt;br /&gt;
|refrigerated wagon&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when Piece Goods included&lt;br /&gt;
|also set Piece Goods&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|100&lt;br /&gt;
|Hazardous&lt;br /&gt;
|unknown&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when special wagons are provided.&lt;br /&gt;
|combine with Piece Goods, Liquid, Bulk or Express&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|200&lt;br /&gt;
|Covered (weather protected)&lt;br /&gt;
|closed wagon, any other wagon with tarpaulin or weather cover&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|do not exclude for Liquid&lt;br /&gt;
|combine with Piece Goods or Bulk&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|400&lt;br /&gt;
|Oversized&lt;br /&gt;
|stake/flatbed wagon&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when Piece Goods included&lt;br /&gt;
|combine with Piece Goods&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|800&lt;br /&gt;
|Powderized (dry powdered materials that flow under air pressure)&lt;br /&gt;
|powder/silo vehicle equipped for compressed air unloading&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when Bulk included&lt;br /&gt;
|combine with Bulk&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|1000&lt;br /&gt;
|Not Pourable&lt;br /&gt;
|open wagon, but not hopper wagon&lt;br /&gt;
|AND NOT&lt;br /&gt;
|only exclude, when Bulk included&lt;br /&gt;
|combine with Bulk&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|2000&lt;br /&gt;
|Potable&lt;br /&gt;
| Exclude from non-food-grade vehicles&lt;br /&gt;
| AND NOT&lt;br /&gt;
| Exclude&lt;br /&gt;
| Set for all food-grade freight cargos&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|4000&lt;br /&gt;
|Non-potable.&lt;br /&gt;
| Exclude from food-grade vehicles&lt;br /&gt;
| AND NOT&lt;br /&gt;
| Exclude&lt;br /&gt;
| Set for all non-food-grade freight cargos&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|8000&lt;br /&gt;
|special&lt;br /&gt;
|and not&lt;br /&gt;
|none&lt;br /&gt;
|special use&lt;br /&gt;
|do not set&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only cargos which are in class 0 (passengers) will appear in bus stations. Only cargos which are &#039;&#039;not&#039;&#039; in class 0 will appear in truck stations.&lt;br /&gt;
&lt;br /&gt;
Disclaimer: there is no guarantee that classes won&#039;t vary over time or between sets.  The classes of a cargo may change between different versions of a specific industry/cargo newgrf, or different classes may be set for the same cargo label by different industry/cargo newgrfs.   Feel free to use classes in your set for conveniently refitting to cargos, but if you - the vehicle author - care about specific cargos being transported in specific vehicles, use label based refits (changing labels without a very good reason is considered to be bad practice).&lt;br /&gt;
&lt;br /&gt;
=== Cargo label (17) ===&lt;br /&gt;
&lt;br /&gt;
Cargo labels are globally [[CargoTypes#Cargo Labels|unique identifiers]] for a cargo type. They are used to allow vehicle grfs to easily support many cargo types, whether they are active or not and no matter what slot or bit they are using.&lt;br /&gt;
&lt;br /&gt;
Read about the [[Action0/Global Settings#Cargo translation table 09|cargo translation table]] for further info.&lt;br /&gt;
&lt;br /&gt;
=== Substitute type and multiplier for town growth (18, 19) ===&lt;br /&gt;
&lt;br /&gt;
These properties allow you to modify how a cargo type affects town growth. Property 18 can contain one of the following values:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Value!!Meaning!!{{ottdp|0.7|no}} Details&amp;lt;ref&amp;gt;This is the interpretation of OpenTTD. For TTDPatch see [http://www.tt-wiki.net/wiki/NewTownGrowthSwitches NewTownGrowthMechanism], which is quite different/unrelated.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|00||Affect towns as passengers do||Cargo produced by houses is added to the statistics in the town GUI.&lt;br /&gt;
|-&lt;br /&gt;
|02||Affect towns as mail does||Cargo produced by houses is added to the statistics in the town GUI.&lt;br /&gt;
|-&lt;br /&gt;
|05||Affect towns as goods/candy does||See note about subsidies below.&lt;br /&gt;
|-&lt;br /&gt;
|09||Affect towns as water does||Second required cargo for towngrowth in the desert&lt;br /&gt;
|-&lt;br /&gt;
|0B||Affect towns as food/fizzy drinks do||First required cargo for towngrowth in desert/above snowline. Alse see note about subsidies below.&lt;br /&gt;
|-&lt;br /&gt;
|FF||Don&#039;t affect town growth (default)|| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no|2.5|ttdprev=alpha 72}} The incoming cargo amount is multiplied by property 19, then divided by 256 before it is added to the town statistics. This allows you to have smaller or bigger impact than original cargoes do. &lt;br /&gt;
&lt;br /&gt;
If no cargos in the game are defined as food (0B), towns above the snowline will not require food to grow. If no cargos in the game are defined as food (0B) or water (09), towns in desert will not require food or water to grow.  This can be used positively for gameplay purposes, and is otherwise worth being aware of as an unintended side effect when designing cargos.&lt;br /&gt;
&lt;br /&gt;
Please note that cargoes accepted by industries affect the closest town as well; for example, if you have an industry that accepts passengers, every passenger brought to the industry affects the town just like if they were transported to the town directly. Usually, it&#039;s not a good idea to have industries that process such cargoes; they should be accepted by towns only.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|0.6-1.1|no}} In OpenTTD up to 1.1 (not 1.2) property 18 also affects the creation of subsidies. Usually subsidies apply to cargo transportation between two industries. For cargos with substitution-type 05 or 0B the destination will be a town instead. Independent of property 18 subsidies from town to town are only created for cargo slot 0 (Passengers).&lt;br /&gt;
&lt;br /&gt;
=== Callback flags (1A) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Var. 0C!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||39||Custom profit calculation&lt;br /&gt;
|-&lt;br /&gt;
|1||2||145||Custom station rating calculation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TextID for displaying the units of a cargo (1B) ===&lt;br /&gt;
&lt;br /&gt;
This textID is used by OpenTTD to show the &amp;quot;short cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 litres&amp;quot; or &amp;quot;10 tonnes&amp;quot;. This textID must be set after property 0B. The text this textID refers to should properly handle plurals, e.g. &amp;quot;\7B item\9A\15\80\9A\10\9A\11s\9A\12&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The default for this textID depends on the default for property 0B; if the default 0B string has &amp;quot;litre&amp;quot;, then the default for this textID will be the unit for litres. OpenTTD maps the following textIDs so you don&#039;t need to provide translations:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!textID!!String&lt;br /&gt;
|-&lt;br /&gt;
|004f||&amp;lt;num&amp;gt; passenger(s)&lt;br /&gt;
|-&lt;br /&gt;
|0050||&amp;lt;num&amp;gt; tonne(s)&lt;br /&gt;
|-&lt;br /&gt;
|0051||&amp;lt;num&amp;gt; bag(s)&lt;br /&gt;
|-&lt;br /&gt;
|0052||&amp;lt;num&amp;gt; litre(s)&lt;br /&gt;
|-&lt;br /&gt;
|0053||&amp;lt;num&amp;gt; item(s)&lt;br /&gt;
|-&lt;br /&gt;
|0054||&amp;lt;num&amp;gt; crate(s)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;tonne&amp;quot; and &amp;quot;litre&amp;quot; strings (textID 0050 and 0052) are automatically updated based on the user settings of unit display, e.g. they &amp;quot;tonne&amp;quot; might become &amp;quot;kg&amp;quot;. The &amp;quot;(s)&amp;quot; is for display purposes; in reality that is a choice list.&lt;br /&gt;
&lt;br /&gt;
=== TextID for displaying the amount of cargo (1C) ===&lt;br /&gt;
&lt;br /&gt;
This textID is used by OpenTTD to show the &amp;quot;long cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 litres of water&amp;quot; or &amp;quot;10 tonnes of coal&amp;quot;. This textID must be set after property 0c. The text this textID refers to should properly handle plurals, e.g. &amp;quot;\7B item\9A\15\80\9A\10\9A\11s\9A\12 of livestock&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The default for this textID depends on the default for property 0C, but with support for plurals. For &amp;quot;X litre(s)&amp;quot; or &amp;quot;X tonne(s)&amp;quot; you should respectively use string codes 87 and 9A 0D.&lt;br /&gt;
&lt;br /&gt;
=== Capacity multiplier (1D) ===&lt;br /&gt;
&lt;br /&gt;
This defines the capacity (and indirectly loading speed) of vehicles carrying this cargo type, if the vehicle sets no specific capacity to this specific cargo type.&lt;br /&gt;
&lt;br /&gt;
Set this property to the amount of cargo a vehicle shall carry, which can carry 0x100 (256) tons of coal or 0x100 (256) thousand litres of water (whatever comparison is more suitable for your cargotype). Depending on whether your cargo type is light or heavy you should set this property either comparing the weight or the volume.&lt;br /&gt;
&lt;br /&gt;
The default value of this property is:&lt;br /&gt;
{| |-&lt;br /&gt;
! Cargo slot !! Default cargo in this slot !! Property 1D !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 00 || PASS || 0x400 || A vehicle carrying 1 ton of coal, can carry 4 passengers.&lt;br /&gt;
|-&lt;br /&gt;
| 02 || MAIL || 0x200 || A vehicle carrying 1 ton of coal, can carry 2 bags of mail.&lt;br /&gt;
|-&lt;br /&gt;
| 05 || GOOD, SWET || 0x200 || A vehicle carrying 1 ton of coal, can carry 2 crates of goods/sweets.&lt;br /&gt;
|-&lt;br /&gt;
| xx || (everything else) || 0x100 || All other slots default to 0x100, i.e. 1 unit of cargo equals 1 ton of coal.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Town Production effect (1E) ===&lt;br /&gt;
&lt;br /&gt;
This properties allow you to directly modify how a town produces cargo. Property 1E can contain one of the following values:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|00||Towns produce cargo as passengers&lt;br /&gt;
|-&lt;br /&gt;
|02||Towns produce cargo as mail&lt;br /&gt;
|-&lt;br /&gt;
|FF||Towns don&#039;t produce cargo (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Town Production multiplier (1F) ===&lt;br /&gt;
&lt;br /&gt;
Set this property to the amount of cargo a town will produce, relative to the normal amount for that town production effect (passengers or mail.) The default value is 0x100 (256), use a lower value to produce less cargo, or a higher value to produce more cargo.&lt;br /&gt;
&lt;br /&gt;
Properties 1E and 1F are an alternative to the cargo production callback of houses, and allow for cargo to be set up to be produced by towns without having to redefine any houses, although it is not as flexible.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Cargos&amp;diff=4892</id>
		<title>Action0/Cargos</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Cargos&amp;diff=4892"/>
		<updated>2024-11-23T19:45:29Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* CargoClasses (16) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The [[ttwiki:NewCargos|NewCargos]] switch of TTDPatch allows modifying the existing 12 cargos per climate, and allows adding 20 new cargos per climate as well. These cargo slots are numbered from 0 to 31, where slots 0-11 are used by default TTD cargos and slots 12-31 contain uninitialized garbage by default (so you can&#039;t trust them having meaningful information, you must set all of their properties).&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=11ab3c4e}} OpenTTD 1.9 increases the number of cargos to 64.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||B||{{ottdp|0.6|2.5}}||Bit number for bitmasks&lt;br /&gt;
|-&lt;br /&gt;
|09||W||{{ottdp|0.6|2.5}}||TextID for the cargo type name&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|0.6|2.5}}||TextID for the name of one unit from the cargo type&lt;br /&gt;
|-&lt;br /&gt;
|0B||W||{{ottdp|0.6|2.5}}||TextID to be displayed for 1 unit of cargo&lt;br /&gt;
|-&lt;br /&gt;
|0C||W||{{ottdp|0.6|2.5}}||TextID to be displayed for multiple units of cargo&lt;br /&gt;
|-&lt;br /&gt;
|0D||W||{{ottdp|0.6|2.5}}||TextID for cargo type abbreviation&lt;br /&gt;
|-&lt;br /&gt;
|0E||W||{{ottdp|0.6|2.5}}||Sprite number for the icon of the cargo&lt;br /&gt;
|-&lt;br /&gt;
|0F||B||{{ottdp|0.6|2.5}}||Weight of one unit of the cargo&lt;br /&gt;
|-&lt;br /&gt;
|10,11||B||{{ottdp|0.6|2.5}}||Penalty times&lt;br /&gt;
|-&lt;br /&gt;
|12||D||{{ottdp|0.6|2.5}}||Base price&lt;br /&gt;
|-&lt;br /&gt;
|13||B||{{ottdp|0.6|2.5}}||Color for the station list window&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|0.6|2.5}}||Color for the cargo payment list window&lt;br /&gt;
|-&lt;br /&gt;
|15||B||{{ottdp|0.6|2.5}}||Freight status (for freight-weight-multiplier setting); 0=not freight, 1=is freight&lt;br /&gt;
|-&lt;br /&gt;
|16||W||{{ottdp|0.6|2.5}}||Cargo classes&lt;br /&gt;
|-&lt;br /&gt;
|17||D||{{ottdp|0.6|2.5}}||Cargo label&lt;br /&gt;
|-&lt;br /&gt;
|18||B||{{ottdp|0.6|2.5|ttdprev=alpha 72}}||Substitute type for town growth&lt;br /&gt;
|-&lt;br /&gt;
|19||W||{{ottdp|no|2.5|ttdprev=alpha 72}}||Multiplier for town growth&lt;br /&gt;
|-&lt;br /&gt;
|1A||B||{{ottdp|0.6|2.5|ttdprev=alpha 72}}||Callback flags&lt;br /&gt;
|-&lt;br /&gt;
|1B||W||{{ottdp|1.1|no|ottdrev=r21224}}||TextID for displaying the units of a cargo&lt;br /&gt;
|-&lt;br /&gt;
|1C||W||{{ottdp|1.1|no|ottdrev=r21224}}||TextID for displaying the amount of cargo&lt;br /&gt;
|-&lt;br /&gt;
|1D||W||{{ottdp|1.2|no|ottdrev=r23860}}||Capacity mulitplier&lt;br /&gt;
|-&lt;br /&gt;
|1E||B||{{ottdp|14.0|no}}||Town Production effect&lt;br /&gt;
|-&lt;br /&gt;
|1F||W||{{ottdp|14.0|no}}||Town Production multiplier&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Bit number for bitmasks (08) ===&lt;br /&gt;
&lt;br /&gt;
This value must be used in [[Action3]] and in cargo bit mask properties such as refit masks. Values 1C-1F should be safe to use (if they aren&#039;t already taken, of course) if you intend to maintain compatibility with GRFs unaware of the newcargos switch. Further assuming that no active GRFs support the toyland climate, you can use values 11-1A as well.&lt;br /&gt;
&lt;br /&gt;
Additionally, you can use the value FFh to disable the given cargo slot. This way, it won&#039;t appear in cargo type lists, but it won&#039;t be removed from things already on the map. If you disable a cargo, you&#039;ll probably want to zero out the cargo label (property 17) as well.&lt;br /&gt;
&lt;br /&gt;
This property only affects GRFs which do not have a [[Action0/Global Settings#Cargo_translation_table_.2809.29 | cargo translation table]]. GRFs with such a table generally use the index of the cargo in the table instead of the value of this property to access a cargo. As such this property is more or less a default value for GRFs without cargo translation table. If you are unsure what value to assign to this property, set it to the same value as the cargo slot ID.&lt;br /&gt;
&lt;br /&gt;
=== TextID for the cargo type name (09) ===&lt;br /&gt;
&lt;br /&gt;
This textID should refer to the name of the cargo, capitalized, to match the TTD style (e.g. &amp;quot;Passengers&amp;quot;, &amp;quot;Coal&amp;quot;, &amp;quot;Gold Ore&amp;quot;, &amp;quot;Milk&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
You can reuse existing [[TextIDs]] or create custom strings using [[Action4]] with an offset in the DCxx range. Note that you need to set language-id bit 7 as well in the Action4 for a custom string. (Also applies to properties 0A to 0D)&lt;br /&gt;
&lt;br /&gt;
=== TextID for one unit of the type (0A) ===&lt;br /&gt;
&lt;br /&gt;
This textID should refer to the cargo type name in the singular. Currently, this ID is used only in subsidy messages (&amp;quot;First Passenger service...&amp;quot; instead of &amp;quot;First Passengers service...&amp;quot;, for example)&lt;br /&gt;
&lt;br /&gt;
=== TextID for 1 unit of cargo (0B) ===&lt;br /&gt;
&lt;br /&gt;
This textID will be used to display the amount of the cargo if there&#039;s exactly 1 unit waiting. Although there&#039;s only one unit waiting, you&#039;ll still have to use either the special character 7C (print signed word) or 87 (print amount in litres and add suffix &amp;quot; litres&amp;quot;) so TTD removes the amount from its internal reference stack. For example, if you have a new cargo named &amp;quot;gold ore&amp;quot;, this should be &amp;quot;\7C ton of gold ore&amp;quot;, which will expand to &amp;quot;1 ton of gold ore&amp;quot;. On the other hand, a liquid cargo named &amp;quot;milk&amp;quot; should be something like &amp;quot;\87 of milk&amp;quot;, which will expand to either &amp;quot;100 litres of milk&amp;quot; or &amp;quot;1,000 litres of milk&amp;quot; (The multiplier for liquid cargos depends on miscmods.dontfixlitres. If it&#039;s on, the multiplier is 100, otherwise it&#039;s 1000)&lt;br /&gt;
&lt;br /&gt;
=== TextID for multiple units of cargo (0C) ===&lt;br /&gt;
&lt;br /&gt;
This textID will be used to display the amount of cargo if the amount waiting isn&#039;t exactly 1. You&#039;ll need the same special characters as above, but now they will be expanded according to the actual cargo waiting. Sticking to the example above, you&#039;ll need &amp;quot;\7C tons of gold ore&amp;quot; and &amp;quot;\87 of milk&amp;quot;, which can expand to &amp;quot;42 tons of gold ore&amp;quot; and &amp;quot;42,000 litres of milk&amp;quot;, accordingly. You will note that liquid cargos can have the same textID for both property 0B and 0C since they always use the plural form.&lt;br /&gt;
&lt;br /&gt;
=== TextID for cargo type abbreviation (0D) ===&lt;br /&gt;
&lt;br /&gt;
This textID will be used in the station list window to represent the cargo waiting. It should be a two-letter abbreviation prefixed by the special character 0E to switch to the microscopic font. The microscopic font has every letter capitalized, so capitalization isn&#039;t important here. Continuing the above example, gold ore could have this as &amp;quot;GO&amp;quot; and milk as &amp;quot;MK&amp;quot; (&amp;quot;ML&amp;quot; is already taken by mail).&lt;br /&gt;
&lt;br /&gt;
=== Sprite number for icon (0E) ===&lt;br /&gt;
&lt;br /&gt;
This is a sprite number of an old TTD sprite to be displayed in the station window for this cargo, or FFFFh if the icon should be found by following the action 3 associated with this cargo. The icon must not be bigger than 10x10 pixels. One icon will be shown for every 10 units of the cargo waiting, up to 23 icons, which is the maximum.&lt;br /&gt;
&lt;br /&gt;
=== Weight of one unit of the cargo (0F) ===&lt;br /&gt;
&lt;br /&gt;
This property defines the weight of 1 unit from the cargo, which will be used to calculate the weight of the vehicles when loaded. The unit is 1/16 ton (which is 62.5 kg). With the examples above, gold ore should have this as 16 (since 1 ton of gold ore should weigh exactly 1 ton), while milk should have this slightly above 16 (milk is denser than water).&lt;br /&gt;
&lt;br /&gt;
=== Penalty times and price factor (10,11,12) ===&lt;br /&gt;
&lt;br /&gt;
These three values define how much is paid for the delivery of the cargo type. The price factor is subject to inflation, but GRFs needn&#039;t care about this, the programme will adjust the price for them.&lt;br /&gt;
&lt;br /&gt;
The income generated from cargo delivery is calculated as:&lt;br /&gt;
&lt;br /&gt;
income=((((distance/2) * timefactor * amount_moved) &amp;gt;&amp;gt; 7) * cargopricefactor) &amp;gt;&amp;gt; 13&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
; a &amp;gt;&amp;gt; b : means a is arithmetically shifted right by b bits&lt;br /&gt;
; distance : is the Manhattan distance between the two station signs&lt;br /&gt;
; amount_moved : is the number of cargo units moved&lt;br /&gt;
; cargopricefactor : is the value you set in property 12. Inflation will be applied automatically on it.&lt;br /&gt;
; timefactor : is a multiplier in the range 0..255, calculated in the following way: (T1 is the value of property 10, T2 is the value of property 11, t is the time the delivery took, the unit is 185 game ticks (roughly 2.5 game days) )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    if t&amp;lt;=T1 then timefactor=255&lt;br /&gt;
    else if t&amp;lt;=(T1+T2) then timefactor=255-(t-T1)&lt;br /&gt;
    else timefactor=255-(t-T1)-(t-T1-T2)&lt;br /&gt;
    if the above rules result in a timefactor less than 31, 31 is used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Color for the station list window (13) ===&lt;br /&gt;
&lt;br /&gt;
This color index will be used to draw the rectangle representing the amount waiting from the current cargo type in the station list window. The index should be given for the DOS palette. OpenTTD and TTDPatch will automatically translate the index for the Windows palette, if they use the windows base graphics.&lt;br /&gt;
&lt;br /&gt;
=== Color for the cargo payment list window (14) ===&lt;br /&gt;
&lt;br /&gt;
The graph of the current cargo will be drawn using this color in the cargo payment rates graph. The index should be given for the DOS palette, the Windows version of TTDPatch will automatically translate the index for the Windows palette.&lt;br /&gt;
&lt;br /&gt;
=== CargoClasses (16) ===&lt;br /&gt;
&lt;br /&gt;
See [[Action0Trains#Cargo classes .2828.2C_29.29|train prop. 28/29]] for a description of the utility of this property.&lt;br /&gt;
&lt;br /&gt;
This is a bit mask of all cargo classes to which this cargo could belong.&lt;br /&gt;
The following classes are available:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
!bit&lt;br /&gt;
!value&lt;br /&gt;
!class name&lt;br /&gt;
!wagon type&amp;lt;ref name=vehicle&amp;gt;Suggestion for vehicle types which transport this cargo&amp;lt;/ref&amp;gt;&lt;br /&gt;
!usage&amp;lt;ref name=refitusage&amp;gt;Suggestion how to best make use of this class in the refit masks of vehicles&amp;lt;br&amp;gt;OR to be included in the &#039;allowed classes&#039; (train prop. 28), AND NOT in the &#039;disallowed classes&#039; (train prop. 29)&amp;lt;/ref&amp;gt;&lt;br /&gt;
!vehicle tips&amp;lt;ref name=vehicleuse&amp;gt;Suggestions this class should be used in the property which excludes a class of cargos from a vehicle. One specific type of cargo could appear both as liquid or as piece goods (e.g. milk), which depends on the actual representation. Thus excluding the other would disallow refit to that cargo.&amp;lt;/ref&amp;gt;&lt;br /&gt;
!industry tips&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Passengers&lt;br /&gt;
|passenger wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|do not combine with other flags&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mail&lt;br /&gt;
|closed or mail wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|do not combine with other flags&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4&lt;br /&gt;
|Express&lt;br /&gt;
|closed or mail wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude, suitable for airplane or maglev&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|8&lt;br /&gt;
|Armored&lt;br /&gt;
|armored or mail wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|do not combine with other flags&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|10&lt;br /&gt;
|Bulk (Uncountable)&lt;br /&gt;
|open or hopper wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|may be combined with Piece Goods or Liquid to simulate multiple modes of transport&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|20&lt;br /&gt;
|Piece Goods (Countable)&lt;br /&gt;
|closed or open wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|may be combined with Bulk or Liquid to simulate multiple modes of transport&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|40&lt;br /&gt;
|Liquid&lt;br /&gt;
|tank wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|may be combined with Piece Goods or Bulk to simulate multiple modes of transport&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|80&lt;br /&gt;
|Refrigerated&lt;br /&gt;
|refrigerated wagon&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when Piece Goods included&lt;br /&gt;
|also set Piece Goods&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|100&lt;br /&gt;
|Hazardous&lt;br /&gt;
|unknown&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when special wagons are provided.&lt;br /&gt;
|combine with Piece Goods, Liquid, Bulk or Express&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|200&lt;br /&gt;
|Covered (weather protected)&lt;br /&gt;
|closed wagon, any other wagon with tarpaulin or weather cover&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|do not exclude for Liquid&lt;br /&gt;
|combine with Piece Goods or Bulk&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|400&lt;br /&gt;
|Oversized&lt;br /&gt;
|stake/flatbed wagon&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when Piece Goods included&lt;br /&gt;
|combine with Piece Goods&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|800&lt;br /&gt;
|Powderized (dry powdered materials that flow under air pressure)&lt;br /&gt;
|powder/silo vehicle equipped for compressed air unloading&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when Bulk included&lt;br /&gt;
|combine with Bulk&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|1000&lt;br /&gt;
|Not Pourable&lt;br /&gt;
|open wagon, but not hopper wagon&lt;br /&gt;
|AND NOT&lt;br /&gt;
|only exclude, when Bulk included&lt;br /&gt;
|combine with Bulk&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|2000&lt;br /&gt;
|reserved. No canonical specification&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|4000&lt;br /&gt;
|reserved. No canonical specification&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|8000&lt;br /&gt;
|special&lt;br /&gt;
|and not&lt;br /&gt;
|none&lt;br /&gt;
|special use&lt;br /&gt;
|do not set&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only cargos which are in class 0 (passengers) will appear in bus stations. Only cargos which are &#039;&#039;not&#039;&#039; in class 0 will appear in truck stations.&lt;br /&gt;
&lt;br /&gt;
Disclaimer: there is no guarantee that classes won&#039;t vary over time or between sets.  The classes of a cargo may change between different versions of a specific industry/cargo newgrf, or different classes may be set for the same cargo label by different industry/cargo newgrfs.   Feel free to use classes in your set for conveniently refitting to cargos, but if you - the vehicle author - care about specific cargos being transported in specific vehicles, use label based refits (changing labels without a very good reason is considered to be bad practice).&lt;br /&gt;
&lt;br /&gt;
=== Cargo label (17) ===&lt;br /&gt;
&lt;br /&gt;
Cargo labels are globally [[CargoTypes#Cargo Labels|unique identifiers]] for a cargo type. They are used to allow vehicle grfs to easily support many cargo types, whether they are active or not and no matter what slot or bit they are using.&lt;br /&gt;
&lt;br /&gt;
Read about the [[Action0/Global Settings#Cargo translation table 09|cargo translation table]] for further info.&lt;br /&gt;
&lt;br /&gt;
=== Substitute type and multiplier for town growth (18, 19) ===&lt;br /&gt;
&lt;br /&gt;
These properties allow you to modify how a cargo type affects town growth. Property 18 can contain one of the following values:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Value!!Meaning!!{{ottdp|0.7|no}} Details&amp;lt;ref&amp;gt;This is the interpretation of OpenTTD. For TTDPatch see [http://www.tt-wiki.net/wiki/NewTownGrowthSwitches NewTownGrowthMechanism], which is quite different/unrelated.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|00||Affect towns as passengers do||Cargo produced by houses is added to the statistics in the town GUI.&lt;br /&gt;
|-&lt;br /&gt;
|02||Affect towns as mail does||Cargo produced by houses is added to the statistics in the town GUI.&lt;br /&gt;
|-&lt;br /&gt;
|05||Affect towns as goods/candy does||See note about subsidies below.&lt;br /&gt;
|-&lt;br /&gt;
|09||Affect towns as water does||Second required cargo for towngrowth in the desert&lt;br /&gt;
|-&lt;br /&gt;
|0B||Affect towns as food/fizzy drinks do||First required cargo for towngrowth in desert/above snowline. Alse see note about subsidies below.&lt;br /&gt;
|-&lt;br /&gt;
|FF||Don&#039;t affect town growth (default)|| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no|2.5|ttdprev=alpha 72}} The incoming cargo amount is multiplied by property 19, then divided by 256 before it is added to the town statistics. This allows you to have smaller or bigger impact than original cargoes do. &lt;br /&gt;
&lt;br /&gt;
If no cargos in the game are defined as food (0B), towns above the snowline will not require food to grow. If no cargos in the game are defined as food (0B) or water (09), towns in desert will not require food or water to grow.  This can be used positively for gameplay purposes, and is otherwise worth being aware of as an unintended side effect when designing cargos.&lt;br /&gt;
&lt;br /&gt;
Please note that cargoes accepted by industries affect the closest town as well; for example, if you have an industry that accepts passengers, every passenger brought to the industry affects the town just like if they were transported to the town directly. Usually, it&#039;s not a good idea to have industries that process such cargoes; they should be accepted by towns only.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|0.6-1.1|no}} In OpenTTD up to 1.1 (not 1.2) property 18 also affects the creation of subsidies. Usually subsidies apply to cargo transportation between two industries. For cargos with substitution-type 05 or 0B the destination will be a town instead. Independent of property 18 subsidies from town to town are only created for cargo slot 0 (Passengers).&lt;br /&gt;
&lt;br /&gt;
=== Callback flags (1A) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Var. 0C!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||39||Custom profit calculation&lt;br /&gt;
|-&lt;br /&gt;
|1||2||145||Custom station rating calculation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TextID for displaying the units of a cargo (1B) ===&lt;br /&gt;
&lt;br /&gt;
This textID is used by OpenTTD to show the &amp;quot;short cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 litres&amp;quot; or &amp;quot;10 tonnes&amp;quot;. This textID must be set after property 0B. The text this textID refers to should properly handle plurals, e.g. &amp;quot;\7B item\9A\15\80\9A\10\9A\11s\9A\12&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The default for this textID depends on the default for property 0B; if the default 0B string has &amp;quot;litre&amp;quot;, then the default for this textID will be the unit for litres. OpenTTD maps the following textIDs so you don&#039;t need to provide translations:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!textID!!String&lt;br /&gt;
|-&lt;br /&gt;
|004f||&amp;lt;num&amp;gt; passenger(s)&lt;br /&gt;
|-&lt;br /&gt;
|0050||&amp;lt;num&amp;gt; tonne(s)&lt;br /&gt;
|-&lt;br /&gt;
|0051||&amp;lt;num&amp;gt; bag(s)&lt;br /&gt;
|-&lt;br /&gt;
|0052||&amp;lt;num&amp;gt; litre(s)&lt;br /&gt;
|-&lt;br /&gt;
|0053||&amp;lt;num&amp;gt; item(s)&lt;br /&gt;
|-&lt;br /&gt;
|0054||&amp;lt;num&amp;gt; crate(s)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;tonne&amp;quot; and &amp;quot;litre&amp;quot; strings (textID 0050 and 0052) are automatically updated based on the user settings of unit display, e.g. they &amp;quot;tonne&amp;quot; might become &amp;quot;kg&amp;quot;. The &amp;quot;(s)&amp;quot; is for display purposes; in reality that is a choice list.&lt;br /&gt;
&lt;br /&gt;
=== TextID for displaying the amount of cargo (1C) ===&lt;br /&gt;
&lt;br /&gt;
This textID is used by OpenTTD to show the &amp;quot;long cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 litres of water&amp;quot; or &amp;quot;10 tonnes of coal&amp;quot;. This textID must be set after property 0c. The text this textID refers to should properly handle plurals, e.g. &amp;quot;\7B item\9A\15\80\9A\10\9A\11s\9A\12 of livestock&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The default for this textID depends on the default for property 0C, but with support for plurals. For &amp;quot;X litre(s)&amp;quot; or &amp;quot;X tonne(s)&amp;quot; you should respectively use string codes 87 and 9A 0D.&lt;br /&gt;
&lt;br /&gt;
=== Capacity multiplier (1D) ===&lt;br /&gt;
&lt;br /&gt;
This defines the capacity (and indirectly loading speed) of vehicles carrying this cargo type, if the vehicle sets no specific capacity to this specific cargo type.&lt;br /&gt;
&lt;br /&gt;
Set this property to the amount of cargo a vehicle shall carry, which can carry 0x100 (256) tons of coal or 0x100 (256) thousand litres of water (whatever comparison is more suitable for your cargotype). Depending on whether your cargo type is light or heavy you should set this property either comparing the weight or the volume.&lt;br /&gt;
&lt;br /&gt;
The default value of this property is:&lt;br /&gt;
{| |-&lt;br /&gt;
! Cargo slot !! Default cargo in this slot !! Property 1D !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 00 || PASS || 0x400 || A vehicle carrying 1 ton of coal, can carry 4 passengers.&lt;br /&gt;
|-&lt;br /&gt;
| 02 || MAIL || 0x200 || A vehicle carrying 1 ton of coal, can carry 2 bags of mail.&lt;br /&gt;
|-&lt;br /&gt;
| 05 || GOOD, SWET || 0x200 || A vehicle carrying 1 ton of coal, can carry 2 crates of goods/sweets.&lt;br /&gt;
|-&lt;br /&gt;
| xx || (everything else) || 0x100 || All other slots default to 0x100, i.e. 1 unit of cargo equals 1 ton of coal.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Town Production effect (1E) ===&lt;br /&gt;
&lt;br /&gt;
This properties allow you to directly modify how a town produces cargo. Property 1E can contain one of the following values:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|00||Towns produce cargo as passengers&lt;br /&gt;
|-&lt;br /&gt;
|02||Towns produce cargo as mail&lt;br /&gt;
|-&lt;br /&gt;
|FF||Towns don&#039;t produce cargo (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Town Production multiplier (1F) ===&lt;br /&gt;
&lt;br /&gt;
Set this property to the amount of cargo a town will produce, relative to the normal amount for that town production effect (passengers or mail.) The default value is 0x100 (256), use a lower value to produce less cargo, or a higher value to produce more cargo.&lt;br /&gt;
&lt;br /&gt;
Properties 1E and 1F are an alternative to the cargo production callback of houses, and allow for cargo to be set up to be produced by towns without having to redefine any houses, although it is not as flexible.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Cargos&amp;diff=4891</id>
		<title>Action0/Cargos</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Cargos&amp;diff=4891"/>
		<updated>2024-11-23T19:44:48Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* CargoClasses (16) */  bit 11 (Powderized) was incorrectly documented as &amp;#039;moisture protected&amp;#039;, probably clerical error - original definition is made clear at http://www.ttdpatch.de/grfspecs/Action0Cargos.html#Cargo+classes+%2816%29&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The [[ttwiki:NewCargos|NewCargos]] switch of TTDPatch allows modifying the existing 12 cargos per climate, and allows adding 20 new cargos per climate as well. These cargo slots are numbered from 0 to 31, where slots 0-11 are used by default TTD cargos and slots 12-31 contain uninitialized garbage by default (so you can&#039;t trust them having meaningful information, you must set all of their properties).&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=11ab3c4e}} OpenTTD 1.9 increases the number of cargos to 64.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description&lt;br /&gt;
|-&lt;br /&gt;
|08||B||{{ottdp|0.6|2.5}}||Bit number for bitmasks&lt;br /&gt;
|-&lt;br /&gt;
|09||W||{{ottdp|0.6|2.5}}||TextID for the cargo type name&lt;br /&gt;
|-&lt;br /&gt;
|0A||W||{{ottdp|0.6|2.5}}||TextID for the name of one unit from the cargo type&lt;br /&gt;
|-&lt;br /&gt;
|0B||W||{{ottdp|0.6|2.5}}||TextID to be displayed for 1 unit of cargo&lt;br /&gt;
|-&lt;br /&gt;
|0C||W||{{ottdp|0.6|2.5}}||TextID to be displayed for multiple units of cargo&lt;br /&gt;
|-&lt;br /&gt;
|0D||W||{{ottdp|0.6|2.5}}||TextID for cargo type abbreviation&lt;br /&gt;
|-&lt;br /&gt;
|0E||W||{{ottdp|0.6|2.5}}||Sprite number for the icon of the cargo&lt;br /&gt;
|-&lt;br /&gt;
|0F||B||{{ottdp|0.6|2.5}}||Weight of one unit of the cargo&lt;br /&gt;
|-&lt;br /&gt;
|10,11||B||{{ottdp|0.6|2.5}}||Penalty times&lt;br /&gt;
|-&lt;br /&gt;
|12||D||{{ottdp|0.6|2.5}}||Base price&lt;br /&gt;
|-&lt;br /&gt;
|13||B||{{ottdp|0.6|2.5}}||Color for the station list window&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|0.6|2.5}}||Color for the cargo payment list window&lt;br /&gt;
|-&lt;br /&gt;
|15||B||{{ottdp|0.6|2.5}}||Freight status (for freight-weight-multiplier setting); 0=not freight, 1=is freight&lt;br /&gt;
|-&lt;br /&gt;
|16||W||{{ottdp|0.6|2.5}}||Cargo classes&lt;br /&gt;
|-&lt;br /&gt;
|17||D||{{ottdp|0.6|2.5}}||Cargo label&lt;br /&gt;
|-&lt;br /&gt;
|18||B||{{ottdp|0.6|2.5|ttdprev=alpha 72}}||Substitute type for town growth&lt;br /&gt;
|-&lt;br /&gt;
|19||W||{{ottdp|no|2.5|ttdprev=alpha 72}}||Multiplier for town growth&lt;br /&gt;
|-&lt;br /&gt;
|1A||B||{{ottdp|0.6|2.5|ttdprev=alpha 72}}||Callback flags&lt;br /&gt;
|-&lt;br /&gt;
|1B||W||{{ottdp|1.1|no|ottdrev=r21224}}||TextID for displaying the units of a cargo&lt;br /&gt;
|-&lt;br /&gt;
|1C||W||{{ottdp|1.1|no|ottdrev=r21224}}||TextID for displaying the amount of cargo&lt;br /&gt;
|-&lt;br /&gt;
|1D||W||{{ottdp|1.2|no|ottdrev=r23860}}||Capacity mulitplier&lt;br /&gt;
|-&lt;br /&gt;
|1E||B||{{ottdp|14.0|no}}||Town Production effect&lt;br /&gt;
|-&lt;br /&gt;
|1F||W||{{ottdp|14.0|no}}||Town Production multiplier&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Bit number for bitmasks (08) ===&lt;br /&gt;
&lt;br /&gt;
This value must be used in [[Action3]] and in cargo bit mask properties such as refit masks. Values 1C-1F should be safe to use (if they aren&#039;t already taken, of course) if you intend to maintain compatibility with GRFs unaware of the newcargos switch. Further assuming that no active GRFs support the toyland climate, you can use values 11-1A as well.&lt;br /&gt;
&lt;br /&gt;
Additionally, you can use the value FFh to disable the given cargo slot. This way, it won&#039;t appear in cargo type lists, but it won&#039;t be removed from things already on the map. If you disable a cargo, you&#039;ll probably want to zero out the cargo label (property 17) as well.&lt;br /&gt;
&lt;br /&gt;
This property only affects GRFs which do not have a [[Action0/Global Settings#Cargo_translation_table_.2809.29 | cargo translation table]]. GRFs with such a table generally use the index of the cargo in the table instead of the value of this property to access a cargo. As such this property is more or less a default value for GRFs without cargo translation table. If you are unsure what value to assign to this property, set it to the same value as the cargo slot ID.&lt;br /&gt;
&lt;br /&gt;
=== TextID for the cargo type name (09) ===&lt;br /&gt;
&lt;br /&gt;
This textID should refer to the name of the cargo, capitalized, to match the TTD style (e.g. &amp;quot;Passengers&amp;quot;, &amp;quot;Coal&amp;quot;, &amp;quot;Gold Ore&amp;quot;, &amp;quot;Milk&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
You can reuse existing [[TextIDs]] or create custom strings using [[Action4]] with an offset in the DCxx range. Note that you need to set language-id bit 7 as well in the Action4 for a custom string. (Also applies to properties 0A to 0D)&lt;br /&gt;
&lt;br /&gt;
=== TextID for one unit of the type (0A) ===&lt;br /&gt;
&lt;br /&gt;
This textID should refer to the cargo type name in the singular. Currently, this ID is used only in subsidy messages (&amp;quot;First Passenger service...&amp;quot; instead of &amp;quot;First Passengers service...&amp;quot;, for example)&lt;br /&gt;
&lt;br /&gt;
=== TextID for 1 unit of cargo (0B) ===&lt;br /&gt;
&lt;br /&gt;
This textID will be used to display the amount of the cargo if there&#039;s exactly 1 unit waiting. Although there&#039;s only one unit waiting, you&#039;ll still have to use either the special character 7C (print signed word) or 87 (print amount in litres and add suffix &amp;quot; litres&amp;quot;) so TTD removes the amount from its internal reference stack. For example, if you have a new cargo named &amp;quot;gold ore&amp;quot;, this should be &amp;quot;\7C ton of gold ore&amp;quot;, which will expand to &amp;quot;1 ton of gold ore&amp;quot;. On the other hand, a liquid cargo named &amp;quot;milk&amp;quot; should be something like &amp;quot;\87 of milk&amp;quot;, which will expand to either &amp;quot;100 litres of milk&amp;quot; or &amp;quot;1,000 litres of milk&amp;quot; (The multiplier for liquid cargos depends on miscmods.dontfixlitres. If it&#039;s on, the multiplier is 100, otherwise it&#039;s 1000)&lt;br /&gt;
&lt;br /&gt;
=== TextID for multiple units of cargo (0C) ===&lt;br /&gt;
&lt;br /&gt;
This textID will be used to display the amount of cargo if the amount waiting isn&#039;t exactly 1. You&#039;ll need the same special characters as above, but now they will be expanded according to the actual cargo waiting. Sticking to the example above, you&#039;ll need &amp;quot;\7C tons of gold ore&amp;quot; and &amp;quot;\87 of milk&amp;quot;, which can expand to &amp;quot;42 tons of gold ore&amp;quot; and &amp;quot;42,000 litres of milk&amp;quot;, accordingly. You will note that liquid cargos can have the same textID for both property 0B and 0C since they always use the plural form.&lt;br /&gt;
&lt;br /&gt;
=== TextID for cargo type abbreviation (0D) ===&lt;br /&gt;
&lt;br /&gt;
This textID will be used in the station list window to represent the cargo waiting. It should be a two-letter abbreviation prefixed by the special character 0E to switch to the microscopic font. The microscopic font has every letter capitalized, so capitalization isn&#039;t important here. Continuing the above example, gold ore could have this as &amp;quot;GO&amp;quot; and milk as &amp;quot;MK&amp;quot; (&amp;quot;ML&amp;quot; is already taken by mail).&lt;br /&gt;
&lt;br /&gt;
=== Sprite number for icon (0E) ===&lt;br /&gt;
&lt;br /&gt;
This is a sprite number of an old TTD sprite to be displayed in the station window for this cargo, or FFFFh if the icon should be found by following the action 3 associated with this cargo. The icon must not be bigger than 10x10 pixels. One icon will be shown for every 10 units of the cargo waiting, up to 23 icons, which is the maximum.&lt;br /&gt;
&lt;br /&gt;
=== Weight of one unit of the cargo (0F) ===&lt;br /&gt;
&lt;br /&gt;
This property defines the weight of 1 unit from the cargo, which will be used to calculate the weight of the vehicles when loaded. The unit is 1/16 ton (which is 62.5 kg). With the examples above, gold ore should have this as 16 (since 1 ton of gold ore should weigh exactly 1 ton), while milk should have this slightly above 16 (milk is denser than water).&lt;br /&gt;
&lt;br /&gt;
=== Penalty times and price factor (10,11,12) ===&lt;br /&gt;
&lt;br /&gt;
These three values define how much is paid for the delivery of the cargo type. The price factor is subject to inflation, but GRFs needn&#039;t care about this, the programme will adjust the price for them.&lt;br /&gt;
&lt;br /&gt;
The income generated from cargo delivery is calculated as:&lt;br /&gt;
&lt;br /&gt;
income=((((distance/2) * timefactor * amount_moved) &amp;gt;&amp;gt; 7) * cargopricefactor) &amp;gt;&amp;gt; 13&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
; a &amp;gt;&amp;gt; b : means a is arithmetically shifted right by b bits&lt;br /&gt;
; distance : is the Manhattan distance between the two station signs&lt;br /&gt;
; amount_moved : is the number of cargo units moved&lt;br /&gt;
; cargopricefactor : is the value you set in property 12. Inflation will be applied automatically on it.&lt;br /&gt;
; timefactor : is a multiplier in the range 0..255, calculated in the following way: (T1 is the value of property 10, T2 is the value of property 11, t is the time the delivery took, the unit is 185 game ticks (roughly 2.5 game days) )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    if t&amp;lt;=T1 then timefactor=255&lt;br /&gt;
    else if t&amp;lt;=(T1+T2) then timefactor=255-(t-T1)&lt;br /&gt;
    else timefactor=255-(t-T1)-(t-T1-T2)&lt;br /&gt;
    if the above rules result in a timefactor less than 31, 31 is used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Color for the station list window (13) ===&lt;br /&gt;
&lt;br /&gt;
This color index will be used to draw the rectangle representing the amount waiting from the current cargo type in the station list window. The index should be given for the DOS palette. OpenTTD and TTDPatch will automatically translate the index for the Windows palette, if they use the windows base graphics.&lt;br /&gt;
&lt;br /&gt;
=== Color for the cargo payment list window (14) ===&lt;br /&gt;
&lt;br /&gt;
The graph of the current cargo will be drawn using this color in the cargo payment rates graph. The index should be given for the DOS palette, the Windows version of TTDPatch will automatically translate the index for the Windows palette.&lt;br /&gt;
&lt;br /&gt;
=== CargoClasses (16) ===&lt;br /&gt;
&lt;br /&gt;
See [[Action0Trains#Cargo classes .2828.2C_29.29|train prop. 28/29]] for a description of the utility of this property.&lt;br /&gt;
&lt;br /&gt;
This is a bit mask of all cargo classes to which this cargo could belong.&lt;br /&gt;
The following classes are available:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
!bit&lt;br /&gt;
!value&lt;br /&gt;
!class name&lt;br /&gt;
!wagon type&amp;lt;ref name=vehicle&amp;gt;Suggestion for vehicle types which transport this cargo&amp;lt;/ref&amp;gt;&lt;br /&gt;
!usage&amp;lt;ref name=refitusage&amp;gt;Suggestion how to best make use of this class in the refit masks of vehicles&amp;lt;br&amp;gt;OR to be included in the &#039;allowed classes&#039; (train prop. 28), AND NOT in the &#039;disallowed classes&#039; (train prop. 29)&amp;lt;/ref&amp;gt;&lt;br /&gt;
!vehicle tips&amp;lt;ref name=vehicleuse&amp;gt;Suggestions this class should be used in the property which excludes a class of cargos from a vehicle. One specific type of cargo could appear both as liquid or as piece goods (e.g. milk), which depends on the actual representation. Thus excluding the other would disallow refit to that cargo.&amp;lt;/ref&amp;gt;&lt;br /&gt;
!industry tips&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Passengers&lt;br /&gt;
|passenger wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|do not combine with other flags&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mail&lt;br /&gt;
|closed or mail wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|do not combine with other flags&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4&lt;br /&gt;
|Express&lt;br /&gt;
|closed or mail wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude, suitable for airplane or maglev&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|8&lt;br /&gt;
|Armored&lt;br /&gt;
|armored or mail wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|do not combine with other flags&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|10&lt;br /&gt;
|Bulk (Uncountable)&lt;br /&gt;
|open or hopper wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|may be combined with Piece Goods or Liquid to simulate multiple modes of transport&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|20&lt;br /&gt;
|Piece Goods (Countable)&lt;br /&gt;
|closed or open wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|may be combined with Bulk or Liquid to simulate multiple modes of transport&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|40&lt;br /&gt;
|Liquid&lt;br /&gt;
|tank wagon&lt;br /&gt;
|OR&lt;br /&gt;
|never exclude&lt;br /&gt;
|may be combined with Piece Goods or Bulk to simulate multiple modes of transport&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|80&lt;br /&gt;
|Refrigerated&lt;br /&gt;
|refrigerated wagon&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when Piece Goods included&lt;br /&gt;
|also set Piece Goods&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|100&lt;br /&gt;
|Hazardous&lt;br /&gt;
|unknown&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when special wagons are provided.&lt;br /&gt;
|combine with Piece Goods, Liquid, Bulk or Express&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|200&lt;br /&gt;
|Covered (weather protected)&lt;br /&gt;
|closed wagon, any other wagon with tarpaulin or weather cover&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|do not exclude for Liquid&lt;br /&gt;
|combine with Piece Goods or Bulk&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|400&lt;br /&gt;
|Oversized&lt;br /&gt;
|stake/flatbed wagon&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when Piece Goods included&lt;br /&gt;
|combine with Piece Goods&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|800&lt;br /&gt;
|Powderized (dry powdered materials that flow under air pressure)&lt;br /&gt;
|powder/silo wagon&lt;br /&gt;
|OR/AND NOT&lt;br /&gt;
|only exclude, when Bulk included&lt;br /&gt;
|combine with Bulk&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|1000&lt;br /&gt;
|Not Pourable&lt;br /&gt;
|open wagon, but not hopper wagon&lt;br /&gt;
|AND NOT&lt;br /&gt;
|only exclude, when Bulk included&lt;br /&gt;
|combine with Bulk&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|2000&lt;br /&gt;
|reserved. No canonical specification&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|4000&lt;br /&gt;
|reserved. No canonical specification&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|8000&lt;br /&gt;
|special&lt;br /&gt;
|and not&lt;br /&gt;
|none&lt;br /&gt;
|special use&lt;br /&gt;
|do not set&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only cargos which are in class 0 (passengers) will appear in bus stations. Only cargos which are &#039;&#039;not&#039;&#039; in class 0 will appear in truck stations.&lt;br /&gt;
&lt;br /&gt;
Disclaimer: there is no guarantee that classes won&#039;t vary over time or between sets.  The classes of a cargo may change between different versions of a specific industry/cargo newgrf, or different classes may be set for the same cargo label by different industry/cargo newgrfs.   Feel free to use classes in your set for conveniently refitting to cargos, but if you - the vehicle author - care about specific cargos being transported in specific vehicles, use label based refits (changing labels without a very good reason is considered to be bad practice).&lt;br /&gt;
&lt;br /&gt;
=== Cargo label (17) ===&lt;br /&gt;
&lt;br /&gt;
Cargo labels are globally [[CargoTypes#Cargo Labels|unique identifiers]] for a cargo type. They are used to allow vehicle grfs to easily support many cargo types, whether they are active or not and no matter what slot or bit they are using.&lt;br /&gt;
&lt;br /&gt;
Read about the [[Action0/Global Settings#Cargo translation table 09|cargo translation table]] for further info.&lt;br /&gt;
&lt;br /&gt;
=== Substitute type and multiplier for town growth (18, 19) ===&lt;br /&gt;
&lt;br /&gt;
These properties allow you to modify how a cargo type affects town growth. Property 18 can contain one of the following values:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Value!!Meaning!!{{ottdp|0.7|no}} Details&amp;lt;ref&amp;gt;This is the interpretation of OpenTTD. For TTDPatch see [http://www.tt-wiki.net/wiki/NewTownGrowthSwitches NewTownGrowthMechanism], which is quite different/unrelated.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|00||Affect towns as passengers do||Cargo produced by houses is added to the statistics in the town GUI.&lt;br /&gt;
|-&lt;br /&gt;
|02||Affect towns as mail does||Cargo produced by houses is added to the statistics in the town GUI.&lt;br /&gt;
|-&lt;br /&gt;
|05||Affect towns as goods/candy does||See note about subsidies below.&lt;br /&gt;
|-&lt;br /&gt;
|09||Affect towns as water does||Second required cargo for towngrowth in the desert&lt;br /&gt;
|-&lt;br /&gt;
|0B||Affect towns as food/fizzy drinks do||First required cargo for towngrowth in desert/above snowline. Alse see note about subsidies below.&lt;br /&gt;
|-&lt;br /&gt;
|FF||Don&#039;t affect town growth (default)|| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no|2.5|ttdprev=alpha 72}} The incoming cargo amount is multiplied by property 19, then divided by 256 before it is added to the town statistics. This allows you to have smaller or bigger impact than original cargoes do. &lt;br /&gt;
&lt;br /&gt;
If no cargos in the game are defined as food (0B), towns above the snowline will not require food to grow. If no cargos in the game are defined as food (0B) or water (09), towns in desert will not require food or water to grow.  This can be used positively for gameplay purposes, and is otherwise worth being aware of as an unintended side effect when designing cargos.&lt;br /&gt;
&lt;br /&gt;
Please note that cargoes accepted by industries affect the closest town as well; for example, if you have an industry that accepts passengers, every passenger brought to the industry affects the town just like if they were transported to the town directly. Usually, it&#039;s not a good idea to have industries that process such cargoes; they should be accepted by towns only.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|0.6-1.1|no}} In OpenTTD up to 1.1 (not 1.2) property 18 also affects the creation of subsidies. Usually subsidies apply to cargo transportation between two industries. For cargos with substitution-type 05 or 0B the destination will be a town instead. Independent of property 18 subsidies from town to town are only created for cargo slot 0 (Passengers).&lt;br /&gt;
&lt;br /&gt;
=== Callback flags (1A) ===&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Var. 0C!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||39||Custom profit calculation&lt;br /&gt;
|-&lt;br /&gt;
|1||2||145||Custom station rating calculation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TextID for displaying the units of a cargo (1B) ===&lt;br /&gt;
&lt;br /&gt;
This textID is used by OpenTTD to show the &amp;quot;short cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 litres&amp;quot; or &amp;quot;10 tonnes&amp;quot;. This textID must be set after property 0B. The text this textID refers to should properly handle plurals, e.g. &amp;quot;\7B item\9A\15\80\9A\10\9A\11s\9A\12&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The default for this textID depends on the default for property 0B; if the default 0B string has &amp;quot;litre&amp;quot;, then the default for this textID will be the unit for litres. OpenTTD maps the following textIDs so you don&#039;t need to provide translations:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!textID!!String&lt;br /&gt;
|-&lt;br /&gt;
|004f||&amp;lt;num&amp;gt; passenger(s)&lt;br /&gt;
|-&lt;br /&gt;
|0050||&amp;lt;num&amp;gt; tonne(s)&lt;br /&gt;
|-&lt;br /&gt;
|0051||&amp;lt;num&amp;gt; bag(s)&lt;br /&gt;
|-&lt;br /&gt;
|0052||&amp;lt;num&amp;gt; litre(s)&lt;br /&gt;
|-&lt;br /&gt;
|0053||&amp;lt;num&amp;gt; item(s)&lt;br /&gt;
|-&lt;br /&gt;
|0054||&amp;lt;num&amp;gt; crate(s)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;tonne&amp;quot; and &amp;quot;litre&amp;quot; strings (textID 0050 and 0052) are automatically updated based on the user settings of unit display, e.g. they &amp;quot;tonne&amp;quot; might become &amp;quot;kg&amp;quot;. The &amp;quot;(s)&amp;quot; is for display purposes; in reality that is a choice list.&lt;br /&gt;
&lt;br /&gt;
=== TextID for displaying the amount of cargo (1C) ===&lt;br /&gt;
&lt;br /&gt;
This textID is used by OpenTTD to show the &amp;quot;long cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 litres of water&amp;quot; or &amp;quot;10 tonnes of coal&amp;quot;. This textID must be set after property 0c. The text this textID refers to should properly handle plurals, e.g. &amp;quot;\7B item\9A\15\80\9A\10\9A\11s\9A\12 of livestock&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The default for this textID depends on the default for property 0C, but with support for plurals. For &amp;quot;X litre(s)&amp;quot; or &amp;quot;X tonne(s)&amp;quot; you should respectively use string codes 87 and 9A 0D.&lt;br /&gt;
&lt;br /&gt;
=== Capacity multiplier (1D) ===&lt;br /&gt;
&lt;br /&gt;
This defines the capacity (and indirectly loading speed) of vehicles carrying this cargo type, if the vehicle sets no specific capacity to this specific cargo type.&lt;br /&gt;
&lt;br /&gt;
Set this property to the amount of cargo a vehicle shall carry, which can carry 0x100 (256) tons of coal or 0x100 (256) thousand litres of water (whatever comparison is more suitable for your cargotype). Depending on whether your cargo type is light or heavy you should set this property either comparing the weight or the volume.&lt;br /&gt;
&lt;br /&gt;
The default value of this property is:&lt;br /&gt;
{| |-&lt;br /&gt;
! Cargo slot !! Default cargo in this slot !! Property 1D !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 00 || PASS || 0x400 || A vehicle carrying 1 ton of coal, can carry 4 passengers.&lt;br /&gt;
|-&lt;br /&gt;
| 02 || MAIL || 0x200 || A vehicle carrying 1 ton of coal, can carry 2 bags of mail.&lt;br /&gt;
|-&lt;br /&gt;
| 05 || GOOD, SWET || 0x200 || A vehicle carrying 1 ton of coal, can carry 2 crates of goods/sweets.&lt;br /&gt;
|-&lt;br /&gt;
| xx || (everything else) || 0x100 || All other slots default to 0x100, i.e. 1 unit of cargo equals 1 ton of coal.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Town Production effect (1E) ===&lt;br /&gt;
&lt;br /&gt;
This properties allow you to directly modify how a town produces cargo. Property 1E can contain one of the following values:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|00||Towns produce cargo as passengers&lt;br /&gt;
|-&lt;br /&gt;
|02||Towns produce cargo as mail&lt;br /&gt;
|-&lt;br /&gt;
|FF||Towns don&#039;t produce cargo (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Town Production multiplier (1F) ===&lt;br /&gt;
&lt;br /&gt;
Set this property to the amount of cargo a town will produce, relative to the normal amount for that town production effect (passengers or mail.) The default value is 0x100 (256), use a lower value to produce less cargo, or a higher value to produce more cargo.&lt;br /&gt;
&lt;br /&gt;
Properties 1E and 1F are an alternative to the cargo production callback of houses, and allow for cargo to be set up to be produced by towns without having to redefine any houses, although it is not as flexible.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Cargos&amp;diff=4882</id>
		<title>NML:Cargos</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Cargos&amp;diff=4882"/>
		<updated>2024-11-17T16:24:02Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* Cargo classes */ Cargo class bit 15 (CC_SPECIAL) has been deprecated for years in nfo spec with &amp;#039;do not set&amp;#039; in docs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
==Cargo IDs==&lt;br /&gt;
For cargos, the item ID corresponds to the cargo type slot of the cargo. TTD default cargos occupy slots 0-11, so if you want to define a new cargo be sure to set this ID to 12 or higher. It is recommended to set the &#039;number&#039;-property to the same value as the item ID.&lt;br /&gt;
&lt;br /&gt;
==Cargo properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| number&lt;br /&gt;
| 0..63&lt;br /&gt;
| Number of the cargo for bitmasks. Prior to {{ottd|1.9}} this was clamped to 0..31. This mostly affects old NewGRFs that don&#039;t have a cargo translation table.&lt;br /&gt;
|-&lt;br /&gt;
| type_name&lt;br /&gt;
| string&lt;br /&gt;
| String to use as cargo type name. Example: &amp;quot;Passengers&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_CARGO_PLURAL_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| unit_name&lt;br /&gt;
| string&lt;br /&gt;
| String to use for the name of one unit from the cargo type. Currently used for subsidies only (First Passenger service to..). Example string: &amp;quot;Passenger&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_CARGO_SINGULAR_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| units_of_cargo&lt;br /&gt;
| string&lt;br /&gt;
| String used to show the &amp;quot;short cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 tonnes&amp;quot; or &amp;quot;20.000 litres&amp;quot;. Example: &amp;quot;{COMMA} item{P &amp;quot;&amp;quot; s}&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_PASSENGERS and further), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| items_of_cargo&lt;br /&gt;
| string&lt;br /&gt;
| String used to show the &amp;quot;long cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 tonnes of coal&amp;quot; or &amp;quot;20.000 litres of water&amp;quot;. Example: &amp;quot;{COMMA} item{P &amp;quot;&amp;quot; s} of livestock&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_QUANTITY_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| type_abbreviation&lt;br /&gt;
| string&lt;br /&gt;
| String used for the two-letter cargo type abbreviation. Must start with a {TINYFONT} string-code. Example: &amp;quot;{TINYFONT}XX&amp;quot;. Make sure to avoid multiple cargos having the same abbreviation. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_ABBREV_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| sprite&lt;br /&gt;
| sprite&lt;br /&gt;
| TTD sprite number for the icon of the cargo. Alternatively, set to NEW_CARGO_SPRITE and use a graphics block to define a custom sprite.&lt;br /&gt;
|-&lt;br /&gt;
| weight&lt;br /&gt;
| float 0..255&lt;br /&gt;
| Weight of one unit of the cargo (in tons)&lt;br /&gt;
|-&lt;br /&gt;
| penalty_lowerbound&lt;br /&gt;
| 0..255&lt;br /&gt;
| Delivery time until penalty is applied. The units depend on the vehicle used (see vehicle property &#039;cargo_age_period&#039;), by default 1 unit = 2.5 days.&lt;br /&gt;
|-&lt;br /&gt;
| single_penalty_length&lt;br /&gt;
| 0..255&lt;br /&gt;
| Length of the interval where a single penalty is applied&lt;br /&gt;
|-&lt;br /&gt;
| price_factor&lt;br /&gt;
| float&lt;br /&gt;
| Payment for delivering 10 units of cargo across a distance of 20 squares (in British Pounds), when delivering in less than &#039;penalty_lowerbound&#039; time (no time penalty).&lt;br /&gt;
|-&lt;br /&gt;
| station_list_colour&lt;br /&gt;
| 0..255&lt;br /&gt;
|&lt;br /&gt;
Colour for the station list window (index from the [[NML:Graphic files|default (DOS) palette]])&lt;br /&gt;
|-&lt;br /&gt;
| cargo_payment_list_colour&lt;br /&gt;
| 0..255&lt;br /&gt;
|&lt;br /&gt;
Colour for the cargo payment list window (index from the [[NML:Graphic files|default (DOS) palette]])&lt;br /&gt;
|-&lt;br /&gt;
| is_freight&lt;br /&gt;
| 0 or 1&lt;br /&gt;
| Freight status (for the freighttrains switch); 0=not freight, 1=is freight&lt;br /&gt;
|-&lt;br /&gt;
| cargo_classes&lt;br /&gt;
|&lt;br /&gt;
bitmask([[#Cargo classes|cargo classes]])&lt;br /&gt;
| Cargo classes&lt;br /&gt;
|-&lt;br /&gt;
| cargo_label&lt;br /&gt;
| 4 letters&lt;br /&gt;
| [[CargoTypes|Cargo label]], as used in the [[NML:Cargotable|cargo table]]&lt;br /&gt;
|-&lt;br /&gt;
| town_growth_effect&lt;br /&gt;
| TOWNGROWTH_XXX&lt;br /&gt;
|&lt;br /&gt;
Effect for town growth, see [[#Cargo effects on town growth|Cargo effects on town growth]]&lt;br /&gt;
|-&lt;br /&gt;
| town_growth_multiplier&lt;br /&gt;
| float 0..255&lt;br /&gt;
| {{ottd|no}} Multiplier for town growth. To be used in conjuction with town_growth_effect, when that is not TOWNGROWTH_NONE. For example, a value of 4 makes your cargo have the same effect on town growth as 4 units of food/goods/etc.&lt;br /&gt;
|-&lt;br /&gt;
| callback_flags&lt;br /&gt;
| bitmask(flags)&lt;br /&gt;
|&lt;br /&gt;
Do not set this, unless you use [[NML:Old style callbacks|old-style callbacks]].&lt;br /&gt;
|-&lt;br /&gt;
| capacity_multiplier&lt;br /&gt;
| float 0 .. 255&lt;br /&gt;
| {{ottd|1.2|r22860}} This defines the capacity of vehicles carrying this cargo type, if the vehicle sets no specific capacity to this specific cargo type. Set this property to the amount of cargo a vehicle shall carry, which can carry 1 ton of coal or 1000 thousand litres of water (whatever comparison is more suitable for your cargotype). Depending on whether your cargo type is light or heavy you should set this property either comparing the weight or the volume. Default values are 4 for passengers, 2 for mail, goods and sweets and 1 for all other cargos.&lt;br /&gt;
|-&lt;br /&gt;
| town_production_effect&lt;br /&gt;
| TOWNPRODUCTION_XXX&lt;br /&gt;
| Effect for town production, see [[#Town production effect|Town production effect]]&lt;br /&gt;
|-&lt;br /&gt;
| town_production_multiplier&lt;br /&gt;
| float 0..255&lt;br /&gt;
| {{ottd|no}} Multiplier for town production, to be used in conjunction with town_production_effect, when that is not TOWNPRODUCTION_NONE. For example, a value of 4 makes a town produce 4 times as much cargo as normal.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Cargo payment is computed from &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;price_factor&amp;lt;/code&amp;gt;, amount of cargo transported, distance, and a time delivery factor. Unit of the delivery time is 185 ticks, roughly 2.5 days. The factor is constant (with value 255) if delivery time is less than &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;penalty_lowerbound&amp;lt;/code&amp;gt;. It goes down with rate 1 between &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;penalty_lowerbound + single_penalty_length&amp;lt;/code&amp;gt;, and goes down with rate 2 if the delivery time is even longer. Time delivery factor is never less than 31.&lt;br /&gt;
&lt;br /&gt;
===Cargo classes===&lt;br /&gt;
&lt;br /&gt;
Available cargo classes are listed in the following table. Cargos may be in more than one class. Cargo classes are always used as a bitmask, use the built-in function &amp;lt;code&amp;gt;bitmask()&amp;lt;/code&amp;gt;. For example, &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(CC_EXPRESS, CC_REFRIGERATED)&amp;lt;/code&amp;gt; is used for food.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! type of cargo&lt;br /&gt;
|-&lt;br /&gt;
| CC_PASSENGERS&lt;br /&gt;
| passengers, also tourists (ECS)&lt;br /&gt;
|-&lt;br /&gt;
| CC_MAIL&lt;br /&gt;
| mail&lt;br /&gt;
|-&lt;br /&gt;
| CC_EXPRESS&lt;br /&gt;
| express goods, also tourists (ECS)&lt;br /&gt;
|-&lt;br /&gt;
| CC_ARMOURED&lt;br /&gt;
| valuables, diamonds, gold and alike&lt;br /&gt;
|-&lt;br /&gt;
| CC_BULK&lt;br /&gt;
| coal, ore, grain,...&lt;br /&gt;
|-&lt;br /&gt;
| CC_PIECE_GOODS&lt;br /&gt;
| containers, crates, livestock&lt;br /&gt;
|-&lt;br /&gt;
| CC_LIQUID&lt;br /&gt;
| oil, milk, water, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_REFRIGERATED&lt;br /&gt;
| food, milk, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_HAZARDOUS&lt;br /&gt;
| chemicals?, uranium, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_COVERED&lt;br /&gt;
| grain, cement, fruit, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_OVERSIZED&lt;br /&gt;
| vehicles, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_POWDERIZED&lt;br /&gt;
| cement, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_NON_POURABLE&amp;lt;br&amp;gt;CC_NEO_BULK&lt;br /&gt;
| sugar cane, wool or straw bales, ... (these are synonyms for cargos that are bulk, but can&#039;t be handled in e.g. hoppers)&lt;br /&gt;
|-&lt;br /&gt;
| CC_SPECIAL&lt;br /&gt;
| Deprecated, do not set.&lt;br /&gt;
|-&lt;br /&gt;
| NO_CARGO_CLASS&lt;br /&gt;
| Special value that you can used to instead of 0.&lt;br /&gt;
|-&lt;br /&gt;
| ALL_NORMAL_CARGO_CLASSES&lt;br /&gt;
| Bitmask of all cargo classes except CC_SPECIAL. This is the same as &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(CC_PASSENGERS, CC_MAIL, ..., CC_OVERSIZED)&amp;lt;/code&amp;gt;. Note: This is already a bitmask, don&#039;t use the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(..)&amp;lt;/code&amp;gt; function with this.&lt;br /&gt;
|-&lt;br /&gt;
| ALL_CARGO_CLASSES&lt;br /&gt;
| Bitmask of all cargo classes. Same as &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;ALL_NORMAL_CARGO_CLASSES | bitmask(CC_SPECIAL)&amp;lt;/code&amp;gt; Note: This is already a bitmask, don&#039;t use the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(..)&amp;lt;/code&amp;gt; function with this.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Cargo effects on town growth===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! value&lt;br /&gt;
! effect&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_PASSENGERS&lt;br /&gt;
| Affect towns as passengers do&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_MAIL&lt;br /&gt;
| Affect towns as mail does&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_GOODS&lt;br /&gt;
| Affect towns as goods/candy does&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_WATER&lt;br /&gt;
| Affect towns as water does (second required cargo for towngrowth in the desert)&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_FOOD&lt;br /&gt;
| Affect towns as food/fizzy drinks do (first required cargo for towngrowth in desert/above snowline)&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_NONE&lt;br /&gt;
| Don&#039;t affect town growth (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If no cargos in the game are defined as TOWNGROWTH_FOOD, towns above the snowline will not require food to grow. If no cargos in the game are defined as TOWNGROWTH_FOOD or TOWNGROWTH_WATER, towns in desert will not require food or water to grow. This can be used positively for gameplay purposes, and is otherwise worth being aware of as an unintended side effect when designing cargos.&lt;br /&gt;
&lt;br /&gt;
There are some additional effects of these flags on subsidies and town cargo transport statistics.  See the nfo docs for details: https://newgrf-specs.tt-wiki.net/wiki/Action0/Cargos#Substitute_type_and_multiplier_for_town_growth_.2818.2C_19.29&lt;br /&gt;
&lt;br /&gt;
===Town production effect===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! value&lt;br /&gt;
! effect&lt;br /&gt;
|-&lt;br /&gt;
| TOWNPRODUCTION_PASSENGERS&lt;br /&gt;
| Town produces cargo as like passengers&lt;br /&gt;
|-&lt;br /&gt;
| TOWNPRODUCTION_MAIL&lt;br /&gt;
| Town produces cargo as like mail&lt;br /&gt;
|-&lt;br /&gt;
| TOWNPRODUCTION_NONE&lt;br /&gt;
| Town does not produce cargo (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Cargo variables==&lt;br /&gt;
&lt;br /&gt;
Cargos have no variables (yet).&lt;br /&gt;
&lt;br /&gt;
==Cargo callbacks==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! callback&lt;br /&gt;
! return value&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| default&lt;br /&gt;
| Sprite set (with 1 sprite)&lt;br /&gt;
| Graphics for the cargo icon (only if property &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;sprite&amp;lt;/code&amp;gt; is set to NEW_CARGO_SPRITE)&lt;br /&gt;
|-&lt;br /&gt;
| station_rating&lt;br /&gt;
| -16384 .. 16383&lt;br /&gt;
| See detailed explanation below&lt;br /&gt;
|-&lt;br /&gt;
| profit&lt;br /&gt;
| -12748 .. 12748&lt;br /&gt;
| Called whenever cargo is delivered.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 16):&amp;lt;/code&amp;gt; The manhattan distance the cargo was transported.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 16, 8):&amp;lt;/code&amp;gt; The amount of cargo delivered.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 24, 8):&amp;lt;/code&amp;gt; The time spent en-route (1 unit = 2.5 days).&lt;br /&gt;
The returned value is multiplied by the amount and the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;price_factor&amp;lt;/code&amp;gt; to determine the income the player receives. Returning negative values is possible, it makes players pay for the delivery.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Station rating callback===&lt;br /&gt;
&lt;br /&gt;
The station rating callback is quite complicated and deserves some detailed explanation. The default station rating calculation works as follows:&lt;br /&gt;
&lt;br /&gt;
Internally, station rating is byte with values 0 .. 255, representing respectively 0% and 100%. Every 2.5 days, the transportation &#039;performance&#039; is calculated using some factors outlined below. The station rating is then set to this performance value, with the caveat that the rating change cannot exceed 2 points. Therefore, rating changes are always slow, this callback cannot change this. The initial rating is 175 points (69%). The following factors are parts of the performance, their effects are summed.&lt;br /&gt;
&lt;br /&gt;
====Time since the cargo was last picked up====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Time units (days)&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;gt;21 (&amp;amp;gt;52.5 days)&lt;br /&gt;
| 0 (0%)&lt;br /&gt;
|-&lt;br /&gt;
| 13 .. 21 (32.5 days .. 52.5 days)&lt;br /&gt;
| 25 (10%)&lt;br /&gt;
|-&lt;br /&gt;
| 7 .. 12 (17.5 days .. 32.5 days)&lt;br /&gt;
| 50 (20%)&lt;br /&gt;
|-&lt;br /&gt;
| 4 .. 6 (10 days .. 17.5 days)&lt;br /&gt;
| 95 (37%)&lt;br /&gt;
|-&lt;br /&gt;
| 0..3 (0 days..10 days)&lt;br /&gt;
| 130 (51%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The time unit used equals 185 engine ticks, or 2.5 TTD days. For ships, the time units are divided by 4 before calculating this component, so ships have four times more time before the ratings start dropping.&lt;br /&gt;
&lt;br /&gt;
====Amount of cargo waiting====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Amount of cargo&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;gt;1500&lt;br /&gt;
| -90 (-35%)&lt;br /&gt;
|-&lt;br /&gt;
| 1001..1500&lt;br /&gt;
| -35 (-14%)&lt;br /&gt;
|-&lt;br /&gt;
| 601..1000&lt;br /&gt;
| 0 (0%)&lt;br /&gt;
|-&lt;br /&gt;
| 301..600&lt;br /&gt;
| 10 (4%)&lt;br /&gt;
|-&lt;br /&gt;
| 101..300&lt;br /&gt;
| 30 (12%)&lt;br /&gt;
|-&lt;br /&gt;
| 0..100&lt;br /&gt;
| 40 (16%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Max. speed of the last vehicle picking up the cargo====&lt;br /&gt;
&lt;br /&gt;
This calculation is somewhat complicated. The maximum speed of the vehicle is expressed in &amp;quot;speed units&amp;quot;. For trains and road vehicles, the speed unit is 1 km/h; for ships, it&#039;s 0.5 km/h; for aircraft, it&#039;s 8 mph. If the max. speed is above 255 speed units, 255 is used instead. If the vehicle is slower than 85 units, no points are awarded; otherwise, you get (speed_units-85)/4 points. Therefore, the maximum you can get is 42 points, or 16%.&lt;br /&gt;
&lt;br /&gt;
====Age of the last carrier picking up the cargo====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Age of vehicle (years)&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 10 (4%)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 20 (8%)&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 33 (13%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In TTDPatch this changes when the &#039;newagerating&#039; switch is enabled&lt;br /&gt;
&lt;br /&gt;
====Bonus for AI companies (TTDPatch only)====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! AI intelligence setting&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| Low&lt;br /&gt;
| 0 (0%)&lt;br /&gt;
|-&lt;br /&gt;
| Medium&lt;br /&gt;
| 31 (12%)&lt;br /&gt;
|-&lt;br /&gt;
| High&lt;br /&gt;
| 63 (25%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Bonus for statue in nearest town====&lt;br /&gt;
&lt;br /&gt;
If your company has erected a statue in the nearest town, you get 26 points (10%) bonus to all cargo ratings.&lt;br /&gt;
&lt;br /&gt;
====Callback parameters====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;:&lt;br /&gt;
{| |-&lt;br /&gt;
!value!!meaning&lt;br /&gt;
|-&lt;br /&gt;
|0x10||the last vehicle entering the station was a train&lt;br /&gt;
|-&lt;br /&gt;
|0x11||the last vehicle entering the station was a road vehicle&lt;br /&gt;
|-&lt;br /&gt;
|0x12||the last vehicle entering the station was a ship&lt;br /&gt;
|-&lt;br /&gt;
|0x13||the last vehicle entering the station was an aircraft&lt;br /&gt;
|-&lt;br /&gt;
|0||no vehicle entered the station yet, or (TTDPatch) the last one entering was sold&lt;br /&gt;
|}&lt;br /&gt;
Please note that there&#039;s only one &amp;quot;last vehicle type&amp;quot; field per station, so the vehicle this refers to may not have picked up any of your cargo.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 8)&amp;lt;/code&amp;gt;: The time since the cargo was last picked up, in the time units described above (1 unit = 2.5 days independent of vehicle type)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 8, 16)&amp;lt;/code&amp;gt;: The amount of cargo waiting.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 24, 8)&amp;lt;/code&amp;gt;: The speed of the last vehicle picking the cargo up, in the speed units described above (if no vehicle entered the station yet, the value is 0xFF).&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Effect of callback====&lt;br /&gt;
&lt;br /&gt;
The return value of the callback replaces the first three components (time since pickup, amount of cargo, max speed) of the calculation. The bonus for statues, TTDPatch AIs and new vehicles is always in effect, you cannot (yet) change this.&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=CargoTypes&amp;diff=4881</id>
		<title>CargoTypes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=CargoTypes&amp;diff=4881"/>
		<updated>2024-11-16T16:42:46Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: Note on why FIRS isn&amp;#039;t listed.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Cargo labels in OpenTTD&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{grfFrom|8}} In GRF version 8 the value to be used in all vehicle and industry properties, and in [[Action3|action 3]], is the position of the cargo label in the [[Action0/Global_Settings#Cargo_translation_table_.2809.29|cargo translation table]] included in the GRF.&lt;br /&gt;
&lt;br /&gt;
{{grfTill|7}} GRF version 7 and below used different cargo properties for different properties (called &amp;quot;Type A&amp;quot; or &amp;quot;translated&amp;quot; and &amp;quot;Type B&amp;quot; or &amp;quot;untranslated&amp;quot; cargo slots), for historical reasons.  This method is deprecated as it meant relying solely on cargos always using the same slots.  You can see the table of Type A and Type B slots [http://newgrf-specs.tt-wiki.net/index.php?title=CargoTypes&amp;amp;oldid=2861 here] if you really want to.&lt;br /&gt;
&lt;br /&gt;
{{ottd|15.0}} Since 15.0, a default cargo translation table corresponding to the climate (see [[CargoDefaultProps]]) is used if one is not provided.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{grfFrom|8}} In GRF version 8, the default translation table is 32 entries long and maps &amp;quot;Type B&amp;quot; slots to each cargo label.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{grfTill|7}} In GRF version 7, the default translation table is 12 entries long and uses &amp;quot;Type A&amp;quot; slots to each cargo label.&amp;lt;br/&amp;gt;&lt;br /&gt;
The default translation table works just like a GRF provided table: If a cargo label is redefined in a different slot this is correctly translated, and if the cargo label is replaced the cargo type is mapped to invalid.&lt;br /&gt;
&lt;br /&gt;
== Cargo Labels ==&lt;br /&gt;
&lt;br /&gt;
The following cargo labels have been defined so far:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Label&lt;br /&gt;
! Cargo Description&lt;br /&gt;
! [[Action0Cargos#CargoClasses_.2816.29|Cargo classes]]&lt;br /&gt;
! colspan=&amp;quot;7&amp;quot; | Usage&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Basic Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;9&amp;quot; | These cargos are present when no NewGRF is used, or in some common Industry NewGRFs&lt;br /&gt;
|-&lt;br /&gt;
| PASS&lt;br /&gt;
| Passengers&lt;br /&gt;
| 0001 Passengers&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| COAL&lt;br /&gt;
| Coal&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| MAIL&lt;br /&gt;
| Mail&lt;br /&gt;
| 0002 Mail&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| OIL_&lt;br /&gt;
| Oil&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| LVST&lt;br /&gt;
| Livestock&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| GOOD&lt;br /&gt;
| Goods&lt;br /&gt;
| 0004 Express&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| GRAI&lt;br /&gt;
| Grain&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| Temperate; see also WHEA, MAIZ, CERE. YETI &amp;amp; OTIS: 0210 Covered, bulk&lt;br /&gt;
|-&lt;br /&gt;
| WOOD&lt;br /&gt;
| Wood&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| Named Logs in some industry sets (2TT)&lt;br /&gt;
|-&lt;br /&gt;
| IORE&lt;br /&gt;
| Iron Ore&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STEL&lt;br /&gt;
| Steel&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| YETI: Renamed &amp;quot;Balls of Steel&amp;quot;, OTIS: Renamed &amp;quot;Metal&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| VALU&lt;br /&gt;
| Valuables&lt;br /&gt;
| 0008 Armoured&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Temperate; see also GOLD, DIAM&lt;br /&gt;
|-&lt;br /&gt;
| PAPR&lt;br /&gt;
| Paper&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: 0220 Covered, piece goods&lt;br /&gt;
|-&lt;br /&gt;
| WHEA&lt;br /&gt;
| Wheat&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Arctic; see also GRAI, MAIZ, CERE&lt;br /&gt;
|-&lt;br /&gt;
| FOOD&lt;br /&gt;
| Food&lt;br /&gt;
| 0084 Express, refrigerated&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| YETI: 00A0 Refrigerated, piece goods&lt;br /&gt;
|-&lt;br /&gt;
| GOLD&lt;br /&gt;
| Gold&lt;br /&gt;
| 0008 Armoured&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Arctic; see also VALU, DIAM&lt;br /&gt;
|-&lt;br /&gt;
| RUBR&lt;br /&gt;
| Rubber&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| FRUT&lt;br /&gt;
| Fruit&lt;br /&gt;
| 0090 Bulk, refrigerated&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS: 00A4 Express, piece goods, refrigerated, YETI: 00A0 Piece goods, covered.&lt;br /&gt;
|-&lt;br /&gt;
| MAIZ&lt;br /&gt;
| Maize&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Tropic; see also GRAI, WHEA, CERE. OTIS: Renamed &amp;quot;Animal Feed&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| CORE&lt;br /&gt;
| Copper Ore&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| WATR&lt;br /&gt;
| Water&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| OTIS: 0044 Express, liquid&lt;br /&gt;
|-&lt;br /&gt;
| DIAM&lt;br /&gt;
| Diamonds&lt;br /&gt;
| 0008 Armoured&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Tropic; see also VALU, GOLD&lt;br /&gt;
|-&lt;br /&gt;
| SUGR&lt;br /&gt;
| Sugar&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| AORE&lt;br /&gt;
| Bauxite (Aluminium ore)&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| BDMT&lt;br /&gt;
| Building Materials&lt;br /&gt;
| 0220 Piece goods, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS: 0030 Bulk, piece goods. YETI: 0020 Piece goods.&lt;br /&gt;
|-&lt;br /&gt;
| BEAN&lt;br /&gt;
| Beans&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| CZIS renamed to Potatoes&lt;br /&gt;
|-&lt;br /&gt;
| BEER&lt;br /&gt;
| Alcohol&lt;br /&gt;
| 0064 Express, piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| BOOM&lt;br /&gt;
| Explosives&lt;br /&gt;
| 0024 Express, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| OTIS: 0124 Express, Piece goods, hazardous &lt;br /&gt;
|-&lt;br /&gt;
| BRCK&lt;br /&gt;
| Bricks&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CBLK&lt;br /&gt;
| Carbon Black&lt;br /&gt;
| 0230 Piece goods, bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CERA&lt;br /&gt;
| Ceramics&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CERE&lt;br /&gt;
| Cereals&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CLAY&lt;br /&gt;
| Clay&lt;br /&gt;
| 0210 Bulk covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CMNT&lt;br /&gt;
| Cement&lt;br /&gt;
| 0210 Bulk covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| COPR&lt;br /&gt;
| Copper&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CSTI&lt;br /&gt;
| Cast Iron&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CTAR&lt;br /&gt;
| Coal Tar&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| DYES&lt;br /&gt;
| Dyes&lt;br /&gt;
| 0060 Piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ENSP&lt;br /&gt;
| Engineering Supplies&lt;br /&gt;
| 0024 Express, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| 2TT Industries of the Caribbean: named Machinery&lt;br /&gt;
|-&lt;br /&gt;
| FECR&lt;br /&gt;
| Ferrochrome&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| FERT&lt;br /&gt;
| Fertiliser&lt;br /&gt;
| 0030 Bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| OTIS: 0034 Express, piece goods, bulk. XIS: 0230 Covered, piece goods, bulk. ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| FICR&lt;br /&gt;
| Fibre crops&lt;br /&gt;
| 0030 Bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| OTIS: 0230 Piece goods, bulk, covered/sheltered, renamed &amp;quot;Cotton&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| FISH&lt;br /&gt;
| Fish&lt;br /&gt;
| 0084 Express, refrigerated&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| FMSP&lt;br /&gt;
| Farm Supplies&lt;br /&gt;
| 0024 Express, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| GLAS&lt;br /&gt;
| Glass&lt;br /&gt;
| 0420 Piece goods, oversized&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: 0410 Piece goods, bulk&lt;br /&gt;
|-&lt;br /&gt;
| GRVL&lt;br /&gt;
| Stone&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| Renamed from &amp;quot;Gravel / Ballast&amp;quot; XIS: Renamed &amp;quot;Aggregate&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| JAVA&lt;br /&gt;
| Coffee&lt;br /&gt;
| 0024 Piece goods, express&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| KAOL&lt;br /&gt;
| Kaolin (China Clay)&lt;br /&gt;
| 0250 Bulk, liquids, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS: Renamed &amp;quot;Lithium&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| LIME&lt;br /&gt;
| Lime stone&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| MILK&lt;br /&gt;
| Milk&lt;br /&gt;
| 00C4 Express, liquid, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| OLSD&lt;br /&gt;
| Oil seed&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PEAT&lt;br /&gt;
| Peat&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Biomass&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| PETR&lt;br /&gt;
| Petrol / Fuel Oil&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: 0130 Hazardous, liquid&lt;br /&gt;
|-&lt;br /&gt;
| PHOS&lt;br /&gt;
| Phosphate&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Oil sands&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| PLAS&lt;br /&gt;
| Plastic&lt;br /&gt;
| 0060 Piece goods, liquid&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| PORE&lt;br /&gt;
| Pyrite Ore&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Zinc ore&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| POTA&lt;br /&gt;
| Potash&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| RFPR&lt;br /&gt;
| Refined products&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: renamed &amp;quot;Sewage&amp;quot;, XIS: renamed &amp;quot;Petrochemicals&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| SAND&lt;br /&gt;
| Sand&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SCMT&lt;br /&gt;
| Scrap Metal&lt;br /&gt;
| 1010 Bulk, non-pourable&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: Renamed &amp;quot;Waste/Garbage&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| SULP&lt;br /&gt;
| Sulphur&lt;br /&gt;
| 0250 Bulk, liquid, covered/sheltered.&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| ECS: 0210 Bulk, covered/sheltered &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot;&amp;gt;ECS cargo classes changed as of Dec 31, 2010&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| TOUR&lt;br /&gt;
| Tourists&lt;br /&gt;
| 0005 Passengers, express&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| ECS; see also OTI2&lt;br /&gt;
|-&lt;br /&gt;
| TYRE&lt;br /&gt;
| Tyres&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| URAN&lt;br /&gt;
| Uranium&lt;br /&gt;
| 0110 Bulk, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| 2TT: Piece goods, hazardous&lt;br /&gt;
|-&lt;br /&gt;
| VEHI&lt;br /&gt;
| Vehicles&lt;br /&gt;
| 0420 Piece goods, oversized&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS: 0020 Piece goods. OTIS: 0020 Piece goods, renamed &amp;quot;Cars&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| WDPR&lt;br /&gt;
| Wood Products&lt;br /&gt;
| 0030 Bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS &amp;amp; OTIS: Renamed &amp;quot;Timber&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| WOOL&lt;br /&gt;
| Wool&lt;br /&gt;
| 0220 Piece goods, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ZINC&lt;br /&gt;
| Zinc&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Extended Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;9&amp;quot; | these cargos are only present in rare/specialized situations&lt;br /&gt;
|-&lt;br /&gt;
| ACID&lt;br /&gt;
| Acid&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ALUM&lt;br /&gt;
| Aluminium&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| See also METL&lt;br /&gt;
|-&lt;br /&gt;
| BAKE&lt;br /&gt;
| Flour&lt;br /&gt;
| 0A30 Bulk, powderized, piece goods, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CASS&lt;br /&gt;
| Cassava&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CHLO&lt;br /&gt;
| Chlorine&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CHSE&lt;br /&gt;
| Cheese&lt;br /&gt;
| 00C4 Express, liquid, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CIGR&lt;br /&gt;
| Cigars&lt;br /&gt;
| 0024 Piece goods, express&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| COAT&lt;br /&gt;
| Paints &amp;amp; Coatings&lt;br /&gt;
| 0060 Piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| 2TT Lumberjack Industries: renamed Varnish&lt;br /&gt;
|-&lt;br /&gt;
| COBL&lt;br /&gt;
| Cobalt&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| COKE&lt;br /&gt;
| Coke&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ELTR&lt;br /&gt;
| Electricity&lt;br /&gt;
| 8000 Special&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|CZIS uses its own labels... see ELEC and NODC&lt;br /&gt;
|-&lt;br /&gt;
| EOIL&lt;br /&gt;
| Edible Oil&lt;br /&gt;
| 0060 Piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| FRVG&lt;br /&gt;
| Fruit (and optionally Vegetables)&lt;br /&gt;
| 00A4 Express, piece goods, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| See also FRUT&lt;br /&gt;
|-&lt;br /&gt;
| FUEL&lt;br /&gt;
| Natural Gas&lt;br /&gt;
| 0140 Liquid, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Use PETR for refined-oil fuel&lt;br /&gt;
|-&lt;br /&gt;
| FURN&lt;br /&gt;
| Furniture&lt;br /&gt;
| 0230 Piece goods, bulk, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| IRON&lt;br /&gt;
| Pig Iron&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| LYE_&lt;br /&gt;
| Sodium Hydroxide (Lye)&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| MEAT&lt;br /&gt;
| Meat&lt;br /&gt;
| 00A4 Express, piece goods, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| METL&lt;br /&gt;
| Metal&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Aluminium&amp;quot;; See also ALUM&lt;br /&gt;
|-&lt;br /&gt;
| MNO2&lt;br /&gt;
| Manganese&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| MNSP&lt;br /&gt;
| Manufacturing Supplies&lt;br /&gt;
| 0024 Piece goods, express&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Packaging&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| MOLS&lt;br /&gt;
| Molasses&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| MPTS&lt;br /&gt;
| Machine parts&lt;br /&gt;
| 0220 Covered, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NH3_&lt;br /&gt;
| Ammonia&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NHNO&lt;br /&gt;
| [https://en.wikipedia.org/wiki/Ammonium_nitrate NH4NO3 chemical]&lt;br /&gt;
| 0130 Hazardous, bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NUTS&lt;br /&gt;
| Nuts&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NICK&lt;br /&gt;
| Nickel&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NITR&lt;br /&gt;
| Nitrate&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NKOR&lt;br /&gt;
| Nickel ore&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| OTIS: Renamed &amp;quot;Nickel&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| NUKF&lt;br /&gt;
| Nuclear fuel&lt;br /&gt;
| Piece goods, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Improved Town Industries&lt;br /&gt;
|-&lt;br /&gt;
| NUKW&lt;br /&gt;
| Nuclear waste&lt;br /&gt;
| Piece goods, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Improved Town Industries&lt;br /&gt;
|-&lt;br /&gt;
| OILI&lt;br /&gt;
| Oil (imported)&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| OILD&lt;br /&gt;
| Oil (domestic)&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| OTI1&lt;br /&gt;
| Workers&lt;br /&gt;
| 0001 Passengers&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| OTI2&lt;br /&gt;
| Tourists&lt;br /&gt;
| 0001 Passengers&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| OYST&lt;br /&gt;
| Oysters&lt;br /&gt;
| 00A4 Express, piece goods, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| O2__&lt;br /&gt;
| Oxygen&lt;br /&gt;
| 0040 Liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| PACK&lt;br /&gt;
| Packaging&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|Packaging used mostly for food production.&lt;br /&gt;
|-&lt;br /&gt;
| PCL_&lt;br /&gt;
| Parcels&lt;br /&gt;
| 0006 Express, mail&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| PIPE&lt;br /&gt;
| Pipe&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| POWR&lt;br /&gt;
| Electrical Parts&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: 0220 Covered, piece goods, renamed &amp;quot;Electrical Machines&amp;quot;. XIS and CZIS: Renamed &amp;quot;Electrical Machines&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| QLME&lt;br /&gt;
| Quicklime&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| RCYC&lt;br /&gt;
| Recyclables&lt;br /&gt;
| 0030 Bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SALT&lt;br /&gt;
| Salt&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SASH&lt;br /&gt;
| Soda Ash&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SEED&lt;br /&gt;
| Seed&lt;br /&gt;
| 0230 Piece goods, bulk, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SESP&lt;br /&gt;
| Marine Supplies&lt;br /&gt;
| 0024 Express, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SGBT&lt;br /&gt;
| Sugar beet&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| not in tropical&lt;br /&gt;
|-&lt;br /&gt;
| SGCN&lt;br /&gt;
| Sugarcane&lt;br /&gt;
| 1010 Bulk, non-pourable&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| only tropical&lt;br /&gt;
|-&lt;br /&gt;
| SLAG&lt;br /&gt;
| Slag&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SOAP&lt;br /&gt;
| Cleaning Agents&lt;br /&gt;
| 0060 Piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STAL&lt;br /&gt;
| Alloy Steel&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STCB&lt;br /&gt;
| Carbon Steel&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STSE&lt;br /&gt;
| Steel Sections&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STSH&lt;br /&gt;
| Steel Sheet&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STST&lt;br /&gt;
| Stainless Steel&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STWR&lt;br /&gt;
| Steel Wire Rod&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| TATO&lt;br /&gt;
| Potatoes&lt;br /&gt;
| 00A4 Express, piece goods, refrigerated&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| CZIS uses renamed Beans&lt;br /&gt;
|-&lt;br /&gt;
| TEXT&lt;br /&gt;
| Textile&lt;br /&gt;
| 0220 Piece goods, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| TBCO&lt;br /&gt;
| Tobacco&lt;br /&gt;
| 1010 Bulk, non-pourable&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| TWOD&lt;br /&gt;
| Tropic Wood&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| formerly intended as a default cargo&lt;br /&gt;
|-&lt;br /&gt;
| VBOD&lt;br /&gt;
| Vehicle bodies&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| VENG&lt;br /&gt;
| Vehicle Engines&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| VPTS&lt;br /&gt;
| Vehicle Parts&lt;br /&gt;
| 0024 Piece goods, express&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS: 0020 Piece goods, renamed &amp;quot;Parts&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| WSTE&lt;br /&gt;
| Waste&lt;br /&gt;
| 0230 Piece goods, bulk, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Used by Improved Town Industries.&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Fantasy Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;9&amp;quot; | these cargos are for use in fantasy or science fiction settings&lt;br /&gt;
|-&lt;br /&gt;
| BATT&lt;br /&gt;
| Batteries&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| BUBL&lt;br /&gt;
| Bubbles&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| COLA&lt;br /&gt;
| Cola&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| CTCD&lt;br /&gt;
| Cotton Candy (Candyfloss)&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| FZDR&lt;br /&gt;
| Fizzy Drinks&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| PLST&lt;br /&gt;
| Plastic&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland; see also PLAS&lt;br /&gt;
|-&lt;br /&gt;
| SWET&lt;br /&gt;
| Sweets (Candy)&lt;br /&gt;
| 0004 Express&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| TOFF&lt;br /&gt;
| Toffee&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| TOYS&lt;br /&gt;
| Toys&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| YETI&lt;br /&gt;
| Workers, YETI dudes&lt;br /&gt;
| 0404 Express, oversized&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| YETY&lt;br /&gt;
| Tired Workers, Tired YETI dudes&lt;br /&gt;
| 0404 Express, oversized&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ELEC&lt;br /&gt;
| Charged Batteries (electricity from PP)&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| Used as means of electricity transportation.&lt;br /&gt;
|-&lt;br /&gt;
| NODC&lt;br /&gt;
| Uncharged Batteries (return of batteries) aka No Direct Current&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|Used as means of electricity transportation.&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Special Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;9&amp;quot; | these cargos are for use outside industry sets and do not represent transporting anything&lt;br /&gt;
|-&lt;br /&gt;
| GEAR&lt;br /&gt;
| Locomotive regearing&lt;br /&gt;
| 8000 Special&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Using this cargo may make your vehicle set incompatible with some industry sets&lt;br /&gt;
use CB36 instead to set capacity to 0&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Deprecated Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;9&amp;quot; | these cargos are not used by any current industry set, and are listed here for backwards compatibility&lt;br /&gt;
|-&lt;br /&gt;
| RSGR&lt;br /&gt;
| Raw Sugar&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Deprecated see SGBT and SGCN&lt;br /&gt;
|-&lt;br /&gt;
| SCRP&lt;br /&gt;
| Scrap Metal&lt;br /&gt;
| 0010 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Deprecated see SCMT instead&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An overview of FIRS cargos is avaliable [https://grf.farm/firs/code_reference_latest.html here] for the latest version.  Please don&#039;t add FIRS labels here, as they have a history of being outdated or wrong, which is unhelpful to other grf authors.  Thanks.&lt;br /&gt;
&lt;br /&gt;
If you write or publish a NewGRF which introduces a new cargo label, please also add a comment where the new label is used.&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=CargoTypes&amp;diff=4871</id>
		<title>CargoTypes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=CargoTypes&amp;diff=4871"/>
		<updated>2024-10-08T22:09:54Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* Cargo Labels */ remove outdated class&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Cargo labels in OpenTTD&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{grfFrom|8}} In GRF version 8 the value to be used in all vehicle and industry properties, and in [[Action3|action 3]], is the position of the cargo label in the [[Action0/Global_Settings#Cargo_translation_table_.2809.29|cargo translation table]] included in the GRF.&lt;br /&gt;
&lt;br /&gt;
{{grfTill|7}} GRF version 7 and below used different cargo properties for different properties (called &amp;quot;Type A&amp;quot; or &amp;quot;translated&amp;quot; and &amp;quot;Type B&amp;quot; or &amp;quot;untranslated&amp;quot; cargo slots), for historical reasons.  This method is deprecated as it meant relying solely on cargos always using the same slots.  You can see the table of Type A and Type B slots [http://newgrf-specs.tt-wiki.net/index.php?title=CargoTypes&amp;amp;oldid=2861 here] if you really want to.&lt;br /&gt;
&lt;br /&gt;
{{ottd|15.0}} Since 15.0, a default cargo translation table corresponding to the climate (see [[CargoDefaultProps]]) is used if one is not provided.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{grfFrom|8}} In GRF version 8, the default translation table is 32 entries long and maps &amp;quot;Type B&amp;quot; slots to each cargo label.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{grfTill|7}} In GRF version 7, the default translation table is 12 entries long and uses &amp;quot;Type A&amp;quot; slots to each cargo label.&amp;lt;br/&amp;gt;&lt;br /&gt;
The default translation table works just like a GRF provided table: If a cargo label is redefined in a different slot this is correctly translated, and if the cargo label is replaced the cargo type is mapped to invalid.&lt;br /&gt;
&lt;br /&gt;
== Cargo Labels ==&lt;br /&gt;
&lt;br /&gt;
The following cargo labels have been defined so far:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Label&lt;br /&gt;
! Cargo Description&lt;br /&gt;
! [[Action0Cargos#CargoClasses_.2816.29|Cargo classes]]&lt;br /&gt;
! colspan=&amp;quot;8&amp;quot; | Usage&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Basic Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;10&amp;quot; | These cargos are present when no NewGRF is used, or in some common Industry NewGRFs&lt;br /&gt;
|-&lt;br /&gt;
| PASS&lt;br /&gt;
| Passengers&lt;br /&gt;
| 0001 Passengers&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| COAL&lt;br /&gt;
| Coal&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| MAIL&lt;br /&gt;
| Mail&lt;br /&gt;
| 0002 Mail&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| OIL_&lt;br /&gt;
| Oil&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| LVST&lt;br /&gt;
| Livestock&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| GOOD&lt;br /&gt;
| Goods&lt;br /&gt;
| 0004 Express&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| GRAI&lt;br /&gt;
| Grain&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| Temperate; see also WHEA, MAIZ, CERE. YETI &amp;amp; OTIS: 0210 Covered, bulk&lt;br /&gt;
|-&lt;br /&gt;
| WOOD&lt;br /&gt;
| Wood&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| Named Logs in some industry sets (FIRS, 2TT)&lt;br /&gt;
|-&lt;br /&gt;
| IORE&lt;br /&gt;
| Iron Ore&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STEL&lt;br /&gt;
| Steel&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| YETI: Renamed &amp;quot;Balls of Steel&amp;quot;, OTIS: Renamed &amp;quot;Metal&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| VALU&lt;br /&gt;
| Valuables&lt;br /&gt;
| 0008 Armoured&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Temperate; see also GOLD, DIAM&lt;br /&gt;
|-&lt;br /&gt;
| PAPR&lt;br /&gt;
| Paper&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: 0220 Covered, piece goods&lt;br /&gt;
|-&lt;br /&gt;
| WHEA&lt;br /&gt;
| Wheat&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Arctic; see also GRAI, MAIZ, CERE&lt;br /&gt;
|-&lt;br /&gt;
| FOOD&lt;br /&gt;
| Food&lt;br /&gt;
| 0084 Express, refrigerated&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| YETI: 00A0 Refrigerated, piece goods&lt;br /&gt;
|-&lt;br /&gt;
| GOLD&lt;br /&gt;
| Gold&lt;br /&gt;
| 0008 Armoured&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Arctic; see also VALU, DIAM&lt;br /&gt;
|-&lt;br /&gt;
| RUBR&lt;br /&gt;
| Rubber&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| FRUT&lt;br /&gt;
| Fruit&lt;br /&gt;
| 0090 Bulk, refrigerated&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| FIRS &amp;amp; XIS: 00A4 Express, piece goods, refrigerated, YETI: 00A0 Piece goods, covered.&lt;br /&gt;
|-&lt;br /&gt;
| MAIZ&lt;br /&gt;
| Maize&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Tropic; see also GRAI, WHEA, CERE. OTIS: Renamed &amp;quot;Animal Feed&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| CORE&lt;br /&gt;
| Copper Ore&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| WATR&lt;br /&gt;
| Water&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| OTIS: 0044 Express, liquid&lt;br /&gt;
|-&lt;br /&gt;
| DIAM&lt;br /&gt;
| Diamonds&lt;br /&gt;
| 0008 Armoured&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Tropic; see also VALU, GOLD&lt;br /&gt;
|-&lt;br /&gt;
| SUGR&lt;br /&gt;
| Sugar&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Toyland. FIRS: 0030 Bulk, piece goods&lt;br /&gt;
|-&lt;br /&gt;
| AORE&lt;br /&gt;
| Bauxite (Aluminium ore)&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| BDMT&lt;br /&gt;
| Building Materials&lt;br /&gt;
| 0220 Piece goods, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| FIRS &amp;amp; XIS: 0030 Bulk, piece goods. YETI: 0020 Piece goods.&lt;br /&gt;
|-&lt;br /&gt;
| BEAN&lt;br /&gt;
| Beans&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| CZIS renamed to Potatoes&lt;br /&gt;
|-&lt;br /&gt;
| BEER&lt;br /&gt;
| Alcohol&lt;br /&gt;
| 0064 Express, piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| BOOM&lt;br /&gt;
| Explosives&lt;br /&gt;
| 0024 Express, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| OTIS: 0124 Express, Piece goods, hazardous &lt;br /&gt;
|-&lt;br /&gt;
| BRCK&lt;br /&gt;
| Bricks&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CBLK&lt;br /&gt;
| Carbon Black&lt;br /&gt;
| 0230 Piece goods, bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CERA&lt;br /&gt;
| Ceramics&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CERE&lt;br /&gt;
| Cereals&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CLAY&lt;br /&gt;
| Clay&lt;br /&gt;
| 0210 Bulk covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CMNT&lt;br /&gt;
| Cement&lt;br /&gt;
| 0210 Bulk covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| COPR&lt;br /&gt;
| Copper&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CSTI&lt;br /&gt;
| Cast Iron&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CTAR&lt;br /&gt;
| Coal Tar&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| DYES&lt;br /&gt;
| Dyes&lt;br /&gt;
| 0060 Piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ENSP&lt;br /&gt;
| Engineering Supplies&lt;br /&gt;
| 0024 Express, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| 2TT Industries of the Caribbean: named Machinery&lt;br /&gt;
|-&lt;br /&gt;
| FECR&lt;br /&gt;
| Ferrochrome&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| FERT&lt;br /&gt;
| Fertiliser&lt;br /&gt;
| 0030 Bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| FIRS: 0024 Express, piece goods. OTIS: 0034 Express, piece goods, bulk. XIS: 0230 Covered, piece goods, bulk. ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| FICR&lt;br /&gt;
| Fibre crops&lt;br /&gt;
| 0030 Bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| OTIS: 0230 Piece goods, bulk, covered/sheltered, renamed &amp;quot;Cotton&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| FISH&lt;br /&gt;
| Fish&lt;br /&gt;
| 0084 Express, refrigerated&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| FMSP&lt;br /&gt;
| Farm Supplies&lt;br /&gt;
| 0024 Express, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| GLAS&lt;br /&gt;
| Glass&lt;br /&gt;
| 0420 Piece goods, oversized&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: 0410 Piece goods, bulk&lt;br /&gt;
|-&lt;br /&gt;
| GRVL&lt;br /&gt;
| Stone&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| Renamed from &amp;quot;Gravel / Ballast&amp;quot; XIS: Renamed &amp;quot;Aggregate&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| JAVA&lt;br /&gt;
| Coffee&lt;br /&gt;
| 0024 Piece goods, express&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: black&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Units in FIRS are &#039;bags&#039;&lt;br /&gt;
|-&lt;br /&gt;
| KAOL&lt;br /&gt;
| Kaolin (China Clay)&lt;br /&gt;
| 0250 Bulk, liquids, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: black&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS: Renamed &amp;quot;Lithium&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| LIME&lt;br /&gt;
| Lime stone&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| MILK&lt;br /&gt;
| Milk&lt;br /&gt;
| 00C4 Express, liquid, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| OLSD&lt;br /&gt;
| Oil seed&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PEAT&lt;br /&gt;
| Peat&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Biomass&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| PETR&lt;br /&gt;
| Petrol / Fuel Oil&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: 0130 Hazardous, liquid&lt;br /&gt;
|-&lt;br /&gt;
| PHOS&lt;br /&gt;
| Phosphate&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Oil sands&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| PLAS&lt;br /&gt;
| Plastic&lt;br /&gt;
| 0060 Piece goods, liquid&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| PORE&lt;br /&gt;
| Pyrite Ore&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Zinc ore&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| POTA&lt;br /&gt;
| Potash&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| FIRS: 0010 Bulk. ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| RFPR&lt;br /&gt;
| Refined products&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: renamed &amp;quot;Sewage&amp;quot;, XIS: renamed &amp;quot;Petrochemicals&amp;quot;, FIRS4: 0160 Liquid, Piece Goods, Hazardous, renamed &amp;quot;Chemicals&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| SAND&lt;br /&gt;
| Sand&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SCMT&lt;br /&gt;
| Scrap Metal&lt;br /&gt;
| 1010 Bulk, non-pourable&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: Renamed &amp;quot;Waste/Garbage&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| SULP&lt;br /&gt;
| Sulphur&lt;br /&gt;
| 0250 Bulk, liquid, covered/sheltered.&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| ECS: 0210 Bulk, covered/sheltered &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot;&amp;gt;ECS cargo classes changed as of Dec 31, 2010&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| TOUR&lt;br /&gt;
| Tourists&lt;br /&gt;
| 0005 Passengers, express&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| ECS; see also OTI2&lt;br /&gt;
|-&lt;br /&gt;
| TYRE&lt;br /&gt;
| Tyres&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| URAN&lt;br /&gt;
| Uranium&lt;br /&gt;
| 0110 Bulk, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| 2TT: Piece goods, hazardous&lt;br /&gt;
|-&lt;br /&gt;
| VEHI&lt;br /&gt;
| Vehicles&lt;br /&gt;
| 0420 Piece goods, oversized&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS: 0020 Piece goods. OTIS: 0020 Piece goods, renamed &amp;quot;Cars&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| WDPR&lt;br /&gt;
| Wood Products&lt;br /&gt;
| 0030 Bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS &amp;amp; OTIS: Renamed &amp;quot;Timber&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| WOOL&lt;br /&gt;
| Wool&lt;br /&gt;
| 0220 Piece goods, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ZINC&lt;br /&gt;
| Zinc&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Extended Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;10&amp;quot; | these cargos are only present in rare/specialized situations&lt;br /&gt;
|-&lt;br /&gt;
| ACID&lt;br /&gt;
| Acid&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ALUM&lt;br /&gt;
| Aluminium&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| FIRS; See also METL&lt;br /&gt;
|-&lt;br /&gt;
| BAKE&lt;br /&gt;
| Flour&lt;br /&gt;
| 0A30 Bulk, powderized, piece goods, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CASS&lt;br /&gt;
| Cassava&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CHLO&lt;br /&gt;
| Chlorine&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CHSE&lt;br /&gt;
| Cheese&lt;br /&gt;
| 00C4 Express, liquid, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CIGR&lt;br /&gt;
| Cigars&lt;br /&gt;
| 0024 Piece goods, express&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| COAT&lt;br /&gt;
| Paints &amp;amp; Coatings&lt;br /&gt;
| 0060 Piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| 2TT Lumberjack Industries: renamed Varnish&lt;br /&gt;
|-&lt;br /&gt;
| COBL&lt;br /&gt;
| Cobalt&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| COKE&lt;br /&gt;
| Coke&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ELTR&lt;br /&gt;
| Electricity&lt;br /&gt;
| 8000 Special&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|CZIS uses its own labels... see ELEC and NODC&lt;br /&gt;
|-&lt;br /&gt;
| EOIL&lt;br /&gt;
| Edible Oil&lt;br /&gt;
| 0060 Piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| FRVG&lt;br /&gt;
| Fruit (and optionally Vegetables)&lt;br /&gt;
| 00A4 Express, piece goods, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Deprecated FIRS cargo. Replaced by FRUT for FIRS &amp;gt; v1.3.0&lt;br /&gt;
|-&lt;br /&gt;
| FUEL&lt;br /&gt;
| Natural Gas&lt;br /&gt;
| 0140 Liquid, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Use PETR for refined-oil fuel&lt;br /&gt;
|-&lt;br /&gt;
| FURN&lt;br /&gt;
| Furniture&lt;br /&gt;
| 0230 Piece goods, bulk, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| IRON&lt;br /&gt;
| Pig Iron&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| LYE_&lt;br /&gt;
| Sodium Hydroxide (Lye)&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| MEAT&lt;br /&gt;
| Meat&lt;br /&gt;
| 00A4 Express, piece goods, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| METL&lt;br /&gt;
| Metal&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Aluminium&amp;quot;; See also ALUM&lt;br /&gt;
|-&lt;br /&gt;
| MNO2&lt;br /&gt;
| Manganese&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| MNSP&lt;br /&gt;
| Manufacturing Supplies&lt;br /&gt;
| 0024 Piece goods, express&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Packaging&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| MOLS&lt;br /&gt;
| Molasses&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| MPTS&lt;br /&gt;
| Machine parts&lt;br /&gt;
| 0220 Covered, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NH3_&lt;br /&gt;
| Ammonia&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NHNO&lt;br /&gt;
| [https://en.wikipedia.org/wiki/Ammonium_nitrate NH4NO3 chemical]&lt;br /&gt;
| 0130 Hazardous, bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NUTS&lt;br /&gt;
| Nuts&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NICK&lt;br /&gt;
| Nickel&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NITR&lt;br /&gt;
| Nitrate&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NKOR&lt;br /&gt;
| Nickel ore&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| OTIS: Renamed &amp;quot;Nickel&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| NUKF&lt;br /&gt;
| Nuclear fuel&lt;br /&gt;
| Piece goods, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Improved Town Industries&lt;br /&gt;
|-&lt;br /&gt;
| NUKW&lt;br /&gt;
| Nuclear waste&lt;br /&gt;
| Piece goods, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Improved Town Industries&lt;br /&gt;
|-&lt;br /&gt;
| OILI&lt;br /&gt;
| Oil (imported)&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| OILD&lt;br /&gt;
| Oil (domestic)&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| OTI1&lt;br /&gt;
| Workers&lt;br /&gt;
| 0001 Passengers&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| OTI2&lt;br /&gt;
| Tourists&lt;br /&gt;
| 0001 Passengers&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| OYST&lt;br /&gt;
| Oysters&lt;br /&gt;
| 00A4 Express, piece goods, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| O2__&lt;br /&gt;
| Oxygen&lt;br /&gt;
| 0040 Liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| PACK&lt;br /&gt;
| Packaging&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|Packaging used mostly for food production.&lt;br /&gt;
|-&lt;br /&gt;
| PCL_&lt;br /&gt;
| Parcels&lt;br /&gt;
| 0006 Express, mail&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| PIPE&lt;br /&gt;
| Pipe&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| POWR&lt;br /&gt;
| Electrical Parts&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: 0220 Covered, piece goods, renamed &amp;quot;Electrical Machines&amp;quot;. XIS and CZIS: Renamed &amp;quot;Electrical Machines&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| QLME&lt;br /&gt;
| Quicklime&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| RCYC&lt;br /&gt;
| Recyclables&lt;br /&gt;
| 0030 Bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SALT&lt;br /&gt;
| Salt&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SASH&lt;br /&gt;
| Soda Ash&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SEED&lt;br /&gt;
| Seed&lt;br /&gt;
| 0230 Piece goods, bulk, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SESP&lt;br /&gt;
| Marine Supplies&lt;br /&gt;
| 0024 Express, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SGBT&lt;br /&gt;
| Sugar beet&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| not in tropical&lt;br /&gt;
|-&lt;br /&gt;
| SGCN&lt;br /&gt;
| Sugarcane&lt;br /&gt;
| 1010 Bulk, non-pourable&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| only tropical&lt;br /&gt;
|-&lt;br /&gt;
| SLAG&lt;br /&gt;
| Slag&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SOAP&lt;br /&gt;
| Cleaning Agents&lt;br /&gt;
| 0060 Piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STAL&lt;br /&gt;
| Alloy Steel&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STCB&lt;br /&gt;
| Carbon Steel&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STSE&lt;br /&gt;
| Steel Sections&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STSH&lt;br /&gt;
| Steel Sheet&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STST&lt;br /&gt;
| Stainless Steel&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STWR&lt;br /&gt;
| Steel Wire Rod&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| TATO&lt;br /&gt;
| Potatoes&lt;br /&gt;
| 00A4 Express, piece goods, refrigerated&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| CZIS uses renamed Beans&lt;br /&gt;
|-&lt;br /&gt;
| TEXT&lt;br /&gt;
| Textile&lt;br /&gt;
| 0220 Piece goods, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| TBCO&lt;br /&gt;
| Tobacco&lt;br /&gt;
| 1010 Bulk, non-pourable&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| TWOD&lt;br /&gt;
| Tropic Wood&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| formerly intended as a default cargo&lt;br /&gt;
|-&lt;br /&gt;
| VBOD&lt;br /&gt;
| Vehicle bodies&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| VENG&lt;br /&gt;
| Vehicle Engines&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| VPTS&lt;br /&gt;
| Vehicle Parts&lt;br /&gt;
| 0024 Piece goods, express&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS: 0020 Piece goods, renamed &amp;quot;Parts&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| WSTE&lt;br /&gt;
| Waste&lt;br /&gt;
| 0230 Piece goods, bulk, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Used by Improved Town Industries. Deprecated in FIRS.&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Fantasy Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;10&amp;quot; | these cargos are for use in fantasy or science fiction settings&lt;br /&gt;
|-&lt;br /&gt;
| BATT&lt;br /&gt;
| Batteries&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| BUBL&lt;br /&gt;
| Bubbles&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| COLA&lt;br /&gt;
| Cola&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| CTCD&lt;br /&gt;
| Cotton Candy (Candyfloss)&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| FZDR&lt;br /&gt;
| Fizzy Drinks&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| PLST&lt;br /&gt;
| Plastic&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland; see also PLAS&lt;br /&gt;
|-&lt;br /&gt;
| SWET&lt;br /&gt;
| Sweets (Candy)&lt;br /&gt;
| 0004 Express&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| TOFF&lt;br /&gt;
| Toffee&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| TOYS&lt;br /&gt;
| Toys&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| YETI&lt;br /&gt;
| Workers, YETI dudes&lt;br /&gt;
| 0404 Express, oversized&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| YETY&lt;br /&gt;
| Tired Workers, Tired YETI dudes&lt;br /&gt;
| 0404 Express, oversized&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ELEC&lt;br /&gt;
| Charged Batteries (electricity from PP)&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| Used as means of electricity transportation.&lt;br /&gt;
|-&lt;br /&gt;
| NODC&lt;br /&gt;
| Uncharged Batteries (return of batteries) aka No Direct Current&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|Used as means of electricity transportation.&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Special Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;10&amp;quot; | these cargos are for use outside industry sets and do not represent transporting anything&lt;br /&gt;
|-&lt;br /&gt;
| GEAR&lt;br /&gt;
| Locomotive regearing&lt;br /&gt;
| 8000 Special&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Using this cargo may make your vehicle set incompatible with some industry sets&lt;br /&gt;
use CB36 instead to set capacity to 0&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Deprecated Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;10&amp;quot; | these cargos are not used by any current industry set, and are listed here for backwards compatibility&lt;br /&gt;
|-&lt;br /&gt;
| RSGR&lt;br /&gt;
| Raw Sugar&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Deprecated in FIRS. See SGBT and SGCN&lt;br /&gt;
|-&lt;br /&gt;
| SCRP&lt;br /&gt;
| Scrap Metal&lt;br /&gt;
| 0010 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Deprecated in FIRS. See SCMT instead&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you write or publish a NewGRF which introduces a new cargo label, please also add a comment where the new label is used.&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=CargoTypes&amp;diff=4870</id>
		<title>CargoTypes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=CargoTypes&amp;diff=4870"/>
		<updated>2024-10-08T22:09:11Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: remove &amp;#039;blindly&amp;#039; not helpful language here&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Cargo labels in OpenTTD&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{grfFrom|8}} In GRF version 8 the value to be used in all vehicle and industry properties, and in [[Action3|action 3]], is the position of the cargo label in the [[Action0/Global_Settings#Cargo_translation_table_.2809.29|cargo translation table]] included in the GRF.&lt;br /&gt;
&lt;br /&gt;
{{grfTill|7}} GRF version 7 and below used different cargo properties for different properties (called &amp;quot;Type A&amp;quot; or &amp;quot;translated&amp;quot; and &amp;quot;Type B&amp;quot; or &amp;quot;untranslated&amp;quot; cargo slots), for historical reasons.  This method is deprecated as it meant relying solely on cargos always using the same slots.  You can see the table of Type A and Type B slots [http://newgrf-specs.tt-wiki.net/index.php?title=CargoTypes&amp;amp;oldid=2861 here] if you really want to.&lt;br /&gt;
&lt;br /&gt;
{{ottd|15.0}} Since 15.0, a default cargo translation table corresponding to the climate (see [[CargoDefaultProps]]) is used if one is not provided.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{grfFrom|8}} In GRF version 8, the default translation table is 32 entries long and maps &amp;quot;Type B&amp;quot; slots to each cargo label.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{grfTill|7}} In GRF version 7, the default translation table is 12 entries long and uses &amp;quot;Type A&amp;quot; slots to each cargo label.&amp;lt;br/&amp;gt;&lt;br /&gt;
The default translation table works just like a GRF provided table: If a cargo label is redefined in a different slot this is correctly translated, and if the cargo label is replaced the cargo type is mapped to invalid.&lt;br /&gt;
&lt;br /&gt;
== Cargo Labels ==&lt;br /&gt;
&lt;br /&gt;
The following cargo labels have been defined so far:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Label&lt;br /&gt;
! Cargo Description&lt;br /&gt;
! [[Action0Cargos#CargoClasses_.2816.29|Cargo classes]]&lt;br /&gt;
! colspan=&amp;quot;8&amp;quot; | Usage&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Basic Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;10&amp;quot; | These cargos are present when no NewGRF is used, or in some common Industry NewGRFs&lt;br /&gt;
|-&lt;br /&gt;
| PASS&lt;br /&gt;
| Passengers&lt;br /&gt;
| 0001 Passengers&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| COAL&lt;br /&gt;
| Coal&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| MAIL&lt;br /&gt;
| Mail&lt;br /&gt;
| 0002 Mail&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| OIL_&lt;br /&gt;
| Oil&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| LVST&lt;br /&gt;
| Livestock&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| GOOD&lt;br /&gt;
| Goods&lt;br /&gt;
| 0004 Express&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| GRAI&lt;br /&gt;
| Grain&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| Temperate; see also WHEA, MAIZ, CERE. YETI &amp;amp; OTIS: 0210 Covered, bulk&lt;br /&gt;
|-&lt;br /&gt;
| WOOD&lt;br /&gt;
| Wood&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| Named Logs in some industry sets (FIRS, 2TT)&lt;br /&gt;
|-&lt;br /&gt;
| IORE&lt;br /&gt;
| Iron Ore&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STEL&lt;br /&gt;
| Steel&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| YETI: Renamed &amp;quot;Balls of Steel&amp;quot;, OTIS: Renamed &amp;quot;Metal&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| VALU&lt;br /&gt;
| Valuables&lt;br /&gt;
| 0008 Armoured&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Temperate; see also GOLD, DIAM&lt;br /&gt;
|-&lt;br /&gt;
| PAPR&lt;br /&gt;
| Paper&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: 0220 Covered, piece goods&lt;br /&gt;
|-&lt;br /&gt;
| WHEA&lt;br /&gt;
| Wheat&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Arctic; see also GRAI, MAIZ, CERE&lt;br /&gt;
|-&lt;br /&gt;
| FOOD&lt;br /&gt;
| Food&lt;br /&gt;
| 0084 Express, refrigerated&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| YETI: 00A0 Refrigerated, piece goods&lt;br /&gt;
|-&lt;br /&gt;
| GOLD&lt;br /&gt;
| Gold&lt;br /&gt;
| 0008 Armoured&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Arctic; see also VALU, DIAM&lt;br /&gt;
|-&lt;br /&gt;
| RUBR&lt;br /&gt;
| Rubber&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| FRUT&lt;br /&gt;
| Fruit&lt;br /&gt;
| 0090 Bulk, refrigerated&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| FIRS &amp;amp; XIS: 00A4 Express, piece goods, refrigerated, YETI: 00A0 Piece goods, covered.&lt;br /&gt;
|-&lt;br /&gt;
| MAIZ&lt;br /&gt;
| Maize&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Tropic; see also GRAI, WHEA, CERE. OTIS: Renamed &amp;quot;Animal Feed&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| CORE&lt;br /&gt;
| Copper Ore&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| WATR&lt;br /&gt;
| Water&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| OTIS: 0044 Express, liquid&lt;br /&gt;
|-&lt;br /&gt;
| DIAM&lt;br /&gt;
| Diamonds&lt;br /&gt;
| 0008 Armoured&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Tropic; see also VALU, GOLD&lt;br /&gt;
|-&lt;br /&gt;
| SUGR&lt;br /&gt;
| Sugar&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Toyland. FIRS: 0030 Bulk, piece goods&lt;br /&gt;
|-&lt;br /&gt;
| AORE&lt;br /&gt;
| Bauxite (Aluminium ore)&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| BDMT&lt;br /&gt;
| Building Materials&lt;br /&gt;
| 0220 Piece goods, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| FIRS &amp;amp; XIS: 0030 Bulk, piece goods. YETI: 0020 Piece goods.&lt;br /&gt;
|-&lt;br /&gt;
| BEAN&lt;br /&gt;
| Beans&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| CZIS renamed to Potatoes&lt;br /&gt;
|-&lt;br /&gt;
| BEER&lt;br /&gt;
| Alcohol&lt;br /&gt;
| 0064 Express, piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| BOOM&lt;br /&gt;
| Explosives&lt;br /&gt;
| 0024 Express, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| OTIS: 0124 Express, Piece goods, hazardous &lt;br /&gt;
|-&lt;br /&gt;
| BRCK&lt;br /&gt;
| Bricks&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CBLK&lt;br /&gt;
| Carbon Black&lt;br /&gt;
| 0230 Piece goods, bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CERA&lt;br /&gt;
| Ceramics&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CERE&lt;br /&gt;
| Cereals&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CLAY&lt;br /&gt;
| Clay&lt;br /&gt;
| 0210 Bulk covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CMNT&lt;br /&gt;
| Cement&lt;br /&gt;
| 0210 Bulk covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| COPR&lt;br /&gt;
| Copper&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CSTI&lt;br /&gt;
| Cast Iron&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CTAR&lt;br /&gt;
| Coal Tar&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| DYES&lt;br /&gt;
| Dyes&lt;br /&gt;
| 0060 Piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ENSP&lt;br /&gt;
| Engineering Supplies&lt;br /&gt;
| 0024 Express, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| 2TT Industries of the Caribbean: named Machinery&lt;br /&gt;
|-&lt;br /&gt;
| FECR&lt;br /&gt;
| Ferrochrome&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| FERT&lt;br /&gt;
| Fertiliser&lt;br /&gt;
| 0030 Bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| FIRS: 0024 Express, piece goods. OTIS: 0034 Express, piece goods, bulk. XIS: 0230 Covered, piece goods, bulk. ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| FICR&lt;br /&gt;
| Fibre crops&lt;br /&gt;
| 0030 Bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| OTIS: 0230 Piece goods, bulk, covered/sheltered, renamed &amp;quot;Cotton&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| FISH&lt;br /&gt;
| Fish&lt;br /&gt;
| 0084 Express, refrigerated&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| FMSP&lt;br /&gt;
| Farm Supplies&lt;br /&gt;
| 0024 Express, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| GLAS&lt;br /&gt;
| Glass&lt;br /&gt;
| 0420 Piece goods, oversized&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: 0410 Piece goods, bulk&lt;br /&gt;
|-&lt;br /&gt;
| GRVL&lt;br /&gt;
| Stone&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| Renamed from &amp;quot;Gravel / Ballast&amp;quot; XIS: Renamed &amp;quot;Aggregate&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| JAVA&lt;br /&gt;
| Coffee&lt;br /&gt;
| 0024 Piece goods, express&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: black&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Units in FIRS are &#039;bags&#039;&lt;br /&gt;
|-&lt;br /&gt;
| KAOL&lt;br /&gt;
| Kaolin (China Clay)&lt;br /&gt;
| 0250 Bulk, liquids, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: black&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS: Renamed &amp;quot;Lithium&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| LIME&lt;br /&gt;
| Lime stone&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| MILK&lt;br /&gt;
| Milk&lt;br /&gt;
| 00C4 Express, liquid, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| OLSD&lt;br /&gt;
| Oil seed&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PEAT&lt;br /&gt;
| Peat&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Biomass&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| PETR&lt;br /&gt;
| Petrol / Fuel Oil&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: 0130 Hazardous, liquid&lt;br /&gt;
|-&lt;br /&gt;
| PHOS&lt;br /&gt;
| Phosphate&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Oil sands&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| PLAS&lt;br /&gt;
| Plastic&lt;br /&gt;
| 0060 Piece goods, liquid&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| PORE&lt;br /&gt;
| Pyrite Ore&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Zinc ore&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| POTA&lt;br /&gt;
| Potash&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| FIRS: 0010 Bulk. ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| RFPR&lt;br /&gt;
| Refined products&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: renamed &amp;quot;Sewage&amp;quot;, XIS: renamed &amp;quot;Petrochemicals&amp;quot;, FIRS4: 0160 Liquid, Piece Goods, Hazardous, renamed &amp;quot;Chemicals&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| SAND&lt;br /&gt;
| Sand&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SCMT&lt;br /&gt;
| Scrap Metal&lt;br /&gt;
| 1010 Bulk, non-pourable&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: Renamed &amp;quot;Waste/Garbage&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| SULP&lt;br /&gt;
| Sulphur&lt;br /&gt;
| 0250 Bulk, liquid, covered/sheltered.&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| ECS: 0210 Bulk, covered/sheltered &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot;&amp;gt;ECS cargo classes changed as of Dec 31, 2010&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| TOUR&lt;br /&gt;
| Tourists&lt;br /&gt;
| 0005 Passengers, express&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| ECS; see also OTI2&lt;br /&gt;
|-&lt;br /&gt;
| TYRE&lt;br /&gt;
| Tyres&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| URAN&lt;br /&gt;
| Uranium&lt;br /&gt;
| 0110 Bulk, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| 2TT: Piece goods, hazardous&lt;br /&gt;
|-&lt;br /&gt;
| VEHI&lt;br /&gt;
| Vehicles&lt;br /&gt;
| 0420 Piece goods, oversized&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS: 0020 Piece goods. OTIS: 0020 Piece goods, renamed &amp;quot;Cars&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| WDPR&lt;br /&gt;
| Wood Products&lt;br /&gt;
| 0030 Bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS &amp;amp; OTIS: Renamed &amp;quot;Timber&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| WOOL&lt;br /&gt;
| Wool&lt;br /&gt;
| 0220 Piece goods, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FFCC00; color: black&amp;quot; | [[ttwiki:ECS|ECS]]&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| ECS: &amp;lt;ref name=&amp;quot;ecs_cargo_change&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ZINC&lt;br /&gt;
| Zinc&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Extended Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;10&amp;quot; | these cargos are only present in rare/specialized situations&lt;br /&gt;
|-&lt;br /&gt;
| ACID&lt;br /&gt;
| Acid&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ALUM&lt;br /&gt;
| Aluminium&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| FIRS; See also METL&lt;br /&gt;
|-&lt;br /&gt;
| BAKE&lt;br /&gt;
| Flour&lt;br /&gt;
| 0A30 Bulk, powderized, piece goods, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CASS&lt;br /&gt;
| Cassava&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CHLO&lt;br /&gt;
| Chlorine&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CHSE&lt;br /&gt;
| Cheese&lt;br /&gt;
| 00C4 Express, liquid, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CIGR&lt;br /&gt;
| Cigars&lt;br /&gt;
| 0024 Piece goods, express&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| COAT&lt;br /&gt;
| Paints &amp;amp; Coatings&lt;br /&gt;
| 0060 Piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| 2TT Lumberjack Industries: renamed Varnish&lt;br /&gt;
|-&lt;br /&gt;
| COBL&lt;br /&gt;
| Cobalt&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| COKE&lt;br /&gt;
| Coke&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ELTR&lt;br /&gt;
| Electricity&lt;br /&gt;
| 8000 Special&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|CZIS uses its own labels... see ELEC and NODC&lt;br /&gt;
|-&lt;br /&gt;
| EOIL&lt;br /&gt;
| Edible Oil&lt;br /&gt;
| 0060 Piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| FRVG&lt;br /&gt;
| Fruit (and optionally Vegetables)&lt;br /&gt;
| 00A4 Express, piece goods, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Deprecated FIRS cargo. Replaced by FRUT for FIRS &amp;gt; v1.3.0&lt;br /&gt;
|-&lt;br /&gt;
| FUEL&lt;br /&gt;
| Natural Gas&lt;br /&gt;
| 0140 Liquid, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Use PETR for refined-oil fuel&lt;br /&gt;
|-&lt;br /&gt;
| FURN&lt;br /&gt;
| Furniture&lt;br /&gt;
| 0230 Piece goods, bulk, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| IRON&lt;br /&gt;
| Pig Iron&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| LYE_&lt;br /&gt;
| Sodium Hydroxide (Lye)&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| MEAT&lt;br /&gt;
| Meat&lt;br /&gt;
| 00A4 Express, piece goods, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| METL&lt;br /&gt;
| Metal&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Aluminium&amp;quot;; See also ALUM&lt;br /&gt;
|-&lt;br /&gt;
| MNO2&lt;br /&gt;
| Manganese&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| MNSP&lt;br /&gt;
| Manufacturing Supplies&lt;br /&gt;
| 0024 Piece goods, express&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| XIS: Renamed &amp;quot;Packaging&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| MOLS&lt;br /&gt;
| Molasses&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| MPTS&lt;br /&gt;
| Machine parts&lt;br /&gt;
| 0220 Covered, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NH3_&lt;br /&gt;
| Ammonia&lt;br /&gt;
| 0140 Liquids, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NHNO&lt;br /&gt;
| [https://en.wikipedia.org/wiki/Ammonium_nitrate NH4NO3 chemical]&lt;br /&gt;
| 0130 Hazardous, bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NUTS&lt;br /&gt;
| Nuts&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NICK&lt;br /&gt;
| Nickel&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NITR&lt;br /&gt;
| Nitrate&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| NKOR&lt;br /&gt;
| Nickel ore&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| OTIS: Renamed &amp;quot;Nickel&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| NUKF&lt;br /&gt;
| Nuclear fuel&lt;br /&gt;
| Piece goods, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Improved Town Industries&lt;br /&gt;
|-&lt;br /&gt;
| NUKW&lt;br /&gt;
| Nuclear waste&lt;br /&gt;
| Piece goods, hazardous&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Improved Town Industries&lt;br /&gt;
|-&lt;br /&gt;
| OILI&lt;br /&gt;
| Oil (imported)&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| OILD&lt;br /&gt;
| Oil (domestic)&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| OTI1&lt;br /&gt;
| Workers&lt;br /&gt;
| 0001 Passengers&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| OTI2&lt;br /&gt;
| Tourists&lt;br /&gt;
| 0001 Passengers&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| OYST&lt;br /&gt;
| Oysters&lt;br /&gt;
| 00A4 Express, piece goods, refrigerated&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| O2__&lt;br /&gt;
| Oxygen&lt;br /&gt;
| 0040 Liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| PACK&lt;br /&gt;
| Packaging&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|Packaging used mostly for food production.&lt;br /&gt;
|-&lt;br /&gt;
| PCL_&lt;br /&gt;
| Parcels&lt;br /&gt;
| 0006 Express, mail&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| PIPE&lt;br /&gt;
| Pipe&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| POWR&lt;br /&gt;
| Electrical Parts&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| OTIS: 0220 Covered, piece goods, renamed &amp;quot;Electrical Machines&amp;quot;. XIS and CZIS: Renamed &amp;quot;Electrical Machines&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| QLME&lt;br /&gt;
| Quicklime&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| RCYC&lt;br /&gt;
| Recyclables&lt;br /&gt;
| 0030 Bulk, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SALT&lt;br /&gt;
| Salt&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SASH&lt;br /&gt;
| Soda Ash&lt;br /&gt;
| 0210 Bulk, covered/sheltered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SEED&lt;br /&gt;
| Seed&lt;br /&gt;
| 0230 Piece goods, bulk, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SESP&lt;br /&gt;
| Marine Supplies&lt;br /&gt;
| 0024 Express, piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SGBT&lt;br /&gt;
| Sugar beet&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| not in tropical&lt;br /&gt;
|-&lt;br /&gt;
| SGCN&lt;br /&gt;
| Sugarcane&lt;br /&gt;
| 1010 Bulk, non-pourable&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| only tropical&lt;br /&gt;
|-&lt;br /&gt;
| SLAG&lt;br /&gt;
| Slag&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SOAP&lt;br /&gt;
| Cleaning Agents&lt;br /&gt;
| 0060 Piece goods, liquids&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STAL&lt;br /&gt;
| Alloy Steel&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STCB&lt;br /&gt;
| Carbon Steel&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STSE&lt;br /&gt;
| Steel Sections&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STSH&lt;br /&gt;
| Steel Sheet&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STST&lt;br /&gt;
| Stainless Steel&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| STWR&lt;br /&gt;
| Steel Wire Rod&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| TATO&lt;br /&gt;
| Potatoes&lt;br /&gt;
| 00A4 Express, piece goods, refrigerated&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| CZIS uses renamed Beans&lt;br /&gt;
|-&lt;br /&gt;
| TEXT&lt;br /&gt;
| Textile&lt;br /&gt;
| 0220 Piece goods, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| TBCO&lt;br /&gt;
| Tobacco&lt;br /&gt;
| 1010 Bulk, non-pourable&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Industries of the Caribbean&lt;br /&gt;
|-&lt;br /&gt;
| TWOD&lt;br /&gt;
| Tropic Wood&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #D1D1D1; color: black&amp;quot; | [[ttwiki:OTIS|OTIS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| formerly intended as a default cargo&lt;br /&gt;
|-&lt;br /&gt;
| VBOD&lt;br /&gt;
| Vehicle bodies&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| VENG&lt;br /&gt;
| Vehicle Engines&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| VPTS&lt;br /&gt;
| Vehicle Parts&lt;br /&gt;
| 0024 Piece goods, express&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #1AD74C; color: white&amp;quot; | [[ttwiki:FIRS|FIRS]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #80A0D0; color: white&amp;quot; | [[ttwiki:XIS|XIS]]&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| XIS: 0020 Piece goods, renamed &amp;quot;Parts&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| WSTE&lt;br /&gt;
| Waste&lt;br /&gt;
| 0230 Piece goods, bulk, covered&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
|&lt;br /&gt;
| Used by Improved Town Industries. Deprecated in FIRS.&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Fantasy Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;10&amp;quot; | these cargos are for use in fantasy or science fiction settings&lt;br /&gt;
|-&lt;br /&gt;
| BATT&lt;br /&gt;
| Batteries&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| BUBL&lt;br /&gt;
| Bubbles&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| COLA&lt;br /&gt;
| Cola&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| CTCD&lt;br /&gt;
| Cotton Candy (Candyfloss)&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| FZDR&lt;br /&gt;
| Fizzy Drinks&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| PLST&lt;br /&gt;
| Plastic&lt;br /&gt;
| 0040 Liquid&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland; see also PLAS&lt;br /&gt;
|-&lt;br /&gt;
| SWET&lt;br /&gt;
| Sweets (Candy)&lt;br /&gt;
| 0004 Express&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| TOFF&lt;br /&gt;
| Toffee&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| TOYS&lt;br /&gt;
| Toys&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
| style=&amp;quot;background: #CC00CC; color: black&amp;quot; | TTD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Toyland&lt;br /&gt;
|-&lt;br /&gt;
| YETI&lt;br /&gt;
| Workers, YETI dudes&lt;br /&gt;
| 0404 Express, oversized&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| YETY&lt;br /&gt;
| Tired Workers, Tired YETI dudes&lt;br /&gt;
| 0404 Express, oversized&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #009fe3; color: black&amp;quot; | [[ttwiki:YETI|YETI]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ELEC&lt;br /&gt;
| Charged Batteries (electricity from PP)&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
| Used as means of electricity transportation.&lt;br /&gt;
|-&lt;br /&gt;
| NODC&lt;br /&gt;
| Uncharged Batteries (return of batteries) aka No Direct Current&lt;br /&gt;
| 0020 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #FF0000; color: white&amp;quot; | CZIS&lt;br /&gt;
|Used as means of electricity transportation.&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Special Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;10&amp;quot; | these cargos are for use outside industry sets and do not represent transporting anything&lt;br /&gt;
|-&lt;br /&gt;
| DFLT&lt;br /&gt;
| &#039;Default&#039;&lt;br /&gt;
| ---- None&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Used by andythenorth to identify default cargo graphics in newgrfs that use code/graphics generation. &lt;br /&gt;
Not intended to be used as an actual cargo in translation tables.&lt;br /&gt;
|-&lt;br /&gt;
| GEAR&lt;br /&gt;
| Locomotive regearing&lt;br /&gt;
| 8000 Special&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Using this cargo may make your vehicle set incompatible with some industry sets&lt;br /&gt;
use CB36 instead to set capacity to 0&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Deprecated Cargos&#039;&#039;&#039;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; colspan=&amp;quot;10&amp;quot; | these cargos are not used by any current industry set, and are listed here for backwards compatibility&lt;br /&gt;
|-&lt;br /&gt;
| RSGR&lt;br /&gt;
| Raw Sugar&lt;br /&gt;
| 0010 Bulk&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Deprecated in FIRS. See SGBT and SGCN&lt;br /&gt;
|-&lt;br /&gt;
| SCRP&lt;br /&gt;
| Scrap Metal&lt;br /&gt;
| 0010 Piece goods&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Deprecated in FIRS. See SCMT instead&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you write or publish a NewGRF which introduces a new cargo label, please also add a comment where the new label is used.&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Cargos&amp;diff=4869</id>
		<title>NML:Cargos</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Cargos&amp;diff=4869"/>
		<updated>2024-10-06T09:51:56Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* Cargo classes */  - note about CC_NON_POURABLE and CC_NEO_BULK&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
==Cargo IDs==&lt;br /&gt;
For cargos, the item ID corresponds to the cargo type slot of the cargo. TTD default cargos occupy slots 0-11, so if you want to define a new cargo be sure to set this ID to 12 or higher. It is recommended to set the &#039;number&#039;-property to the same value as the item ID.&lt;br /&gt;
&lt;br /&gt;
==Cargo properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| number&lt;br /&gt;
| 0..63&lt;br /&gt;
| Number of the cargo for bitmasks. Prior to {{ottd|1.9}} this was clamped to 0..31. This mostly affects old NewGRFs that don&#039;t have a cargo translation table.&lt;br /&gt;
|-&lt;br /&gt;
| type_name&lt;br /&gt;
| string&lt;br /&gt;
| String to use as cargo type name. Example: &amp;quot;Passengers&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_CARGO_PLURAL_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| unit_name&lt;br /&gt;
| string&lt;br /&gt;
| String to use for the name of one unit from the cargo type. Currently used for subsidies only (First Passenger service to..). Example string: &amp;quot;Passenger&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_CARGO_SINGULAR_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| units_of_cargo&lt;br /&gt;
| string&lt;br /&gt;
| String used to show the &amp;quot;short cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 tonnes&amp;quot; or &amp;quot;20.000 litres&amp;quot;. Example: &amp;quot;{COMMA} item{P &amp;quot;&amp;quot; s}&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_PASSENGERS and further), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| items_of_cargo&lt;br /&gt;
| string&lt;br /&gt;
| String used to show the &amp;quot;long cargo&amp;quot; form for cargo units, e.g. &amp;quot;10 tonnes of coal&amp;quot; or &amp;quot;20.000 litres of water&amp;quot;. Example: &amp;quot;{COMMA} item{P &amp;quot;&amp;quot; s} of livestock&amp;quot;. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_QUANTITY_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| type_abbreviation&lt;br /&gt;
| string&lt;br /&gt;
| String used for the two-letter cargo type abbreviation. Must start with a {TINYFONT} string-code. Example: &amp;quot;{TINYFONT}XX&amp;quot;. Make sure to avoid multiple cargos having the same abbreviation. The list of [[NML:Default_TTD_strings|default TTD strings]] contains the strings used by the default cargos (TTD_STR_ABBREV_XXX), which may be re-used.&lt;br /&gt;
|-&lt;br /&gt;
| sprite&lt;br /&gt;
| sprite&lt;br /&gt;
| TTD sprite number for the icon of the cargo. Alternatively, set to NEW_CARGO_SPRITE and use a graphics block to define a custom sprite.&lt;br /&gt;
|-&lt;br /&gt;
| weight&lt;br /&gt;
| float 0..255&lt;br /&gt;
| Weight of one unit of the cargo (in tons)&lt;br /&gt;
|-&lt;br /&gt;
| penalty_lowerbound&lt;br /&gt;
| 0..255&lt;br /&gt;
| Delivery time until penalty is applied. The units depend on the vehicle used (see vehicle property &#039;cargo_age_period&#039;), by default 1 unit = 2.5 days.&lt;br /&gt;
|-&lt;br /&gt;
| single_penalty_length&lt;br /&gt;
| 0..255&lt;br /&gt;
| Length of the interval where a single penalty is applied&lt;br /&gt;
|-&lt;br /&gt;
| price_factor&lt;br /&gt;
| float&lt;br /&gt;
| Payment for delivering 10 units of cargo across a distance of 20 squares (in British Pounds), when delivering in less than &#039;penalty_lowerbound&#039; time (no time penalty).&lt;br /&gt;
|-&lt;br /&gt;
| station_list_colour&lt;br /&gt;
| 0..255&lt;br /&gt;
|&lt;br /&gt;
Colour for the station list window (index from the [[NML:Graphic files|default (DOS) palette]])&lt;br /&gt;
|-&lt;br /&gt;
| cargo_payment_list_colour&lt;br /&gt;
| 0..255&lt;br /&gt;
|&lt;br /&gt;
Colour for the cargo payment list window (index from the [[NML:Graphic files|default (DOS) palette]])&lt;br /&gt;
|-&lt;br /&gt;
| is_freight&lt;br /&gt;
| 0 or 1&lt;br /&gt;
| Freight status (for the freighttrains switch); 0=not freight, 1=is freight&lt;br /&gt;
|-&lt;br /&gt;
| cargo_classes&lt;br /&gt;
|&lt;br /&gt;
bitmask([[#Cargo classes|cargo classes]])&lt;br /&gt;
| Cargo classes&lt;br /&gt;
|-&lt;br /&gt;
| cargo_label&lt;br /&gt;
| 4 letters&lt;br /&gt;
| [[CargoTypes|Cargo label]], as used in the [[NML:Cargotable|cargo table]]&lt;br /&gt;
|-&lt;br /&gt;
| town_growth_effect&lt;br /&gt;
| TOWNGROWTH_XXX&lt;br /&gt;
|&lt;br /&gt;
Effect for town growth, see [[#Cargo effects on town growth|Cargo effects on town growth]]&lt;br /&gt;
|-&lt;br /&gt;
| town_growth_multiplier&lt;br /&gt;
| float 0..255&lt;br /&gt;
| {{ottd|no}} Multiplier for town growth. To be used in conjuction with town_growth_effect, when that is not TOWNGROWTH_NONE. For example, a value of 4 makes your cargo have the same effect on town growth as 4 units of food/goods/etc.&lt;br /&gt;
|-&lt;br /&gt;
| callback_flags&lt;br /&gt;
| bitmask(flags)&lt;br /&gt;
|&lt;br /&gt;
Do not set this, unless you use [[NML:Old style callbacks|old-style callbacks]].&lt;br /&gt;
|-&lt;br /&gt;
| capacity_multiplier&lt;br /&gt;
| float 0 .. 255&lt;br /&gt;
| {{ottd|1.2|r22860}} This defines the capacity of vehicles carrying this cargo type, if the vehicle sets no specific capacity to this specific cargo type. Set this property to the amount of cargo a vehicle shall carry, which can carry 1 ton of coal or 1000 thousand litres of water (whatever comparison is more suitable for your cargotype). Depending on whether your cargo type is light or heavy you should set this property either comparing the weight or the volume. Default values are 4 for passengers, 2 for mail, goods and sweets and 1 for all other cargos.&lt;br /&gt;
|-&lt;br /&gt;
| town_production_effect&lt;br /&gt;
| TOWNPRODUCTION_XXX&lt;br /&gt;
| Effect for town production, see [[#Town production effect|Town production effect]]&lt;br /&gt;
|-&lt;br /&gt;
| town_production_multiplier&lt;br /&gt;
| float 0..255&lt;br /&gt;
| {{ottd|no}} Multiplier for town production, to be used in conjunction with town_production_effect, when that is not TOWNPRODUCTION_NONE. For example, a value of 4 makes a town produce 4 times as much cargo as normal.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Cargo payment is computed from &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;price_factor&amp;lt;/code&amp;gt;, amount of cargo transported, distance, and a time delivery factor. Unit of the delivery time is 185 ticks, roughly 2.5 days. The factor is constant (with value 255) if delivery time is less than &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;penalty_lowerbound&amp;lt;/code&amp;gt;. It goes down with rate 1 between &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;penalty_lowerbound + single_penalty_length&amp;lt;/code&amp;gt;, and goes down with rate 2 if the delivery time is even longer. Time delivery factor is never less than 31.&lt;br /&gt;
&lt;br /&gt;
===Cargo classes===&lt;br /&gt;
&lt;br /&gt;
Available cargo classes are listed in the following table. Cargos may be in more than one class. Cargo classes are always used as a bitmask, use the built-in function &amp;lt;code&amp;gt;bitmask()&amp;lt;/code&amp;gt;. For example, &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(CC_EXPRESS, CC_REFRIGERATED)&amp;lt;/code&amp;gt; is used for food.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! type of cargo&lt;br /&gt;
|-&lt;br /&gt;
| CC_PASSENGERS&lt;br /&gt;
| passengers, also tourists (ECS)&lt;br /&gt;
|-&lt;br /&gt;
| CC_MAIL&lt;br /&gt;
| mail&lt;br /&gt;
|-&lt;br /&gt;
| CC_EXPRESS&lt;br /&gt;
| express goods, also tourists (ECS)&lt;br /&gt;
|-&lt;br /&gt;
| CC_ARMOURED&lt;br /&gt;
| valuables, diamonds, gold and alike&lt;br /&gt;
|-&lt;br /&gt;
| CC_BULK&lt;br /&gt;
| coal, ore, grain,...&lt;br /&gt;
|-&lt;br /&gt;
| CC_PIECE_GOODS&lt;br /&gt;
| containers, crates, livestock&lt;br /&gt;
|-&lt;br /&gt;
| CC_LIQUID&lt;br /&gt;
| oil, milk, water, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_REFRIGERATED&lt;br /&gt;
| food, milk, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_HAZARDOUS&lt;br /&gt;
| chemicals?, uranium, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_COVERED&lt;br /&gt;
| grain, cement, fruit, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_OVERSIZED&lt;br /&gt;
| vehicles, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_POWDERIZED&lt;br /&gt;
| cement, ...&lt;br /&gt;
|-&lt;br /&gt;
| CC_NON_POURABLE&amp;lt;br&amp;gt;CC_NEO_BULK&lt;br /&gt;
| sugar cane, wool or straw bales, ... (these are synonyms for cargos that are bulk, but can&#039;t be handled in e.g. hoppers)&lt;br /&gt;
|-&lt;br /&gt;
| CC_SPECIAL&lt;br /&gt;
| Special cargo, used for refit tricks. (e.g. regearing in NARS)&lt;br /&gt;
|-&lt;br /&gt;
| NO_CARGO_CLASS&lt;br /&gt;
| Special value that you can used to instead of 0.&lt;br /&gt;
|-&lt;br /&gt;
| ALL_NORMAL_CARGO_CLASSES&lt;br /&gt;
| Bitmask of all cargo classes except CC_SPECIAL. This is the same as &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(CC_PASSENGERS, CC_MAIL, ..., CC_OVERSIZED)&amp;lt;/code&amp;gt;. Note: This is already a bitmask, don&#039;t use the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(..)&amp;lt;/code&amp;gt; function with this.&lt;br /&gt;
|-&lt;br /&gt;
| ALL_CARGO_CLASSES&lt;br /&gt;
| Bitmask of all cargo classes. Same as &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;ALL_NORMAL_CARGO_CLASSES | bitmask(CC_SPECIAL)&amp;lt;/code&amp;gt; Note: This is already a bitmask, don&#039;t use the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bitmask(..)&amp;lt;/code&amp;gt; function with this.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Cargo effects on town growth===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! value&lt;br /&gt;
! effect&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_PASSENGERS&lt;br /&gt;
| Affect towns as passengers do&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_MAIL&lt;br /&gt;
| Affect towns as mail does&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_GOODS&lt;br /&gt;
| Affect towns as goods/candy does&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_WATER&lt;br /&gt;
| Affect towns as water does (second required cargo for towngrowth in the desert)&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_FOOD&lt;br /&gt;
| Affect towns as food/fizzy drinks do (first required cargo for towngrowth in desert/above snowline)&lt;br /&gt;
|-&lt;br /&gt;
| TOWNGROWTH_NONE&lt;br /&gt;
| Don&#039;t affect town growth (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If no cargos in the game are defined as TOWNGROWTH_FOOD, towns above the snowline will not require food to grow. If no cargos in the game are defined as TOWNGROWTH_FOOD or TOWNGROWTH_WATER, towns in desert will not require food or water to grow. This can be used positively for gameplay purposes, and is otherwise worth being aware of as an unintended side effect when designing cargos.&lt;br /&gt;
&lt;br /&gt;
There are some additional effects of these flags on subsidies and town cargo transport statistics.  See the nfo docs for details: https://newgrf-specs.tt-wiki.net/wiki/Action0/Cargos#Substitute_type_and_multiplier_for_town_growth_.2818.2C_19.29&lt;br /&gt;
&lt;br /&gt;
===Town production effect===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! value&lt;br /&gt;
! effect&lt;br /&gt;
|-&lt;br /&gt;
| TOWNPRODUCTION_PASSENGERS&lt;br /&gt;
| Town produces cargo as like passengers&lt;br /&gt;
|-&lt;br /&gt;
| TOWNPRODUCTION_MAIL&lt;br /&gt;
| Town produces cargo as like mail&lt;br /&gt;
|-&lt;br /&gt;
| TOWNPRODUCTION_NONE&lt;br /&gt;
| Town does not produce cargo (default)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Cargo variables==&lt;br /&gt;
&lt;br /&gt;
Cargos have no variables (yet).&lt;br /&gt;
&lt;br /&gt;
==Cargo callbacks==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! callback&lt;br /&gt;
! return value&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| default&lt;br /&gt;
| Sprite set (with 1 sprite)&lt;br /&gt;
| Graphics for the cargo icon (only if property &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;sprite&amp;lt;/code&amp;gt; is set to NEW_CARGO_SPRITE)&lt;br /&gt;
|-&lt;br /&gt;
| station_rating&lt;br /&gt;
| -16384 .. 16383&lt;br /&gt;
| See detailed explanation below&lt;br /&gt;
|-&lt;br /&gt;
| profit&lt;br /&gt;
| -12748 .. 12748&lt;br /&gt;
| Called whenever cargo is delivered.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 16):&amp;lt;/code&amp;gt; The manhattan distance the cargo was transported.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 16, 8):&amp;lt;/code&amp;gt; The amount of cargo delivered.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 24, 8):&amp;lt;/code&amp;gt; The time spent en-route (1 unit = 2.5 days).&lt;br /&gt;
The returned value is multiplied by the amount and the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;price_factor&amp;lt;/code&amp;gt; to determine the income the player receives. Returning negative values is possible, it makes players pay for the delivery.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Station rating callback===&lt;br /&gt;
&lt;br /&gt;
The station rating callback is quite complicated and deserves some detailed explanation. The default station rating calculation works as follows:&lt;br /&gt;
&lt;br /&gt;
Internally, station rating is byte with values 0 .. 255, representing respectively 0% and 100%. Every 2.5 days, the transportation &#039;performance&#039; is calculated using some factors outlined below. The station rating is then set to this performance value, with the caveat that the rating change cannot exceed 2 points. Therefore, rating changes are always slow, this callback cannot change this. The initial rating is 175 points (69%). The following factors are parts of the performance, their effects are summed.&lt;br /&gt;
&lt;br /&gt;
====Time since the cargo was last picked up====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Time units (days)&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;gt;21 (&amp;amp;gt;52.5 days)&lt;br /&gt;
| 0 (0%)&lt;br /&gt;
|-&lt;br /&gt;
| 13 .. 21 (32.5 days .. 52.5 days)&lt;br /&gt;
| 25 (10%)&lt;br /&gt;
|-&lt;br /&gt;
| 7 .. 12 (17.5 days .. 32.5 days)&lt;br /&gt;
| 50 (20%)&lt;br /&gt;
|-&lt;br /&gt;
| 4 .. 6 (10 days .. 17.5 days)&lt;br /&gt;
| 95 (37%)&lt;br /&gt;
|-&lt;br /&gt;
| 0..3 (0 days..10 days)&lt;br /&gt;
| 130 (51%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The time unit used equals 185 engine ticks, or 2.5 TTD days. For ships, the time units are divided by 4 before calculating this component, so ships have four times more time before the ratings start dropping.&lt;br /&gt;
&lt;br /&gt;
====Amount of cargo waiting====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Amount of cargo&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;gt;1500&lt;br /&gt;
| -90 (-35%)&lt;br /&gt;
|-&lt;br /&gt;
| 1001..1500&lt;br /&gt;
| -35 (-14%)&lt;br /&gt;
|-&lt;br /&gt;
| 601..1000&lt;br /&gt;
| 0 (0%)&lt;br /&gt;
|-&lt;br /&gt;
| 301..600&lt;br /&gt;
| 10 (4%)&lt;br /&gt;
|-&lt;br /&gt;
| 101..300&lt;br /&gt;
| 30 (12%)&lt;br /&gt;
|-&lt;br /&gt;
| 0..100&lt;br /&gt;
| 40 (16%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Max. speed of the last vehicle picking up the cargo====&lt;br /&gt;
&lt;br /&gt;
This calculation is somewhat complicated. The maximum speed of the vehicle is expressed in &amp;quot;speed units&amp;quot;. For trains and road vehicles, the speed unit is 1 km/h; for ships, it&#039;s 0.5 km/h; for aircraft, it&#039;s 8 mph. If the max. speed is above 255 speed units, 255 is used instead. If the vehicle is slower than 85 units, no points are awarded; otherwise, you get (speed_units-85)/4 points. Therefore, the maximum you can get is 42 points, or 16%.&lt;br /&gt;
&lt;br /&gt;
====Age of the last carrier picking up the cargo====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Age of vehicle (years)&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 10 (4%)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 20 (8%)&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 33 (13%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In TTDPatch this changes when the &#039;newagerating&#039; switch is enabled&lt;br /&gt;
&lt;br /&gt;
====Bonus for AI companies (TTDPatch only)====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! AI intelligence setting&lt;br /&gt;
! Score (%, rounded)&lt;br /&gt;
|-&lt;br /&gt;
| Low&lt;br /&gt;
| 0 (0%)&lt;br /&gt;
|-&lt;br /&gt;
| Medium&lt;br /&gt;
| 31 (12%)&lt;br /&gt;
|-&lt;br /&gt;
| High&lt;br /&gt;
| 63 (25%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Bonus for statue in nearest town====&lt;br /&gt;
&lt;br /&gt;
If your company has erected a statue in the nearest town, you get 26 points (10%) bonus to all cargo ratings.&lt;br /&gt;
&lt;br /&gt;
====Callback parameters====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;:&lt;br /&gt;
{| |-&lt;br /&gt;
!value!!meaning&lt;br /&gt;
|-&lt;br /&gt;
|0x10||the last vehicle entering the station was a train&lt;br /&gt;
|-&lt;br /&gt;
|0x11||the last vehicle entering the station was a road vehicle&lt;br /&gt;
|-&lt;br /&gt;
|0x12||the last vehicle entering the station was a ship&lt;br /&gt;
|-&lt;br /&gt;
|0x13||the last vehicle entering the station was an aircraft&lt;br /&gt;
|-&lt;br /&gt;
|0||no vehicle entered the station yet, or (TTDPatch) the last one entering was sold&lt;br /&gt;
|}&lt;br /&gt;
Please note that there&#039;s only one &amp;quot;last vehicle type&amp;quot; field per station, so the vehicle this refers to may not have picked up any of your cargo.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 8)&amp;lt;/code&amp;gt;: The time since the cargo was last picked up, in the time units described above (1 unit = 2.5 days independent of vehicle type)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 8, 16)&amp;lt;/code&amp;gt;: The amount of cargo waiting.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 24, 8)&amp;lt;/code&amp;gt;: The speed of the last vehicle picking the cargo up, in the speed units described above (if no vehicle entered the station yet, the value is 0xFF).&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Effect of callback====&lt;br /&gt;
&lt;br /&gt;
The return value of the callback replaces the first three components (time since pickup, amount of cargo, max speed) of the calculation. The bonus for statues, TTDPatch AIs and new vehicles is always in effect, you cannot (yet) change this.&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Railtypes&amp;diff=4676</id>
		<title>Action0/Railtypes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Railtypes&amp;diff=4676"/>
		<updated>2023-12-09T15:21:02Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* Compatible rail type list (0E) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;Action 0 properties for rail types&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Action 0 - Properties for rail types =&lt;br /&gt;
&lt;br /&gt;
Defining properties of rail types.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.0|no|ottdrev=r18969}} 16 railtypes can be defined.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=bf8d7df7}} 64 railtypes can be defined.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Number&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Version&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|08&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|4*B&lt;br /&gt;
|Rail type label&lt;br /&gt;
|-&lt;br /&gt;
|09&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Build rail toolbar caption&amp;lt;ref&amp;gt;{{grfTill|7}} For GRF version 7 or earlier, setting property 09 sets property 1B as well.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|0A&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Rail construction dropdown text&lt;br /&gt;
|-&lt;br /&gt;
|0B&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Build vehicle window caption&lt;br /&gt;
|-&lt;br /&gt;
|0C&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Autoreplace text&lt;br /&gt;
|-&lt;br /&gt;
|0D&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: New engine text&lt;br /&gt;
|-&lt;br /&gt;
|0E&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Compatible rail type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot;&amp;gt;Rail type labels in this list are &#039;&#039;not&#039;&#039; resolved using the alternate label list.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|0F&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Powered rail type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B&lt;br /&gt;
|Rail type flags&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B&lt;br /&gt;
|Curve speed advantage multiplier&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B&lt;br /&gt;
|Station (and depot) graphics&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W &amp;lt;ref&amp;gt;In r18969 to 19306 this property was byte-sized.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|Construction costs&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|Speed limit&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B&lt;br /&gt;
|Acceleration model&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|{{ottdp|1.0|no|ottdrev=r19307}}&lt;br /&gt;
|B&lt;br /&gt;
|Minimap colour&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|{{ottdp|1.1|no|ottdrev=r21842}}&lt;br /&gt;
|D&lt;br /&gt;
|Introduction date&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|{{ottdp|1.1|no|ottdrev=r21842}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Introduction required rail type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|{{ottdp|1.1|no|ottdrev=r21841}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Introduced rail type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1A&lt;br /&gt;
|{{ottdp|1.1|no|ottdrev=r21866}}&lt;br /&gt;
|B&lt;br /&gt;
|Sort order&lt;br /&gt;
|-&lt;br /&gt;
|1B&lt;br /&gt;
|{{ottdp|1.2|no|ottdrev=r23129}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Rail type name&amp;lt;ref&amp;gt;{{grfTill|7}} For GRF version 7 or earlier, set property 1B &#039;&#039;after&#039;&#039; setting property 09, as property 09 sets the rail type name as well for backwards compatibility.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1C&lt;br /&gt;
|{{ottdp|1.2|no|ottdrev=r23415}}&lt;br /&gt;
|W&lt;br /&gt;
|Infrastructure maintenance cost factor&lt;br /&gt;
|-&lt;br /&gt;
|1D&lt;br /&gt;
|{{ottdp|1.2|no|ottdrev=r23758}}&lt;br /&gt;
|B n*D&lt;br /&gt;
|Alternate rail type labels that shall be &amp;quot;redirected&amp;quot; to this rail type&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In NFO, rail type IDs will be GRF local, with an ID to label mapping. Therefore to modify an existing rail type, specify its label in property 08. To create a new rail type, again just specify its label in property 08. This way there is no need for complex GRM mechanisms to allocate IDs. If a label &#039;clashes&#039; with another GRF, then one GRF will end up modifying the properties instead of creating a new rail type.&lt;br /&gt;
&lt;br /&gt;
When a new rail type is created, it is populated with the information from the first rail type, except that the compatible and powered list contain only the rail type being created. However, no default values should be assumed, as the first rail type may have been modified.&lt;br /&gt;
&lt;br /&gt;
== Vehicle and Railtype availability ==&lt;br /&gt;
&lt;br /&gt;
Vehicle and railtype availability and compatibility is influenced by multiple properties.&lt;br /&gt;
Generally, the vehicle defines which railtype it is, and the railtypes define the compatibility between each other.&lt;br /&gt;
* A vehicle exists, if its railtype (train prop 05) is defined. Otherwise the vehicle is disabled.&lt;br /&gt;
* When a vehicle is introduced, it always introduces its railtype (train prop 05).&lt;br /&gt;
* A railtype is introduced, if at least one of the following conditions is met:&lt;br /&gt;
** A vehicle is introduced, that references the railtype (train prop 05).&lt;br /&gt;
** Another railtype is introduced, that references the railtype via the introduced railtype list (railtype prop 19).&lt;br /&gt;
** The introduction date (railtype prop 17) is passed and all required railtypes (railtype prop 18) are available.&lt;br /&gt;
&lt;br /&gt;
Via railtype property 1D multiple railtypes can be defined, which shall be considered equivalent to a railtype.&lt;br /&gt;
This affects the interpretation of train property 05. If train property 05 references an undefined railtype, then&lt;br /&gt;
railtype property 1D is checked for all defined railtypes, whether the vehicle can be reassigned to some other railtype.&lt;br /&gt;
Otherwise the vehicle is disabled.&lt;br /&gt;
&lt;br /&gt;
== Rail type label (08) ==&lt;br /&gt;
&lt;br /&gt;
These are globally unique four-letter identifiers for specific rail types (analoguous to [[Action0Cargos#Cargo label 17|cargo labels]]), used to make various rail types accessible from train vehicle grfs. Reserved labels for default rail types are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Label&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Rail Type&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|RAIL &lt;br /&gt;
| Normal Rail&lt;br /&gt;
|-&lt;br /&gt;
|ELRL &lt;br /&gt;
| Electrified Rail&lt;br /&gt;
|-&lt;br /&gt;
|MONO &lt;br /&gt;
| Mono Rail&lt;br /&gt;
|-&lt;br /&gt;
|MGLV &lt;br /&gt;
| Maglev Rail&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.0|no|ottdrev=r18969}} 16 railtypes can be defined.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=bf8d7df7}} 64 railtypes can be defined.&lt;br /&gt;
&lt;br /&gt;
Rail type sets may use up to 64 railtypes and have to specify their own [[RailtypeLabels|labels]].&lt;br /&gt;
&lt;br /&gt;
See also [[Action0/Global Settings#Rail type translation table 12|Rail Type Translation Table]] for further info.&lt;br /&gt;
&lt;br /&gt;
== Build rail toolbar caption (09) ==&lt;br /&gt;
&lt;br /&gt;
String ID of the name of the rail type as shown in the toolbar caption.&lt;br /&gt;
&lt;br /&gt;
{{grfTill|7}} {{ottd|1.2|ottdrev=r23129}} For backwards compatibility, setting this property sets the rail type name (property 1B) to this string as well for GRF versions 7 or below.&lt;br /&gt;
&lt;br /&gt;
OpenTTD before r20342 and 1.0.3 require the string to start with the white control code. Later versions of OpenTTD will automatically default to white.&lt;br /&gt;
&lt;br /&gt;
== Rail construction dropdown text (0A) ==&lt;br /&gt;
&lt;br /&gt;
String ID for text in the dropdown of all rail types.&lt;br /&gt;
&lt;br /&gt;
This string must never start with a colour control code.&lt;br /&gt;
&lt;br /&gt;
== Build vehicle window caption (0B) ==&lt;br /&gt;
&lt;br /&gt;
String ID for build vehicle window caption.&lt;br /&gt;
&lt;br /&gt;
OpenTTD before r20342 and 1.0.3 require the string to start with the white control code. Later versions of OpenTTD will automatically default to white.&lt;br /&gt;
&lt;br /&gt;
== Autoreplace text (0C) ==&lt;br /&gt;
&lt;br /&gt;
String ID for rail type shown in autoreplace window.&lt;br /&gt;
&lt;br /&gt;
== New engines (0D) ==&lt;br /&gt;
&lt;br /&gt;
StringID to use for showing texts of the type &amp;quot;We have invented a new &amp;amp;lt;rail type&amp;amp;gt; engine&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Compatible rail type list (0E) ==&lt;br /&gt;
&lt;br /&gt;
List of rail types on which trains of this rail type can run, even though they might not be powered. E.g. wagons/engines of &amp;quot;eletrified rail&amp;quot;-type are also compatible to &amp;quot;normal rail&amp;quot; and &amp;quot;third rail&amp;quot; type, but they are not powered (there need to be an other powered engine in the consist to move the train).&lt;br /&gt;
&lt;br /&gt;
The format is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;0E &amp;amp;lt;nvar&amp;amp;gt; (&amp;amp;lt;rail type label&amp;amp;gt;){n}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That is you give the number of compatible rail types in a single byte followed by a list of that length of rail type labels. A rail type is automatically compatible (and powered) with itself, so you don&#039;t need to list the current rail type.&lt;br /&gt;
&lt;br /&gt;
Note that these properties apply to trains of this rail type, not the track. If you want trains of other rail types to be able to run on your rail types, you must set the compatible rail types property for each rail type. Setting these properties behaves always incremental, so you only need to the set additional bits for each &lt;br /&gt;
other rail type, you cannot remove compatibility/poweredness once it is set (by some other grf).&lt;br /&gt;
&lt;br /&gt;
Note that when routing trains, the compatibility is only evaluated for the lead engine of a consist.  This means that trains will run on incompatible rail types if they are in a consist where the lead engine is compatible with the rail type. This applies to both engines and wagons.&lt;br /&gt;
&lt;br /&gt;
== Powered rail type list (0F) ==&lt;br /&gt;
&lt;br /&gt;
List of rail types on which trains of this rail type are powered. E.g. engines of &amp;quot;normal rail&amp;quot;-type are powered on &amp;quot;electrified rail&amp;quot;- and &amp;quot;third-rail&amp;quot;-type as well.&lt;br /&gt;
&lt;br /&gt;
Same format as for property 0E above.&lt;br /&gt;
&lt;br /&gt;
== Rail type flags (10) ==&lt;br /&gt;
&lt;br /&gt;
Flags to define properties related to the rail type:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Bit&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Version&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
||{{ottdp|1.0}}&lt;br /&gt;
|Draw catenary for this rail type&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
||{{ottdp|1.1|no|ottdrev=r20049}}&lt;br /&gt;
|Disallow level crossings for this rail type&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4&lt;br /&gt;
||{{ottdp|1.9|no|ottdrev=e3b440c9c5}}&lt;br /&gt;
|Hide this rail type from construction menu&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|8&lt;br /&gt;
||{{ottdp|1.10|no|ottdrev=g42046af933}}&lt;br /&gt;
|Enable use of precombined overlay sprites&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|16&lt;br /&gt;
||{{ottdp|1.10|no|ottdrev=gcc5f175615}}&lt;br /&gt;
|Always allow 90 degree turns&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|32&lt;br /&gt;
||{{ottdp|1.10|no|ottdrev=gcc5f175615}}&lt;br /&gt;
|Always prohibit 90 degree turns (takes precedence over bit 4)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Curve Speed advantage multiplier (11) ==&lt;br /&gt;
&lt;br /&gt;
This property sets the multiplier to the curve speed advantage which all trains running on this track type get. The base curve speed advantage is given by the multiplication of the value of this property with the base speed advantage - which depends on the curve length in wagons:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Curve Length&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Base Speed Adv.&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0 (90° turn) &lt;br /&gt;
|30&lt;br /&gt;
|-&lt;br /&gt;
|1 (2x45° turn) &lt;br /&gt;
|44&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| 55&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
| 66&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| 75&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
| 84&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
| 91&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
| 98&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
| 103&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
| 108&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
| 111&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
| 114&lt;br /&gt;
|-&lt;br /&gt;
|12+&lt;br /&gt;
| 115&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Curve length&amp;quot; is the average number of wagons of the train between turns. However, very sharp turns (values 0 and 1) are not averaged out in longer trains.&lt;br /&gt;
&lt;br /&gt;
The maximum speed for a train in a curve is defined by &amp;quot;base speed advantage&amp;quot; * (2 + &amp;quot;property 11&amp;quot;). Tilting trains get an additional bonus of 20% to this value.&lt;br /&gt;
&lt;br /&gt;
For the default rail types this property is 0 for normal rail and electrified rail, 1 for monorail, and 2 for maglev.&lt;br /&gt;
&lt;br /&gt;
== Station (and depot) graphics (12) ==&lt;br /&gt;
&lt;br /&gt;
This property defines the default graphics for the stations. If no depot sprites are defined, this also defines at the same time the depot sprites to be used. There are three kind of default stations (and depots), usually associated with rail, monorail and maglev tracks. Valid values are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|Normal Rail&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Monorail&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Maglev&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Speed limit (14) ==&lt;br /&gt;
&lt;br /&gt;
Speed limit in mph*1.6 (approx. km/h). Set to &amp;quot;0&amp;quot; for no limit at all.&lt;br /&gt;
&lt;br /&gt;
== Acceleration model (15) ==&lt;br /&gt;
&lt;br /&gt;
This property defines the acceleration model used. Valid values range from 0 to 2:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|Normal Rail&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Monorail&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Maglev&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is currently no difference between normal rail and monorail.&lt;br /&gt;
&lt;br /&gt;
== Map colour (16) ==&lt;br /&gt;
&lt;br /&gt;
This property defines the colour this track type is drawn in the minimap view. The byte value specifies the colour entry in the [[PalettesAndCoordinates|DOS palette]].&lt;br /&gt;
&lt;br /&gt;
== Introduction date (17) ==&lt;br /&gt;
&lt;br /&gt;
This property defines the long date formatted introduction date of this rail type. With this property set the rail type will be introduced at (or after) this date when all of the introduction required rail types are available to the company of the player, or whenever a vehicle using this rail type gets introduced whichever is first.&lt;br /&gt;
&lt;br /&gt;
== Introduction required rail type list (18) ==&lt;br /&gt;
&lt;br /&gt;
List of rail types on that need to be available to the company of the player for this rail type to be introduced at (or after) the introduction date. This limit does not apply when the rail type is introduced by the introduction of a vehicle.&lt;br /&gt;
&lt;br /&gt;
Same format as for property 0E above.&lt;br /&gt;
&lt;br /&gt;
This can, for example, be used to introduce a third rail with catenary track type when both third rail and catenary rail types are available.&lt;br /&gt;
&lt;br /&gt;
== Introduced rail type list (19) ==&lt;br /&gt;
&lt;br /&gt;
List of rail types that get introduced when this rail type is introduced. For example, to make sure that when a fast rail type is introduced the slow variant exists.&lt;br /&gt;
&lt;br /&gt;
Same format as for property 0E above.&lt;br /&gt;
&lt;br /&gt;
== Sort order (1A) ==&lt;br /&gt;
&lt;br /&gt;
Property for influencing the sort order of the drop down lists with rail types. Default values are as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|07&lt;br /&gt;
|Normal Rail&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|Electrified Rail&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|Monorail&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
|Maglev&lt;br /&gt;
|-&lt;br /&gt;
|n7&lt;br /&gt;
|Railtype #n&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus the rail type that (internally) gets index 8 will get a default value of 87. These defaults are to keep the ordering when this property is not supported as they were.&lt;br /&gt;
&lt;br /&gt;
== Rail type name (1B) ==&lt;br /&gt;
&lt;br /&gt;
String ID of the name of the rail type.&lt;br /&gt;
&lt;br /&gt;
{{grfTill|7}} For GRF versions 7 or earlier, set property 1B &#039;&#039;after&#039;&#039; setting property 09, as property 09 sets the rail type name as well for backwards compatibility.&lt;br /&gt;
&lt;br /&gt;
== Alternate rail type labels (1D) ==&lt;br /&gt;
&lt;br /&gt;
A list of alternate labels that get &amp;quot;redirected&amp;quot; to this rail type when used e.g. as track type of train or when testing if a label is defined. The redirection only happens if the alternate label isn&#039;t defined as a real rail type. Same format as for property 0E above.&lt;br /&gt;
&lt;br /&gt;
Alternate labels are not considered when evaluating properties 0E, 0F, 18, and 19.&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
&lt;br /&gt;
To be written&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Railtypes&amp;diff=4675</id>
		<title>NML:Railtypes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Railtypes&amp;diff=4675"/>
		<updated>2023-12-09T15:20:23Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
Railtypes can only be defined in OpenTTD {{ottd|1.0|r18969}} or later. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Railtype IDs==&lt;br /&gt;
Railtype IDs are limited to 64 in total. NewGRF-local IDs may freely be chosen, but must be in the 0..63 range. If other railtype GRFs are loaded, it may be that there are not enough railtype slots available. To prevent your entire NewGRF from being deactivated with the &#039;Attempt to use invalid ID&#039;-error, you can use the following code:&lt;br /&gt;
&lt;br /&gt;
 if (railtype_available(&amp;quot;LABL&amp;quot;) || loading_stage == LOADING_STAGE_RESERVE)&lt;br /&gt;
     ... item definition ...&lt;br /&gt;
 } else if (loading_stage == LOADING_STAGE_ACTIVATE) {&lt;br /&gt;
     ... warning / error ...&lt;br /&gt;
 }&lt;br /&gt;
The warning / error is optional, but can be used to inform the user about the missing railtypes.&lt;br /&gt;
&lt;br /&gt;
== Vehicle and Railtype availability ==&lt;br /&gt;
&lt;br /&gt;
Vehicle and railtype availability and compatibility is influenced by multiple properties.&lt;br /&gt;
Generally, the vehicle defines which railtype it is, and the railtypes define the compatibility between each other.&lt;br /&gt;
* A vehicle exists, if its railtype (train property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;track_type&amp;lt;/code&amp;gt;) is defined. Otherwise the vehicle is disabled.&lt;br /&gt;
* When a vehicle is introduced, it always introduces its railtype (train property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;track_type&amp;lt;/code&amp;gt;).&lt;br /&gt;
* A railtype is introduced, if at least one of the following conditions is met:&lt;br /&gt;
** A vehicle is introduced, that references the railtype (train property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;track_type&amp;lt;/code&amp;gt;).&lt;br /&gt;
** Another railtype is introduced, that references the railtype via the introduced railtype list (railtype propery &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;introduces_railtype_list&amp;lt;/code&amp;gt;).&lt;br /&gt;
** The introduction date (railtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;introduction_date&amp;lt;/code&amp;gt;) is passed and all required railtypes (railtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;requires_railtype_list &amp;lt;/code&amp;gt;) are available.&lt;br /&gt;
&lt;br /&gt;
Via railtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;compatible_railtype_list&amp;lt;/code&amp;gt; multiple railtypes can be defined, which shall be considered equivalent to a railtype.&lt;br /&gt;
This affects the interpretation of train property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;track_type&amp;lt;/code&amp;gt;. If train property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;track_type&amp;lt;/code&amp;gt; references an undefined railtype, then&lt;br /&gt;
railtype property &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;compatible_railtype_list&amp;lt;/code&amp;gt; is checked for all defined railtypes, whether the vehicle can be reassigned to some other railtype.&lt;br /&gt;
Otherwise the vehicle is disabled.  However note also that &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;alternative_railtype_list&amp;lt;/code&amp;gt; provides an alternative/complementary approach to handling undefined railtypes.&lt;br /&gt;
&lt;br /&gt;
Note that when routing trains onto railtypes, the compatibility is only evaluated for the lead engine of a consist. This means that trains will run on incompatible rail types if they are in a consist where the lead engine is compatible with the rail type. This applies to both engines and wagons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Railtype properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! property&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| label&lt;br /&gt;
| 4-byte string&lt;br /&gt;
| names of default rail types: &amp;quot;RAIL&amp;quot;, &amp;quot;ELRL&amp;quot;, &amp;quot;MONO&amp;quot;, &amp;quot;MGLV&amp;quot;. See the [[RailtypeLabels|List of railtype labels]] in the NewGRF Specs for currently defined custom labels.&lt;br /&gt;
|-&lt;br /&gt;
| introduction_date&lt;br /&gt;
| date(yyyy,mm,dd)&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r21842}} Valid range for yyyy is 0 ... 5000000.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| string&lt;br /&gt;
| Name of this railtype&lt;br /&gt;
|-&lt;br /&gt;
| toolbar_caption&lt;br /&gt;
| string&lt;br /&gt;
| {{ottdp|1.2|no|ottdrev=23129}} Caption of the build rail toolbar. In earlier versions this is the same as the &#039;name&#039;&lt;br /&gt;
|-&lt;br /&gt;
| menu_text&lt;br /&gt;
| string&lt;br /&gt;
| Shown in the dropdown menu for all railtypes&lt;br /&gt;
|-&lt;br /&gt;
| build_window_caption&lt;br /&gt;
| string&lt;br /&gt;
| Caption of the build vehicle window&lt;br /&gt;
|-&lt;br /&gt;
| autoreplace_text&lt;br /&gt;
| string&lt;br /&gt;
| String for the autoreplace window&lt;br /&gt;
|-&lt;br /&gt;
| new_engine_text&lt;br /&gt;
| string&lt;br /&gt;
| String for the &amp;quot;We have invented a new &amp;amp;lt;rail type&amp;amp;gt; engine&amp;quot; news message&lt;br /&gt;
|-&lt;br /&gt;
| compatible_railtype_list&lt;br /&gt;
| list of railtype labels&lt;br /&gt;
| Provide a list of rail types that trains of this type can also run on. e.g. [&amp;quot;RAIL&amp;quot;, &amp;quot;ELRL&amp;quot;, &amp;quot;MONO&amp;quot;]. Note that when routing trains, the compatibility is only evaluated for the lead engine of a consist. This means that trains will run on incompatible rail types if they are in a consist where the lead engine is compatible with the rail type. This applies to both engines and wagons.&lt;br /&gt;
|-&lt;br /&gt;
| powered_railtype_list&lt;br /&gt;
| list of railtype labels&lt;br /&gt;
| Provide a list of rail types that trains of this type are powered on.&lt;br /&gt;
|-&lt;br /&gt;
| railtype_flags&lt;br /&gt;
| bitmask(RAILTYPE_FLAG_XXX, ...)&lt;br /&gt;
|&lt;br /&gt;
; CATENARY&lt;br /&gt;
: Enable catenary&lt;br /&gt;
; NO_LEVEL_CROSSING&lt;br /&gt;
: Disable level crossings&lt;br /&gt;
; HIDDEN {{ottd|1.9}}&lt;br /&gt;
: Hides railtype from player&lt;br /&gt;
; PRECOMBINED {{ottd|1.10}}&lt;br /&gt;
: Enable use of precombined overlay sprites&lt;br /&gt;
; ALLOW_90DEG {{ottd|1.10}}&lt;br /&gt;
: Always allow 90 degree turns&lt;br /&gt;
; DISALLOW_90DEG {{ottd|1.10}}&lt;br /&gt;
: Always prohibit 90 degree turns (takes precedence over ALLOW_90DEG)&lt;br /&gt;
|-&lt;br /&gt;
| curve_speed_multiplier&lt;br /&gt;
| 0...255&lt;br /&gt;
| max curve speed is defined as multiple of the base curve speed (see below)&lt;br /&gt;
|-&lt;br /&gt;
| station_graphics&lt;br /&gt;
| RAILTYPE_STATION_NORMAL, RAILTYPE_STATION_MONORAIL, RAILTYPE_STATION_MAGLEV&lt;br /&gt;
| Type of station graphics to use for the default stations&lt;br /&gt;
|-&lt;br /&gt;
| construction_cost&lt;br /&gt;
| 0 ... 65525&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r19307}} per piece of track as multiplier to PR_BUILD_RAIL base cost. Default cost factors are 8, 12, 16 and 24 for RAIL, ELRL, MONO and MGLV.&lt;br /&gt;
|-&lt;br /&gt;
| speed_limit&lt;br /&gt;
| 0 ... 65525 km/h (speed units)&lt;br /&gt;
| A speed limit of 0 means unlimited speed&lt;br /&gt;
|-&lt;br /&gt;
| acceleration_model&lt;br /&gt;
| ACC_MODEL_RAIL, ACC_MODEL_MONORAIL, ACC_MODEL_MAGLEV&lt;br /&gt;
| ACC_MODEL_RAIL and ACC_MODEL_MONORAIL behave the same currently&lt;br /&gt;
|-&lt;br /&gt;
| map_colour&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r19307}} entry in the colour palette.&lt;br /&gt;
|-&lt;br /&gt;
| requires_railtype_list&lt;br /&gt;
| list of railtype labels&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r21842}} List of rail types on that need to be available to the company of the player for this rail type to be introduced at (or after) the introduction date. This limit does not apply when the rail type is introduced by the introduction of a vehicle.&lt;br /&gt;
|-&lt;br /&gt;
| introduces_railtype_list&lt;br /&gt;
| list of railtype labels&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r21841}} List of rail types that get introduced when this rail type is introduced. For example, to make sure that when a fast rail type is introduced the slow variant exists.&lt;br /&gt;
|-&lt;br /&gt;
| sort_order&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.1|r21866}} number which defines the sort order among rail types. If this entry is not defined, it gets assigned sort order n*10+7 for the n-th railtype.&lt;br /&gt;
|-&lt;br /&gt;
| maintenance_cost&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.2|r23415}} Maintenance cost factor for each piece of tracks of this railtype. Default cost factors are 8, 12, 16 and 24 for RAIL, ELRL, MONO and MGLV.&lt;br /&gt;
|-&lt;br /&gt;
| alternative_railtype_list&lt;br /&gt;
| list of railtype labels&lt;br /&gt;
|&lt;br /&gt;
{{ottd|1.2|r23758}} List of rail types which this rail type will act as fallback for, if the corresponding rail type is not defined separately&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Sort order===&lt;br /&gt;
&lt;br /&gt;
The sort_order influences the sort order of the drop down lists with rail types. Default values are as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! Value&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 07&lt;br /&gt;
| normal rail&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| electrified rail&lt;br /&gt;
|-&lt;br /&gt;
| 27&lt;br /&gt;
| monorail&lt;br /&gt;
|-&lt;br /&gt;
| 37&lt;br /&gt;
| maglev&lt;br /&gt;
|-&lt;br /&gt;
| n7&lt;br /&gt;
| railtype #n&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus the rail type that (internally) gets index 8 will get a default value of 87. These defaults are to keep the ordering when this property is not supported as they were.&lt;br /&gt;
&lt;br /&gt;
===Base speeds for curves===&lt;br /&gt;
&lt;br /&gt;
The base speeds relevant for the curve_speed_multiplier are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! curve length&lt;br /&gt;
! base speed [km/h]&lt;br /&gt;
|-&lt;br /&gt;
| 0 (90 degree turn)&lt;br /&gt;
| 30&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 44&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 55&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 66&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 75&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 84&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| 91&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 98&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 103&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| 108&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| 111&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| 114&lt;br /&gt;
|-&lt;br /&gt;
| 12+&lt;br /&gt;
| 115&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Railtype variables==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| terrain_type&lt;br /&gt;
| TILETYPE_NORMAL, TILETYPE_DESERT, TILETYPE_RAIN_FOREST, TILETYPE_SNOW&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| enhanced_tunnels&lt;br /&gt;
| 0&lt;br /&gt;
| Reserved for future use, always returns 0 in OpenTTD. Should custom tunnel entrances be implemented, other values than 0 might be returned&lt;br /&gt;
|-&lt;br /&gt;
| level_crossing_status&lt;br /&gt;
| LEVEL_CROSSING_CLOSED, LEVEL_CROSSING_OPEN&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| build_date&lt;br /&gt;
| 0 .. 5000000&lt;br /&gt;
| for depots only: build date of the depot in days since 0&lt;br /&gt;
|-&lt;br /&gt;
| town_zone&lt;br /&gt;
| [[NML:List of town zones|town zone]]&lt;br /&gt;
| Town zone of the tile. (Only available for level crossings and depots.)&lt;br /&gt;
|-&lt;br /&gt;
| random_bits&lt;br /&gt;
|&lt;br /&gt;
| 2 pseudo-random bits, based on tile location&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Railtype callbacks==&lt;br /&gt;
&lt;br /&gt;
For rail types a number of callbacks are used to define rail type graphics. Each should refer to a sprite set containing the relevant sprites. Refer to the [[#Example sprites|example sprites]] or the example railtype grf in the NML repository, for an example on what sprites are needed in what order.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! callbacks&lt;br /&gt;
! number of sprites&lt;br /&gt;
! meaning&lt;br /&gt;
|-&lt;br /&gt;
| gui&lt;br /&gt;
| 16&lt;br /&gt;
| 4 rail directions, autorail, depot, tunnel and convert rail sprites for rail menu.&lt;br /&gt;
|-&lt;br /&gt;
| track_overlay&amp;lt;ref name=leftout&amp;gt;Either all or none of these sprites should be provided.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 10&lt;br /&gt;
| 6 flat and 4 slope sprites. Track without landscape. Used in junctions, and also with path signals, if the &amp;quot;Show reserved tracks&amp;quot; option is enabled in the game settings.&lt;br /&gt;
|-&lt;br /&gt;
| underlay&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 16&lt;br /&gt;
| 6 flat and 4 slope, one crossing WITH track, 5 junction pieces without track. Tracks with ballast but without landscape.&lt;br /&gt;
|-&lt;br /&gt;
| tunnels&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 4&lt;br /&gt;
| 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. Sprite order: SW, NW, NE, SE.&lt;br /&gt;
|-&lt;br /&gt;
| catenary_wire&lt;br /&gt;
| 28&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| catenary_pylons&lt;br /&gt;
| 8&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| bridge_surfaces&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| level_crossings&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 10&lt;br /&gt;
| For each direction: one track sprite and 4 sprites for road lights etc&lt;br /&gt;
|-&lt;br /&gt;
| depots&amp;lt;ref name=depotr22854&amp;gt;{{ottd|1.2|r22854}} In OpenTTD prior to r22854, depot sprites would not be used if the above &#039;all or none&#039; sprites were not supplied.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 6&lt;br /&gt;
| 2 sprites for each south-ish, 1 sprite for each north-ish depot. Like original depots.&lt;br /&gt;
|-&lt;br /&gt;
| fences&lt;br /&gt;
| 8 / 16&lt;br /&gt;
| x, y, vertical, horizontal, SW, SE, NE and NW slopes like original fences at sprite 1301. {{ottdp|1.6|no|ottdrev=r27343}} Since OpenTTD r27343 there is also a 16 sprites version, see below.&lt;br /&gt;
|-&lt;br /&gt;
| tunnel_overlay&amp;lt;ref name=tunnel_overlay&amp;gt;Above &#039;all or none&#039; sprites must be supplied, if these sprites are to be used.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 4&lt;br /&gt;
| If this callback is defined, tunnels for this railtype will be drawn differently. First, a grass underlay base sprite is drawn, then the &#039;tunnels&#039;-sprite. Next, train sprites if applicable and then a grass overlay and finally the sprite from this type (tunnel_overlay). The grass sprites are defined in the base set and do not contain any parts of the tracks or portal, so these have to be fully provided by the railtype sprites.&lt;br /&gt;
* &amp;lt;code style:darkgreen&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;: 0 for normal tunnels, without any extra features (like tracks above). All other values are reserved for future extensions.&lt;br /&gt;
|-&lt;br /&gt;
| signals&lt;br /&gt;
| 8&lt;br /&gt;
| {{ottd|1.3|r24367}} 1 sprite for each direction, order is SW(-facing), NE, NW, SE, E, W, S, N. For more information, see [[#signals|below]]&lt;br /&gt;
|-&lt;br /&gt;
| precombined&amp;lt;ref name=leftout /&amp;gt;&lt;br /&gt;
| 63&lt;br /&gt;
| {{ottd|1.10}} 1 sprite for each combination of track on a tile. The index is determined by treating each track piece as a bit in the order X Y N S W E, subtracting 1, see [[#Precombined overlay sprites|below]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
If a callback is not implemented or fails, graphics from the fallback railtype (picked via the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;station_graphics&amp;lt;/code&amp;gt; property) will be used instead.&amp;lt;br /&amp;gt;&lt;br /&gt;
Note that there is no &amp;quot;default graphics&amp;quot;-callback.&lt;br /&gt;
&lt;br /&gt;
===Example sprites===&lt;br /&gt;
==== gui ====&lt;br /&gt;
&lt;br /&gt;
[[File:railtype_gui.png]]&lt;br /&gt;
&lt;br /&gt;
==== track_overlay ====&lt;br /&gt;
&lt;br /&gt;
[[File:railtype_overlay.png]]&lt;br /&gt;
&lt;br /&gt;
==== underlay ====&lt;br /&gt;
&lt;br /&gt;
[[File:railtype_underlay.png]]&lt;br /&gt;
&lt;br /&gt;
==== level_crossings ====&lt;br /&gt;
&lt;br /&gt;
You can define a special track piece which crosses the road and for each of two directions and each of the corners of the tile a separate sprite for a light, sign, or whatever should go there.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Sprite number for X&lt;br /&gt;
!Sprite number for Y&lt;br /&gt;
!Useage&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;1&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Rail overlay&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;3&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;North light&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;5&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;East light&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;7&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;West light&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;9&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;South light&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[File:railtype_levelcrossing.png]]&lt;br /&gt;
&lt;br /&gt;
==== depots ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
!Sprite Number&lt;br /&gt;
!Usage&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;NE wall for SE-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for SE-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;NW wall for SW-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for SW-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for NE-entry depot.&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
| &amp;amp;nbsp; &amp;amp;nbsp;Depot building for NW-entry depot.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fences ====&lt;br /&gt;
&lt;br /&gt;
[[File:railtype_fences.png]]&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.6|no|ottdrev=r27343}} Since OpenTTD r27343 there is also a 16 sprites version, this allows to use different sprites resp. offsets for the fences on either track side.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
! Sprite number !! Tile slope !! Track bit !! Fence position !! Version&lt;br /&gt;
|-&lt;br /&gt;
| 0 || flat || X || NW || {{ottdp|1.0|no|ottdrev=r19056}}&lt;br /&gt;
|-&lt;br /&gt;
| 1 || flat || Y || NE || {{ottdp|1.0|no|ottdrev=r19056}}&lt;br /&gt;
|-&lt;br /&gt;
| 2 || flat || left || E || {{ottdp|1.0|no|ottdrev=r19056}}&lt;br /&gt;
|-&lt;br /&gt;
| 3 || flat || upper || S || {{ottdp|1.0|no|ottdrev=r19056}}&lt;br /&gt;
|-&lt;br /&gt;
| 4 || SW || X || NW || {{ottdp|1.0|no|ottdrev=r19056}}&lt;br /&gt;
|-&lt;br /&gt;
| 5 || SE || Y || NE || {{ottdp|1.0|no|ottdrev=r19056}}&lt;br /&gt;
|-&lt;br /&gt;
| 6 || NE || X || NW || {{ottdp|1.0|no|ottdrev=r19056}}&lt;br /&gt;
|-&lt;br /&gt;
| 7 || NW || Y || NE || {{ottdp|1.0|no|ottdrev=r19056}}&lt;br /&gt;
|-&lt;br /&gt;
| 8 || flat || X || SE || {{ottdp|1.6|no|ottdrev=r27343}}&lt;br /&gt;
|-&lt;br /&gt;
| 9 || flat || Y || SW || {{ottdp|1.6|no|ottdrev=r27343}}&lt;br /&gt;
|-&lt;br /&gt;
| 10 || flat || left || W || {{ottdp|1.6|no|ottdrev=r27343}}&lt;br /&gt;
|-&lt;br /&gt;
| 11 || flat || upper || N || {{ottdp|1.6|no|ottdrev=r27343}}&lt;br /&gt;
|-&lt;br /&gt;
| 12 || SW || X || SE || {{ottdp|1.6|no|ottdrev=r27343}}&lt;br /&gt;
|-&lt;br /&gt;
| 13 || SE || Y || SW || {{ottdp|1.6|no|ottdrev=r27343}}&lt;br /&gt;
|-&lt;br /&gt;
| 14 || NE || X || SE || {{ottdp|1.6|no|ottdrev=r27343}}&lt;br /&gt;
|-&lt;br /&gt;
| 15 || NW || Y || SW || {{ottdp|1.6|no|ottdrev=r27343}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== tunnel_overlay ====&lt;br /&gt;
&lt;br /&gt;
If this callback is defined, tunnels for this railtype will be drawn differently.&lt;br /&gt;
&lt;br /&gt;
First, a grass underlay base sprite is drawn, then the &#039;tunnels&#039;-sprite. Next, train sprites if applicable and then a grass overlay and finally the sprite from this callback. The grass sprites are defined in the base set and do not contain any parts of the tracks or portal, so these have to be fully provided by the railtype sprites.&lt;br /&gt;
&lt;br /&gt;
Illustration: [[File:RailtypeTunnelExample.png]]&lt;br /&gt;
&lt;br /&gt;
==== signals ====&lt;br /&gt;
&lt;br /&gt;
This callback can be used to supply custom signal graphics.&lt;br /&gt;
&lt;br /&gt;
The resulting sprite set must consist of 8 sprites, corresponding to the following signal directions: SW-facing, NE-facing, NW-facing, SE-facing, E-facing, W-facing, S-facing, N-facing. If resolving fails or results in an empty sprite group, the matching base set sprite will be used instead.&lt;br /&gt;
&lt;br /&gt;
Variable &amp;lt;code style:darkgreen&amp;gt;extra_callback_info2&amp;lt;/code&amp;gt; contains the state, variant and type of the signal. Use the builtin function &amp;lt;code style:darkgreen&amp;gt;getbits()&amp;lt;/code&amp;gt; in the following fashion to access the information:&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
Signal state: &amp;lt;code style:darkgreen&amp;gt;getbits(extra_callback_info2, 0, 8)&amp;lt;/code&amp;gt;:&lt;br /&gt;
{| |-&lt;br /&gt;
! Result !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 00 || Red signal&lt;br /&gt;
|-&lt;br /&gt;
| 01 || Green signal&lt;br /&gt;
|-&lt;br /&gt;
| all other values || Reserved&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
Signal variant: &amp;lt;code style:darkgreen&amp;gt;getbits(extra_callback_info2, 8, 8)&amp;lt;/code&amp;gt;:&lt;br /&gt;
{| |-&lt;br /&gt;
! Result !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 00 || Light (electric) signal&lt;br /&gt;
|-&lt;br /&gt;
| 01 || Semaphore&lt;br /&gt;
|-&lt;br /&gt;
| all other values || Reserved&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
Signal type: &amp;lt;code style:darkgreen&amp;gt;getbits(extra_callback_info2, 16, 8)&amp;lt;/code&amp;gt;:&lt;br /&gt;
{| |-&lt;br /&gt;
! Result !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 00 || Normal block signal&lt;br /&gt;
|-&lt;br /&gt;
| 01 || Entry pre-signal&lt;br /&gt;
|-&lt;br /&gt;
| 02 || Exit pre-signal&lt;br /&gt;
|-&lt;br /&gt;
| 03 || Combo pre-signal&lt;br /&gt;
|-&lt;br /&gt;
| 04 || Two-way path signal&lt;br /&gt;
|-&lt;br /&gt;
| 05 || One-way path signal&lt;br /&gt;
|-&lt;br /&gt;
| all other values || Reserved&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
Variable &amp;lt;code style:darkgreen&amp;gt;extra_callback_info1&amp;lt;/code&amp;gt; contains the drawing context.&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;code style:darkgreen&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;:&lt;br /&gt;
{| |-&lt;br /&gt;
! Result !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Signal is drawn in a viewport, i.e. on the map.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Signal is drawn in the signal GUI. The returned sprite set must still have 8 sprites, but OpenTTD will only use the 7th sprite, so all other sprites can be empty.&lt;br /&gt;
|-&lt;br /&gt;
| all other values || Reserved&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Precombined overlay sprites====&lt;br /&gt;
&lt;br /&gt;
[[File:Rails_combined.png]]&lt;br /&gt;
&lt;br /&gt;
===Example code===&lt;br /&gt;
&lt;br /&gt;
A typical implementation for railtypes can look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
 item(FEAT_RAILTYPES, elrail, 0x01) {&lt;br /&gt;
     property {&lt;br /&gt;
         label:                      &amp;quot;SHIN&amp;quot;;&lt;br /&gt;
         name:                       string(STR_EL_RAIL);&lt;br /&gt;
         menu_text:                  string(STR_EL_RAIL);&lt;br /&gt;
         build_window_caption:       string(STR_BUILD_CAPTION);&lt;br /&gt;
         autoreplace_text:           string(STR_AUTOREPLACE);&lt;br /&gt;
         new_engine_text:            string(STR_NEW_ENGINE);&lt;br /&gt;
         compatile_railtype_list:    [&amp;quot;SHIN&amp;quot;,&amp;quot;RAIL&amp;quot;,&amp;quot;ELRL&amp;quot;];                   // Tracks of rail and electrified rail are compatible&lt;br /&gt;
         powered_railtype_list:      [&amp;quot;ELRL&amp;quot;,&amp;quot;SHIN&amp;quot;];                          // But we only have power when we have electricity&lt;br /&gt;
         railtype_flags:             bitmask(RAILTYPE_FLAG_NO_LEVEL_CROSSING); // High speed tracks should not have level crossings&lt;br /&gt;
         curve_speed_multiplier:     1;&lt;br /&gt;
         station_graphics:           RAILTYPE_STATION_MAGLEV;                  // We want the most modern stations&lt;br /&gt;
         construction_cost:          32;                                       // should be pretty steep&lt;br /&gt;
         speed_limit:                500 km/h;&lt;br /&gt;
         acceleration_model:         ACC_MODEL_RAIL;                           // This is still rail, though&lt;br /&gt;
     }&lt;br /&gt;
     graphics {&lt;br /&gt;
         track_overlay:   ground_switch_overlay;     // defines the sprites drawn as overlay for junctions and highlight&lt;br /&gt;
         underlay:        ground_switch_underlay;    // defines the usual tracks and the underlay for junctions&lt;br /&gt;
         level_crossings: level_crossing_switch;     // defines level crossings including traffic lights and blocking bars&lt;br /&gt;
         tunnels:         tunnel_switch;             // defines the tracks drawn on a tunnel tile&lt;br /&gt;
         depots:          depot_switch_electric;     // defines the depot sprites&lt;br /&gt;
         bridge_surfaces: bridge_terrain_switch;     // defines the overlay drawn over bridges&lt;br /&gt;
         fences:          fences_set;                // defines the look of fences&lt;br /&gt;
         // we don&#039;t define catenary wire and pylons, thus we use the default which comes with the base graphics.&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The switches and graphics blocks are defined in the usual way as described in sections [[NML:Switch|switches]], [[NML:Random switch|random switches]] and [[NML:Graphics|graphics block]] sections.&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Railtypes&amp;diff=4674</id>
		<title>Action0/Railtypes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Railtypes&amp;diff=4674"/>
		<updated>2023-12-09T14:55:48Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* Compatible rail type list (0E) */ - note that compatibility is only evaluated for the lead engine.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;Action 0 properties for rail types&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Action 0 - Properties for rail types =&lt;br /&gt;
&lt;br /&gt;
Defining properties of rail types.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.0|no|ottdrev=r18969}} 16 railtypes can be defined.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=bf8d7df7}} 64 railtypes can be defined.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Number&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Version&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Size&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|08&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|4*B&lt;br /&gt;
|Rail type label&lt;br /&gt;
|-&lt;br /&gt;
|09&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Build rail toolbar caption&amp;lt;ref&amp;gt;{{grfTill|7}} For GRF version 7 or earlier, setting property 09 sets property 1B as well.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|0A&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Rail construction dropdown text&lt;br /&gt;
|-&lt;br /&gt;
|0B&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Build vehicle window caption&lt;br /&gt;
|-&lt;br /&gt;
|0C&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Autoreplace text&lt;br /&gt;
|-&lt;br /&gt;
|0D&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: New engine text&lt;br /&gt;
|-&lt;br /&gt;
|0E&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Compatible rail type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot;&amp;gt;Rail type labels in this list are &#039;&#039;not&#039;&#039; resolved using the alternate label list.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|0F&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Powered rail type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B&lt;br /&gt;
|Rail type flags&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B&lt;br /&gt;
|Curve speed advantage multiplier&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B&lt;br /&gt;
|Station (and depot) graphics&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W &amp;lt;ref&amp;gt;In r18969 to 19306 this property was byte-sized.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|Construction costs&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|W&lt;br /&gt;
|Speed limit&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|{{ottdp|1.0}}&lt;br /&gt;
|B&lt;br /&gt;
|Acceleration model&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|{{ottdp|1.0|no|ottdrev=r19307}}&lt;br /&gt;
|B&lt;br /&gt;
|Minimap colour&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|{{ottdp|1.1|no|ottdrev=r21842}}&lt;br /&gt;
|D&lt;br /&gt;
|Introduction date&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|{{ottdp|1.1|no|ottdrev=r21842}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Introduction required rail type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|{{ottdp|1.1|no|ottdrev=r21841}}&lt;br /&gt;
|B n*D &lt;br /&gt;
|Introduced rail type list&amp;lt;ref name=&amp;quot;alt_label&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1A&lt;br /&gt;
|{{ottdp|1.1|no|ottdrev=r21866}}&lt;br /&gt;
|B&lt;br /&gt;
|Sort order&lt;br /&gt;
|-&lt;br /&gt;
|1B&lt;br /&gt;
|{{ottdp|1.2|no|ottdrev=r23129}}&lt;br /&gt;
|W&lt;br /&gt;
|StringID: Rail type name&amp;lt;ref&amp;gt;{{grfTill|7}} For GRF version 7 or earlier, set property 1B &#039;&#039;after&#039;&#039; setting property 09, as property 09 sets the rail type name as well for backwards compatibility.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1C&lt;br /&gt;
|{{ottdp|1.2|no|ottdrev=r23415}}&lt;br /&gt;
|W&lt;br /&gt;
|Infrastructure maintenance cost factor&lt;br /&gt;
|-&lt;br /&gt;
|1D&lt;br /&gt;
|{{ottdp|1.2|no|ottdrev=r23758}}&lt;br /&gt;
|B n*D&lt;br /&gt;
|Alternate rail type labels that shall be &amp;quot;redirected&amp;quot; to this rail type&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In NFO, rail type IDs will be GRF local, with an ID to label mapping. Therefore to modify an existing rail type, specify its label in property 08. To create a new rail type, again just specify its label in property 08. This way there is no need for complex GRM mechanisms to allocate IDs. If a label &#039;clashes&#039; with another GRF, then one GRF will end up modifying the properties instead of creating a new rail type.&lt;br /&gt;
&lt;br /&gt;
When a new rail type is created, it is populated with the information from the first rail type, except that the compatible and powered list contain only the rail type being created. However, no default values should be assumed, as the first rail type may have been modified.&lt;br /&gt;
&lt;br /&gt;
== Vehicle and Railtype availability ==&lt;br /&gt;
&lt;br /&gt;
Vehicle and railtype availability and compatibility is influenced by multiple properties.&lt;br /&gt;
Generally, the vehicle defines which railtype it is, and the railtypes define the compatibility between each other.&lt;br /&gt;
* A vehicle exists, if its railtype (train prop 05) is defined. Otherwise the vehicle is disabled.&lt;br /&gt;
* When a vehicle is introduced, it always introduces its railtype (train prop 05).&lt;br /&gt;
* A railtype is introduced, if at least one of the following conditions is met:&lt;br /&gt;
** A vehicle is introduced, that references the railtype (train prop 05).&lt;br /&gt;
** Another railtype is introduced, that references the railtype via the introduced railtype list (railtype prop 19).&lt;br /&gt;
** The introduction date (railtype prop 17) is passed and all required railtypes (railtype prop 18) are available.&lt;br /&gt;
&lt;br /&gt;
Via railtype property 1D multiple railtypes can be defined, which shall be considered equivalent to a railtype.&lt;br /&gt;
This affects the interpretation of train property 05. If train property 05 references an undefined railtype, then&lt;br /&gt;
railtype property 1D is checked for all defined railtypes, whether the vehicle can be reassigned to some other railtype.&lt;br /&gt;
Otherwise the vehicle is disabled.&lt;br /&gt;
&lt;br /&gt;
== Rail type label (08) ==&lt;br /&gt;
&lt;br /&gt;
These are globally unique four-letter identifiers for specific rail types (analoguous to [[Action0Cargos#Cargo label 17|cargo labels]]), used to make various rail types accessible from train vehicle grfs. Reserved labels for default rail types are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Label&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Rail Type&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|RAIL &lt;br /&gt;
| Normal Rail&lt;br /&gt;
|-&lt;br /&gt;
|ELRL &lt;br /&gt;
| Electrified Rail&lt;br /&gt;
|-&lt;br /&gt;
|MONO &lt;br /&gt;
| Mono Rail&lt;br /&gt;
|-&lt;br /&gt;
|MGLV &lt;br /&gt;
| Maglev Rail&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.0|no|ottdrev=r18969}} 16 railtypes can be defined.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.9|no|ottdrev=bf8d7df7}} 64 railtypes can be defined.&lt;br /&gt;
&lt;br /&gt;
Rail type sets may use up to 64 railtypes and have to specify their own [[RailtypeLabels|labels]].&lt;br /&gt;
&lt;br /&gt;
See also [[Action0/Global Settings#Rail type translation table 12|Rail Type Translation Table]] for further info.&lt;br /&gt;
&lt;br /&gt;
== Build rail toolbar caption (09) ==&lt;br /&gt;
&lt;br /&gt;
String ID of the name of the rail type as shown in the toolbar caption.&lt;br /&gt;
&lt;br /&gt;
{{grfTill|7}} {{ottd|1.2|ottdrev=r23129}} For backwards compatibility, setting this property sets the rail type name (property 1B) to this string as well for GRF versions 7 or below.&lt;br /&gt;
&lt;br /&gt;
OpenTTD before r20342 and 1.0.3 require the string to start with the white control code. Later versions of OpenTTD will automatically default to white.&lt;br /&gt;
&lt;br /&gt;
== Rail construction dropdown text (0A) ==&lt;br /&gt;
&lt;br /&gt;
String ID for text in the dropdown of all rail types.&lt;br /&gt;
&lt;br /&gt;
This string must never start with a colour control code.&lt;br /&gt;
&lt;br /&gt;
== Build vehicle window caption (0B) ==&lt;br /&gt;
&lt;br /&gt;
String ID for build vehicle window caption.&lt;br /&gt;
&lt;br /&gt;
OpenTTD before r20342 and 1.0.3 require the string to start with the white control code. Later versions of OpenTTD will automatically default to white.&lt;br /&gt;
&lt;br /&gt;
== Autoreplace text (0C) ==&lt;br /&gt;
&lt;br /&gt;
String ID for rail type shown in autoreplace window.&lt;br /&gt;
&lt;br /&gt;
== New engines (0D) ==&lt;br /&gt;
&lt;br /&gt;
StringID to use for showing texts of the type &amp;quot;We have invented a new &amp;amp;lt;rail type&amp;amp;gt; engine&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Compatible rail type list (0E) ==&lt;br /&gt;
&lt;br /&gt;
List of rail types on which trains of this rail type can run, even though they might not be powered. E.g. wagons/engines of &amp;quot;eletrified rail&amp;quot;-type are also compatible to &amp;quot;normal rail&amp;quot; and &amp;quot;third rail&amp;quot; type, but they are not powered (there need to be an other powered engine in the consist to move the train).&lt;br /&gt;
&lt;br /&gt;
The format is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;0E &amp;amp;lt;nvar&amp;amp;gt; (&amp;amp;lt;rail type label&amp;amp;gt;){n}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That is you give the number of compatible rail types in a single byte followed by a list of that length of rail type labels. A rail type is automatically compatible (and powered) with itself, so you don&#039;t need to list the current rail type.&lt;br /&gt;
&lt;br /&gt;
Note that these properties apply to trains of this rail type, not the track. If you want trains of other rail types to be able to run on your rail types, you must set the compatible rail types property for each rail type. Setting these properties behaves always incremental, so you only need to the set additional bits for each &lt;br /&gt;
other rail type, you cannot remove compatibility/poweredness once it is set (by some other grf).&lt;br /&gt;
&lt;br /&gt;
Note that the compatibility is only evaluated for the lead engine of a consist.  This means that trains will run on incompatible rail types if they are in a consist where the lead engine is compatible with the rail type. This applies to both engines and wagons.&lt;br /&gt;
&lt;br /&gt;
== Powered rail type list (0F) ==&lt;br /&gt;
&lt;br /&gt;
List of rail types on which trains of this rail type are powered. E.g. engines of &amp;quot;normal rail&amp;quot;-type are powered on &amp;quot;electrified rail&amp;quot;- and &amp;quot;third-rail&amp;quot;-type as well.&lt;br /&gt;
&lt;br /&gt;
Same format as for property 0E above.&lt;br /&gt;
&lt;br /&gt;
== Rail type flags (10) ==&lt;br /&gt;
&lt;br /&gt;
Flags to define properties related to the rail type:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Bit&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Version&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
||{{ottdp|1.0}}&lt;br /&gt;
|Draw catenary for this rail type&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
||{{ottdp|1.1|no|ottdrev=r20049}}&lt;br /&gt;
|Disallow level crossings for this rail type&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4&lt;br /&gt;
||{{ottdp|1.9|no|ottdrev=e3b440c9c5}}&lt;br /&gt;
|Hide this rail type from construction menu&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|8&lt;br /&gt;
||{{ottdp|1.10|no|ottdrev=g42046af933}}&lt;br /&gt;
|Enable use of precombined overlay sprites&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|16&lt;br /&gt;
||{{ottdp|1.10|no|ottdrev=gcc5f175615}}&lt;br /&gt;
|Always allow 90 degree turns&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|32&lt;br /&gt;
||{{ottdp|1.10|no|ottdrev=gcc5f175615}}&lt;br /&gt;
|Always prohibit 90 degree turns (takes precedence over bit 4)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Curve Speed advantage multiplier (11) ==&lt;br /&gt;
&lt;br /&gt;
This property sets the multiplier to the curve speed advantage which all trains running on this track type get. The base curve speed advantage is given by the multiplication of the value of this property with the base speed advantage - which depends on the curve length in wagons:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Curve Length&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Base Speed Adv.&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0 (90° turn) &lt;br /&gt;
|30&lt;br /&gt;
|-&lt;br /&gt;
|1 (2x45° turn) &lt;br /&gt;
|44&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| 55&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
| 66&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| 75&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
| 84&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
| 91&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
| 98&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
| 103&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
| 108&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
| 111&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
| 114&lt;br /&gt;
|-&lt;br /&gt;
|12+&lt;br /&gt;
| 115&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Curve length&amp;quot; is the average number of wagons of the train between turns. However, very sharp turns (values 0 and 1) are not averaged out in longer trains.&lt;br /&gt;
&lt;br /&gt;
The maximum speed for a train in a curve is defined by &amp;quot;base speed advantage&amp;quot; * (2 + &amp;quot;property 11&amp;quot;). Tilting trains get an additional bonus of 20% to this value.&lt;br /&gt;
&lt;br /&gt;
For the default rail types this property is 0 for normal rail and electrified rail, 1 for monorail, and 2 for maglev.&lt;br /&gt;
&lt;br /&gt;
== Station (and depot) graphics (12) ==&lt;br /&gt;
&lt;br /&gt;
This property defines the default graphics for the stations. If no depot sprites are defined, this also defines at the same time the depot sprites to be used. There are three kind of default stations (and depots), usually associated with rail, monorail and maglev tracks. Valid values are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|Normal Rail&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Monorail&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Maglev&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Speed limit (14) ==&lt;br /&gt;
&lt;br /&gt;
Speed limit in mph*1.6 (approx. km/h). Set to &amp;quot;0&amp;quot; for no limit at all.&lt;br /&gt;
&lt;br /&gt;
== Acceleration model (15) ==&lt;br /&gt;
&lt;br /&gt;
This property defines the acceleration model used. Valid values range from 0 to 2:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|Normal Rail&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Monorail&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Maglev&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is currently no difference between normal rail and monorail.&lt;br /&gt;
&lt;br /&gt;
== Map colour (16) ==&lt;br /&gt;
&lt;br /&gt;
This property defines the colour this track type is drawn in the minimap view. The byte value specifies the colour entry in the [[PalettesAndCoordinates|DOS palette]].&lt;br /&gt;
&lt;br /&gt;
== Introduction date (17) ==&lt;br /&gt;
&lt;br /&gt;
This property defines the long date formatted introduction date of this rail type. With this property set the rail type will be introduced at (or after) this date when all of the introduction required rail types are available to the company of the player, or whenever a vehicle using this rail type gets introduced whichever is first.&lt;br /&gt;
&lt;br /&gt;
== Introduction required rail type list (18) ==&lt;br /&gt;
&lt;br /&gt;
List of rail types on that need to be available to the company of the player for this rail type to be introduced at (or after) the introduction date. This limit does not apply when the rail type is introduced by the introduction of a vehicle.&lt;br /&gt;
&lt;br /&gt;
Same format as for property 0E above.&lt;br /&gt;
&lt;br /&gt;
This can, for example, be used to introduce a third rail with catenary track type when both third rail and catenary rail types are available.&lt;br /&gt;
&lt;br /&gt;
== Introduced rail type list (19) ==&lt;br /&gt;
&lt;br /&gt;
List of rail types that get introduced when this rail type is introduced. For example, to make sure that when a fast rail type is introduced the slow variant exists.&lt;br /&gt;
&lt;br /&gt;
Same format as for property 0E above.&lt;br /&gt;
&lt;br /&gt;
== Sort order (1A) ==&lt;br /&gt;
&lt;br /&gt;
Property for influencing the sort order of the drop down lists with rail types. Default values are as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|07&lt;br /&gt;
|Normal Rail&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|Electrified Rail&lt;br /&gt;
|-&lt;br /&gt;
|27&lt;br /&gt;
|Monorail&lt;br /&gt;
|-&lt;br /&gt;
|37&lt;br /&gt;
|Maglev&lt;br /&gt;
|-&lt;br /&gt;
|n7&lt;br /&gt;
|Railtype #n&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Thus the rail type that (internally) gets index 8 will get a default value of 87. These defaults are to keep the ordering when this property is not supported as they were.&lt;br /&gt;
&lt;br /&gt;
== Rail type name (1B) ==&lt;br /&gt;
&lt;br /&gt;
String ID of the name of the rail type.&lt;br /&gt;
&lt;br /&gt;
{{grfTill|7}} For GRF versions 7 or earlier, set property 1B &#039;&#039;after&#039;&#039; setting property 09, as property 09 sets the rail type name as well for backwards compatibility.&lt;br /&gt;
&lt;br /&gt;
== Alternate rail type labels (1D) ==&lt;br /&gt;
&lt;br /&gt;
A list of alternate labels that get &amp;quot;redirected&amp;quot; to this rail type when used e.g. as track type of train or when testing if a label is defined. The redirection only happens if the alternate label isn&#039;t defined as a real rail type. Same format as for property 0E above.&lt;br /&gt;
&lt;br /&gt;
Alternate labels are not considered when evaluating properties 0E, 0F, 18, and 19.&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
&lt;br /&gt;
To be written&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Callbacks&amp;diff=4671</id>
		<title>Callbacks</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Callbacks&amp;diff=4671"/>
		<updated>2023-11-30T20:44:15Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* List of callbacks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
A callback is a special action 2 that the patch &amp;quot;calls&amp;quot; in order to modify various features, an example being the visual effect of train vehicles. &amp;amp;nbsp;See the [[ttwiki:CallbacksTut|callback tutorial]] on how to use them.&lt;br /&gt;
&lt;br /&gt;
In the final action 2 of a chain of VarAction2s, the second byte of the matching entry has to have bit 7 set to identify it as a callback result.&lt;br /&gt;
&lt;br /&gt;
For example, 04 00 is not a callback result (but it may be the ID of another chained action 2), whereas 04 80 is a callback result with a value of 4. In total a callback has 15 bit result values, where the upper 7 bits are stored in the second byte. For example, 54 C2 is a callback result with a value of 4254=16980, where again the second byte has bit 7 set, changing the 42 into C2.&lt;br /&gt;
&lt;br /&gt;
{{grfTill|7}} For GRF version 7 and below not all 15 bit values are available as return values, only values between 00 and 7EFF.&lt;br /&gt;
For compatibility with earlier patch versions, FF in the high byte is taken to mean the same thing as 80, so 04 FF also has a callback result of 4. Note that if your grf file needs to be compatible with versions before TTDPatch 2.0.1 alpha 40, you must set the high byte to FF, and so can use only 8 bit results.&lt;br /&gt;
&lt;br /&gt;
{{grfFrom|8}} For GRF version 8 and above this compatibility layer has been removed. Callbacks can return all 15 bit values between 00 and 7FFF.&lt;br /&gt;
&lt;br /&gt;
To check for a specific callback, use an [[VariationalAction2]] or [[VarAction2Advanced]] to check for variable 0C.&lt;br /&gt;
* Variable 0C contains the callback number.&lt;br /&gt;
* Variable 0C is a word, thus the VarAction2 must use type 85.&lt;br /&gt;
* Results can be specified directly using 8xxx values (see above), or with 8xxx value in subsequent (Basic/Variational/Random)Action2 which are referenced as usual with their set-id.&lt;br /&gt;
* The default case of the VarAction2 must point to the regular graphics chain, so that unknown/future callbacks results in a &amp;quot;callback failure&amp;quot; result.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;lt;Sprite-number&amp;gt; * &amp;lt;Length&amp;gt; 02 &amp;lt;feature&amp;gt; &amp;lt;set-id&amp;gt; 85 0C 00 \wxFFFF&lt;br /&gt;
                               &amp;lt;nvar&amp;gt; (&amp;lt;set-id/result&amp;gt; \wx &amp;lt;callback&amp;gt; \wx &amp;lt;callback&amp;gt;){n}&lt;br /&gt;
                                       &amp;lt;set-id of graphics chain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format for VarAction2 is explained in detail on the [[VariationalAction2]] page.&lt;br /&gt;
&lt;br /&gt;
== List of callbacks ==&lt;br /&gt;
&lt;br /&gt;
The following callbacks are defined by the patch. &amp;amp;nbsp;The number of the callback is what will be stored in variable 0C so that you can return the right results if you have several callbacks. &amp;amp;nbsp;All callbacks are explained in more detail below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PLEASE NOTE:&#039;&#039;&#039; Since TTDPatch 2.5 beta 5, the size of variable 0C has changed, and now there are word-sized callback numbers as well. To maintain backwards compatibility, only callbacks 10..3F can be checked using a byte-sized check. Callbacks 140 and above, on the other hand, must be checked using a word or dword sized check, to make sure they are identified uniquely.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!!Feature(s)!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|10||Vehicles||[[Callback: Visual effect and wagon power|Visual effect and wagon power]]&lt;br /&gt;
|-&lt;br /&gt;
|11||Vehicles||[[Callback: Wagon length|Wagon length]]&lt;br /&gt;
|-&lt;br /&gt;
|12||Vehicles||[[Callback: Load amount|Load amount]]&lt;br /&gt;
|-&lt;br /&gt;
|13||Stations||[[Callback: Station availability|Station availability]]&lt;br /&gt;
|-&lt;br /&gt;
|14||Stations||[[Callback: Station sprite layout|Select sprite layout]]&lt;br /&gt;
|-&lt;br /&gt;
|15||Vehicles||[[Callback: Refitted capacity callback|Refitted capacity callback]]&lt;br /&gt;
|-&lt;br /&gt;
|16||Trains||[[Callback: Articulated engine|Build articulated engines]]&lt;br /&gt;
|-&lt;br /&gt;
|17||Houses||[[Callback: House construction check|House construction check]]&lt;br /&gt;
|-&lt;br /&gt;
|18||Several &amp;lt;ref name=&amp;quot;generic&amp;quot;&amp;gt;Generic callbacks are called for the feature, not any specific vehicle ID. Read the [[Action3#n-id|Action 3]] entry on how to define these.&amp;lt;/ref&amp;gt;||[[Callback: AI construction/purchase selection|AI construction/purchase selection]]&lt;br /&gt;
|-&lt;br /&gt;
|19||Vehicles||[[Callback: Cargo Subtype Display|Cargo sub-type display]]&lt;br /&gt;
|-&lt;br /&gt;
|1A||Houses||Next animation frame&lt;br /&gt;
|-&lt;br /&gt;
|1B||Houses||Animation control&lt;br /&gt;
|-&lt;br /&gt;
|1C||Houses||Construction stage changes&lt;br /&gt;
|-&lt;br /&gt;
|1D||Trains||Can wagon be attached&lt;br /&gt;
|-&lt;br /&gt;
|1E||Houses||Decide colour of building&lt;br /&gt;
|-&lt;br /&gt;
|1F||Houses||Cargo acceptance&lt;br /&gt;
|-&lt;br /&gt;
|20||Houses||Length of animation frame&lt;br /&gt;
|-&lt;br /&gt;
|21||Houses||Trigger building destruction&lt;br /&gt;
|-&lt;br /&gt;
|22||Industries||Availability&lt;br /&gt;
|-&lt;br /&gt;
|23||Vehicles||Additional text in purchase screen&lt;br /&gt;
|-&lt;br /&gt;
|24||Stations||Custom station layout&lt;br /&gt;
|-&lt;br /&gt;
|25||Industry tiles||Animation control&lt;br /&gt;
|-&lt;br /&gt;
|26||Industry tiles||Next animation frame&lt;br /&gt;
|-&lt;br /&gt;
|27||Industry tiles||Length of animation frame&lt;br /&gt;
|-&lt;br /&gt;
|28||Industries||Industry location permissibility&lt;br /&gt;
|-&lt;br /&gt;
|29||Industries||Random production change&lt;br /&gt;
|-&lt;br /&gt;
|2A||Houses||Get accepted cargo types&lt;br /&gt;
|-&lt;br /&gt;
|2B||Industry tiles||Decide cargo acceptance&lt;br /&gt;
|-&lt;br /&gt;
|2C||Industry tiles||Get accepted cargo types&lt;br /&gt;
|-&lt;br /&gt;
|2D||Vehicles||Select colour mapping for vehicle&lt;br /&gt;
|-&lt;br /&gt;
|2E||Houses||Custom cargo production&lt;br /&gt;
|-&lt;br /&gt;
|2F||Industry tiles||Custom shape check&lt;br /&gt;
|-&lt;br /&gt;
|30||Industry tiles||Decide drawing default foundations&lt;br /&gt;
|-&lt;br /&gt;
|31||Vehicles||Start/stop check&lt;br /&gt;
|-&lt;br /&gt;
|32||Vehicles||32-day callback&lt;br /&gt;
|-&lt;br /&gt;
|33||Several||Sound effect callback&lt;br /&gt;
|-&lt;br /&gt;
|34||Vehicles &amp;lt;ref name=&amp;quot;generic&amp;quot;/&amp;gt;||Autoreplace vehicle selection&lt;br /&gt;
|-&lt;br /&gt;
|35||Industries||Monthly random production change&lt;br /&gt;
|-&lt;br /&gt;
|36||Vehicles||Change vehicle Properties&lt;br /&gt;
|-&lt;br /&gt;
|37||Industries||Cargo sub-type display&lt;br /&gt;
|-&lt;br /&gt;
|38||Industries||Show additional text in fund window&lt;br /&gt;
|-&lt;br /&gt;
|39||Cargoes||Custom profit calculation&lt;br /&gt;
|-&lt;br /&gt;
|3A||Industries||Show additional text in industry window&lt;br /&gt;
|-&lt;br /&gt;
|3B||Industries||Control special effects&lt;br /&gt;
|-&lt;br /&gt;
|3C||Industry tiles||Disable autosloping&lt;br /&gt;
|-&lt;br /&gt;
|3D||Industries||Opt out of accepting cargo&lt;br /&gt;
|-&lt;br /&gt;
|40..13F|| ||--Reserved--&lt;br /&gt;
|-&lt;br /&gt;
|140||Stations||Animation control&lt;br /&gt;
|-&lt;br /&gt;
|141||Stations||Next animation frame&lt;br /&gt;
|-&lt;br /&gt;
|142||Stations||Length of animation frame&lt;br /&gt;
|-&lt;br /&gt;
|143||Houses||Protect building conditionally&lt;br /&gt;
|-&lt;br /&gt;
|144||Sounds &amp;lt;ref name=&amp;quot;generic&amp;quot;/&amp;gt;||{{ottdp|1.2|2.6|ottdrev=r23144|ttdprev=r821}} Ambient sound effects&lt;br /&gt;
|-&lt;br /&gt;
|145||Cargoes||Custom station rating calculation&lt;br /&gt;
|-&lt;br /&gt;
|146||New Signals &amp;lt;ref name=&amp;quot;generic&amp;quot;/&amp;gt;||New signals sprite drawing&lt;br /&gt;
|-&lt;br /&gt;
|147||Canals||Add sprite offset&lt;br /&gt;
|-&lt;br /&gt;
|148||Houses||Watched cargo accepted&lt;br /&gt;
|-&lt;br /&gt;
|149||Stations||Land slope check&lt;br /&gt;
|-&lt;br /&gt;
|14A||Industries||Decide industry color&lt;br /&gt;
|-&lt;br /&gt;
|14B||Industries||Decide input cargo types&lt;br /&gt;
|-&lt;br /&gt;
|14C||Industries||Decide output cargo types&lt;br /&gt;
|-&lt;br /&gt;
|14D||Houses||Customized building name&lt;br /&gt;
|-&lt;br /&gt;
|14E||Houses||Decide drawing default foundations&lt;br /&gt;
|-&lt;br /&gt;
|14F||Houses||Disable autosloping&lt;br /&gt;
|-&lt;br /&gt;
|150||Airport tiles||{{ottdp|1.1|no|ottdrev=r19197}} Decide drawing default foundations&lt;br /&gt;
|-&lt;br /&gt;
|152||Airport tiles||{{ottdp|1.1|no|ottdrev=r19197}} Animation control&lt;br /&gt;
|-&lt;br /&gt;
|153||Airport tiles||{{ottdp|1.1|no|ottdrev=r19197}} Next Animation frame&lt;br /&gt;
|-&lt;br /&gt;
|154||Airport tiles||{{ottdp|1.1|no|ottdrev=r19197}} Length of animation frame&lt;br /&gt;
|-&lt;br /&gt;
|155||Airports||{{ottdp|1.1|no|ottdrev=r20373}} Extra information about airport layout in the build gui&lt;br /&gt;
|-&lt;br /&gt;
|156||Airports||{{ottdp|1.1|no|ottdrev=r20373}} Airport layout name&lt;br /&gt;
|-&lt;br /&gt;
|157||Objects||Land slope check&lt;br /&gt;
|-&lt;br /&gt;
|158||Objects||Next animation frame&lt;br /&gt;
|-&lt;br /&gt;
|159||Objects||Animation control&lt;br /&gt;
|-&lt;br /&gt;
|15A||Objects||Length of animation frame&lt;br /&gt;
|-&lt;br /&gt;
|15B||Objects||Decide colour of building&lt;br /&gt;
|-&lt;br /&gt;
|15C||Objects||Show additional text in building window&lt;br /&gt;
|-&lt;br /&gt;
|15D||Objects||Disable autosloping&lt;br /&gt;
|-&lt;br /&gt;
|15E||Vehicles||{{ottdp|1.2|no|ottdrev=r23124}} Refit cost factor&lt;br /&gt;
|-&lt;br /&gt;
|15F||Industries||{{ottdp|1.3|no|ottdrev=r24186}} Set initial production level on construction&lt;br /&gt;
|-&lt;br /&gt;
|160||Vehicles||{{ottdp|1.5|no|ottdrev=r26747}} Advanced effect creation&lt;br /&gt;
|-&lt;br /&gt;
|161||Vehicles||{{ottdp|14|no|ottdrev=g05ed9f56fd}} Engine name&lt;br /&gt;
|-&lt;br /&gt;
|162||Vehicles||{{ottdp|14|no|ottdrev=gddd609ce9b}} Probability of reversing rail vehicle on build&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:Callback: Visual effect and wagon power}}&lt;br /&gt;
{{:Callback: Wagon length}}&lt;br /&gt;
{{:Callback: Load amount}}&lt;br /&gt;
{{:Callback: Station availability}}&lt;br /&gt;
{{:Callback: Station sprite layout}}&lt;br /&gt;
{{:Callback: Refitted capacity callback}}&lt;br /&gt;
{{:Callback: Articulated engine}}&lt;br /&gt;
{{:Callback: House construction check}}&lt;br /&gt;
{{:Callback: AI construction/purchase selection}}&lt;br /&gt;
{{:Callback: Cargo Subtype Display}}&lt;br /&gt;
{{:Callback: Next animation frame}}&lt;br /&gt;
{{:Callback: Animation control}}&lt;br /&gt;
{{:Callback: Construction stage changes}}&lt;br /&gt;
{{:Callback: Can wagon be attached}}&lt;br /&gt;
{{:Callback: Building colour}}&lt;br /&gt;
{{:Callback: Cargo acceptance}}&lt;br /&gt;
{{:Callback: Length of animation frame}}&lt;br /&gt;
{{:Callback: Trigger building destruction}}&lt;br /&gt;
{{:Callback: Industry availability}}&lt;br /&gt;
{{:Callback: Additional text in purchase screen}}&lt;br /&gt;
{{:Callback: Custom station layout}}&lt;br /&gt;
{{:Callback: Industry location permissibility}}&lt;br /&gt;
{{:Callback: Random production change}}&lt;br /&gt;
{{:Callback: Get accepted cargo types}}&lt;br /&gt;
{{:Callback: Decide cargo acceptance}}&lt;br /&gt;
{{:Callback: Select colour mapping for vehicle}}&lt;br /&gt;
{{:Callback: Custom cargo production}}&lt;br /&gt;
{{:Callback: Custom shape check}}&lt;br /&gt;
{{:Callback: Decide drawing default foundations}}&lt;br /&gt;
{{:Callback: Vehicle Start/stop check}}&lt;br /&gt;
{{:Callback: 32-day callback}}&lt;br /&gt;
{{:Callback: Sound effect}}&lt;br /&gt;
{{:Callback: Autoreplace vehicle selection}}&lt;br /&gt;
{{:Callback: Monthly random production change}}&lt;br /&gt;
{{:Callback: Change vehicle properties}}&lt;br /&gt;
{{:Callback: Cargo sub-type display for industries}}&lt;br /&gt;
{{:Callback: Show additional text in fund/building window}}&lt;br /&gt;
{{:Callback: Custom profit calculation for cargoes}}&lt;br /&gt;
{{:Callback: Show additional text in industry window}}&lt;br /&gt;
{{:Callback: Control special industry effects}}&lt;br /&gt;
{{:Callback: Disable autosloping}}&lt;br /&gt;
{{:Callback: Opt out of accepting cargo}}&lt;br /&gt;
{{:Callback: Protect building conditionally}}&lt;br /&gt;
{{:Callback: Ambient sound effects}}&lt;br /&gt;
{{:Callback: Custom station rating calculation}}&lt;br /&gt;
{{:Callback: New signals sprite drawing callback}}&lt;br /&gt;
{{:Callback: Add sprite offset callback}}&lt;br /&gt;
{{:Callback: Watched cargo accepted}}&lt;br /&gt;
{{:Callback: Station slope check}}&lt;br /&gt;
{{:Callback: Decide industry colour}}&lt;br /&gt;
{{:Callback: Decide input and output cargo types}}&lt;br /&gt;
{{:Callback: Customized building name}}&lt;br /&gt;
{{:Callback: Extra information about layout in the build gui}}&lt;br /&gt;
{{:Callback: Layout name}}&lt;br /&gt;
{{:Callback: Object slope check}}&lt;br /&gt;
{{:Callback: Decide object colour}}&lt;br /&gt;
{{:Callback: Refit cost factor}}&lt;br /&gt;
{{:Callback: Set initial production level on construction}}&lt;br /&gt;
{{:Callback: Advanced effect creation}}&lt;br /&gt;
{{:Callback: Engine name}}&lt;br /&gt;
{{:Callback: Build probability}}&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Build_probability&amp;diff=4670</id>
		<title>Callback: Build probability</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Build_probability&amp;diff=4670"/>
		<updated>2023-11-30T20:43:34Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* Build probability (e.g. Reverse rail vehicle on build) (162) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Probability of reversing rail vehicle on build (162) ==&lt;br /&gt;
&lt;br /&gt;
This callback assigns rail vehicles a random chance of being built facing forward or backward (reversed) when purchased.&lt;br /&gt;
&lt;br /&gt;
Return a value between 0...100 (decimal) to indicate the probability of being reversed.&lt;br /&gt;
&lt;br /&gt;
The same random-reverse behaviour can be implemented without the callback, by randomly switching to reversed sprites in the vehicle&#039;s varaction 2 chain, but this is inefficient as it typically causes sprites to be duplicated in the grf.&lt;br /&gt;
&lt;br /&gt;
This callback is available from {{ottdp|14|no|ottdrev=g05ed9f56fd}} OpenTTD 14 and above.&lt;br /&gt;
[[Category:Callbacks]]&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Build_probability&amp;diff=4669</id>
		<title>Callback: Build probability</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Build_probability&amp;diff=4669"/>
		<updated>2023-11-30T20:41:25Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* Build probability (e.g. Reverse rail vehicle on build) (162) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Build probability (e.g. Reverse rail vehicle on build) (162) ==&lt;br /&gt;
&lt;br /&gt;
This callback assigns rail vehicles a random chance of being built facing forward or backward (reversed) when purchased.&lt;br /&gt;
&lt;br /&gt;
Return a value between 0...100 (decimal) to indicate the probability of being reversed.&lt;br /&gt;
&lt;br /&gt;
The same random-reverse behaviour can be implemented without the callback, by randomly switching to reversed sprites in the vehicle&#039;s varaction 2 chain, but this is inefficient as it typically causes sprites to be duplicated in the grf.&lt;br /&gt;
&lt;br /&gt;
This callback is available from {{ottdp|14|no|ottdrev=g05ed9f56fd}} OpenTTD 14 and above.&lt;br /&gt;
[[Category:Callbacks]]&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Build_probability_random_reverse&amp;diff=4668</id>
		<title>Callback: Build probability random reverse</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Build_probability_random_reverse&amp;diff=4668"/>
		<updated>2023-11-30T20:34:38Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Build_probability&amp;diff=4667</id>
		<title>Callback: Build probability</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Build_probability&amp;diff=4667"/>
		<updated>2023-11-30T20:34:31Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: Add CB 162 (third time lucky?)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Build probability (e.g. Reverse rail vehicle on build) (162) ==&lt;br /&gt;
&lt;br /&gt;
(Details to be added)&lt;br /&gt;
&lt;br /&gt;
This callback is available from {{ottdp|14|no|ottdrev=g05ed9f56fd}} OpenTTD 14 and above.&lt;br /&gt;
[[Category:Callbacks]]&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_build_probability_random_reverse&amp;diff=4666</id>
		<title>Callback: build probability random reverse</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_build_probability_random_reverse&amp;diff=4666"/>
		<updated>2023-11-30T20:33:36Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: Andythenorth moved page Callback: build probability random reverse to Callback: Build probability random reverse&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Callback: Build probability random reverse]]&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Build_probability_random_reverse&amp;diff=4665</id>
		<title>Callback: Build probability random reverse</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Build_probability_random_reverse&amp;diff=4665"/>
		<updated>2023-11-30T20:33:36Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: Andythenorth moved page Callback: build probability random reverse to Callback: Build probability random reverse&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Build probability (e.g. Reverse rail vehicle on build) (162) ==&lt;br /&gt;
&lt;br /&gt;
(Details to be added)&lt;br /&gt;
&lt;br /&gt;
This callback is available from {{ottdp|14|no|ottdrev=g05ed9f56fd}} OpenTTD 14 and above.&lt;br /&gt;
[[Category:Callbacks]]&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Build_probability_random_reverse&amp;diff=4664</id>
		<title>Callback: Build probability random reverse</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Build_probability_random_reverse&amp;diff=4664"/>
		<updated>2023-11-30T20:32:22Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: Add page for CB 162&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Build probability (e.g. Reverse rail vehicle on build) (162) ==&lt;br /&gt;
&lt;br /&gt;
(Details to be added)&lt;br /&gt;
&lt;br /&gt;
This callback is available from {{ottdp|14|no|ottdrev=g05ed9f56fd}} OpenTTD 14 and above.&lt;br /&gt;
[[Category:Callbacks]]&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Engine_name&amp;diff=4663</id>
		<title>Callback: Engine name</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Engine_name&amp;diff=4663"/>
		<updated>2023-11-30T20:30:34Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* Nope */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Engine name (161) ==&lt;br /&gt;
&lt;br /&gt;
This callback allows you to dynamically determine the name shown for an engine type. The return value should be the number of a D0xx text to be displayed. The contents of registers 100h..105h are copied onto the text reference stack and can be used with string codes 80/81 to show texts from the D8xx range as well, extending the available unique strings.&lt;br /&gt;
&lt;br /&gt;
{{grfFrom|8}} For GRF version 8 and above you can return 400 to display the engine name from the property (instead of failing the callback).&lt;br /&gt;
&lt;br /&gt;
The callback is run in purchase list scope, i.e. for cargotype FF. No variables of an actual vehicle are available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
During this callback, variable 10 (extra callback info 1) contains information about the context where the name is shown.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
! Bits 0 - 7 of [[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|variable 10]]&amp;lt;ref&amp;gt;Values correspond to the values used for [[Action2/Vehicles#Drawing_different_sprites_on_map_in_various_GUIs|sprite drawing]].&amp;lt;/ref&amp;gt;!! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 00 || No specific context is avaible.&lt;br /&gt;
|-&lt;br /&gt;
| 01..10 || reserved&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Name is shown in the vehicle details GUI. (This includes the refit GUI.)&lt;br /&gt;
|-&lt;br /&gt;
| 12..1F || reserved for other future GUIs.&lt;br /&gt;
|-&lt;br /&gt;
| 20 || Vehicle is drawn in the purchase list. (This includes the &amp;quot;Available vehicles&amp;quot; panel of autoreplace GUI.)&amp;lt;br&amp;gt;Bits &#039;&#039;&#039;8 - 15&#039;&#039;&#039; contain the indentation level in the list, e.g. when using vehicle variants.&lt;br /&gt;
|-&lt;br /&gt;
| 21 || Vehicle is drawn in the exclusive preview GUI or in the advertisement news.&lt;br /&gt;
|-&lt;br /&gt;
| 22 || Vehicle is drawn in the &amp;quot;Vehicles in use&amp;quot; panel of autoreplace GUI.&lt;br /&gt;
|-&lt;br /&gt;
| 23..2F || reserved for other future GUIs with non-purchased vehicles.&lt;br /&gt;
|-&lt;br /&gt;
| 30..FF || reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This callback is available from {{ottdp|14|no|ottdrev=g05ed9f56fd}} OpenTTD 14 and above.&lt;br /&gt;
[[Category:Callbacks]]&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Engine_name&amp;diff=4662</id>
		<title>Callback: Engine name</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Engine_name&amp;diff=4662"/>
		<updated>2023-11-30T20:30:11Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: /* Build probability  (162) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Engine name (161) ==&lt;br /&gt;
&lt;br /&gt;
This callback allows you to dynamically determine the name shown for an engine type. The return value should be the number of a D0xx text to be displayed. The contents of registers 100h..105h are copied onto the text reference stack and can be used with string codes 80/81 to show texts from the D8xx range as well, extending the available unique strings.&lt;br /&gt;
&lt;br /&gt;
{{grfFrom|8}} For GRF version 8 and above you can return 400 to display the engine name from the property (instead of failing the callback).&lt;br /&gt;
&lt;br /&gt;
The callback is run in purchase list scope, i.e. for cargotype FF. No variables of an actual vehicle are available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
During this callback, variable 10 (extra callback info 1) contains information about the context where the name is shown.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
! Bits 0 - 7 of [[GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29|variable 10]]&amp;lt;ref&amp;gt;Values correspond to the values used for [[Action2/Vehicles#Drawing_different_sprites_on_map_in_various_GUIs|sprite drawing]].&amp;lt;/ref&amp;gt;!! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 00 || No specific context is avaible.&lt;br /&gt;
|-&lt;br /&gt;
| 01..10 || reserved&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Name is shown in the vehicle details GUI. (This includes the refit GUI.)&lt;br /&gt;
|-&lt;br /&gt;
| 12..1F || reserved for other future GUIs.&lt;br /&gt;
|-&lt;br /&gt;
| 20 || Vehicle is drawn in the purchase list. (This includes the &amp;quot;Available vehicles&amp;quot; panel of autoreplace GUI.)&amp;lt;br&amp;gt;Bits &#039;&#039;&#039;8 - 15&#039;&#039;&#039; contain the indentation level in the list, e.g. when using vehicle variants.&lt;br /&gt;
|-&lt;br /&gt;
| 21 || Vehicle is drawn in the exclusive preview GUI or in the advertisement news.&lt;br /&gt;
|-&lt;br /&gt;
| 22 || Vehicle is drawn in the &amp;quot;Vehicles in use&amp;quot; panel of autoreplace GUI.&lt;br /&gt;
|-&lt;br /&gt;
| 23..2F || reserved for other future GUIs with non-purchased vehicles.&lt;br /&gt;
|-&lt;br /&gt;
| 30..FF || reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This callback is available from {{ottdp|14|no|ottdrev=g05ed9f56fd}} OpenTTD 14 and above.&lt;br /&gt;
[[Category:Callbacks]]&lt;br /&gt;
&lt;br /&gt;
== Build probability (e.g. Reverse rail vehicle on build) (162) ==&lt;br /&gt;
&lt;br /&gt;
(Details to be added)&lt;br /&gt;
&lt;br /&gt;
This callback is available from {{ottdp|14|no|ottdrev=g05ed9f56fd}} OpenTTD 14 and above.&lt;br /&gt;
[[Category:Callbacks]]&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=VariationalAction2/Bridges&amp;diff=4563</id>
		<title>VariationalAction2/Bridges</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=VariationalAction2/Bridges&amp;diff=4563"/>
		<updated>2023-10-06T17:55:03Z</updated>

		<summary type="html">&lt;p&gt;Andythenorth: This appears to be vestigial, as far as is known, none of this is implemented - cleaning up docs.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Not implemented&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Stations&amp;diff=4562</id>
		<title>Action0/Stations</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Stations&amp;diff=4562"/>
		<updated>2023-10-06T17:47:23Z</updated>

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

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

		<summary type="html">&lt;p&gt;Andythenorth: /* Sprite */ - GROUNDSPRITE_RAIL_X and GROUNDSPRITE_RAIL_Y&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavBlocksyntax}}&lt;br /&gt;
&lt;br /&gt;
Stations, houses, industry tiles, objects, and airport tiles use spritelayouts to define layouts how sprites are supposed to be arranged on a tile. A &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;spritelayout&amp;lt;/code&amp;gt; can combine multiple sprites into one entity, which represents everything that is to be drawn on a particular tile. A simple example to illustrate how it works:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
 spritelayout airport_building1 {&lt;br /&gt;
 	ground { sprite: GROUNDSPRITE_NORMAL; }&lt;br /&gt;
 	childsprite {&lt;br /&gt;
 		sprite: spr_small_dirt_ne; // custom spriteset&lt;br /&gt;
 		always_draw: 1; // also draw in transparent mode&lt;br /&gt;
 	}&lt;br /&gt;
 	building {&lt;br /&gt;
 		sprite: 0xA67; // reuse this existing base set sprite&lt;br /&gt;
 		xoffset: 0x0F;&lt;br /&gt;
 		xextent: 1;&lt;br /&gt;
 		zextent: 6;&lt;br /&gt;
 		recolour_mode: RECOLOUR_REMAP;&lt;br /&gt;
 		palette: PALETTE_USE_DEFAULT;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sprite layout is composed of one or more sprites. Each sprite is defined by a &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;ground&amp;lt;/code&amp;gt;, &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;building&amp;lt;/code&amp;gt; or &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;childsprite&amp;lt;/code&amp;gt; block. What block to use depends on how the sprite is to be placed on the tile.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;ground&amp;lt;/code&amp;gt; sprites are drawn at the base of the tile, like grass and concrete, rails etc. in normal TTD. With a few exceptions (e.g. when using custom foundations), you should always provide a ground sprite, even when the building above fully covers it. This because in transparent mode, the building becomes invisible. A tile can only have one ground sprite.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;building&amp;lt;/code&amp;gt; sprites are drawn on top of the ground sprite. To determine their location and drawing order (what goes in front of what), they have a 3D bounding box.&lt;br /&gt;
* With &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;childsprite&amp;lt;/code&amp;gt;(s), you can effectively compose sprites from multiple parts. When placing these after a building sprite, they will use the same bounding box as the previous building sprite. When placing them before the first building sprite, they will have no bounding box, as if they would use the &#039;bounding box&#039; of the ground tile. Multiple childsprites may be used per ground / building sprite.&lt;br /&gt;
&lt;br /&gt;
The sprite order is genrally determined by the sprite sorter, that evaluates the bounding box (see below) of each sprite. Child sprites are always part of the building (or ground) sprite that precedes them. In the GUI, sprites are always drawn in the order specified in the layout, so be sure to get this correct for spritelayouts that are to be displayed there.&lt;br /&gt;
&lt;br /&gt;
Per sprite, a number of parameters may be set. These are listed below. Unless otherwise indicated, each may have a value that is dependant on &#039;&#039;&#039;variables, parameters or registers&#039;&#039;&#039;. Accessed variables are always in the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;SELF&amp;lt;/code&amp;gt; scope. Accessing variables inside the purchase list is &#039;&#039;&#039;not&#039;&#039;&#039; supported, make sure that layouts accessed from there do not use them. Using variables and parameters, it&#039;s possible to create wildly differing looks with few spritelayouts.&lt;br /&gt;
&lt;br /&gt;
===Sprite===&lt;br /&gt;
&lt;br /&gt;
The most important parameter is &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;sprite&amp;lt;/code&amp;gt;, this determines the actual sprite to be drawn. If you set this to a number, a TTD sprite will be drawn, usually from the base set. Pre-defined constants for some base set sprites are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_NORMAL&amp;lt;ref name=&amp;quot;spritenames&amp;quot;&amp;gt;These constants can be used for sprites on flat ground. There are also equivalent sprites for sloped ground, however. These sprites follow the initial ground sprite, the [[NML:Builtin functions|builtin function]] &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;slope_to_sprite_offset(&#039;&#039;slope&#039;&#039;)&amp;lt;/code&amp;gt; may be used to compute the required offset. Refer to the reference on [[NML:List of tile slopes|slopes]] or the [[#Example_.28advanced.29_Spritelayout|example]] below.&amp;lt;/ref&amp;gt;&amp;lt;/code&amp;gt; default terrain type for that climate (temperate, toyland: normal, arctic: without snow, tropical: rainforest).&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_DESERT &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; desert tile&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_DESERT_1_2 &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; transition tile between desert and grass&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_SNOW &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; snowy ground tile&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_SNOW_1_4 &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; 1/4 snowy ground tile&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_SNOW_2_4 &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; half-snowy ground tile&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_SNOW_3_4 &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; 3/4 snowy ground tile&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_SNOW_4_4 &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; snowy ground tile&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_CONCRETE&amp;lt;/code&amp;gt; concrete ground tile&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_WATER&amp;lt;/code&amp;gt; flat water tile&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_CLEARED &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; ground tile that has just been bulldozed (with brown colour)&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_RAIL_X &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; ground tile with rail and terrain appropriate ground, NE-SW orientation&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;GROUNDSPRITE_RAIL_Y &amp;lt;ref name=&amp;quot;spritenames&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; ground tile with rail and terrain appropriate ground, NW-SE orientation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can set the value to (the name of) a [[NML:Spriteset|spriteset]], to provide a custom sprite. When the value is just a spriteset identifier, a sprite from that set will be selected depending on the construction stage, see below. All spritesets used in a layout &#039;&#039;&#039;must&#039;&#039;&#039; have the same number of sprites, due to a restriction in the NFO format. If you supply an argument (e.g. &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;sprite: some_sprite_set(2);&amp;lt;/code&amp;gt;), the corresponding sprite from the sprite set will be used, with an argument of 0 corresponding to the first sprite. Note that the argument may also be variable, so you could e.g. use &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;sprite: some_set(construction_state);&amp;lt;/code&amp;gt; to use the construction state to select the sprite (as is the default). If the spriteset has labels defined, you can use these labels in the argument expression.&lt;br /&gt;
&lt;br /&gt;
* For stations, objects and airport tiles, there are no construction stages, so the first sprite from the set is used always.&lt;br /&gt;
* For houses and industry tiles, sprite chosen depends on the construction stage and the number of sprites available.&lt;br /&gt;
** If there is only one sprite in the set, it is used always.&lt;br /&gt;
** If there are two sprites, one is used during construction (stages 0-2) and one for the finished building (stage 3)&lt;br /&gt;
** If there are three sprites, one is used for the beginning of construction (stage 0), one for the other construction stages (stages 1-2) and one for the finished building (stage 3).&lt;br /&gt;
** If there are four sprites, one is used for each construction stage.&lt;br /&gt;
** Sprites after the first four are always ignored.&lt;br /&gt;
&lt;br /&gt;
===Recolouring===&lt;br /&gt;
&lt;br /&gt;
Next, you have the option to apply recolouring, i.e. to change the colours of the sprite. This is done via the following attributes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;recolour_mode&amp;lt;/code&amp;gt;: This must be compile-time constant. Available recolour modes are:&lt;br /&gt;
** &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;RECOLOUR_NONE&amp;lt;/code&amp;gt;: Use no colour translation (default)&lt;br /&gt;
** &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;RECOLOUR_REMAP&amp;lt;/code&amp;gt;: Use a colour translation table as defined by &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;palette&amp;lt;/code&amp;gt;. This tables maps all colours of the sprite to a new colour.&lt;br /&gt;
** &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;RECOLOUR_TRANSPARENT&amp;lt;/code&amp;gt;: Draw the sprite in transparant mode, using a colour translation table as defined by &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;palette&amp;lt;/code&amp;gt;. Normally the palette will be set to PALETTE_TO_TRANSPARANT to draw all underlying colours somewhat darker. Note that the selected palette is applied to the colours of the underlying sprite, whatever that happens to be. The supplied sprite is only used to determine what pixels to recolour.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;palette&amp;lt;/code&amp;gt;: This defines the palette which is used for the colour translation. It may only (and must!) be set when &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;recolour_mode&amp;lt;/code&amp;gt; is set to &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;RECOLOUR_REMAP&amp;lt;/code&amp;gt; or &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;RECOLOUR_TRANSPARENT&amp;lt;/code&amp;gt;. The available values are the same as for &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;sprite&amp;lt;/code&amp;gt;, i.e. you can use either a default sprite or a sprite from a sprite set. In this case, however, the referenced sprite must not be a real sprite, but a [[NML:Recolour sprites|recolour sprite]]. For available default recolour sprites, see the appendix on [[NML:List of default colour translation palettes|available palettes]].&lt;br /&gt;
&lt;br /&gt;
===Display yes/no===&lt;br /&gt;
&lt;br /&gt;
The following attributes allow configuring whether the sprite will be displayed or not.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;hide_sprite&amp;lt;/code&amp;gt;: If set to 1, this sprite will not be drawn at all. Default is 0. If a building sprite is not drawn, all child sprites that share its bounding box are not drawn either. Setting this to a constant value makes little sense, but you can use this to enable/disable drawing certain sprites at runtime depending on certain conditions.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;always_draw&amp;lt;/code&amp;gt;: This must be a compile-time-constant. If set to 1, this sprite will also be drawn when the user has enabled transparant mode. The default value is 0. This is not available for ground sprites (those are drawn always), but it is for child sprites that share their bounding box with the ground sprite.&lt;br /&gt;
&lt;br /&gt;
===Positioning===&lt;br /&gt;
&lt;br /&gt;
How to position the sprite depends on the type of sprite:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;ground&amp;lt;/code&amp;gt;: Ground sprites cannot be positioned.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;building&amp;lt;/code&amp;gt;: A three-dimensional bounding box may be defined. The X-axis runs from top-right to bottom-left and the Y-axis from top-left to bottom-right. Both X and Y are measured in 1/16 length of the the tile border. The Z axis is vertical and measured in pixels. Extending the bounding box over the edges of a tile is possible, but not recommended as it may lead to glitches. &#039;&#039;&#039;Unless you know exactly what you are doing, do not define any offsets or extents, but use NML&#039;s defaults. They are most likely exactly what you need&#039;&#039;&#039;. Default values are 0, 0, 0, 16, 16, 16, respectively. In NewGRF developer mode in OpenTTD, it&#039;s possible to view the bounding boxes of all sprites by pressing Ctrl+B. In order to use and define a custom bounding box, the following attributes can be used:&lt;br /&gt;
** &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;xoffset&amp;lt;/code&amp;gt;: Offset from the northwestern edge to the start of the bounding box (X). Unit is 1/16 of the tile border&lt;br /&gt;
** &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;yoffset&amp;lt;/code&amp;gt;: Offset from the northeastern edge to the start of the bounding box (Y). Unit is 1/16 of the tile border&lt;br /&gt;
** &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;zoffset&amp;lt;/code&amp;gt;: Offset from the lowest tile corner (with foundation added) to the start of the bounding box (Z). Unit is pixels&lt;br /&gt;
** &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;xextent&amp;lt;/code&amp;gt;: Size of the bounding box, in the X-direction. Must be a compile-time constant. Unit is 1/16 of the tile border&lt;br /&gt;
** &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;yextent&amp;lt;/code&amp;gt;: Size of the bounding box, in the Y-direction. Must be a compile-time constant. Unit is 1/16 of the tile border&lt;br /&gt;
** &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;zextent&amp;lt;/code&amp;gt;: Size of the bounding box, in the Z-direction. Must be a compile-time constant. Unit is pixels&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;childsprite&amp;lt;/code&amp;gt;: Child sprites may be positioned relative to their &#039;parent&#039; sprite that defines the bounding box. &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;xoffset&amp;lt;/code&amp;gt; and &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;yoffset&amp;lt;/code&amp;gt; may be set to specify an offset in pixels between the origin of the parent and child sprite. When the parent sprite is the ground sprite, TTDPatch does not support offsets other than 0,0. Note that all child sprites should fit inside the bounding box of the parent sprite to avoid visual glitches.&lt;br /&gt;
&lt;br /&gt;
===Example (advanced) Spritelayout===&lt;br /&gt;
&lt;br /&gt;
OpenTTD 1.2 (r22723) allows for nice shorthands in defining multiple views, e.g. for different slopes: Spritelayout can have parameters and may use variables and temporary storage inside of a layout. A common usage for such parametrized spritelayout is taking care of the tile slope and ground type as illustrated in this example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
 spritelayout company_land_layout {&lt;br /&gt;
 	ground {&lt;br /&gt;
 		// normal ground sprite - always draw&lt;br /&gt;
 		sprite: LOAD_TEMP(0) + LOAD_TEMP(1);&lt;br /&gt;
 	}&lt;br /&gt;
 	childsprite {&lt;br /&gt;
 		// company-coloured border - always draw&lt;br /&gt;
 		sprite:        cc_frame(LOAD_TEMP(0));&lt;br /&gt;
 		always_draw:   1;&lt;br /&gt;
 		recolour_mode: RECOLOUR_REMAP;&lt;br /&gt;
 		palette:       PALETTE_USE_DEFAULT;&lt;br /&gt;
 	}&lt;br /&gt;
 	childsprite {&lt;br /&gt;
 		// again the normal ground sprite. Thus in non-transparent view&lt;br /&gt;
 		// only the normal ground sprite is shown. In transparent view&lt;br /&gt;
 		// this acts as sprite which darkens the other two sprites via&lt;br /&gt;
 		// a translation to transparency.&lt;br /&gt;
 		sprite: LOAD_TEMP(0) + LOAD_TEMP(1);&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // A pseudo-switch which sets the temporary parameters for the sprite layout, storing the sprite number&lt;br /&gt;
 // which belongs to the terrain type and the corresponding offset due to the tile slope&lt;br /&gt;
 switch (FEAT_OBJECTS, SELF, company_land_terrain_switch, [&lt;br /&gt;
 			// We store the offset into the spriteset due to the tile slope into the 1st temporary variable&lt;br /&gt;
 			STORE_TEMP(slope_to_sprite_offset(tile_slope), 0),&lt;br /&gt;
 &lt;br /&gt;
 			// We store the offset to the flat groundsprite we use into the 2nd temporary variable&lt;br /&gt;
 			STORE_TEMP(GROUNDSPRITE_NORMAL, 1),&lt;br /&gt;
 			STORE_TEMP(terrain_type == TILETYPE_DESERT      ? GROUNDSPRITE_DESERT : LOAD_TEMP(1), 1),&lt;br /&gt;
 			STORE_TEMP(terrain_type == TILETYPE_SNOW        ? GROUNDSPRITE_SNOW   : LOAD_TEMP(1), 1),&lt;br /&gt;
 &lt;br /&gt;
 			1&lt;br /&gt;
 			]) {&lt;br /&gt;
 	company_land_layout;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Andythenorth</name></author>
	</entry>
</feed>