Tuesday, May 28, 2013

Iron Man IV - Armor pack to replace mission chars

Check the last version of this mod here


This armor pack has been setup to replace mission chars, this will avoid the add peds method side effects/"crashes".

So if your game crash when you select an added armor or your EFLC not even opens, you should try this method :)

Remember: This will replace some missions characters.

Tip: If you installed first version and replaced some common street peds, you can use the pack of this post to restore those peds :)

Easy install

Download and install using OpenIV Package installer

Manual setup
  • Download
  • Extract all files to an folder:
  • If you have the armor pack with added peds method you should copy the provided peds.ide and pedVariations.dat to your "C:\Program Files\Rockstar Games\Grand Theft Auto IV\common\data" (or the proper EFLC folders) and overwrite to restore the original ped config
  • Now using OpenIV, open componentpeds.img (models\cdimages) and replace the mission chars with the provided files, also you need to delete the old im_* files from old added armors, remember to enable the "Edit mode":
  • Last step is copy content of the armor config folder to your Iron Man IV Armors folder:

Done! Now open the game and see if each armor in menu it's working fine :)

If you installed first version of the mod and replaced common street peds maybe you want restore they visual, in this case take a look here.

Armors by H1Vltg3Wapeddell and Quechus13

Check the new armors post here

Saturday, May 25, 2013

Iron Man IV - The All-in-one Armor pack (installation and fix)

This method works but have some side effects i don't recommend the use of this method:

  • Don't work fine in EFLC
  • Causes bugs with interactive points like internet cafe
  • For some people it result in clean streets with no peds or moving cars
  • And for some it just don't work because game crash when select armor

Because of this i recommend the pack that uses replace method, it will replace mission characters. Check this tutorial and download the pack here.

If you tried this pack and want to try the replace method you need to restore your peds.ide and pedVariations.dat, i provide the original for GTA IV and EFLC on the tutorial above.


Tip: If you installed first version and replaced some common street peds, you can use the pack of this post to restore those peds :)

They (H1Vltg3Wapeddell and Quechus13) released an All-in-one armor pack with a lot of armors but they missed some armor configs, so i fixed them and uploaded here, now let's see how to install this armor pack.

If you wanna watch the installation, click in this link :) https://www.youtube.com/watch?v=PxBRm6eAKXc

EFLC observation: I tried this method on EFLC with no success, game crash at loading screen, i believe that is not possible make this work on EFLC, i also tried the "exclusive" componentpeds.img and peds.ide files (C:\Program Files\Rockstar Games\EFLC\TBoGT\common\data\peds.ide) with same results, so you will have to replace normal peds, you can replace the ones that start with IG_ (mission chars) or CS_ (cutscene chars, this one i didnt tested), remember to edit the model name in the armor .ini file.

  • Download the armor pack here
  • Download the armor config fix here or mirror 1 :)
  • Extract the files from armor pack to an folder
  • Copy all files from folder "Main files" to your gtaiv.exe folder and overwrite all (Obs.: This was not tested in EFLC, backup your EFLC install before trying)

  • If your GTA its with patch or lower copy the DLL from folder "DLL for" to your gtaiv.exe folder and overwrite the old one
  • Open the "Fixed Armor cfg" zip an copy all files to your Armors folder (gtaiv.exe folder\Scripts\Iron Man files\Armors) and overwrite everything, it's interesting delete all files from that Armors folder before to avoid have duplicated armors, this is what you will have after this step:

  • Open the OpenIV, click in "Edit mode", open the folder models\cdimages then open file componentpeds.img, drag and drop all files from folder "Iron Man IV 1.1\Armors" to the OpenIV, the OpenIV will freeze for some seconds, it's normal because it's a lot of models:

You can use menu Edit > Add instead of drag and drop

Done, now open the game and see if a ton of armors appeared in the Armors menu ^^

Depending on your resolution you will not be able to see all lines :(
*This is my screen with resolution of 1680x1050

If you installed first version of the mod and replaced common street peds maybe you want restore they visual, in this case take a look here.

Tuesday, May 14, 2013

[TUT] Using custom Classes

I use classes basically when i need to add properties or methods to an game object, for example in Iron Man IV i use classes to control all the enemies or allies behavior (flight, shoot, target locking, etc.), in Heli Combat i use classes to make the Nightvision effect, it's very useful.

For example, let's say that we want get peds damaged by player and make them float for a while, each shoot will make them float for 1 second. We can create an simple class that holds the Ped, the time of float state, an trigger to start/increase the float state and the method that will make them float:

Here we have:
Public p as Ped = Nothing - this is the ped, i set = nothing to make sure that starts with nothing for the ped object, this is a Public property, it means that we can access it outside the class
Private float_time As Double = 0 - this is how much time the ped will float, an counter, its Private because i don't need to access it outside the class
Public Sub New(tPed As Ped)
    p = tPed
End Sub 
Here i set the method that will be called when a new instance of this class is created, i receive as param the Ped that will float
Public Sub startFloat()
    float_time += 1000
End Sub
Here i set the method that will increase the float time when the ped was damaged by player
Public Sub Tick()
    If float_time > 0 Then
        float_time -= myInterval
        p.Velocity = Vector3.WorldUp
    End If
End Sub
This is the Tick of the class, will be called at each tick of the script to make the float happens

One important detail, inside the Tick method i use the variable  myInterval, i had to declare this variable as an Shared variable in the script to be able to use it inside the class:

So to use an method or variable that is outside the custom Class we need to declare this method or variable as Shared instead of Public or Private.

Now to make it work i need to check for peds around player, check if they was damaged by player then add they to the List of objects of the custom class TFloatingPed, this list i called floatingPeds:

So in the tick of the script i will use an time counter to refresh the peds list at each 500 ms, then check if one of them was damaged by player and add to the list of floating peds, run the floating peds list and make them float:

With this class we can add an Blip object to it so we can create, change color, scale and destroy when we want just accessing the class instance, each class instance will have an blip object.

We can use this idea of classes in many cases, for example we can create an Rocket class, that will have an object that is the rocket, an Fly method that will make it fly and check for collisions, and we can create a lot of rockets and shoot them all and the tick of each class object will do the job (fly and explode on collision), i do this in Iron Man IV and Heli Combat, it's very useful.

I used this class idea in chainsaw script too, to create the blood drips on screen. Download the source code of chainsaw script here.

Download the project of this tutorial here.

Iron Man IV - Adding new armors without replace any game Ped :)

Thx to Clark King now i know how to add armors without replace normal game peds.

EFLC observationI tried this method on EFLC with no success, game crash at loading screen, i believe that is not possible make this work on EFLC, i also tried the "exclusive" componentpeds.img and peds.ide files (C:\Program Files\Rockstar Games\EFLC\TBoGT\common\data\peds.ide) with same results, so you will have to replace normal peds, you can replace the ones that start with IG_ (mission chars) or CS_ (cutscene chars, this one i didnt tested), remember to edit the model name in the armor .ini file.

Check the New armors post here

Know side effects:
Some users reported random planes appearing in some areas in city, i noticed some parts of an ship in some areas, its not big deal, it's just weird ^^
*Fix for the side effects: Install the armor pack that have all pedVariations.dat data for each armor or add the pedVariations data for each added armor.

  • Armor files: Will be in the armor download :P
  • OpenIV: To add the armors to componentpeds.img file 
  • Notepad: Yes, notepad to edit GTA peds.ide file
  • Default fragment object (download) - Some armors come without the .wft file, in this case you need this file
  • Iron Man IV script: Yeah, it's interesting have this small script too ^^, otherwise you will have to use console command spawn to see the added models. Download last version (v1.1) here

In resume:
  • Edit file peds.ide (C:\Program Files\Rockstar Games\Grand Theft Auto IV\common\data) copy one of the game peds line and edit the model name to the desired model name
  • Rename the new ped model files to this model name
  • Use OpenIV to edit file componentpeds.img and insert this new ped model files
  • Edit armor .ini file changing name of model (model) and display name (name)
  • To have footsteps sound you need to create copies (one for each added armor :P) of the chosen game ped config in the file pedVariations.dat, example for the model of this tutorial:
im_crimson_dynamo, 5
feet, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 2
head, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 6
uppr, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 1
uppr, 1, 0, 0, 0, 0, 0, -1, -1, -1, -1, 5
lowr, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 11

Step by step:

Let's say that you downloaded this armor: http://www.gta4-mods.com/player/crimson-dynamo-f21609
You will have this ped files as default for this download:

now we rename to an name that we want, let's use im_crimson_dynamo:

Now we use OpenIV to insert this files inside componentpeds.img, now comes an important thing, this armor don't come with an "fragment object" file (ends with .wft), so we can copy one from another ped, rename to the new model name then add to componentpeds.img too, this is very important. In the end we will have this files imported with OpenIV:

In case you can't find this .wft file, you can use this one, just rename it like you did with the other armor files.

Ok, now we need to edit the Armor .ini file, go to folder {GTA.exe folder}\Scripts\Iron Man files\Armors and copy armor_2.ini, rename to an desired name, let's use armor_crimson_dynamo.ini:

Now open this file with an text editor (notepad is good option ^^) and edit model to the name that we choose before: im_crimson_dynamo
Also change name to desired name, for example: Crimson Dynamo

Save and close.

Now, very important part, let's edit the file peds.ide and add lines for this new armor (ped) name. Go to your GTAIV.exe folder (commonly "C:\Program Files\Rockstar Games\Grand Theft Auto IV") then go to folder common and then folder data, find the file peds.ide right click it, click in properties and uncheck the read only option:

Now open this file with an text editor like notepad and insert this line after the line that starts with: M_Y_Tourist_02,

im_crimson_dynamo, null, CIVMALE, move_player, GESTURES@MALE, GESTURES@M_PHONE, FACIALS@M_HI, visemes@m_hi, 0, move_player, null, -1,-1, PED_TYPE_PLAYER, VOICE_PLY_CR,   VOICE_PLY_CR  

The result is something like that:

As you can see what changes basically is the first name, there we put the name that we choose before to be the name of the new ped model.

Now its just save and close the peds.ide file and test the mod in the game :)

Know issue: They don't have foot steps, maybe is something related to the line that i choose to copy in peds.ide file.

Thx again to Clark King for the tip :)

Monday, May 13, 2013

[TUT] Using NAudio to play sounds - Very good, play more than one sound at same time :)

Hohoho, that's nice, thx to my friend TheVideoVolcano and to NAudio developers now i can play simultaneous sounds in my scripts, and you too :)

What we need is this beautiful DLL: NAudio

The code it's very simple:

We need to add Naudio.dll as reference in the project and paste one copy of this file in the GTAIV.exe folder

Other interesting features is:

Control Volume:

original volume is 1.0, we can reduce or increase it:
wc.Volume = 0.1
wc.Volume = 2
wc.Volume = 1
Skip seconds of audio:
Seek to determine playback start in audio data
wc2.Seek(100000, SeekOrigin.Begin)

Download the sample project here, remember to put NAudio.dll inside gtaiv.exe folder, or you will obtain error when calling the methods :)

Thursday, May 9, 2013

Iron Man IV - New armors

Let me group here the new armors that are coming.

Download last version of Iron Man IV here
Check how to install the armors here (replace method, more indicated)

Models by H1Vltg3wapeddell and Quechus13

Wednesday, May 8, 2013

Iron Man IV - Installing new armors - Step by step

In this video i show how to install an new armor, the step by step is described bellow...

Installing the ped model

1 - Download the new armor, save and extract the files to an folder:

2 - Choose an ped model name to replace and rename the armor files to this new ped model name:

Good names to use: Any mission character ( starts with ig_, i tested in patch and and seems to don't cause problems :) ), m_y_prison, m_y_prisonaom, m_y_multiplayer, use OpenIV to check the correct names:

3 - Open the OpenIV, click in "Edit mode" to activate the edit mode, answer Yes to the question after the click.

4 - In OpenIV, open folder models\cdimages and open file componentpeds.img:

5 - Drag and drop all armor files to OpenIV, also you can use the menu Edit > Add instead of drag and drop

To check if new armor is ok, find the armor file that ends with .wdd and double click it (in OpenIV)
Check the check boxes at left top corner to see all armor parts:

*Some armors can appear without the textures but in game they should look fine.

Installing/creating the config file for the armor

Now, let's create an new config file for this armor:

1 - Open the GTAIV.exe folder, then open Scripts\Iron Man files\Armors:

2 - Make an copy the armor_2.ini file and rename to the name of the new armor, let's use "armor_war machine.ini":

*Don't remove the .ini extension :P

3 - Open the new file with an text editor, now we will set some configuration:

You must edit the model option and set the name of the model chosen before, in this example: ig_romanw.
Also set the name option to set the display name for armors menu.
The other options are less important.
Save and close the file.

Now it's just open the game and see if a new item appear with the chosen display name :)

Some armors can come with playerped.rpf file, in this case you replace the player and not a common pedestrian, so instead of opening file componentpeds.img, you just replace the playerped.rpf file in same folder and set the model option with name player in the armor .ini file.

Obs.: Make sure to use different model name for each armor, otherwise you will have wrong model for some menu items :)

Check the new armors post :)

Tuesday, May 7, 2013

[Script] Star Wars Speeder bike script

This script will make possible to fly an bike and shoot with laser gun almost like in Star Wars movies

Download the script here
Download the Star Wars Speeder Bike here (v2.0 here) (by Emad-Tvk)

The default bike model is NRG900 (same model of bike from Emad-Tvk), you can change the model name of the bike that will be the Speeder in the auto generated .ini file.

You can spawn the bike using scripthook's console command: spawn, example:

spawn nrg900

Maybe i will add some cops flying and shooting with Speeder bikes, this can be very cool ^^

Sunday, May 5, 2013

[Script] Iron Man IV v1.1 - Prerelease post

I will "prerelease" the Iron Man IV script v1.1 here, I'm working on it, it's not finished yet but i fixed some issues related to aim camera, animations and the "Error in script 'Iron Man IV' and other things, it's not a good idea reupload this file because it will be updated soon probably ;), when i finish this i will send to h1vltg3 so he can update the original download sources.

Download last version here

Check the new armors post

Backup your previous version :)


  • Fixed water bug that happens when you fall in water when in flight, causing an bug in camera making it look to the ass of the player when aiming ^^
  • Fixed error for missing files, now the missing files will be ignored
  • Fixed "look behind" function, now you can look behind (commonly triggered with key C) without having that weird camera movement
  • Fixed chest repulsor beam position
  • Fixed hand repulsor beam position
  • Fixed fast rotation behavior when activating flight, now player will turn until reach camera direction
  • Added damage for fast landing
  • Added damage to cars hit when landing
  • Fixed bug that makes close car disappear when activating flight
  • Added roll for turns when in flight at mid/high speed
  • Removed automatic flight turn off when getting close to ground, now it will turn off when close to ground and with big speed decrease detected
  • Improved wanted level increase, now increases only when really firing and when there are cops close
  • Improved cops detection, now will detect cops and add small blips to them only when armor is equipped
  • Improved weapon heat (cooldown time), now we can shoot more :)
  • Almost fixed unwanted melee movement after shooting, almost ^^

  • Fix landing animation after using repulsor beam guns
  • Fix random aim camera issue that can happen when, in combat with flying enemies, being hit by a rocket
  • Fix normal game mission bugs/crashes
  • Add custom missions ( need some ideas :) )
  • Create new super enemy

If you find bugs, feel free to talk about them in the comments section below, it's "free" ;)

Thursday, May 2, 2013

[W.I.P.] Weed script ^^

Why not? Fear? No way, I'm atheist, i don't fear gods do you think that i will fear man? haha kidding ;)

This script is an (not expected) request that will bring some cool things to GTA iV, you will be able to buy and smoke some weed, also you can buy and sell big amount of weed (pack) and, in an next future, help big dealers in some mini quests.

Download here: http://www.mediafire.com/download/076tj2bg2ahgz8y/weed.zip


J - call Jacob
B - open "business" menu
L - light up some weed ^^
+/-   increase/decrease weed/pack/price when doing business
Enter - accept values/amount when doing business
B - cancel buy/sell menu
Hold middle mouse to smoke slower ^^

Now it's time to work in Hulk and Tank mod, damm im delayed ^^

It's a W.I.P. (Work In Progress) so, have some bugs and weird behaviors :)
//propaganda YT float style='display:none;'