Difference between revisions of "Callback: Change vehicle properties"
(→Change vehicle properties (36): Custom cargo ageing) |
Planetmaker (talk | contribs) (Use version macros) |
||
Line 6: | Line 6: | ||
{| |- |
{| |- |
||
− | !Feature!! |
+ | !Feature!!Version!!Property!!Remarks |
|- |
|- |
||
− | |Trains (00)||''07 (Load amount)'' |
+ | |Trains (00)||{{ottdp|no|no}}||''07 (Load amount)''||''Changeable via [[Callbacks#Load amount callback 12|callback 12]]'' |
|- |
|- |
||
− | ||| |
+ | |||{{ottdp|0.6|2.5|ttdprev=beta 6|ottdrev=r9671}}||09 (Speed)|| |
|- |
|- |
||
− | ||| |
+ | |||{{ottdp|0.6|2.5|ttdprev=beta 6|ottdrev=r9671 }}||0B (Power)|| |
|- |
|- |
||
− | |||0D (Running cost factor) |
+ | |||{{ottdp|0.6|2.6|ttdprev=r1420|ottdrev=r9671}}||0D (Running cost factor)|| |
|- |
|- |
||
− | ||| |
+ | |||{{ottdp|0.6|2.6|ttdprev=r1966|ottdrev=r9828}}||14 (Cargo capacity)||See also [[Callbacks#Refitted capacity callback 15|callback 15]] |
|- |
|- |
||
− | ||| |
+ | |||{{ottdp|0.6|2.5|ttdprev=r1887|ottdrev=r9780}}||16 (Weight)|| |
|- |
|- |
||
− | |||17 (Cost factor) |
+ | |||{{ottdp|0.6| |ottdrev=r9806}}||17 (Cost factor)|| |
|- |
|- |
||
− | ||| |
+ | |||{{ottdp|0.6|2.5|ttdprev=beta 6|ottdrev=r9671}}||1F (Tractive effort)|| |
|- |
|- |
||
− | |||''21 (Short wagons)'' |
+ | |||{{ottdp|no|no}}||''21 (Short wagons)''||''Changeable via [[Callbacks#Wagon length callback 11|callback 11]]'' |
|- |
|- |
||
− | |||''22 (Visual effect & powered wagons)'' |
+ | |||{{ottdp|no|no}}||''22 (Visual effect & powered wagons)''||''Changeable via [[Callbacks#Visual effect and wagon power 10|callback 10]]'' |
|- |
|- |
||
− | ||| |
+ | |||{{ottdp|0.6|2.5|ttdprev=beta 6|ottdrev=r11431}}||25 (User data)|| |
|- |
|- |
||
− | |||2B (Custom cargo ageing period) |
+ | |||{{ottdp|1.2|no|ottdrev=r22713}}||2B (Custom cargo ageing period)|| |
|- |
|- |
||
− | |Road Vehicles (01)||''07 (Load amount)'' |
+ | |Road Vehicles (01)||{{ottdp|no|no}}||''07 (Load amount)''||''Changeable via [[Callbacks#Load amount callback 12|callback 12]]'' |
|- |
|- |
||
− | |||09 (Running cost factor) |
+ | |||{{ottdp|1.0| |ottdrev=r18011}}||09 (Running cost factor)|| |
|- |
|- |
||
− | |||0F (Cargo capacity) |
+ | |||{{ottdp|0.6| |ottdrev=r9828}}||0F (Cargo capacity)||See also [[Callbacks#Refitted capacity callback 15|callback 15]] |
|- |
|- |
||
− | |||11 (Cost factor) |
+ | |||{{ottdp|0.6| |ottdrev=r9806}}||11 (Cost factor)|| |
|- |
|- |
||
− | ||| |
+ | |||{{ottdp|1.1| |ottdrev=r21058}}||13 (Power)|| |
|- |
|- |
||
− | ||| |
+ | |||{{ottdp|1.1| |ottdrev=r21058}}||14 (Weight)|| |
|- |
|- |
||
− | ||| |
+ | |||{{ottdp|1.1| |ottdrev=r21100}}||15 (Speed)|| |
|- |
|- |
||
− | |||18 (Tractive effort) |
+ | |||{{ottdp|1.1| |ottdrev=r21058}}||18 (Tractive effort)|| |
|- |
|- |
||
− | |||''21 (Visual effect)'' |
+ | |||{{ottdp|no|no}}||''21 (Visual effect)''||''Changeable via [[Callbacks#Visual effect and wagon power 10|callback 10]]'' |
|- |
|- |
||
− | |||22 (Custom cargo ageing period) |
+ | |||{{ottdp|1.2|no|ottdrev=r22713}}||22 (Custom cargo ageing period)|| |
|- |
|- |
||
− | |Ships (02)||''07 (Load amount)'' |
+ | |Ships (02)||{{ottdp|no|no}}||''07 (Load amount)''||''Changeable via [[Callbacks#Load amount callback 12|callback 12]]'' |
|- |
|- |
||
+ | |||{{ottdp|0.6|2.6|ttdprev=r1990|ottdrev=r9806}}||0A (Cost factor)|| |
||
− | |||0A (Cost factor)|| TTDPatch 2.6 rev 1990 ||r9806|| |
||
|- |
|- |
||
− | ||| |
+ | |||{{ottdp|0.6|2.5|ttdprev=beta 6|ottdrev=r9671}}||0B (Speed)|| |
|- |
|- |
||
− | ||| |
+ | |||{{ottdp|0.6|2.6|ttdprev=r1990|ottdrev=r9828}}||0D (Cargo capacity)||See also [[Callbacks#Refitted capacity callback 15|callback 15]] |
|- |
|- |
||
− | |||0F (Running cost factor) |
+ | |||{{ottdp|0.6|2.6|ttdprev=r1510|ottdrev=r9808}}||0F (Running cost factor)|| |
|- |
|- |
||
− | |||''1C (Visual effect)'' |
+ | |||{{ottdp|no|no}}||''1C (Visual effect)''||''Changeable via [[Callbacks#Visual effect and wagon power 10|callback 10]]'' |
|- |
|- |
||
− | |||1D (Custom cargo ageing period) |
+ | |||{{ottdp|1.2|no|ottdrev=r22713}}||1D (Custom cargo ageing period)|| |
|- |
|- |
||
− | |Planes (03)||''07 (Load amount)'' |
+ | |Planes (03)||{{ottdp|no|no}}||''07 (Load amount)''||''Changeable via [[Callbacks#Load amount callback 12|callback 12]]'' |
|- |
|- |
||
− | |||0B (Cost factor) |
+ | |||{{ottdp|0.6| |ottdrev=r9806}}||0B (Cost factor)|| |
|- |
|- |
||
− | ||| |
+ | |||{{ottdp|0.6|2.5|ttdprev=beta 6|ottdrev=r9671}}||0C (Speed)|| |
|- |
|- |
||
− | |||0E (Running cost factor) |
+ | |||{{ottdp|0.6|2.6|ttdprev=r1507|ottdrev=r9678}}||0E (Running cost factor)|| |
|- |
|- |
||
− | |||0F (Passenger capacity) |
+ | |||{{ottdp|1.0| |ottdrev=r19218}}||0F (Passenger capacity)||See also [[Callbacks#Refitted capacity callback 15|callback 15]] |
|- |
|- |
||
− | |||11 (Mail capacity)|| |
+ | |||{{ottdp|1.0| |ottdrev=r19218}}||11 (Mail capacity)|| |
|- |
|- |
||
− | |||1C (Custom cargo ageing period) |
+ | |||{{ottdp|1.2|no|ottdrev=r22713}}||1C (Custom cargo ageing period)|| |
|} |
|} |
||
Revision as of 22:47, 3 August 2011
Change vehicle properties (36)
This common callback allows modification of certain properties of a vehicle for which there exists no specific callback (like CBs 10, 11, 12). The low byte of variable 10 holds the property number from Action 0.
The following properties are supported:
Feature | Version | Property | Remarks |
---|---|---|---|
Trains (00) | 07 (Load amount) | Changeable via callback 12 | |
0.6 2.5 | 09 (Speed) | ||
0.6 2.5 | 0B (Power) | ||
0.6 2.6 | 0D (Running cost factor) | ||
0.6 2.6 | 14 (Cargo capacity) | See also callback 15 | |
0.6 2.5 | 16 (Weight) | ||
0.6 | 17 (Cost factor) | ||
0.6 2.5 | 1F (Tractive effort) | ||
21 (Short wagons) | Changeable via callback 11 | ||
22 (Visual effect & powered wagons) | Changeable via callback 10 | ||
0.6 2.5 | 25 (User data) | ||
1.2 | 2B (Custom cargo ageing period) | ||
Road Vehicles (01) | 07 (Load amount) | Changeable via callback 12 | |
1.0 | 09 (Running cost factor) | ||
0.6 | 0F (Cargo capacity) | See also callback 15 | |
0.6 | 11 (Cost factor) | ||
1.1 | 13 (Power) | ||
1.1 | 14 (Weight) | ||
1.1 | 15 (Speed) | ||
1.1 | 18 (Tractive effort) | ||
21 (Visual effect) | Changeable via callback 10 | ||
1.2 | 22 (Custom cargo ageing period) | ||
Ships (02) | 07 (Load amount) | Changeable via callback 12 | |
0.6 2.6 | 0A (Cost factor) | ||
0.6 2.5 | 0B (Speed) | ||
0.6 2.6 | 0D (Cargo capacity) | See also callback 15 | |
0.6 2.6 | 0F (Running cost factor) | ||
1C (Visual effect) | Changeable via callback 10 | ||
1.2 | 1D (Custom cargo ageing period) | ||
Planes (03) | 07 (Load amount) | Changeable via callback 12 | |
0.6 | 0B (Cost factor) | ||
0.6 2.5 | 0C (Speed) | ||
0.6 2.6 | 0E (Running cost factor) | ||
1.0 | 0F (Passenger capacity) | See also callback 15 | |
1.0 | 11 (Mail capacity) | ||
1.2 | 1C (Custom cargo ageing period) |
Most properties will only change when the vehicle is bought, serviced (enters a depot), visits a station or on loading of a saved game. Other ones such as TE are called every time a TE calculation is run.
If the callback fails, the corresponding value from the action 0 property will be used. The callback is always used when defined, no bit in the action 0 property needs to be set to activate it.
Before r1758 (both 2.5 and TTDPatch 2.6), callback 36 was sometimes called with the 40+x and 80+x variables unavailable when they should have been available, or with not all 80+x variables properly initialized, causing some 40+x variables to be unsafe.
About the capacity properties see also the summary page about vehicle refitting.