Jump to content

GTA4 - modding ability


Recommended Posts

GTA4 LAUNCHER BY OPIUM - - -

 

ALLOWS FOR MODDED FILES ON GTA4 (SINGLE PLAYER ONLY!!!!)

 

README:

 

///////////////////////////

// s0beit.org production //

///////////////////////////

 

TITLE:   GTA4-Launcher

PURPOSE: Modifying your GTA4 files (tested on STEAM release ONLY!)

CREDITS:   s0beit (aka opium), Sinner, P47R!CK, sp0rk

PROPS:   www.s0beit.org :: www.myg0t.com :: www.gtaforums.com :: www.mtavcsux.net

 

HOWTO:   Open the launcher, if you have not already then use the new patching tool,

  use it to locate the "filelist.pak" which should be in /GTAIV/pc/data/

  of your Grand Theft Auto 4 installation, patching this file allows for modding ALL the files

  in your GTA4 installation.

 

  Credit for the filelist.pak patch goes to "aru" of gtaforums.com

 

  From then on, you do not need to patch this file again.

  Next, while the loader is running; start GTAIV.

 

  You will need to run the loader each time before running GTAIV to use modified files.

 

instructions:

 

Run the "hook.exe", then run GTA4. That is all!

 

Releases:

Version 1.0, Source code included:

[Mirror 1]: http://www.project-j.nl/gta4-launcher_release.rar

[Mirror 2]: http://irc.thisgamesux.net/gta4mod/gta4-launcher_release.rar

 

Version 2.0 Crash fix (No Source Code):

[Mirror 1]: http://irc.thisgamesux.net/gta4mod/bin_v2.rar

 

Version 3.0 Full revision, allows modding of all GTAIV files (credits to aru)

[Mirror 1]: http://irc.thisgamesux.net/gta4mod/bin_v3.rar

 

Version 4.0 addon, allows taking screenshots of the game without any other software needed. (Non-Vista compliant)

[Mirror 1]: http://irc.thisgamesux.net/gta4mod/bin_v4.rar

 

Media:

 

Pictures:

[Rocket Glock]: http://files.uploadffs.com/5c6b59_rocket_glock_1.PNG

[Screenshot taken with v4]: http://files.uploadffs.com/75498a_2008_12_8_35.jpg

 

Video:

[opium's modded weapon frenzy]:

Edited by opium_addict
Link to comment
https://gtaforums.com/topic/379452-gta4-modding-ability/
Share on other sites

i edited the original post, the crash was my error.

 

i will post a video soon, but here is the EXE and DLL you need to run modded files

(REMEMBER TO BACK UP YOUR FILES!!! ONE TIME WARNING. I AM NOT RESPONSIBLE FOR DAMAGES THAT YOU CAUSED TO YOUR MODDED FILES!!!)

 

here is the release:

http://www.project-j.nl/gta4-launcher_release.rar

 

Instructions: Run before you start GTA4, then start GTA4.

 

you are done!

 

note to mods/admins:

 

(11:29:42) (opium) any copyright protection is still there

(11:29:48) (opium) except you can mod any files in

(11:29:51) (opium) "files.txt"

(11:29:57) (opium) the only securom part is in

(11:29:59) (opium) the launcher

Edited by opium_addict
Link to comment
https://gtaforums.com/topic/379452-gta4-modding-ability/#findComment-1058707378
Share on other sites

If you have Vista, you have to run it as administrator (and no, being logged in as administrator is NOT how you do that). Google for: UAC. I'm not saying that's the problem, but for people with Vista (i'm not saying you have vista) that's usually the problem. wink.gif

Link to comment
https://gtaforums.com/topic/379452-gta4-modding-ability/#findComment-1058707607
Share on other sites

Hello Mr opium_addict.

 

Nice work tounge.gif

 

Hum i searshed a bit too and humm.

 

Maybe we could juts patch the "jz" (Jump if Zero) @0x403494 with 0x90 (On 2 BYTE) or change it to a "jnz" no ?

 

.text:0040348D                 call    sub_402CD0.text:00403492                 test    al, al.text:00403494                 jz      short loc_40344D

 

Link to comment
https://gtaforums.com/topic/379452-gta4-modding-ability/#findComment-1058707985
Share on other sites

Well i don't know why you are having problems, but yes i figured out the gta DVD and steam exe seem to be identical.

 

If there is errors its probably something on your side (Vista UAC or anti-spyware etc)

 

both have MD5 hash:

 

Input MD5   : 9FA1C2A3F2932D46538BC14E715CFCCC

 

 

they are identical.

Link to comment
https://gtaforums.com/topic/379452-gta4-modding-ability/#findComment-1058708196
Share on other sites

It could be, try running GTA4 and my program in 32bit compatibility.

 

although it is true you may be able to compile my program (with tweaks?) to run under x64 arch i am not sure as ive never worked with x64 before,

nor am i familiar with it in any way.

 

32bit compatibility should work fine however.

Link to comment
https://gtaforums.com/topic/379452-gta4-modding-ability/#findComment-1058708258
Share on other sites

Tried it on vista 32 bit (laptop) and got the same error.. May I ask you what O/S you use?

 

Edit: Compiled it on my own system using vs2008. Still doesn't work..

 

Think I'll need to create a XP partition then...

Edited by Prince-Link
Link to comment
https://gtaforums.com/topic/379452-gta4-modding-ability/#findComment-1058708604
Share on other sites

gtaiv.exe is compiled with /dynamicbase and thus is relocatable. Vista (no thanks to its support of ASLR) automatically relocates it to a new base offset when loading it, thus crashing due to the OP's loader requiring an unrelocated image. To change the behavior of it:

 

 

There is a system-wide configuration parameter that determines the behaviour of Vista's image randomization.

 

This parameter can be set in the registry key

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\MoveImages

which by default does not exist. This key has three possible settings:

 

If the value is set to 0, never randomize image bases in memory, always honor the base address specified in the PE header.

 

If set to -1, randomize all relocatable images regardless of whether they have the IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE flag or not.

If set to any other value, randomize only images that have relocation information and are explicitly marked as compatible with ASLR by setting the

IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE (0x40) flag in DllCharacteristics field the PE header. This is the default behaviour.

 

- http://www.fiveanddime.net/windows-vista-notes/index.html

 

Edited by aru
Link to comment
https://gtaforums.com/topic/379452-gta4-modding-ability/#findComment-1058708764
Share on other sites

gtaiv.exe is compiled with /dynamicbase and thus is relocatable. Vista (no thanks to its support of ASLR) automatically relocates it to a new base offset when loading it, thus crashing due to the OP's loader requiring an unrelocated image. To change the behavior of it:

 

 

There is a system-wide configuration parameter that determines the behaviour of Vista's image randomization.

 

This parameter can be set in the registry key

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\MoveImages

which by default does not exist. This key has three possible settings:

 

If the value is set to 0, never randomize image bases in memory, always honor the base address specified in the PE header.

 

If set to -1, randomize all relocatable images regardless of whether they have the IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE flag or not.

If set to any other value, randomize only images that have relocation information and are explicitly marked as compatible with ASLR by setting the

IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE (0x40) flag in DllCharacteristics field the PE header. This is the default behaviour.

 

- http://www.fiveanddime.net/windows-vista-notes/index.html

 

What does this mean?

Should any Vista user create those entry's? Isn't there any way to change the code for vista user's?

I think there should be a way to change the code for Vista users (quick research on google [http://www.nynaeve.net/?p=100]).

But Im a noob in scripting stuff... Im just interested to understand your post^^

 

But its really nice to see those fast progress on modding GTA4. Can't wait to make my own models wink.gif

 

greetz

JKM

Link to comment
https://gtaforums.com/topic/379452-gta4-modding-ability/#findComment-1058709609
Share on other sites

KickyMcAssington

Thanks Works for editing "WeaponInfo.xml" As a test I made my M4 into a super weapon, it was awesome.

I tried to edit "explosionFx.dat" to change the explosion damage of grenades but the change didn't take effect.

I haven't tried editing another file yet, but "handling.dat" was going to be my next attempt. I hope the explosion mod didn't work because the file is in a different directory and not because it is a .dat file instead of a .xml.. I really want to mess with some of those other files... ohh man the possibilities biggrin.gif

 

I don't really know how your code works ;-) I just know it does (mostly), so if you're able to address the explosionsfx.dat issue and any possible others I report I would be very grateful, thanks for the great patch!

 

*edit, just looking around the files, I wasn't able to find player health (or any player stats) or armor values, does anyone know what file to check?

Edited by KickyMcAssington
Link to comment
https://gtaforums.com/topic/379452-gta4-modding-ability/#findComment-1058710759
Share on other sites

*edit, just looking around the files, I wasn't able to find player health (or any player stats) or armor values, does anyone know what file to check?

I don't think these are set in external (data) files. They should be in a script (like scm if they retained the format).

Link to comment
https://gtaforums.com/topic/379452-gta4-modding-ability/#findComment-1058710831
Share on other sites

KickyMcAssington

 

*edit, just looking around the files, I wasn't able to find player health (or any player stats) or armor values, does anyone know what file to check?

I don't think these are set in external (data) files. They should be in a script (like scm if they retained the format).

That makes sense, however, wouldn't the armor likely have a value somewhere in a data file as its an item you're able to pick up or buy in game? I don't really know it just seems logical.

 

Also I was re-reading the thread more carefully and I noticed opium_addict said this should work with everything in files.txt, and "explosionsfx.dat" is in there. I don't know if my mod was just badly done or if the change just didn't register for whatever reason but I'll do some more testing tomorrow (its 3am here) and get back to you guys.

Link to comment
https://gtaforums.com/topic/379452-gta4-modding-ability/#findComment-1058710861
Share on other sites

 

gtaiv.exe is compiled with /dynamicbase and thus is relocatable. Vista (no thanks to its support of ASLR) automatically relocates it to a new base offset when loading it, thus crashing due to the OP's loader requiring an unrelocated image. To change the behavior of it:

 

 

There is a system-wide configuration parameter that determines the behaviour of Vista's image randomization.

 

This parameter can be set in the registry key

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\MoveImages

which by default does not exist. This key has three possible settings:

 

If the value is set to 0, never randomize image bases in memory, always honor the base address specified in the PE header.

 

If set to -1, randomize all relocatable images regardless of whether they have the IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE flag or not.

If set to any other value, randomize only images that have relocation information and are explicitly marked as compatible with ASLR by setting the

IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE (0x40) flag in DllCharacteristics field the PE header. This is the default behaviour.

 

- http://www.fiveanddime.net/windows-vista-notes/index.html

 

Hmmm, I added the registry key as a DWORD, and set it to 0 (actually it's zero by default when you add a new key), it doesn't seem to help (still crashes, same spot) . I'm on Vista Home 64bit.

 

*IF* registry modification turns out to be necessary, it might be best to incorporate that into the tool. I always feel like i'm a keystroke away from killing my system when i run regedit. It's not something amateurs should be poking about in.

Link to comment
https://gtaforums.com/topic/379452-gta4-modding-ability/#findComment-1058711141
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
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

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