Present features:
- Show weight and power in the engine preview window (only if the setting is active).
- Show weight, weight including cargo, power and tractive effort in the build vehicle window (only if the setting is active).
- Allow to sort road vehicles by power in the build vehicle window (it is not disabled when settings change, though).
- Standard vehicles have air drag values set correctly.
- Show weight, power and tractive effort in the vehicle details window (only if the setting is active).
- Force a lower limit of 1 km/h in vehicle's speed.
- Allow to select the steepness of slopes for road vehicles.
- Acceleration working and changed correctly for road vehicles.
- Standard trains work with the air drag value defined at the documentation (based on their speed) instead of a hardcoded one.
NewGRF features:
Unless otherwise noted, all implemented features follow the New Graphics specifications.
Road vehicles:
- Property 0x13 (Power): Power is in units of 10 hp. Only the power of the first part is taken into account for articulated road vehicles.
- Property 0x14 (Weight): Weight is in units of 1/4 tonnes. Only the weight of the first part is taken into account for articulated road vehicles.
- Property 0x18 (Tractive effort): For a value of 0xFF, the tractive effort is equal to the vehicle weight, for 0x80, it is half, and so on. Since only the first part of an articulated road vehicle can have power and tractive effort, it is only useful at the first part. When a NewGRF vehicle has no tractive effort or it is set to zero, it uses the standard value instead (0x4C = 76).
- Property 0x19 (Air drag): Air drag in arbitrary units. 0x01 means no air drag. 0xFF means full air drag and 0x00 means standard air drag (calculated with the vehicle's max speed looking on this table). Only the air drag from the first part of a vehicle is used.
- Callback 36 support for power (Action 0 property 0x13) and air drag (Action 0 property 0x19). These callbacks are checked whenever the vehicle is bought, serviced, visits a station or after loading a savegame (UNTESTED).
- Callback 36 support for weight (Action 0 property 0x14) and tractive effort (Action 0 property 0x18). In addition to the above conditions, these callbacks are also checked when the cargo changes (UNTESTED).
- Property 0x1F (Tractive effort): When a NewGRF vehicle has no tractive effort or it is set to zero, it uses the standard value instead (0x4C = 76) (missing in trunk).
- Property 0x20 (Air drag): Air drag in arbitrary units. 0x01 means no air drag. 0xFF means full air drag and 0x00 means standard air drag (calculated with the vehicle's max speed looking on this table). Only the air drag from the first part of a vehicle is used. (UNTESTED)
List of things to do: (Comments needed!)
- Possible crash caused by NewGRF cargos.
- The game asserts if there's a NewGRF road vehicle with a weight of zero.
- Remove "Sort by engine" for road vehicles when improved acceleration is off.
- Missing a check for reversing in slopes. It seems as it is not needed, though.
- Right now, road vehicles don't use the freight multiplier.
- Should trains use "Improved" instead of Realistic?.
- Implement IsMaglev function for road vehicles.
Notes about the code:
- The unified acceleration code needs an in-depth review.
- Vehicle flags related to acceleration (_GOINGUP, _GOINGUP, etcetera) are not unified.
Since the Improved acceleration for road vehicles is just a patch, there is currently not much GRF sets that have ALL of their road vehicles working correctly. I know that some articulated vehicles in HEQS have this problem when loaded in slopes, and in eGRTVS there is also some vehicles that will not move at all. To my knowledge only standard vehicles and the Hover Bus are fully supported.