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: Tuesday, Jan 31 2012, 17:40
Quote Post


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

XXXXX



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

 
NaidRaida  
Posted: Saturday, Feb 4 2012, 18:02
Quote Post


Inactive user
Group Icon
Group: Members
Joined: Dec 14, 2010

anarchist.gif

XXXXX



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 1.0.4.0 (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.

This post has been edited by NaidRaida on Saturday, Feb 4 2012, 19:27
PM
  Top
 

 
Threepwood  
Posted: Saturday, Feb 4 2012, 19:43
Quote Post


Calm like a bomb.
Group Icon
Group: Members
Joined: Jul 13, 2008

XXXXX



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

 
thaCURSEDpie  
Posted: Sunday, Feb 5 2012, 20:25
Quote Post


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

XXXXX



NaidRaida:
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:
CODE

CVehicleInfo 0x110 0x11E3BF0 115


To
CODE

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.

Threepwood:
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
CODE

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.

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

This post has been edited by thaCURSEDpie on Sunday, Feb 5 2012, 20:49
PM
  Top
 

 
Threepwood  
Posted: Monday, Feb 6 2012, 06:34
Quote Post


Calm like a bomb.
Group Icon
Group: Members
Joined: Jul 13, 2008

XXXXX



Thanks a lot!!
PM
  Top
 

 
NaidRaida  
Posted: Monday, Feb 6 2012, 19:14
Quote Post


Inactive user
Group Icon
Group: Members
Joined: Dec 14, 2010

anarchist.gif

XXXXX



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.

This post has been edited by NaidRaida on Tuesday, Feb 7 2012, 19:56
PM
  Top
 

 
rippi  
Posted: Tuesday, Feb 14 2012, 14:29
Quote Post


Crackhead
Group Icon
Group: Members
Joined: Sep 7, 2010

XXXXX



add support for patch 1.0.4.0 pleaseee smile.gif
PM
  Top
 

 
thaCURSEDpie  
Posted: Tuesday, Feb 14 2012, 15:29
Quote Post


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

XXXXX



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

NaidRaida:
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?
PM
  Top
 

 
chasez  
Posted: Friday, Apr 6 2012, 00:04
Quote Post


Living On Times Square
Group Icon
Group: Members
Joined: Nov 21, 2008

us.gif

XXXXX



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 1.0.7.0 just to make it clear now.
PMMSNICQ
  Top
 

 
thaCURSEDpie  
Posted: Thursday, Apr 12 2012, 09:39
Quote Post


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

XXXXX



QUOTE (chasez @ Friday, Apr 6 2012, 00:04)
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 1.0.7.0 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.

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

 
chasez  
Posted: Friday, Apr 13 2012, 13:45
Quote Post


Living On Times Square
Group Icon
Group: Members
Joined: Nov 21, 2008

us.gif

XXXXX



QUOTE (thaCURSEDpie @ Thursday, Apr 12 2012, 09:39)
QUOTE (chasez @ Friday, Apr 6 2012, 00:04)
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 1.0.7.0 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.

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


as far as I understand it should make changes in the game in real-time but not permanently in the handling file but it doesn't show any difference in the game. I know that center of the mass z axis value -0.33 doesn't change because there's "-" sign in front of it. All of the values can be changed but they don't have the effect on the game whatsoever. I think when I set Center of the mass z axis value to 0.3 I should see changes pretty clearly.

This post has been edited by chasez on Friday, Apr 13 2012, 13:48
PMMSNICQ
  Top
 

 
thaCURSEDpie  
Posted: Friday, Apr 13 2012, 19:00
Quote Post


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

XXXXX



QUOTE ("chasez")

as far as I understand it should make changes in the game in real-time but not permanently in the handling file but it doesn't show any difference in the game. I know that center of the mass z axis value -0.33 doesn't change because there's "-" sign in front of it. All of the values can be changed but they don't have the effect on the game whatsoever. I think when I set Center of the mass z axis value to 0.3 I should see changes pretty clearly.

If the value changes after you've clicked the button, it's changed. It's as simple as that. If you observe no changes in-game, that may be because you need to unload the relevant model (for example, if you change a car's mass, you won't observe any changes. You need to load a save for the changes to take effect).

I already described how you can change the restrictions regarding negative numbers, so I'm not going to go into that again.
PM
  Top
 

 
thaCURSEDpie  
Posted: Sunday, Apr 15 2012, 13:42
Quote Post


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

XXXXX



Was bored yesterday, so I worked on the mod some more. I've decided I want the mod to take a bit of a different direction. At the moment it's a small *aid* in modding handling.dat and weaponinfo.xml , I want it to be more than that. I want to take away the need to actually edit the native files.

Because a lot of people ask for it, I've implemented a contents exporter and loader. It's kind of hard to explain in text, but in essence the mod takes the values from memory and dumps them into a file which is editable with Microsoft Excel or any other spreadsheet program.

So that enables you to easily edit the vehicle / weapon parameters from Excel. Now if you're done, you can just tell the mod: "reload my settings", and it will open up the Excel file, read all the settings and then apply them.

This way, editing is much more easy. The mod will also standard load the customized Excel files, so you don't need to edit the actual handling.dat / weaponinfo.xml files, you can just edit the intermediate files.


So what to expect: (no guarantees though!)
* Data import + export to spreadsheets (tab-delimited)
* Auto loading of spreadsheets on game start (this saves the changes you've made in the in-game gui, or through Excel)
* In-game GUI still available of course
* Bugfixes
* Support for 1.0.4.0, 1.0.7.0, EFLC (latest patch).

(* API for programmers? - maybe)


At the moment I'm not sure when it will be released. "It's done when it's done." The import + export are done already, but the user-experience is still in 'Beta' stage. I'd also really like to support the timecyc.dat file, so that almost all interesting files are supported. 'Sadly' I have a very busy real life, which consists of study and sadly also work (who doesn't need money?), so it will take some time until it's done.

I'm aware of the fact that I'm kinda late with all this, considering GTA:IV came out in 2007 (?), but I expect GTA:V to be much like GTA:IV, so it *should* be relatively easy to port.
PM
  Top
 

 
Skyforger  
Posted: Saturday, May 12 2012, 04:24
Quote Post


Rat
Group Icon
Group: Members
Joined: Apr 20, 2009

uk.gif

XXXXX



EPIC MAN !
might just start playing again and gather a drift team again.

I have no clue why was this not done a 2 years ago.
PMMSN
  Top
 

 
thaCURSEDpie  
Posted: Saturday, May 12 2012, 06:24
Quote Post


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

XXXXX



Glad you like it smile.gif.

And also thanks for reminding me this topic still exists. I actually have a brand-new-awesome version of "Structedit", though I will call it
Editor, eXPorter and Loader Of Static Information in Applications (EXPLOSIA).

At the moment it's basically done, but not yet 'release-done', which means all the bloody crap you need to actually release an application (installer, readme, etc). I haven't got time at the moment to make it all neat n tidy, so perhaps later today (again, if I have time tounge.gif) I will post a 'beta' version for you guys to test.

Explosia is a standalone tool (.exe). It does not require the C++ scripthook, .Net hook, etc. (You do need both if you want the auto-value loader to work though).

It allows you to edit values in-memory, export the values to an Excel-readable file (tab-delimited .txt) and load custom values from said files.

Apart from that it is not limited to only one version of GTA:IV (actually, there's no reason it should be limited to GTA:IV. It can be used for any application, hence the name. The user only needs to provide the required structure information.) - if the structure information comes with search data, the application will try to locate the target structure and update your structure information if the structure is found.

And it has multithreading n sh*t (though that's not so special, considering that it's Windows Forms application. Still, it's fun to say.)

Anyways, it's done when it's done and like I said, I hope to release a 'beta' version later today or perhaps tomorrow (if I find the time).
PM
  Top
 

 
thaCURSEDpie  
Posted: Tuesday, May 15 2012, 19:57
Quote Post


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

XXXXX



Download the Pre-Release here:
http://dl.dropbox.com/u/9652939/Explosia_Pre_Rel_1.rar

Note: not final version! I'm pretty sure it contains bugs.

I'm very very busy at the moment, so I can't come with updates soon. Sorry.
PM
  Top
 

 
Threepwood  
Posted: Friday, Jun 1 2012, 09:26
Quote Post


Calm like a bomb.
Group Icon
Group: Members
Joined: Jul 13, 2008

XXXXX



Hey cursed,

regarding the "old" struct edit.. please help me out. I am trying to implement a "value changer" into EPM for a special function which would edit 3 special handling values:
(Wc+) m_fTractionCurveMax
(Wc-) m_fTractionCurveMin
(Sb) m_fSuspensionBias

Since I can't figure out how to find your sources (github 404's), and since I think, reverse-developing your code does not make much sense, you might point me into the right direction.
All I would need is a method which reads those three values, changes them (with a value I can read in from a config, thats already done) and write it back into memory. Nothing more, that method alone would do it.

Any chance you (or anyone with knowledge) might help me please?
PM
  Top
 

 
thaCURSEDpie  
Posted: Friday, Jun 1 2012, 09:39
Quote Post


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

XXXXX



Will upload sources to both old and new things when I get the chance, prolly tomorrow or sunday.

Regarding your goal: have a look at the source of Explosia (= new version) when I upload it. I suggest you create a CEditableStruct instance (see source for how), which will allow you to change those params (provided they have been documented - check the SIFs and the wiki.). Explosia exports all the necessary classes and functions in Explosia_DLL.dll (actually I think I included documentation in the bin release, so you dont need the source).


Cheers.
PM
  Top
 

 
Threepwood  
Posted: Friday, Jun 1 2012, 09:55
Quote Post


Calm like a bomb.
Group Icon
Group: Members
Joined: Jul 13, 2008

XXXXX



Wow thanks a lot smile.gif
You being credited in the EPM readme is ok for you for me using your code in EPM then?
PM
  Top
 

 
thaCURSEDpie  
Posted: Saturday, Jun 2 2012, 21:46
Quote Post


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

XXXXX



Have a look at this example script I made. Haven't been able to test it in GTA, but it should work.

Added lots of comments, should be easy to understand.

http://pastebin.com/vC3eJVUG

Cheers.

PS:
I haven't documented the m_fSuspensionBias parameter yet. As an educated guess I would say the offset is either 0xB0 or 0xCC (you can try to add new values in the SIF). But that's just a guess and it could very well be wrong (it probably is).
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