Quantcast

Jump to content

» «
Photo

GTA4 - File Modding Ability Patch

240 replies to this topic
Vicariously
  • Vicariously

    Old account lost!

  • Members
  • Joined: 07 Dec 2008

#61

Posted 09 December 2008 - 04:38 AM

QUOTE (hipshotgbg @ Dec 8 2008, 22:08)
QUOTE (benq @ Dec 8 2008, 21:40)
If I modify any file the game didn't run..

I did this:

1-. Run magic.bat
2-. Patch filelist.pak
3-. Modify a file...

If I try to run the game on step 2, i can...

If i try to run the game on step 3 without step 2, i can't...

If I try to run the game on step 3 with step2, i can't..

Seems like my problem. Thank god I'm not the only one. smile.gif

Your not the only one.

I just think it has been oulined on what to do wrong.

Aru, can you please give us a detailed step by step guide. It will save a lot of users hassle, and also yourself a lot of hassle.

Deceiver
  • Deceiver

    Player Hater

  • Members
  • Joined: 09 Dec 2008

#62

Posted 09 December 2008 - 04:44 AM

love this.

i made a beastie of a sabre gt

little vid stream here; http://www.zshare.ne...4252134350a51d/

any of you had a play around with the editor and putting it on youtube?

i exported it using the web option, which created a 18mb wmv file (for 36 secs of video)

then i uploaded it to youtube and it was just a pixelated mess. any ideas?

thanks




DeathbyMike
  • DeathbyMike

    Player Hater

  • Members
  • Joined: 09 Dec 2008

#63

Posted 09 December 2008 - 05:03 AM

Hey guys, could use a hand here.

I've ran the bat file, and can launch the game after making some small changes to handling.dat no worries. Problem is when i start playing, it crashes after the loading screens.

If I switch back to the original filelist.pak it will load, but none of the changes to the cars are made.

Any suggestions ?

Vicariously
  • Vicariously

    Old account lost!

  • Members
  • Joined: 07 Dec 2008

#64

Posted 09 December 2008 - 05:06 AM

QUOTE (DeathbyMike @ Dec 9 2008, 05:03)
Hey guys, could use a hand here.

I've ran the bat file, and can launch the game after making some small changes to handling.dat no worries. Problem is when i start playing, it crashes after the loading screens.

If I switch back to the original filelist.pak it will load, but none of the changes to the cars are made.

Any suggestions ?

God i hope this doesnt happen to me when i figure it out.

aru
  • aru

    *poof*

  • Members
  • Joined: 20 Jun 2005

#65

Posted 09 December 2008 - 06:00 AM Edited by aru, 09 December 2008 - 09:40 PM.

Okay.. I guess the real point of this topic was to understand why the technique would work... and I provided the batch file only for simplicity but I guess a lot of people are having trouble with it.

Use opium/s0biet's loader patch if you can. This is a much more harder way to go about things, but its a logical way if you understand whats happening in the background.


There are essentially a few things going on here:

1. When the game loads, it opens files.txt and verifies the files in there -- this means, all of the files listed in files.txt need to be the original unmodified files... and all the files need to be in that list (just removing a file won't solve our problem).

2. In addition to verifying the files in files.txt, the game also loads a pre-cached copy of the files from filelist.pak.

3. When the game loads the real data from the files... it checks if it was in the precached filelist.pak. If not, it'll load from the real path of the file (not the path given in files.txt).


We cheat the verification system by:

1. Making copies of all the files in the files.txt list as filename.ext.magic

2. Modifying files.txt to point to the filename.ext.magic files.

3. Replacing filelist.pak with an empty file containing no files in the cached file list.

4. Editing the original files that the game looks for when it needs the data.

5. Now the game is fooled into checking the original files during the checking phase, but loads the modified files during the loading phase.


So.. step by step... here's what I would do:

1. Make sure you have all the original files (restore from backups if you don't... or worst case scenario reinstall/fix your install).

2. Make sure you can run the game and start/load a game and actually get in game. Don't use the loader if you're using this method.

3. Ensure that your windows is setup to show file extensions (In Explorer... Tools (ALT+T) -> Options -> View... Uncheck Hide extensions for known file types)

4. Ensure that your GTA IV directory/files are not readonly.... this is particularly important if you're on Vista and installed into Program Files -- I've seen some of my files there being write protected. To fix this, right click on the "Grand Theft Auto IV" folder, and click on Properties... uncheck Readonly and then click on OK.

5. Make a backup of pc\files\filelist.pak as filelist.pak.magic and overwrite it with the provided patched filelist.pak (the batch file doesn't do the overwriting with the patched file for you!)

6. Now, try modding one file.... for example, try the common\data\WeaponInfo.xml file. The changes are easily visible, and having a saved game doesn't affect the changes in the file. To mod this we will do the following:

6a. Make a copy of files.txt and call it files.txt.magic. (We're using .magic... but it could be anything you like... just name it differently) Don't ever ever edit any of the .magic files. If you did -- you messed up... start over again.

6b. Go into common\data and make a copy of WeaponInfo.xml and name it as WeaponInfo.xml.magic

6c. Edit common\data\WeaponInfo.xml and make your changes... for an easily visible example, check out opium's change here: http://www.gtaforums...st&p=1058712412

6d. Edit files.txt with notepad...

6e. Find the line saying "common\data\WeaponInfo.xml", and change it to "common\data\WeaponInfo.xml.magic" (no quotes)

6f. Find the line saying "pc\data\filelist.pak", and change it to "pc\data\filelist.pak.magic" (no quotes)

6g. Find the line saying "files.txt" (should be at the very bottom), and change it to "files.txt.magic" (no quotes again)

6h. What you've done now is to point checking part of the game to the WeaponInfo.xml.magic file but the game will still load WeaponInfo.xml when it needs to load the data. Run the game, and test your changes.

6i. If it didn't work at this point... you did something wrong -- don't go any further. If you're happy with the progress and don't mind doing the steps above for each file... don't go any further either!

7. Now that you've proven that it works for one file... you can use the batch file to "automagically" do it for all the files... but before we do, we have to undo the test changes we made in step 5/6. To do this:

7a. Delete common\data\WeaponInfo.xml and rename WeaponInfo.xml.magic to WeaponInfo.xml

7b. Delete files.txt, and rename files.txt.magic to files.txt

7c. Delete pc\data\filelist.pak and rename pc\data\filelist.pak.magic (We do this because the magic.bat will copy filelist.pak to filelist.pak.magic and screw everything up if filelist.pak is already patched before running the magic.bat file)

8. Now extract the magic.bat file to your GTAIV directory. Before you run it, make sure you have admin rights on your computer.

9. If you're on Vista, right click on magic.bat and click on Run as Administrator. Approve any UAC screen you get. If you're on XP, you can just double click on the magic.bat file.

10. When its complete... it has essentially completely done Step 6 for ALL the files mentioned in files.txt (i.e. it just saved you some trouble and some time).

11. Overwrite pc\data\filelist.pak with the provided patched filelist.pak (the batch file doesn't do the overwriting with the patched file for you!)

If you want to be extra safe... make backups of anything you edit (even though the .magic file essentially a backup).

Vicariously
  • Vicariously

    Old account lost!

  • Members
  • Joined: 07 Dec 2008

#66

Posted 09 December 2008 - 07:10 AM

Much better mate.

Thats exactly what all us nub's needed.

Thank you.

hipshotgbg
  • hipshotgbg

    Player Hater

  • Members
  • Joined: 05 Dec 2008

#67

Posted 09 December 2008 - 08:13 AM

I missed one simple step in there. Modified the wrong file. I will try this when comming home tonight! Thanks!

benq
  • benq

    Player Hater

  • Members
  • Joined: 08 Dec 2008

#68

Posted 09 December 2008 - 01:44 PM Edited by benq, 09 December 2008 - 01:57 PM.

Nobody have the solution?...

Edit: I changed the content of filelist.pack to a simple " " and i can run the game with a moded file, but itdidnt cause any effect.

Costar
  • Costar

    Li'l G Loc

  • Members
  • Joined: 07 Jan 2006

#69

Posted 09 December 2008 - 06:57 PM Edited by Costar, 09 December 2008 - 07:30 PM.

Aru, I definitely appreciate the more well-defined explanation of whats going on and how to go through the process .
However, there still seems to be an error in how your program searches for the files.txt, as when I run in yes (Vista), it loox for the files.txt in sys32 folder as it clearly displays its unable to find it in that location.

The magic.bat is in the R* game folder.. I could proly jus move files.txt to sys32 if there isnt some way to point magic.bat to look in the very directory it is in itself, for the file! Otherwise, would it work perhaps if I open cmd & switch to the game directory & run magic.bat from the prompt..hmm

Updating Ok, the program displayed the "error", however I've lookt in the sys32 folder and found the backed-up files.txt , so apparently its more of a display error rather than functional.. Will now proceed..

aru
  • aru

    *poof*

  • Members
  • Joined: 20 Jun 2005

#70

Posted 09 December 2008 - 07:31 PM

Hmm Costar... that is very odd. The cmd idea should work however. Remember to run cmd as an Administrator since you're on Vista.

Alternatively, you can edit the magic.bat file... and add the following lines before everything starts:

c:
cd "c:\path to\rockstar games\grand theft auto iv"

(Ofcourse replacing C: and the path to the correct ones).

Killuminati91
  • Killuminati91

    Brucie

  • Members
  • Joined: 28 Nov 2008

#71

Posted 09 December 2008 - 07:46 PM

thanks aru, works fine smile.gif

but you forgot to mention that you should also change the filelist.pak to filelist.pak.magic (or however you called the backup) in files.txt

gamerzworld
  • gamerzworld

    Why did I move here? I guess it was to bounce.

  • Members
  • Joined: 29 Nov 2005

#72

Posted 09 December 2008 - 08:06 PM

QUOTE (Costar @ Dec 9 2008, 13:57)
Aru, I definitely appreciate the more well-defined explanation of whats going on and how to go through the process .
However, there still seems to be an error in how your program searches for the files.txt, as when I run in yes (Vista), it loox for the files.txt in sys32 folder as it clearly displays its unable to find it in that location.

The magic.bat is in the R* game folder.. I could proly jus move files.txt to sys32 if there isnt some way to point magic.bat to look in the very directory it is in itself, for the file! Otherwise, would it work perhaps if I open cmd & switch to the game directory & run magic.bat from the prompt..hmm

I said this a couple of pages back, you need to run it from the command prompt rather than just double clicking and launching the bat file.

Costar
  • Costar

    Li'l G Loc

  • Members
  • Joined: 07 Jan 2006

#73

Posted 09 December 2008 - 08:55 PM

QUOTE (aru @ Dec 9 2008, 19:31)
Hmm Costar... that is very odd. The cmd idea should work however. Remember to run cmd as an Administrator since you're on Vista.

Alternatively, you can edit the magic.bat file... and add the following lines before everything starts:

c:
cd "c:\path to\rockstar games\grand theft auto iv"

(Ofcourse replacing C: and the path to the correct ones).

I was saying that I did see the file.txt.magic end up in my sys32 folder so I jus moved it to the rockstar.. I followed the rest of the instruction but it was a no go...
I decided to try editing just one file, in this case, handling.dat. I followed your direction as best I could, I can see how ppl are gettin a lil confuzzled..

At any rate, I get the jist, its basically "fooling" the "game" into checking the backup and seeing them as the originals that they are, but actually loading the edited file(s) ..

However, even after doing it manually, it would not even load up. I even tried using that "patched launcher" - it patches address xxxxxxx, it loads up but haults at random points early, I believe this is due to that damn securom.. I noticed when I closed out the window that the "patch" was repatching like every millisecond so I'm guessing it was "fighting" for control.. Again, I am using the retail.. I feel like takin it back to trade in for somethin that HOPEFULLY is not so deeply packed w/ securom ..

As an extra note, I say again and again, I dont care about copying, pirating, I'm not into that sht, I jus like mods because it adds customizing, interest & enjoyment beyond what designers create, adding to popularity & replay value ... There are a helluva alotta good unofficial "designers" out there that dont even do that kind of work but are so talented/skilled & have a passion for making excellent content for games, its all for the enjoyment of the game, too often its lookt at as some kind of "underground hacking society that are proponents of pirating", that is so arrogant. O well, I guess I and a few others are stuck till some way comes avail to "fix" the problems we experience..

aru
  • aru

    *poof*

  • Members
  • Joined: 20 Jun 2005

#74

Posted 09 December 2008 - 09:41 PM

QUOTE (hipshotgbg @ Dec 9 2008, 03:13)
I missed one simple step in there. Modified the wrong file. I will try this when comming home tonight! Thanks!

Oh yeah.. I did... it was late when I typed that up. Thanks... updated smile.gif

hipshotgbg
  • hipshotgbg

    Player Hater

  • Members
  • Joined: 05 Dec 2008

#75

Posted 10 December 2008 - 01:26 PM Edited by hipshotgbg, 10 December 2008 - 01:59 PM.

QUOTE (aru @ Dec 9 2008, 21:41)
QUOTE (hipshotgbg @ Dec 9 2008, 03:13)
I missed one simple step in there. Modified the wrong file. I will try this when comming home tonight! Thanks!

Oh yeah.. I did... it was late when I typed that up. Thanks... updated smile.gif

I think Im getting the hang of it. Just cant figure out why it isnt working.

Basicly this is what I have to do:

1, Edit files.txt and direct it to the copied original file, like handling.dat.magic (this makes the game believe that handling.dat.magic is the correct file while launching)
2, Replace the original filelist.pak with the patched one (the new file wont show the game the correct files like the original filelist.pak would whilte loading the game)
3, Edit the original handling.dat how I want (the game will read of the file during the game)
4, Start the game and drift away

Basicly thats it.

The magic.bat-file just makes copies of the original files and redirect files.txt to that ones. If I just want to edit this one file, handling.dat, magic.bat isnt necissery. Am I right?

Costar
  • Costar

    Li'l G Loc

  • Members
  • Joined: 07 Jan 2006

#76

Posted 10 December 2008 - 07:33 PM

QUOTE (hipshotgbg @ Dec 10 2008, 13:26)
QUOTE (aru @ Dec 9 2008, 21:41)
QUOTE (hipshotgbg @ Dec 9 2008, 03:13)
I missed one simple step in there. Modified the wrong file. I will try this when comming home tonight! Thanks!

Oh yeah.. I did... it was late when I typed that up. Thanks... updated smile.gif

I think Im getting the hang of it. Just cant figure out why it isnt working.

Basicly this is what I have to do:

1, Edit files.txt and direct it to the copied original file, like handling.dat.magic (this makes the game believe that handling.dat.magic is the correct file while launching)
2, Replace the original filelist.pak with the patched one (the new file wont show the game the correct files like the original filelist.pak would whilte loading the game)
3, Edit the original handling.dat how I want (the game will read of the file during the game)
4, Start the game and drift away

Basicly thats it.

The magic.bat-file just makes copies of the original files and redirect files.txt to that ones. If I just want to edit this one file, handling.dat, magic.bat isnt necissery. Am I right?

Has it workt for you hipshot ? Do you have retail or dlded version like from steam ? Mine is retail, had probs tryin to get it to work w/ this mod.. I think I need to find some other workarounds ..

hipshotgbg
  • hipshotgbg

    Player Hater

  • Members
  • Joined: 05 Dec 2008

#77

Posted 10 December 2008 - 07:39 PM

QUOTE (Costar @ Dec 10 2008, 19:33)
QUOTE (hipshotgbg @ Dec 10 2008, 13:26)
QUOTE (aru @ Dec 9 2008, 21:41)
QUOTE (hipshotgbg @ Dec 9 2008, 03:13)
I missed one simple step in there. Modified the wrong file. I will try this when comming home tonight! Thanks!

Oh yeah.. I did... it was late when I typed that up. Thanks... updated smile.gif

I think Im getting the hang of it. Just cant figure out why it isnt working.

Basicly this is what I have to do:

1, Edit files.txt and direct it to the copied original file, like handling.dat.magic (this makes the game believe that handling.dat.magic is the correct file while launching)
2, Replace the original filelist.pak with the patched one (the new file wont show the game the correct files like the original filelist.pak would whilte loading the game)
3, Edit the original handling.dat how I want (the game will read of the file during the game)
4, Start the game and drift away

Basicly thats it.

The magic.bat-file just makes copies of the original files and redirect files.txt to that ones. If I just want to edit this one file, handling.dat, magic.bat isnt necissery. Am I right?

Has it workt for you hipshot ? Do you have retail or dlded version like from steam ? Mine is retail, had probs tryin to get it to work w/ this mod.. I think I need to find some other workarounds ..

It didnt work. Just shuts down while in the launch. But it works as long as I dont edit any files. But when I edit a file it crashes.

aru
  • aru

    *poof*

  • Members
  • Joined: 20 Jun 2005

#78

Posted 11 December 2008 - 12:34 AM

QUOTE (aru @ Dec 9 2008, 16:41)
QUOTE (hipshotgbg @ Dec 9 2008, 03:13)
I missed one simple step in there. Modified the wrong file. I will try this when comming home tonight! Thanks!

Oh yeah.. I did... it was late when I typed that up. Thanks... updated smile.gif

Okay.... it was late when I typed that up too! sad.gif I meant to quote Killuminati91.

Anyway, seems like you guys are doing something wrong... its "supposed" to work. Only thing I can think of is remembering to have the original filepak.pak before running magic.bat and then replacing it with the patched file. Maybe I'll have to write a proper patcher for this instead of just a dummy batch file...

Dhampire
  • Dhampire

    Player Hater

  • Members
  • Joined: 11 Dec 2008

#79

Posted 11 December 2008 - 02:29 AM

new problem.

i used the magic.bat and it did fine - made copies and everything. i now am editing the handling.dat file and leaving the magic one alone since if i edit the magic one it wont load due to hash file.

the problem im having is when i edit the handling file i see no visible changes in any car that i edit. they weigh the same and dont go any faster or take less damage at all. what am i doing wrong?

ive been editing cars with the handling file manually since gta 3 so i know what im doing, yet their still seems to be no changes after i save the handling file.

Costar
  • Costar

    Li'l G Loc

  • Members
  • Joined: 07 Jan 2006

#80

Posted 11 December 2008 - 03:12 AM Edited by Costar, 11 December 2008 - 03:17 AM.

no no no no..

Aru, I figured out what was happening, we have to pay CAREFUL attention to EVERY lil step and TRY NOT to get confuzzled..

Thats what happened w/ me cuz I JUST took it SLOW carefully reading over ALL of the "manual" 1 file edit ..

And it WORKT!!!
I edited the handling.dat as my test file, workt perfect! It was cool I had a hefty, FAST Hummer, that can take alotta damage heh.. AND the cops, ... I changed all of the cop vehicles, helis too, ofcourse it means I cant use the annhilator but heck there are other helis.. jus have to find..

ANyways, I made all of the cop vehicles do about 1-7 mph .. I dont have to worry about escaping them now tounge.gif

I think if your instructions are perhaps read & rewritten it may become a lil easier for ppl to understand, heck a lil vid tut would be cool but I'm not suggesting you do that..

I'll try to repeat in words what I've just done: (hopefully I membered all steps here)
============================================================

NOTE: As Aru said, all the "original" files here MUST BE ORIGINAL FIRST, not previously altered so if you must reinstall the game or your backups of anything you previously altered..

1. Make a copy of the file "file.txt" and then rename the copy to "file.txt.magic" <- the files in here will NOT be altered!

2. Find whatever file you want to edit such as "handling.dat", make a copy of it and then rename the copy to "handling.dat.magic" <- this file will NOT be atlered!

3. Now edit the original "handling.dat" however you wish..

4. Next you can go into pc\data and locate "filelist.pak" you can simply RENAME this file to "filelist.pak.magic" THEN copy the "filelist.pak" file in Aru's gta-magic folder that you downloaded & paste it in the same folder as "filelist.pak.magic" ( pc\data)

5. Now, go back to the "file.txt" file, open it and edit the lines relative to the files you modified, in this case, find the line that says "handling.dat" and simply edit it to read "handling.dat.magic", NEXT, find the line that says "filelist.pak" and edit it to read "filelist.pak.magic", finally scroll down & where it reads "file.txt", edit it to read "file.txt.magic"..

6. Now save the file!

You SHOULD be able to load up the game and have your effects noteable ingame..
==========================================================


I hope I covered it now, if I made a goof, Aru or someone can correct me but I do beleive thats what I just did and it WORKT for me finally ...
As for using the "magic.bat" to do all that other stuff, I spose you can just re-read Aru's post ^_^ Ty Aru!!!

Jops
  • Jops

    Thug

  • Members
  • Joined: 29 Aug 2004

#81

Posted 12 December 2008 - 12:38 AM

or you can f*ck it up like I did and even putting everything back to their original files sitll causes the game not to startup

Disastorm
  • Disastorm

    Player Hater

  • Members
  • Joined: 12 Dec 2008

#82

Posted 12 December 2008 - 03:57 AM

thanks works great. is there any way to change your player model with this? I've been trying to modify the peds.ide file to play as other characters, but it just crashes when the game starts up.

blckvec
  • blckvec

    Player Hater

  • Members
  • Joined: 11 Dec 2008

#83

Posted 12 December 2008 - 07:25 AM Edited by blckvec, 12 December 2008 - 08:56 AM.

Thx aru .... just edited to get rid of bloom. Just a quick question tho, when the patch comes out will I have to revert the modifications before I install it or can I leave em ?

Mcwaffle
  • Mcwaffle

    Player Hater

  • Members
  • Joined: 12 Dec 2008

#84

Posted 12 December 2008 - 12:14 PM Edited by Mcwaffle, 12 December 2008 - 12:25 PM.

How do I revert EVERYTHING back to normal? I found this method of modding files to be way too frustating. I don't want any of these .magic files appearing. Everything stock please. I want to use Opiums way instead.

I'm using the STEAM version.

blckvec
  • blckvec

    Player Hater

  • Members
  • Joined: 11 Dec 2008

#85

Posted 12 December 2008 - 02:33 PM

Just Take all the .magic files (they should be the original files if you followed the instructions correctly) rename them back to normal by removing the ".magic" off the end and overwrite the ones you modified.

Mcwaffle
  • Mcwaffle

    Player Hater

  • Members
  • Joined: 12 Dec 2008

#86

Posted 12 December 2008 - 05:19 PM

QUOTE (blckvec @ Dec 12 2008, 14:33)
Just Take all the .magic files (they should be the original files if you followed the instructions correctly) rename them back to normal by removing the ".magic" off the end and overwrite the ones you modified.

Are you absolutely sure? I don't want to be banned when I log on a multiplayer game. I deleted all the files which had a magic duplicate, then deleted teh ".magic".

siapnar
  • siapnar

    Rat

  • Members
  • Joined: 03 Dec 2008

#87

Posted 12 December 2008 - 06:03 PM

Very nice utility, thanks!

blckvec
  • blckvec

    Player Hater

  • Members
  • Joined: 11 Dec 2008

#88

Posted 13 December 2008 - 06:16 AM

QUOTE (Mcwaffle @ Dec 12 2008, 17:19)
QUOTE (blckvec @ Dec 12 2008, 14:33)
Just Take all the .magic files (they should be the original files if you followed the instructions correctly) rename them back to normal by removing the ".magic" off the end and overwrite the ones you modified.

Are you absolutely sure? I don't want to be banned when I log on a multiplayer game. I deleted all the files which had a magic duplicate, then deleted teh ".magic".

Yes that's the whole reason for making backups of the original files. To undo the modifications.

Sylvania
  • Sylvania

    Lego their ego.

  • Members
  • Joined: 30 Jun 2005

#89

Posted 13 December 2008 - 06:29 AM Edited by Sylvania, 13 December 2008 - 07:28 AM.

aru

Nice idea but now it's obsolete or im an idiot.



Do it with patch?

Hell no, you can't. Have fun all.

blckvec
  • blckvec

    Player Hater

  • Members
  • Joined: 11 Dec 2008

#90

Posted 13 December 2008 - 08:03 AM

QUOTE (Sylvania @ Dec 13 2008, 06:29)
aru

Nice idea but now it's obsolete or im an idiot.



Do it with patch?

Hell no, you can't. Have fun all.

It still works... I just got done turning off bloom in the visualsettings.dat I installed the patch and the game wouldn't start. So I deleted all the modded files and put my backups back in place. Launched the game and it started. Closed the game and remodded and it worked.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users