Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (86,075 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. 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

    2. Red Dead Redemption

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

aru

GTA4 - File Modding Ability Patch

Recommended Posts

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

Share this post


Link to post
Share on other sites
Deceiver

love this.

 

i made a beastie of a sabre gt

 

little vid stream here; http://www.zshare.net/video/524252134350a51d/

 

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

 

 

 

 

Share this post


Link to post
Share on other sites
DeathbyMike

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 ?

Share this post


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

Share this post


Link to post
Share on other sites
aru

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.com/index.php?showtop...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).

Edited by aru

Share this post


Link to post
Share on other sites
Vicariously

Much better mate.

 

Thats exactly what all us nub's needed.

 

Thank you.

Share this post


Link to post
Share on other sites
hipshotgbg

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

Share this post


Link to post
Share on other sites
benq

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.

Edited by benq

Share this post


Link to post
Share on other sites
Costar

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

Edited by Costar

Share this post


Link to post
Share on other sites
aru

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

Share this post


Link to post
Share on other sites
Killuminati91

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

Share this post


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

Share this post


Link to post
Share on other sites
Costar

 

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

Share this post


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

Share this post


Link to post
Share on other sites
hipshotgbg

 

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?

Edited by hipshotgbg

Share this post


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

 

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites
Dhampire

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.

Share this post


Link to post
Share on other sites
Costar

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

Edited by Costar

Share this post


Link to post
Share on other sites
Jops

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

Share this post


Link to post
Share on other sites
Disastorm

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.

Share this post


Link to post
Share on other sites
blckvec

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 ?

Edited by blckvec

Share this post


Link to post
Share on other sites
Mcwaffle

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.

Edited by Mcwaffle

Share this post


Link to post
Share on other sites
blckvec

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.

Share this post


Link to post
Share on other sites
Mcwaffle
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".

Share this post


Link to post
Share on other sites
siapnar

Very nice utility, thanks!

Share this post


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

Share this post


Link to post
Share on other sites
Sylvania

aru

 

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

 

 

 

Do it with patch?

 

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

Edited by Sylvania

Share this post


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

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

×

Important Information

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