Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Tuners
      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. Red Dead Redemption 2

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

    1. Grand Theft Auto Series

      1. 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. Guides & Strategies
      2. Help & Support
    6. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    7. GTA III

      1. Guides & Strategies
      2. 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. 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

      1. GTANet 20th Anniversary
    2. Support

    3. Suggestions

[REL|SRC/BIN|IV] StructEdit


Recommended Posts


Sick and tired of having to restart IV everytime you are adjusting your vehicle's parameters? Want to tweak them just that tad more, but hate the time it takes you? Worry no more!


This little mod allows the user to change a lot of the values listed in the weaponinfo.xml and handling.dat files in-game. This means no-more restarting the game when developing new weapons or vehicles!


Aside of that, the mod also allows the user to create documentation for other structures, and edit the documentation for the existing structures (CWeaponInfo and CVehicleInfo). This can be useful if the offsets change in later patches, or if new parameters are found.


user posted image


Changing values is as easy as selecting the right parameter, entering the new value, and pressing the button smile.gif.


Youtube vid:





(see also: http://github.com/thacursedpie/structedit)

Current version: Beta v0.11



You will need an ASI-loader ( http://www.gtaforums.com/index.php?showtopic=380830 )

And HazardX's .Net scripthook ( http://www.gtaforums.com/index.php?showtopic=392325 )



Extract the "scripts" folder to your main GTA:IV directory. That's it.




Use the "si_gui" console command to activate the Graphical User Interface (GUI).

(alternatively: "si-gui")

Use "si_regen" to rescan the structure information files and use updated offsets / descriptions.

(alternatively: "si-regen")



Will this work with my modded handling.dat / weaponinfo.xml???!!!!11?1

First of all: why don't you just give it a shot?

Second of all: Yes it will.


Technical background: StructEdit doesn't give a crap about the handling.dat / weaponinfo.xml. It does not read these files. This is also the reason why StructEdit is able to change the values on-the-fly: StructEdit reads the values directly from IV's memory. (If you're interested how, have a look at the source. Also do some searches for 'pointers', 'offsets', 'memory addresses')


Will this work with 1040 / EFLC / <any other non-1070 version>

NO. The reason is very simple. I only have 1070. For StructEdit to work it needs to have the correct offsets. Because I only have 1070, I'm not able to retrieve the offsets for any other game version. You may do so yourself, or hope other people do it.


CVehicleInfo offset for 1040:

0x117ABB0 (thanks Jitsuin & lms)

(Update 'CVehicleInfo 0x110 0x11E3BF0 115' in CVehicleInfo.sif. RTFM if you don't know how whatsthat.gif)


StructEdit doesn't work! The GUI is empty / filled with 0's / filled with nonsense!

You are not using 1070 and have not updated the offsets. Update to 1070.


Custom structures / offsets

Using a different version of IV? Working with EFLC? Want to edit other structures in-memory? You can create your own information files smile.gif. Check out the "filetype description.txt" file, and the example files in the .\scripts\structedit folder.

Edited by thaCURSEDpie
Link to comment
Share on other sites

Thanks, i have a plan to make something like this for GTA SA as a CLEO script.

Link to comment
Share on other sites

Thanks, i have a plan to make something like this for GTA SA as a CLEO script.

Cool. Have a look at my github for the source. A lot of it is indepent from the fact that it's a mod for IV, should be pretty easy to adjust for GTA:SA.

Link to comment
Share on other sites

Now if someone would make the same but for refreshing model changes you make without the restart biggrin.gif

Link to comment
Share on other sites

Now if someone would make the same but for refreshing model changes you make without the restart biggrin.gif

That's an entire different ball-game and a LOT harder than what I've done here. Wouldn't expect it to happen quickly, if at all tounge.gif.

Link to comment
Share on other sites

Very nice, I like the windows style UI icon14.gif

Thank HazardX wink.gif. Though building a GUI using code is a pain in the ass... (even though this one is still pretty simple)

Link to comment
Share on other sites

Oh great! This is really helpful.

I hate to restart my game again and again to edit the handling.dat.

This one save my ass!


Edited by ldfxf
Link to comment
Share on other sites

  • 3 weeks later...

looks exactly like what I want since a long time but I can' t even put a "_" in the console maybe because of my crappy french keyboard... if anyone knows how to help me, it would be very nice

I even tried to remap my keyboard but noway. cryani.gif

Is there any way for me to run this mod? like changing the command to open the stuctedit window or to make this "_" work in the scripthook console with my keyboard?

Edited by nrv74
Link to comment
Share on other sites


Same guy who also posted on the youtube vid?


Added other version of the commands, so now you can use either:





to enable the GUI. Now I hope you can at least type the '-' character, lol.


Link in first post is updated and points to the new version (0.11)

Link to comment
Share on other sites

wow dude that' s really cool thanks for your reply. I will try and enjoy that

No problemo. Let me know if it works wink.gif.

Link to comment
Share on other sites

I' m able to open the GUI now, but I don' t have enough knowledge yet to make it work with eflc and a tweaked handling dat plus a newhandling dat. Only a few values appear and no identifier. I will keep on trying, anyway, thanks a lot

Link to comment
Share on other sites


Yeah, sadly I don't own the EFLC extension pack, so I can't help you there. The offsets are not correct for EFLC, so the GUI won't give you any correct values. Good to hear you got the GUI working though!


I'd guess little has changed though, the overall structure should be the same, you'd only need to to replace the offsets in the .sif's. Finding these offsets is not *that* hard, but it's a bitch to explain.


I may one day make a tutorial or something. If you want to have a go at it yourself, read up on the following things:

"CheatEngine" (tons of tutorials)

"pointers" (look up "C pointers" or something like that)

"assembly" (note: x86 assembly!)

"memory addresses" (should probably be covered under "assembly" though)


So... that will take some time. You could also save a lot of time by buying me EFLC tounge.gif (j/k)

Link to comment
Share on other sites

Hummm.... I'll send you a package tomorrow^^

I will try to make myself less stupid reading all that when my gf won' t be around ^^

thanks again for your time and help that' s really nice and your tool looks absolutely great. see ya

Link to comment
Share on other sites

Hi thacursedpie, me again...

As I really wanted to make good handling lines, I' ve tried it on my new gtaIV install.

It works, BUT

There is not every values on the window, like for example maxspeed and some others, especially for bikes, which are using two handling lines as helicopters and boats...

I' m not able to change every values in the ones structedit recognize, like lowering Z axis....


I hope you planned to perfect this tool, cause it' s really awesome to be able to work handling lines ingame .

Link to comment
Share on other sites


Yep, not all parameters have been documented, so I can't support them :S.


See it this way: StructEdit needs to be told where the stuff is you want to edit. Let's say the parameter you want to edit is a treasure, buried deep within the GTAIV process. All the other parameters are treasures too. Now, if you want to access a treasure through StructEdit, you need to give StructEdit a map, to tell it where to look.


So for example, we give it a map (.sif file) which says: "center of mass is stored *here*, drive force is stored *here*". StructEdit takes this and is now able to edit those values. If you say to StructEdit: "Change the center of mass to X!", StructEdit says: "okay boss!", it looks up the location of the 'treasure' on the 'map', and does as you wish.


Now if you want to change the topspeed, StructEdit says: "Well, I'm sorry, but I don't know where the topspeed is located!". Imagine searching for a treasure, but without the treasure map! And in this case it gets even harder, because you don't know what the treasure looks like! So you'll never be able to find it.



So what we (modders) do, we search through the GTAIV process, and locate the treasures. We make a nice neat list. Some of us are even kind enough to post the lists online, so others can benefit smile.gif. Have a look at the CVehicleInfo documentation for example: http://www.gtamodding.com/index.php?title=...13#CVehicleInfo .

This is what the list of treasure positions (memory addresses / offsets) looks like. As you can see, it's not complete.


We locate these treasures using special software, such as CheatEngine. In short, this works like this: you tell CheatEngine how the treasure looks ("It's a big box filled with money!"), then CheatEngine starts digging around through the GTAIV process. Luckily, CheatEngine digs pretty fast, so it'll come back and say: "Hey boss! I found a couple of treasures which look like that! They are located *here*, *here* and *here*". That way you are able to locate 'em and put them on your treasure chart ^^.


If you have a bit of knowledge, you can also do some manual digging. Let's say that when you know where a certain treasure is located, you can use your programming / reversing knowledge to locate treasures buried near the first one. (this is of course way faster than letting CE shovel through the entire process every time)


Your best bet is that either someone comes along and updates the documentation (happens smile.gif. eg. I added the CWeaponInfo doc, Jenksta improved upon it greatly), or you do it yourself.


At the moment I simply don't have the time to document the parameters, sorry.


Hopefully though this post was kind of educational tounge.gif.

Link to comment
Share on other sites

yes, I was already seeing your tool a bit like this treasure finder which needs a map.

Saddly for me, as you said , my best bet is that someone updates this map, cause CE & the other stuffs look like a mix between japanese, arab, russian & hebrew.

So I guess I' ll just stay tuned^^

Link to comment
Share on other sites

Yet you can *learn* Arab, Russian, Hebrew, Japanese. You can learn *anything*. Hard things just take more time wink.gif.


Note to myself: (ignore wink.gif)

TODO in next version:

* support all game versions using signature scanning

* parse handling.dat & weaponinfo.xml to get signature data (? or ask user for data).

* extend CVehicleInfo documentation


Link to comment
Share on other sites

How do I enable the GUI? Putting si_gui into commandline.txt doesn´t work for me or which console do you mean? I´m confused now.


EDIT: Ah, wait I´ve read something on youtube about the console. This mod sounds very useful, I bet I restarted GTA hundreds of times, I hope it´ll work. icon14.gif


EDIT2: Allright, the console opens by pressing "^", the GUI pops up as well but there are no parameters, no identifiers, only zeros. I´m using patch (patch 4) on retail version.


Maybe the tool is irritated because my handling files are alreay modified with other tools (handling editor). I don´t know. Anyway nice mod, I believe it works.

Edited by NaidRaida
Link to comment
Share on other sites

Wow! Does this support multiple handling files, like newhandling dat from the AddOn Cars tutorials? Or is it (atm) limitated to the original handling.dat?

Link to comment
Share on other sites


Problem is that you're using patch 1040, which as another offset. To update your offset:


Go to your main IV install directory. Then to scripts\structedit. There should be two files in there:

CVehicleInfo.sif and CWeaponInfo.sif. Open CVehicleInfo.sif. Change the following line:


CVehicleInfo 0x110 0x11E3BF0 115





CVehicleInfo 0x110 0x117ABB0 115



This should allow the mod to work. I'm not able to test this myself however, because I don't have 1040 anymore (just 1070). But other users who are using 1040 have obtained this offset, so I guess you could give it a shot.

Note: this will only work for 1040. For any other game version (including EFLC) the offset will differ too.



StructEdit doesn't read the handling.dat file at all. The handling.dat file(s) are just a way to tell GTAIV.exe what the handling for each vehicle should be. What StructEdit does is read GTAIV.exe's memory and change the values directly. So StructEdit frankly doesn't care if the handling.dat is default modded, or mangled tounge.gif.


You mention "AddOn cars". Does this mean you're adding cars to the game? Normal IV has 115 vehicles. If you add more, you're going to have to change the NUM_ELEMENTS property in CVehicleInfo.sif. You can do this by changing the last value of


CVehicleInfo 0x110 0x11E3BF0 115


to the new amount of vehicles. I'd also like to refer you to the documentation for the .sif filetype, which comes with the mod, as well as the actual .sif files (they are located in .\scripts\structedit) - which are commented to make clear what is what smile.gif.



Updated first post, added 'FAQ' section to answer frequently asked questions. Also instructions on how to get it working for 1040.

Edited by thaCURSEDpie
Link to comment
Share on other sites

Thanks thaCURSEDpie! I will try that and give you feedback later. icon14.gif




EDIT: Allright, it´s working! Thanks again! Now I can see the car names and the values.


Does this also work for the CWeaponInfo.sif? I could simply test it but right now I don´t want to change anything there, just curious about this method.


EDIT2: No, it´s not working!


Some values can be changed but several others I cannot change. I click on the button but the new values are not transfered.

Edited by NaidRaida
Link to comment
Share on other sites


No. I don't feel like completely re-installing IV. Update to 1070.



Cool that it's working. Of course it's not working for CWeaponInfo.cif - the offset should be different. You're a bit vague. What values can't you change?

Link to comment
Share on other sites

  • 1 month later...

GUI works and by the console info I can tell that it can reload too but...


1. doesn't want to save values with "-" sign in front of them

2. after changing values and reloading doesn't make any changes.


I'm using patch just to make it clear now.

Link to comment
Share on other sites

GUI works and by the console info I can tell that it can reload too but...


1. doesn't want to save values with "-" sign in front of them

2. after changing values and reloading doesn't make any changes.


I'm using patch just to make it clear now.

Hey man, sorry for the late reply. I'm veerry busy IRL, so I don't have much time.



1. That's probably because I made a mistake in setting the restrictions for the relevant parameter. What parameter were you trying to change? Or does this go for all of them? Have a look at the .sif files in the ./scripts/structedit folder (just open with notepad). You'd probably see what's wrong right away.


2. I don't really understand what you mean. The changes are made directly to the values in-memory. If you see a value has changed after you've changed it - it has changed. The mod displays the true values as they are present in-memory. If they do not change, something went wrong (which can be quite a lot).


If you restart the game (or load a new save), the game probably reloads the values into memory, thus the changes you've made are undone.



Making permanent changes was never the scope of this mod - the goal was to aid modders in editing some of the config files (handling.dat, waeponinfo.xml). When I have the time (and motivation) I might rebuild the mod and also make it possible to change values programatically. There's something like that implemented already (see the source @ github), but it's not very nice and I haven't tested it yet.

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

  • 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.