Opcode.eXe
Известный
- 84
- 112
So you wanna edit a vehicle's handling value? Like make a car go faster?
With these two snippets you can do it!
0AB1: @GET_HANDLING 3 FROM_VEHICLE_MODEL #SULTAN OFFSET 0x1C SIZE 4 _TO: 0@
0AB1: @SET_HANDLING 4 FROM_VEHICLE_MODEL #SULTAN OFFSET 0x1C SIZE 4 INTO: -1.0
Here is a list of all the offsets:
Example:
- Making the SULTAN take no damage when colliding with somehting:
With these two snippets you can do it!
0AB1: @GET_HANDLING 3 FROM_VEHICLE_MODEL #SULTAN OFFSET 0x1C SIZE 4 _TO: 0@
Код:
//0AB1: @GET_HANDLING 3 FROM_VEHICLE_MODEL #SULTAN OFFSET 0x1C SIZE 4 _TO: 0@
:GET_HANDLING
0@ *= 4
0@ += 0xA9B0C8
0A8D: 0@ 0@ 4 0
0@ += 0x4A
0A8D: 0@ 0@ 2 0
0@ *= 0xE0
0@ += 0xC2B9DC
005A: 0@ 1@
0A8D: 3@ 0@ 2@ 0
0AB2: 1 3@
0AB1: @SET_HANDLING 4 FROM_VEHICLE_MODEL #SULTAN OFFSET 0x1C SIZE 4 INTO: -1.0
Код:
//0AB1: @SET_HANDLING 4 FROM_VEHICLE_MODEL #SULTAN OFFSET 0x1C SIZE 4 INTO: -1.0
:SET_HANDLING
0@ *= 4
0@ += 0xA9B0C8
0A8D: 0@ 0@ 4 0
0@ += 0x4A
0A8D: 0@ 0@ 2 0
0@ *= 0xE0
0@ += 0xC2B9DC
005A: 0@ 1@
0A8C: 0@ 2@ 3@ 0
0AB2: 0
Here is a list of all the offsets:
Код:
//-------------------------------
//List of Handling Offsets:
{
0x0 = [dword] Index/Identifier
0x4 = fMass
0x8 = 1.0 / fMass
0xC = fTurnMass
0x10 = fDragMult
0x14 = CentreOfMass.x
0x18 = CentreOfMass.y
0x1C = CentreOfMass.z
0x20 = [byte] nPercentSubmerged
0x24 = fMass * 8.0000001E-1 / nPercentSubmerged
0x28 = fTractionMultiplier
0x74 = [byte] TransmissionData.nDriveType
0x75 = [byte] TransmissionData.nEngineType
0x76 = [byte] TransmissionData.nNumberOfGears
0x7C = TransmissionData.fEngineAcceleration (Multiplied by 3.9999999E-4)
0x80 = TransmissionData.fEngineInertia
0x84 = TransmissionData.fMaxVelocity (Multiplied by 5.5555599E-3)
0x94 = fBrakeDeceleration (Multiplied by 3.9999999E-4)
0x98 = fBrakeBias
0x9C = [byte] bABS
0xA0 = fSteeringLock
0xA4 = fTractionLoss
0xA8 = fTractionBias
0xAC = fSuspensionForceLevel
0xB0 = fSuspensionDampingLevel
0xB4 = fSuspensionHighSpdComDamp
0xB8 = Suspension upper limit
0xBC = Suspension lower limit
0xC0 = Suspension bias between front and rear
0xC4 = Suspension anti-dive multiplier
0xC8 = fCollisionDamageMultiplier (multiplier not yet found)
0xCC = [hex] modelFlags
0xD0 = [hex] handlingFlags
0xD4 = fSeatOffsetDistance
0xD8 = [dword] nMonetaryValue
0xDC = [byte] Front lights
0xDD = [byte] Rear lights
0xDE = [byte] Vehicle anim group
}
Example:
- Making the SULTAN take no damage when colliding with somehting:
Код:
{$CLEO .cs}
0000:
0AB1: @SET_HANDLING 4 FROM_VEHICLE_MODEL #SULTAN OFFSET 0xC8 SIZE 4 INTO: 0.0 //fCollisionDamageMultiplier
004E: END_THIS_THREAD