# Structures/VehicleParamsEngine

m (Added a warning in maxRPM + an explanation for horsepower) |
|||

Line 6: | Line 6: | ||

}}{{StructureField|number|boostDelay|Amount of seconds between being able to use the boost ( by pressing Shift key by default )}}{{StructureField|number|boostDuration|Duration of the boost in seconds}}{{StructureField|number|boostForce}}{{StructureField|number|boostMaxSpeed|Maximum speed while boosting | }}{{StructureField|number|boostDelay|Amount of seconds between being able to use the boost ( by pressing Shift key by default )}}{{StructureField|number|boostDuration|Duration of the boost in seconds}}{{StructureField|number|boostForce}}{{StructureField|number|boostMaxSpeed|Maximum speed while boosting | ||

− | + | {{Warning|The {{ClassFunction|Vehicle|SetVehicleParams}} function takes this in '''miles per hour''', but {{ClassFunction|Vehicle|GetVehicleParams}} returns this in '''hammer units per second'''! | |

− | + | ||

+ | 1 MPH is roughly 17.6 HU/s.}} | ||

}}{{StructureField|number|gearCount|Amount of gears this vehicle has}}{{StructureField|table|gearRatio|A table of numbers, of gear rations.<br/>Table length is equal to "gearCount" member of this table.}}{{StructureField|number|horsepower|The HP amount of the vehicle | }}{{StructureField|number|gearCount|Amount of gears this vehicle has}}{{StructureField|table|gearRatio|A table of numbers, of gear rations.<br/>Table length is equal to "gearCount" member of this table.}}{{StructureField|number|horsepower|The HP amount of the vehicle | ||

Line 13: | Line 14: | ||

}}{{StructureField|boolean|isAutoTransmission|If ''true'', the gearbox shifts gears, if ''false'' the gearbox stays stuck to the 1st gear (gear number 0).}}{{StructureField|number|maxRPM|Maximum RPM of the vehicle.<br/>Despite this being a maximum value, the vehicle can exceed it. | }}{{StructureField|boolean|isAutoTransmission|If ''true'', the gearbox shifts gears, if ''false'' the gearbox stays stuck to the 1st gear (gear number 0).}}{{StructureField|number|maxRPM|Maximum RPM of the vehicle.<br/>Despite this being a maximum value, the vehicle can exceed it. | ||

− | + | {{Warning|Attempts to exceed the max RPM will force the active gear ratio to be that of the 1st gear, which will provide even more torque. This is the opposite of a rev limiter. This value is only used for the calculation of the effectively applied torque.}} | |

}}{{StructureField|number|maxRevSpeed|Maximum reverse speed of the vehicle | }}{{StructureField|number|maxRevSpeed|Maximum reverse speed of the vehicle | ||

− | + | {{Warning|The {{ClassFunction|Vehicle|SetVehicleParams}} function takes this in '''miles per hour''', but {{ClassFunction|Vehicle|GetVehicleParams}} returns this in '''hammer units per second'''! | |

− | + | ||

+ | 1 MPH is roughly 17.6 HU/s.}} | ||

}}{{StructureField|number|maxSpeed|Maximum forward going speed of the vehicle without boosting | }}{{StructureField|number|maxSpeed|Maximum forward going speed of the vehicle without boosting | ||

− | + | {{Warning|The {{ClassFunction|Vehicle|SetVehicleParams}} function takes this in '''miles per hour''', but {{ClassFunction|Vehicle|GetVehicleParams}} returns this in '''hammer units per second'''! | |

− | + | ||

+ | 1 MPH is roughly 17.6 HU/s.}} | ||

}}{{StructureField|number|shiftDownRPM|Amount of RPM to automatically shift one gear down}}{{StructureField|number|shiftUpRPM|Amount of RPM to automatically shift one gear up}}{{StructureField|number|throttleTime}}{{StructureField|boolean|torqueBoost}} | }}{{StructureField|number|shiftDownRPM|Amount of RPM to automatically shift one gear down}}{{StructureField|number|shiftUpRPM|Amount of RPM to automatically shift one gear up}}{{StructureField|number|throttleTime}}{{StructureField|boolean|torqueBoost}} | ||

}} | }} |

## Latest revision as of 08:31, 19 December 2018

The structure used by VehicleParams structure.

Type | Name | Description | ||
---|---|---|---|---|

number | autobrakeSpeedFactor | |||

number | autobrakeSpeedGain | |||

number | axleRatio |
This acts as the final ratio of the gearbox. It's like a master coefficient of the gearbox. | ||

number | boostDelay |
Amount of seconds between being able to use the boost ( by pressing Shift key by default ) | ||

number | boostDuration |
Duration of the boost in seconds | ||

number | boostForce | |||

number | boostMaxSpeed |
Maximum speed while boosting
| ||

number | gearCount |
Amount of gears this vehicle has | ||

table | gearRatio |
A table of numbers, of gear rations. | ||

number | horsepower |
The HP amount of the vehicle This value is used to calculate the effectively applied torque, along with ratios and | ||

boolean | isAutoTransmission |
If | ||

number | maxRPM |
Maximum RPM of the vehicle.
| ||

number | maxRevSpeed |
Maximum reverse speed of the vehicle
| ||

number | maxSpeed |
Maximum forward going speed of the vehicle without boosting
| ||

number | shiftDownRPM |
Amount of RPM to automatically shift one gear down | ||

number | shiftUpRPM |
Amount of RPM to automatically shift one gear up | ||

number | throttleTime | |||

boolean | torqueBoost |