IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules Attention:

This is for the discussion and releasing of tutorials for modifying GTA. Anything that isn't a tutorial will be deleted without notification.

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (12) [1] 2 3 ... Last »  ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 Making GTA San Andreas 2.0 Fully Moddable

 
jarjar  
Posted: Sunday, Sep 24 2006, 08:03
Quote Post


Boss
Group Icon
Group: BUSTED!
Joined: Aug 7, 2005

au.gif

XXXXX



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'
Users WebsitePMMSNAOLYahooICQ
  Top
 

 
DexX  
Posted: Sunday, Sep 24 2006, 08:20
Quote Post


Black Hat
Group Icon
Group: Retired Staff
Joined: May 16, 2002

Member Award




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

 
pdescobar  
Posted: Sunday, Sep 24 2006, 08:32
Quote Post


Conformist Scum Panda
Group Icon
Group: Members
Joined: Jul 19, 2005

Member Award




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.

This post has been edited by pdescobar on Sunday, Sep 24 2006, 08:35
Users WebsitePMMSN
  Top
 

 
DexX  
Posted: Sunday, Sep 24 2006, 09:49
Quote Post


Black Hat
Group Icon
Group: Retired Staff
Joined: May 16, 2002

Member Award




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

 
Knife  
Posted: Sunday, Sep 24 2006, 12:46
Quote Post


Tits.
Group Icon
Group: Moderators
Joined: Jul 11, 2004

uk.gif

Member Award




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
PMMSN
  Top
 

 
YeTi  
Posted: Sunday, Sep 24 2006, 14:35
Quote Post


S'up Bitches?
Group Icon
Group: Andolini Mafia Family
Joined: Mar 28, 2005

en.gif

Member Award




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.
Users WebsitePMMSNICQ
  Top
 

 
police129  
Posted: Sunday, Sep 24 2006, 15:43
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Aug 24, 2006

XXXXX



There's a much easier way to do this! just copy & paste this website in the adress bar:
http://www.grandtheftauto.fr/downloads/c54...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.
PM
  Top
 

 
Fat Person  
Posted: Sunday, Sep 24 2006, 19:55
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jul 19, 2006

us.gif

XXXXX



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.

This post has been edited by Fat Person on Sunday, Sep 24 2006, 21:54
PM
  Top
 

 
rebel_36  
Posted: Sunday, Sep 24 2006, 21:57
Quote Post


dot connectah
Group Icon
Group: Members
Joined: Mar 14, 2004

jolly-roger.gif

XXXXX



why not just use the downgrader? confused.gif

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

http://forum.mtavc.com/viewtopic.php?t=15151

This post has been edited by rebel_36 on Sunday, Sep 24 2006, 22:13
PMMSNICQ
  Top
 

 
Fat Person  
Posted: Monday, Sep 25 2006, 00:15
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jul 19, 2006

us.gif

XXXXX



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.com/viewtopic.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.
PM
  Top
 

 
Serious Dave  
Posted: Monday, Sep 25 2006, 03:13
Quote Post


LAST GEN GAMER
Group Icon
Group: Members
Joined: Jan 4, 2006

cd.gif

XXXXX



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

This post has been edited by Serious Dave on Monday, Sep 25 2006, 03:26
Users WebsitePM
  Top
 

 
Picolini  
Posted: Monday, Sep 25 2006, 06:34
Quote Post


ZOMG ROFL XD!!!!11
Group Icon
Group: BUSTED!
Joined: Dec 7, 2002

us.gif

XXXXX



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
PM
  Top
 

 
DexX  
Posted: Monday, Sep 25 2006, 06:37
Quote Post


Black Hat
Group Icon
Group: Retired Staff
Joined: May 16, 2002

Member Award




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

 
skatingfreak666  
Posted: Monday, Sep 25 2006, 12:07
Quote Post


Snitch
Group Icon
Group: Members
Joined: Aug 6, 2006

anarchist.gif

XXXXX



You deserve everything JarJar and DexX.

JT: 1 Us: 2.. TOTAL PWNED.

Nice work.
PM
  Top
 

 
Futurama_Freak1  
Posted: Tuesday, Sep 26 2006, 11:16
Quote Post


Freako
Group Icon
Group: Members
Joined: Sep 26, 2006

au.gif

XXXXX



Verry verry nice

as soon as i got san andreas it ws v2 exe i just got v1 quicker and easyer
PMMSNXbox LivePlayStation Network
  Top
 

 
GTA__Playa  
Posted: Friday, Sep 29 2006, 02:42
Quote Post


FIFster
Group Icon
Group: BUSTED!
Joined: Sep 20, 2006

us.gif

XXXXX



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...
Users WebsitePMMSN
  Top
 

 
San Anzeas  
Posted: Friday, Sep 29 2006, 15:53
Quote Post


Hitman
Group Icon
Group: Members
Joined: Feb 22, 2006

XXXXX



Hey well done guys !!!!!!
Users WebsitePM
  Top
 

 
jarjar  
Posted: Sunday, Oct 1 2006, 10:20
Quote Post


Boss
Group Icon
Group: BUSTED!
Joined: Aug 7, 2005

au.gif

XXXXX



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.
Users WebsitePMMSNAOLYahooICQ
  Top
 

 
-/TNT\-  
Posted: Sunday, Oct 1 2006, 11:04
Quote Post


not like any other rainbow.
Group Icon
Group: Members
Joined: Aug 6, 2006

XXXXX



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


cookie.gif cookie.gif cookie.gif cookie.gif cookie.gif
Users WebsitePM
  Top
 

 
uNi  
Posted: Sunday, Oct 1 2006, 19:19
Quote Post


 
Group Icon
Group: Moderators
Joined: May 14, 2004

Member Award




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

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Pages: (12) [1] 2 3 ... Last »

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG