Action0/Vehicles

From GRFSpecs
Jump to navigationJump to search

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.