IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

This section is for obtaining help on creating and releasing tools

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (3) [1] 2 3   ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 [REL|SRC/BIN|IV] StructEdit

 Edit handling.dat/weaponinfo.xml ingame
 
thaCURSEDpie  
Posted: Friday, Jan 6 2012, 23:22
Quote Post


GTA:IV scripter
Group Icon
Group: Members
Joined: Jul 1, 2007

XXXXX



Intro
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: http://www.youtube.com/watch?v=NZ-7l4EOBks


Download
here
(see also: http://github.com/thacursedpie/structedit)
Current version: Beta v0.11

Requirements
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 )


Installation

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


Usage
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")

FAQ:
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.

This post has been edited by thaCURSEDpie on Monday, Mar 12 2012, 15:13
PM
  Top
 

 
fastman92  
Posted: Friday, Jan 6 2012, 23:26
Quote Post


фастман92 | ف
Group Icon
Group: Members
Joined: Jul 28, 2009

pl.gif

XXXXX



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

 
thaCURSEDpie  
Posted: Friday, Jan 6 2012, 23:34
Quote Post


GTA:IV scripter
Group Icon
Group: Members
Joined: Jul 1, 2007

XXXXX



QUOTE (fastman92 @ Friday, Jan 6 2012, 23:26)
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.
PM
  Top
 

 
GTARandom  
Posted: Saturday, Jan 7 2012, 00:05
Quote Post


GTA player since 2001
Group Icon
Group: Members
Joined: Jun 15, 2009

cw.gif

Member Award




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

 
thaCURSEDpie  
Posted: Saturday, Jan 7 2012, 00:14
Quote Post


GTA:IV scripter
Group Icon
Group: Members
Joined: Jul 1, 2007

XXXXX



QUOTE (GTARandom @ Saturday, Jan 7 2012, 00:05)
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.
PM
  Top
 

 
jitsuin  
Posted: Saturday, Jan 7 2012, 02:28
Quote Post


Meat Popsicle
Group Icon
Group: BUSTED!
Joined: Dec 6, 2011

us.gif

XXXXX



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

 
thaCURSEDpie  
Posted: Saturday, Jan 7 2012, 14:31
Quote Post


GTA:IV scripter
Group Icon
Group: Members
Joined: Jul 1, 2007

XXXXX



QUOTE (jitsuin @ Saturday, Jan 7 2012, 02:28)
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)
PM
  Top
 

 
kikiboy95  
Posted: Sunday, Jan 8 2012, 02:28
Quote Post


Still Vice!
Group Icon
Group: Members
Joined: Mar 23, 2010

sr.gif

XXXXX



This is one of the best IV modding programs I've come at to. You should be awarded for this one, gr8 job!
PM
  Top
 

 
thaCURSEDpie  
Posted: Sunday, Jan 8 2012, 14:33
Quote Post


GTA:IV scripter
Group Icon
Group: Members
Joined: Jul 1, 2007

XXXXX



kikiboy95:
Thanks man! smile.gif
PM
  Top
 

 
ldfxf  
Posted: Friday, Jan 13 2012, 01:29
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Sep 7, 2011

XXXXX



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!
THX A LOT.

This post has been edited by ldfxf on Friday, Jan 13 2012, 01:42
PM
  Top
 

 
nrv74  
Posted: Saturday, Jan 28 2012, 12:21
Quote Post


Crackhead
Group Icon
Group: Members
Joined: Feb 27, 2009

XXXXX



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?

This post has been edited by nrv74 on Saturday, Jan 28 2012, 13:14
PM
  Top
 

 
thaCURSEDpie  
Posted: Saturday, Jan 28 2012, 23:14
Quote Post


GTA:IV scripter
Group Icon
Group: Members
Joined: Jul 1, 2007

XXXXX



nrv74:
Same guy who also posted on the youtube vid?

Added other version of the commands, so now you can use either:
"si_gui"
or
"si-gui"

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)
PM
  Top
 

 
nrv74  
Posted: Saturday, Jan 28 2012, 23:19
Quote Post


Crackhead
Group Icon
Group: Members
Joined: Feb 27, 2009

XXXXX



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

 
thaCURSEDpie  
Posted: Saturday, Jan 28 2012, 23:20
Quote Post


GTA:IV scripter
Group Icon
Group: Members
Joined: Jul 1, 2007

XXXXX



QUOTE (nrv74 @ Saturday, Jan 28 2012, 23:19)
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.
PM
  Top
 

 
nrv74  
Posted: Sunday, Jan 29 2012, 09:46
Quote Post


Crackhead
Group Icon
Group: Members
Joined: Feb 27, 2009

XXXXX



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
PM
  Top
 

 
thaCURSEDpie  
Posted: Sunday, Jan 29 2012, 10:04
Quote Post


GTA:IV scripter
Group Icon
Group: Members
Joined: Jul 1, 2007

XXXXX



nrv74:
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)
PM
  Top
 

 
nrv74  
Posted: Sunday, Jan 29 2012, 10:31
Quote Post


Crackhead
Group Icon
Group: Members
Joined: Feb 27, 2009

XXXXX



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
PM
  Top
 

 
nrv74  
Posted: Monday, Jan 30 2012, 17:26
Quote Post


Crackhead
Group Icon
Group: Members
Joined: Feb 27, 2009

XXXXX



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 .
PM
  Top
 

 
thaCURSEDpie  
Posted: Monday, Jan 30 2012, 22:13
Quote Post


GTA:IV scripter
Group Icon
Group: Members
Joined: Jul 1, 2007

XXXXX



nrv74:
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.
PM
  Top
 

 
nrv74  
Posted: Tuesday, Jan 31 2012, 05:21
Quote Post


Crackhead
Group Icon
Group: Members
Joined: Feb 27, 2009

XXXXX



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^^
PM
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Pages: (3) [1] 2 3 

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG