<?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=2talltyler</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=2talltyler"/>
	<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/wiki/Special:Contributions/2talltyler"/>
	<updated>2026-05-07T08:04:49Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Vehicles&amp;diff=5240</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=5240"/>
		<updated>2026-04-15T13:51:43Z</updated>

		<summary type="html">&lt;p&gt;2talltyler: Fix wording of &amp;quot;backing up&amp;quot; -&amp;gt; &amp;quot;driving backwards&amp;quot;&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;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;badges&amp;lt;/code&amp;gt;&lt;br /&gt;
| Array of badge labels from the [[NML:Badgetable|badgetable]].&lt;br /&gt;
| yes&lt;br /&gt;
| Since {{ottd|15.0}}&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;extra_flags&amp;lt;/code&amp;gt;&lt;br /&gt;
| bitmask(VEHICLE_FLAG_XXX, ...)&lt;br /&gt;
| yes&lt;br /&gt;
| {{ottd|16}} &lt;br /&gt;
;VEHICLE_FLAG_TRAIN_HAS_CAB&lt;br /&gt;
: Train wagon has a cab and can lead a train when driving backwards, without any speed reduction.&lt;br /&gt;
Additionally, trains have the extra flags common to all vehicle types, described above.&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;
| flight_state&lt;br /&gt;
| 0 ... 28&lt;br /&gt;
| No&lt;br /&gt;
| {{nml|0.8.1}} Only for aircrafts.&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;
| train_is_driving_backwards&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| {{ottd|16}} Value is 1 if the train is driving backwards (trains only)&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;
| has_badge&lt;br /&gt;
| Label from the [[NML:Badgetable|badgetable]].&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| yes&lt;br /&gt;
| {{ottd|15.0}} Check if the vehicle has that specific badge attached.&lt;br /&gt;
|-&lt;br /&gt;
| count_has_badge&lt;br /&gt;
| Label from the [[NML:Badgetable|badgetable]].&lt;br /&gt;
| 0..255&lt;br /&gt;
| no&lt;br /&gt;
| {{ottd|15.0}} The number of vehicles in the current consist that have that specific badge attached.&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>2talltyler</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=VariationalAction2/Vehicles&amp;diff=5239</id>
		<title>VariationalAction2/Vehicles</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=VariationalAction2/Vehicles&amp;diff=5239"/>
		<updated>2026-04-15T13:50:35Z</updated>

		<summary type="html">&lt;p&gt;2talltyler: Fix wording of &amp;quot;backing up&amp;quot; -&amp;gt; &amp;quot;driving backwards&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right; padding-left:12px; background:none;&amp;quot;&amp;gt;{{NFONavVehicles}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Variable!![[GRFActionsDetailed|Size]]!!Version!!Description!!Available in purchase list&lt;br /&gt;
|-&lt;br /&gt;
|10||D||{{ottdp|1.2|no|ottdrev=r23080}}||Pick sprites for different GUI windows - See [[Action2/Vehicles]].||{{ottdp|1.2|no|ottdrev=r23080}}&lt;br /&gt;
|-&lt;br /&gt;
|40||D||{{ottdp|0.6|2.5}}||Position in consist and length of consist||no&lt;br /&gt;
|-&lt;br /&gt;
|41||D||{{ottdp|0.6|2.5}}||Position in and length of chain of consecutive vehicles with same ID||no&lt;br /&gt;
|-&lt;br /&gt;
|42||D||{{ottdp|0.6|2.5}}||Cargo types transported by consist||no&lt;br /&gt;
|-&lt;br /&gt;
|43||D||{{ottdp|0.6|2.5}}||Player info||{{ottdp|0.6|2.5|ottdrev=r4611|ttdprev=beta 2}}&lt;br /&gt;
|-&lt;br /&gt;
|44||D||{{ottdp|0.6|2.5|ttdprev=2.0.1 alpha 48}}||Aircraft info||no&lt;br /&gt;
|-&lt;br /&gt;
|45||D||{{ottdp|0.6|2.5|ttdprev=2.0.1 alpha 58}}||Curvature info||no&lt;br /&gt;
|-&lt;br /&gt;
|46||D||{{ottdp|0.6|2.5|ttdprev=2.0.1 alpha 59}}||Motion counter||no&lt;br /&gt;
|-&lt;br /&gt;
|47||D||{{ottdp|0.6|2.5}}||Vehicle cargo info||{{ottdp|0.7|no|ottdrev=r15542}} &amp;lt;ref name=&amp;quot;var47&amp;quot;&amp;gt;Variable 47 refers to the default cargo of the vehicle, when in purchase list. This differs from the cargo used in Action 3, which is 0xFF in purchase list. The &amp;quot;refit cycle&amp;quot; (F2) is currently always zero in the purchase list.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|48||D||{{ottdp|0.6|2.5}}||Vehicle type information||{{ottdp|0.6|2.5|ottdrev=r5338|ttdprev=beta 2}}&lt;br /&gt;
|-&lt;br /&gt;
|49||D||{{ottdp|0.7|2.6|ottdrev=r13376|ttdprev=r2216}}||Year of construction (long format, 0 based)||{{ottdp|0.7|no|ottdrev=r13376}} &amp;lt;ref name=&amp;quot;date&amp;quot;&amp;gt;This is the current date&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4A||D||{{ottdp|1.1|no|ottdrev=r20165}}||Info about current railtype/roadtype/tramtype||no&lt;br /&gt;
|-&lt;br /&gt;
|4B||D||{{ottdp|1.2|no|ottdrev=r23068}}||Long date of last servicing||{{ottdp|1.2|no|ottdrev=r23068}} &amp;lt;ref name=&amp;quot;date&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4C||D||{{ottdp|1.3|no|ottdrev=r24246}}||Current max speed including e.g track or timetable speed limits. Only valid for front vehicle. Note, units differ for each vehicle type&amp;lt;ref name=&amp;quot;speed&amp;quot;&amp;gt;See [[Action0Trains#Speed 09|train property 09]], [[Action0RoadVehicles|road vehicle property 08]] (not 15, even when using realistic acceleration), [[Action0Ships|ship property 0B]] and [[Action0Planes|aircraft property 0C]].&amp;lt;/ref&amp;gt;||no&lt;br /&gt;
|-&lt;br /&gt;
|4D||D||{{ottdp|1.4|no|ottdrev=r26157}}||Position within articulated vehicle||no&lt;br /&gt;
|-&lt;br /&gt;
|60||D||{{ottdp|0.6|2.5|ttdprev=2.0.1 alpha 57}}||Count Veh.ID occurence||no&lt;br /&gt;
|-&lt;br /&gt;
|61||-&amp;lt;ref&amp;gt;The size of the result matches the size of the queried variable.&amp;lt;/ref&amp;gt;||{{ottdp|1.2|no|ottdrev=r22997}}||Query variable of n-th vehicle in chain||no&lt;br /&gt;
|-&lt;br /&gt;
|62||D||{{ottdp|1.2|no|ottdrev=r22998}}||Curvature/position difference for n-th vehicle in chain||no&lt;br /&gt;
|-&lt;br /&gt;
|63||D||{{ottdp|1.11|no|ottdrev=g868d84bbf}}||Test track-type of tile against another track-type||no&lt;br /&gt;
|-&lt;br /&gt;
|97||B||{{ottdp|0.6|2.0}}||Tick counter, increased every engine tick||no&lt;br /&gt;
|-&lt;br /&gt;
|B2||W||||Vehicle status: bit0 = vehicle invisible (in tunnel/depot), bit1 = stopped, bit7 = crashed||no&lt;br /&gt;
|-&lt;br /&gt;
|B4||W||{{ottdp|0.6|2.0}}||Current speed. Note, units differ for each vehicle type&amp;lt;ref name=&amp;quot;speed&amp;quot; /&amp;gt;||no&lt;br /&gt;
|-&lt;br /&gt;
|B9||B||{{ottdp|0.6|2.0}}||Cargo type (type B from the list at [[CargoTypes]]; climate dependent)||no&lt;br /&gt;
|-&lt;br /&gt;
|C0||W||{{ottdp|0.6|2.0}}||Engine age in days&amp;lt;br/&amp;gt;{{ottdp|1.2|2.5|ottdrev=r22816|ttdprev=alpha 61}} Valid for wagons and articulated parts as well.||no&lt;br /&gt;
|-&lt;br /&gt;
|C4||B||{{ottdp|0.6|2.0}}||Year built (counted from 1920), note this is modified when Cht: Year is used||{{ottdp|0.6|no|ottdrev=r4611}} &amp;lt;ref name=&amp;quot;date&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|C6||W||{{ottdp|0.6|2.0}}||Vehicle type ID &amp;lt;ref&amp;gt;{{ottdp|0.7|no}} In OpenTTD 0.7 and newer this is the GRF-local ID of the vehicle. Earlier versions of OpenTTD and TTDPatch report the [[VehicleIDs|TTD ID]]. For trains this is the same; for other vehicle types they differ.&amp;lt;/ref&amp;gt; (useful for [[Callbacks#Can wagon be attached (1D)|Callback 1D]])||no&lt;br /&gt;
|-&lt;br /&gt;
|C8||B||{{ottdp|0.6|2.0}}||Sprite type; FD for trains forward, FE or FF when reversed||no&lt;br /&gt;
|-&lt;br /&gt;
|C9||B||{{ottdp|0.6|2.0}}||Day counter; increased daily||no&lt;br /&gt;
|-&lt;br /&gt;
|DA||W||{{ottdp|0.6|2.0}}||Next wagon index, FFFF if last wagon (use shift-num=08 and check for FF)||no&lt;br /&gt;
|-&lt;br /&gt;
|F2||B||{{ottdp|0.6|2.5}}||Refit cycle, how many times refitted to the same cargo type||{{ottdp|0.7|no|ottdrev=r15542}} &amp;lt;ref name=&amp;quot;var47&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|F4||D||{{ottdp|0.5|2.0|ottdrev=3594}}||Current horsepower of train consist||no&lt;br /&gt;
|-&lt;br /&gt;
|FE||W||{{ottdp|0.6|2.5}}||Modflags||no&lt;br /&gt;
|-&lt;br /&gt;
|FF||B||{{ottdp|0.6|2.5}}||Modflags||no&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For other 80+x variables confer the [http://marcin.ttdpatch.net/sv1codec/TTD-locations.html#_VehicleArray TTD vehicle structure].&lt;br /&gt;
&lt;br /&gt;
Variables 40, 41, 42 and 43 are cached. This means that while they are in principle computationally expensive, they can be used without impacting performance. Variables 45 and 60 are also computationally expensive but cannot be cached, and should therefore be used sparingly. If possible 80+x variables are to be preferred.&lt;br /&gt;
&lt;br /&gt;
Cached variables are updated when the game is loaded, when the consist enters or is rearranged in a depot, and when the train reverses.&lt;br /&gt;
&lt;br /&gt;
In the purchase list only a few variables are available. Especially the front vehicle (related object) cannot be accessed, nor other articulated parts.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
=== Position and length (40, 41) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; 00nnbbff&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Variable!!Value&lt;br /&gt;
|-&lt;br /&gt;
|ff||position of vehicle within the consist counted from the engine (front), e.g. the engine would have ff=0, the 1st wagon or mail compartment of planes would have ff=1, the 2nd wagon or the rotor of helicopters would have ff=2, the 3rd wagon would have ff=3 etc&lt;br /&gt;
|-&lt;br /&gt;
|bb||same as ff, but counted from the end, i.e. the last wagon has bb=0, the next-to-last wagon has bb=1 etc.&lt;br /&gt;
|-&lt;br /&gt;
|nn||Total number of vehicles in the consist, including shadow and rotor for aircraft.&lt;br /&gt;
* In var 40 this is zero-based. That is, the value returned is one less than the actual number of vehicles. A train with engine and three wagons has nn=3.&lt;br /&gt;
* In var 41 this is one-based. That is, the value returned is the actual number of vehicles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For variable 40, these numbers refer to the whole consist, but for variable 41, they only refer to the chain of consecutive vehicles with the same ID as the current wagon (including itself, but possibly excluding the engine):&lt;br /&gt;
&lt;br /&gt;
[[File:vehicle_var40_41.png]]&lt;br /&gt;
&lt;br /&gt;
Note however, that accessing the &amp;quot;related&amp;quot; object (i.e. the locomotive) doesn´t make much sense for vars 40/41, except for var40 when in a [[Callbacks#Can wagon be attached 1D|callback 1D]] chain.&lt;br /&gt;
&lt;br /&gt;
=== Consist cargo (42) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; uuiicctt&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Variable!!Value&lt;br /&gt;
|-&lt;br /&gt;
|tt||a bit mask of all [[Action0Cargos#Cargo classes 16|cargo classes]] transported by the consist&lt;br /&gt;
|-&lt;br /&gt;
|cc||the most common [[CargoTypes|cargo type]] (from the column for type A)&lt;br /&gt;
|-&lt;br /&gt;
|ii||the most common refit cycle (var. F2) of cargo type cc&lt;br /&gt;
|-&lt;br /&gt;
|uu||the result of ORing the bits of prop. 25 from all vehicles in the train&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If used with VarAction2 type 81 (vehicle) it returns only cargo from this vehicle on, with type 82 (engine) that of the whole consist.&lt;br /&gt;
See also variable 47 for more details on the cargo carried by a vehicle.&lt;br /&gt;
&lt;br /&gt;
{{grfTill|7}} For GRF versions 7 and before &amp;quot;cc&amp;quot; is the untranslated bit number from [[Action0/Cargos#Bit_number_for_bitmasks_.2808.29|cargo property 8]].&lt;br /&gt;
&lt;br /&gt;
{{grfFrom|8}} With GRF version 8 the meaning of &amp;quot;cc&amp;quot; changes. If the grf file has installed a [[Action0/Global_Settings#Cargo_translation_table_.2809.29|cargo translation table]], the value in &amp;quot;cc&amp;quot; is the index of the cargo in that table; or FF if the cargo is not present in the table.&lt;br /&gt;
&lt;br /&gt;
=== Player info (43) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; Ccttmmnn&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Variable!!Value&lt;br /&gt;
|-&lt;br /&gt;
|nn||the number of the current player from 0 to 7 (up to E (14) in OpenTTD since r14735)&lt;br /&gt;
|-&lt;br /&gt;
|mm||the multiplayer player number with the host player (or the single player) being 0 and the client player being 1&lt;br /&gt;
|-&lt;br /&gt;
|tt||the player type, see below for possible values&lt;br /&gt;
|-&lt;br /&gt;
|c||the primary player colour&lt;br /&gt;
|-&lt;br /&gt;
|C||{{ottdp|0.6|2.5|ttdprev=r1405}} the secondary player colour, equal to c if none (since r1405)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!tt value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||Player is human player (permanent company)&lt;br /&gt;
|-&lt;br /&gt;
|1||Player is AI player (not managed)&lt;br /&gt;
|-&lt;br /&gt;
|2||{{ottdp|no|2.5}} Player is a human managing an AI company&lt;br /&gt;
|-&lt;br /&gt;
|3||{{ottdp|no|2.5}} Player is human player&#039;s original company, now temporarily AI controlled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{ottdp|0.6|2.5|ttdprev=r1497}} Since r1497, when the vehicle sprite is being displayed in an exclusive offer window or new vehicle news message, or in other circumstances when no player is associated with the vehicle, nn will be FF.&lt;br /&gt;
&lt;br /&gt;
=== Aircraft info (44) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; xxxxhhtt&lt;br /&gt;
&lt;br /&gt;
hh is the height of the aircraft above ground, or more properly above the height of its shadow. Buildings, including the heliport, don&#039;t count as &amp;quot;ground&amp;quot;, i.e. to get the height above a heliport, you have to subtract the heliport height from hh.&lt;br /&gt;
&lt;br /&gt;
tt is the type of the current airport: 0=small, 1=large, 2=heliport, 3=oil rig. The current airport is the target airport for aircraft that have finished the ascent and are in flight.&lt;br /&gt;
&lt;br /&gt;
=== Curvature info (45) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; xxxTxBxF&lt;br /&gt;
&lt;br /&gt;
This returns the amount of curvature between the adjacent wagon pairs. It is useful for train vehicles that normally tilt in curves. The curvature is the difference in direction between the surrounding vehicles:&lt;br /&gt;
&lt;br /&gt;
F = for the front pair (previous wagon to current wagon, 0 if vehicle is first)&lt;br /&gt;
&lt;br /&gt;
B = for the back pair (current wagon to next wagon, 0 if wagon is last)&lt;br /&gt;
&lt;br /&gt;
T = for the triplet (previous wagon to next wagon; is zero in an S-bend)&lt;br /&gt;
&lt;br /&gt;
Possible values:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Decimal!!Hex!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
| -4||C||180° curve left (T only)&lt;br /&gt;
|-&lt;br /&gt;
| -3||D||135° curve left (T only)&lt;br /&gt;
|-&lt;br /&gt;
| -2||E||90° curve left&lt;br /&gt;
|-&lt;br /&gt;
| -1||F||45° curve left&lt;br /&gt;
|-&lt;br /&gt;
|0||0||no curve&lt;br /&gt;
|-&lt;br /&gt;
|1||1||45° curve right&lt;br /&gt;
|-&lt;br /&gt;
|2||2||90° curve right&lt;br /&gt;
|-&lt;br /&gt;
|3||3||135° curve right (T only)&lt;br /&gt;
|-&lt;br /&gt;
|4||4||180° curve right (T only)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Motion counter (46) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; 32-bit value&lt;br /&gt;
&lt;br /&gt;
This variable counts the amount of motion that a vehicle has done. &amp;amp;nbsp;It is only valid for the first vehicle in a consist (i.e. use VarAction2 type 82!). &amp;amp;nbsp;Its value is in units of 1/4096 of a tile. &amp;amp;nbsp;A vehicle actually moves visibly every time the motion counter increases by 256, and since a tile consists of 16 such subunits, 16*256=4096 motion units mean motion across one tile.&lt;br /&gt;
&lt;br /&gt;
The most useful way to access it is probably with &amp;amp;lt;shiftnum&amp;amp;gt;=08 and an appropriate &amp;amp;lt;andmask&amp;amp;gt;. &amp;amp;nbsp;For example, to achieve an animation with one frame per vehicle motion and 16 frames in total for motion across an entire tile, you would use &amp;amp;lt;shiftnum&amp;amp;gt;=08 and &amp;amp;lt;andmask&amp;amp;gt;=0F. &amp;amp;nbsp;For an animation with one frame every two vehicle motions and 4 frames total, use &amp;amp;lt;shiftnum&amp;amp;gt;=09 and &amp;amp;lt;andmask&amp;amp;gt;=03.&lt;br /&gt;
&lt;br /&gt;
If the vehicle is going very fast (&amp;amp;gt;160 mph for trains), it may move by several 1/16ths of a tile at once, and thus some frames may be skipped, but the animation will still remain in sync with the motion.&lt;br /&gt;
&lt;br /&gt;
Note that vehicle graphics are only updated every time the vehicle actually moves, so checking the lower byte is probably pointless, and only needed internally to achieve sufficient precision.&lt;br /&gt;
&lt;br /&gt;
=== Vehicle cargo info (47) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; ccccwwtt&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Variable!!Value&lt;br /&gt;
|-&lt;br /&gt;
|tt||the [[CargoTypes|cargo type]] transported by the vehicle (from the column for type A); translated if a translation table has been installed&lt;br /&gt;
|-&lt;br /&gt;
|ww||cargo unit weight in 1/16 tons, same as [[Action0Cargos#Weight of one unit of the cargo 0F|cargo prop. 0F]]&lt;br /&gt;
|-&lt;br /&gt;
|cccc||the [[Action0Cargos#Cargo classes 16|cargo class]] value of the cargo transported by the vehicle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that if the grf has installed a [[Action0/Global_Settings#Cargo_translation_table_.2809.29|cargo translation table]], the value in &amp;quot;tt&amp;quot; is the slot number in that table, irrespective of which actual slot or bit the cargo is using in the game. If a table has been installed, but the current cargo is not listed there, &amp;quot;tt&amp;quot; will be set to FF.&lt;br /&gt;
&lt;br /&gt;
Unlike variable 42, this variable returns the info of the current vehicle only, not the consist.&lt;br /&gt;
&lt;br /&gt;
=== Vehicle type information (48) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; xxxxxxff&lt;br /&gt;
&lt;br /&gt;
The bits of ff are:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||Vehicle type is available on the market&lt;br /&gt;
|-&lt;br /&gt;
|1||2||Vehicle type is in the testing phase&lt;br /&gt;
|-&lt;br /&gt;
|2||4||Exclusive testing offer for a human player active&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All other bits in ff are undefined and must be masked out.&lt;br /&gt;
&lt;br /&gt;
=== Information about current railtype/roadtype/tramtype (4A) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; xxxxFFrr&lt;br /&gt;
&lt;br /&gt;
The lower byte (rr) contains the (translated) railtype/roadtype/tramtype the vehicle is currently driving on. &lt;br /&gt;
If the railtype/roadtype/tramtype has no entry in the railtype/roadtype/tramtype translation table of the GRF, this value will be 0xFF. &lt;br /&gt;
If no translation table is present, the raw value will be returned.&lt;br /&gt;
Note: only exact matches of rail-/road-/-tram-types are reported. If the translation table of the GRF does not contain the exact track-type 0xFF is returned, even if the translation table contains equivalent track-types (according to rail-/road-/tram-type property 1D). Use variable 63 to test for compatibility/poweredness/equivalency with track-types known to both the vehicle and the track-type NewGRF.&lt;br /&gt;
&lt;br /&gt;
The variable only reports about the tracks the vehicle is using: on a level crossing with rail, road and tram tracks, the vehicle (train, road vehicle, tram) can only query the track type it belongs to.&lt;br /&gt;
&lt;br /&gt;
The second byte (FF) contains the following flags:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||The vehicle is/would be powered on the current railtype (this is independent from powered/non-powered wagon or anything)&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|1.11|no|ottdrev=gf1bc4d840}} Set, if the track-type has catenary. This is independent of the vehicle: a NewGRF can define an engine as powered on non-electrified track (bit 0), and show a raised pantograph (bit 1) to look like a dual-powered engine. This bit is a simplified as it only checks for &amp;quot;some catenary&amp;quot;. To distinguish different types of catenaries, AC and DC voltages, ... use variable 63 instead.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All other bits are reserved, and must be masked.&lt;br /&gt;
&lt;br /&gt;
All other bytes are reserved, and must be masked.&lt;br /&gt;
&lt;br /&gt;
=== Position within articulated vehicle (4D) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; xxxxbbff&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Variable!!Value&lt;br /&gt;
|-&lt;br /&gt;
|ff||Position of vehicle (articulated part) within the articulated vehicle, counted from the first part, starting with 0.&lt;br /&gt;
|-&lt;br /&gt;
|bb||Position of vehicle (articulated part) within the articulated vehicle, counted from the last part, starting with 0.&lt;br /&gt;
|-&lt;br /&gt;
|xx||Reserved, do not access.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The total number of articulated parts of a vehicle equals ff + 1 + bb.&lt;br /&gt;
&lt;br /&gt;
For road vehicles &amp;quot;ff&amp;quot; and &amp;quot;bb&amp;quot; currently equal var 40, since there are no road vehicle wagons yet.&lt;br /&gt;
&lt;br /&gt;
=== Count Veh.ID occurence (60) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; xxxxxxnn&lt;br /&gt;
&lt;br /&gt;
The 60+x parameter is the vehicle ID to look for, and the returned nn is the number of vehicles in the consist that have this ID. If used with VarAction2 type 81, only the current vehicle and onwards will be check, with VarAction2 type 82, all vehicles in the consist will be counted.&lt;br /&gt;
&lt;br /&gt;
=== Query variable of n-th vehicle in chain (61) ===&lt;br /&gt;
&lt;br /&gt;
This is a special variable to get the contents of another variable of a different vehicle in the vehicle chain. It is only supported for trains and road vehicles. It is not supported during a callback that is used to modify vehicle properties to avoid circular dependencies, which currently limits this variable to callbacks 1D, 2D, 31 and 32 plus outside callback scope.&lt;br /&gt;
&lt;br /&gt;
Temporary register 10F is interpreted as a signed integer and specifies the offset in the chain from the current vehicle. 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.&lt;br /&gt;
&lt;br /&gt;
The 60+x parameter specifies the variable to access and temporary register 10E is passed as the new 60+x parameter. Passing 61 as the variable is not allowed. Currently only vehicle specific variables listed on this page plus global variable 25 and {{ottdp|1.3|no|ottdrev=r24527}} 5F are accessible through var 61.&lt;br /&gt;
&lt;br /&gt;
The resulting value will have the size of whatever variable is queried.&lt;br /&gt;
&lt;br /&gt;
=== Curvature/position difference for n-th vehicle in chain (62) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; zzyyxxFD&lt;br /&gt;
&lt;br /&gt;
This variable is only supported for trains and road vehicles.&lt;br /&gt;
&lt;br /&gt;
The 60+x parameter is interpreted as a signed integer and specifies the offset in the chain from the current vehicle. 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.&lt;br /&gt;
&lt;br /&gt;
The lowest nibble (D) contains the direction difference between the selected vehicle and this vehicle, the possible values are identical to those of [[#Curvature_info_.2845.29|variable 45]].&lt;br /&gt;
&lt;br /&gt;
The next nibble (F) has the following meaning:&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|3||8||The vehicle is currently hidden&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The upper three bytes contain the signed difference of the X/Y/Z position between the selected vehicle and this vehicle.&lt;br /&gt;
&lt;br /&gt;
=== Track-type test against another track-type (63) ===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.11|no|ottdrev=g868d84bbf}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; xxxxxxFF&lt;br /&gt;
&lt;br /&gt;
This variable is only supported for trains and road vehicles.&lt;br /&gt;
&lt;br /&gt;
The 60+x parameter is an index into the rail-/road-/tram-type translation table.&lt;br /&gt;
The result value reports how vehicles of this type would behave on the current tile.&lt;br /&gt;
This allows vehicles to behave or look differently on various track-types independent of their own track-type.&lt;br /&gt;
&lt;br /&gt;
The lower byte (FF) contains some flags:&lt;br /&gt;
{| &lt;br /&gt;
|-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||The track-type from the 60+x parameter is known. If unset, all other flags are unset as well, no information can be given.&lt;br /&gt;
|-&lt;br /&gt;
|1||2||Vehicles with type from the 60+x parameter are compatible with the track on the current tile.&lt;br /&gt;
|-&lt;br /&gt;
|2||4||Vehicles with type from the 60+x parameter are powered on the track of the current tile.&lt;br /&gt;
|-&lt;br /&gt;
|3||8||The track-type from the 60+x parameter is identical or equivalent (listed as alternate label in rail-/road-/tram-type property 1D) to the track-type of the current tile.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The remaining bytes are reserved, and must be masked.&lt;br /&gt;
&lt;br /&gt;
=== Modflags (FE and FF) ===&lt;br /&gt;
&lt;br /&gt;
The bits in FE mostly relate to gradualloading. &amp;amp;nbsp;A few useful bits for grf authors are;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Version!!Value of the bit&lt;br /&gt;
|-&lt;br /&gt;
|1||{{ottdp|1.5|2.5|ottdrev=r26430}}||Vehicle is still unloading and has not yet started loading new cargo at the current station.&lt;br /&gt;
|-&lt;br /&gt;
|5||{{ottdp|0.6|2.5}}||Vehicle is powered (engine or powered wagon, mainly useful for the latter)&lt;br /&gt;
|-&lt;br /&gt;
|6||{{ottdp|0.6|2.5}}||Vehicle would be powered (engine or powered wagon) if there were suitable track. (E.g. electric train in mixed train on normal track)&lt;br /&gt;
|-&lt;br /&gt;
|8 &amp;lt;ref&amp;gt;This bit is only accurate for the first vehicle in the consist.&amp;lt;/ref&amp;gt;||{{ottdp|0.6|2.5}}||This bit is flipped every time the train reverses direction&lt;br /&gt;
|-&lt;br /&gt;
|10||{{ottdp|0.6|2.5|ttdprev=r1334}}||Vehicle was built during the exclusive preview&lt;br /&gt;
|-&lt;br /&gt;
|11 &amp;lt;ref&amp;gt;This bit is only accurate for the first vehicle in the consist.&amp;lt;/ref&amp;gt;||{{ottd|16}}||The train is driving backwards (trains only)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
variable FF is actually the high byte of variable FE, so FE bit 8 is the same as FF bit 0.&lt;br /&gt;
&lt;br /&gt;
Other bits are reserved; most are actually used for TTDPatch internal states.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;/div&gt;</summary>
		<author><name>2talltyler</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=VariationalAction2/Vehicles&amp;diff=5238</id>
		<title>VariationalAction2/Vehicles</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=VariationalAction2/Vehicles&amp;diff=5238"/>
		<updated>2026-04-15T13:50:07Z</updated>

		<summary type="html">&lt;p&gt;2talltyler: Add DrivingBackwards variable, from OpenTTD PR #15379.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right; padding-left:12px; background:none;&amp;quot;&amp;gt;{{NFONavVehicles}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Variable!![[GRFActionsDetailed|Size]]!!Version!!Description!!Available in purchase list&lt;br /&gt;
|-&lt;br /&gt;
|10||D||{{ottdp|1.2|no|ottdrev=r23080}}||Pick sprites for different GUI windows - See [[Action2/Vehicles]].||{{ottdp|1.2|no|ottdrev=r23080}}&lt;br /&gt;
|-&lt;br /&gt;
|40||D||{{ottdp|0.6|2.5}}||Position in consist and length of consist||no&lt;br /&gt;
|-&lt;br /&gt;
|41||D||{{ottdp|0.6|2.5}}||Position in and length of chain of consecutive vehicles with same ID||no&lt;br /&gt;
|-&lt;br /&gt;
|42||D||{{ottdp|0.6|2.5}}||Cargo types transported by consist||no&lt;br /&gt;
|-&lt;br /&gt;
|43||D||{{ottdp|0.6|2.5}}||Player info||{{ottdp|0.6|2.5|ottdrev=r4611|ttdprev=beta 2}}&lt;br /&gt;
|-&lt;br /&gt;
|44||D||{{ottdp|0.6|2.5|ttdprev=2.0.1 alpha 48}}||Aircraft info||no&lt;br /&gt;
|-&lt;br /&gt;
|45||D||{{ottdp|0.6|2.5|ttdprev=2.0.1 alpha 58}}||Curvature info||no&lt;br /&gt;
|-&lt;br /&gt;
|46||D||{{ottdp|0.6|2.5|ttdprev=2.0.1 alpha 59}}||Motion counter||no&lt;br /&gt;
|-&lt;br /&gt;
|47||D||{{ottdp|0.6|2.5}}||Vehicle cargo info||{{ottdp|0.7|no|ottdrev=r15542}} &amp;lt;ref name=&amp;quot;var47&amp;quot;&amp;gt;Variable 47 refers to the default cargo of the vehicle, when in purchase list. This differs from the cargo used in Action 3, which is 0xFF in purchase list. The &amp;quot;refit cycle&amp;quot; (F2) is currently always zero in the purchase list.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|48||D||{{ottdp|0.6|2.5}}||Vehicle type information||{{ottdp|0.6|2.5|ottdrev=r5338|ttdprev=beta 2}}&lt;br /&gt;
|-&lt;br /&gt;
|49||D||{{ottdp|0.7|2.6|ottdrev=r13376|ttdprev=r2216}}||Year of construction (long format, 0 based)||{{ottdp|0.7|no|ottdrev=r13376}} &amp;lt;ref name=&amp;quot;date&amp;quot;&amp;gt;This is the current date&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4A||D||{{ottdp|1.1|no|ottdrev=r20165}}||Info about current railtype/roadtype/tramtype||no&lt;br /&gt;
|-&lt;br /&gt;
|4B||D||{{ottdp|1.2|no|ottdrev=r23068}}||Long date of last servicing||{{ottdp|1.2|no|ottdrev=r23068}} &amp;lt;ref name=&amp;quot;date&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4C||D||{{ottdp|1.3|no|ottdrev=r24246}}||Current max speed including e.g track or timetable speed limits. Only valid for front vehicle. Note, units differ for each vehicle type&amp;lt;ref name=&amp;quot;speed&amp;quot;&amp;gt;See [[Action0Trains#Speed 09|train property 09]], [[Action0RoadVehicles|road vehicle property 08]] (not 15, even when using realistic acceleration), [[Action0Ships|ship property 0B]] and [[Action0Planes|aircraft property 0C]].&amp;lt;/ref&amp;gt;||no&lt;br /&gt;
|-&lt;br /&gt;
|4D||D||{{ottdp|1.4|no|ottdrev=r26157}}||Position within articulated vehicle||no&lt;br /&gt;
|-&lt;br /&gt;
|60||D||{{ottdp|0.6|2.5|ttdprev=2.0.1 alpha 57}}||Count Veh.ID occurence||no&lt;br /&gt;
|-&lt;br /&gt;
|61||-&amp;lt;ref&amp;gt;The size of the result matches the size of the queried variable.&amp;lt;/ref&amp;gt;||{{ottdp|1.2|no|ottdrev=r22997}}||Query variable of n-th vehicle in chain||no&lt;br /&gt;
|-&lt;br /&gt;
|62||D||{{ottdp|1.2|no|ottdrev=r22998}}||Curvature/position difference for n-th vehicle in chain||no&lt;br /&gt;
|-&lt;br /&gt;
|63||D||{{ottdp|1.11|no|ottdrev=g868d84bbf}}||Test track-type of tile against another track-type||no&lt;br /&gt;
|-&lt;br /&gt;
|97||B||{{ottdp|0.6|2.0}}||Tick counter, increased every engine tick||no&lt;br /&gt;
|-&lt;br /&gt;
|B2||W||||Vehicle status: bit0 = vehicle invisible (in tunnel/depot), bit1 = stopped, bit7 = crashed||no&lt;br /&gt;
|-&lt;br /&gt;
|B4||W||{{ottdp|0.6|2.0}}||Current speed. Note, units differ for each vehicle type&amp;lt;ref name=&amp;quot;speed&amp;quot; /&amp;gt;||no&lt;br /&gt;
|-&lt;br /&gt;
|B9||B||{{ottdp|0.6|2.0}}||Cargo type (type B from the list at [[CargoTypes]]; climate dependent)||no&lt;br /&gt;
|-&lt;br /&gt;
|C0||W||{{ottdp|0.6|2.0}}||Engine age in days&amp;lt;br/&amp;gt;{{ottdp|1.2|2.5|ottdrev=r22816|ttdprev=alpha 61}} Valid for wagons and articulated parts as well.||no&lt;br /&gt;
|-&lt;br /&gt;
|C4||B||{{ottdp|0.6|2.0}}||Year built (counted from 1920), note this is modified when Cht: Year is used||{{ottdp|0.6|no|ottdrev=r4611}} &amp;lt;ref name=&amp;quot;date&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|C6||W||{{ottdp|0.6|2.0}}||Vehicle type ID &amp;lt;ref&amp;gt;{{ottdp|0.7|no}} In OpenTTD 0.7 and newer this is the GRF-local ID of the vehicle. Earlier versions of OpenTTD and TTDPatch report the [[VehicleIDs|TTD ID]]. For trains this is the same; for other vehicle types they differ.&amp;lt;/ref&amp;gt; (useful for [[Callbacks#Can wagon be attached (1D)|Callback 1D]])||no&lt;br /&gt;
|-&lt;br /&gt;
|C8||B||{{ottdp|0.6|2.0}}||Sprite type; FD for trains forward, FE or FF when reversed||no&lt;br /&gt;
|-&lt;br /&gt;
|C9||B||{{ottdp|0.6|2.0}}||Day counter; increased daily||no&lt;br /&gt;
|-&lt;br /&gt;
|DA||W||{{ottdp|0.6|2.0}}||Next wagon index, FFFF if last wagon (use shift-num=08 and check for FF)||no&lt;br /&gt;
|-&lt;br /&gt;
|F2||B||{{ottdp|0.6|2.5}}||Refit cycle, how many times refitted to the same cargo type||{{ottdp|0.7|no|ottdrev=r15542}} &amp;lt;ref name=&amp;quot;var47&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|F4||D||{{ottdp|0.5|2.0|ottdrev=3594}}||Current horsepower of train consist||no&lt;br /&gt;
|-&lt;br /&gt;
|FE||W||{{ottdp|0.6|2.5}}||Modflags||no&lt;br /&gt;
|-&lt;br /&gt;
|FF||B||{{ottdp|0.6|2.5}}||Modflags||no&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For other 80+x variables confer the [http://marcin.ttdpatch.net/sv1codec/TTD-locations.html#_VehicleArray TTD vehicle structure].&lt;br /&gt;
&lt;br /&gt;
Variables 40, 41, 42 and 43 are cached. This means that while they are in principle computationally expensive, they can be used without impacting performance. Variables 45 and 60 are also computationally expensive but cannot be cached, and should therefore be used sparingly. If possible 80+x variables are to be preferred.&lt;br /&gt;
&lt;br /&gt;
Cached variables are updated when the game is loaded, when the consist enters or is rearranged in a depot, and when the train reverses.&lt;br /&gt;
&lt;br /&gt;
In the purchase list only a few variables are available. Especially the front vehicle (related object) cannot be accessed, nor other articulated parts.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
=== Position and length (40, 41) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; 00nnbbff&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Variable!!Value&lt;br /&gt;
|-&lt;br /&gt;
|ff||position of vehicle within the consist counted from the engine (front), e.g. the engine would have ff=0, the 1st wagon or mail compartment of planes would have ff=1, the 2nd wagon or the rotor of helicopters would have ff=2, the 3rd wagon would have ff=3 etc&lt;br /&gt;
|-&lt;br /&gt;
|bb||same as ff, but counted from the end, i.e. the last wagon has bb=0, the next-to-last wagon has bb=1 etc.&lt;br /&gt;
|-&lt;br /&gt;
|nn||Total number of vehicles in the consist, including shadow and rotor for aircraft.&lt;br /&gt;
* In var 40 this is zero-based. That is, the value returned is one less than the actual number of vehicles. A train with engine and three wagons has nn=3.&lt;br /&gt;
* In var 41 this is one-based. That is, the value returned is the actual number of vehicles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For variable 40, these numbers refer to the whole consist, but for variable 41, they only refer to the chain of consecutive vehicles with the same ID as the current wagon (including itself, but possibly excluding the engine):&lt;br /&gt;
&lt;br /&gt;
[[File:vehicle_var40_41.png]]&lt;br /&gt;
&lt;br /&gt;
Note however, that accessing the &amp;quot;related&amp;quot; object (i.e. the locomotive) doesn´t make much sense for vars 40/41, except for var40 when in a [[Callbacks#Can wagon be attached 1D|callback 1D]] chain.&lt;br /&gt;
&lt;br /&gt;
=== Consist cargo (42) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; uuiicctt&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Variable!!Value&lt;br /&gt;
|-&lt;br /&gt;
|tt||a bit mask of all [[Action0Cargos#Cargo classes 16|cargo classes]] transported by the consist&lt;br /&gt;
|-&lt;br /&gt;
|cc||the most common [[CargoTypes|cargo type]] (from the column for type A)&lt;br /&gt;
|-&lt;br /&gt;
|ii||the most common refit cycle (var. F2) of cargo type cc&lt;br /&gt;
|-&lt;br /&gt;
|uu||the result of ORing the bits of prop. 25 from all vehicles in the train&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If used with VarAction2 type 81 (vehicle) it returns only cargo from this vehicle on, with type 82 (engine) that of the whole consist.&lt;br /&gt;
See also variable 47 for more details on the cargo carried by a vehicle.&lt;br /&gt;
&lt;br /&gt;
{{grfTill|7}} For GRF versions 7 and before &amp;quot;cc&amp;quot; is the untranslated bit number from [[Action0/Cargos#Bit_number_for_bitmasks_.2808.29|cargo property 8]].&lt;br /&gt;
&lt;br /&gt;
{{grfFrom|8}} With GRF version 8 the meaning of &amp;quot;cc&amp;quot; changes. If the grf file has installed a [[Action0/Global_Settings#Cargo_translation_table_.2809.29|cargo translation table]], the value in &amp;quot;cc&amp;quot; is the index of the cargo in that table; or FF if the cargo is not present in the table.&lt;br /&gt;
&lt;br /&gt;
=== Player info (43) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; Ccttmmnn&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Variable!!Value&lt;br /&gt;
|-&lt;br /&gt;
|nn||the number of the current player from 0 to 7 (up to E (14) in OpenTTD since r14735)&lt;br /&gt;
|-&lt;br /&gt;
|mm||the multiplayer player number with the host player (or the single player) being 0 and the client player being 1&lt;br /&gt;
|-&lt;br /&gt;
|tt||the player type, see below for possible values&lt;br /&gt;
|-&lt;br /&gt;
|c||the primary player colour&lt;br /&gt;
|-&lt;br /&gt;
|C||{{ottdp|0.6|2.5|ttdprev=r1405}} the secondary player colour, equal to c if none (since r1405)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!tt value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||Player is human player (permanent company)&lt;br /&gt;
|-&lt;br /&gt;
|1||Player is AI player (not managed)&lt;br /&gt;
|-&lt;br /&gt;
|2||{{ottdp|no|2.5}} Player is a human managing an AI company&lt;br /&gt;
|-&lt;br /&gt;
|3||{{ottdp|no|2.5}} Player is human player&#039;s original company, now temporarily AI controlled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{ottdp|0.6|2.5|ttdprev=r1497}} Since r1497, when the vehicle sprite is being displayed in an exclusive offer window or new vehicle news message, or in other circumstances when no player is associated with the vehicle, nn will be FF.&lt;br /&gt;
&lt;br /&gt;
=== Aircraft info (44) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; xxxxhhtt&lt;br /&gt;
&lt;br /&gt;
hh is the height of the aircraft above ground, or more properly above the height of its shadow. Buildings, including the heliport, don&#039;t count as &amp;quot;ground&amp;quot;, i.e. to get the height above a heliport, you have to subtract the heliport height from hh.&lt;br /&gt;
&lt;br /&gt;
tt is the type of the current airport: 0=small, 1=large, 2=heliport, 3=oil rig. The current airport is the target airport for aircraft that have finished the ascent and are in flight.&lt;br /&gt;
&lt;br /&gt;
=== Curvature info (45) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; xxxTxBxF&lt;br /&gt;
&lt;br /&gt;
This returns the amount of curvature between the adjacent wagon pairs. It is useful for train vehicles that normally tilt in curves. The curvature is the difference in direction between the surrounding vehicles:&lt;br /&gt;
&lt;br /&gt;
F = for the front pair (previous wagon to current wagon, 0 if vehicle is first)&lt;br /&gt;
&lt;br /&gt;
B = for the back pair (current wagon to next wagon, 0 if wagon is last)&lt;br /&gt;
&lt;br /&gt;
T = for the triplet (previous wagon to next wagon; is zero in an S-bend)&lt;br /&gt;
&lt;br /&gt;
Possible values:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Decimal!!Hex!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
| -4||C||180° curve left (T only)&lt;br /&gt;
|-&lt;br /&gt;
| -3||D||135° curve left (T only)&lt;br /&gt;
|-&lt;br /&gt;
| -2||E||90° curve left&lt;br /&gt;
|-&lt;br /&gt;
| -1||F||45° curve left&lt;br /&gt;
|-&lt;br /&gt;
|0||0||no curve&lt;br /&gt;
|-&lt;br /&gt;
|1||1||45° curve right&lt;br /&gt;
|-&lt;br /&gt;
|2||2||90° curve right&lt;br /&gt;
|-&lt;br /&gt;
|3||3||135° curve right (T only)&lt;br /&gt;
|-&lt;br /&gt;
|4||4||180° curve right (T only)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Motion counter (46) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; 32-bit value&lt;br /&gt;
&lt;br /&gt;
This variable counts the amount of motion that a vehicle has done. &amp;amp;nbsp;It is only valid for the first vehicle in a consist (i.e. use VarAction2 type 82!). &amp;amp;nbsp;Its value is in units of 1/4096 of a tile. &amp;amp;nbsp;A vehicle actually moves visibly every time the motion counter increases by 256, and since a tile consists of 16 such subunits, 16*256=4096 motion units mean motion across one tile.&lt;br /&gt;
&lt;br /&gt;
The most useful way to access it is probably with &amp;amp;lt;shiftnum&amp;amp;gt;=08 and an appropriate &amp;amp;lt;andmask&amp;amp;gt;. &amp;amp;nbsp;For example, to achieve an animation with one frame per vehicle motion and 16 frames in total for motion across an entire tile, you would use &amp;amp;lt;shiftnum&amp;amp;gt;=08 and &amp;amp;lt;andmask&amp;amp;gt;=0F. &amp;amp;nbsp;For an animation with one frame every two vehicle motions and 4 frames total, use &amp;amp;lt;shiftnum&amp;amp;gt;=09 and &amp;amp;lt;andmask&amp;amp;gt;=03.&lt;br /&gt;
&lt;br /&gt;
If the vehicle is going very fast (&amp;amp;gt;160 mph for trains), it may move by several 1/16ths of a tile at once, and thus some frames may be skipped, but the animation will still remain in sync with the motion.&lt;br /&gt;
&lt;br /&gt;
Note that vehicle graphics are only updated every time the vehicle actually moves, so checking the lower byte is probably pointless, and only needed internally to achieve sufficient precision.&lt;br /&gt;
&lt;br /&gt;
=== Vehicle cargo info (47) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; ccccwwtt&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Variable!!Value&lt;br /&gt;
|-&lt;br /&gt;
|tt||the [[CargoTypes|cargo type]] transported by the vehicle (from the column for type A); translated if a translation table has been installed&lt;br /&gt;
|-&lt;br /&gt;
|ww||cargo unit weight in 1/16 tons, same as [[Action0Cargos#Weight of one unit of the cargo 0F|cargo prop. 0F]]&lt;br /&gt;
|-&lt;br /&gt;
|cccc||the [[Action0Cargos#Cargo classes 16|cargo class]] value of the cargo transported by the vehicle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that if the grf has installed a [[Action0/Global_Settings#Cargo_translation_table_.2809.29|cargo translation table]], the value in &amp;quot;tt&amp;quot; is the slot number in that table, irrespective of which actual slot or bit the cargo is using in the game. If a table has been installed, but the current cargo is not listed there, &amp;quot;tt&amp;quot; will be set to FF.&lt;br /&gt;
&lt;br /&gt;
Unlike variable 42, this variable returns the info of the current vehicle only, not the consist.&lt;br /&gt;
&lt;br /&gt;
=== Vehicle type information (48) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; xxxxxxff&lt;br /&gt;
&lt;br /&gt;
The bits of ff are:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||Vehicle type is available on the market&lt;br /&gt;
|-&lt;br /&gt;
|1||2||Vehicle type is in the testing phase&lt;br /&gt;
|-&lt;br /&gt;
|2||4||Exclusive testing offer for a human player active&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All other bits in ff are undefined and must be masked out.&lt;br /&gt;
&lt;br /&gt;
=== Information about current railtype/roadtype/tramtype (4A) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; xxxxFFrr&lt;br /&gt;
&lt;br /&gt;
The lower byte (rr) contains the (translated) railtype/roadtype/tramtype the vehicle is currently driving on. &lt;br /&gt;
If the railtype/roadtype/tramtype has no entry in the railtype/roadtype/tramtype translation table of the GRF, this value will be 0xFF. &lt;br /&gt;
If no translation table is present, the raw value will be returned.&lt;br /&gt;
Note: only exact matches of rail-/road-/-tram-types are reported. If the translation table of the GRF does not contain the exact track-type 0xFF is returned, even if the translation table contains equivalent track-types (according to rail-/road-/tram-type property 1D). Use variable 63 to test for compatibility/poweredness/equivalency with track-types known to both the vehicle and the track-type NewGRF.&lt;br /&gt;
&lt;br /&gt;
The variable only reports about the tracks the vehicle is using: on a level crossing with rail, road and tram tracks, the vehicle (train, road vehicle, tram) can only query the track type it belongs to.&lt;br /&gt;
&lt;br /&gt;
The second byte (FF) contains the following flags:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||The vehicle is/would be powered on the current railtype (this is independent from powered/non-powered wagon or anything)&lt;br /&gt;
|-&lt;br /&gt;
|1||2||{{ottdp|1.11|no|ottdrev=gf1bc4d840}} Set, if the track-type has catenary. This is independent of the vehicle: a NewGRF can define an engine as powered on non-electrified track (bit 0), and show a raised pantograph (bit 1) to look like a dual-powered engine. This bit is a simplified as it only checks for &amp;quot;some catenary&amp;quot;. To distinguish different types of catenaries, AC and DC voltages, ... use variable 63 instead.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All other bits are reserved, and must be masked.&lt;br /&gt;
&lt;br /&gt;
All other bytes are reserved, and must be masked.&lt;br /&gt;
&lt;br /&gt;
=== Position within articulated vehicle (4D) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; xxxxbbff&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Variable!!Value&lt;br /&gt;
|-&lt;br /&gt;
|ff||Position of vehicle (articulated part) within the articulated vehicle, counted from the first part, starting with 0.&lt;br /&gt;
|-&lt;br /&gt;
|bb||Position of vehicle (articulated part) within the articulated vehicle, counted from the last part, starting with 0.&lt;br /&gt;
|-&lt;br /&gt;
|xx||Reserved, do not access.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The total number of articulated parts of a vehicle equals ff + 1 + bb.&lt;br /&gt;
&lt;br /&gt;
For road vehicles &amp;quot;ff&amp;quot; and &amp;quot;bb&amp;quot; currently equal var 40, since there are no road vehicle wagons yet.&lt;br /&gt;
&lt;br /&gt;
=== Count Veh.ID occurence (60) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; xxxxxxnn&lt;br /&gt;
&lt;br /&gt;
The 60+x parameter is the vehicle ID to look for, and the returned nn is the number of vehicles in the consist that have this ID. If used with VarAction2 type 81, only the current vehicle and onwards will be check, with VarAction2 type 82, all vehicles in the consist will be counted.&lt;br /&gt;
&lt;br /&gt;
=== Query variable of n-th vehicle in chain (61) ===&lt;br /&gt;
&lt;br /&gt;
This is a special variable to get the contents of another variable of a different vehicle in the vehicle chain. It is only supported for trains and road vehicles. It is not supported during a callback that is used to modify vehicle properties to avoid circular dependencies, which currently limits this variable to callbacks 1D, 2D, 31 and 32 plus outside callback scope.&lt;br /&gt;
&lt;br /&gt;
Temporary register 10F is interpreted as a signed integer and specifies the offset in the chain from the current vehicle. 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.&lt;br /&gt;
&lt;br /&gt;
The 60+x parameter specifies the variable to access and temporary register 10E is passed as the new 60+x parameter. Passing 61 as the variable is not allowed. Currently only vehicle specific variables listed on this page plus global variable 25 and {{ottdp|1.3|no|ottdrev=r24527}} 5F are accessible through var 61.&lt;br /&gt;
&lt;br /&gt;
The resulting value will have the size of whatever variable is queried.&lt;br /&gt;
&lt;br /&gt;
=== Curvature/position difference for n-th vehicle in chain (62) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; zzyyxxFD&lt;br /&gt;
&lt;br /&gt;
This variable is only supported for trains and road vehicles.&lt;br /&gt;
&lt;br /&gt;
The 60+x parameter is interpreted as a signed integer and specifies the offset in the chain from the current vehicle. 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.&lt;br /&gt;
&lt;br /&gt;
The lowest nibble (D) contains the direction difference between the selected vehicle and this vehicle, the possible values are identical to those of [[#Curvature_info_.2845.29|variable 45]].&lt;br /&gt;
&lt;br /&gt;
The next nibble (F) has the following meaning:&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|3||8||The vehicle is currently hidden&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The upper three bytes contain the signed difference of the X/Y/Z position between the selected vehicle and this vehicle.&lt;br /&gt;
&lt;br /&gt;
=== Track-type test against another track-type (63) ===&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.11|no|ottdrev=g868d84bbf}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Format:&#039;&#039;&#039; xxxxxxFF&lt;br /&gt;
&lt;br /&gt;
This variable is only supported for trains and road vehicles.&lt;br /&gt;
&lt;br /&gt;
The 60+x parameter is an index into the rail-/road-/tram-type translation table.&lt;br /&gt;
The result value reports how vehicles of this type would behave on the current tile.&lt;br /&gt;
This allows vehicles to behave or look differently on various track-types independent of their own track-type.&lt;br /&gt;
&lt;br /&gt;
The lower byte (FF) contains some flags:&lt;br /&gt;
{| &lt;br /&gt;
|-&lt;br /&gt;
!Bit!!Value!!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||1||The track-type from the 60+x parameter is known. If unset, all other flags are unset as well, no information can be given.&lt;br /&gt;
|-&lt;br /&gt;
|1||2||Vehicles with type from the 60+x parameter are compatible with the track on the current tile.&lt;br /&gt;
|-&lt;br /&gt;
|2||4||Vehicles with type from the 60+x parameter are powered on the track of the current tile.&lt;br /&gt;
|-&lt;br /&gt;
|3||8||The track-type from the 60+x parameter is identical or equivalent (listed as alternate label in rail-/road-/tram-type property 1D) to the track-type of the current tile.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The remaining bytes are reserved, and must be masked.&lt;br /&gt;
&lt;br /&gt;
=== Modflags (FE and FF) ===&lt;br /&gt;
&lt;br /&gt;
The bits in FE mostly relate to gradualloading. &amp;amp;nbsp;A few useful bits for grf authors are;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Version!!Value of the bit&lt;br /&gt;
|-&lt;br /&gt;
|1||{{ottdp|1.5|2.5|ottdrev=r26430}}||Vehicle is still unloading and has not yet started loading new cargo at the current station.&lt;br /&gt;
|-&lt;br /&gt;
|5||{{ottdp|0.6|2.5}}||Vehicle is powered (engine or powered wagon, mainly useful for the latter)&lt;br /&gt;
|-&lt;br /&gt;
|6||{{ottdp|0.6|2.5}}||Vehicle would be powered (engine or powered wagon) if there were suitable track. (E.g. electric train in mixed train on normal track)&lt;br /&gt;
|-&lt;br /&gt;
|8 &amp;lt;ref&amp;gt;This bit is only accurate for the first vehicle in the consist.&amp;lt;/ref&amp;gt;||{{ottdp|0.6|2.5}}||This bit is flipped every time the train reverses direction&lt;br /&gt;
|-&lt;br /&gt;
|10||{{ottdp|0.6|2.5|ttdprev=r1334}}||Vehicle was built during the exclusive preview&lt;br /&gt;
|-&lt;br /&gt;
|11 &amp;lt;ref&amp;gt;This bit is only accurate for the first vehicle in the consist.&amp;lt;/ref&amp;gt;||{{ottd|16}}||The train is backing up (trains only)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
variable FF is actually the high byte of variable FE, so FE bit 8 is the same as FF bit 0.&lt;br /&gt;
&lt;br /&gt;
Other bits are reserved; most are actually used for TTDPatch internal states.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;/div&gt;</summary>
		<author><name>2talltyler</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Vehicles&amp;diff=5237</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=5237"/>
		<updated>2026-04-15T13:45:54Z</updated>

		<summary type="html">&lt;p&gt;2talltyler: Add train_is_driving_backwards variable, from OpenTTD PR #15379 and NML PR #421.&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;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;badges&amp;lt;/code&amp;gt;&lt;br /&gt;
| Array of badge labels from the [[NML:Badgetable|badgetable]].&lt;br /&gt;
| yes&lt;br /&gt;
| Since {{ottd|15.0}}&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;extra_flags&amp;lt;/code&amp;gt;&lt;br /&gt;
| bitmask(VEHICLE_FLAG_XXX, ...)&lt;br /&gt;
| yes&lt;br /&gt;
| {{ottd|16}} &lt;br /&gt;
;VEHICLE_FLAG_TRAIN_HAS_CAB&lt;br /&gt;
: Train wagon has a cab and can lead a train when backing up, without any speed reduction.&lt;br /&gt;
Additionally, trains have the extra flags common to all vehicle types, described above.&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;
| flight_state&lt;br /&gt;
| 0 ... 28&lt;br /&gt;
| No&lt;br /&gt;
| {{nml|0.8.1}} Only for aircrafts.&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;
| train_is_driving_backwards&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| {{ottd|16}} Value is 1 if the train is driving backwards (trains only)&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;
| has_badge&lt;br /&gt;
| Label from the [[NML:Badgetable|badgetable]].&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| yes&lt;br /&gt;
| {{ottd|15.0}} Check if the vehicle has that specific badge attached.&lt;br /&gt;
|-&lt;br /&gt;
| count_has_badge&lt;br /&gt;
| Label from the [[NML:Badgetable|badgetable]].&lt;br /&gt;
| 0..255&lt;br /&gt;
| no&lt;br /&gt;
| {{ottd|15.0}} The number of vehicles in the current consist that have that specific badge attached.&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>2talltyler</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Vehicles&amp;diff=5236</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=5236"/>
		<updated>2026-04-15T13:40:32Z</updated>

		<summary type="html">&lt;p&gt;2talltyler: Add HasCab extra flag, from OpenTTD PR #15379 and NML PR #420.&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;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;badges&amp;lt;/code&amp;gt;&lt;br /&gt;
| Array of badge labels from the [[NML:Badgetable|badgetable]].&lt;br /&gt;
| yes&lt;br /&gt;
| Since {{ottd|15.0}}&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;extra_flags&amp;lt;/code&amp;gt;&lt;br /&gt;
| bitmask(VEHICLE_FLAG_XXX, ...)&lt;br /&gt;
| yes&lt;br /&gt;
| {{ottd|16}} &lt;br /&gt;
;VEHICLE_FLAG_TRAIN_HAS_CAB&lt;br /&gt;
: Train wagon has a cab and can lead a train when backing up, without any speed reduction.&lt;br /&gt;
Additionally, trains have the extra flags common to all vehicle types, described above.&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;
| flight_state&lt;br /&gt;
| 0 ... 28&lt;br /&gt;
| No&lt;br /&gt;
| {{nml|0.8.1}} Only for aircrafts.&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;
| has_badge&lt;br /&gt;
| Label from the [[NML:Badgetable|badgetable]].&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| yes&lt;br /&gt;
| {{ottd|15.0}} Check if the vehicle has that specific badge attached.&lt;br /&gt;
|-&lt;br /&gt;
| count_has_badge&lt;br /&gt;
| Label from the [[NML:Badgetable|badgetable]].&lt;br /&gt;
| 0..255&lt;br /&gt;
| no&lt;br /&gt;
| {{ottd|15.0}} The number of vehicles in the current consist that have that specific badge attached.&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>2talltyler</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/Trains&amp;diff=5235</id>
		<title>Action0/Vehicles/Trains</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action0/Vehicles/Trains&amp;diff=5235"/>
		<updated>2026-04-15T13:32:04Z</updated>

		<summary type="html">&lt;p&gt;2talltyler: Add HasCab extra flag, from OpenTTD PR #15379.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right; padding-left:12px; background:none;&amp;quot;&amp;gt;{{NFONavVehicles}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
Defining properties of train vehicles.&lt;br /&gt;
&lt;br /&gt;
= Properties =&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description!!Available for articulated parts&lt;br /&gt;
|-&lt;br /&gt;
|05||B||{{ottdp|0.6|2.0}}||Track type (see below)||should be same as front&lt;br /&gt;
|-&lt;br /&gt;
|08||B||{{ottdp|0.6|2.0}}||AI special flag: set to 1 if engine is &#039;optimized&#039; for passenger service (AI won&#039;t use it for other cargo), 0 otherwise||no&lt;br /&gt;
|-&lt;br /&gt;
|09||W||{{ottdp|0.6|2.0}}||Speed in mph*1.6 (see below)||no&lt;br /&gt;
|-&lt;br /&gt;
|0B||W||{{ottdp|0.6|2.0}}||Power (0 for wagons)||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|0D||B||{{ottdp|0.6|2.0}}||Running cost factor (0 for wagons)||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|0E||D||{{ottdp|0.6|2.0}}||Running cost base, see below||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|12||B||{{ottdp|0.6|2.0}}||Sprite ID (FD for new graphics)||yes&lt;br /&gt;
|-&lt;br /&gt;
|13||B||{{ottdp|0.6|2.0}}||Dual-headed flag; 1 if dual-headed engine, 0 otherwise||should be zero also for front&lt;br /&gt;
|-&lt;br /&gt;
|14||B||{{ottdp|0.6|2.0}}||Cargo capacity||yes&lt;br /&gt;
|-&lt;br /&gt;
|15||B||{{ottdp|0.6|2.0}}||Cargo type, see [[CargoTypes]]&amp;lt;br/&amp;gt;&lt;br /&gt;
{{grfTill|7}} For GRF version 7 and below: Type B &#039;cargo slot&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
{{grfFrom|8}} For GRF version 8 and above: Type A &#039;(translated) cargo bit&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
{{ottd|15.0}} Since 15.0, a default cargo translation table corresponding to the climate is used if one is not provided.&lt;br /&gt;
||yes&lt;br /&gt;
|-&lt;br /&gt;
|16||B||{{ottdp|0.6|2.0}}||Weight in tons||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|17||B||{{ottdp|0.6|2.0}}||Cost factor||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|18||B||{{ottdp|&amp;amp;lt;0.7|2.0}}&amp;lt;ref&amp;gt;This property is not used by OpenTTDs NoAI API.&amp;lt;/ref&amp;gt;||Engine rank for the AI (AI selects the highest-rank engine of those it can buy)||no&lt;br /&gt;
|-&lt;br /&gt;
|19||B||{{ottdp|0.6|2.0}} {{grfFrom|1}}||Engine traction type (see below)||no&lt;br /&gt;
|-&lt;br /&gt;
|1A||B/B*&amp;lt;ref&amp;gt;{{ottdp|0.7|no|ottdrev=r13831}} Since OpenTTD r13831 this is an extended byte.&amp;lt;/ref&amp;gt;||{{ottdp|0.6|2.0}} {{grfFrom|1}}||Not a property, but an action: sort the purchase list.||no&lt;br /&gt;
|-&lt;br /&gt;
|1B||W||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Power added by each wagon connected to this engine, see below||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|1C||B||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Refit cost, using 50% of the [[BaseCosts|purchase price cost base]]||yes&lt;br /&gt;
|-&lt;br /&gt;
|1D||D||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Bit mask of cargo types available for refitting, see column 2 (bit value) in [[CargoTypes]]. &amp;lt;b&amp;gt;Obsoleted by properties 2C/2D&amp;lt;/b&amp;gt;||yes&lt;br /&gt;
|-&lt;br /&gt;
|1E||B||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Callback flags bit mask, see below||yes&lt;br /&gt;
|-&lt;br /&gt;
|1F||B||{{ottdp|0.6|2.5|ttdprev=alpha 19}}||Coefficient of tractive effort||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|20||B||{{ottdp|1.1|2.5|ttdprev=alpha 27}}||Coefficient of air drag||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|21||B||{{ottdp|0.6|2.0}} {{grfFrom|2}}||Make vehicle shorter by this amount, see below||yes&lt;br /&gt;
|-&lt;br /&gt;
|22||B||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Set visual effect type (steam/smoke/sparks) as well as position, see below||yes&lt;br /&gt;
|-&lt;br /&gt;
|23||B||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Set how much weight is added by making wagons powered (i.e. weight of engine), see below||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|24||B||{{ottdp|0.6|2.5|ttdprev=alpha 44}}||High byte of vehicle weight, weight will be prop.24*256+prop.16||should be zero&lt;br /&gt;
|-&lt;br /&gt;
|25||B||{{ottdp|0.6|2.5|ttdprev=alpha 44}}||User-defined bit mask to set when checking veh. var. 42||yes&lt;br /&gt;
|-&lt;br /&gt;
|26||B||{{ottdp|0.6|2.5|ttdprev=alpha 44}}||Retire vehicle early, this many years before the end of phase 2 (see [[Action0General]])||no&lt;br /&gt;
|-&lt;br /&gt;
|27||B||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Miscellaneous flags||partly&lt;br /&gt;
|-&lt;br /&gt;
|28||W||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Refittable cargo classes||yes&lt;br /&gt;
|-&lt;br /&gt;
|29||W||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Non-refittable cargo classes||yes&lt;br /&gt;
|-&lt;br /&gt;
|2A||D||{{ottdp|0.6|2.5|ottdrev=r7191|ttdprev=r1210}}||Long format introduction date||no&lt;br /&gt;
|-&lt;br /&gt;
|2B||W||{{ottdp|1.2|no|ottdrev=r22713}}||Custom cargo ageing period||yes&lt;br /&gt;
|-&lt;br /&gt;
|2C||B n*B||{{ottdp|1.2|no|ottdrev=r23291}}||List of always refittable cargo types||yes&lt;br /&gt;
|-&lt;br /&gt;
|2D||B n*B||{{ottdp|1.2|no|ottdrev=r23291}}||List of never refittable cargo types||yes&lt;br /&gt;
|-&lt;br /&gt;
|2E||W||{{ottdp|12|no|ottdrev=g2183fd4dab}}||Maximum curve speed modifier||yes&lt;br /&gt;
|-&lt;br /&gt;
|2F||W||{{ottdp|13|no}}||Vehicle variant group||no&lt;br /&gt;
|-&lt;br /&gt;
|30||D||{{ottdp|13|no}}||Extra flags||??&lt;br /&gt;
|-&lt;br /&gt;
|31||B||{{ottdp|14|no|ottdrev=g2d73076056}}||Additional callback flags bit mask, see below||yes&lt;br /&gt;
|-&lt;br /&gt;
|32||W||{{ottdp|15|no|ottdrev=gd2496b6ec4}}||Cargo classes required for refittability||yes&lt;br /&gt;
|-&lt;br /&gt;
|33||W n*W||{{ottdp|15}}||List of badges||??&lt;br /&gt;
|-&lt;br /&gt;
|34||B n*B||{{ottdp|15|no|ottdrev=g52e97c981c}}||List of track types||should be same as front&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
== Track type (05) ==&lt;br /&gt;
Set track type of vehicle: 0 = rail, 1 = monorail, 2 = maglev. For setting the appropriate traction type, see [[Action0Trains#Engine traction type 19|prop19]].&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.0|no}} In OpenTTD, if a [[Action0Railtypes|rail type]] translation table is loaded, this property is an index into the table instead.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|15|no|ottdrev=g52e97c981c}} Overwritten by prop 34.&lt;br /&gt;
&lt;br /&gt;
== Speed (09) ==&lt;br /&gt;
&lt;br /&gt;
Train speed is in units of mph*1.6, i.e. approximately km/h.&lt;br /&gt;
&lt;br /&gt;
For wagons, this value is only used if the &amp;quot;wagonspeedlimit&amp;quot; switch is on, and it limits the speed of the train to that of the lowest wagon speed. &amp;amp;nbsp;This limit is ignored for wagons with a livery override for the current train, so that train sets always get their max speed from the engine&#039;s max speed.&lt;br /&gt;
&lt;br /&gt;
For wagons, a value of 0 means &amp;quot;default&amp;quot; (which depends on cargo type and date of introduction), and FFFF means no limit.&lt;br /&gt;
&lt;br /&gt;
== Power (0B) ==&lt;br /&gt;
&lt;br /&gt;
The power of the engine, in HP.&lt;br /&gt;
&lt;br /&gt;
A value of 0 means that the vehicle will be a wagon, otherwise it will be an engine.&lt;br /&gt;
&lt;br /&gt;
== Running cost base (0E) and factor (0D) ==&lt;br /&gt;
&lt;br /&gt;
TTD calculates all costs by multiplying a 32-bit [[BaseCosts|base amount]] with an 8-bit factor. &amp;amp;nbsp;The base amount is changed according to inflation, whereas the factor remains constant.&lt;br /&gt;
&lt;br /&gt;
For the running costs of train vehicles, the following base amounts are available depending on the vehicle type (the value here is a pointer into TTD&#039;s memory where the actual amount is stored):&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Type!!Value!!in little-endian notation&lt;br /&gt;
|-&lt;br /&gt;
|Steam engines||4C30||30 4C 00 00&lt;br /&gt;
|-&lt;br /&gt;
|Diesel engines||4C36||36 4C 00 00&lt;br /&gt;
|-&lt;br /&gt;
|Electric engines||4C3C||3C 4C 00 00&lt;br /&gt;
|-&lt;br /&gt;
|Wagons||0||00 00 00 00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Theoretically, you could use pointers to other base amounts available in TTD, but these are the numbers TTD uses for train vehicles.&lt;br /&gt;
&lt;br /&gt;
The following are some real values for maintenance costs depending on the setting of the above two factors. &amp;amp;nbsp;This value is correct for medium difficulty, but increases and decreases for hard and easy difficulties respectively. &amp;amp;nbsp;These are the costs of a new game starting in 1921, because they obviously increase with inflation over time (unless noinflation is turned on).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running cost base 4C30 (steam)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Running cost factor!!Maintenance cost&lt;br /&gt;
|-&lt;br /&gt;
|01||$ 42&lt;br /&gt;
|-&lt;br /&gt;
|10||$ 700&lt;br /&gt;
|-&lt;br /&gt;
|20||$ 1.400&lt;br /&gt;
|-&lt;br /&gt;
|80||$ 5.600&lt;br /&gt;
|-&lt;br /&gt;
|A0||$ 7.000&lt;br /&gt;
|-&lt;br /&gt;
|FF||$ 11.112&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running cost base 4C36 (diesel)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Running cost factor!!Maintenance cost&lt;br /&gt;
|-&lt;br /&gt;
|01||$ 40&lt;br /&gt;
|-&lt;br /&gt;
|10||$ 650&lt;br /&gt;
|-&lt;br /&gt;
|20||$ 1.300&lt;br /&gt;
|-&lt;br /&gt;
|80||$ 5.200&lt;br /&gt;
|-&lt;br /&gt;
|A0||$ 6.500&lt;br /&gt;
|-&lt;br /&gt;
|FF||$ 10.318&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running cost base 4C3C (electric)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Running cost factor!!Maintenance cost&lt;br /&gt;
|-&lt;br /&gt;
|01||$ 36&lt;br /&gt;
|-&lt;br /&gt;
|10||$ 600&lt;br /&gt;
|-&lt;br /&gt;
|20||$ 1.200&lt;br /&gt;
|-&lt;br /&gt;
|80||$ 4.800&lt;br /&gt;
|-&lt;br /&gt;
|A0||$ 6.000&lt;br /&gt;
|-&lt;br /&gt;
|FF||$ 9.524&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cost factor (17) ==&lt;br /&gt;
&lt;br /&gt;
The cost factor is a bit-coded value which determines how expensive an engine is. There is no distinction between steam, diesel or electric engines, they all use the same cost factor. The table below gives you some values to use for finding the right price for your engines.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Cost factor!!Price&lt;br /&gt;
|-&lt;br /&gt;
|01||$ 3.124&lt;br /&gt;
|-&lt;br /&gt;
|10||$ 50.000&lt;br /&gt;
|-&lt;br /&gt;
|20||$ 100.000&lt;br /&gt;
|-&lt;br /&gt;
|80||$ 400.000&lt;br /&gt;
|-&lt;br /&gt;
|A0||$ 500.000&lt;br /&gt;
|-&lt;br /&gt;
|FF||$ 796.874&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Engine traction type (19) ==&lt;br /&gt;
&lt;br /&gt;
This sets the traction type of a train engine, i.e. whether it is powered by steam, diesel, electric, monorail or maglev technology. &amp;amp;nbsp;It also sets the corresponding sound effect of the engine, and if property 22 is not set, the visual effect as well.&lt;br /&gt;
&lt;br /&gt;
The following ranges are available (and it does not matter which value you pick):&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Values!!Traction type&lt;br /&gt;
|-&lt;br /&gt;
|00..07||Steam&lt;br /&gt;
|-&lt;br /&gt;
|08..27||Diesel&lt;br /&gt;
|-&lt;br /&gt;
|28..31||Electric&lt;br /&gt;
|-&lt;br /&gt;
|32..37||Monorail&lt;br /&gt;
|-&lt;br /&gt;
|38..41||Maglev&lt;br /&gt;
|}&lt;br /&gt;
Default value is 00, i.e. steam. For setting the appropriate track type, see [[Action0Trains#Track type 05|prop05]].&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.1|no}} In OpenTTD, if a [[Action0Railtypes|rail type]] translation table is loaded, setting this property does NOT alter the track type.&lt;br /&gt;
&lt;br /&gt;
== Sort vehicle list (1A) ==&lt;br /&gt;
&lt;br /&gt;
This is not a property as such, but an action. &amp;amp;nbsp;It forces TTDPatch to shuffle the vehicle this &amp;quot;property&amp;quot; is being set for in front of the vehicle with the given value of the property. &amp;amp;nbsp;The order of this list is only used in the train purchase window.&lt;br /&gt;
&lt;br /&gt;
For example, setting prop. 1A for vehicle 09 to a value of 07 would lead to the following internal list: ... 05 06 09 07 08 0A 0B ...&lt;br /&gt;
&lt;br /&gt;
This property can not simply be overwritten, because the list is already shuffled when trying to do so.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no|2.0}} It is possible to reset the list to its original order with a special action 0 that has num-info set to 0, and only sets property 1A for trains:&lt;br /&gt;
&amp;lt;pre&amp;gt;00 00 01 00 00 1A&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resetting the list should however only be done by sets that contain replacements for all train vehicles.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|0.7|no|ottdrev=r13831}} This property is an extended byte in OpenTTD since r13831!&lt;br /&gt;
&lt;br /&gt;
== Powered train wagons (1B and 23, see also 22) ==&lt;br /&gt;
&lt;br /&gt;
Normally, train wagons are unpowered in TTD, and if you set property 0B to a non-zero value, they become engines instead. &amp;amp;nbsp;Therefore, to model real-life trains where wagons have power, a different mechanism is needed.&lt;br /&gt;
To make train wagons powered, you set property 1B of the &#039;&#039;&#039;engine&#039;&#039;&#039; instead of the wagon. This determines how much power each wagon adds to the train when attached to this engine. This only applies to wagons with a [[Action3|graphics override]] for this engine as well. &amp;amp;nbsp;This means that for example passenger wagons (with an override) will add power, but coal wagons (with no override) will not.&lt;br /&gt;
&lt;br /&gt;
In addition to adding power, these wagons are also heavier by the amount set in property 23.&lt;br /&gt;
&lt;br /&gt;
== Refit cost (1C) ==&lt;br /&gt;
&lt;br /&gt;
Refit cost, using 50% of the [[BaseCosts|purchase price cost base]]. This property can be overridden by callback 15E.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.2|no|ottdrev=r23087}} If the refit cost factor is set to zero and bit 4 of the miscellaneous flags (27) is set, auto-refitting is allowed.&lt;br /&gt;
&lt;br /&gt;
== Callbacks (1E, 31) ==&lt;br /&gt;
For trains, the following [[callbacks]] have to be enabled by setting the corresponding bit in properties 1E and 31 (certain other, not as frequently used callbacks are available without setting a bit here):&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!Value!!Variable 0C value!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|0||1||10||Powered wagons and visual effect&lt;br /&gt;
|-&lt;br /&gt;
|1||2||11||Wagon length&lt;br /&gt;
|-&lt;br /&gt;
|2||4||12||Load amount&lt;br /&gt;
|-&lt;br /&gt;
|3||8||15||Set refitted capacity&lt;br /&gt;
|-&lt;br /&gt;
|4||10||16||Build articulated engines&lt;br /&gt;
|-&lt;br /&gt;
|5||20||19||show a suffix after the cargo type name&lt;br /&gt;
|-&lt;br /&gt;
|6||40||2D||Select color mapping for vehicle&lt;br /&gt;
|-&lt;br /&gt;
|7||80||33||Sound effect callbacks&lt;br /&gt;
|-&lt;br /&gt;
|8||100||161||{{ottd|14|ottdrev=gf5394ed2ef}}Engine name&lt;br /&gt;
|-&lt;br /&gt;
|9||200||163||{{ottdp|15|no|ottdrev=gd2496b6ec4}}Custom refit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Bit is the bit you have to set, you do this by adding all the values for all the bits. Variable 0C value is what variable 0C will be set to, for checking it in the VarAction2 for callbacks.&lt;br /&gt;
&lt;br /&gt;
These callbacks do not need a bit to activate them, they are always active and will be used if defined in the action 3/action 2 chain.&lt;br /&gt;
{| |-&lt;br /&gt;
!Variable 0C value!!Callback&lt;br /&gt;
|-&lt;br /&gt;
|1D||Can wagon be attached&lt;br /&gt;
|-&lt;br /&gt;
|23||Additional text in purchase screen&lt;br /&gt;
|-&lt;br /&gt;
|31||Start/stop check&lt;br /&gt;
|-&lt;br /&gt;
|32||32-day callback&lt;br /&gt;
|-&lt;br /&gt;
|36||Change Vehicle Properties&lt;br /&gt;
|-&lt;br /&gt;
|15E||Refit cost&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Coefficient of tractive effort (1F) ==&lt;br /&gt;
&lt;br /&gt;
This cofficient sets what fraction of the vehicle weight is equal to the maximum tractive effort. &amp;amp;nbsp;This includes the effect of having some unpowered axles, as well as the coefficient of friction that is available.&lt;br /&gt;
&lt;br /&gt;
Theoretically, this value should be calculated by taking the ratio of adhesive weight W&amp;lt;sub&amp;gt;adh&amp;lt;/sub&amp;gt; (i.e. the vehicle weight that rests on powered axles) times the coefficient of friction µ between the wheels and the rails to the total vehicle weight W, times 255, and convert to hex:&lt;br /&gt;
&lt;br /&gt;
prop. 1F = HEX ((W&amp;lt;sub&amp;gt;adh&amp;lt;/sub&amp;gt; * µ / W) * 255)&lt;br /&gt;
&lt;br /&gt;
With prop. 1F having a value of FF, the tractive effort is equal to the vehicle weight, for 80, it is half, and so on. If not set, a default of 4C is used, for a fraction of 0.30, corresponding to Wadh=W and a coefficient of friction of 0.30, which is the value used by the patch before TTDPatch 2.0.1 alpha 19.&lt;br /&gt;
&lt;br /&gt;
Sometimes you know the real-life tractive effort instead of adhesive weight and coefficient of friction. To help calculating prop. 1F in that case, here&#039;s a small example using the NS 1600 (Electric) with a mass of 84 tons and real-life tractive effort (TE&amp;lt;sub&amp;gt;real&amp;lt;/sub&amp;gt;) of 259 kN. To quickly find the value for property 1F you fill in the following formula:&lt;br /&gt;
&lt;br /&gt;
prop. 1F = HEX ((TE&amp;lt;sub&amp;gt;real&amp;lt;/sub&amp;gt; / (Mass * g) * 255)&lt;br /&gt;
&lt;br /&gt;
That may look confusing but you already know all variables:&lt;br /&gt;
&lt;br /&gt;
prop. 1F = HEX ((259 / (84 * 9.8) * 255)&lt;br /&gt;
&lt;br /&gt;
prop. 1F = HEX (0.3146 *255) = HEX(80.229)&lt;br /&gt;
&lt;br /&gt;
HEX calculations only work with figures in the natural domain: each figure has to be a positive and round figure. Therefore the value you convert to HEX isn&#039;t 80.229 but 80:&lt;br /&gt;
&lt;br /&gt;
HEX 80 = 50&lt;br /&gt;
&lt;br /&gt;
Property 1F for the NS 1600 (Electric) would then be: 1F 50.&lt;br /&gt;
&lt;br /&gt;
== Coefficient of air drag (20) ==&lt;br /&gt;
&lt;br /&gt;
This property sets the air drag coefficient c2 used for the realistic acceleration model, from 01 (no airdrag) to FF (most air drag) in arbitrary units. 00 means to use the default value that depends on the top speed (to simulate the fact that high-speed engines are more streamlined).&lt;br /&gt;
&lt;br /&gt;
The default values are the following:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!top speed (mph/1.6)!!	&amp;lt;16!!	16!!	24!!	32!!	48!!	64!!	96!!	128!!	192!!	256!!	...&lt;br /&gt;
|-&lt;br /&gt;
|c2||	192||	128||	96||	64||	48||	32||	24||	16||	12||	8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For higher speeds, the series is continued in the same manner.&lt;br /&gt;
&lt;br /&gt;
Air drag in Newtons will then be c2*v*v with v in m/s, although it is probably futile to attempt to make c2 a realistic number due to the lack of TTD&#039;s consistent scaling. If a train doesn&#039;t reach its historical top speed, you might try setting the value of prop. 20 one or two steps lower than the default above, otherwise it&#039;s probably a good idea to leave it at the default.&lt;br /&gt;
&lt;br /&gt;
== Shorter train vehicles (21) ==&lt;br /&gt;
&lt;br /&gt;
This property reduces the length of train vehicles, in units of 1/8th (12.5%). The value 00 means the vehicle has the full length, 01 means shorter by 1/8th (12.5%), up to 05=shorter by 5/8ths (62.5%). Larger numbers will not work properly&lt;br /&gt;
&amp;lt;ref&amp;gt;{{ottdp|1.0|no|ottdrev=r15793}} This restriction has been removed in OpenTTD r15793. Every vehicle can have a length between 1/8 and 8/8 independent of its position in the chain.&amp;lt;/ref&amp;gt;,&lt;br /&gt;
except at the end of the train&lt;br /&gt;
&amp;lt;ref&amp;gt;{{ottdp|&amp;amp;lt;1.0|}} This means that it is only safe to use values larger than 05 in the length callback making sure that they are only returned for the very last vehicle in the train. Otherwise the train will occasionally fall apart, with the wagons after the shortest one stopping to move.&amp;lt;/ref&amp;gt;. The vehicle length is set whenever it leaves a depot. This property does not work for the first vehicle in a train (i.e. the engine).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Visual effects and wagon power (22) ==&lt;br /&gt;
&lt;br /&gt;
By default, the visual effect of train engines is determined by the traction type (property 19). With this option you can change the type of effect as well as the position of it relative to the vehicle. (Note: for TTDPatch and OpenTTD up to r21229 only the positioning of steam actually works. For {{ottdp|1.1|no|ottdrev=r21230}} positioning diesel smoke and electric sparks works as well) The position of the effect provides a range from 0 to F that is added to the type of the effect.&lt;br /&gt;
&lt;br /&gt;
Position 0 corresponds to a point half a vehicle length ahead of the vehicle, 4 is the front of the vehicle, 8 the middle, C the end and F is a half length behind the vehicle. Intermediate values are in-between.&lt;br /&gt;
&lt;br /&gt;
Additionally, this property can be used to disable powered wagons of this type, although that is usually done with [[Callbacks#Visual_effect_and_wagon_power_.2810.29| callback 10]] instead (which has the same meaning as prop. 22, but is more flexible).&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Range	!!Effect type&lt;br /&gt;
|-&lt;br /&gt;
|00..0F||Use the default effect type, but reposition it. For engines this is defined via property 19, wagons have no default effect.&lt;br /&gt;
|-&lt;br /&gt;
|10..1F||Steam puffs&lt;br /&gt;
|-&lt;br /&gt;
|20..2F||Diesel fumes&lt;br /&gt;
|-&lt;br /&gt;
|30..3F||Electric sparks&lt;br /&gt;
|-&lt;br /&gt;
|40||Disable visual effect&lt;br /&gt;
|-&lt;br /&gt;
|41..7F||{{ottdp|1.5|no|ottdrev=r26747}} Create effects with [[Callbacks#Advanced_effect_creation_.28160.29|Callback 160]] using one of these spawning models:&lt;br /&gt;
* 41 Steam: Gradually less effects when approaching max speed&lt;br /&gt;
* 42 Diesel: Effect proportional to acceleration, no effect when idling at top speed&lt;br /&gt;
* 43 Electric: Random effect, gradually less likely when approaching max spped&lt;br /&gt;
* 44-7F Reserved&lt;br /&gt;
|-&lt;br /&gt;
|80+00..80+7F||Same as 00..7F above, but disable wagon power&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, 28 would make the wagon powered and emit diesel fumes, but 80+28 = A8 would only emit the diesel fumes without adding power.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous flags (27) ==&lt;br /&gt;
&lt;br /&gt;
This is a bit mask, with the following bits:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!	Value!!	Version !!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||	1||{{ottdp|0.6|2.5}}||	Vehicle tilts in curves, and thus gets speed bonus &amp;lt;ref&amp;gt;The tilting speed bonus only applies if all vehicles in the train have this bit set. In TTDPatch it requires the &amp;quot;curves&amp;quot; switch to be on. For realistic curves, it gives the train two free curving pieces with no speed decrease, and for other settings, it increases the curves setting by one (0-&amp;gt;1, 1-&amp;gt;2, 2-&amp;gt;2). In OpenTTD, the curve speed limit increases by 20% if &#039;realistic&#039; acceleration is enabled, else there is no effect.&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1||	2||{{ottdp|0.6|2.5}}||	Uses two company colors&lt;br /&gt;
|-&lt;br /&gt;
|2||	4||{{ottdp|0.6|2.5}}||	Vehicle is a multiple unit (DMU/EMU), for colour selection&lt;br /&gt;
|-&lt;br /&gt;
|3||	8||Varies|| {{ottdp|1.1|no|ottdrev=r21966}}Vehicle can be flipped around in the depot. &amp;lt;br&amp;gt;{{ottdp|13|no|no}}This flag is no longer required, vehicles can always be flipped. &lt;br /&gt;
&amp;lt;ref&amp;gt;From {{ottd|13|no}} onwards, OpenTTD will again allow all vehicles to flip, and will automatically adjust offsets accordingly. From {{ottd|13|no}}, if this flag is set, OpenTTD will not automatically apply the correct offsets for vehicles &amp;lt; 8/8 long, and will defer to offsets set by the grf. Do not set this flag unless you need it for a specific reason.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For {{ottd|1.1|r21966}} up to {{ottdp|12|no|no}} when you enable flipping of a vehicle in a depot you must make sure that the graphics are correctly aligned when flipped as well. Especially in the case of shortened vehicles.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Prior to {{ottd|1.1|r21966}} all non-multiheaded/non-articulated vehicles would be able to flip around in the depot. As such {{ottd|1.1|r21966}} disables a &amp;quot;feature&amp;quot; in OpenTTD, but often it makes no sense to flip vehicles around (symetric vehicles) or the graphics are wrong (most shortened vehicles), and thus only enabling this when the NewGRF developer says it is possible is better.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For all relevant OpenTTD versions, the flipping bit has no effect for multiheaded or articulated vehicles as they cannot be flipped in depot. &lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4||   10||{{ottdp|1.2|no|ottdrev=r23087}}|| Auto-refitting is enabled for refits where callback 15E allows it or prop 1C specifies zero cost&lt;br /&gt;
|-&lt;br /&gt;
|5||   20||{{ottdp|1.2|no|ottdrev=r23861}}|| Use cargo multiplier for default cargo (and load amount). See page about [[VehicleRefitting#Misc._vehicle_flag_5_.27use_of_capacity_multiplier_for_default_cargo.27_set|vehicle refitting]].&lt;br /&gt;
|-&lt;br /&gt;
|6||   40||{{ottdp|1.3|no|ottdrev=r24124}}|| Disable breakdown smoke effect.&lt;br /&gt;
|-&lt;br /&gt;
|7||   80||{{ottdp|1.7|no|ottdrev=r27668}}|| [[Action2/Vehicles#Composing_vehicles_from_multiple_sprites|Compose vehicle from multiple sprites.]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cargo classes (28, 29, 32) ==&lt;br /&gt;
&lt;br /&gt;
To make vehicle sets more compatible with future new cargo definitions, these three properties allow vehicles to define what type of cargo they should be refittable to. A wagon will be refittable to all cargo types that match any of the classes set in prop. 28 &#039;&#039;and&#039;&#039; have all of the classes set in prop. 32, except for the ones that match any of the classes set in prop. 29. In addition, afterwards those cargo types listed in prop. 1D will be toggled. In terms of logic, it is&lt;br /&gt;
&lt;br /&gt;
Refit list = (cargos from prop. 28 filtered by prop. 32 AND NOT cargos from prop. 29) XOR cargos from prop. 1D&lt;br /&gt;
&lt;br /&gt;
This means, if a cargo type is in the list because it matches props 28/31 but not prop 29, having the respective bit set in prop. 1D will disable it again. Conversely, if the cargo type is not in the list, the bit in prop. 1D will add it. This way, if props. 28/29 are unset, prop. 1D will retain the original meaning, but it is still able to selectively add or remove certain cargo types even if props. 28/29 are used.&lt;br /&gt;
&lt;br /&gt;
As a consequence, you have both full control over the cargo types that you know of (using prop. 1D), and those you don&#039;t know of yet (using props. 28/29). Leave the bits for cargos that you don&#039;t know of unset in prop. 1D, and set/clear the bits for known cargos to add/remove them from the list as appropriate.&lt;br /&gt;
&lt;br /&gt;
{{ottd|1.2|r23291}} It is recommended to use properties 2C and 2D instead of property 1D, as property 1D behaves badly if the cargo classes of a cargo are ever changed.&lt;br /&gt;
&lt;br /&gt;
The class list is a bit mask. See the action0 cargos page for bits and classes defined so far.&lt;br /&gt;
&lt;br /&gt;
Take a look at [[Action0Cargos#Cargo classes 16|Action0 for cargos]] for the classes defined so far.&lt;br /&gt;
&lt;br /&gt;
Note that cargo types may belong to several classes. This is the reason for making three properties, an additive, a filter, and a subtractive one, because this way a vehicle can be specified to be refittable to, for example, all express cargo that does not require refrigeration (i.e., from the default cargos, no food).&lt;br /&gt;
For the cargo types added in this way, the vehicle will probably have no specific graphics (in [[Action3|action 3]]) to show the cargo load. &amp;amp;nbsp;In this case, the default will be used, which should therefore be sufficiently generic-looking if possible. However, using [[VariationalAction2/Vehicles#Vehicle cargo info 47|vehicle variable 47]] you can at least select the graphics most appropriate for the cargo type&#039;s class.&lt;br /&gt;
About the interaction with other properties take a look at the summary page about [[VehicleRefitting|vehicle refitting]].&lt;br /&gt;
&lt;br /&gt;
Disclaimer: there is no guarantee that classes won&#039;t vary over time or between sets. The classes of a cargo may change between different versions of a specific industry/cargo newgrf, or different classes may be set for the same cargo label by different industry/cargo newgrfs. Feel free to use classes in your set for conveniently refitting to cargos, but if you - the vehicle author - care about specific cargos being transported in specific vehicles, use label based refits (changing labels without a very good reason is considered to be bad practice).&lt;br /&gt;
&lt;br /&gt;
== Long format introduction date (2A) ==&lt;br /&gt;
&lt;br /&gt;
Set the vehicle introduction date, in days since the year 0. This takes account of leap years; dividable by 4, but not 100 unless 400. A start date of 1920-01-01 is obtained with a value of 701265 (51 B3 0A 00). This property must be set after property 00 to take effect.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|no|}} In TTDPatch, dates after 2044 will be limited to 2044.&lt;br /&gt;
&lt;br /&gt;
== Custom cargo ageing period (2B) ==&lt;br /&gt;
&lt;br /&gt;
This property allows to modify the period in ticks after which cargo carried by the vehicle is aged. By default, cargo is aged every 185 ticks. A value of 0 disables ageing of cargo. This property can be modified via [[Callbacks#Change_vehicle_properties_.2836.29|callback 36]].&lt;br /&gt;
&lt;br /&gt;
Changing this value from the default does not automatically make the vehicle earn more or less.  Predicting the effect is complicated, as it depends on many things, including: vehicle speed, route length, route delays, transfer credits, the payment curve set by the cargo, and whether the cargo is already aged from a previous transfer when the vehicle loads it.&lt;br /&gt;
&lt;br /&gt;
Authors are advised that tests show this property can lead to disappointment. Avoid, or use with caution.&lt;br /&gt;
&lt;br /&gt;
== List of always refittable cargo types (2C, 2D) ==&lt;br /&gt;
&lt;br /&gt;
These two properties allows to unconditionally include or exclude cargo types for refittability independent of any of the other refit properties or the cargo classes. If you specify a cargo type that is not available, the cargo type will be silently ignored.&lt;br /&gt;
&lt;br /&gt;
The format for both properties is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;2C/2D &amp;amp;lt;nvar&amp;amp;gt; (&amp;amp;lt;Index into cargo type table&amp;amp;gt;){n}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That is you give the number of cargos in a single byte followed by a list of that length of indexes into the cargo translation table ([[CargoTypes|Type A]]).&lt;br /&gt;
&lt;br /&gt;
== Maximum curve speed modifier (2E) ==&lt;br /&gt;
&lt;br /&gt;
This property allows to give vehicles a maximum curve speed modifier. The given value is treated as a signed word with 8 fractional bits. This property can be modified via [[Callbacks#Change_vehicle_properties_.2836.29|callback 36]].&lt;br /&gt;
&lt;br /&gt;
The modifier is applied after the normal curve speed calculation is done using the formula max_curve_speed * (1 + prop 2E). This means that the default property value of 0 is equivalent to no change. While values less than -1.0 are technically possible, the resulting vehicle curve speed is clamped at 2 mph-ish to make sure vehicles don&#039;t become permanently stuck.&lt;br /&gt;
&lt;br /&gt;
If different vehicles in a train have different curve speed modifiers, the lowest value wins.&lt;br /&gt;
&lt;br /&gt;
== Vehicle variant group (2F) ==&lt;br /&gt;
&lt;br /&gt;
This property supports grouping vehicles in the purchase menu (also the autoreplace menu). The property value is the ID of another vehicle in the same GRF which will act as the parent for vehicles in the group.&lt;br /&gt;
&lt;br /&gt;
Groups can also be nested (this is experimental as of December 2022 and may change with testing).&lt;br /&gt;
&lt;br /&gt;
See also [[Action0Trains#Extra flags (30)|vehicle extra flags]] which can influence the behaviour of vehicles in variant groups.&lt;br /&gt;
&lt;br /&gt;
See also https://github.com/OpenTTD/OpenTTD/pull/10220&lt;br /&gt;
&lt;br /&gt;
== Extra flags (30) ==&lt;br /&gt;
&lt;br /&gt;
This is a bit mask, with the following bits:&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!Bit!!	Value!!	Version !!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||	1||{{ottdp|13|no}}||	Disable &amp;quot;New Vehicle&amp;quot; news message for this engine&lt;br /&gt;
|-&lt;br /&gt;
|1||	2||{{ottdp|13|no}}||	Disable &amp;quot;Exclusive Preview&amp;quot; for this engine&lt;br /&gt;
|-&lt;br /&gt;
|2||	4||{{ottdp|13|no}}||	Variants - Include this variant when primary engine has &amp;quot;Exclusive Preview&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|3||	8||{{ottdp|13|no}}||	Variants - (Attempt to) Synchronize reliability the primary engine&lt;br /&gt;
|-&lt;br /&gt;
|4||   16||{{ottdp|16|no}}||	Train wagon has a cab and can lead a train when backing up, without any speed restriction&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Extra callback flags (31) ==&lt;br /&gt;
&lt;br /&gt;
See [[#Callbacks_.281E.2C_31.29]]&lt;br /&gt;
&lt;br /&gt;
== Track type list (34) ==&lt;br /&gt;
&lt;br /&gt;
List of track types for the vehicle. Data values are indices into the [[Action0Railtypes|rail type]] translation table.&lt;br /&gt;
&lt;br /&gt;
The vehicle will be available/run on all listed track types.&lt;br /&gt;
&lt;br /&gt;
Overwritten by prop 05.&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
&lt;br /&gt;
Below is an example of what a real Action 0 pseudo-sprite could look like for a train engine.&lt;br /&gt;
&lt;br /&gt;
(A basic version)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;10 * 14 &amp;amp;nbsp;00 00 03 01 02 09 C0 00 0B D8 0E 12 FD&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!&#039;&#039;&#039;Bytes&#039;&#039;&#039;!!&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|10||&amp;amp;lt;Sprite-number&amp;amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|14||&amp;amp;lt;Length&amp;amp;gt;: of the action in bytes; start counting at 0 (&amp;amp;lt;action&amp;amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|00||&amp;amp;lt;action&amp;amp;gt;: sets this pseudo-sprite to function as action 0&lt;br /&gt;
|-&lt;br /&gt;
|00||&amp;amp;lt;Feature&amp;amp;gt;: In this case Train&lt;br /&gt;
|-&lt;br /&gt;
|03||&amp;amp;lt;Num-props&amp;amp;gt;: 3 Properties to change&lt;br /&gt;
|-&lt;br /&gt;
|01||&amp;amp;lt;Num-info&amp;amp;gt;: 1 vehicle ID to make changes to&lt;br /&gt;
|-&lt;br /&gt;
|02||&amp;amp;lt;ids...&amp;amp;gt;: vehcile ID (02 - Ploddyphut Choo-Choo)&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;&#039;Properties&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|09||&amp;amp;lt;Speed&amp;amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|C0 00||&amp;amp;lt;Value&amp;amp;gt;: Value for Speed (192 Km/h)&lt;br /&gt;
|-&lt;br /&gt;
|0B||&amp;amp;lt;Power&amp;amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|D8 0E||&amp;amp;lt;value&amp;amp;gt;: value for Power (3800 HP)&lt;br /&gt;
|-&lt;br /&gt;
|12||&amp;amp;lt;Sprite ID&amp;amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|FD||&amp;amp;lt;value&amp;amp;gt;: FD for new graphics&lt;br /&gt;
|}&lt;br /&gt;
Since nfo version 7, so-called [[GRFActionsDetailed#Byte order|&amp;quot;escape sequences&amp;quot;]] have been introduced in an attempt to offer a more human-readable form.&lt;br /&gt;
&lt;br /&gt;
Below is the same example as above, with escape sequences being used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-1 * 0 00 00 \b3 01 \b*2 // \b&amp;amp;lt;number of props to change&amp;amp;gt; \b*&amp;amp;lt;vehicle ID&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;09 \w192 // value for speed (192 Km/h)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;0B \w3800 // value for power (3800 hp)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;12 FD // use new graphics&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>2talltyler</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Main&amp;diff=4390</id>
		<title>NML:Main</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Main&amp;diff=4390"/>
		<updated>2023-03-11T17:47:48Z</updated>

		<summary type="html">&lt;p&gt;2talltyler: Add: Roadstop links to NML:Main&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right; padding-left:12px; background:none;&amp;quot;&amp;gt;{{NMLNavMain}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;[[NML:Preface |Preface]]&lt;br /&gt;
;[[NML:changes 0.3|Changes between NML 0.2 and head / 0.3]]&lt;br /&gt;
;[[NML:changes 0.4|Changes between NML 0.3 and head / 0.4]]&lt;br /&gt;
;[[NML:changes 0.5|Changes between NML 0.4 and head / 0.5]]&lt;br /&gt;
;[[NML:Getting started|Getting started]]&lt;br /&gt;
;[[NML:Graphic files|Graphics files]]&lt;br /&gt;
&lt;br /&gt;
;[[NML:Block syntax|Language structure and block syntax]]&lt;br /&gt;
*[[NML:GRF|GRF]] and its parameters&lt;br /&gt;
*[[NML:Item|Item]] (Properties, graphics, livery overrides)&lt;br /&gt;
&lt;br /&gt;
*;Defining sprites:&lt;br /&gt;
**[[NML:Realsprites|Realsprites]]&lt;br /&gt;
**[[NML:Template|Template]]&lt;br /&gt;
**[[NML:Base Graphics|Base Graphics]]&lt;br /&gt;
**[[NML:Spriteset|Spriteset]]&lt;br /&gt;
**;Replacing sprites:&lt;br /&gt;
***[[NML:Replace TTD sprites|Replace TTD sprites]]&lt;br /&gt;
***[[NML:Replace new sprites|Replace new sprites]]&lt;br /&gt;
***[[NML:Add font glyphs|Add font glyphs]]&lt;br /&gt;
***[[NML:Alternative sprites|Alternative sprites]] (32bpp, zoom levels)&lt;br /&gt;
**;Aranging and grouping sprites:&lt;br /&gt;
***[[NML:Spritegroup|Spritegroup]] (Vehicles, stations)&lt;br /&gt;
***[[NML:Spritelayout|Spritelayout]] (Houses, industries, airports, objects, stations)&lt;br /&gt;
***[[NML:Recolour sprites|Recolour sprites]]&lt;br /&gt;
&lt;br /&gt;
*;Flow control&lt;br /&gt;
**[[NML:Tilelayout|Tilelayout]]&lt;br /&gt;
**[[NML:Switch|Switch]]&lt;br /&gt;
**[[NML:Produce|Produce]]&lt;br /&gt;
**[[NML:Random switch|Random switch]]&lt;br /&gt;
&lt;br /&gt;
*;Global scope&lt;br /&gt;
**[[NML:Cargotable|Cargotable]]&lt;br /&gt;
**[[NML:Railtypetable|Railtypetable / Roadtypetable / Tramtypetable]]&lt;br /&gt;
**[[NML:Snow line|Snow line]]&lt;br /&gt;
**[[NML:Setting base costs|Setting base costs]]&lt;br /&gt;
**[[NML:Parameter assignment|Parameter assignment]]&lt;br /&gt;
**[[NML:If|If/else]]&lt;br /&gt;
**[[NML:While|While]]&lt;br /&gt;
&lt;br /&gt;
*;Interaction with other grfs&lt;br /&gt;
**[[NML:Error|Error]]&lt;br /&gt;
**[[NML:Disable items|Disable items]]&lt;br /&gt;
**[[NML:Deactivate other NewGRFs|Deactivate other NewGRFs]]&lt;br /&gt;
**[[NML:Testing for other NewGRFs|Testing for other NewGRFs]]&lt;br /&gt;
**[[NML:Overriding vehicles in other NewGRFs|Overriding vehicles in other NewGRFs]]&lt;br /&gt;
&lt;br /&gt;
*;Misc&lt;br /&gt;
**[[NML:Town names|Town names]]&lt;br /&gt;
**[[NML:Town names parts|Town names parts]]&lt;br /&gt;
**[[NML:Sorting vehicles in the purchase list|Sorting vehicles in the purchase list]]&lt;br /&gt;
&lt;br /&gt;
;[[NML:Units|Units]]&lt;br /&gt;
;[[NML:Expressions|Expressions]]&lt;br /&gt;
*[[NML:Elementary values|Elementary values]]&lt;br /&gt;
*[[NML:Builtin functions|Builtin functions]]&lt;br /&gt;
;[[NML:Language files|Language files]]&lt;br /&gt;
;[[NML:Properties and variables and callbacks|Lists of properties, variables and callbacks]]&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Type&lt;br /&gt;
!Properties&lt;br /&gt;
!Variables&lt;br /&gt;
!Callbacks&lt;br /&gt;
!Feature&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:General|General]] ||  || [[NML:General#General variables|variables]] || || FEAT_GLOBALVARS&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Vehicles|Vehicles]] || [[NML:Vehicles#Properties common to all vehicle types|common properties]] || [[NML:Vehicles#Vehicle variables|variables]] || [[NML:Vehicles#Vehicle callbacks|callbacks]] ||&lt;br /&gt;
|-&lt;br /&gt;
| || [[NML:Vehicles#Train properties|train properties]] || || || FEAT_TRAINS&lt;br /&gt;
|-&lt;br /&gt;
| || [[NML:Vehicles#Road vehicle properties|road vehicle properties]] || || || FEAT_ROADVEHS&lt;br /&gt;
|-&lt;br /&gt;
| || [[NML:Vehicles#Ship properties|ship properties]] || || || FEAT_SHIPS&lt;br /&gt;
|-&lt;br /&gt;
| || [[NML:Vehicles#Aircraft properties|aircraft properties]] || || || FEAT_AIRCRAFT&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Stations|Stations]] || [[NML:Stations#Station properties|properties]] || [[NML:Stations#Station variables|variables]] || [[NML:Stations#Station callbacks|callbacks]] || FEAT_STATIONS&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Canals|Canals]] || [[NML:Canals#Canal properties|properties]] || [[NML:Canals#Canal variables|variables]] || [[NML:Canals#Canal callbacks|callbacks]] || FEAT_CANALS&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Bridges|Bridges]] || [[NML:Bridges#Bridge properties|properties]] || [[NML:Bridges#Bridge variables|variables]] || [[NML:Bridges#Bridge callbacks|callbacks]] || FEAT_BRIDGES&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Towns|Towns]] || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Houses|Houses]] || [[NML:Houses#House properties|properties]] || [[NML:Houses#House variables|variables]] || [[NML:Houses#House callbacks|callbacks]] || FEAT_HOUSES&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Industries|Industries]]||  || [[NML:Industries#Common variables|common variables]] || ||&lt;br /&gt;
|-&lt;br /&gt;
| || [[NML:Industries#Industry properties|industry properties]] || [[NML:Industries#Industry variables|industry variables]] || [[NML:Industries#Industry callbacks|industry callbacks]] || FEAT_INDUSTRIES&lt;br /&gt;
|-&lt;br /&gt;
| || [[NML:IndustryTiles#Industry tile properties|tile properties]] || [[NML:IndustryTiles#Industry tile variables|tile variables]] || [[NML:IndustryTiles#Industry tile callbacks|tile callbacks]] || FEAT_INDUSTRYTILES&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Cargos|Cargos]] || [[NML:Cargos#Cargo properties|properties]] || [[NML:Cargos#Cargo variables|variables]] || [[NML:Cargos#Cargo callbacks|callbacks]] || FEAT_CARGOS&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Airports|Airports]] || [[NML:Airports#Airport properties|properties]] || [[NML:Airports#Airport variables|variables]] || [[NML:Airports#Airport callbacks|callbacks]] || FEAT_AIRPORTS&lt;br /&gt;
|-&lt;br /&gt;
| || [[NML:Airports#Airport tile properties|tile properties]] || [[NML:Airports#Airport tile variables|tile variables]] || [[NML:Airports#Airport tile callbacks|tile callbacks]] || FEAT_AIRPORTTILES&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Objects|Objects]] || [[NML:Objects#Object properties|properties]] || [[NML:Objects#Object variables|variables]] || [[NML:Objects#Object callbacks|callbacks]] || FEAT_OBJECTS&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Railtypes|Railtypes]] || [[NML:Railtypes#Railtype properties|properties]] || [[NML:Railtypes#Railtype variables|variables]] || [[NML:Railtypes#Railtype callbacks|callbacks]] || FEAT_RAILTYPES&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Roadtypes|Roadtypes]] || [[NML:Roadtypes#Roadtype properties|properties]] || [[NML:Roadtypes#Roadtype variables|variables]] || [[NML:Roadtypes#Roadtype callbacks|callbacks]] || FEAT_ROADTYPES&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Tramtypes|Tramtypes]] || [[NML:Tramtypes#Tramtype properties|properties]] || [[NML:Tramtypes#Tramtype variables|variables]] || [[NML:Tramtypes#Tramtype callbacks|callbacks]] || FEAT_TRAMTYPES&lt;br /&gt;
|- &lt;br /&gt;
|[[NML:Roadstops|Roadstops]] || [[NML:Roadstops#Roadstop properties|properties]] || [[NML:Roadstops#Roadstop variables|variables]] || [[NML:Roadstops#Roadstop callbacks|callbacks]] || FEAT_ROADSTOPS&lt;br /&gt;
|- &lt;br /&gt;
|Signals|| || || || FEAT_SIGNALS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;[[NML:Warnings|Compiler Warnings]]&lt;br /&gt;
;[[NML:Additional references|Additional references]]&lt;br /&gt;
*[[NML:Animation speed|Animation speed]]&lt;br /&gt;
*[[NML:Default industries|Default industries]]&lt;br /&gt;
*[[NML:Default industry tiles|Default industry tiles]]&lt;br /&gt;
*[[NML:Base cost table|Base cost table]]&lt;br /&gt;
*[[NML:List of sound effects|List of sound effects]]&lt;br /&gt;
*[[NML:List of default vehicle IDs|List of default vehicle IDs]]&lt;br /&gt;
*[[NML:List of default house properties|List of default house properties]]&lt;br /&gt;
*[[NML:List of town zones|List of town zones]]&lt;br /&gt;
*[[NML:List of tile classes|List of tile classes]]&lt;br /&gt;
*[[NML:List of default colour translation palettes|List of default colour translation palettes]]&lt;br /&gt;
*[[NML:List of direction constants|List of direction constants]]&lt;br /&gt;
*[[NML:List of tile slopes|List of tile slopes]]&lt;br /&gt;
*[[NML:List of tiles|List of tiles]]&lt;br /&gt;
*[[NML:Default TTD strings|Default TTD strings]]&lt;br /&gt;
*[[NML:Deprecated syntax|Deprecated syntax]]&lt;br /&gt;
;[[NML:NewGRF compatibility|NewGRF compatibility]]&lt;br /&gt;
;[[NML:Old style callbacks|Old-style callbacks]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[NML:Manual of style|Manual of style]]&lt;/div&gt;</summary>
		<author><name>2talltyler</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Objects&amp;diff=4168</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=4168"/>
		<updated>2022-02-21T19:09:54Z</updated>

		<summary type="html">&lt;p&gt;2talltyler: /* List of object flags */ Add: OBJ_FLAG_SCALE_BY_WATER&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
==Object IDs==&lt;br /&gt;
Object IDs are NewGRF-local and can therefore freely be chosen in the 0..255 range. An object is allocated by setting the &#039;class&#039;-property, which should therefore be set first. 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;t&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;
|-&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.&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;t&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;
|-&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;t&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;
| company_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;t&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;t&amp;quot;&lt;br /&gt;
! callback&lt;br /&gt;
! return value&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| default&lt;br /&gt;
| 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;
|-&lt;br /&gt;
| anim_control&lt;br /&gt;
| Next animation frame or CB_RESULT_XXX&lt;br /&gt;
|&lt;br /&gt;
Called whenever an object animation trigger happens. Return the animation frame to show, or CB_RESULT_XXX with XXX = [CB_RESULT_START_ANIMATION &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; STOP_ANIMATION &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; DO_NOTHING] to respectively start the animation in its current frame, stop the animation or do nothing. Returning a sound effect in the high byte will cause that sound effect to be played.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;extra_callback_info1&amp;lt;/code&amp;gt;: 32 random bits, if the object flag OBJ_FLAG_RANDOM_ANIMATION is set.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 8)&amp;lt;/code&amp;gt;: Reason for the callback trigger, see the [[#Animation triggers| table]] below.&lt;br /&gt;
|-&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;t&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>2talltyler</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=CargoTypes&amp;diff=4159</id>
		<title>CargoTypes</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=CargoTypes&amp;diff=4159"/>
		<updated>2022-01-14T23:05:25Z</updated>

		<summary type="html">&lt;p&gt;2talltyler: Add: Cargos used in 2TallTyler&amp;#039;s industry sets (Improved Town Industries, Industries of the Caribbean, Lumberjack Industries)&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 blindly 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;
== 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;8&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;
|&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;
|&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;
|&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;
|&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;
|&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;
|&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;
| 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;
| 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;
|&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;
| 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;
| 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;
| 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: #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;
| 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;
| 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;
| 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;
| 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;
| 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;
|&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;
| 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;
| 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;
| 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;
|&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;
| 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;
|&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;
|&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;
| 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;
| 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;
| 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: #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;
|&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;
|-&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;
|&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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
|&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;
| 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;
| 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;
|&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;
| 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;
| 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;
| 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;
| 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;
|&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;
|&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;
| 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;
| 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;
| 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;
| 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;
|&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;
| 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;
| 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;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| OTIS: renamed &amp;quot;Sewage&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;
|&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;
| 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;
| 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;
| 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;
|&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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
|&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;
| 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;
| 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;
| 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;
| 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;
|&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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
|-&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;
| 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;
| 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;
| 2TT Industries of the Caribbean: See also Nickel Ore NKOR&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;
|&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;
|&lt;br /&gt;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&lt;br /&gt;
| Industries of the Caribbean; also includes NICK Nickel for refined Nickel&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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
|&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;
| OTIS: 0220 Covered, piece goods, renamed &amp;quot;Electrical Machines&amp;quot;. XIS: 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;
|&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;
| 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;
| 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;
| 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;
| OTIS: 0230 Piece goods, bulk, covered/sheltered, renamed &amp;quot;Cotton&amp;quot;&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;
| 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;
| 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;
| 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;
| 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;
|&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;
| 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;
|&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;
| 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;
|&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;
|&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;
| 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;
| 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;
|-&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;
| 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;
|&lt;br /&gt;
| style=&amp;quot;background: #B4A7D6; color: white&amp;quot; | [[ttwiki:2TT|2TT]]&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;
| 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;
|&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;
|&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;
| 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;
| 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;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;
|&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;
| 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;
|&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;
| 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;
| 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;
| 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;
| 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;
| 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 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;
| 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>2talltyler</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Industries&amp;diff=4131</id>
		<title>NML:Industries</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Industries&amp;diff=4131"/>
		<updated>2021-06-07T20:07:37Z</updated>

		<summary type="html">&lt;p&gt;2talltyler: Add: Note about removing cargo waiting text.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavPropVarCB}}&lt;br /&gt;
&lt;br /&gt;
This page contains information on industry properties, variables and callbacks. [[NML:IndustryTiles|Industry tiles]] are closely related.&lt;br /&gt;
&lt;br /&gt;
== Industry ID allocation ==&lt;br /&gt;
Industry IDs are local to the NewGRF, you are free to choose any ID in the 0..127-range. You should start your item definition with the &#039;substitute&#039;-property, which allocates a new industry. The value of this property should be the ID of a [[IndustryDefaultProps|default industry]], 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 industry to be replaced with your item. You should use this if you are for example defining a coal mine which changes production more dynamically. If your type is not a direct replacement of an existing item, don&#039;t set this property.&lt;br /&gt;
&lt;br /&gt;
==Industry properties==&lt;br /&gt;
&lt;br /&gt;
Industry properties. Default industry type numbers can be found at [[NML:Default industries|default industries]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! property&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| substitute&lt;br /&gt;
| industry type&lt;br /&gt;
| Number of the original industry type that replaces this one, should it not be available for some reason (e.g. missing NewGRF). &#039;&#039;&#039;This property &#039;&#039;must&#039;&#039; be set first, before any other properties or graphics.&#039;&#039;&#039; All properties of the old type are copied to your new industry.&lt;br /&gt;
|-&lt;br /&gt;
| override&lt;br /&gt;
| industry type&lt;br /&gt;
| Number of the original industry type overridden. This will cause other grfs / industries to consider your industry type the same as the old type. Only set this property if your type is (more or less) the same as the old type.&lt;br /&gt;
|-&lt;br /&gt;
| layouts&lt;br /&gt;
| Array of tilelayouts&lt;br /&gt;
|&lt;br /&gt;
See [[NML:Tilelayout|Tilelayout]] syntax.&lt;br /&gt;
|-&lt;br /&gt;
| life_type&lt;br /&gt;
| One of IND_LIFE_TYPE_XXX, XXX = BLACK_HOLE &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; EXTRACTIVE &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; ORGANIC &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; PROCESSING&lt;br /&gt;
| The generic type of industry. This determines the production changes that occur by default (when not using the callback). Examples are respectively power plants, coal mines, forests en steel mills.&lt;br /&gt;
|-&lt;br /&gt;
| closure_msg&lt;br /&gt;
| string&lt;br /&gt;
|&lt;br /&gt;
Message displayed when the industry announces closure. Use a custom string or one of the [[NML:Default TTD strings|default TTD strings]].&lt;br /&gt;
|-&lt;br /&gt;
| prod_increase_msg&lt;br /&gt;
| string&lt;br /&gt;
|&lt;br /&gt;
Message displayed when industry increases production. Use a custom string or one of the [[NML:Default TTD strings|default TTD strings]].&lt;br /&gt;
|-&lt;br /&gt;
| prod_decrease_msg&lt;br /&gt;
| string&lt;br /&gt;
|&lt;br /&gt;
Message displayed when industry decreases production. Use a custom string or one of the [[NML:Default TTD strings|default TTD strings]].&lt;br /&gt;
|-&lt;br /&gt;
| fund_cost_multiplier&lt;br /&gt;
| 0..255&lt;br /&gt;
| Fund cost multiplier. Note that in OpenTTD the unmodified base cost is 8x higher for building (not prospecting) raw (=extractive / organic, see life_type) industries.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_types&lt;br /&gt;
| array of accept_cargo(input, outputs...) and produce_cargo(output, level) expressions&lt;br /&gt;
| {{nml|0.5}} {{ottd|1.9}} Types of cargo accepted and produced by the industry, and their production levels and production multipliers. See [[#Cargo_types_array|cargo types array]] below.&lt;br /&gt;
|-&lt;br /&gt;
| prod_cargo_types&lt;br /&gt;
| array of up to 2 ints&lt;br /&gt;
| {{nml|0.4}} Types of cargo produced. Use the cargotype(&amp;amp;lt;label&amp;amp;gt;) built-in function to specify a label from the cargotable. {{nml|0.5}} Removed, use cargo_types instead.&lt;br /&gt;
|-&lt;br /&gt;
| accept_cargo_types&lt;br /&gt;
| array of up to 3 ints&lt;br /&gt;
| {{nml|0.4}} Types of cargo accepted. Use the cargotype(&amp;amp;lt;label&amp;amp;gt;) built-in function to specify a label from the cargotable. {{nml|0.5}} Removed, use cargo_types instead.&lt;br /&gt;
|-&lt;br /&gt;
| prod_multiplier&lt;br /&gt;
| array of up to 2 ints (0..255)&lt;br /&gt;
| {{nml|0.4}} Amount of each output cargo to produce every 256 ticks (8 or 9 times a month) {{nml|0.5}} Removed, use cargo_types instead.&lt;br /&gt;
|-&lt;br /&gt;
| min_cargo_distr&lt;br /&gt;
| 0..255&lt;br /&gt;
| Minimal amount of cargo before transporting to stations.&lt;br /&gt;
|-&lt;br /&gt;
| random_sound_effects&lt;br /&gt;
| array of ints&lt;br /&gt;
| Sound effect numbers that are played some times.&lt;br /&gt;
|-&lt;br /&gt;
| conflicting_ind_types&lt;br /&gt;
| array of up to 3x industry_type(IND_TYPE_OLD &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; IND_TYPE_NEW, id)&lt;br /&gt;
|&lt;br /&gt;
Three industry types that should not be nearby. Use the [[NML:Builtin functions|builtin function]] &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;industry_type(..)&amp;lt;/code&amp;gt; to define either an old industry (using the global ID) or a new industry from your grf (using the grf-local ID).&lt;br /&gt;
|-&lt;br /&gt;
| prob_random&lt;br /&gt;
| 0..255&lt;br /&gt;
| (up to NML v5796-418, use prob_map_gen otherwise) Probability of occurring while generating initial industries. If the random game probability value is nonzero and IND_FLAG_DO_NOT_FORCE_INSTANCE_AT_MAP_GENERATION is not set, at least one instance of this type is guaranteed to appear on the map.&lt;br /&gt;
|-&lt;br /&gt;
| prob_map_gen&lt;br /&gt;
| 0..255&lt;br /&gt;
| (NML v5796-418 or newer) Probability of occurring while generating initial industries. If the random game probability value is nonzero and IND_FLAG_DO_NOT_FORCE_INSTANCE_AT_MAP_GENERATION is not set, at least one instance of this type is guaranteed to appear on the map.&lt;br /&gt;
|-&lt;br /&gt;
| prob_in_game&lt;br /&gt;
| 0..255&lt;br /&gt;
| Probability of occurring while creating industries during the game.&lt;br /&gt;
|-&lt;br /&gt;
| map_colour&lt;br /&gt;
| 0..255&lt;br /&gt;
|&lt;br /&gt;
Colour index from the [[NML:Graphic files|DOS palette]] to use on the minimap for this industry.&lt;br /&gt;
|-&lt;br /&gt;
| spec_flags&lt;br /&gt;
| bitmask(flags)&lt;br /&gt;
|&lt;br /&gt;
for flag values see [[#industry_special_flags|Industry special flags]]&lt;br /&gt;
|-&lt;br /&gt;
| new_ind_msg&lt;br /&gt;
| string&lt;br /&gt;
| Message displayed when industry gets built during game play.&lt;br /&gt;
|-&lt;br /&gt;
| input_multiplier_1&lt;br /&gt;
| array of up to 2 floats (0..255)&lt;br /&gt;
| {{nml|0.4}} Output cargo multiplication factors for getting a unit of the first accepted cargo. {{nml|0.5}} Removed, use cargo_types instead.&lt;br /&gt;
|-&lt;br /&gt;
| input_multiplier_2&lt;br /&gt;
| array of up to 2 floats (0..255)&lt;br /&gt;
| {{nml|0.4}} Output cargo multiplication factors for getting a unit of the second accepted cargo. {{nml|0.5}} Removed, use cargo_types instead.&lt;br /&gt;
|-&lt;br /&gt;
| input_multiplier_3&lt;br /&gt;
| array of up to 2 floats (0..255)&lt;br /&gt;
| {{nml|0.4}} Output cargo multiplication factors for getting a unit of the third accepted cargo. {{nml|0.5}} Removed, use cargo_types instead.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| string&lt;br /&gt;
|&lt;br /&gt;
Name of the industry, use a custom string or one of the [[NML:Default TTD strings|default TTD strings]].&lt;br /&gt;
|-&lt;br /&gt;
| prospect_chance&lt;br /&gt;
| 0 .. 1 (float)&lt;br /&gt;
| Chance of successful prospecting.&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;
| remove_cost_multiplier&lt;br /&gt;
| int&lt;br /&gt;
| Cost multiplier for removing the industry (currently only possible with magic bulldozer).&lt;br /&gt;
|-&lt;br /&gt;
| nearby_station_name&lt;br /&gt;
| string&lt;br /&gt;
| Default additional name for a nearby station&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Cargo types array===&lt;br /&gt;
The &#039;&#039;cargo_types&#039;&#039; property takes an array of accept_cargo and produce_cargo expressions. This array is used to define which cargo types the industry accepts, which it produces, and how much cargo is produced on production ticks and on delivery. All cargo types the industry handles must be mentioned in its &#039;&#039;cargo_types&#039;&#039; property even when they are handled by production callbacks.&lt;br /&gt;
&lt;br /&gt;
The following is an example of a &#039;&#039;cargo_types&#039;&#039; property:&lt;br /&gt;
&lt;br /&gt;
 cargo_types: [&lt;br /&gt;
   produce_cargo(&amp;quot;GOOD&amp;quot;, 4),&lt;br /&gt;
   accept_cargo(&amp;quot;PASS&amp;quot;),&lt;br /&gt;
   produce_cargo(&amp;quot;PASS&amp;quot;, 0),&lt;br /&gt;
   accept_cargo(&amp;quot;IORE&amp;quot;, produce_cargo(&amp;quot;STEL&amp;quot;, 1), produce_cargo(&amp;quot;SLAG&amp;quot;, 0.25))&lt;br /&gt;
 ]&lt;br /&gt;
&lt;br /&gt;
The above example has four items in its &#039;&#039;cargo_types&#039;&#039; array, two produce_cargo expressions and two accept_cargo expressions.&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;produce_cargo(&amp;quot;GOOD&amp;quot;, 4)&amp;lt;/code&amp;gt; specifies the industry produces GOOD at a rate of 4 every production tick (256 game ticks), this production rate is scaled by the industry&#039;s production level.&lt;br /&gt;
# &amp;lt;code&amp;gt;accept_cargo(&amp;quot;PASS&amp;quot;)&amp;lt;/code&amp;gt; specifies the industry accepts PASS as a &amp;quot;black hole&amp;quot;, that is no cargo is produced when PASS is delivered. If you have a production callback that consumes a cargo you will also need to specify that cargo in this way.&lt;br /&gt;
# &amp;lt;code&amp;gt;produce_cargo(&amp;quot;PASS&amp;quot;, 0)&amp;lt;/code&amp;gt; specifies the industry produces PASS but not on the production ticks as usual. Specifying a production rate of zero is only useful for cargo types you produce via a production callback.&lt;br /&gt;
# &amp;lt;code&amp;gt;accept_cargo(&amp;quot;IORE&amp;quot;, produce_cargo(...), ...)&amp;lt;/code&amp;gt; specifies the industry produces the listed cargo types every time IORE is delivered. In the example above, delivering one IORE will result in one STEL produced and no SLAG produced (because 1*0.25 is zero after rounding down), and delivering 4 IORE will result in 4 STEL and 1 SLAG produced.&lt;br /&gt;
&lt;br /&gt;
At most 16 different cargo labels may appear in accept_cargo and at most 16 different cargo labels in produce_cargo, for a single industry. The same cargo label can be used in as many accept_cargo or produce_cargo as necessary.&lt;br /&gt;
&lt;br /&gt;
More complex production rules can be set up via the production callbacks, see [[#Industry_callbacks|callbacks]] below.&lt;br /&gt;
&lt;br /&gt;
===Industry special flags===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! flag&lt;br /&gt;
! meaning&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_PLANT_FIELDS_PERIODICALLY&lt;br /&gt;
| The industry periodically plants fields around itself (temperate and arctic farms)&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_CUT_TREES&lt;br /&gt;
| The industry cuts trees around itself and produces its first output cargo from them (lumber mill)&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_BUILT_ON_WATER&lt;br /&gt;
| The industry is built on water (oil rig)&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_ONLY_IN_LARGE_TOWNS&lt;br /&gt;
| The industry can only be built in towns (i.e. it has to replace houses) with population larger than 1200 (temperate bank)&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_ONLY_IN_TOWNS&lt;br /&gt;
| The industry can only be built in towns (i.e. it has to replace houses) (arctic and tropic banks, water tower)&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_BUILT_NEAR_TOWN&lt;br /&gt;
| The industry is always built near towns (i.e. near town sign; additionally the industry is allowed to replace houses) (toy shop)&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_PLANT_FIELDS_WHEN_BUILT&lt;br /&gt;
| Fields are planted around the industry when it&#039;s built (all farms)&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_NO_PRODUCTION_INCREASE&lt;br /&gt;
| The industry cannot increase its production on the temperate climate (oil wells)&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_BUILT_ONLY_BEFORE_1950&lt;br /&gt;
| The industry is built only before 1950 (oil wells)&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_BUILT_ONLY_AFTER_1960&lt;br /&gt;
| The industry is built only after 1960 (oil rig)&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_AI_CREATES_AIR_AND_SHIP_ROUTES&lt;br /&gt;
| AI players will attempt to establish air and ship routes going to this industry (oil rig)&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_MILITARY_AIRPLANE_CAN_EXPLODE&lt;br /&gt;
| The industry can be exploded by a military airplane (oil refinery)&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_MILITARY_HELICOPTER_CAN_EXPLODE&lt;br /&gt;
| The industry can be exploded by a military helicopter (factory)&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_CAN_CAUSE_SUBSIDENCE&lt;br /&gt;
| The industry can cause a subsidence (coal mine)&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_AUTOMATIC_PRODUCTION_MULTIPLIER&lt;br /&gt;
| Automatic production multiplier handing (No industry has this bit set by default.).&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_RANDOM_BITS_IN_PRODUCTION_CALLBACK&lt;br /&gt;
| The production callback needs random bits in var. 10 (No industry has this bit set by default.)&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_DO_NOT_FORCE_INSTANCE_AT_MAP_GENERATION&lt;br /&gt;
| Do not force one instance of this type to appear during initial map generation (No industry has this bit set by default.)&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_ALLOW_CLOSING_LAST_INSTANCE&lt;br /&gt;
| Allow closing down the last instance of this type (No industry has this bit set by default.)&lt;br /&gt;
|-&lt;br /&gt;
| IND_FLAG_LONG_CARGO_TYPE_LISTS&lt;br /&gt;
| New format for callbacks &amp;lt;code&amp;gt;callbacks cargo_subtype_display&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cargo_input&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt; cargo_output&amp;lt;/code&amp;gt; to support more input/output cargos. See the callbacks for details.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{NML:IndustryCommonVariables}}&lt;br /&gt;
&lt;br /&gt;
==Industry variables==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| production_level&lt;br /&gt;
| 0, or 4 .. 128&lt;br /&gt;
| Current production level of the industry. Usually in range 4 .. 128, default starting level is 16. A level of 0 indicates imminent closure.&lt;br /&gt;
|-&lt;br /&gt;
| waiting_cargo_1&lt;br /&gt;
| 0..65535&lt;br /&gt;
| If any of the production callbacks is enabled, this variable will contain the amount of the first cargo type awaiting to be processed. {{nml|0.5}} Removed.  Use &amp;lt;code&amp;gt;incoming_cargo_waiting&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| waiting_cargo_2&lt;br /&gt;
| 0..65535&lt;br /&gt;
| If any of the production callbacks is enabled, this variable will contain the amount of the second cargo type awaiting to be processed. {{nml|0.5}} Removed.  Use &amp;lt;code&amp;gt;incoming_cargo_waiting&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| waiting_cargo_3&lt;br /&gt;
| 0..65535&lt;br /&gt;
| If any of the production callbacks is enabled, this variable will contain the amount of the third cargo type awaiting to be processed. {{nml|0.5}} Removed.  Use &amp;lt;code&amp;gt;incoming_cargo_waiting&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| produced_cargo_waiting_1 &lt;br /&gt;
| 0..65535&lt;br /&gt;
| The amount of produced &#039;output cargo type 1&#039; that this waiting to be transported. {{nml|0.5}} Removed. Use &amp;lt;code&amp;gt;produced_cargo_waiting&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| produced_cargo_waiting_2&lt;br /&gt;
| 0..65535&lt;br /&gt;
| The amount of produced &#039;output cargo type 2&#039; that this waiting to be transported. {{nml|0.5}} Removed. Use &amp;lt;code&amp;gt;produced_cargo_waiting&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| produced_this_month_1&lt;br /&gt;
| 0..65535&lt;br /&gt;
| The amount of &#039;output cargo type 1&#039; that was produced this month. {{nml|0.5}} Removed.  Use &amp;lt;code&amp;gt;this_month_production&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| produced_this_month_2&lt;br /&gt;
| 0..65535&lt;br /&gt;
| The amount of &#039;output cargo type 2&#039; that was produced this month. {{nml|0.5}} Removed.  Use &amp;lt;code&amp;gt;this_month_production&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| produced_last_month_1&lt;br /&gt;
| 0..65535&lt;br /&gt;
| The amount of &#039;output cargo type 1&#039; that was produced last month. {{nml|0.5}} Removed.  Use &amp;lt;code&amp;gt;last_month_production&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| produced_last_month_2&lt;br /&gt;
| 0..65535&lt;br /&gt;
| The amount of &#039;output cargo type 2&#039; that was produced last month. {{nml|0.5}} Removed.  Use &amp;lt;code&amp;gt;last_month_production&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| transported_this_month_1&lt;br /&gt;
| 0..65535&lt;br /&gt;
| The amount of &#039;output cargo type 1&#039; that was transported this month. {{nml|0.5}} Removed.  Use &amp;lt;code&amp;gt;this_month_transported&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| transported_this_month_2&lt;br /&gt;
| 0..65535&lt;br /&gt;
| The amount of &#039;output cargo type 2&#039; that was transported this month. {{nml|0.5}} Removed.  Use &amp;lt;code&amp;gt;this_month_transported&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| transported_last_month_1&lt;br /&gt;
| 0..65535&lt;br /&gt;
| The amount of &#039;output cargo type 1&#039; that was produced last month. {{nml|0.5}} Removed.  Use &amp;lt;code&amp;gt;last_month_transported&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| transported_last_month_2&lt;br /&gt;
| 0..65535&lt;br /&gt;
| The amount of &#039;output cargo type 2&#039; that was produced last month. {{nml|0.5}} Removed.   Use &amp;lt;code&amp;gt;last_month_transported&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| transported_last_month_pct_1&lt;br /&gt;
| 0..100&lt;br /&gt;
| Percentage of produced &#039;output cargo type 1&#039; that was transported last month. {{nml|0.5}} Removed.  Use &amp;lt;code&amp;gt;transported_last_month_pct&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| transported_last_month_pct_2&lt;br /&gt;
| 0..100&lt;br /&gt;
| Percentage of produced &#039;output cargo type 2&#039; that was transported last month.  {{nml|0.5}} Removed.  Use &amp;lt;code&amp;gt;transported_last_month_pct&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| production_rate_1&lt;br /&gt;
| 0..255&lt;br /&gt;
| {{nml|0.3}} Amount of &#039;output cargo type 1&#039; that is produced every 256 ticks. Initial value from the &amp;lt;code&amp;gt;prod_multiplier&amp;lt;/code&amp;gt;-property, but it will change accordingly when the production level changes.  {{nml|0.5}} Removed.  Use &amp;lt;code&amp;gt;production_rate&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| production_rate_2&lt;br /&gt;
| 0..255&lt;br /&gt;
| {{nml|0.3}} Amount of &#039;output cargo type 2&#039; that is produced every 256 ticks. Initial value from the &amp;lt;code&amp;gt;prod_multiplier&amp;lt;/code&amp;gt;-property, but it will change accordingly when the production level changes.  {{nml|0.5}} Removed.  Use &amp;lt;code&amp;gt;production_rate&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| water_distance&lt;br /&gt;
| Distance to the tile&lt;br /&gt;
| If the industry is built on water, this variable gives the distance of the closest dry land tile, otherwise it gives the distance of the closest water tile.&lt;br /&gt;
|-&lt;br /&gt;
| layout_num&lt;br /&gt;
| 1..255&lt;br /&gt;
| Number of the layout being used by the industry.&lt;br /&gt;
|-&lt;br /&gt;
| founder&lt;br /&gt;
| 0..16&lt;br /&gt;
| Company number of the industry founder. It will be FOUNDER_GAME (=16) if the industry was generated randomly. TTDPatch only supports up to 8 companies (0..7).&lt;br /&gt;
|-&lt;br /&gt;
| founder_type&lt;br /&gt;
| PLAYERTYPE_XX&lt;br /&gt;
| PLAYERTYPE_HUMAN, PLAYERTYPE_AI, PLAYERTYPE_HUMAN_IN_AI (human managing AI company) or PLAYERTYPE_AI_IN_HUMAN (AI managing human company). 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;
| founder_colour1&lt;br /&gt;
| COLOUR_XXX&lt;br /&gt;
|&lt;br /&gt;
Index of founding company&#039;s first colour. 0 if not founded by a company. 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;
| founder_colour2&lt;br /&gt;
| COLOUR_XXX&lt;br /&gt;
|&lt;br /&gt;
Index of founding company&#039;s second colour. It&#039;s the same as company_colour1, if no second company colour is chosen. 0 if not founded by a company. 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;
| colour&lt;br /&gt;
| COLOUR_XXX&lt;br /&gt;
|&lt;br /&gt;
Random colour for this industry. 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;
| build_date&lt;br /&gt;
| 0..1826212865&lt;br /&gt;
| Date of the industry foundation in days since year 0.&lt;br /&gt;
|-&lt;br /&gt;
| build_type&lt;br /&gt;
| BUILDTYPE_XX&lt;br /&gt;
| BUILDTYPE_UNKNOWN (if created in an old version or with newindustries disabled), BUILDTYPE_GAMEPLAY (if founded or created by the in-game random industry generator), BUILDTYPE_GENERATION (if created during random map generation) or BUILDTYPE_EDITOR (if created with the scenario editor).&lt;br /&gt;
|-&lt;br /&gt;
| counter&lt;br /&gt;
| 0..65535&lt;br /&gt;
| Decremented every tick, used to time primary industry production in TTD.&lt;br /&gt;
|-&lt;br /&gt;
| last_accept_date&lt;br /&gt;
| date(year, month, day)&lt;br /&gt;
| Date when cargo was accepted for the last time. Not valid before 1920 and after 2090.&lt;br /&gt;
|-&lt;br /&gt;
| random_bits&lt;br /&gt;
| 0 ... 65535&lt;br /&gt;
| Random data that can be used to randomize certain descisions. (see [[NML:Random_switch|Random switch]]) (NML r1666)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt; Variables that require some parameters.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! arguments&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| industry_count&lt;br /&gt;
| industry_type, grfid = -1&lt;br /&gt;
|&lt;br /&gt;
The value of this variable is the number of industries of a given type that are currently on the map. industry_type is either the ID of an industry. GRFid is the grf in which the industry was defined. The default value is -1, which means current newgrf. A grfid of 0 lets you check the number of default industries of a given type. 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.&amp;lt;br /&amp;gt;&#039;&#039;Warning: using this variable trashes the contents of temporary storage register 0x100&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| industry_distance&lt;br /&gt;
| industry_type, grfid = -1&lt;br /&gt;
| The value of this variable is the manhattan distance the closest instance of the given industry or 0xFFFF if not applicable. See industry_count for a description of the parameters.&amp;lt;br /&amp;gt;&#039;&#039;Warning: using this variable trashes the contents of temporary storage register 0x100.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| industry_layout_count / industry_layout_distance&lt;br /&gt;
| industry_type, layout, grfid = -1.&lt;br /&gt;
| See industry_count / industry_distance for description of industry_type, grfid and return value. The results are filtered to industries that have the given layout number.&amp;lt;br /&amp;gt;&#039;&#039;Warning: using this variable trashes the contents of temporary storage registers 0x100 and 0x101.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| industry_town_count&lt;br /&gt;
| industry_type, grfid = -1.&lt;br /&gt;
| See industry_count / industry_distance for description of industry_type, grfid and return value. The results are filtered to industries that have the same town than the current industry.&amp;lt;br /&amp;gt;&#039;&#039;Warning: using this variable trashes the contents of temporary storage registers 0x100 and 0x101.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| town_manhattan_dist&lt;br /&gt;
| x, y&lt;br /&gt;
| Parameters indicate a signed offset relative to the northern tile. Returns the Manhattan distance (dx + dy) from the selected tile to the closest town&lt;br /&gt;
|-&lt;br /&gt;
| town_euclidean_dist&lt;br /&gt;
| x, y&lt;br /&gt;
| Parameters indicate a signed offset relative to the northern tile. Returns the squared Eucleidean distance (dx^2 + dy^2) from the selected tile to the closest town.&lt;br /&gt;
|-&lt;br /&gt;
| town_zone&lt;br /&gt;
| x, y&lt;br /&gt;
|&lt;br /&gt;
Parameters indicate a signed offset relative to the northern tile. Returns the [[NML:List of town zones|town zone]] that the selected tile is in.&lt;br /&gt;
|-&lt;br /&gt;
| nearby_tile_random_bits&lt;br /&gt;
| x, y&lt;br /&gt;
| Parameters indicate an unsigned offset relative to the northern tile. Returns the random bits of the selected industry tile, or 0 if it is not an industry tile that&#039;s part of this industry.&lt;br /&gt;
|-&lt;br /&gt;
| incoming_cargo_waiting&lt;br /&gt;
| cargo label from the cargotable&lt;br /&gt;
| {{nml|0.5}} If any of the production callbacks is enabled, this variable will contain the amount of the cargo type waiting to be processed.  Returns 0..65535.  Example: &amp;lt;code&amp;gt;incoming_cargo_waiting(&amp;quot;FOOD&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| produced_cargo_waiting&lt;br /&gt;
| cargo label from the cargotable&lt;br /&gt;
| {{nml|0.5}} For the given cargo label, the amount of produced cargo that this waiting to be transported.  Returns 0..65535.  Example: &amp;lt;code&amp;gt;produced_cargo_waiting(&amp;quot;GOOD&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| this_month_production&lt;br /&gt;
| cargo label from the cargotable&lt;br /&gt;
| {{nml|0.5}} For the given cargo label, amount of cargo that was produced this month.  Returns 0..65535.  Example: &amp;lt;code&amp;gt;this_month_production(&amp;quot;COAL&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| last_month_production&lt;br /&gt;
| cargo label from the cargotable&lt;br /&gt;
| {{nml|0.5}} For the given cargo label, amount of cargo that was produced last month.  Returns 0..65535.  Example: &amp;lt;code&amp;gt;last_month_production(&amp;quot;WOOD&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| this_month_transported&lt;br /&gt;
| cargo label from the cargotable&lt;br /&gt;
| {{nml|0.5}} For the given cargo label, amount of produced cargo that was transported this month.  Returns 0..65535.  Example: &amp;lt;code&amp;gt;this_month_transported(&amp;quot;IORE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| last_month_transported&lt;br /&gt;
| cargo label from the cargotable&lt;br /&gt;
| {{nml|0.5}} For the given cargo label, amount of produced cargo that was transported last month.  Returns 0..65535.  Example: &amp;lt;code&amp;gt;last_month_transported(&amp;quot;PAPR&amp;quot;)&amp;lt;/code&amp;gt;. &lt;br /&gt;
|-&lt;br /&gt;
| transported_last_month_pct&lt;br /&gt;
| cargo label from the cargotable&lt;br /&gt;
| {{nml|0.5}} For the given cargo label, percentage of produced cargo that was transported last month.  Returns 0..100.  Example: &amp;lt;code&amp;gt;transported_last_month_pct(&amp;quot;BATT&amp;quot;)&amp;lt;/code&amp;gt;. &lt;br /&gt;
|-&lt;br /&gt;
| production_rate&lt;br /&gt;
| cargo label from the cargotable&lt;br /&gt;
| {{nml|0.5}} For the given cargo label, amount of output cargo that is produced every 256 ticks. Initial value from the &amp;lt;code&amp;gt;cargo_types&amp;lt;/code&amp;gt; property, but it will change accordingly when the production level changes.  Returns 0..255.  Example: &amp;lt;code&amp;gt;production_rate(&amp;quot;SUGR&amp;quot;)&amp;lt;/code&amp;gt;. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Industry callbacks==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&amp;quot;&lt;br /&gt;
! callback&lt;br /&gt;
! return value&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| default&lt;br /&gt;
| varies&lt;br /&gt;
| Any unhandled callbacks. Generally this doesn&#039;t need to be used, except for old-style callbacks.&lt;br /&gt;
|-&lt;br /&gt;
| produce_cargo_arrival&lt;br /&gt;
| [[NML:Produce|Produce-block]]&lt;br /&gt;
| Called to produce cargo when it arrives.&lt;br /&gt;
|-&lt;br /&gt;
| produce_256_ticks&lt;br /&gt;
| [[NML:Produce|Produce-block]]&lt;br /&gt;
| Called to produce cargo every 256 ticks.&lt;br /&gt;
|-&lt;br /&gt;
| availability&lt;br /&gt;
| CB_RESULT_IND_ALLOW or CB_RESULT_IND_DISALLOW&lt;br /&gt;
|&lt;br /&gt;
{{nml|0.2}} Only available in NML 0.2 or earlier. Called when the game needs to know if the industry type is available. It is limited to the type as a whole, so you can&#039;t access industry-specific variables. &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;extra_callback_info2&amp;lt;/code&amp;gt; contains the [[#Industry creation types|creation type]].&lt;br /&gt;
|-&lt;br /&gt;
| construction_probability&lt;br /&gt;
| CB_RESULT_IND_NO_CONSTRUCTION, CB_RESULT_IND_PROBABILITY_FROM_PROPERTY or a relative probability 0..255&lt;br /&gt;
|&lt;br /&gt;
{{nml|0.3}}. Called when the game needs to know if the industry type is available. It is limited to the type as a whole, so you can&#039;t access industry-specific variables.&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 [[#Industry creation types|creation type]].&lt;br /&gt;
If you return CB_RESULT_IND_NO_CONSTRUCTION or 0 the industry won&#039;t be build. If you return CB_RESULT_IND_PROBABILITY_FROM_PROPERTY it&#039;ll be build according to the relative probability as defined in the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;prob_random&amp;lt;/code&amp;gt; or &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;prob_in_game&amp;lt;/code&amp;gt; properties, otherwise it&#039;ll use the value as returned as relative probability.&lt;br /&gt;
|-&lt;br /&gt;
| location_check&lt;br /&gt;
|&lt;br /&gt;
See the [[#Location check results|table]] below.&lt;br /&gt;
|&lt;br /&gt;
Called to check if a location is suitable.&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 [[#Industry creation types|creation type]].&lt;br /&gt;
Since the industry isn&#039;t built yet, industry variables aren&#039;t available. If this callback is not implemented or fails, constructing the industry will be allowed. Construction might also be prevented via the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;tile_check&amp;lt;/code&amp;gt; industry tile callback, though.&lt;br /&gt;
|-&lt;br /&gt;
| monthly_prod_change&lt;br /&gt;
|&lt;br /&gt;
See [[#Production change callback results|below]]&lt;br /&gt;
| Called each month to (possibly) change the industry production.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;extra_callback_info2&amp;lt;/code&amp;gt;: 32 random bits.&lt;br /&gt;
|-&lt;br /&gt;
| random_prod_change&lt;br /&gt;
|&lt;br /&gt;
See [[#Production change callback results|below]]&lt;br /&gt;
| Works exactly the same as &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;monthly_prod_change&amp;lt;/code&amp;gt;, except that it&#039;s only called when TTD selects this industry for a random production change.&lt;br /&gt;
|-&lt;br /&gt;
| build_prod_change&lt;br /&gt;
| Value in range 4-128&lt;br /&gt;
| {{ottd|1.3|r24186}} Called when an industry is constructed.  Return value is production level (default 16).  Can also be used to initialise permanent storage when an industry is constructed.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_subtype_display&lt;br /&gt;
| String or CB_RESULT_NO_TEXT&lt;br /&gt;
| This callback allows displaying some text after a cargo name. Returning CB_RESULT_NO_TEXT displays nothing.&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;: 0 .. 2 to get texts for the first .. third accepted cargo type, and 3 .. 4 for the first ... second produced cargo type.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 8, 8)&amp;lt;/code&amp;gt;: 0 when getting a string for the buy menu (no industry variables available!), 1 when for the industry window and 2 for the industry directory window.&lt;br /&gt;
Note: To remove cargo waiting text, return &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;0x3800 + string(STR_EMPTY)&amp;lt;/code&amp;gt; where STR_EMPTY is an empty string in your lang file.&lt;br /&gt;
|-&lt;br /&gt;
| extra_text_industry&lt;br /&gt;
| String&lt;br /&gt;
| Show extra text in the industry window.&lt;br /&gt;
|-&lt;br /&gt;
| extra_text_fund&lt;br /&gt;
| String&lt;br /&gt;
| Show extra text in the fund window. Since the industry isn&#039;t built, no industry variables are available.&lt;br /&gt;
|-&lt;br /&gt;
| control_special&lt;br /&gt;
| 0 or 1&lt;br /&gt;
| Called to control various effects from the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;spec_flags&amp;lt;/code&amp;gt; property. Currently only works for the first two (plant fields / cut trees). Return 1 to execute the action or 0 to not do so.&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;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info2, 0, 8)&amp;lt;/code&amp;gt;: Queried effect.&lt;br /&gt;
The default (if the flag is enabled, of course) is to plant fields with 1/8th chance every 256 ticks, and to cut trees every 512 ticks.&lt;br /&gt;
|-&lt;br /&gt;
| stop_accept_cargo&lt;br /&gt;
| 0 or 1&lt;br /&gt;
| With this callback, you can temporarily refuse accepting a certain cargo, for example because the stockpile is full. Return 1 to accept or 0 to refuse. Make sure to synchronize this callback with the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;cargo_amount_accept&amp;lt;/code&amp;gt; callback for industry 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; The cargo type to accept or not.&lt;br /&gt;
|-&lt;br /&gt;
| colour&lt;br /&gt;
| COLOUR_XXX&lt;br /&gt;
| Called after constructing the industry. The &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;colour&amp;lt;/code&amp;gt; variable is set to a random value at this point, you can use this callback to change this.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_input&lt;br /&gt;
| Cargo type, or 0xFF&lt;br /&gt;
| Decide the input cargo types. Called repeatedly until 0xFF is returned, although currently not more than three times. Do not rely on this limitation, though.&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;: Starts at 0 and is incremented for every iteration.&lt;br /&gt;
Return a cargo type (from the table) or 0xFF to stop.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_output&lt;br /&gt;
| Cargo type, or 0xFF&lt;br /&gt;
| Same as &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;cargo_input&amp;lt;/code&amp;gt; above, except that it is applied to the output cargo types and currently not called more than twice.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{NML:LocationCheckResults}}&lt;br /&gt;
&lt;br /&gt;
===Production change callback results===&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;
| CB_RESULT_IND_PROD_NO_CHANGE&lt;br /&gt;
| Do not change industry production&lt;br /&gt;
|-&lt;br /&gt;
| CB_RESULT_IND_PROD_HALF&lt;br /&gt;
| Half industry production. If production goes below a quarter of default, the industry closes.&lt;br /&gt;
|-&lt;br /&gt;
| CB_RESULT_IND_PROD_DOUBLE&lt;br /&gt;
| Double production if it&#039;s not 8x default yet.&lt;br /&gt;
|-&lt;br /&gt;
| CB_RESULT_IND_PROD_CLOSE&lt;br /&gt;
| Announce closure and remove the industry next month.&lt;br /&gt;
|-&lt;br /&gt;
| CB_RESULT_IND_PROD_RANDOM&lt;br /&gt;
| Do a random production change, as if the industry is a primary one.&lt;br /&gt;
|-&lt;br /&gt;
| CB_RESULT_IND_PROD_DIVIDE_BY_4&lt;br /&gt;
| Divide production by 4&lt;br /&gt;
|-&lt;br /&gt;
| CB_RESULT_IND_PROD_DIVIDE_BY_8&lt;br /&gt;
| Divide production by 8&lt;br /&gt;
|-&lt;br /&gt;
| CB_RESULT_IND_PROD_DIVIDE_BY_16&lt;br /&gt;
| Divide production by 16&lt;br /&gt;
|-&lt;br /&gt;
| CB_RESULT_IND_PROD_DIVIDE_BY_32&lt;br /&gt;
| Divide production by 32&lt;br /&gt;
|-&lt;br /&gt;
| CB_RESULT_IND_PROD_MULTIPLY_BY_4&lt;br /&gt;
| Multiply production by 4&lt;br /&gt;
|-&lt;br /&gt;
| CB_RESULT_IND_PROD_MULTIPLY_BY_8&lt;br /&gt;
| Multiply production by 8&lt;br /&gt;
|-&lt;br /&gt;
| CB_RESULT_IND_PROD_MULTIPLY_BY_16&lt;br /&gt;
| Multiply production by 16&lt;br /&gt;
|-&lt;br /&gt;
| CB_RESULT_IND_PROD_MULTIPLY_BY_32&lt;br /&gt;
| Multiply production by 32&lt;br /&gt;
|-&lt;br /&gt;
| CB_RESULT_IND_PROD_DECREMENT_BY_1&lt;br /&gt;
| Decrement production by 1&lt;br /&gt;
|-&lt;br /&gt;
| CB_RESULT_IND_PROD_INCREMENT_BY_1&lt;br /&gt;
| Increment production by 1&lt;br /&gt;
|-&lt;br /&gt;
| CB_RESULT_IND_PROD_SET_BY_0x100&lt;br /&gt;
| Set the production level to the value in bits 16 .. 23 of register 0x100.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Setting bit 7 of the result disables the associated news message.&amp;lt;br /&amp;gt; Setting bit 8 replaces the news message with a custom message, read from register 0x100 bits 0 .. 15.&lt;br /&gt;
&lt;br /&gt;
===Industry creation types===&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;
| IND_CREATION_GENERATION&lt;br /&gt;
| Industry is created during map generation, or when building &#039;many random industries&#039; in the scenario editor.&lt;br /&gt;
|-&lt;br /&gt;
| IND_CREATION_RANDOM&lt;br /&gt;
| Industry is randomly generated during gameplay&lt;br /&gt;
|-&lt;br /&gt;
| IND_CREATION_FUND&lt;br /&gt;
| Industry is funded by the player (in game or scenario editor)&lt;br /&gt;
|-&lt;br /&gt;
| IND_CREATION_PROSPECT&lt;br /&gt;
| Industry is prospected by the player&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>2talltyler</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Houses&amp;diff=4128</id>
		<title>NML:Houses</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Houses&amp;diff=4128"/>
		<updated>2021-05-27T18:49:19Z</updated>

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

		<summary type="html">&lt;p&gt;2talltyler: /* Properties common to all vehicle types */ Add note about cargo_age_period = 0, per https://newgrf-specs.tt-wiki.net/wiki/Action0/Vehicles/Trains#Custom_cargo_ageing_period_.282B.29&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;t&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.&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. When starting a new game, a random amount between 31 months and 17 years is added to the model life as well. &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&lt;br /&gt;
| stays constant at peak, 75-100%&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 10 to 20.5 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;t&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)&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 (for vehicles shorter than 8/8, see [[Action0/Vehicles/Trains#cite_note-6|this note about sprite offsets]]&lt;br /&gt;
;TRAIN_FLAG_AUTOREFIT&lt;br /&gt;
:Allow autoreffitting. To enable autorefit, furthermore the [[#Vehicle callbacks|refit_cost]]-callback has to allow it, or else (if this callback is not implemented or fails) the &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;refit_cost&amp;lt;/code&amp;gt;-property (see below) must be set to 0.&lt;br /&gt;
;TRAIN_FLAG_NO_BREAKDOWN_SMOKE&lt;br /&gt;
:{{nml|0.3}} {{ottdp|1.3|no|ottdrev=r24124}} Disable breakdown smoke effect&lt;br /&gt;
;TRAIN_FLAG_SPRITE_STACK&lt;br /&gt;
:{{ottdp|1.7|no|ottdrev=r27668}} Enable [[NML:Vehicles#Composing_vehicles_from_multiple_sprites|composition from multiple sprites]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;refit_cost&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| yes&lt;br /&gt;
| in 50% units of the purchase price cost base&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;callback_flags&amp;lt;/code&amp;gt;&lt;br /&gt;
| bitmask(VEH_CBF_XXX, ...)&lt;br /&gt;
| yes&lt;br /&gt;
|&lt;br /&gt;
Do not set this, unless you use [[NML:Old style callbacks|old-style callbacks]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;track_type&amp;lt;/code&amp;gt;&lt;br /&gt;
| item from railtypetable&lt;br /&gt;
| must be the same as front&lt;br /&gt;
| Default railtype table: RAIL, MONO, MGLV. If you install a railtypetable yourself you&#039;ll always get the railtype you specified. If you want a vehicle to run on electric rail and you don&#039;t have a railtypetable, set &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;track_type&amp;lt;/code&amp;gt; to RAIL and make sure that you set &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;engine_class&amp;lt;/code&amp;gt; to &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;ENGINE_CLASS_ELECTRIC&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;ai_special_flag&amp;lt;/code&amp;gt;&lt;br /&gt;
| [&amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;AI_FLAG_PASSENGER&amp;lt;/code&amp;gt; &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;AI_FLAG_CARGO&amp;lt;/code&amp;gt;]&lt;br /&gt;
| no&lt;br /&gt;
| &lt;br /&gt;
;&amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;AI_FLAG_PASSENGER&amp;lt;/code&amp;gt;&lt;br /&gt;
:Tell computer players that it&#039;s an engine that should only be used for passenger service.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;power&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 65000 hp (float, power units)&lt;br /&gt;
| Set to 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;running_cost_base&amp;lt;/code&amp;gt;&lt;br /&gt;
| RUNNING_COST_XXX&lt;br /&gt;
| Set to RUNNING_COST_NONE&lt;br /&gt;
| &lt;br /&gt;
;RUNNING_COST_STEAM&lt;br /&gt;
;RUNNING_COST_DIESEL&lt;br /&gt;
;RUNNING_COST_ELECTRIC&lt;br /&gt;
;RUNNING_COST_ROADVEH&lt;br /&gt;
;RUNNING_COST_NONE&lt;br /&gt;
:no running costs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;dual_headed&amp;lt;/code&amp;gt;&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| Set to 0 for all parts of an articulated vehicle&lt;br /&gt;
| 1 = dual_headed, otherwise normal engine&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;default_cargo_type&amp;lt;/code&amp;gt;&lt;br /&gt;
| An identifier from the [[NML:Cargotable|cargo table]], or DEFAULT_CARGO_FIRST_REFITTABLE&lt;br /&gt;
| Yes&lt;br /&gt;
| If the vehicle is refittable to at least one cargo, but the chosen default cargo is not available or is set to DEFAULT_CARGO_FIRST_REFITTABLE, then the first refittable cargo is used. The first refittable is chosen according to the order in your [[NML:Cargotable|cargo table]]. If this property is set to a valid cargo but the vehicle cannot refit to any cargo type, then the vehicle will be able to carry only this cargo, but it cannot be refitted (like e.g. the default train wagons).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;cargo_capacity&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 .. 255&lt;br /&gt;
| yes&lt;br /&gt;
| By default, passenger capacity is 4x, and mail/goods capacity 2x larger than capacity for other cargoes. The capacity set here is used for the default (i.e. first refittable) cargo. Use the &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;cargo_capacity&amp;lt;/code&amp;gt; callback to avoid this effect.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;weight&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 .. 1279 ton (float, mass units)&lt;br /&gt;
| Set to 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;ai_engine_rank&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| no&lt;br /&gt;
| TTDPatch only: Higher values make the engine for the TTDPatch AI more attractive&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;engine_class&amp;lt;/code&amp;gt;&lt;br /&gt;
| ENGINE_CLASS_XXX&lt;br /&gt;
| no&lt;br /&gt;
| &lt;br /&gt;
Defines which livery colour settings apply to the vehicle.  It also sets the corresponding sound effect of the engine, and if visual_effect_and_powered is not set, the visual effect as well.&lt;br /&gt;
;ENGINE_CLASS_STEAM&lt;br /&gt;
;ENGINE_CLASS_DIESEL&lt;br /&gt;
;ENGINE_CLASS_ELECTRIC&lt;br /&gt;
;ENGINE_CLASS_MONORAIL&lt;br /&gt;
;ENGINE_CLASS_MAGLEV&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;extra_power_per_wagon&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 65000 hp (float, power units)&lt;br /&gt;
| Set to 0&lt;br /&gt;
| Only wagons with a livery override for this engine will add power&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;tractive_effort_coefficient&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 1 (float)&lt;br /&gt;
| Set to 0&lt;br /&gt;
| Fraction of the vehicle weight that is available as tractive effort. Tractive effort (in kN) is calculated as (TE coefficient) * 10 * weight (in tons), with 10 being an approximation of the acceleration of gravity (9.81 m/s). A good value for rail tracks is 0.3.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;air_drag_coefficient&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 1 (float)&lt;br /&gt;
| Set to 0&lt;br /&gt;
| Coefficient of the relative air drag, in arbitrary units. The default value is approximately (8 / max_speed), with max_speed in km/h, clamped to the range 0.004 .. 0.75.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;length&amp;lt;/code&amp;gt;&lt;br /&gt;
| 1 ... 8&lt;br /&gt;
| yes&lt;br /&gt;
| Length of the vehicle in arbitrary units. Use a value of 8 (equal to the predefined constant VEHICLE_LENGTH) for a full-length vehicle.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;visual_effect_and_powered&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;visual_effect_and_powered&amp;lt;/code&amp;gt; (VISUAL_EFFECT_XXX, offset, &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;ENABLE_WAGON_POWER&amp;lt;/code&amp;gt; or &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;DISABLE_WAGON_POWER&amp;lt;/code&amp;gt;)&lt;br /&gt;
| yes&lt;br /&gt;
|&lt;br /&gt;
There are two methods to set the visual effect of a vehicle:&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;visual_effect_and_powered&amp;lt;/code&amp;gt;: Easy method for simple effects.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;effect_spawn_model_and_powered&amp;lt;/code&amp;gt; + callback &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;create_effect&amp;lt;/code&amp;gt;: {{ottdp|1.5|no|ottdrev=r26747}} Harder to use, but also more powerful.&lt;br /&gt;
For each vehicle you have to decide for the method. You cannot use them both for the same vehicle &#039;item&#039;.&lt;br /&gt;
&lt;br /&gt;
Set the type of visual effect for the vehicle and its positional offset with respect to the vehicle. An offset of 0 is default, negative values mean more to the front and positive values are backwards. Minimum offset is -8, maximum is 7.&lt;br /&gt;
&lt;br /&gt;
;VISUAL_EFFECT_DEFAULT&lt;br /&gt;
:No effect, unless for the default vehicles&lt;br /&gt;
;VISUAL_EFFECT_STEAM&lt;br /&gt;
:Steam like from steam engine&lt;br /&gt;
;VISUAL_EFFECT_DIESEL&lt;br /&gt;
:Steam from internal combustion engine&lt;br /&gt;
;VISUAL_EFFECT_ELECTRIC&lt;br /&gt;
:Electric sparks&lt;br /&gt;
;VISUAL_EFFECT_DISABLE&lt;br /&gt;
:No effect&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;effect_spawn_model_and_powered&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;EFFECT_SPAWN_MODEL_XXX&amp;lt;/code&amp;gt; or &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;EFFECT_SPAWN_MODEL_XXX &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; ENABLE_WAGON_POWER&amp;lt;/code&amp;gt;&lt;br /&gt;
| yes&lt;br /&gt;
|&lt;br /&gt;
There are two methods to set the visual effect of a vehicle:&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;visual_effect_and_powered&amp;lt;/code&amp;gt;: Easy method for simple effects.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;effect_spawn_model_and_powered&amp;lt;/code&amp;gt; + callback &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;create_effect&amp;lt;/code&amp;gt;: {{ottdp|1.5|no|ottdrev=r26747}} Harder to use, but also more powerful.&lt;br /&gt;
For each vehicle you have to decide for the method. You cannot use them both for the same vehicle &#039;item&#039;.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.5|no|ottdrev=r26747}} Set the spawning model of visual effects for the vehicle, that is when the vehicle emits visual effects.&lt;br /&gt;
The visual appearance itself is defined by the callback &#039;create_effect&#039;.&lt;br /&gt;
&lt;br /&gt;
;EFFECT_SPAWN_MODEL_NONE&lt;br /&gt;
: Do not spawn any effects.&lt;br /&gt;
;EFFECT_SPAWN_MODEL_STEAM&lt;br /&gt;
: Gradually less effects when approaching max speed.&lt;br /&gt;
;EFFECT_SPAWN_MODEL_DIESEL&lt;br /&gt;
: Effect proportional to acceleration, no effect when idling at top speed.&lt;br /&gt;
;EFFECT_SPAWN_MODEL_ELECTRIC&lt;br /&gt;
: Random effect, gradually less likely when approaching max speed.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;extra_weight_per_wagon&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 255 ton (float, mass units)&lt;br /&gt;
| Set to 0&lt;br /&gt;
| Adds extra weight for powered wagons, see &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;extra_power_per_wagon&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span #id=&amp;quot;bitmask_vehicle_info&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;bitmask_vehicle_info&amp;lt;/code&amp;gt;&lt;br /&gt;
| 8-bit bitmask&lt;br /&gt;
| yes&lt;br /&gt;
|&lt;br /&gt;
Used for obtaining [[#bitmask consist info|&amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;bitmask_consist_info&amp;lt;/code&amp;gt;]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Road vehicle properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&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;t&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;
|&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;
&lt;br /&gt;
==Aircraft properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&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.&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;t&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! available in&amp;lt;br /&amp;gt;purchase list?&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| position_in_consist&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| The position of the current vehicle-part from the start of the vehicle. The engine will get value 0, the first wagon (or second engine) gets value 1, etc.&lt;br /&gt;
|-&lt;br /&gt;
| position_in_consist_from_end&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| Same as position_in_consist but counted from the end. The last wagon will get value 0.&lt;br /&gt;
|-&lt;br /&gt;
| num_vehs_in_consist&lt;br /&gt;
| 1 ... 256&lt;br /&gt;
| No&lt;br /&gt;
| The total number of vehicles-parts in this vehicle. For aircraft this will include the shadow and the rotor.&lt;br /&gt;
|-&lt;br /&gt;
| position_in_vehid_chain&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| See position_in_consist, but not of the complete vehicle but only all consecutive parts with the same id.&lt;br /&gt;
|-&lt;br /&gt;
| position_in_vehid_chain_from_end&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| See position_in_consist_from_end, but not of the complete vehicle but only all consecutive parts with the same id.&lt;br /&gt;
|-&lt;br /&gt;
| num_vehs_in_vehid_chain&lt;br /&gt;
| 1 ... 256&lt;br /&gt;
| No&lt;br /&gt;
| See num_vehs_in_consist, but not of the complete vehicle but only all consecutive parts with the same id.&lt;br /&gt;
|-&lt;br /&gt;
| position_in_articulated_veh&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| {{nml|0.3}} {{ottdp|1.4|no|ottdrev=r26157}} The position of the current articulated vehicle from the start of the vehicle. The first will get value 0, the second one gets value 1, etc.&lt;br /&gt;
|-&lt;br /&gt;
| position_in_articulated_veh_from_end&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| {{nml|0.3}} {{ottdp|1.4|no|ottdrev=r26157}} The position of the current articulated vehicle from the end of the vehicle. The last will get value 0, the second last one gets value 1, etc.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_classes_in_consist&lt;br /&gt;
| Bitmask of CC_XXX&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
[[NML:Cargos#Cargo classes|cargo classes]]&lt;br /&gt;
|-&lt;br /&gt;
| most_common_cargo_type&lt;br /&gt;
|&lt;br /&gt;
[[NML:Cargos#Cargo properties|Cargo label]]&lt;br /&gt;
| No&lt;br /&gt;
| The most common cargo type in the consist.  Prior to nml r2320 this was known as most_common_refit, and didn&#039;t work, and was also incorrectly documented :)&lt;br /&gt;
|-&lt;br /&gt;
| most_common_cargo_subtype&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| The most common cargo subtype for most_common_cargo_type&lt;br /&gt;
|-&lt;br /&gt;
| bitmask_consist_info&lt;br /&gt;
| Bitmask 8 bit&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
Binary OR of the values of [[#bitmask vehicle info|bitmask_vehicle_info]] of all vehicles (engines, wagons) in the consist. Only available for rail vehicles.&lt;br /&gt;
|-&lt;br /&gt;
| company_num&lt;br /&gt;
| 0 ... 14&lt;br /&gt;
| Yes&lt;br /&gt;
| company number of the vehicle owner. TTDPatch only supports up to 8 companies (0 ... 7)&lt;br /&gt;
|-&lt;br /&gt;
| company_type&lt;br /&gt;
| PLAYERTYPE_XX&lt;br /&gt;
| Yes&lt;br /&gt;
| &lt;br /&gt;
;PLAYERTYPE_HUMAN&lt;br /&gt;
:human player&lt;br /&gt;
;PLAYERTYPE_AI&lt;br /&gt;
:AI player&lt;br /&gt;
;PLAYERTYPE_HUMAN_IN_AI&lt;br /&gt;
:human managing AI company&lt;br /&gt;
;PLAYERTYPE_AI_IN_HUMAN&lt;br /&gt;
:AI managing human company&lt;br /&gt;
&lt;br /&gt;
OpenTTD only uses PLAYERTYPE_HUMAN and PLAYERTYPE_AI. If you cheat yourself to be part of an AI company OpenTTD will still report PLAYERTYPE_AI for the company with yourself and the AI and it&#039;ll report PLAYERTYPE_HUMAN for the now uncontrolled company.&lt;br /&gt;
|-&lt;br /&gt;
| company_colour1&lt;br /&gt;
| COLOUR_XXX&lt;br /&gt;
| Yes&lt;br /&gt;
|&lt;br /&gt;
Refer to the table [[NML:List of default colour translation palettes#Company colour helper functions|here]] for possible values.&lt;br /&gt;
|-&lt;br /&gt;
| company_colour2&lt;br /&gt;
| COLOUR_XXX&lt;br /&gt;
| Yes&lt;br /&gt;
|&lt;br /&gt;
Same as company_colour1, if no 2nd company colour is chosen. Refer to the table [[NML:List of default colour translation palettes#Company colour helper functions|here]] for possible values.&lt;br /&gt;
|-&lt;br /&gt;
| aircraft_height&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| Height difference between the aircraft and its shadow. 8 Units are equivalent to one height level on the map.&lt;br /&gt;
|-&lt;br /&gt;
| airport_type&lt;br /&gt;
| AIRPORTTYPE_XX&lt;br /&gt;
| No&lt;br /&gt;
| &lt;br /&gt;
;AIRPORTTYPE_SMALL&lt;br /&gt;
;AIRPORTTYPE_LARGE&lt;br /&gt;
;AIRPORTTYPE_HELIPORT&lt;br /&gt;
;AIRPORTTYPE_OILRIG&lt;br /&gt;
|-&lt;br /&gt;
| curv_info_prev_cur&lt;br /&gt;
| -2 ... 2&lt;br /&gt;
| No&lt;br /&gt;
| Difference in direction between the previous (towards engine) vehicle and this vehicle. Curvature to the right is positive. 1 unit is 45 degrees.&lt;br /&gt;
|-&lt;br /&gt;
| curv_info_cur_next&lt;br /&gt;
| -2 ... 2&lt;br /&gt;
| No&lt;br /&gt;
| Difference in direction between this vehicle and the next (towards rear end) vehicle. Curvature to the right is positive. 1 unit is 45 degrees.&lt;br /&gt;
|-&lt;br /&gt;
| curv_info_prev_next&lt;br /&gt;
| -4 ... 4&lt;br /&gt;
| No&lt;br /&gt;
| Difference in direction between the previous (towards engine) and next (towards rear end) vehicle. Curvature to the right is positive. 1 unit is 45 degrees. Equal to &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;curve_invo_prev_cur + curv_info_cur_next&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| curv_info&lt;br /&gt;
| vehicle_curv_info(&#039;&#039;prev_cur&#039;&#039;, &#039;&#039;cur_next&#039;&#039;)&#039;&#039;&#039;&#039;&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
Returns a magic number that represents the curvature state of the prev-cur-next vehicle triplet. Do not try to make sense of this magic number, use the [[NML:Builtin functions|builtin function]] &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;vehicle_curv_info()&amp;lt;/code&amp;gt; instead to make comparisons. &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;curv_info == vehicle_curv_info(a, b)&amp;lt;/code&amp;gt; is equivalent to &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;(curv_info_prev_cur == a) &amp;amp;amp;&amp;amp;amp; (curv_info_cur_next == b)&amp;lt;/code&amp;gt;, however the former can easily be used in a switch-block.&lt;br /&gt;
|-&lt;br /&gt;
| motion_counter&lt;br /&gt;
| 0 ... 0xFFFFFF&lt;br /&gt;
| Yes, always 0&lt;br /&gt;
| Is increased every time the vehicle moves a single step on the map. Useful for driving animations.&lt;br /&gt;
For that, make the animation use a number of frames, which is a power of two, i.e. 2, 4, 8, 16, 32, ... frames, and then use the lower n bits of motion_counter.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_type_in_veh&lt;br /&gt;
| entry in cargo translation table&lt;br /&gt;
| Yes, for the default cargo&lt;br /&gt;
| 0xFF if not present in the table&lt;br /&gt;
|-&lt;br /&gt;
| cargo_unit_weight&lt;br /&gt;
| weight per unit in 1/16t&lt;br /&gt;
| Yes, for the default cargo&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| cargo_classes&lt;br /&gt;
| Bitmask of [[NML:Cargos#Cargo properties|cargo class]]&lt;br /&gt;
| Yes, for the default cargo&lt;br /&gt;
| class of the currently transported cargo&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_available&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| Yes&lt;br /&gt;
| Value is 1 if the vehicle is available on the open market&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_testing&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| Yes&lt;br /&gt;
| Value is 1 if the vehicle is currently being tested&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_offered&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| Yes&lt;br /&gt;
| Value is 1 if the vehicle is currently being offered for exclusive preview&lt;br /&gt;
|-&lt;br /&gt;
| build_year&lt;br /&gt;
| 0 ... 5000000&lt;br /&gt;
| Yes&lt;br /&gt;
| 0-based year when the vehicle was built, current year if the vehicle is not built yet&lt;br /&gt;
|-&lt;br /&gt;
| direction&lt;br /&gt;
| DIRECTION_XX&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
See [[NML:List of direction constants|here]] for an overview of possible values and their meaning.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_capacity&lt;br /&gt;
| 0 ... 65535&lt;br /&gt;
| No&lt;br /&gt;
| Cargo capacity (number of units) of the vehicle&lt;br /&gt;
|-&lt;br /&gt;
| cargo_count&lt;br /&gt;
| 0 ... 65535&lt;br /&gt;
| No&lt;br /&gt;
| Number of cargo units of cargo in the vehicle&lt;br /&gt;
|-&lt;br /&gt;
| cargo_subtype&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Yes, always 0&lt;br /&gt;
| Cargo subtype, used to provide more than one refit option for the same cargo type. See also the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;cargo_subtype_text&amp;lt;/code&amp;gt; callback.&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_powered&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Vehicle provides power and is on the correct track type&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_not_powered&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Vehicle is either on a wrong track type or it doesn&#039;t provide power at all&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_potentially_powered&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Vehicle provides power, if it is on a suitable track type&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_flipped&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Value is 1 if the sprite is reversed via flip-vehicle-in-depot (trains only)&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_reversed&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Value is 1 if the vehicle has reversed an odd number of times&lt;br /&gt;
|-&lt;br /&gt;
| built_during_preview&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Value is 1 if the vehicle was built during the exclusive preview stage&lt;br /&gt;
|-&lt;br /&gt;
| current_railtype&lt;br /&gt;
| No&lt;br /&gt;
| Entry from railtype translation table or 0xFF&lt;br /&gt;
| Don&#039;t use this variable 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. Available since OpenTTD r20164.&lt;br /&gt;
|-&lt;br /&gt;
| current_roadtype&lt;br /&gt;
| No&lt;br /&gt;
| Entry from current_roadtype translation table or 0xFF&lt;br /&gt;
| {{nml|0.5}} {{ottdp|1.10|no}} 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;
| No&lt;br /&gt;
| Entry from tramtype translation table or 0xFF&lt;br /&gt;
| {{nml|0.5}} {{ottdp|1.10|no}} 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;
| 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;t&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;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Variables that require an argument===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&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;
&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;t&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Available for&lt;br /&gt;
! In purchase menu?&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| default&lt;br /&gt;
| All&lt;br /&gt;
| Yes, unless &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;purchase&amp;lt;/code&amp;gt; is set separately&lt;br /&gt;
| Sprite group&lt;br /&gt;
| &#039;Normal&#039; vehicle graphics, if no cargo-specific graphics apply. See also the section on [[#Sprites in GUI|GUI sprites]].&lt;br /&gt;
|-&lt;br /&gt;
| purchase&lt;br /&gt;
| All&lt;br /&gt;
| Yes, only&lt;br /&gt;
| Sprite group&lt;br /&gt;
| Graphics to show in the buy menu (only the horizontal view is needed, except for dual-headed trains. With the &amp;lt;code&amp;gt;dual_headed&amp;lt;/code&amp;gt; property set, special rules for the purchase menu sprite apply: two sprites are drawn (for front and back) as if the vehicle is normally constructed. If you supply one purchase menu sprite, it will be used for both vehicle parts in the purchase menu. Provide a set of 8 sprites, and the 7th resp. 3rd sprite will be drawn; provide a set of 8 blank sprites except the 7th if you want to fully control a single purchase menu sprite for a dual-headed engine. ) See also the section on [[#Sprites in GUI|GUI sprites]].&lt;br /&gt;
|-&lt;br /&gt;
| rotor&lt;br /&gt;
| Aircraft (helicopters)&lt;br /&gt;
| No&lt;br /&gt;
| Sprite group&lt;br /&gt;
| Graphics for the helicopter rotor (4 sprites; 1 stopped and 3 moving)&lt;br /&gt;
|-&lt;br /&gt;
| random_trigger&lt;br /&gt;
| All&lt;br /&gt;
| No&lt;br /&gt;
| N/A&lt;br /&gt;
| See [[NML:Random switch|random switch]] for more information.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_subtype_text&lt;br /&gt;
| All&lt;br /&gt;
| No&lt;br /&gt;
| String, or CB_RESULT_NO_TEXT&lt;br /&gt;
| With this callback, you can display extra text after the cargo in the vehicle information window. This callback is called during refitting, with succesively increased values of the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;cargo_subtype&amp;lt;/code&amp;gt; variable, until the callback returns CB_RESULT_NO_TEXT. All returned strings are then displayed as refit options. The chosen refit option is saved in the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;cargo_subtype&amp;lt;/code&amp;gt; variable, so it can be used later for other things. In the HEQS grf for example, this mechanism is used to let the user choose between different capacities of the same vehicle.&lt;br /&gt;
|-&lt;br /&gt;
| additional_text&lt;br /&gt;
| All&lt;br /&gt;
| Yes, only&lt;br /&gt;
| String&lt;br /&gt;
| Additional text to show in the purchase list.&lt;br /&gt;
|-&lt;br /&gt;
| colour_mapping&lt;br /&gt;
| All&lt;br /&gt;
| Yes, unless &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;purchase_colour_mapping&amp;lt;/code&amp;gt; is set separately&lt;br /&gt;
| Recolour sprite number&lt;br /&gt;
|&lt;br /&gt;
With this callback, you can use a different recolour sprite instead of the standard 1cc / 2cc company colour remappings. See [[NML:List of default colour translation palettes|here]] for a list of default palettes. See the [[NML:Builtin functions|builtin function]] &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;reserve_sprites()&amp;lt;/code&amp;gt; for info on how to allocate your own sprite. For performance, the result is cached and only updated if the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt; every_32_days&amp;lt;/code&amp;gt; callback requires so. Add CB_RESULT_COLOUR_MAPPING_ADD_CC to the result to add the company colour to the sprites, this requires 16 (1cc) or 256 (2cc) sprites in total.&lt;br /&gt;
|-&lt;br /&gt;
| start_stop&lt;br /&gt;
| All&lt;br /&gt;
| No&lt;br /&gt;
| String or CB_RESULT_NO_TEXT&lt;br /&gt;
| Called when starting or stopping a vehicle. Mainly useful to prevent vehicles from leaving the depot unless a certain condition is met. Return CB_RESULT_NO_TEXT to allow or a string (containing an error message) to disallow starting/stopping.&lt;br /&gt;
|-&lt;br /&gt;
| every_32_days&lt;br /&gt;
| All&lt;br /&gt;
| No&lt;br /&gt;
| bitmask(CB_RESULT_32_DAYS_XXX, ...)&lt;br /&gt;
| Called every 32 days. Set CB_RESULT_32_DAYS_TRIGGER in the bitmask to trigger TRIGGER_VEHICLE_32_CALLBACK. Set CB_RESULT_32_DAYS_COLOUR_MAPPING in the bitmask to update the colour mapping by re-running the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;colour_mapping&amp;lt;/code&amp;gt; callback.&lt;br /&gt;
|-&lt;br /&gt;
| sound_effect&lt;br /&gt;
| All&lt;br /&gt;
| No&lt;br /&gt;
| SOUND_XXX, sound(&amp;quot;sound.wav&amp;quot;), import_sound(grfid, number) or CB_RESULT_NO_SOUND&lt;br /&gt;
|&lt;br /&gt;
Called to play various vehicle sounds.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt; The sound event, see the [[#Sound events|table]] below.&lt;br /&gt;
Return SOUND_XXX (see [[NML:List_of_sound_effects|here]]) to return a default sound. &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;sound(&amp;quot;soundfile&amp;quot;)&amp;lt;/code&amp;gt; imports a sound from a .wav file. &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;import_sound(grfid, number)&amp;lt;/code&amp;gt; imports a sound from another grf. A failed (or not implemented) callback will cause the default sound to be played. Return CB_RESULT_NO_SOUND to play no sound at all.&lt;br /&gt;
|-&lt;br /&gt;
| articulated_part&lt;br /&gt;
| Trains, Road Vehicles&lt;br /&gt;
| Yes (no separate callback)&lt;br /&gt;
| Vehicle ID, or CB_RESULT_NO_MORE_ARTICULATED_PARTS&lt;br /&gt;
| With this callback, you can add articulated parts (e.g. tenders) to your vehicle. Called repeatedly, until CB_RESULT_NO_MORE_ARTICULATED_PARTS is returned. After each call, the returned vehicleID is added to your vehicle.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt; contains 1 during the first call, 2 during the second, etc.&lt;br /&gt;
Note that callback may be called from the purchase list, using vehicle variables is not possible. Or CB_RESULT_REVERSED_VEHICLE to the returned vehicle ID to display the vehicle backwards. &lt;br /&gt;
&lt;br /&gt;
For NML 0.2 and lower the vehicle ID of the articulated part must be in the range 0 .. 127.&lt;br /&gt;
|-&lt;br /&gt;
| can_attach_wagon&lt;br /&gt;
| Trains&lt;br /&gt;
| No&lt;br /&gt;
| String or CB_RESULT_ATTACH_XXX&lt;br /&gt;
| Called when a wagon is being attached, to allow or disallow attaching. If a wagon is inserted in the middle, all wagons are removed and attached one-by-one in the new order. This callback has to be defined at the engine. The scopes behave different than usual though:&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;SELF&amp;lt;/code&amp;gt; refers to the wagon being attached. (despite the callback being defined at the engine)&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;PARENT&amp;lt;/code&amp;gt; refers to the consist of the engine up to the wagon before &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;SELF&amp;lt;/code&amp;gt;, i.e. not (yet) including the wagon being attached.&lt;br /&gt;
Return a string to disallow with the string as error message. Return CB_RESULT_ATTACH_DISALLOW to disallow with standard message (&amp;quot;incompatible railtypes&amp;quot;), CB_RESULT_ATTACH_ALLOW to allow or CB_RESULT_ATTACH_ALLOW_IF_RAILTYPES to allow if the railtypes match (default).&lt;br /&gt;
|-&lt;br /&gt;
| refit_cost&lt;br /&gt;
| {{ottdp|1.2|no|ottdrev=r23089}} All&lt;br /&gt;
| Yes&lt;br /&gt;
| -8192 .. 8191 as refit cost. Add &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_AUTOREFIT&amp;lt;/code&amp;gt; if you want to allow autorefit.&lt;br /&gt;
| When returning a negative value, encode the cost as (cost &amp;amp; &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_REFIT_COST_MASK&amp;lt;/code&amp;gt;) before (possibly) adding &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_AUTOREFIT&amp;lt;/code&amp;gt;. To allow autorefitting, the corresponding bit in the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;misc_flags&amp;lt;/code&amp;gt; must be set as well.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;: The new cargo type.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 8, 8)&amp;lt;/code&amp;gt;: The new cargo subtype (see &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;cargo_subtype_text&amp;lt;/code&amp;gt;-callback).&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 16, 16)&amp;lt;/code&amp;gt;: A bitmask of the [[NML:Cargos#Cargo_classes|cargo classes]] of the target cargo type. &lt;br /&gt;
Note that this callback may also be called when the vehicle does not exist yet, so the available variables are limited.&lt;br /&gt;
|-&lt;br /&gt;
| create_effect&lt;br /&gt;
| {{ottdp|1.5|no|ottdrev=r26747}} Trains, Road Vehicles, Ships&lt;br /&gt;
| No&lt;br /&gt;
| 0 .. 3 for number of effects. Optionally add &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_CREATE_EFFECT_CENTER&amp;lt;/code&amp;gt; and/or &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_CREATE_EFFECT_NO_ROTATION&amp;lt;/code&amp;gt;&lt;br /&gt;
| Called when a effect spawning model is defined via &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;effect_spawn_model&amp;lt;/code&amp;gt; resp. &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;effect_spawn_model_and_powered&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The result specifies how many effects shall be created.&lt;br /&gt;
The position and appearance of the individual effects is returned via registers 0x100 to 0x103:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
switch (FEAT_XXX, SELF, switch_name, [&lt;br /&gt;
  STORE_TEMP(create_effect(EFFECT_SPRITE_XXX, 8, -3, 10), 0x100), // first effect,&lt;br /&gt;
  STORE_TEMP(create_effect(EFFECT_SPRITE_YYY, 8,  3, 10), 0x101)  // second effect, ...&lt;br /&gt;
]) {&lt;br /&gt;
return 2; // number of effects&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The register values are created using the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;create_effect(&#039;&#039;effect_sprite&#039;&#039;, &#039;&#039;l_x_offset&#039;&#039;, &#039;&#039;t_y_offset&#039;&#039;, &#039;&#039;z_offset&#039;&#039;)&amp;lt;/code&amp;gt; function:&lt;br /&gt;
* &#039;&#039;effect_sprite&#039;&#039;: Sprite for the effect. One of &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;EFFECT_SPRITE_&amp;lt;/code&amp;gt;[&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;NONE&amp;lt;/code&amp;gt;|&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;STEAM&amp;lt;/code&amp;gt;|&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;DIESEL&amp;lt;/code&amp;gt;|&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;ELECTRIC&amp;lt;/code&amp;gt;|&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;AIRCRAFT_BREAKDOWN_SMOKE&amp;lt;/code&amp;gt;].&lt;br /&gt;
* &#039;&#039;l_x_offset&#039;&#039;: Longitudinal or X position of the effect, depending on callback result &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_CREATE_EFFECT_NO_ROTATION&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;t_y_offset&#039;&#039;: Transversal or Y position of the effect, depending on callback result &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_CREATE_EFFECT_NO_ROTATION&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;z_offset&#039;&#039;: Z position of the effect.&lt;br /&gt;
&lt;br /&gt;
Additional to the number of effects, the callback result may specify these flags:&lt;br /&gt;
;&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_CREATE_EFFECT_CENTER&amp;lt;/code&amp;gt;&lt;br /&gt;
:(Train and road vehicle only) If set, position effect relative to vehicle center instead of relative to vehicle sprite. (behaves the same for vehicles with length 8/8) &lt;br /&gt;
;&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_CREATE_EFFECT_NO_ROTATION&amp;lt;/code&amp;gt;&lt;br /&gt;
*If not set, the parameters to &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;effect_sprite&amp;lt;/code&amp;gt; describe longitudinal/transversal positions, which are rotate wrt. vehicle orientation.&lt;br /&gt;
*If set, the parameters to &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;effect_sprite&amp;lt;/code&amp;gt; describe X and Y positions, which are not automatically rotated.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following callbacks all have an equivalent property. The property description applies here also, except where otherwise noted.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&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;
&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;
Currently this is limited to at most 4 sprites per articulated part.&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;t&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>2talltyler</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Vehicles&amp;diff=4090</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=4090"/>
		<updated>2021-01-20T00:18:46Z</updated>

		<summary type="html">&lt;p&gt;2talltyler: /* Vehicle IDs */ Add link to sort block documentation.&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;t&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.&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. When starting a new game, a random amount between 31 months and 17 years is added to the model life as well. &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&lt;br /&gt;
| stays constant at peak, 75-100%&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 10 to 20.5 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;t&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)&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 (for vehicles shorter than 8/8, see [[Action0/Vehicles/Trains#cite_note-6|this note about sprite offsets]]&lt;br /&gt;
;TRAIN_FLAG_AUTOREFIT&lt;br /&gt;
:Allow autoreffitting. To enable autorefit, furthermore the [[#Vehicle callbacks|refit_cost]]-callback has to allow it, or else (if this callback is not implemented or fails) the &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;refit_cost&amp;lt;/code&amp;gt;-property (see below) must be set to 0.&lt;br /&gt;
;TRAIN_FLAG_NO_BREAKDOWN_SMOKE&lt;br /&gt;
:{{nml|0.3}} {{ottdp|1.3|no|ottdrev=r24124}} Disable breakdown smoke effect&lt;br /&gt;
;TRAIN_FLAG_SPRITE_STACK&lt;br /&gt;
:{{ottdp|1.7|no|ottdrev=r27668}} Enable [[NML:Vehicles#Composing_vehicles_from_multiple_sprites|composition from multiple sprites]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;refit_cost&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| yes&lt;br /&gt;
| in 50% units of the purchase price cost base&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;callback_flags&amp;lt;/code&amp;gt;&lt;br /&gt;
| bitmask(VEH_CBF_XXX, ...)&lt;br /&gt;
| yes&lt;br /&gt;
|&lt;br /&gt;
Do not set this, unless you use [[NML:Old style callbacks|old-style callbacks]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;track_type&amp;lt;/code&amp;gt;&lt;br /&gt;
| item from railtypetable&lt;br /&gt;
| must be the same as front&lt;br /&gt;
| Default railtype table: RAIL, MONO, MGLV. If you install a railtypetable yourself you&#039;ll always get the railtype you specified. If you want a vehicle to run on electric rail and you don&#039;t have a railtypetable, set &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;track_type&amp;lt;/code&amp;gt; to RAIL and make sure that you set &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;engine_class&amp;lt;/code&amp;gt; to &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;ENGINE_CLASS_ELECTRIC&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;ai_special_flag&amp;lt;/code&amp;gt;&lt;br /&gt;
| [&amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;AI_FLAG_PASSENGER&amp;lt;/code&amp;gt; &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;AI_FLAG_CARGO&amp;lt;/code&amp;gt;]&lt;br /&gt;
| no&lt;br /&gt;
| &lt;br /&gt;
;&amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;AI_FLAG_PASSENGER&amp;lt;/code&amp;gt;&lt;br /&gt;
:Tell computer players that it&#039;s an engine that should only be used for passenger service.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;power&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 65000 hp (float, power units)&lt;br /&gt;
| Set to 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;running_cost_base&amp;lt;/code&amp;gt;&lt;br /&gt;
| RUNNING_COST_XXX&lt;br /&gt;
| Set to RUNNING_COST_NONE&lt;br /&gt;
| &lt;br /&gt;
;RUNNING_COST_STEAM&lt;br /&gt;
;RUNNING_COST_DIESEL&lt;br /&gt;
;RUNNING_COST_ELECTRIC&lt;br /&gt;
;RUNNING_COST_ROADVEH&lt;br /&gt;
;RUNNING_COST_NONE&lt;br /&gt;
:no running costs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;dual_headed&amp;lt;/code&amp;gt;&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| Set to 0 for all parts of an articulated vehicle&lt;br /&gt;
| 1 = dual_headed, otherwise normal engine&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;default_cargo_type&amp;lt;/code&amp;gt;&lt;br /&gt;
| An identifier from the [[NML:Cargotable|cargo table]], or DEFAULT_CARGO_FIRST_REFITTABLE&lt;br /&gt;
| Yes&lt;br /&gt;
| If the vehicle is refittable to at least one cargo, but the chosen default cargo is not available or is set to DEFAULT_CARGO_FIRST_REFITTABLE, then the first refittable cargo is used. The first refittable is chosen according to the order in your [[NML:Cargotable|cargo table]]. If this property is set to a valid cargo but the vehicle cannot refit to any cargo type, then the vehicle will be able to carry only this cargo, but it cannot be refitted (like e.g. the default train wagons).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;cargo_capacity&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 .. 255&lt;br /&gt;
| yes&lt;br /&gt;
| By default, passenger capacity is 4x, and mail/goods capacity 2x larger than capacity for other cargoes. The capacity set here is used for the default (i.e. first refittable) cargo. Use the &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;cargo_capacity&amp;lt;/code&amp;gt; callback to avoid this effect.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;weight&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 .. 1279 ton (float, mass units)&lt;br /&gt;
| Set to 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;ai_engine_rank&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| no&lt;br /&gt;
| TTDPatch only: Higher values make the engine for the TTDPatch AI more attractive&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;engine_class&amp;lt;/code&amp;gt;&lt;br /&gt;
| ENGINE_CLASS_XXX&lt;br /&gt;
| no&lt;br /&gt;
| &lt;br /&gt;
Defines which livery colour settings apply to the vehicle.  It also sets the corresponding sound effect of the engine, and if visual_effect_and_powered is not set, the visual effect as well.&lt;br /&gt;
;ENGINE_CLASS_STEAM&lt;br /&gt;
;ENGINE_CLASS_DIESEL&lt;br /&gt;
;ENGINE_CLASS_ELECTRIC&lt;br /&gt;
;ENGINE_CLASS_MONORAIL&lt;br /&gt;
;ENGINE_CLASS_MAGLEV&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;extra_power_per_wagon&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 65000 hp (float, power units)&lt;br /&gt;
| Set to 0&lt;br /&gt;
| Only wagons with a livery override for this engine will add power&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;tractive_effort_coefficient&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 1 (float)&lt;br /&gt;
| Set to 0&lt;br /&gt;
| Fraction of the vehicle weight that is available as tractive effort. Tractive effort (in kN) is calculated as (TE coefficient) * 10 * weight (in tons), with 10 being an approximation of the acceleration of gravity (9.81 m/s). A good value for rail tracks is 0.3.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;air_drag_coefficient&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 1 (float)&lt;br /&gt;
| Set to 0&lt;br /&gt;
| Coefficient of the relative air drag, in arbitrary units. The default value is approximately (8 / max_speed), with max_speed in km/h, clamped to the range 0.004 .. 0.75.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;length&amp;lt;/code&amp;gt;&lt;br /&gt;
| 1 ... 8&lt;br /&gt;
| yes&lt;br /&gt;
| Length of the vehicle in arbitrary units. Use a value of 8 (equal to the predefined constant VEHICLE_LENGTH) for a full-length vehicle.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;visual_effect_and_powered&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;visual_effect_and_powered&amp;lt;/code&amp;gt; (VISUAL_EFFECT_XXX, offset, &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;ENABLE_WAGON_POWER&amp;lt;/code&amp;gt; or &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;DISABLE_WAGON_POWER&amp;lt;/code&amp;gt;)&lt;br /&gt;
| yes&lt;br /&gt;
|&lt;br /&gt;
There are two methods to set the visual effect of a vehicle:&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;visual_effect_and_powered&amp;lt;/code&amp;gt;: Easy method for simple effects.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;effect_spawn_model_and_powered&amp;lt;/code&amp;gt; + callback &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;create_effect&amp;lt;/code&amp;gt;: {{ottdp|1.5|no|ottdrev=r26747}} Harder to use, but also more powerful.&lt;br /&gt;
For each vehicle you have to decide for the method. You cannot use them both for the same vehicle &#039;item&#039;.&lt;br /&gt;
&lt;br /&gt;
Set the type of visual effect for the vehicle and its positional offset with respect to the vehicle. An offset of 0 is default, negative values mean more to the front and positive values are backwards. Minimum offset is -8, maximum is 7.&lt;br /&gt;
&lt;br /&gt;
;VISUAL_EFFECT_DEFAULT&lt;br /&gt;
:No effect, unless for the default vehicles&lt;br /&gt;
;VISUAL_EFFECT_STEAM&lt;br /&gt;
:Steam like from steam engine&lt;br /&gt;
;VISUAL_EFFECT_DIESEL&lt;br /&gt;
:Steam from internal combustion engine&lt;br /&gt;
;VISUAL_EFFECT_ELECTRIC&lt;br /&gt;
:Electric sparks&lt;br /&gt;
;VISUAL_EFFECT_DISABLE&lt;br /&gt;
:No effect&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;effect_spawn_model_and_powered&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;EFFECT_SPAWN_MODEL_XXX&amp;lt;/code&amp;gt; or &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;EFFECT_SPAWN_MODEL_XXX &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; ENABLE_WAGON_POWER&amp;lt;/code&amp;gt;&lt;br /&gt;
| yes&lt;br /&gt;
|&lt;br /&gt;
There are two methods to set the visual effect of a vehicle:&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;visual_effect_and_powered&amp;lt;/code&amp;gt;: Easy method for simple effects.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;effect_spawn_model_and_powered&amp;lt;/code&amp;gt; + callback &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;create_effect&amp;lt;/code&amp;gt;: {{ottdp|1.5|no|ottdrev=r26747}} Harder to use, but also more powerful.&lt;br /&gt;
For each vehicle you have to decide for the method. You cannot use them both for the same vehicle &#039;item&#039;.&lt;br /&gt;
&lt;br /&gt;
{{ottdp|1.5|no|ottdrev=r26747}} Set the spawning model of visual effects for the vehicle, that is when the vehicle emits visual effects.&lt;br /&gt;
The visual appearance itself is defined by the callback &#039;create_effect&#039;.&lt;br /&gt;
&lt;br /&gt;
;EFFECT_SPAWN_MODEL_NONE&lt;br /&gt;
: Do not spawn any effects.&lt;br /&gt;
;EFFECT_SPAWN_MODEL_STEAM&lt;br /&gt;
: Gradually less effects when approaching max speed.&lt;br /&gt;
;EFFECT_SPAWN_MODEL_DIESEL&lt;br /&gt;
: Effect proportional to acceleration, no effect when idling at top speed.&lt;br /&gt;
;EFFECT_SPAWN_MODEL_ELECTRIC&lt;br /&gt;
: Random effect, gradually less likely when approaching max speed.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;extra_weight_per_wagon&amp;lt;/code&amp;gt;&lt;br /&gt;
| 0 ... 255 ton (float, mass units)&lt;br /&gt;
| Set to 0&lt;br /&gt;
| Adds extra weight for powered wagons, see &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;extra_power_per_wagon&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span #id=&amp;quot;bitmask_vehicle_info&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;bitmask_vehicle_info&amp;lt;/code&amp;gt;&lt;br /&gt;
| 8-bit bitmask&lt;br /&gt;
| yes&lt;br /&gt;
|&lt;br /&gt;
Used for obtaining [[#bitmask consist info|&amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;bitmask_consist_info&amp;lt;/code&amp;gt;]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Road vehicle properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&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;t&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;
|&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;
&lt;br /&gt;
==Aircraft properties==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&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.&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;t&amp;quot;&lt;br /&gt;
! name&lt;br /&gt;
! value range&lt;br /&gt;
! available in&amp;lt;br /&amp;gt;purchase list?&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| position_in_consist&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| The position of the current vehicle-part from the start of the vehicle. The engine will get value 0, the first wagon (or second engine) gets value 1, etc.&lt;br /&gt;
|-&lt;br /&gt;
| position_in_consist_from_end&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| Same as position_in_consist but counted from the end. The last wagon will get value 0.&lt;br /&gt;
|-&lt;br /&gt;
| num_vehs_in_consist&lt;br /&gt;
| 1 ... 256&lt;br /&gt;
| No&lt;br /&gt;
| The total number of vehicles-parts in this vehicle. For aircraft this will include the shadow and the rotor.&lt;br /&gt;
|-&lt;br /&gt;
| position_in_vehid_chain&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| See position_in_consist, but not of the complete vehicle but only all consecutive parts with the same id.&lt;br /&gt;
|-&lt;br /&gt;
| position_in_vehid_chain_from_end&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| See position_in_consist_from_end, but not of the complete vehicle but only all consecutive parts with the same id.&lt;br /&gt;
|-&lt;br /&gt;
| num_vehs_in_vehid_chain&lt;br /&gt;
| 1 ... 256&lt;br /&gt;
| No&lt;br /&gt;
| See num_vehs_in_consist, but not of the complete vehicle but only all consecutive parts with the same id.&lt;br /&gt;
|-&lt;br /&gt;
| position_in_articulated_veh&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| {{nml|0.3}} {{ottdp|1.4|no|ottdrev=r26157}} The position of the current articulated vehicle from the start of the vehicle. The first will get value 0, the second one gets value 1, etc.&lt;br /&gt;
|-&lt;br /&gt;
| position_in_articulated_veh_from_end&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| {{nml|0.3}} {{ottdp|1.4|no|ottdrev=r26157}} The position of the current articulated vehicle from the end of the vehicle. The last will get value 0, the second last one gets value 1, etc.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_classes_in_consist&lt;br /&gt;
| Bitmask of CC_XXX&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
[[NML:Cargos#Cargo classes|cargo classes]]&lt;br /&gt;
|-&lt;br /&gt;
| most_common_cargo_type&lt;br /&gt;
|&lt;br /&gt;
[[NML:Cargos#Cargo properties|Cargo label]]&lt;br /&gt;
| No&lt;br /&gt;
| The most common cargo type in the consist.  Prior to nml r2320 this was known as most_common_refit, and didn&#039;t work, and was also incorrectly documented :)&lt;br /&gt;
|-&lt;br /&gt;
| most_common_cargo_subtype&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| The most common cargo subtype for most_common_cargo_type&lt;br /&gt;
|-&lt;br /&gt;
| bitmask_consist_info&lt;br /&gt;
| Bitmask 8 bit&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
Binary OR of the values of [[#bitmask vehicle info|bitmask_vehicle_info]] of all vehicles (engines, wagons) in the consist. Only available for rail vehicles.&lt;br /&gt;
|-&lt;br /&gt;
| company_num&lt;br /&gt;
| 0 ... 14&lt;br /&gt;
| Yes&lt;br /&gt;
| company number of the vehicle owner. TTDPatch only supports up to 8 companies (0 ... 7)&lt;br /&gt;
|-&lt;br /&gt;
| company_type&lt;br /&gt;
| PLAYERTYPE_XX&lt;br /&gt;
| Yes&lt;br /&gt;
| &lt;br /&gt;
;PLAYERTYPE_HUMAN&lt;br /&gt;
:human player&lt;br /&gt;
;PLAYERTYPE_AI&lt;br /&gt;
:AI player&lt;br /&gt;
;PLAYERTYPE_HUMAN_IN_AI&lt;br /&gt;
:human managing AI company&lt;br /&gt;
;PLAYERTYPE_AI_IN_HUMAN&lt;br /&gt;
:AI managing human company&lt;br /&gt;
&lt;br /&gt;
OpenTTD only uses PLAYERTYPE_HUMAN and PLAYERTYPE_AI. If you cheat yourself to be part of an AI company OpenTTD will still report PLAYERTYPE_AI for the company with yourself and the AI and it&#039;ll report PLAYERTYPE_HUMAN for the now uncontrolled company.&lt;br /&gt;
|-&lt;br /&gt;
| company_colour1&lt;br /&gt;
| COLOUR_XXX&lt;br /&gt;
| Yes&lt;br /&gt;
|&lt;br /&gt;
Refer to the table [[NML:List of default colour translation palettes#Company colour helper functions|here]] for possible values.&lt;br /&gt;
|-&lt;br /&gt;
| company_colour2&lt;br /&gt;
| COLOUR_XXX&lt;br /&gt;
| Yes&lt;br /&gt;
|&lt;br /&gt;
Same as company_colour1, if no 2nd company colour is chosen. Refer to the table [[NML:List of default colour translation palettes#Company colour helper functions|here]] for possible values.&lt;br /&gt;
|-&lt;br /&gt;
| aircraft_height&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| No&lt;br /&gt;
| Height difference between the aircraft and its shadow. 8 Units are equivalent to one height level on the map.&lt;br /&gt;
|-&lt;br /&gt;
| airport_type&lt;br /&gt;
| AIRPORTTYPE_XX&lt;br /&gt;
| No&lt;br /&gt;
| &lt;br /&gt;
;AIRPORTTYPE_SMALL&lt;br /&gt;
;AIRPORTTYPE_LARGE&lt;br /&gt;
;AIRPORTTYPE_HELIPORT&lt;br /&gt;
;AIRPORTTYPE_OILRIG&lt;br /&gt;
|-&lt;br /&gt;
| curv_info_prev_cur&lt;br /&gt;
| -2 ... 2&lt;br /&gt;
| No&lt;br /&gt;
| Difference in direction between the previous (towards engine) vehicle and this vehicle. Curvature to the right is positive. 1 unit is 45 degrees.&lt;br /&gt;
|-&lt;br /&gt;
| curv_info_cur_next&lt;br /&gt;
| -2 ... 2&lt;br /&gt;
| No&lt;br /&gt;
| Difference in direction between this vehicle and the next (towards rear end) vehicle. Curvature to the right is positive. 1 unit is 45 degrees.&lt;br /&gt;
|-&lt;br /&gt;
| curv_info_prev_next&lt;br /&gt;
| -4 ... 4&lt;br /&gt;
| No&lt;br /&gt;
| Difference in direction between the previous (towards engine) and next (towards rear end) vehicle. Curvature to the right is positive. 1 unit is 45 degrees. Equal to &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;curve_invo_prev_cur + curv_info_cur_next&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| curv_info&lt;br /&gt;
| vehicle_curv_info(&#039;&#039;prev_cur&#039;&#039;, &#039;&#039;cur_next&#039;&#039;)&#039;&#039;&#039;&#039;&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
Returns a magic number that represents the curvature state of the prev-cur-next vehicle triplet. Do not try to make sense of this magic number, use the [[NML:Builtin functions|builtin function]] &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;vehicle_curv_info()&amp;lt;/code&amp;gt; instead to make comparisons. &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;curv_info == vehicle_curv_info(a, b)&amp;lt;/code&amp;gt; is equivalent to &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;(curv_info_prev_cur == a) &amp;amp;amp;&amp;amp;amp; (curv_info_cur_next == b)&amp;lt;/code&amp;gt;, however the former can easily be used in a switch-block.&lt;br /&gt;
|-&lt;br /&gt;
| motion_counter&lt;br /&gt;
| 0 ... 0xFFFFFF&lt;br /&gt;
| Yes, always 0&lt;br /&gt;
| Is increased every time the vehicle moves a single step on the map. Useful for driving animations.&lt;br /&gt;
For that, make the animation use a number of frames, which is a power of two, i.e. 2, 4, 8, 16, 32, ... frames, and then use the lower n bits of motion_counter.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_type_in_veh&lt;br /&gt;
| entry in cargo translation table&lt;br /&gt;
| Yes, for the default cargo&lt;br /&gt;
| 0xFF if not present in the table&lt;br /&gt;
|-&lt;br /&gt;
| cargo_unit_weight&lt;br /&gt;
| weight per unit in 1/16t&lt;br /&gt;
| Yes, for the default cargo&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| cargo_classes&lt;br /&gt;
| Bitmask of [[NML:Cargos#Cargo properties|cargo class]]&lt;br /&gt;
| Yes, for the default cargo&lt;br /&gt;
| class of the currently transported cargo&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_available&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| Yes&lt;br /&gt;
| Value is 1 if the vehicle is available on the open market&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_testing&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| Yes&lt;br /&gt;
| Value is 1 if the vehicle is currently being tested&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_offered&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| Yes&lt;br /&gt;
| Value is 1 if the vehicle is currently being offered for exclusive preview&lt;br /&gt;
|-&lt;br /&gt;
| build_year&lt;br /&gt;
| 0 ... 5000000&lt;br /&gt;
| Yes&lt;br /&gt;
| 0-based year when the vehicle was built, current year if the vehicle is not built yet&lt;br /&gt;
|-&lt;br /&gt;
| direction&lt;br /&gt;
| DIRECTION_XX&lt;br /&gt;
| No&lt;br /&gt;
|&lt;br /&gt;
See [[NML:List of direction constants|here]] for an overview of possible values and their meaning.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_capacity&lt;br /&gt;
| 0 ... 65535&lt;br /&gt;
| No&lt;br /&gt;
| Cargo capacity (number of units) of the vehicle&lt;br /&gt;
|-&lt;br /&gt;
| cargo_count&lt;br /&gt;
| 0 ... 65535&lt;br /&gt;
| No&lt;br /&gt;
| Number of cargo units of cargo in the vehicle&lt;br /&gt;
|-&lt;br /&gt;
| cargo_subtype&lt;br /&gt;
| 0 ... 255&lt;br /&gt;
| Yes, always 0&lt;br /&gt;
| Cargo subtype, used to provide more than one refit option for the same cargo type. See also the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;cargo_subtype_text&amp;lt;/code&amp;gt; callback.&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_powered&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Vehicle provides power and is on the correct track type&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_not_powered&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Vehicle is either on a wrong track type or it doesn&#039;t provide power at all&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_potentially_powered&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Vehicle provides power, if it is on a suitable track type&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_flipped&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Value is 1 if the sprite is reversed via flip-vehicle-in-depot (trains only)&lt;br /&gt;
|-&lt;br /&gt;
| vehicle_is_reversed&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Value is 1 if the vehicle has reversed an odd number of times&lt;br /&gt;
|-&lt;br /&gt;
| built_during_preview&lt;br /&gt;
| [0 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 1]&lt;br /&gt;
| No&lt;br /&gt;
| Value is 1 if the vehicle was built during the exclusive preview stage&lt;br /&gt;
|-&lt;br /&gt;
| current_railtype&lt;br /&gt;
| No&lt;br /&gt;
| Entry from railtype translation table or 0xFF&lt;br /&gt;
| Don&#039;t use this variable 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. Available since OpenTTD r20164.&lt;br /&gt;
|-&lt;br /&gt;
| current_roadtype&lt;br /&gt;
| No&lt;br /&gt;
| Entry from current_roadtype translation table or 0xFF&lt;br /&gt;
| {{nml|0.5}} {{ottdp|1.10|no}} 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;
| No&lt;br /&gt;
| Entry from tramtype translation table or 0xFF&lt;br /&gt;
| {{nml|0.5}} {{ottdp|1.10|no}} 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;
| 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;t&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;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Variables that require an argument===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&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;
&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;t&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Available for&lt;br /&gt;
! In purchase menu?&lt;br /&gt;
! value range&lt;br /&gt;
! comment&lt;br /&gt;
|-&lt;br /&gt;
| default&lt;br /&gt;
| All&lt;br /&gt;
| Yes, unless &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;purchase&amp;lt;/code&amp;gt; is set separately&lt;br /&gt;
| Sprite group&lt;br /&gt;
| &#039;Normal&#039; vehicle graphics, if no cargo-specific graphics apply. See also the section on [[#Sprites in GUI|GUI sprites]].&lt;br /&gt;
|-&lt;br /&gt;
| purchase&lt;br /&gt;
| All&lt;br /&gt;
| Yes, only&lt;br /&gt;
| Sprite group&lt;br /&gt;
| Graphics to show in the buy menu (only the horizontal view is needed, except for dual-headed trains. With the &amp;lt;code&amp;gt;dual_headed&amp;lt;/code&amp;gt; property set, special rules for the purchase menu sprite apply: two sprites are drawn (for front and back) as if the vehicle is normally constructed. If you supply one purchase menu sprite, it will be used for both vehicle parts in the purchase menu. Provide a set of 8 sprites, and the 7th resp. 3rd sprite will be drawn; provide a set of 8 blank sprites except the 7th if you want to fully control a single purchase menu sprite for a dual-headed engine. ) See also the section on [[#Sprites in GUI|GUI sprites]].&lt;br /&gt;
|-&lt;br /&gt;
| rotor&lt;br /&gt;
| Aircraft (helicopters)&lt;br /&gt;
| No&lt;br /&gt;
| Sprite group&lt;br /&gt;
| Graphics for the helicopter rotor (4 sprites; 1 stopped and 3 moving)&lt;br /&gt;
|-&lt;br /&gt;
| random_trigger&lt;br /&gt;
| All&lt;br /&gt;
| No&lt;br /&gt;
| N/A&lt;br /&gt;
| See [[NML:Random switch|random switch]] for more information.&lt;br /&gt;
|-&lt;br /&gt;
| cargo_subtype_text&lt;br /&gt;
| All&lt;br /&gt;
| No&lt;br /&gt;
| String, or CB_RESULT_NO_TEXT&lt;br /&gt;
| With this callback, you can display extra text after the cargo in the vehicle information window. This callback is called during refitting, with succesively increased values of the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;cargo_subtype&amp;lt;/code&amp;gt; variable, until the callback returns CB_RESULT_NO_TEXT. All returned strings are then displayed as refit options. The chosen refit option is saved in the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;cargo_subtype&amp;lt;/code&amp;gt; variable, so it can be used later for other things. In the HEQS grf for example, this mechanism is used to let the user choose between different capacities of the same vehicle.&lt;br /&gt;
|-&lt;br /&gt;
| additional_text&lt;br /&gt;
| All&lt;br /&gt;
| Yes, only&lt;br /&gt;
| String&lt;br /&gt;
| Additional text to show in the purchase list.&lt;br /&gt;
|-&lt;br /&gt;
| colour_mapping&lt;br /&gt;
| All&lt;br /&gt;
| Yes, unless &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;purchase_colour_mapping&amp;lt;/code&amp;gt; is set separately&lt;br /&gt;
| Recolour sprite number&lt;br /&gt;
|&lt;br /&gt;
With this callback, you can use a different recolour sprite instead of the standard 1cc / 2cc company colour remappings. See [[NML:List of default colour translation palettes|here]] for a list of default palettes. See the [[NML:Builtin functions|builtin function]] &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;reserve_sprites()&amp;lt;/code&amp;gt; for info on how to allocate your own sprite. For performance, the result is cached and only updated if the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt; every_32_days&amp;lt;/code&amp;gt; callback requires so. Add CB_RESULT_COLOUR_MAPPING_ADD_CC to the result to add the company colour to the sprites, this requires 16 (1cc) or 256 (2cc) sprites in total.&lt;br /&gt;
|-&lt;br /&gt;
| start_stop&lt;br /&gt;
| All&lt;br /&gt;
| No&lt;br /&gt;
| String or CB_RESULT_NO_TEXT&lt;br /&gt;
| Called when starting or stopping a vehicle. Mainly useful to prevent vehicles from leaving the depot unless a certain condition is met. Return CB_RESULT_NO_TEXT to allow or a string (containing an error message) to disallow starting/stopping.&lt;br /&gt;
|-&lt;br /&gt;
| every_32_days&lt;br /&gt;
| All&lt;br /&gt;
| No&lt;br /&gt;
| bitmask(CB_RESULT_32_DAYS_XXX, ...)&lt;br /&gt;
| Called every 32 days. Set CB_RESULT_32_DAYS_TRIGGER in the bitmask to trigger TRIGGER_VEHICLE_32_CALLBACK. Set CB_RESULT_32_DAYS_COLOUR_MAPPING in the bitmask to update the colour mapping by re-running the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;colour_mapping&amp;lt;/code&amp;gt; callback.&lt;br /&gt;
|-&lt;br /&gt;
| sound_effect&lt;br /&gt;
| All&lt;br /&gt;
| No&lt;br /&gt;
| SOUND_XXX, sound(&amp;quot;sound.wav&amp;quot;), import_sound(grfid, number) or CB_RESULT_NO_SOUND&lt;br /&gt;
|&lt;br /&gt;
Called to play various vehicle sounds.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt; The sound event, see the [[#Sound events|table]] below.&lt;br /&gt;
Return SOUND_XXX (see [[NML:List_of_sound_effects|here]]) to return a default sound. &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;sound(&amp;quot;soundfile&amp;quot;)&amp;lt;/code&amp;gt; imports a sound from a .wav file. &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;import_sound(grfid, number)&amp;lt;/code&amp;gt; imports a sound from another grf. A failed (or not implemented) callback will cause the default sound to be played. Return CB_RESULT_NO_SOUND to play no sound at all.&lt;br /&gt;
|-&lt;br /&gt;
| articulated_part&lt;br /&gt;
| Trains, Road Vehicles&lt;br /&gt;
| Yes (no separate callback)&lt;br /&gt;
| Vehicle ID, or CB_RESULT_NO_MORE_ARTICULATED_PARTS&lt;br /&gt;
| With this callback, you can add articulated parts (e.g. tenders) to your vehicle. Called repeatedly, until CB_RESULT_NO_MORE_ARTICULATED_PARTS is returned. After each call, the returned vehicleID is added to your vehicle.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt; contains 1 during the first call, 2 during the second, etc.&lt;br /&gt;
Note that callback may be called from the purchase list, using vehicle variables is not possible. Or CB_RESULT_REVERSED_VEHICLE to the returned vehicle ID to display the vehicle backwards. &lt;br /&gt;
&lt;br /&gt;
For NML 0.2 and lower the vehicle ID of the articulated part must be in the range 0 .. 127.&lt;br /&gt;
|-&lt;br /&gt;
| can_attach_wagon&lt;br /&gt;
| Trains&lt;br /&gt;
| No&lt;br /&gt;
| String or CB_RESULT_ATTACH_XXX&lt;br /&gt;
| Called when a wagon is being attached, to allow or disallow attaching. If a wagon is inserted in the middle, all wagons are removed and attached one-by-one in the new order. This callback has to be defined at the engine. The scopes behave different than usual though:&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;SELF&amp;lt;/code&amp;gt; refers to the wagon being attached. (despite the callback being defined at the engine)&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;PARENT&amp;lt;/code&amp;gt; refers to the consist of the engine up to the wagon before &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;SELF&amp;lt;/code&amp;gt;, i.e. not (yet) including the wagon being attached.&lt;br /&gt;
Return a string to disallow with the string as error message. Return CB_RESULT_ATTACH_DISALLOW to disallow with standard message (&amp;quot;incompatible railtypes&amp;quot;), CB_RESULT_ATTACH_ALLOW to allow or CB_RESULT_ATTACH_ALLOW_IF_RAILTYPES to allow if the railtypes match (default).&lt;br /&gt;
|-&lt;br /&gt;
| refit_cost&lt;br /&gt;
| {{ottdp|1.2|no|ottdrev=r23089}} All&lt;br /&gt;
| Yes&lt;br /&gt;
| -8192 .. 8191 as refit cost. Add &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_AUTOREFIT&amp;lt;/code&amp;gt; if you want to allow autorefit.&lt;br /&gt;
| When returning a negative value, encode the cost as (cost &amp;amp; &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_REFIT_COST_MASK&amp;lt;/code&amp;gt;) before (possibly) adding &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_AUTOREFIT&amp;lt;/code&amp;gt;. To allow autorefitting, the corresponding bit in the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;misc_flags&amp;lt;/code&amp;gt; must be set as well.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 0, 8)&amp;lt;/code&amp;gt;: The new cargo type.&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 8, 8)&amp;lt;/code&amp;gt;: The new cargo subtype (see &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;cargo_subtype_text&amp;lt;/code&amp;gt;-callback).&lt;br /&gt;
* &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;getbits(extra_callback_info1, 16, 16)&amp;lt;/code&amp;gt;: A bitmask of the [[NML:Cargos#Cargo_classes|cargo classes]] of the target cargo type. &lt;br /&gt;
Note that this callback may also be called when the vehicle does not exist yet, so the available variables are limited.&lt;br /&gt;
|-&lt;br /&gt;
| create_effect&lt;br /&gt;
| {{ottdp|1.5|no|ottdrev=r26747}} Trains, Road Vehicles, Ships&lt;br /&gt;
| No&lt;br /&gt;
| 0 .. 3 for number of effects. Optionally add &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_CREATE_EFFECT_CENTER&amp;lt;/code&amp;gt; and/or &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_CREATE_EFFECT_NO_ROTATION&amp;lt;/code&amp;gt;&lt;br /&gt;
| Called when a effect spawning model is defined via &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;effect_spawn_model&amp;lt;/code&amp;gt; resp. &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;effect_spawn_model_and_powered&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The result specifies how many effects shall be created.&lt;br /&gt;
The position and appearance of the individual effects is returned via registers 0x100 to 0x103:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
switch (FEAT_XXX, SELF, switch_name, [&lt;br /&gt;
  STORE_TEMP(create_effect(EFFECT_SPRITE_XXX, 8, -3, 10), 0x100), // first effect,&lt;br /&gt;
  STORE_TEMP(create_effect(EFFECT_SPRITE_YYY, 8,  3, 10), 0x101)  // second effect, ...&lt;br /&gt;
]) {&lt;br /&gt;
return 2; // number of effects&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The register values are created using the &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;create_effect(&#039;&#039;effect_sprite&#039;&#039;, &#039;&#039;l_x_offset&#039;&#039;, &#039;&#039;t_y_offset&#039;&#039;, &#039;&#039;z_offset&#039;&#039;)&amp;lt;/code&amp;gt; function:&lt;br /&gt;
* &#039;&#039;effect_sprite&#039;&#039;: Sprite for the effect. One of &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;EFFECT_SPRITE_&amp;lt;/code&amp;gt;[&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;NONE&amp;lt;/code&amp;gt;|&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;STEAM&amp;lt;/code&amp;gt;|&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;DIESEL&amp;lt;/code&amp;gt;|&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;ELECTRIC&amp;lt;/code&amp;gt;|&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;AIRCRAFT_BREAKDOWN_SMOKE&amp;lt;/code&amp;gt;].&lt;br /&gt;
* &#039;&#039;l_x_offset&#039;&#039;: Longitudinal or X position of the effect, depending on callback result &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_CREATE_EFFECT_NO_ROTATION&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;t_y_offset&#039;&#039;: Transversal or Y position of the effect, depending on callback result &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_CREATE_EFFECT_NO_ROTATION&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;z_offset&#039;&#039;: Z position of the effect.&lt;br /&gt;
&lt;br /&gt;
Additional to the number of effects, the callback result may specify these flags:&lt;br /&gt;
;&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_CREATE_EFFECT_CENTER&amp;lt;/code&amp;gt;&lt;br /&gt;
:(Train and road vehicle only) If set, position effect relative to vehicle center instead of relative to vehicle sprite. (behaves the same for vehicles with length 8/8) &lt;br /&gt;
;&amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;CB_RESULT_CREATE_EFFECT_NO_ROTATION&amp;lt;/code&amp;gt;&lt;br /&gt;
*If not set, the parameters to &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;effect_sprite&amp;lt;/code&amp;gt; describe longitudinal/transversal positions, which are rotate wrt. vehicle orientation.&lt;br /&gt;
*If set, the parameters to &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;effect_sprite&amp;lt;/code&amp;gt; describe X and Y positions, which are not automatically rotated.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following callbacks all have an equivalent property. The property description applies here also, except where otherwise noted.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;t&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;
&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;
Currently this is limited to at most 4 sprites per articulated part.&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;t&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>2talltyler</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:Main&amp;diff=4089</id>
		<title>NML:Main</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:Main&amp;diff=4089"/>
		<updated>2021-01-20T00:16:02Z</updated>

		<summary type="html">&lt;p&gt;2talltyler: Add missing link to main menu.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right; padding-left:12px; background:none;&amp;quot;&amp;gt;{{NMLNavMain}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;[[NML:Preface |Preface]]&lt;br /&gt;
;[[NML:changes 0.3|Changes between NML 0.2 and head / 0.3]]&lt;br /&gt;
;[[NML:changes 0.4|Changes between NML 0.3 and head / 0.4]]&lt;br /&gt;
;[[NML:changes 0.5|Changes between NML 0.4 and head / 0.5]]&lt;br /&gt;
;[[NML:Getting started|Getting started]]&lt;br /&gt;
;[[NML:Graphic files|Graphics files]]&lt;br /&gt;
&lt;br /&gt;
;[[NML:Block syntax|Language structure and block syntax]]&lt;br /&gt;
*[[NML:GRF|GRF]] and its parameters&lt;br /&gt;
*[[NML:Item|Item]] (Properties, graphics, livery overrides)&lt;br /&gt;
&lt;br /&gt;
*;Defining sprites:&lt;br /&gt;
**[[NML:Realsprites|Realsprites]]&lt;br /&gt;
**[[NML:Template|Template]]&lt;br /&gt;
**[[NML:Base Graphics|Base Graphics]]&lt;br /&gt;
**[[NML:Spriteset|Spriteset]]&lt;br /&gt;
**;Replacing sprites:&lt;br /&gt;
***[[NML:Replace TTD sprites|Replace TTD sprites]]&lt;br /&gt;
***[[NML:Replace new sprites|Replace new sprites]]&lt;br /&gt;
***[[NML:Add font glyphs|Add font glyphs]]&lt;br /&gt;
***[[NML:Alternative sprites|Alternative sprites]] (32bpp, zoom levels)&lt;br /&gt;
**;Aranging and grouping sprites:&lt;br /&gt;
***[[NML:Spritegroup|Spritegroup]] (Vehicles)&lt;br /&gt;
***[[NML:Spritelayout|Spritelayout]] (Houses, industries, stations, airports, objects)&lt;br /&gt;
***[[NML:Recolour sprites|Recolour sprites]]&lt;br /&gt;
&lt;br /&gt;
*;Flow control&lt;br /&gt;
**[[NML:Tilelayout|Tilelayout]]&lt;br /&gt;
**[[NML:Switch|Switch]]&lt;br /&gt;
**[[NML:Produce|Produce]]&lt;br /&gt;
**[[NML:Random switch|Random switch]]&lt;br /&gt;
&lt;br /&gt;
*;Global scope&lt;br /&gt;
**[[NML:Cargotable|Cargotable]]&lt;br /&gt;
**[[NML:Railtypetable|Railtypetable / Roadtypetable / Tramtypetable]]&lt;br /&gt;
**[[NML:Snow line|Snow line]]&lt;br /&gt;
**[[NML:Setting base costs|Setting base costs]]&lt;br /&gt;
**[[NML:Parameter assignment|Parameter assignment]]&lt;br /&gt;
**[[NML:If|If/else]]&lt;br /&gt;
**[[NML:While|While]]&lt;br /&gt;
&lt;br /&gt;
*;Interaction with other grfs&lt;br /&gt;
**[[NML:Error|Error]]&lt;br /&gt;
**[[NML:Disable items|Disable items]]&lt;br /&gt;
**[[NML:Deactivate other NewGRFs|Deactivate other NewGRFs]]&lt;br /&gt;
**[[NML:Testing for other NewGRFs|Testing for other NewGRFs]]&lt;br /&gt;
**[[NML:Overriding vehicles in other NewGRFs|Overriding vehicles in other NewGRFs]]&lt;br /&gt;
&lt;br /&gt;
*;Misc&lt;br /&gt;
**[[NML:Town names|Town names]]&lt;br /&gt;
**[[NML:Town names parts|Town names parts]]&lt;br /&gt;
**[[NML:Sorting vehicles in the purchase list|Sorting vehicles in the purchase list]]&lt;br /&gt;
&lt;br /&gt;
;[[NML:Units|Units]]&lt;br /&gt;
;[[NML:Expressions|Expressions]]&lt;br /&gt;
*[[NML:Elementary values|Elementary values]]&lt;br /&gt;
*[[NML:Builtin functions|Builtin functions]]&lt;br /&gt;
;[[NML:Language files|Language files]]&lt;br /&gt;
;[[NML:Properties and variables and callbacks|Lists of properties, variables and callbacks]]&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Type&lt;br /&gt;
!Properties&lt;br /&gt;
!Variables&lt;br /&gt;
!Callbacks&lt;br /&gt;
!Feature&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:General|General]] ||  || [[NML:General#General variables|variables]] || || FEAT_GLOBALVARS&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Vehicles|Vehicles]] || [[NML:Vehicles#Properties common to all vehicle types|common properties]] || [[NML:Vehicles#Vehicle variables|variables]] || [[NML:Vehicles#Vehicle callbacks|callbacks]] ||&lt;br /&gt;
|-&lt;br /&gt;
| || [[NML:Vehicles#Train properties|train properties]] || || || FEAT_TRAINS&lt;br /&gt;
|-&lt;br /&gt;
| || [[NML:Vehicles#Road vehicle properties|road vehicle properties]] || || || FEAT_ROADVEHS&lt;br /&gt;
|-&lt;br /&gt;
| || [[NML:Vehicles#Ship properties|ship properties]] || || || FEAT_SHIPS&lt;br /&gt;
|-&lt;br /&gt;
| || [[NML:Vehicles#Aircraft properties|aircraft properties]] || || || FEAT_AIRCRAFT&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Stations|Stations]] || [[NML:Stations#Station properties|properties]] || [[NML:Stations#Station variables|variables]] || [[NML:Stations#Station callbacks|callbacks]] || FEAT_STATIONS&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Canals|Canals]] || [[NML:Canals#Canal properties|properties]] || [[NML:Canals#Canal variables|variables]] || [[NML:Canals#Canal callbacks|callbacks]] || FEAT_CANALS&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Bridges|Bridges]] || [[NML:Bridges#Bridge properties|properties]] || [[NML:Bridges#Bridge variables|variables]] || [[NML:Bridges#Bridge callbacks|callbacks]] || FEAT_BRIDGES&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Towns|Towns]] || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Houses|Houses]] || [[NML:Houses#House properties|properties]] || [[NML:Houses#House variables|variables]] || [[NML:Houses#House callbacks|callbacks]] || FEAT_HOUSES&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Industries|Industries]]||  || [[NML:Industries#Common variables|common variables]] || ||&lt;br /&gt;
|-&lt;br /&gt;
| || [[NML:Industries#Industry properties|industry properties]] || [[NML:Industries#Industry variables|industry variables]] || [[NML:Industries#Industry callbacks|industry callbacks]] || FEAT_INDUSTRIES&lt;br /&gt;
|-&lt;br /&gt;
| || [[NML:IndustryTiles#Industry tile properties|tile properties]] || [[NML:IndustryTiles#Industry tile variables|tile variables]] || [[NML:IndustryTiles#Industry tile callbacks|tile callbacks]] || FEAT_INDUSTRYTILES&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Cargos|Cargos]] || [[NML:Cargos#Cargo properties|properties]] || [[NML:Cargos#Cargo variables|variables]] || [[NML:Cargos#Cargo callbacks|callbacks]] || FEAT_CARGOS&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Airports|Airports]] || [[NML:Airports#Airport properties|properties]] || [[NML:Airports#Airport variables|variables]] || [[NML:Airports#Airport callbacks|callbacks]] || FEAT_AIRPORTS&lt;br /&gt;
|-&lt;br /&gt;
| || [[NML:Airports#Airport tile properties|tile properties]] || [[NML:Airports#Airport tile variables|tile variables]] || [[NML:Airports#Airport tile callbacks|tile callbacks]] || FEAT_AIRPORTTILES&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Objects|Objects]] || [[NML:Objects#Object properties|properties]] || [[NML:Objects#Object variables|variables]] || [[NML:Objects#Object callbacks|callbacks]] || FEAT_OBJECTS&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Railtypes|Railtypes]] || [[NML:Railtypes#Railtype properties|properties]] || [[NML:Railtypes#Railtype variables|variables]] || [[NML:Railtypes#Railtype callbacks|callbacks]] || FEAT_RAILTYPES&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Roadtypes|Roadtypes]] || [[NML:Roadtypes#Roadtype properties|properties]] || [[NML:Roadtypes#Roadtype variables|variables]] || [[NML:Roadtypes#Roadtype callbacks|callbacks]] || FEAT_ROADTYPES&lt;br /&gt;
|-&lt;br /&gt;
|[[NML:Tramtypes|Tramtypes]] || [[NML:Tramtypes#Tramtype properties|properties]] || [[NML:Tramtypes#Tramtype variables|variables]] || [[NML:Tramtypes#Tramtype callbacks|callbacks]] || FEAT_TRAMTYPES&lt;br /&gt;
|- &lt;br /&gt;
|Signals|| || || || FEAT_SIGNALS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;[[NML:Warnings|Compiler Warnings]]&lt;br /&gt;
;[[NML:Additional references|Additional references]]&lt;br /&gt;
*[[NML:Animation speed|Animation speed]]&lt;br /&gt;
*[[NML:Default industries|Default industries]]&lt;br /&gt;
*[[NML:Default industry tiles|Default industry tiles]]&lt;br /&gt;
*[[NML:Base cost table|Base cost table]]&lt;br /&gt;
*[[NML:List of sound effects|List of sound effects]]&lt;br /&gt;
*[[NML:List of default vehicle IDs|List of default vehicle IDs]]&lt;br /&gt;
*[[NML:List of default house properties|List of default house properties]]&lt;br /&gt;
*[[NML:List of town zones|List of town zones]]&lt;br /&gt;
*[[NML:List of tile classes|List of tile classes]]&lt;br /&gt;
*[[NML:List of default colour translation palettes|List of default colour translation palettes]]&lt;br /&gt;
*[[NML:List of direction constants|List of direction constants]]&lt;br /&gt;
*[[NML:List of tile slopes|List of tile slopes]]&lt;br /&gt;
*[[NML:List of tiles|List of tiles]]&lt;br /&gt;
*[[NML:Default TTD strings|Default TTD strings]]&lt;br /&gt;
*[[NML:Deprecated syntax|Deprecated syntax]]&lt;br /&gt;
;[[NML:NewGRF compatibility|NewGRF compatibility]]&lt;br /&gt;
;[[NML:Old style callbacks|Old-style callbacks]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[NML:Manual of style|Manual of style]]&lt;/div&gt;</summary>
		<author><name>2talltyler</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=ObjectLabels&amp;diff=4052</id>
		<title>ObjectLabels</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=ObjectLabels&amp;diff=4052"/>
		<updated>2020-08-11T20:42:19Z</updated>

		<summary type="html">&lt;p&gt;2talltyler: /* Recommendations - Author defined */ Add object class labels for Improved Town Industries&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Object labels=&lt;br /&gt;
&lt;br /&gt;
Defining Object Class Label Recommendations&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Recommendations - Predefined ==&lt;br /&gt;
&lt;br /&gt;
# Predefined labels are best used for single objects that are not part of a comprehensive set&lt;br /&gt;
# It is possible to have a label for each object. This would make for a very ungainly menu.&lt;br /&gt;
# A labeling system allows a coder/author to make their works much more user friendly.&lt;br /&gt;
# To keep the numbers more manageable, the classes are as generic as possible.&lt;br /&gt;
# While being generic, assigning objects to a label should be intuitive.&lt;br /&gt;
# Assuming that there will be special circumstances where a coder/author needs to deviate from the norm, &#039;&#039;&#039;the Recommendation is not mandatory&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!colspan=3|PREDEFINED RECOMMENDATIONS&lt;br /&gt;
|-&lt;br /&gt;
!Label!!Action4 Text!!Description&lt;br /&gt;
|-&lt;br /&gt;
|STRU||Structures||Multitile engineered objects that don&#039;t quite fit in as industries, houses or stations - dams etc.&lt;br /&gt;
|-&lt;br /&gt;
|INFR||Infrastructure||light poles, communication towers, transmission towers, road signs, etc.&lt;br /&gt;
|-&lt;br /&gt;
|BLDG||Buildings||Normally accommodated by industries, houses or stations but the author feels there are limiting circumstances.&lt;br /&gt;
|-&lt;br /&gt;
|NATR||Natural objects||caves, coral reefs, swamps, etc.&lt;br /&gt;
|-&lt;br /&gt;
|PARK||Public areas||Normally accommodated by towns or industries (tourist stuff ...) but the author feels there are limiting circumstances - Parks, statues, etc.&lt;br /&gt;
|-&lt;br /&gt;
|ARTF||Artifacts||They really don&#039;t fit under any of the above - shipwrecks, etc.&lt;br /&gt;
|-&lt;br /&gt;
|MISC||Miscellaneous||For the author who is unable to accommodate his/her object under any of the previous labels.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Recommendations - Author defined ==&lt;br /&gt;
&lt;br /&gt;
# Author defined labels are best used for comprehensive object sets that consist of several obviously related objects.&lt;br /&gt;
# Each label must consist of four (4) alphanumeric characters.&lt;br /&gt;
# To prevent menu confusion, new labels should be unique and should not duplicate predefined labels (see chart above) nor previously selected author defined labels (see chart below).&lt;br /&gt;
# The author should add their label(s) to the following chart in alphanumeric order.&lt;br /&gt;
# If an author is uncomfortable with adding a label to the chart, they can PM their request to [http://www.tt-forums.net/ucp.php?i=pm&amp;amp;amp;mode;=compose&amp;amp;amp;action; wallyweb].&lt;br /&gt;
# The chart will be regularly reviewed for duplications.&lt;br /&gt;
# The chart will be regularly edited for alphanumeric sequence.&lt;br /&gt;
&lt;br /&gt;
{| |-&lt;br /&gt;
!colspan=5|AUTHOR DEFINED RECOMMENDATIONS&lt;br /&gt;
|-&lt;br /&gt;
!Label!!Action4 Text!!Description!!Author!!TT-Forums link&lt;br /&gt;
|-&lt;br /&gt;
|EXM1||Example 1||An example label listing||your name here||Forum link goes here&lt;br /&gt;
|-&lt;br /&gt;
|HOUS||TARS Landscape: Village Houses||Houses as Objects||Yoshi||http://www.tt-forums.net/viewtopic.php?t=61442&lt;br /&gt;
|-&lt;br /&gt;
|HSFA||Farm Tiles||Farm tiles for Improved Town Industries||2TallTyler||https://www.tt-forums.net/viewtopic.php?f=67&amp;amp;t=87332&lt;br /&gt;
|-&lt;br /&gt;
|HSIN||Industry Tiles||Industry tiles for Improved Town Industries||2TallTyler||https://www.tt-forums.net/viewtopic.php?f=67&amp;amp;t=87332&lt;br /&gt;
|-&lt;br /&gt;
|HTLG||&#039;&#039;&#039;T&#039;&#039;&#039;ARS Mountain &#039;&#039;&#039;L&#039;&#039;&#039;ifts: &#039;&#039;&#039;G&#039;&#039;&#039;ondola||Gondolas||Yoshi||&lt;br /&gt;
|-&lt;br /&gt;
|HTLC||&#039;&#039;&#039;T&#039;&#039;&#039;ARS Mountain &#039;&#039;&#039;L&#039;&#039;&#039;ifts: &#039;&#039;&#039;C&#039;&#039;&#039;hairlift||Chairlifts||Yoshi||&lt;br /&gt;
|-&lt;br /&gt;
|HTPT||&#039;&#039;&#039;T&#039;&#039;&#039;ARS &#039;&#039;&#039;P&#039;&#039;&#039;istes: &#039;&#039;&#039;T&#039;&#039;&#039;rail Blazer||Pistes Ski Slopes||wallyweb||http://www.tt-forums.net/viewtopic.php?f=26&amp;amp;t=56588&lt;br /&gt;
|-&lt;br /&gt;
|HTML||&#039;&#039;&#039;T&#039;&#039;&#039;ARS &#039;&#039;&#039;M&#039;&#039;&#039;ountain: &#039;&#039;&#039;L&#039;&#039;&#039;odges||Lodges for the slopes||wallyweb||http://www.tt-forums.net/viewtopic.php?f=26&amp;amp;t=56588&lt;br /&gt;
|-&lt;br /&gt;
|NLRA||Dutch Road Furniture: Matrix Activators||Activators for matrix signs for Dutch Road Furniture||FooBar||http://www.tt-forums.net/viewtopic.php?t=56316&lt;br /&gt;
|-&lt;br /&gt;
|NLRF||Dutch Road Furniture||For Dutch road related objects (generic label)||FooBar||http://www.tt-forums.net/viewtopic.php?t=56316&lt;br /&gt;
|-&lt;br /&gt;
|NLRM||Dutch Road Furniture: Motorways||Motorway related objects for Dutch Road Furniture||FooBar||http://www.tt-forums.net/viewtopic.php?t=56316&lt;br /&gt;
|-&lt;br /&gt;
|NLRS||Dutch Road Furniture: Signs and Fingerposts||Road signs and fingerposts for Dutch Road Furniture||FooBar||http://www.tt-forums.net/viewtopic.php?t=56316&lt;br /&gt;
|-&lt;br /&gt;
|SZFO||To infinity and beyond||Famous monuments from movies and more||SilverSurferZzZ||http://www.tt-forums.net/viewtopic.php?f=67&amp;amp;t=74439&lt;br /&gt;
|-&lt;br /&gt;
|SZJW||Lets go... Journey around the world||Famous monuments from all world||SilverSurferZzZ||http://www.tt-forums.net/viewtopic.php?f=67&amp;amp;t=74446&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>2talltyler</name></author>
	</entry>
</feed>