Difference between revisions of "Action0/Vehicles"

From GRFSpecs
Jump to navigationJump to search
(fixed tables)
m (loading speed better describes prop. 0x07)
 
(19 intermediate revisions by 6 users not shown)
Line 1: Line 1:
  +
<div style="float:right; padding-left:12px; background:none;">{{NFONavVehicles}}</div>
Action 0 properties common to all vehicle types
 
 
Defining properties of vehicles.
 
 
=Introduction=
 
   
 
== Introduction ==
 
Action 0 properties common to all vehicle types:
 
The four vehicle types (trains, road vehicles, ships and planes) all have some common properties, which are described here.
 
The four vehicle types (trains, road vehicles, ships and planes) all have some common properties, which are described here.
   
=Properties=
+
== Properties ==
   
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
!Number !!Version !!Size !!Description !!Available for articulated parts
+
!Number !![[GRFActionsDetailed|Size]]!!Version !!Description !!Available for articulated parts
 
|-
 
|-
|00 || ||W||date of introduction||no
+
|00 ||W||{{ottdp|0.6|2.0}}||date of introduction||no
 
|-
 
|-
| 02|| ||B||reliability decay speed||no
+
| 02||B||{{ottdp|0.6|2.0}}||reliability decay speed||no
 
|-
 
|-
| 03|| ||B||vehicle life in years||no
+
| 03||B||{{ottdp|0.6|2.0}}||vehicle life in years||no
 
|-
 
|-
| 04|| ||B||model life in years||no
+
| 04||B||{{ottdp|0.6|2.0}}||model life in years||no
 
|-
 
|-
| 06|| ||B||climate availability||should be zero
+
| 06||B||{{ottdp|0.6|2.0}}||climate availability||should be zero
 
|-
 
|-
| 07||2||B||load amount||yes
+
| 07||B||{{ottdp|0.6|2.0}} {{grfFrom|2}}||loading speed||yes
 
|}
 
|}
   
TTDPatch only: Properties 00 to 06 only apply to new games, or when using [[ResetVehicleData|Cht: ResetVehicles]].
+
In TTDPatch properties 00 to 06 only apply to new games, or when using [[ttwiki:ResetVehicleData|Cht: ResetVehicles]].
  +
In OpenTTD the same holds for 00, 02, 04 and 06 (i.e. not for 03) unless using [[ottdwiki:Console#Other_commands|resetengines]].
   
=Description=
+
== Description ==
   
==Date of introduction==
+
=== Date of introduction ===
   
The date is specified as number of days since 1920 where TTD counts 365,25 days in a year. It will have a random number from 0 to 511 days added to it at the start of every new game, or after using &quot;Cht: ResetVehicles&quot; (TTDPatch). &nbsp;Note that TTD stops updating vehicle type data after the game ends in 2050, so all dates of introduction should be no later than in 2044, to ensure that all vehicle types can be introduced and reach their maximum reliability.
+
The date is specified as number of days since 1920 where TTD counts 365,25 days in a year. It will have a random number from 0 to 511 days added to it at the start of every new game, or after using [[ttwiki:ResetVehicleData|Cht: ResetVehicles]] (TTDPatch) resp. [[ottdwiki:Console#Other_commands|resetengines]] (OpenTTD).
   
  +
{{ottdp|&lt;0.7|}} Note that TTD stops updating vehicle type data after the game ends in 2050, so all dates of introduction should be no later than in 2044, to ensure that all vehicle types can be introduced and reach their maximum reliability. This restriction does not apply to OpenTTD 0.7 and newer.
In TTDPatch: If the property value is 729 (2D9h) or less, i.e. before 1922, the random number is not added and the vehicle is introduced at exactly the given date.
 
   
 
{{ottdp|&lt;0.7| |ottdrev=before r16929}} If the property value is 729 (2D9h) or less, i.e. before 1922, the random number is not added and the vehicle is introduced at exactly the given date.
In OpenTTD: Since r16929 the start date is not randomised in the first two years after game-start (no matter whether before or after 1922).
 
   
 
{{ottdp|0.7|no}} Since OpenTTD r16929 the start date is not randomised in the first two years after game-start (no matter whether before or after 1922).
The \w&lt;date&gt; escape sequence is especially useful here. See [[GRFActionsDetailed#Byte_order|the discussion of escape sequences]] for further information.
 
   
 
The \w&lt;date&gt; escape sequence is especially useful here. See [[GRFActionsDetailed#Byte order|the discussion of escape sequences]] for further information.
==Reliability decay speed==
 
   
 
=== Reliability decay speed ===
The reliability decay speed is set when a new vehicle is bought, and specifies how quickly the reliability decays after servicing. &nbsp;The initial TTD default for all vehicles is 20. &nbsp;If a vehicle goes without servicing for a long time, or if it gets very, very old, this number increases, meaning faster decay and more breakdowns. &nbsp;Larger numbers mean faster decay, smaller number slower decay. &nbsp;If set to 0, reliability never decreases in normal operation.
 
   
 
The reliability decay speed is set when a new vehicle is bought, and specifies how quickly the reliability decays after servicing. &nbsp;The initial TTD default for all vehicles is 20. &nbsp;If a vehicle goes without servicing for a long time, or if it gets very, very old, this number increases, meaning faster decay and more breakdowns. &nbsp;Larger numbers mean faster decay, smaller number slower decay. If set to 0, reliability never decreases in normal operation.
==Vehicle life==
 
  +
 
=== Vehicle life ===
   
 
The number of years before a particular vehicle is considered too old and needs replacing,
 
The number of years before a particular vehicle is considered too old and needs replacing,
   
==Model life==
+
=== Model life ===
   
 
The number of years that this model can be bought in the game (if PersistentEngines is off). &nbsp;Usually this should be at least twice or three times as &nbsp;long as the vehicle life. &nbsp;When starting a new game, a random amount between 31 months and 17 years is added to this as well.
 
The number of years that this model can be bought in the game (if PersistentEngines is off). &nbsp;Usually this should be at least twice or three times as &nbsp;long as the vehicle life. &nbsp;When starting a new game, a random amount between 31 months and 17 years is added to this as well.
Line 75: Line 76:
 
If the early retirement property is set, the vehicle is retired this many years before the end of phase 2 (can be negative if desired), but not if persistentengines would keep the model alive.
 
If the early retirement property is set, the vehicle is retired this many years before the end of phase 2 (can be negative if desired), but not if persistentengines would keep the model alive.
   
Note: This property also works for wagons since TTDP 2.5 beta 7 resp. OTTD r14680.
+
{{ottdp|0.7|2.5|ottdrev=r14680|ttdprev=2.5 beta 7}} This property also works for wagons since TTDPatch 2.5 beta 7 resp. OpenTTD r14680.
   
==Climate availability==
+
=== Climate availability ===
   
 
This is a bit mask of the climates in which this model is available. &nbsp;Simply add the values for the climates:
 
This is a bit mask of the climates in which this model is available. &nbsp;Simply add the values for the climates:
Line 96: Line 97:
 
For example, 1+2+4 = 07 would make a vehicle available in all climates except Toyland.
 
For example, 1+2+4 = 07 would make a vehicle available in all climates except Toyland.
   
If you need a vehicle not to be available through the purchase menu, e.g. a locomotive tender being part of an articulated vehicle (locomotive and tender), you may use a value of zero for the bit mask. Same procedure works for vehicles to be used exlusively by TTDPatch's AI, but not by a human player.
+
If you need a vehicle not to be available through the purchase menu, e.g. a locomotive tender being part of an articulated vehicle (locomotive and tender), you may use a value of zero for the bit mask.
  +
  +
{{ottdp|no|2.5}} Same procedure works for vehicles to be used exlusively by [[Callback:_AI_construction/purchase_selection |TTDPatch's AI]], but not by a human player.
   
==Load amount==
+
=== Loading speed ===
 
This is the amount of cargo transferred per unit of time if using gradualloading. The default is 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.
   
  +
If [[Action0/Vehicles/Trains#Miscellaneous_flags_.2827.29|Miscellaneous flag 5]] is set, the load amount specified in this property is scaled using [[Action0/Cargos#Capacity_multiplier_.281D.29|Cargo property 1D]].
This is the amount of cargo transferred per unit of time if using gradualloading. &nbsp;The default is 5 for trains and road vehicles, 10 for ships and 20 for aircraft.
 
   
Note: For aircraft carrying both passengers and mail this property is broken (wrt. mail) in TTDP and OTTD before r14672.
+
{{ottdp|&lt;0.7||ottdrev=before r14672}} For aircraft carrying both passengers and mail this property is broken (wrt. mail) in TTDPatch and OpenTTD before r14672. All aircraft effectively use the load amount of the train engine with ID 00.
   
Since OTTD r14672 this property is used for passengers, while mail uses 1/4 (rounded up). You can use callback 12 to control load amounts for passengers and mail independently.
+
{{ottdp|0.7|no|ottdrev=r14672}} Since OpenTTD r14672 this property is used for passengers, while mail uses 1/4 (rounded up). You can use [[Callbacks#Load amount (12)|callback 12]] to control load amounts for passengers and mail independently.

Latest revision as of 14:27, 24 June 2014

Introduction

Action 0 properties common to all vehicle types: The four vehicle types (trains, road vehicles, ships and planes) all have some common properties, which are described here.

Properties

Number Size Version Description Available for articulated parts
00 W Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 date of introduction no
02 B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 reliability decay speed no
03 B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 vehicle life in years no
04 B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 model life in years no
06 B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 climate availability should be zero
07 B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 GRFv≥2 loading speed yes

In TTDPatch properties 00 to 06 only apply to new games, or when using Cht: ResetVehicles. In OpenTTD the same holds for 00, 02, 04 and 06 (i.e. not for 03) unless using resetengines.

Description

Date of introduction

The date is specified as number of days since 1920 where TTD counts 365,25 days in a year. It will have a random number from 0 to 511 days added to it at the start of every new game, or after using Cht: ResetVehicles (TTDPatch) resp. resetengines (OpenTTD).

Supported by OpenTTD <0.7<0.7 Supported by TTDPatch Note that TTD stops updating vehicle type data after the game ends in 2050, so all dates of introduction should be no later than in 2044, to ensure that all vehicle types can be introduced and reach their maximum reliability. This restriction does not apply to OpenTTD 0.7 and newer.

Supported by OpenTTD <0.7 (before r16929)<0.7 Supported by TTDPatch If the property value is 729 (2D9h) or less, i.e. before 1922, the random number is not added and the vehicle is introduced at exactly the given date.

Supported by OpenTTD 0.70.7 Not supported by TTDPatch Since OpenTTD r16929 the start date is not randomised in the first two years after game-start (no matter whether before or after 1922).

The \w<date> escape sequence is especially useful here. See the discussion of escape sequences for further information.

Reliability decay speed

The reliability decay speed is set when a new vehicle is bought, and specifies how quickly the reliability decays after servicing.  The initial TTD default for all vehicles is 20.  If a vehicle goes without servicing for a long time, or if it gets very, very old, this number increases, meaning faster decay and more breakdowns.  Larger numbers mean faster decay, smaller number slower decay. If set to 0, reliability never decreases in normal operation.

Vehicle life

The number of years before a particular vehicle is considered too old and needs replacing,

Model life

The number of years that this model can be bought in the game (if PersistentEngines is off).  Usually this should be at least twice or three times as  long as the vehicle life.  When starting a new game, a random amount between 31 months and 17 years is added to this as well.

If the early retirement property (26/1B/16/16) is not set, the model life works like this:

Phase Duration Reliability
1 7 to 38 months increases from 48-73% to 75-100%
2 prop. 04 less 8 years stays constant at peak, 75-100%
3 10 to 20.5 years decreases from peak to 25-50%

(the ranges in time and reliability are randomized at the start of each game)

At the end of phase 3, the model is retired and removed from the purchase list.  Note that when the model reliability starts dropping in phase 3, so does the reliability of every single vehicle of this make in the game.

Setting this property to 0xFF means the model will never expire.

If persistentengines is on, the model never gets to within two years of the end of phase 2, it is kept in phase 2 as long as at least one vehicle of this make is in the game.

If the early retirement property is set, the vehicle is retired this many years before the end of phase 2 (can be negative if desired), but not if persistentengines would keep the model alive.

Supported by OpenTTD 0.7 (r14680)0.7 Supported by TTDPatch 2.5 (2.5 beta 7)2.5 This property also works for wagons since TTDPatch 2.5 beta 7 resp. OpenTTD r14680.

Climate availability

This is a bit mask of the climates in which this model is available.  Simply add the values for the climates:

Bit Value Climate
0 1 Temperate
1 2 Arctic
2 4 Tropical
3 8 Toyland

For example, 1+2+4 = 07 would make a vehicle available in all climates except Toyland.

If you need a vehicle not to be available through the purchase menu, e.g. a locomotive tender being part of an articulated vehicle (locomotive and tender), you may use a value of zero for the bit mask.

Not supported by OpenTTD Supported by TTDPatch 2.52.5 Same procedure works for vehicles to be used exlusively by TTDPatch's AI, but not by a human player.

Loading speed

This is the amount of cargo transferred per unit of time if using gradualloading. The default is 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.

If Miscellaneous flag 5 is set, the load amount specified in this property is scaled using Cargo property 1D.

Supported by OpenTTD <0.7 (before r14672)<0.7 Supported by TTDPatch For aircraft carrying both passengers and mail this property is broken (wrt. mail) in TTDPatch and OpenTTD before r14672. All aircraft effectively use the load amount of the train engine with ID 00.

Supported by OpenTTD 0.7 (r14672)0.7 Not supported by TTDPatch Since OpenTTD r14672 this property is used for passengers, while mail uses 1/4 (rounded up). You can use callback 12 to control load amounts for passengers and mail independently.