Action0/Vehicles/RoadVehicles

From GRFSpecs

Jump to: navigation, search

Contents

Introduction

Defining properties of road vehicles.

Properties

NumberSizeVersionDescriptionAvailable for articulated parts
08BSupported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0Speed in mph*3.2no
09BSupported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0Running cost factorshould be zero
0ADSupported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0Running cost base, see belowshould be zero
0EBSupported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0Sprite ID (FF for new graphics)yes
0FBSupported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0Capacityyes
10BSupported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0Cargo type, see CargoTypes

GRFv≤7 For GRF version 7 and below: Type B 'cargo slot'
GRFv≥8 For GRF version 8 and above: Type A '(translated) cargo bit'

yes
11BSupported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0Cost factorshould be zero
12BSupported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0Sound effect: 17/19/1A for regular, 3C/3E for toylandno
13BSupported by OpenTTD 1.11.1 Supported by TTDPatch 2.02.0 GRFv≥2Power in 10 hp, see belowshould be zero
14BSupported by OpenTTD 1.11.1 Supported by TTDPatch 2.02.0 GRFv≥2Weight in 1/4 tons, see belowshould be zero
15BSupported by OpenTTD 0.70.7 Supported by TTDPatch 2.02.0 GRFv≥2Speed in mph*0.8, see belowno
16DSupported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 GRFv≥2Bit mask of cargo types available for refitting (not refittable if 0 or unset), see column 2 (bit values) in CargoTypesyes
17BSupported by OpenTTD 0.60.6 Supported by TTDPatch 2.52.5 GRFv≥6Callback flags bit mask, see belowyes
18BSupported by OpenTTD 1.11.1 Supported by TTDPatch 2.5 (alpha 30)2.5Coefficient of tractive effortshould be zero
19BSupported by OpenTTD 1.11.1 Supported by TTDPatch 2.5 (alpha 30)2.5Coefficient of air dragshould be zero
1ABSupported by OpenTTD 0.60.6 Supported by TTDPatch 2.5 (alpha 30)2.5Refit cost, using 25% of the purchase price cost baseyes
1BBSupported by OpenTTD 0.60.6 Supported by TTDPatch 2.5 (alpha 44)2.5Retire vehicle early, this many years before the end of phase 2 (see Action0General)no
1CBSupported by OpenTTD 0.60.6 Supported by TTDPatch 2.5 (alpha 58)2.5Miscellaneous vehicle flagspartly ("tram" should be same as front)
1DWSupported by OpenTTD 0.60.6 Supported by TTDPatch 2.5 (alpha 58)2.5Refittable cargo classes, see train prop. 28yes
1EWSupported by OpenTTD 0.60.6 Supported by TTDPatch 2.5 (alpha 58)2.5Non-refittable cargo classes, see train prop. 29yes
1FDSupported by OpenTTD 0.6 (r7191)0.6 Supported by TTDPatch 2.5 (r1210)2.5Long format introduction dateno
20B*Supported by OpenTTD 0.7 (r13831)0.7 Not supported by TTDPatchSort the purchase listno
21BSupported by OpenTTD 1.1 (r21240)1.1 Not supported by TTDPatchVisual effectyes
22WSupported by OpenTTD 1.2 (r22713)1.2 Not supported by TTDPatchCustom cargo ageing periodyes
23BSupported by OpenTTD 1.2 (r23164)1.2 Not supported by TTDPatchMake vehicle shorter, see train property 21yes
24B n*BSupported by OpenTTD 1.2 (r23291)1.2 Not supported by TTDPatchList of always refittable cargo types, see train property 2Cyes
25B n*BSupported by OpenTTD 1.2 (r23291)1.2 Not supported by TTDPatchList of never refittable cargo types, see train property 2Dyes

Description

Running cost base (0A) and factor (09)

TTD calculates all costs by multiplying a 48-bit base amount with an 8-bit factor.  The base amount is changed according to inflation, whereas the factor remains constant.

For the running costs of road vehicles, the following base amounts are available:

TypeValuein little-endian notation
Road vehicle running cost base4C4848 4C 00 00

Theoretically, you could use pointers to other base amounts available in TTD, but these are the numbers TTD uses for road vehicles.

Cost factor (11)

The cost factor is a bit-coded value which determines how expensive a vehicle is. The table below gives you some values to use for finding the right price for your vehicles.

Cost factorPrice
00$ 0
01$ 108
10$ 1,750
20$ 3,500
80$ 14,000
FF$ 27,890

Realistic acceleration properties (13, 14, 15)

Using property 15 to set the speed, it is possible to achieve speeds larger than 80 mph (127 km/h), to which property 08 is limited. When setting property 15, always set property 08 as well, so that the vehicle works reasonably well whether realistic acceleration is turned on or off. If property 15 is not set, the value from property 08 is used instead.

Supported by TTDPatch TTDPatch uses these properties only if road vehicles are set to realistic acceleration in the NewCurveAndMountainHandling switch. They are ignored otherwise.

Supported by OpenTTD OpenTTD uses these properties always, if they are defined and gives the speed defined here precedence over the one defined in property 08.

Callbacks (17)

For road vehicles, the following callbacks have to be enabled by setting the corresponding bit in property 17 (certain other, not as frequently used callbacks are available without setting a bit here):

BitValueVariable 0C valueCallback
1211Wagon length
2412Load amount
3815Set refitted capacity
41016Build articulated vehicle
52019show a suffix after the cargo type name
6402DSelect color mapping for vehicle
78033Sound effect callbacks

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.

Coefficient of tractive effort (18)

This cofficient sets what fraction of the vehicle weight is equal to the maximum tractive effort.  This includes the effect of having some unpowered axles, as well as the coefficient of friction that is available.

For 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.

Coefficient of air drag (19)

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).

The default values are the following:

top speed (mph/1.6)<16162432486496128192256...
c2192128966448322416128

For higher speeds, the series is continued in the same manner.

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's consistent scaling.  If a vehicle doesn't reach its historical top speed, you might try setting prop. 19 one or two higher than the default above, otherwise it's probably a good idea to leave it at the default.

Refit cost (1A)

Refit cost, using 25% of the purchase price cost base. This property can be overridden by callback 15E.

Supported by OpenTTD 1.2 (r23087)1.2 Not supported by TTDPatch If the refit cost factor is set to zero and bit 4 of the miscellaneous flags (1C) is set, auto-refitting is allowed.

Miscellaneous flags (1C)

This is a bit mask, with the following bits:

BitValueMeaning
01Vehicle is a tram/light rail vehicle and requires tram tracks to operate
12Uses two company colors
24reserved, do not use
38reserved, do not use
410Supported by OpenTTD 1.2 (r23087)1.2 Not supported by TTDPatch Auto-refitting is enabled for refits where callback 15E allows it or prop 1A specifies zero cost.
5 20Supported by OpenTTD 1.2 (r23861)1.2 Not supported by TTDPatch Use cargo multiplier for default cargo. See page about vehicle refitting.
6 40Supported by OpenTTD 1.3 (r24124)1.3 Not supported by TTDPatch Disable breakdown smoke effect.

Long format introduction date (1F)

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.

Not supported by OpenTTD Supported by TTDPatch In TTDPatch, dates after 2044 will be limited to 2044.

Sort vehicle list (20)

See sort vehicle list for trains for details.

Visual effect (21)

See the equivalent train property for information about the meaning of all bits. There is no default effect for road vehicles, therefore values of 00..0F will show no visual effect. Bit 7 (disable wagon power) currently has no meaning and should be left at 0.

Custom cargo ageing period (22)

See custom cargo ageing period for trains for details.

Example

To be written

Personal tools
advertisement