Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Happy Holidays from the GTANet team!

[CLEO] change handling of specific car model before any car spawned?


nyolc8
 Share

Recommended Posts

Hi all, I wondering if it's possible to set handling for a specific car model, BUT not for spawned existing vehicle. Is it possible? I know for spawned vehicles, it's possible. Just want to change it before vehicles spawn (so I want to set modified handling at game start)

 

What is the pointer for a specific car model? I just need that.

Link to comment
Share on other sites

read this topic please: click

it was always only possible to change handling by script before spawning the car, not for an already available car

it was possible to maipulate handling for a part of the car models, for a big part of the car models we had problems, don't know if Wesser found a fix

handling manipulation is a hard work, game crashes and don't makes fun

Link to comment
Share on other sites

I wanted to clear the swinging chassis handling flag. I managed to change the double exhaust modelflag (bit) on the fly and it changes instantly. Both setting it and clearing it works without problem on the fly. But this(exhaust) is the only flag I managed to change. No other got changed even when it's value got modified. I don't really get it why only the exhaust flag applies and others not.

Link to comment
Share on other sites

 

 

From handling.cfg:






CODE



; (af) modelFlags!!! WARNING - Now written HEX for easier reading of flags
;
; 1st digit 1: IS_VAN 2: IS_BUS 4: IS_LOW 8: IS_BIG
; 2nd digit 1: REVERSE_BONNET 2: HANGING_BOOT 4: TAILGATE_BOOT 8: NOSWING_BOOT
; 3rd digit 1: NO_DOORS 2: TANDEM_SEATS 4: SIT_IN_BOAT 8: CONVERTIBLE
; 4th digit 1: NO_EXHAUST 2: DOUBLE_EXHAUST 4: NO1FPS_LOOK_BEHIND 8: FORCE_DOOR_CHECK
; 5th digit 1: AXLE_F_NOTILT 2: AXLE_F_SOLID 4: AXLE_F_MCPHERSON 8: AXLE_F_REVERSE
; 6th digit 1: AXLE_R_NOTILT 2: AXLE_R_SOLID 4: AXLE_R_MCPHERSON 8: AXLE_R_REVERSE
; 7th digit 1: IS_BIKE 2: IS_HELI 4: IS_PLANE 8: IS_BOAT
; 8th digit 1: BOUNCE_PANELS 2: DOUBLE_RWHEELS 4: FORCE_GROUND_CLEARANCE 8: IS_HATCHBACK
;
; (ag) handlingFlags - written in HEX
;
; 1st digit 1: 1G_BOOST 2: 2G_BOOST 4: NPC_ANTI_ROLL 8: NPC_NEUTRAL_HANDL
; 2nd digit 1: NO_HANDBRAKE 2: STEER_REARWHEELS 4: HB_REARWHEEL_STEER 8: ALT_STEER_OPT
; 3rd digit 1: WHEEL_F_NARROW2 2: WHEEL_F_NARROW 4: WHEEL_F_WIDE 8: WHEEL_F_WIDE2
; 4th digit 1: WHEEL_R_NARROW2 2: WHEEL_R_NARROW 4: WHEEL_R_WIDE 8: WHEEL_R_WIDE2
; 5th digit 1: HYDRAULIC_GEOM 2: HYDRAULIC_INST 4: HYDRAULIC_NONE 8: NOS_INST
; 6th digit 1: OFFROAD_ABILITY 2: OFFROAD_ABILITY2 4: HALOGEN_LIGHTS 8: PROC_REARWHEEL_1ST
; 7th digit 1: USE_MAXSP_LIMIT 2: LOW_RIDER 4: STREET_RACER
; 8th digit 1: SWINGING_CHASSIS





Here is an example flag line from the stallion, columns af and ag:






CODE



2800 4





The flags are written in hex, so are formed backwards. The 2800 is the af column, and the 4 is the ag, but the '1st digit' (as the key calls it) is in fact 0 for the af column, and 4 for the ag column. So for the af column, the 3rd and 4th digits are '8' and '2' respectively. Once you get that, you can match them up to the key.

So for af, the first digit is 0, so the car isn't a van, a bus, a lowrider or a 'big' vehicle. 0 is the value you use so the game registers the 1st digit as being accounted for, but won't apply a flag.

Thus, we can work out the af settings for the Stallion. The first 2 digits are 0, so none of those possible flags are applied. 3rd digit is 8. This applies the 'convertible' flag to the car, which means CJ will jump over the door when he gets into an open-top variation of the Stallion. The 4th digit is 2, which applies the double exhaust flag to the Stallion, so it has two functioning exhaust pipes. Past this setting, the Stallion doesn't need any more flags, so no more flags have to be accounted for by a 0. However you could make it 00002800 and the af line would still be valid (all 8 possible flag settings are accounted for).

The ag column has only one digit in it, 4, but other handling lines for cars will have as many digits as the Stallion's af column in their ag column. As there is only one number, this is logically taken as the 1st digit, with no more digits afterwards (though again, it could be 00000004 and be valid). The 4 makes the car have NPC_NEUTRAL_HANDL enabled, which I believe affects normal pedestrian handling for the Stallion when th eplayer isn't the one driving.

You may notice however that with the way things are working, you can't have a convertible car with no doors, as they are handled by the same flag (3rd digit of af). However, all you need to do is add the two settings together, and make 9. This would be your 3rd digit to have both those setting enabled. Obviously you can't enter a 10, 11 or 12 for numerically higher possibilities, but this is written in hex. '10' is represented by 'A', '11' is represented by 'B' and so on, upwards.

Now you have a grasp of the way the flags work, and how hex is written, we can move onto creating your own flag lines for your own cars.

Let's take some typical settings from all available options that you may want;

REVERSE_BONNET, DOUBLE_EXHAUST, FORCE_DOOR_CHECK, DOUBLE_RWHEELS, 2G_BOOST, NO_HANDBRAKE, OFFROAD_ABILITY2, HALOGEN_LIGHTS, PROC_REARWHEEL_1ST

Now we set about applying these. The first 4 are catered for by the af column, so we go through the list of options adding up the number sum where applicable. 1st digit has none of the options we want, so we make it 0. 2nd digit has our reverse bonnet option at 1, so we take that and make 1 our 2nd digit. 3rd digit has no settings we want, so it becomes 0. 4th digit has two of our wanted settings, at 2 and 8. So we add these together to make 10, and represent that with A. So far we have A010. The final option held with the af column is double_rhweels, which is accounted for by the 8th digit with a 2. So we make all digits up to the last 0, and we have this as our final af column:






CODE



2000A010





You do the same work-through process for the ag column, and you end up with:






CODE



D00012, or 00D00012





I hope that makes sense.


<3D

 



Flags do not follow a certain order, you should write a 4 byte that contains the whole hex flags (like he did at the end) onto the memory

For Example:

[email protected] += 0xD0 // handling flags0A8C: write_memory [email protected] size 4 value 0x00D00012 virtual_protect 0

You see the 6th digit is D, D is 13 in decimal :

6th digit 1: OFFROAD_ABILITY 2: OFFROAD_ABILITY2 4: HALOGEN_LIGHTS 8: PROC_REARWHEEL_1ST

Edited by Shmoopy
Link to comment
Share on other sites

I did it like this:

 

 

[email protected] += 208 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 008C3: clear [email protected] bit 280A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 0
Isn't this good? I wrote the whole 4 byte, but with the modified bit in it. I did it like this with the exhaust and it worked. But not working with the swinging chassis flag.
Link to comment
Share on other sites

No more chassis swinging, the effect is seen after a game restart.

0AB1: call_scm_func @VehGetHandlingPointer 1 model #COPCARLA ret:HandliPtr [email protected]@ += 0xD0 // handlingFlags0A8C: write_memory [email protected] size 4 value 0x00200008 virtual_protect 0
:[email protected] -= [email protected] *= 0x308 [email protected] += 0xB1F650 [email protected] += 0x4E 0A8D: [email protected] = read_memory [email protected] size 2 virtual_protect [email protected] *= 0xE0 [email protected] += 0xC2B9DC 0AB2: ret 1 [email protected]

The default flags are : 0x10200008 as seen from the handling.cfg file , its a hex number and not decimal 0x00200008

 

I dont know if there is a function that reloads the handling data of a vehicle

 

Credits to Wesser for his handling offset function

Edited by Shmoopy
Link to comment
Share on other sites

How do you mean the effect seen after game restart? The script runs, and after I need to restart the game to see the change? Where is the change stored until game started then? Or you mean the script need to run at game start?

Link to comment
Share on other sites

By game restart i mean Pause game->Start new game not Quit game.

Certain flags do not have instant effect change, I'll see if I can force the game to check the flag stat on change.

Link to comment
Share on other sites

Thank you :) Btw I want to change flags with cleo because I want to use it on samp (samp blocking handling.cfg editing) So this is why the game restarting is not good for me :/

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.