m4nfo road vehicle properties are based on plain nfo's action0 properties. Most of them are mapped in a straightforward way, but some of m4nfo's road vehicle property functions are based on custom calculations, or based on using more than one nfo property.
| m4nfo function | nfo property | custom |
| airdrag | 0x19 | |
| callbacks | 0x17 | yes |
| capacity | 0x0F | |
| cargoaging | 0x22 | |
| cargoclasses | 0x1D + 0x1E | yes |
| cargolist | 0x24 + 0x25 | |
| cargomask | 0x16 | |
| cargotype | 0x10 | |
| climate | 0x06 | |
| effort | 0x18 | yes |
| flags | 0x1C | |
| intro | 0x00 + 0x1F | yes |
| loadamount | 0x07 | |
| modlife | 0x04 | |
| newgraphics | 0x0E | |
| power | 0x13 | yes |
| price | 0x11 | |
| refitcost | 0x1A | yes |
| reliability | 0x02 | |
| retire | 0x1B | |
| runningcost | 0x09 | |
| soundeffect | 0x12 | |
| sortbefore | 0x20 | |
| speed | 0x08 | yes |
| vehlife | 0x03 | |
| weight | 0x14 |
| Flag label | Bit | Value |
| TRAMTRACK | 0 | 0x01 |
| 2CC | 1 | 0x02 |
| AUTOREFITTING | 2 | 0x04 |
| CARGOMULTIPLIER | 3 | 0x08 |
| NOBRKEFFECT | 4 | 0x10 |
Enabling callbacks in plain nfo means to set bits in property (0x17). Unfortunately, these bits have no numerical relation to the corresponding callback values returned by nfo's variable (0x0C). In m4nfo, both property function callbacks() and performance function callback() are using the same callback labels.
This m4nfo property function combines the two nfo properties for cargo class inclusion (0x1D) and exclusion (0x1E).
Plain nfo handles tractive effort as a coefficient. It sets what fraction of the vehicle weight is equal to the maximum tractive effort. The default value of 0x4C represents a friction coefficient of ยต = 0.3.
m4nfo property function effort() takes a real tractive effort value, given either in [kn, KN, kp, KP, lbf, LBF], and re-calculates the nfo coefficient by taking into account the engine's weight.
If the engine's weight has not been specified at the time of this function's call, error message ERR_NOWEIGHT is shown.
Unline nfo, which again uses two properties for the introduction date (0x00 and 0x1F), this m4nfo function takes an introduction date in different formats and re-formats it for the appropriate nfo properties, i.e. if the given year is after 1920, only nfo property 0x00 will be used.
Plain nfo allows to specify the power of an engine in 'hp' only, but m4nfo allows to use either [hp, HP, ps, PS, kw, KW].
In m4nfo, the refit cost can be given either as a Byte value, with its maximum value "255" correlating to 50% of the vehicle's purchase price cost base (this is the original nfo behaviour), or directly as a percent value.
Plain nfo allows to specify the speed of an road vehicle in units of mph*3.2, i.e. approximately km/h only, but m4nfo allows to use either [km/h, KM/H, mph, MPH].
m4nfo road vehicle performance functions are based on plain nfo's Variational Action2 variables. Again, most of them are mapped in a straightforward way, but some of m4nfo's road vehicle performance functions are based on custom calculations, or based on use of more than one nfo variable.
Please note that functions return either Byte, Word or Dword values, depending on the context they're used in.
| m4nfo function | nfo var | Byte | Word/Dword | ||
| ageindays | 0xC0 | 85/86 C0 00 FF FF | |||
| ageinyears | 0x24/0x49 | 85/86 (custom) | |||
| animation | 0x46 | 82 46 08 03 | |||
| articulated | 0x10 | 81 10 00 FF | |||
| autoreplace | 81 10 00 FF | ||||
| callback | 0x0C | 81 0C 00 FF | 85 0C 00 FF FF | ||
| cargo | 0xB9 | 81 B9 00 FF | |||
| cnst_cargo | 0x42 | 81/82 42 08 FF | |||
| cnst_cargoclasses | 81/82 42 xx FF | ||||
| cnst_refit | 81/82 42 10 FF | ||||
| current_capacity | 0xBA | 85 BA 00 FF FF | |||
| current_load | 0xBC | 85 BC 00 FF FF | |||
| current_speed | 0xB4 | 85 B4 00 FF FF | |||
| daysintravel | 0xF0 | 85 F0 00 FF FF | |||
| dayspastservice | 0x23/0x4B | (custom) | |||
| direction | 0x9F | 81 9F 00 FF | |||
| displaymode | 0x10 | 81 10 00 FF | |||
| else | n/a | ||||
| flipped | 0xC8 | 81/82 C8 00 FF | |||
| idcount | 0x60 | 81/82 60 | |||
| indepot | 0xE2 | 82 E2 00 FF | |||
| islast | 0xDA | 81 DA 00 FF | |||
| lastmaintenance | 0x92 | 85/86 92 00 FF FF | |||
| lastservicedate | 0x4B | 89/8A 4B 00 FF FF FF FF | |||
| lastserviceyear | (custom) | ||||
| loadtime | 0x90 | 85 90 00 FF FF | |||
| maxspeed | 0x98 | 85 98 00 FF FF | |||
| property | 0x10 | 81 10 00 FF | |||
| randombits | 0x5F | 81/82 5F 08 FF (*) | |||
| randomtriggers | 81/82 5F 00 FF (*) | ||||
| rcost_cargotype | 0x10 | 81 10 00 FF | |||
| rcost_cargosubtype | 81 10 08 FF | ||||
| rcost_cargoclass | 81 10 10 FF | ||||
| refitted | 0xF2 | 81/82 F2 00 FF | |||
| reliabilitystate | 0xCE | 85 CE 00 FF FF | |||
| servint | 0x94 | 85 94 00 FF FF | |||
| soundevent | 0x10 | 81 10 00 FF | |||
| speedlimit | 0xF4 | 86 F4 00 FF FF | |||
| veh_cargoclass | 0x47 | 81 47 10 FF | |||
| veh_cargotype | 81/82 47 00 FF | ||||
| veh_cargoweight | 81 47 08 FF | ||||
| veh_currentload | 0xBC | 81 BC 00 FF | |||
| veh_getinfo | 0x61 | (custom) (*) | |||
| veh_getinfoabs | (custom) (*) | ||||
| veh_id | 0xC6 | 81/82 C6 00 FF | |||
| veh_marketinfo | 0x48 | 81/82 48 00 07 | |||
| veh_num | 0x40 | 81/82 40 10 FF | |||
| veh_posrel | 0x41 | 81/82 41 | |||
| veh_posabs | 0x40 | 81/82 40 | |||
| veh_status | 0xB2 | 81 B2 00 FF | |||
| veh_zpos | 0x9E | 81/82 9E 00 FF | |||
| yearbuilt | 0x49 | 85/86 49 00 FF FF | |||
(*) - may be adjusted by use of auxiliary function shiftmask(). (custom) - these functions are using more than one TTD variable and/or make use of auxiliary functions shiftmask() and/or engine().
m4nfo road vehicle callbacks are based on plain nfo's callbacks. They're all mapped in a straightforward way. Callbacks from the first section of the table below have to be enabled by property function callbacks(), but those from the second section do not need to be: they're always active and will be used automatically if needed.
| m4nfo callback | nfo callback |
| CB_ARTI | 0x16 |
| CB_LOAD | 0x12 |
| CB_POWR | 0x10 |
| CB_RCAP | 0x15 |
| CB_RCOL | 0x2D |
| CB_SOUND | 0x33 |
| CB_TSFX | 0x19 |
| CB_WLEN | 0x11 |
| CB_ARVS | 0x18 |
| CB_ATAC | 0x1D |
| CB_PROP | 0x36 |
| CB_RCOST | 0x15E |
| CB_STOP | 0x31 |
| CB_TEXT | 0x23 |
| CB_32DAY | 0x32 |
Callback helper functions are based on m4nfo's function cbr() which returns a parameter as a callback return value.
| m4nfo function | definition |
| addveh | cbr($1) |
| addvehrev | cbr($1+0x80) |
| attach | cbr($1) |
| effect | cbr($1) |
| seteffort | (custom) |
| autorefit | cbr(eval($1 | 16384)) |
| refsnd | cbr(_S_$1) |
| grftext | cbr($1) |
| reftxtcb | (custom) |
In nfo, randomized Action2s are used to either randomize the vehicle (0x80) nased on itself, based on the first vehicle of its consist (0x83), or based on any vehicle in the consist (0x84).
| m4nfo function | nfo random Action2 type | randomrel | 0x80 | randomabs | 0x83 | randomcount | 0x84 |