Car parameters
This article discuss how the car*.res parameters control the performance, handling, aestethics and other aspects of a Stunts car. A quick reference chart of those parameters may be found at the Car files article.
Preliminary notes
- Byte offsets will always be refered to as hex-addresses. That is the normal behaviour for any usual hex-editor, but not that of Car Blaster, where you must press "h" to display offsets in hexadecimal. More importantly, on this document bytes are classified as even or odd depending on the hex address, giving opposite results to what one gets with decimal counting (for the first byte of a file is offset 0h). Byte values may be quoted both ways for the sake of convenience; thus an "h" will be appended to any hex number on this article.
- Several important parameters have their value defined by two consecutive bytes defining a four digit hexadecimal, xxyyh. The first one of them sets the yy algarisms and the last one the xx, so that a change of 1 in the first byte causes a change 1/256 (or 1/100h) smaller than a change of 1 in the second byte. Any mention to one byte doing the gross adjustment and another the fine tuning of a parameter implies such kind of control.
Engine and Transmission
Torque curve
Address: 60h-C7h
Defining how much acceleration the engine can impart on a car at every given engine speed (rpm), the torque curve is naturally a very important factor in determining performance. Every byte corresponds to increments of about 125rpm. The curve works as expected: raising a byte increases linearly acceleration at a given rpm. A more peaky torque curve means a narrower range of useful engine speeds - and thus, the driver will have to shift more often. Another important point is to remember adjusting offsets 32h and 33h properly depending on where the torque curve is intended to end.
Number of gears
Address: 26h
Self-explanatory. Valid optoins go from 1 to 6 gears. Note that for a 6th gear the appropriate parameters will have to be defined elsewhere.
Idle rpm
Address: 2Ch - fine tuning (1rpm units); 2Dh - gross adjustment (256rpm units).
This parameter controls the minimum rpm value to be shown on the rev meter, supposedly while the car is stopped or starting to accelerate. Since engine speed and car speed are always vinculated in Stunts (in other words, the clutch is always engaged!), the parameter is purely cosmetical.
Important note on all rpm parameters: As raising a byte on the gross ajdjustment offset raises the value in rpm by about 250, it is reasonable to assume the variation is exactly 256rpm. That way, the xxyyh value mentioned in the preliminary notes can be taken as the true rpm value in hexadecimals. For instance, 2Ch = F0h and 2Dh = 02h would give an idle rpm of 02F0h = 752rpm.
Downshift rpm
Address: 2Eh - fine tuning (1rpm units); 2Fh - gross adjustment (256rpm units).
This is the downshift rpm ponit used by the automatic transmission. For optimal performance, it should match the rpm position of the torque curve's peak.
Upshift rpm
Address: 30h - fine tuning (1rpm units); 31h - gross adjustment (256rpm units).
This is the upshift rpm ponit used by the automatic transmission. For optimal performance, it should match the rpm position of the power curve's peak - remember that, at any given rpm, power = torque * rpm; you may estimate a power curve in arbitrary units from the torque curve that way.
Maximum rpm
Address: 32h - fine tuning (1rpm units); 33h - gross adjustment (256rpm units).
This parameter is the maximum rpm (the "redline") of the engine. Unlike the Idle rpm parameter, this one is not cosmetical - the torque curve will be cut off at the chose rpm, and thus the value should be djusted whenever the torque curve is extended to higher rpms.
Gear ratios
Address: 37h - 41h (odd addresses only)
These parameters set the gear ratios of the car, and are thus very important ones. 37h sets 1st gear, 39h the second one, and so on - unlike for the rpm parameters, the even addresses have no effect whatsoever. A higher value means a shorter ratio, and thus higher acceleration but less final car speed for that certain gear (at any rpm effective torque is proportional, but wheel speed is inversely proportional, to gear ratio). A realistic car need of course to have decreasing gear ratios, and for smoother engine operation a near-exponential decrease would be more adequate.
Physics parameters
Car mass
Address: 27h - fine tuning; 28h - gross adjustment.
This parameter has ben variously described over the years as "inverse power amplification" (Mark Nailwood) or "aerodynamic resistance" (Juha Liukkonen / Lukas Loehrer). A true aeroynamic coefficient effect, however, would affect more the car when at high speeds. Raising this parameter causes a decrease in acceleration directly proportional to the increment, all gear being affected equally. Therefore, the parameter is best regarded as being the car mass. Clearly, it has crucial importance to the car performance, being the only non engine/transmission parameter to limit acceleration.
Dashboard meters
Text
Miscellaneous
(under construction...)