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

    2. News

    1. Red Dead Redemption 2

    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

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

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

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

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

    2. Site Suggestions

Sign in to follow this  
opium_addict

GTA4 - modding ability

Recommended Posts

opium_addict

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

Share this post


Link to post
Share on other sites
Shadow-Link

Awesome work! Hope you'll be able to fix the crash. Then we can all start modding the game.. biggrin.gif

Share this post


Link to post
Share on other sites
coin-god

Nice work, its a pitty i dont have 4 for testing or beeing exited.

Share this post


Link to post
Share on other sites
mr.Dageron

Very cool!! cookie.gif

And how it works with multiplayer?

Share this post


Link to post
Share on other sites
opium_addict

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

Share this post


Link to post
Share on other sites
the hubster

Nice one, thanks for this.

Edited by the hubster

Share this post


Link to post
Share on other sites
Shadow-Link

Doesn't seem to work with the retail version of the game.. Crashes a few seconds after the DOS box comes up.

Share this post


Link to post
Share on other sites
uncajesse

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

Share this post


Link to post
Share on other sites
Shadow-Link

I've got vista and it didn't work for me. I've turned off UAC and right clicked on the exe and selected 'Run as admin'. It still crashes at the same place.

Edited by Prince-Link

Share this post


Link to post
Share on other sites
opium_addict

It could be the DVD version differs from the steam version, i wouldn't know.

 

some one could PM me with info on the DVD version and i might be able to help.

Share this post


Link to post
Share on other sites
Arvis

Great, i guess this will help a lot of people. icon14.gif

Weird about Steam version, but well, couldn't that be steam.exe which is stopping GTA from launching? Just a guess.

Share this post


Link to post
Share on other sites
opium_addict

No, the only issue i see is that the GTA exe for DVDs is different from the steam version, which is possible and understandable.

Share this post


Link to post
Share on other sites
UZI-I

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

 

Share this post


Link to post
Share on other sites
opium_addict

You can do what you wish smile.gif

 

edit: disregard my previous statement

Edited by opium_addict

Share this post


Link to post
Share on other sites
UZI-I

I'm working with a DVD version.

 

And there is something I can't understand. Your Injector and my old one can't find the process. Endless loop on the SnapShot stuff. That's strange confused.gif

 

Share this post


Link to post
Share on other sites
opium_addict

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.

Share this post


Link to post
Share on other sites
Shadow-Link

is it possible that it's not working because I am running vista 64 bit?

Share this post


Link to post
Share on other sites
opium_addict

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.

Share this post


Link to post
Share on other sites
Shadow-Link

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

Share this post


Link to post
Share on other sites
the hubster

nvm, ty link.

Edited by the hubster

Share this post


Link to post
Share on other sites
Shadow-Link

He posted the source of his programme, you can download it in the 5th post wink.gif

Share this post


Link to post
Share on other sites
aru

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

Share this post


Link to post
Share on other sites
archey
Nice work, its a pitty i dont have 4 for testing or beeing exited.

haha same my computer can't run it.

 

@opium-addict good work man hopefully when i get my new comp next year i can mod GTA 4

Share this post


Link to post
Share on other sites
evilrex

This is an amazing start, for saying the game has only been out for 2 days. Sadly GTA IV crashes at the command box... hopefully you guys can fix it. I'm using the retail version.

Share this post


Link to post
Share on other sites
JKM
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

Share this post


Link to post
Share on other sites
raytracer

Great work man! Thanks!

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
mkey82
*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).

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
DexX

 

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.

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

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