ikt Posted October 2, 2016 Share Posted October 2, 2016 (edited) So I'm making a realtime handling editor and I thought this could be useful. Mainly that CHandlingData somewhat is completely represented in memory. Found the following thing on Google: http://www.unknowncheats.me/forum/1229279-post294.html. Decided to completely check it and finish it. Pointer to struct @ Vehicle+0x830 (b791_2) Offsets within CHandlingData: const struct HandlingOffset { DWORD dwHandlingNameHash = 0x0008; int fMass = 0x000C; int fInitialDragCoeff = 0x0010; // 0x0014 // 0x0018 // 0x001C vecOffset vecCentreOfMass = { 0x0020, 0x0024, 0x0028}; // 0x002C vecOffset vecInertiaMultiplier = { 0x0030, 0x0034, 0x0038}; // 0x003C int fPercentSubmerged = 0x0040; int fSubmergedRatio = 0x0044; int fDriveBiasFront = 0x0048; int fDriveBiasRear = 0x004C; uint8_t nInitialDriveGears = 0x0050; int fDriveInertia = 0x0054; int fClutchChangeRateScaleUpShift = 0x0058; int fClutchChangeRateScaleDownShift = 0x005C; int fInitialDriveForce = 0x0060; int fDriveMaxFlatVel = 0x0064; int fInitialDriveMaxFlatVel = 0x0068; int fBrakeForce = 0x006C; // 0x0070 int fBrakeBiasFront = 0x0074; int fBrakeBiasRear = 0x0078; int fHandBrakeForce = 0x007C; int fSteeringLock = 0x0080; int fSteeringLockRatio = 0x0084; int fTractionCurveMax = 0x0088; int fTractionCurveMaxRatio = 0x008C; int fTractionCurveMin = 0x0090; int fTractionCurveRatio = 0x0094; int fTractionCurveLateral = 0x0098; int fTractionCurveLateralRatio = 0x009C; int fTractionSpringDeltaMax = 0x00A0; int fTractionSpringDeltaMaxRatio = 0x00A4; int fLowSpeedTractionLossMult = 0x00A8; int fCamberStiffness = 0x00AC; int fTractionBiasFront = 0x00B0; int fTractionBiasRear = 0x00B4; int fTractionLossMult = 0x00B8; int fSuspensionForce = 0x00BC; int fSuspensionCompDamp = 0x00C0; int fSuspensionReboundDamp = 0x00C4; int fSuspensionUpperLimit = 0x00C8; int fSuspensionLowerLimit = 0x00CC; int fSuspensionRaise = 0x00D0; int fSuspensionBiasFront = 0x00D4; int fSuspensionBiasRear = 0x00D8; int fAntiRollBarForce = 0x00DC; int fAntiRollBarBiasFront = 0x00E0; int fAntiRollBarBiasRear = 0x00E4; int fRollCentreHeightFront = 0x00E8; int fRollCentreHeightRear = 0x00EC; int fCollisionDamageMult = 0x00F0; int fWeaponDamageMult = 0x00F4; int fDeformationDamageMult = 0x00F8; int fEngineDamageMult = 0x00FC; int fPetrolTankVolume = 0x0100; int fOilVolume = 0x0104; // 0x0108 int fSeatOffsetDistX = 0x010C; int fSeatOffsetDistY = 0x0110; int fSeatOffsetDistZ = 0x0114; int nMonetaryValue = 0x0118; DWORD dwStrModelFlags = 0x011C; DWORD dwStrHandlingFlags = 0x0120; DWORD dwStrDamageFlags = 0x0124; DWORD dwAIHandlingHash = 0x0134;} hOffsets = {};Offsets with // VERIFIED behind them are all manually verified by me. (I re-checked all of the UnknownCheats post, since a few seemed to be off). Comments indicate how the value in handling.meta translates to the value in memory, if needed. This is useful/essential to get the correct balance.*BiasFront in the handling.meta have these matching pairs. Steering lock appears to be in radians for the inner wheel, while handling.meta uses degrees. Handling editor can be seen here: https://github.com/E66666666/GTAVHandlingEditor/ I haven't finished the part where everything is read and written yet and I'm trying to find a less stupid way of doing this, but the offsets should all work if you plug them in the correct conversion method (if needed). Update: Fixed a few offsets. Final update: Handling editor is released. Take it as a demo, or something. Update - Turns out leftas completely reversed the class before. Updated the struct with offsets. Edited October 8, 2016 by ikt Guad, Jitnaught, Skorpro and 1 other 4 Link to comment Share on other sites More sharing options...
ikt Posted October 2, 2016 Author Share Posted October 2, 2016 (edited) Real Time Handling Editor is done, as an .asi script. I hope this info and this tool proves to be useful for somebody. Edited October 2, 2016 by ikt Link to comment Share on other sites More sharing options...
unknown modder Posted October 3, 2016 Share Posted October 3, 2016 The correct way to do this is look at how the exe loads the handling data instead of comparing memory structures with handling data Link to comment Share on other sites More sharing options...
ikt Posted October 3, 2016 Author Share Posted October 3, 2016 I sadly don't have experience with reverse engineering executables and assembly to make proper use of things like IDA. Link to comment Share on other sites More sharing options...
InfamousSabre Posted October 3, 2016 Share Posted October 3, 2016 Nice work! we need more threads like this Skorpro and Jitnaught 2 Link to comment Share on other sites More sharing options...
Skorpro Posted October 8, 2016 Share Posted October 8, 2016 The correct way to do this is look at how the exe loads the handling data instead of comparing memory structures with handling data True But I'm happy with ikt's method too A for you, ikt! And a for you, unknown modder (G_index 2576573 & decompiled scripts)! unknown modder 1 Link to comment Share on other sites More sharing options...
luckyma1990 Posted December 10, 2016 Share Posted December 10, 2016 @ikt Thanks so much for your GTAVHandlingEditorproject in github. Helped me solve a very annoying problem!!! Already stared! ikt 1 Link to comment Share on other sites More sharing options...
Cal_fromdabow Posted June 5, 2019 Share Posted June 5, 2019 Now we just need those subclasses and we'll have conquered rockstar Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now