Quantcast

Jump to content

» «
Photo

Making GTA San Andreas 2.0 Fully Moddable

227 replies to this topic
jarjar
  • jarjar

    Boss

  • BUSTED!
  • Joined: 07 Aug 2005

#1

Posted 24 September 2006 - 08:03 AM

First of all, I must thank DexX for contacting me about this, he saw it as a possibility to fix our San Andreas v2.0 modding problems involving the gta3.img file, he was unable to test it because he has version 1, I have spent the last 6 hours testing and troubleshooting his idea. And it was all worth it, GTA San Andreas Version 2.0 is now 100% moddable. So thanks to DexX, if it wasn't for him and his genius ideas, we would not have been able to make this possible.

Now, there are properly mixed ideas up to this point about what this topic is about, well let me give you the overview now. Late yesterday DexX contacted me on MSN with an idea for how we might be able to make GTA San Andreas Version 2.0, which is unmoddable up to the point of game textures, models, vehicles, peds and so on that are located in the games gta3.img file. Version 2.0 of the game was released due to the Hot Coffee mod, it removed the script for the Hot Coffee scenes, as well as adding code to the games exe (executable that starts the game) that checked the file size of the gta3.img file at start up, if you had modded it an it was bigger or smaller than the size programmed into the exe, then the game would automatically crash. DexX's idea was easy to understand, why? Well because it followed the normal modding protocol for Mapping. Creating a new .img file and putting the map files in it. Then using the gta.dat file in your games install directory to have the map access this new .img file to get the files required for the map to show up in game. So after speaking to him about it for about 30 minutes, I understood what he was on about and decided to test the theory.

At first testing I created a new .img file and placed it in the models folder of your games installation directory. Then I edited the first non-comment line of the gta.dat file in the data folder of the games installation directory to point to the new .img file I had created in the models folder. From here I extracted a vehicles TXD and DFF from the gta3.img file and then added them to the new .img file I had created. Now I couldn't remove the old files, because that would change the files size, thus still crashing the game. What we did know was that you could rename a file in the gta3.img and no re-build the img archive and the size would not be edited. So I used the format suggested by DexX, one that's not used by any of the game files, .old. Not only is it easy to find that way, but it stops game read problems.

From this I then saved the new .img file I had created for the game as VEHICLES.img and started the game for the first test. The game did not crash, glitch or create any errors. Experiment One was a success. Now it was time for Experiment Two, to do the same steps for an already spawned vehicle so we could see if it was drivable. Experiment Two passed with flying colors. Now it was the most important experiment. I had to install a third-party vehicle modification and test it. I downloaded JVT's Hummer for San Andreas and went through the same process as before only this time adding the hummer to the new file and renaming it to another vehicles name. The experiment was a success, and you can see by the image below of me driving a Ryder's Picadoor that I had modded to be the Hummer, on San Andreas Version 2.0.

Okay, that I think that's enough of the overview of what we did, now let me show you how to do it yourself and make your game, if it's GTA San Andreas Version 2.0, fully moddable.

The Guide To Making GTA San Andreas V2.0 Fully Moddable:

First of all, doing this is very simple, but it requires two tools, there may be more that do all the hard work for you, but these are the two I used that worked for me, so it's what I will be doing the tutorial on. Once you have done this once, you'll be able to test it out using different tools yourself.

Tools Required:
IMG Tool 2.0 - Allows you to rename files.
Alci's IMG Editor 1.5 - Allows you to add files easily and create new .img files.

Step 1:
Make a backup of your games gta3.img and gta.dat files, I know you hear it all the time, but with this, it is extremely important, one slip up and you'll have to reinstall your game all over again to get the game working again. And at times you may get confused and end up making a mistake, so take don't take the risk. Backup your games gta3.img and gta.dat files. gta3.img file is located in your "models" directory in you games installation directory, which by default is "C:\Program Files\Rockstar Games\GTA San Andreas\". Then your gta.dat file is located in the "data" folder in the same installation.

Step 2:
Add the following line to the first line (without the quotation marks) after all the comments in the original gta.dat file (note: comments are lines that start with #):

CODE
"IMG MODELS\VEHICLES.IMG"


NOTE: "VEHICLES.IMG" is the new .img file you will be creating for the mods to be placed in. It can be called what ever you want, but in this guide I'm calling it "VEHICLES.IMG".

Your first 7 lines of gta.dat should now look like this:

CODE

#
# Load IDEs first, then the models and after that the IPLs
#
IMG MODELS\VEHICLES.IMG
IMG DATA\PATHS\CARREC.IMG
IMG DATA\SCRIPT\SCRIPT.IMG
IMG MODELS\CUTSCENE.IMG


Step 3:
Now you need to make a new .img file. Now the one down side of IMG Tool 2.0, is you can not create new .img files. So to save time, effort and problems, we will instead be using Alci's IMG Editor 1.5, which it a creat tool for this, although sadly is only available on two GTA Modding Websites. It's the only IMG Tool I have found so far that allows you to create new.img files. But of course, there is more than likely, others out there that I have not used.

Open Alci's IMG Editor 1.5 (double click the .exe included with the download, Alci's IMG Editor 1.5.exe) and create a new .img file:

user posted image
Click File -> New to create a new .img file


Now you need to add what ever files you are wanting to add to the game that would usually be put in the gta3.img file, in this case I will be adding JYC's Hummer for San Andreas Vehicle Modification to the game. So when I downloaded it and extracted the .zip file, I renamed the TXD and DFF files to the name of the vehicle I would be replacing, which in this case is the picadoor, which in the gta3.img is called picador.txd and picador.dff. Remember that there TXD and DFF file names may vary from what there game name is, so watch out for that.

So I renamed the to files from landstal.txd and landstal.dff (landstal is the gta3.img's code name for Landstalker):

user posted image
Click Rename the files your adding to the new .img file to the name of the file they will be replacing if they we're to be placed in the gta3.img file.


Step 4:

Now we need to add the files to the new .img file. In Alci's IMG Editor 1.5 click "Actions -> Import" and select the files your adding and click "Open" to add them to the file:

user posted image
Now import them files into the new .img file


Your IMG Archive should now look like this:

user posted image
This is how the IMG file should now look, note that it may look graphically different in different IMG Editors.


Save it (Ctrl+S) to your the models directory in your games installation directory, call it what ever you called the .img file in Step 1. If it was VEHICLES.IMG like I it was for us in this guide, then that's was it needs to be named, if it was something else, then you need to back track, find the name and name it that.

Step 5:

Now we're nearly done, we've added the files, saved VEHICLES.IMG or what ever you decided to call it, now all that's left to do is stop the game from reading the same files as that in your new .img file that are also in the gta3.img file. How do we do this? Simple, we can rename the contents of .img files without the files size being effected (well as long as you do not rebuild the archive), so we do this:

You need to find the files with the same name as those in your new .img file in the gta3.img file using IMG Tool 2.0 (this is because Alci's IMG Tool does not support file renaming in .img files), rename them to {filename}.old. The .old extension is all you need to change, this is what we use because the game does not use the .old file format extension for any game files. For example, if you we're doing adding the hummer over Ryders Picadoor like we are, you need to change picador.txd and picador.dff in your gta3.img file to picador.old and picador.old. Where picador is the name of the vehicle, skin, files, etc that your modding.

Your gta3.img file should look like this to begin with (remember if your not replacing the picadoor, then the file name will be different):

user posted image
Using IMG Tool 2.0, select the files of the same name as the files you just added to the new .img file.


The two selected files are what we will be renaming. Click "Commands -> Rename" while selecting only one of the files and change the .txd or .dff to .old. Then do the same for the next file of the same name which is usually above or below it if your viewing by "Name" and not "Offset". To change this click "Tools -> Sort -> Name".

user posted image
Click "Commands -> Rename" while selecting one of the files at a time and change the files extension to .old. In this case, we haves renamed the file from picadoor.dff to picadoor.old.


Once you have named both the files TXD and DFF file(s) to .old you are done. Simple exit from IMG Tool 2.0, without rebuilding the archive, and you are finished and ready to play.

That's how easy it is, it may look like a lot of steps but once you've done it once, you'll be fine and you'll soon be doing it just like how you do normal modding of the gta3.img on version 1 of the game.

What next?
I'm also soon going to begin work on a tool soon that will create a new .img file, copy the contents of the current gta3.img file into the new .img file and rename all the other ones in the gta3.img file to .old format. Meaning, you can mod your game without going through all these steps each time, because you'll be using the new .img file to replace, delete, add and rename files in. No need to even touch the gta3.img file then.

Any comments, ideas, problems, etc. post here.

Cheers'

DexX
  • DexX

    Black Hat

  • Feroci
  • Joined: 16 May 2002

#2

Posted 24 September 2006 - 08:20 AM

Synopsis: tell the game that the files in the gta3.img are invalid, and force them to load from a non-protected IMG - ours. in this case, the vehicles.img we created. Files are invalidated by renaming them.

Pros: Should work on any file(s) in the gta3.img
Cons: the files still can NOT be deleted from the gta3.img (crashes game), and all the unused files left in the img may cause problems with the game.

This method should work for basic mods that don't have alot of files, but for something like a TC, or a large map mod, i still recommend a v1 exe. The non-standard way of editing or modifying the img file(s) makes this especially cumbersome for map mods.

pdescobar
  • pdescobar

    Conformist Scum Panda

  • Members
  • Joined: 19 Jul 2005

#3

Posted 24 September 2006 - 08:32 AM Edited by pdescobar, 24 September 2006 - 08:35 AM.

Very interesting workaround you guys have created here. Well done icon14.gif

However, I would suggest not renaming both of the old files to the exact same thing since it is confusing if you later want to restore them as you'd have to guess which file was which based upon the size or some other characteristic. (I'm even kinda surprised you can name them the same.)

Alternative ideas:
1. Picking "bk" out of the sky for "BacKup," only change the last 2 letters of the extension so you turn "picador.dff" into "picador.dbk" and "picador.txd" into "picador.tbk".
2. Using an "old" prefix instead of changing the extension to get something like "old_picador.dff"
3. Adding the .old suffix to the current name, while leaving the current suffix intact, for example "picador.dff.old"

I think any of those approaches (assuming there aren't naming restrictions regarding the latter two) would be preferable to using the same names for multiple files.

DexX
  • DexX

    Black Hat

  • Feroci
  • Joined: 16 May 2002

#4

Posted 24 September 2006 - 09:49 AM

yea any rename should do, i figured changing just the extension is a good way to keep the file size as close to the original as possible. a bunch of files renamed so that the names are slightly longer, might increase the img filesize just enough to lock up the game.

An easier alternative might be to rename dff files to something like .mdl, and txd to something like .tex.

Knife
  • Knife

    Tits.

  • Zaibatsu
  • Joined: 11 Jul 2004
  • None

#5

Posted 24 September 2006 - 12:46 PM

I am feeling stupid because I thought of this idea a while ago but decided not to try it. Oh well, good job icon14.gif

YeTi
  • YeTi

    S'up Bitches?

  • Andolini Mafia Family
  • Joined: 28 Mar 2005

#6

Posted 24 September 2006 - 02:35 PM

Well done on discovering a way around the problems. Can't believe it is this simple though, I always thought it was something alot more complicated.

So has anyone tested the limits of this yet? How many vehicles can be added and map projects? I would have a play but I haven't got a V2 EXE.

Well done again to DexX and Jared.

police129
  • police129

    Player Hater

  • Members
  • Joined: 24 Aug 2006

#7

Posted 24 September 2006 - 03:43 PM

There's a much easier way to do this! just copy & paste this website in the adress bar:
http://www.grandthef...s-patch-200.php

you download it by hitting the telechargement button, it will pop up another screen, it will say continue, click on that, another pop up will come up, it will have a timer, hit the timer, it will then download, reason that i'm saying how to download is because it's german & very hard to understand.

Fat Person
  • Fat Person

    Player Hater

  • Members
  • Joined: 19 Jul 2006

#8

Posted 24 September 2006 - 07:55 PM Edited by Fat Person, 24 September 2006 - 09:54 PM.

So someone's finally figured out how to mod the second edition, huh? Nice work, I'll try it as soon as I'm done backing up my files.



EDIT: It didn't work. All it did was make the Error Report thing pop up. Maybe I did something wrong... I'll try again.

rebel_36
  • rebel_36

    dot connectah

  • Members
  • Joined: 14 Mar 2004

#9

Posted 24 September 2006 - 09:57 PM Edited by rebel_36, 24 September 2006 - 10:13 PM.

why not just use the downgrader? confused.gif

fully moddable, mem hacking, trainers, mp mods..

http://forum.mtavc.c...pic.php?t=15151

Fat Person
  • Fat Person

    Player Hater

  • Members
  • Joined: 19 Jul 2006

#10

Posted 25 September 2006 - 12:15 AM

QUOTE (rebel_36 @ Sep 24 2006, 21:57)
why not just use the downgrader? confused.gif

fully moddable, mem hacking, trainers, mp mods..

http://forum.mtavc.c...pic.php?t=15151

I just used that, it's a lot easier.



JarJar and DexX, I got your way to work, I did something wrong with the GTA.DAT file. The downgrader is a lot easier for me to use though.

Serious Dave
  • Serious Dave

    LAST GEN GAMER

  • Members
  • Joined: 04 Jan 2006

#11

Posted 25 September 2006 - 03:13 AM Edited by Serious Dave, 25 September 2006 - 03:26 AM.

well this is cool and V1 users might be able to use it for something too

but that idea of the copying tool sounds like a space eater

but i have an idea...a pre made gta.dat and a empty pre named img in a zip

EX: RAR or ZIP that has...
a readme that has your Guide in it
a pre made gta.dat
a pre named empty img

and if you can...try to find a way to skip Step 5

Picolini
  • Picolini

    ZOMG ROFL XD!!!!11

  • BUSTED!
  • Joined: 07 Dec 2002

#12

Posted 25 September 2006 - 06:34 AM

Hmmm... this is a great idea. I have 1.0, so it doesn't help me... but it did get me thinking about something... turn.gif

DexX
  • DexX

    Black Hat

  • Feroci
  • Joined: 16 May 2002

#13

Posted 25 September 2006 - 06:37 AM

For me, it was fun just as a technical challenge. jarjar was the one who insisted on a tutorial, and i support that. As others have pointed out, an exe patch is easier and does more. Obviously we can't, and wouldn't anyway, force anyone to use this method, but it is nice to know its an option.
Exe patches and the like are dubious in nature, and may not be around forever; this technique will work as long as you have the game.

QUOTE
and if you can...try to find a way to skip Step 5

that step is the crux of the process though; the game won't load the files from another IMG, until it determines that the files in the gta3.img are not there, hence why they have to be renamed.

skatingfreak666
  • skatingfreak666

    Snitch

  • Members
  • Joined: 06 Aug 2006

#14

Posted 25 September 2006 - 12:07 PM

You deserve everything JarJar and DexX.

JT: 1 Us: 2.. TOTAL PWNED.

Nice work.

Freakorama
  • Freakorama

    Freako

  • The Yardies
  • Joined: 26 Sep 2006
  • Australia

#15

Posted 26 September 2006 - 11:16 AM

Verry verry nice

as soon as i got san andreas it ws v2 exe i just got v1 quicker and easyer

GTA__Playa
  • GTA__Playa

    FIFster

  • BUSTED!
  • Joined: 20 Sep 2006

#16

Posted 29 September 2006 - 02:42 AM

QUOTE (Knife @ Sep 24 2006, 12:46)
I am feeling stupid because I thought of this idea a while ago but decided not to try it. Oh well, good job icon14.gif

I thought about 2 days ago, but iI don't have V2, how weird...

San Anzeas
  • San Anzeas

    Hitman

  • Members
  • Joined: 22 Feb 2006

#17

Posted 29 September 2006 - 03:53 PM

Hey well done guys !!!!!!

jarjar
  • jarjar

    Boss

  • BUSTED!
  • Joined: 07 Aug 2005

#18

Posted 01 October 2006 - 10:20 AM

Hi all, sorry I haven't been here to answer any questions, I've been on holidays for the last week, and didn't have access to an Internet connection. However, during the holiday I had some time to test some ideas and questions you guys have had:

Doubled Up Files:

Having a file in the new IMG file as well as the old gta3.img file does not seam to cause problems, however, I would not recommend it as I only noticed this by accident, whether it was cause by me not having a different file in the new IMG (because the files we're identical, not mods, just doubled up files) I don't know. I'll do further testing of this soon.

Deleting Old File Results:


An interesting discovery here, I accidentally deleted a file (picador.txd) while doing some testing, and found later that the game still worked, no error what so ever. However, if you remove both files (picador.txd and picador.dff) the game crashes. Interesting, but not really very useful sadly.

Name Extension Size Test Results:

No Change

3 digit - .old = Pass, as proved in the tutorial.

+

4 digit - .four = Passed
5 digit - .gtasa = Passed
10 digit - .gtatexture = Passed

-

2 digit - .td = Passed
1 digit - .g = Passed

Number Extensions

No. Only - .2315 = Passed
No. & Text - .test5 = Passed

So over all, you can have any extension you wish for the old files in the gta3.img file. Just remember, they can not have symbols in them. Only use letters and numbers in extensions, never anything else, as errors may occur with some programs/games.

I'll be doing some more testing over the coming days, so if you have any technical questions, please post them and I'll be sure to test them. icon14.gif

----------------------------------

QUOTE
but that idea of the copying tool sounds like a space eater


Yes, but there will be other tools that will make it easier included with the Toolkit I release.

Also, thanks to everyone for there support so far smile.gif .

-/TNT\-
  • -/TNT\-

    not like any other rainbow.

  • Members
  • Joined: 06 Aug 2006

#19

Posted 01 October 2006 - 11:04 AM

Great work DexX and jarjar! This is so good for whoever has the v2!


cookie.gif cookie.gif cookie.gif cookie.gif cookie.gif

uNi
  • uNi

    Feroci

  • Administrator
  • Joined: 14 May 2004
  • None
  • Best Official Gang 2014 [Feroci]

#20

Posted 01 October 2006 - 07:19 PM

Nice work both of you, this is gonna be very useful. icon14.gif

jarjar
  • jarjar

    Boss

  • BUSTED!
  • Joined: 07 Aug 2005

#21

Posted 02 October 2006 - 08:53 AM

Thanks everyone, I'm glad everyone is finding it helpful, just a bugger that no one that knows about this topic has version 2.00 tounge.gif .

Cheers'
jarjar

Serious Dave
  • Serious Dave

    LAST GEN GAMER

  • Members
  • Joined: 04 Jan 2006

#22

Posted 02 October 2006 - 11:15 PM

i am doing the best i can to tell all the v2 users

problems i have hit...
Mike22k at GTA-Series is being a dick and keeps deleteing my links to this Tutorial

-/TNT\-
  • -/TNT\-

    not like any other rainbow.

  • Members
  • Joined: 06 Aug 2006

#23

Posted 03 October 2006 - 02:18 PM

QUOTE (Serious Dave @ Oct 2 2006, 23:15)
i am doing the best i can to tell all the v2 users

problems i have hit...
Mike22k at GTA-Series is being a dick and keeps deleteing my links to this Tutorial

people being a hols

jarjar
  • jarjar

    Boss

  • BUSTED!
  • Joined: 07 Aug 2005

#24

Posted 03 October 2006 - 03:26 PM

QUOTE (Serious Dave @ Oct 3 2006, 09:15)
i am doing the best i can to tell all the v2 users

problems i have hit...
Mike22k at GTA-Series is being a dick and keeps deleteing my links to this Tutorial

I saw that, with the link in your signature and what not. Many other members are doing this too, so thanks everyone icon14.gif .

Yeah, I saw your topic earlier (as you would now since I PM'ed on there about it). Don't worry about it. For some odd reason he thinks that GTA-Downloads is actually a Rockstar Games Partner website confused.gif . Which is odd considering, they have no partner websites, not to my knowledge anyway. And after Hot Coffee, I dought they would become partners with a GTA Modding Website to say the least.

-/TNT\- - Well at the moment it's one person, besides, there lose I guess tounge.gif .

morsolo
  • morsolo

    The Cake is a lie!!!

  • Members
  • Joined: 21 Jun 2006

#25

Posted 08 October 2006 - 07:41 AM

Well, congratz, I'm a V2.0 sufferer, but not anymore!!!

I did buy 1.0, but I think it was a un-official dud copy (bloody fa**ots) And it DID NOT work...
The downgrader never worked for me either...

Thanx to you, I CAN MOD AGAIN!!!
And, this has no limits...

There might even be a way to ADD cars, you'd have to edit the .exe, but this would make it easier to add cars...
But, for now, I'm just gonna mod the sh*t otta my game!!!

THANK YOU SO MUCH!!!

inlove.gif inlove.gif biggrin.gif biggrin.gif smile.gif tounge.gif

jarjar
  • jarjar

    Boss

  • BUSTED!
  • Joined: 07 Aug 2005

#26

Posted 08 October 2006 - 07:59 AM

Good to see this is becoming useful to people, best of luck morsolo. Also, yes, I would imagine it would be possible to add more vehicle, you could do anything you wanted if you move all gta3.img files to a new folder and rename all of gta3.img's files to .old. You are then allowed to do everything you can do with version 1.0.0 icon14.gif .

Direct!
  • Direct!

    joker, toker, midnight smoker

  • Members
  • Joined: 01 Feb 2004

#27

Posted 08 October 2006 - 09:53 AM

QUOTE (police129 @ Sep 24 2006, 17:43)
There's a much easier way to do this! just copy & paste this website in the adress bar:
http://www.grandthef...s-patch-200.php

you download it by hitting the telechargement button, it will pop up another screen, it will say continue, click on that, another pop up will come up, it will have a timer, hit the timer, it will then download, reason that i'm saying how to download is because it's german & very hard to understand.

I'm sorry but it's French, not German. sarcasm.gif

-/TNT\-
  • -/TNT\-

    not like any other rainbow.

  • Members
  • Joined: 06 Aug 2006

#28

Posted 08 October 2006 - 02:49 PM

QUOTE (Direct! @ Oct 8 2006, 09:53)
QUOTE (police129 @ Sep 24 2006, 17:43)
There's a much easier way to do this!  just copy & paste this website in the adress bar:
http://www.grandthef...s-patch-200.php

you download it by hitting the telechargement button,  it will pop up another screen,  it will say continue,  click on that,  another pop up will come up,  it will have a timer,  hit the timer,  it will then download,  reason that i'm saying how to download is because it's german  & very hard to understand.

I'm sorry but it's French, not German. sarcasm.gif

Duh, makes you want to smash your keyboard. Don't you know what fr stands for?

Mark
  • Mark

  • Feroci
  • Joined: 15 Aug 2002
  • United-Kingdom

#29

Posted 09 October 2006 - 09:07 PM

lol, and seriously you can just guess it anyway. Look at the urls for the links as you go over them, and geez learn to speak some other modern language other than english lol.

Anyway, great tutorial, don't affect me as i got 1.0, but woo, good to see that the technical understanding of the situation has reached a high enough level that no patches are needed to get round R*s eeevil plans tounge.gif

I say tell Jack Thompson XD. Tell em R* did a lousy job.

Serious Dave
  • Serious Dave

    LAST GEN GAMER

  • Members
  • Joined: 04 Jan 2006

#30

Posted 10 October 2006 - 06:06 AM

QUOTE
I say tell Jack Thompson XD. Tell em R* did a lousy job.

for the love of god tell me you are joking....

that will just end up with more coffee hell and a V2.01 exe of DooM




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users