Action0/Vehicles

From GRFSpecs
< Action0
Revision as of 18:18, 16 December 2008 by Frosch (talk | contribs)
Jump to navigationJump to search

Action 0 properties common to all vehicle types

Action 0 - General properties for all vehicle types

Defining properties of vehicles.

-=Introduction=-

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

-=Properties=-

||Number|Version|Size|Description

00| |W|date of introduction

02| |B|reliability decay speed

03| |B|vehicle life in years

04| |B|model life in years

06| |B|climate availability

07|2|B|load amount||

Properties 00 to 06 only apply to new games, or when using Cht: ResetVehicles.

-=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".  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.

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.

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. (This is only important for very early introduction dates before 1800.)

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.

Note: This property also works for wagons since TTDP 2.5 beta 7 resp. OTTD 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.

Load amount

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.

Note: For aircraft carrying both passengers and mail this property is broken (wrt. mail) in TTDP and OTTD before r14672.

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.