Quantcast

Jump to content

» «
Photo

GTA4 - modding ability

244 replies to this topic
opium_addict
  • opium_addict

    CODE WRECKER

  • Members
  • Joined: 02 Aug 2008

#1

Posted 04 December 2008 - 04:48 PM Edited by opium_addict, 08 December 2008 - 05:42 AM.

GTA4 LAUNCHER BY OPIUM - - -

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

README:
QUOTE
///////////////////////////
// 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:
QUOTE
Run the "hook.exe", then run GTA4. That is all!


Releases:
Version 1.0, Source code included:
[ Mirror 1 ]: http://www.project-j...her_release.rar
[ Mirror 2 ]: http://irc.thisgames...her_release.rar

Version 2.0 Crash fix (No Source Code):
[ Mirror 1 ]: http://irc.thisgames...4mod/bin_v2.rar

Version 3.0 Full revision, allows modding of all GTAIV files (credits to aru)
[ Mirror 1 ]: http://irc.thisgames...4mod/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.thisgames...4mod/bin_v4.rar

Media:

Pictures:
[ Rocket Glock ]: http://files.uploadf...ket_glock_1.PNG
[ Screenshot taken with v4 ]: http://files.uploadf...008_12_8_35.jpg

Video:
[ opium's modded weapon frenzy ]:

Shadow-Link
  • Shadow-Link

    Li'l G Loc

  • Members
  • Joined: 01 Dec 2004

#2

Posted 04 December 2008 - 05:12 PM

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

coin-god
  • coin-god

    High Roller

  • $outh $ide Hoodz
  • Joined: 18 Mar 2007

#3

Posted 04 December 2008 - 05:16 PM

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

mr.Dageron
  • mr.Dageron

    Bbobik - my old nickname

  • BUSTED!
  • Joined: 25 Nov 2008

#4

Posted 04 December 2008 - 05:24 PM

Very cool!! cookie.gif
And how it works with multiplayer?

opium_addict
  • opium_addict

    CODE WRECKER

  • Members
  • Joined: 02 Aug 2008

#5

Posted 04 December 2008 - 05:24 PM Edited by opium_addict, 04 December 2008 - 05:30 PM.

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...her_release.rar

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

you are done!

note to mods/admins:
QUOTE
(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

the hubster
  • the hubster

    Sup Homies

  • Members
  • Joined: 03 May 2005

#6

Posted 04 December 2008 - 05:38 PM Edited by the hubster, 04 December 2008 - 05:41 PM.

Nice one, thanks for this.

Shadow-Link
  • Shadow-Link

    Li'l G Loc

  • Members
  • Joined: 01 Dec 2004

#7

Posted 04 December 2008 - 05:50 PM

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

uncajesse
  • uncajesse

    Player Hater

  • Members
  • Joined: 17 Aug 2007

#8

Posted 04 December 2008 - 06:10 PM

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

Shadow-Link
  • Shadow-Link

    Li'l G Loc

  • Members
  • Joined: 01 Dec 2004

#9

Posted 04 December 2008 - 06:19 PM Edited by Prince-Link, 04 December 2008 - 06:24 PM.

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.

opium_addict
  • opium_addict

    CODE WRECKER

  • Members
  • Joined: 02 Aug 2008

#10

Posted 04 December 2008 - 06:31 PM

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.

Arvis
  • Arvis

    Li'l G Loc

  • The Yardies
  • Joined: 28 Jul 2006

#11

Posted 04 December 2008 - 06:43 PM

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.

opium_addict
  • opium_addict

    CODE WRECKER

  • Members
  • Joined: 02 Aug 2008

#12

Posted 04 December 2008 - 06:57 PM

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

UZI-I
  • UZI-I

    WPL Manager...

  • Members
  • Joined: 23 Aug 2006

#13

Posted 04 December 2008 - 07:34 PM

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 ?
CODE

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

opium_addict
  • opium_addict

    CODE WRECKER

  • Members
  • Joined: 02 Aug 2008

#14

Posted 04 December 2008 - 08:05 PM Edited by opium_addict, 04 December 2008 - 08:13 PM.

You can do what you wish smile.gif

edit: disregard my previous statement

UZI-I
  • UZI-I

    WPL Manager...

  • Members
  • Joined: 23 Aug 2006

#15

Posted 04 December 2008 - 08:12 PM

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

opium_addict
  • opium_addict

    CODE WRECKER

  • Members
  • Joined: 02 Aug 2008

#16

Posted 04 December 2008 - 08:15 PM

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:
CODE
Input MD5   : 9FA1C2A3F2932D46538BC14E715CFCCC


they are identical.

Shadow-Link
  • Shadow-Link

    Li'l G Loc

  • Members
  • Joined: 01 Dec 2004

#17

Posted 04 December 2008 - 08:19 PM

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

opium_addict
  • opium_addict

    CODE WRECKER

  • Members
  • Joined: 02 Aug 2008

#18

Posted 04 December 2008 - 08:26 PM

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.

Shadow-Link
  • Shadow-Link

    Li'l G Loc

  • Members
  • Joined: 01 Dec 2004

#19

Posted 04 December 2008 - 09:37 PM Edited by Prince-Link, 04 December 2008 - 09:56 PM.

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

the hubster
  • the hubster

    Sup Homies

  • Members
  • Joined: 03 May 2005

#20

Posted 04 December 2008 - 10:10 PM Edited by the hubster, 04 December 2008 - 10:13 PM.

nvm, ty link.

Shadow-Link
  • Shadow-Link

    Li'l G Loc

  • Members
  • Joined: 01 Dec 2004

#21

Posted 04 December 2008 - 10:13 PM

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

aru
  • aru

    *poof*

  • Members
  • Joined: 20 Jun 2005

#22

Posted 04 December 2008 - 10:13 PM Edited by aru, 04 December 2008 - 10:17 PM.

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:

QUOTE

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.fiveanddi...otes/index.html

archey
  • archey

    Thug

  • Members
  • Joined: 18 Oct 2008

#23

Posted 04 December 2008 - 10:51 PM

QUOTE (goin-god @ Dec 4 2008, 12:16)
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

evilrex
  • evilrex

    Foot Soldier

  • Members
  • Joined: 27 May 2006

#24

Posted 05 December 2008 - 01:17 AM

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.

JKM
  • JKM

    [BM] Projectleader

  • Members
  • Joined: 16 Jul 2005

#25

Posted 05 December 2008 - 01:48 AM

QUOTE (aru @ Dec 4 2008, 22:13)
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:

QUOTE

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.fiveanddi...otes/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

raytracer
  • raytracer

    Player Hater

  • Members
  • Joined: 05 Dec 2008

#26

Posted 05 December 2008 - 03:42 AM

Great work man! Thanks!

KickyMcAssington
  • KickyMcAssington

    Player Hater

  • Members
  • Joined: 05 Dec 2008

#27

Posted 05 December 2008 - 10:44 AM Edited by KickyMcAssington, 05 December 2008 - 10:57 AM.

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?

mkey82
  • mkey82

    Keep riding hard, son

  • Members
  • Joined: 14 Feb 2008

#28

Posted 05 December 2008 - 11:03 AM

QUOTE (KickyMcAssington @ Dec 5 2008, 12:44)
*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).

KickyMcAssington
  • KickyMcAssington

    Player Hater

  • Members
  • Joined: 05 Dec 2008

#29

Posted 05 December 2008 - 11:15 AM

QUOTE (mkey82 @ Dec 5 2008, 11:03)
QUOTE (KickyMcAssington @ Dec 5 2008, 12:44)
*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.

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#30

Posted 05 December 2008 - 12:47 PM

QUOTE (aru @ Dec 4 2008, 16:13)
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:

QUOTE

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.fiveanddi...otes/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.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users