Modding GTA IV

Started by Art Blade, November 12, 2011, 04:14:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Art Blade

Almost unavoidably here at OWG we start to mod games when we're allowed to, when there are tools, that is. I'm new to GTA (only just started with IV) so I'm late to modding. When I saw a vid at Rockstar's social club (their website where they host films users made with the in-game video editor) with someone driving a proper ricer (souped-up Japanese car) and drifting the sweet bejeebus out of it.. then I knew it was time to find myself a proper car and start to drift around in Liberty City my very self.  :-D

Using a well-known search engine, I found countless websites that had "GTA4" and "drifting" in common. Looking for a particular car, it wasn't too difficult to find. So I got my file with that 3D car model and then..

the problems.. yes. You can't just drop that file into the game folder and be done, noooooo... far from it.

You need a program to open archives that have the extension "img" as in image and because it is a common graphics file extension my picture viewer software felt compelled to pipe up. Nice. But useless.

Just right here a warning: Before you twiddle around with your games, BLOODY MAKE BACKUPS  >:D

OK.. Now.

By the way: www.7-zip.org to download 7zip, a program that can open all kinds of archives including .zip and .rar archives.

edit
I read you need this here (not sure, was one of the first files I found, I use it anyway)
http://alexander.sannybuilder.com/Files/IVAsiLoader.rar
/edit

The good thing: You don't need to download any 3D models and that tool. You can just edit the handling file to mod existing cars in a way that you can for example drift with them. But if you want to actually change your car's appearance (3D model) you need this..

http://gtaivtools.googlecode.com/files/SparkIV%200.6.9.zip

.. to open the car file which is here:

HD:\Steam\SteamApps\common\grand theft auto iv\GTAIV\pc\models\cdimages\vehicles.img

There, in that file, you replace the original car with the model you downloaded and save the file.

You think that's it? Heheheeee.. no. Sorry, but no. If you want to drift (let's say, when you want different car physics) you need to edit the handling configuration file which is located here:

HD:\Steam\SteamApps\common\grand theft auto iv\GTAIV\common\data\handling.dat

That file can be opened with any text editor such as wordpad. Now you need to find the name of the car you just replaced so your new car doesn't just look different but behaves differently, too. At least it will behave differently if you edit the stuff there. Make backups!

So if you want to find out what it means, I'll paste an example code in a moment. Before I do I need to warn you: my code doesn't suit every car there is. I used that code for an Oracle and a Sentinel and both cars flipped when doing quick turns. They really shouldn't do that :) Now, the code is intended to be used with the SultanRS which I replaced with a Nissan GTR model, you can find it here:

http://files.gtainside.com/downloads/ftpf/1295780183_Nissan%20R35%20GTR%20by%20BitMix.rar

The code for the handling.dat that comes with that file is erm, misleading. At least I didn't know what to do with it because it was more code than could be fit into the file for the car and I needed something that works. I ended up downloading loads of codes and tweaked that car's codes (handling) myself for days until I got quite satisfied with what I got, and here you go (replace the SultanRS handling code with it)

Spoiler
SULTANRS     1400.0  4.0   85 0.0 0.0 0.0 0.1  5  0.50  1.0  180.0 0.34 0.66 1.0 50.0 0.40 1.10 14.5 0.15 0.50 1.2  0.9  0.9  0.15 -0.21 0.0  0.5 0.2 0.2 0.2 0.2 1.2  60000 40442010 078B8041 1

Edit: newest settings
Spoiler

Quote from: Art Blade on November 15, 2011, 12:21:14 PM
My favourite handling setup for the SultanRS/Nissan. Very nice speed and great drifting -- basically I can't drive without actually drifting and burning out my rear tyres  :-D I made the car damage-resistant as far as possible (it is not indestructible). Enjoy :)

Spoiler
SULTANRS     1300.0  8.0   85 0.0 0.0 0.0 0.0  6  0.95  1.0  260.0 0.24 0.76 1.0 50.0 0.30 1.20 14.5 0.15 0.50 1.2  0.9  0.9  0.15 -0.21 0.0  0.5 0.0 0.0 0.0 0.0 1.2  60000 40442010 078B8041 1
/Edit

By the way, the original SultanRS is the Sultan with carbon hood and turbo engine (makes that peculiar noise when releasing the gas pedal) and your new Nissan can be found where the SultanRS was: Top left of the map, leftmost and at the very top there are three roads that lead to nowhere (there is a mansion). Behind the mansion in the bushes is always a new car waiting for you. :)

Done :)
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

Art Blade

Just to get an idea, here's a pic. :)

And the matching handling data:

Spoiler
SULTANRS     2500.0  8.0   85 0.0 0.0 0.0 0.0  5  0.90  1.0  260.0 0.24 0.76 1.0 50.0 0.20 1.30 14.5 0.15 0.50 1.2  0.9  0.9  0.15 -0.21 0.0  0.5 0.2 0.2 0.2 0.2 1.2  60000 40442010 078B8041 1

[smg id=3811 type=link align=center width=500 caption="GTA IV 029"]
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

Art Blade

I think I finally found a nearly perfect setup for that Nissan/SultanRS:

Latest handling data (  :-() )

Spoiler
SULTANRS     1500.0  8.0   85 0.0 0.0 0.0 0.0  6  0.95  1.0  260.0 0.24 0.76 1.0 50.0 0.30 1.20 14.5 0.15 0.50 1.2  0.9  0.9  0.15 -0.21 0.0  0.5 0.2 0.2 0.2 0.2 1.2  60000 40442010 078B8041 1
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

Binnatics

Sounds cool! You really got kneedeep into it.  :-X

Most modders I met (15 year old boys who fool around a bit too easy and too much imho) just pick an application through e.g. gta4mods.com and run whatever they find. They always wanna convince me of the 'beauty' of their mods, which doesn't really interest me. =Yawn=
But this drifting thing interests me. Including the technical steps how to get there.  :-X :)
"Responsibility is not a matter of giving or taking, responsibility is something you share" -Binnatics

Art Blade

Drifting with white-smoking wheels is just fantastic :)
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

PZ

Nicely done, AB, and you're right - there are several of us that are interested in modding!  ;)

Art Blade

Cheers :)

I think something else is worth explaining and apparently it is nowhere to be found (I didn't happen upon it during all my research). The code I pasted. The handling data. What on earth do all those numbers mean? This is what I found out by guessing and testing.

name          A           the vehicle's name
mass          B           how heavy it is
drag          C           atmospheric drag thanks, fragger this seems to play a role in acceleration -> higher=faster
boy          D           irrelevant for cars (how much it submerges in water)
centreofmass          E   F  G           x,y,z weight centre
transmission          Tt   Tg Tf     Ti  Tv           this is interesting: Tt: 1.0 front, 0.0 rear wheel drive, 0.5 =4x4. Tg: how many gears. Tf: the higher, the more acceleration force, apparently 0.0>x>1.0 Ti: no idea, leave it. Tv: How much the steering wheel can be turned in degrees.
brakes          Tb   Tbb  Thb           no idea, looks as if it influences the balance front/rear
steer          Ts           no idea what "steering lock" does
wheel-traction          Wc+  Wc-  Wc-  Ws+  Wbias           looks as if the first two (Wc+,Wc-) influence the front/rear balance. I find a low Wc+ and a high Wc- useful for rear drive drifting.
suspension             Sf   Scd  Srd  Su    Sl   Sr   Sb           no idea
damage          Dc  Dw  Dd  De           damage multiplier, the lower, the less damage, the more resistant.
seat          Ms           no idea, the Japanese car with right driver seat uses 1.2, other cars 0.0
val          Mv           the money value (some say it's for the accumulated amount of damage you caused)
mflags          Mmf           model flags. Reference in the file
hflags          Mhf           handling flags. Reference in the file.
anim          Ma           what kind of animation is used, leave alone.

I think particularly those Mmf and Mhf are sometimes wrong when modders change it. The file states that the digits are hexadecimal for better readability. To me it means you pick one (there are only 1, 2, 4, 8 ) per digit (1st to 8th) and not that you may add them as you do with binary flags (00, 01, 10, 11 and so on). To me, there can't be a "B" (decimal = 11, as in adding hexa 8+2+1=B) but only either 8 or 2 or 1.

However, what I did mostly was change the mass (weight) of the bugger, the lower (1300) the faster it accelerates but it also tends to flip or go over a bridge. High values like trains or buses obviously make it accelerate and braking slower.

Then I changed the drag value (8.0 seems to be the highest).

And the transmission, Tt 0.0 for rear wheel and a high Tg to make it accelerate fast (high is 0.80 for example, low is like 0.22).

And I experimented with brakes and wheel-traction to be able to do sharp turns.

Alright, here you go :)
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

fragger

You've been a busy modder, nice w@&k :-X

Something caught my eye there, your comment following the third parameter, "drag". I could be totally wrong but the comment seems to indicate that you're not sure what's meant by "drag", as though it may be a linguistic misunderstanding. It suggests to me "atmospheric drag", i.e. air resistance, so that increasing or decreasing the value would give you lesser or greater acceleration. Guessing.

If I am wrong and you do know what's meant by "drag", then just forget I said anything 8-X :-D

Art Blade

ah cool.. I think you're right with that atmospheric drag there, fragger :) To me drag meant to drag something behind or around, perhaps its own weight, whatever, didn't make sense.

Now it does, edited, cheers  :-() :-X
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

fragger


Art Blade

Just found out the cars w@&k in MP, too. Police cars modded in a way that they can't get up hills and touching them is almost enough to set them alight. Hehe :) The modded SultanRS as well as the regular Sultan are both available in MP. Very nice (both modded to be used for drifting)  :)
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

PZ

Quote from: fragger on November 13, 2011, 12:04:05 AM
You've been a busy modder, nice w@&k :-X

When I think of the phrase "total immersion", I think of our friend, Mr. Blade.  :-()

fragger


Art Blade

 :-()

[smg id=3813 type=link align=center width=500 caption="GTA IV MP 008"]
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

Art Blade

Quote from: PZ on November 14, 2011, 07:46:55 PMWhen I think of the phrase "total immersion", I think of our friend, Mr. Blade.  :-()

By the way, now at 500+ hours in the vanilla GTA IV game, roughly 100 hours for TBoGT and perhaps 60 hours in TLaTD.

Immersive? "Well, kinda."  :-()
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

Art Blade

My favourite handling setup for the SultanRS/Nissan. Very nice speed and great drifting -- basically I can't drive without actually drifting and burning out my rear tyres  :-D I made the car damage-resistant as far as possible (it is not indestructible). Enjoy :)

Spoiler
SULTANRS     1300.0  8.0   85 0.0 0.0 0.0 0.0  6  0.95  1.0  260.0 0.24 0.76 1.0 50.0 0.30 1.20 14.5 0.15 0.50 1.2  0.9  0.9  0.15 -0.21 0.0  0.5 0.0 0.0 0.0 0.0 1.2  60000 40442010 078B8041 1
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

PZ

Quote from: Art Blade on November 15, 2011, 10:33:40 AM
By the way, now at 500+ hours in the vanilla GTA IV game...

My goodness, that's as bad as I am in FC2  :-()

Art Blade

I have no idea how many hours I spent in FC2 but I reckon it was at least as many. :) Like 10+ playthroughs and countless hours spent during random free roaming I didn't even save.. I tend to spend like 30 to 50 hours per playthrough.. yes, I am quite certain that I must have spent at least 500 hours with FC2  ^-^ Only with GTAIV it is different because I amassed those 500+ hours during only a couple of weeks.  :-D
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

Art Blade

FYI

I edited and updated the initial post in this topic: I realised that I had left out a file when posting but have made up my mind and added it now. Then I added the latest handling setup right below the first one given so you can compare and test.

Enjoy :)
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

PZ

Quote from: Art Blade on November 15, 2011, 03:10:54 PM
... I amassed those 500+ hours during only a couple of weeks.  :-D

:o

Art Blade

let's rephrase that to "a couple of months," then  :-D
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

PZ


fragger

 :laugh:

I was gonna say... there is only 336 hours in a couple of weeks, and that's if you're playing 24/7. You must be a Time Lord :-D

A couple of months seems more like it :-()

Art Blade

"A couple" doesn't necessarily describe "a pair" or "a set of two" but may be used in a different context as in "some" or "a few." For instance, if you hear that your favourite female por.. errr, film star, got tight on a couple of stiff.. drinks (perverts!) you wouldn't think "wow, just two of 'em and she falls over." You'd think of all kinds of things but not that she can't even stand two drinks.  :-D So, in a manner of speaking, I was playing a couple of weeks even if those couple of weeks were more like a couple of months which actually weren't two but more likely nearly four.  :-D
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

Binnatics

four months and four days to be precise :angel:
first post where I mentioned your start in the game

I checked back and by the way found out that my prediction came true, sort of :-() :-()
QuoteI predict that this topic is going to grow fast

>:D
"Responsibility is not a matter of giving or taking, responsibility is something you share" -Binnatics

Tags:
🡱 🡳

Similar topics (1)

3122

Started by DKM2


Replies: 13
Views: 1343