Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

Adding Weapon to GTA IV Without Bugs


Nima_1i
 Share

Recommended Posts

Hi Everyone

 

In this Tutorial I want to add a weapon that replaces M4 originally (Like I said I'm not replacing). The files are named "w_test.wdr & w_test.wft".

 

Well... Here are tools you need:

 

1. Open IV (not Spark IV coz you can’t create a new image with that)

 

2. Notepad...!!

 

Files you are going to edit:

 

in common\data\

 

1.default.dat

 

2.gta.dat

 

3.images.txt

 

Files you are going to create:

 

in common\data

 

1.newdef.ide (performs the rule of default.ide for newly added weapons)

 

2.epweaponinfo.xml (performs the rule of weaponinfo.xml for newly added weapons)

 

in pc\models\cdimages

 

3.newwep.img (model source of newly added weapons)

 

The file names you create are not important. You can choose whatever you want.

 

When You Are Ready, Follow these steps

 

1. Editing:

 

1.1. default.dat:

 

Add this line to default.dat before"HTML http:" line

 

 

WEAPONINFO common:/data/epweaponinfo.xml

 

 

Your default.dat should be like this:

 

 

## Object types#IDE common:/data/default.ideIDE common:/data/vehicles.ideIDE common:/data/peds.ideANIMGRP common:/data/animgrp.datHANDLING common:/data/handling.datVEHICLEEXTRAS common:/data/VehicleExtras.datPLAYER platform:/models/cdimages/playerped.rpfPEDGRP common:/data/pedgrp.datCARGRP common:/data/cargrp.datRADIO common:/data/radiohud.datRADIOLOGOS independent:/textures/radio_hud.itdWEAPONINFO common:/data/weaponinfo.xmlTHROWNWEAPONINFO common:/data/thrownweaponinfo.xmlPEDPERSONALITY common:/data/pedpersonality.datMELEEANIMS common:/data/meleeanims.datACTIONTABLE common:/data/action_table.csvEXPLOSIONFX common:/data/effects/explosionFx.datVEHOFF common:/data/vehOff.csvFMENUFILE common:/data/frontend_menus.xmlLBDATAFILE common:/data/leaderboards_data.xmlLBICONSFILE independent:/textures/Leaderboards.itdWEAPONINFO common:/data/epweaponinfo.xml                                       <-------HTML http:

 

 

1.2. gta.dat:

 

Put this line at the end of gta.dat :

 

 

IDE common:/data/newdef.ide

 

 

Your gta.dat should be like this:

 

 

## Load IDEs first, then the models and after that the IPLs##IMG ASSETS.IMGIMGLIST common:/data/images.txt##  Water#WATER common:/DATA/WATER.DAT common:/DATA/WATERLOW.DAT.......##  Lod Cullers#IPL platform:/DATA/MAPS/GENERIC/lodcull_j.IPLIPL platform:/DATA/MAPS/GENERIC/lodcull_m.IPLIPL platform:/DATA/MAPS/GENERIC/lodcull_e.IPLIDE common:/data/newdef.ide                                                    <------------

 

 

1.3. images.txt

 

Add this line to image.txt before "#map xref" Line:

 

 

platformimg:/models/cdimages/newwep  1

 

 

Your images.txt should be like this:

 

 

# NOTE: The names and paths in this file are CASESENSITIVE on PS3 so don't f*ck 'em up.#this has been ordered to reflect the order on the diskcommonimg:/data/cdimages/navgen_scriptcommonimg:/data/cdimages/script_network	1platformimg:/anim/cutsprops  1platformimg:/anim/cuts  	1platformimg:/data/maps/interiors/Int_Props/props_ss	1platformimg:/data/maps/interiors/Int_Props/props_ab	1platformimg:/data/maps/interiors/Int_Props/props_km	1platformimg:/data/maps/interiors/Int_Props/props_mp	1platformimg:/data/maps/interiors/Int_Props/props_ld	1platformimg:/data/maps/interiors/Int_Props/props_ah	1platformimg:/data/maps/interiors/Mission/level_2	1platformimg:/data/maps/interiors/Mission/level_5	1........platformimg:/data/maps/east/bronx_e	0platformimg:/data/maps/east/bronx_e2	0platformimg:/data/maps/east/bronx_w	0platformimg:/data/maps/east/bronx_w2	0platformimg:/models/cdimages/newwep  1                                 <-----------#map xref#map instance

 

 

2. Creating files:

 

2.1. newdef.ide

 

Open Notepad & type these lines on it:

 

 

weap###############################################################################w_test,  	w_test,  	[email protected],  	1,  50,  0           <----------end###############################################################################amat###############################################################################w_test,  0,	CM_WEAPONS_M4                <---------------end

 

 

Save the file & name it newdef.ide

Note that you must copy the lines from the weapon that, according to what your mod author said, your weapon is replaced with, in default.ide

 

2.2. epweaponinfo.xml:

 

Open Notepad Again & copy the lines of weaponinfo.xml on it according to your weapon. For example if your weapon author stated that it is a replacement for "M4", You should copy the M4 lines. Or if the author had provided a weaponinfo.xml look for the lines in it.

 

so your file should be like this:

 

 

<weaponinfo version="1">                                               <----------------------<weapon type="EPISODIC_1">                                                                                                <--------- <data slot="RIFLE" firetype="INSTANT_HIT" damagetype="BULLET" group="RIFLE_ASSAULT" targetrange="65.0" weaponrange="70.0" clipsize="30" ammomax="600" timebetweenshots="133"> 	<damage base="30" networkplayermod="2.5" networkpedmod="1.25"/> 	<physics force="75.0"/> 	<reload time="2066" fasttime="1166" crouchtime="2066"/> 	<aiming accuracy="0.5">   <offset         x="0.14" y="1.0" z="0.55"/>   <crouchedoffset x="0.08"  y="1.0" z="0.12"/>   <reticule standing="0.6" ducked="0.5" scale="0.3"/> 	</aiming> 	<pickup regentime="600000" ammoonstreet="80"/> 	<controller>       <rumble duration="90" intensity="0.1"/> 	</controller> 	<flags>   <flag>GUN</flag>   <flag>CAN_AIM</flag>   <flag>CAN_FREE_AIM</flag>   <flag>ANIM_RELOAD</flag>   <flag>ANIM_CROUCH_FIRE</flag>   <flag>2HANDED</flag> 	</flags> </data> <assets model="w_test">                                                                                    <------------ 	<anim group="[email protected]">   <rates firerate="1.2" blindfirerate="1.2"/> 	</anim> 	<effects>   <muzzle fx="muz_machine"/>   <shell fx="weap_ejected_rifle"/> 	</effects> </assets></weapon></weaponinfo>                                                                      <---------------

 

 

Note that as I highlighted above you should add "<weaponinfo version="1">" at first, " </weaponinfo>" at the end, "EPISODIC_#" (#=1,2,3,...,24) as weapon type & "w_test" (the model file name) as assets model.

 

Save the file & name it epweaponinfo.xml

 

2.3. newwep.img

 

Run Open IV & create a new img file named newwep.img & put the model & texture file in it (w_test.wft & w_test.wtd)

 

3.

 

Put the created files to locations I stated at first.

 

4. Spawning weapons

 

For spawning the weapons you will need a trainer. I suggest you The simple Native Trainer:

 

http://www.gtaforums.com/index.php?showtopic=392973&st=0

 

The weapons you add have no sound. But this trainer has an option to add sound to your newly added weapons (I am not sure if other trainers have this option or not)

Note that as sjaak said, you can only use in game weapon sounds.

 

Edit: According to what Jakemeow said, if you add e.g. a shotgun, the cops will use it to catch you. so you can obtain your newly added weapons from cops.

 

5. Enjoying!!!!

 

Notes:

1. I haven’t tested if epweaponinfo.xml & newwep.img is actually needed or we can use the original ones.

2. I only added two weapons so far & had no problem. Not sure of the Maximum number or whether it is connected with adding cars or not.(Jakemeow has added 4 with no problem)

3. I figured this out myself but you are free to post it wherever you want with credits.

4. I am not a native English speaker. Hope this is understandable.

 

Have Good Time With Your Newly Added Weapons...!!! sly.gifsly.gif

 

Credits to

  • mataanjin for the adding ide idea by his useful topic (& Others who helped him)

    http://www.gtaforums.com/index.php?showtopic=420911&hl=

  • r.schuindt for teaching me which files are affected by his topic
  • sjaak327 for the great simple native trainer to provide weapon sounds (the link above in spawning section)
  • all admins & moderators of GTAFORUMS for such a great & famous forum
  • Jakemeow for his tips.
EDIT: more credits. Edited by Nima_1i
Link to comment
Share on other sites

  • 3 weeks later...

you are precipitating posting this tutorial ...

 

version 2.0 of my mod is already available in time, that my version 2.0 has no bug!

 

and that his scheme does not support mult-player ...

 

after the release of EFLC I'll post a version 3.0 with support for online matches ...

 

 

after all, thanks for your patience in trying to resolve some bugs from version 1.0 ...

YOU SHOULD AT LEAST HAVE ME COMMUNICATION, ABOUT THIS TOPIC!

 

EDIT: you did not give credits to sjaak327 unresolved the problem with me, to add the sounds, the additional weapons ...

this command line is the Sjaak327, no other trainer has that option exclusive SIMPLE NATIVE TRAINER!

Edited by r.schuindt
Link to comment
Share on other sites

Sorry..... I didn't ask for permission... my bad... blush.gif ... just wanted to give people a complete tutarial...

 

but I gave credits .... & added credit of sjaak who helped me alot by his trainer... I dont know how did i forget him ... sorry blush.gif

 

 

 

about the weapon sound I would like to mention that as sjaak said we can only use in game weapon sounds... for those wanted to know.

Edited by Nima_1i
Link to comment
Share on other sites

  • 1 month later...
OutOfTimer

Your tutorial has been very useful. I can now transfer any weapon I want back and forth. Thank you. cookie.gifcookie.gifcookie.gif

 

@ r.schuindt: Why don't you stick to your own business instead of posting s*hit that contributes absolutely nothing to this topic?

Link to comment
Share on other sites

MadcapSmoky22
Your tutorial has been very useful. I can now transfer any weapon I want back and forth. Thank you. cookie.gifcookie.gifcookie.gif

 

@ r.schuindt: Why don't you stick to your own business instead of posting s*hit that contributes absolutely nothing to this topic?

Because, without Schuindt this would be never made, genius.

Link to comment
Share on other sites

OutOfTimer

 

Because, without Schuindt this would be never made, genius.

I have read r.schuindt's thread and it's not worth s*hit to me. What I needed was a clear list of all file linkage in vanilla so I could make new weapons work properly. I came to this thread and got what I wanted. Then I read r.schuindt's spam and wasn't happy about it. I couldn't care less who made this tutorial possible. You know why? Because it's just a f*ucking tutorial. Nobody cares how you obtain information. Facts are free.

 

And for f*uck's sake, you and r.schuindt should learn English because my eyes hurt from reading your posts.

Link to comment
Share on other sites

r.schuindt
Because, without Schuindt this would be never made, genius.

I have read r.schuindt's thread and it's not worth s*hit to me. What I needed was a clear list of all file linkage in vanilla so I could make new weapons work properly. I came to this thread and got what I wanted. Then I read r.schuindt's spam and wasn't happy about it. I couldn't care less who made this tutorial possible. You know why? Because it's just a f*ucking tutorial. Nobody cares how you obtain information. Facts are free.

 

And for f*uck's sake, you and r.schuindt should learn English because my eyes hurt from reading your posts.

I wonder why the arrogance ...

you should know before having this tutorial, I had already done one!

 

http://www.gtaforums.com/index.php?showtop...8&hl=r.schuindt

 

is more mature, not understated the ability of Moders here in the forum ...

 

about learning English:

voce sabe portugues? hahaha...

logico que não deve saber, intão para de encher o meu saco precioso, e toma conta da sua vida!!!

 

idiot...

suicidal.gif

Link to comment
Share on other sites

MadcapSmoky22
Because, without Schuindt this would be never made, genius.

I have read r.schuindt's thread and it's not worth s*hit to me. What I needed was a clear list of all file linkage in vanilla so I could make new weapons work properly. I came to this thread and got what I wanted. Then I read r.schuindt's spam and wasn't happy about it. I couldn't care less who made this tutorial possible. You know why? Because it's just a f*ucking tutorial. Nobody cares how you obtain information. Facts are free.

 

And for f*uck's sake, you and r.schuindt should learn English because my eyes hurt from reading your posts.

I wonder why the arrogance ...

you should know before having this tutorial, I had already done one!

 

http://www.gtaforums.com/index.php?showtop...8&hl=r.schuindt

 

is more mature, not understated the ability of Moders here in the forum ...

 

about learning English:

voce sabe portugues? hahaha...

logico que não deve saber, intão para de encher o meu saco precioso, e toma conta da sua vida!!!

 

idiot...

suicidal.gif

Polish:

A chuj mu w dupę biggrin.gif

Portugal:

(not sure if it's right lol) Foda-se biggrin.gif

German: Bumsem Ihm biggrin.gif

Japanese: 性交神 biggrin.gif

English: f*ck him biggrin.gif

 

Schuindt, let's stop wasting our time on this stupid haters that can't accept anyone's job.

Link to comment
Share on other sites

OutOfTimer
about learning English:

voce sabe portugues? hahaha...

logico que não deve saber, intão para de encher o meu saco precioso, e toma conta da sua vida!!!

idiot...

LOL This is an English forum. You are free to go to a Portuguese one. If you decide to stay, however, get used to the thought you can't properly communicate.

Link to comment
Share on other sites

r.schuindt
about learning English:

voce sabe portugues? hahaha...

logico que não deve saber, intão para de encher o meu saco precioso, e toma conta da sua vida!!!

idiot...

LOL This is an English forum. You are free to go to a Portuguese one. If you decide to stay, however, get used to the thought you can't properly communicate.

I'm not forced to speak in English, however, I communicate here with that my bad English ... and I have reached my goals ... I am only sorry for you ...

from now on, all your comments, are ignored by me ...

I will not take that to chat on ...

just ignore them! hahaha ...

bye!

Link to comment
Share on other sites

  • 3 months later...
Mr. Violence

@Nima_1i

nice and clear tutorial

thanks.This actually confirmed what i thought is needed to be done in order to add weapons.Thanks man.

Btw can .ivaud or .rpf archives be created by openiv because then maybe new weapons could be linked with those new sounds??

Link to comment
Share on other sites

  • 4 months later...

Nice tutorial, helped me a lot, and now I can finally change my eflc weapons (added) sounds by this tutorial. xmas.gif So thanks for this! biggrin.gif

~D5 Driver... Merry christmas for everybody! xmas.gif

Link to comment
Share on other sites

I got one question, and here it is; How do I add the new weaponds into trainer, so I could spawn them? xmas.gif Please answer for this question, so I can keep going on my GTA IV, with most realistic things! biggrin.gif

-D5 Driver. Merry christmas for everybody... !! Again. xmas.gif

Link to comment
Share on other sites

  • 8 months later...
I got one question, and here it is; How do I add the new weaponds into trainer, so I could spawn them? xmas.gif Please answer for this question, so I can keep going on my GTA IV, with most realistic things! biggrin.gif

-D5 Driver. Merry christmas for everybody... !! Again. xmas.gif

Buddy, select episodic weapon on the trainer and spawn it.

Link to comment
Share on other sites

  • 2 months later...
jaspertrailor

I am looking for this kind of tricks to change weapon in the games. This Tutorial is really worked after following all the steps and tour weapon really get replaces with the M4 originally, Thanks for sharing such a good tricks.

 

 

Link to comment
Share on other sites

  • 2 weeks later...

 

Notes:

1. I haven’t tested if epweaponinfo.xml & newwep.img is actually needed or we can use the original ones.

2. I only added two weapons so far & had no problem. Not sure of the Maximum number or whether it is connected with adding cars or not.

3. I figured this out myself but you are free to post it wherever you want with credits.

4. I am not a native English speaker. Hope this is understandable.

These are the answers:

1. I tried to add weapons into original files (weaponinfo.xml and defauld.ide with weapons.img), well the epweaponinfo.xml and newdef.ide with newweap.img are not neccessary, because the trainer reads them as well. You just need to mark them as EPISODIC_(number) in weaponinfo.xml as the weapon group. Also, if you add e.g. a shotgun, the cops will use it to catch you, like it was for me. Works good, but there is no sound. So in this case, the trainer is only needed to add sound to the guns.

2. I have added 4 weapons, and I had no problems. And no, car adding is not linked to weapon adding.

3. I have examined your tutorial and tried out doing with the original ones, so this makes sense and solves your questions biggrin.gif

4. Your English is perfect.

There you go smile.gif

Edited by Jakemeow
Link to comment
Share on other sites

Notes:

1. I haven’t tested if epweaponinfo.xml & newwep.img is actually needed or we can use the original ones.

2. I only added two weapons so far & had no problem. Not sure of the Maximum number or whether it is connected with adding cars or not.

3. I figured this out myself but you are free to post it wherever you want with credits.

4. I am not a native English speaker. Hope this is understandable.

These are the answers:

1. I tried to add weapons into original files (weaponinfo.xml and defauld.ide with weapons.img), well the epweaponinfo.xml and newdef.ide with newweap.img are not neccessary, because the trainer reads them as well. You just need to mark them as EPISODIC_(number) in weaponinfo.xml as the weapon group. Also, if you add e.g. a shotgun, the cops will use it to catch you, like it was for me. Works good, but there is no sound. So in this case, the trainer is only needed to add sound to the guns.

2. I have added 4 weapons, and I had no problems. And no, car adding is not linked to weapon adding.

3. I have examined your tutorial and tried out doing with the original ones, so this makes sense and solves your questions biggrin.gif

4. Your English is perfect.

There you go smile.gif

Thanks for the tip. Will definitely try that out. lol.gif

Link to comment
Share on other sites

1. I tried to add weapons into original files (weaponinfo.xml and defauld.ide with weapons.img), well the epweaponinfo.xml and newdef.ide with newweap.img are not neccessary, because the trainer reads them as well. You just need to mark them as EPISODIC_(number) in weaponinfo.xml as the weapon group. Also, if you add e.g. a shotgun, the cops will use it to catch you, like it was for me. Works good, but there is no sound. So in this case, the trainer is only needed to add sound to the guns.

2. I have added 4 weapons, and I had no problems. And no, car adding is not linked to weapon adding.

3. I have examined your tutorial and tried out doing with the original ones, so this makes sense and solves your questions biggrin.gif

4. Your English is perfect.

There you go smile.gif

1. If you have gone to mataanjin's topic about adding cars, u saw a discussion about a bug that was created if the newveh.ide wasnt used. The bug i'm talking about is somehow related to the fact that every object in GTA has an ID & if you do not use newdef.ide you could have problems with objects that numbered after weapons, e. g. new cars you add. (I'm not sure if it is true or not.) & I introduced newwep.img file coz the model & texture could not be read if added in original img. (I think I tried it with cars with no luck, I dont remember exactly coz it was years ago.) could u confirm if Im wrong?

 

& where should I put the things you said in weaponinfo.xml ??

 

2. from what I said about IDs there may be relation between limitation of adding cars & adding weapons. have you tried adding 24 cars with 4 weapons??

 

Thanks ... smile.gif

Link to comment
Share on other sites

  • 4 weeks later...

how do i spawn gun by model name like spawn car b model name)simple native trainer) ? i goto trainer in weapon menu there nothing to do ? how u spawn new added guns ?????????

Link to comment
Share on other sites

  • 11 months later...

Like I said, cops can have the gun. In fact, they hold the episodic weapon instead of the weapon they should be holding, but when they die, the guns instead of falling will stay floating midair in the hip position, where the cops hold them.

Link to comment
Share on other sites

  • 1 month later...

Sorry for the bump, but I have a problem with adding weapons. Episodic 1 will not spawn until another episodic weapon of the same type is spawned first (a pistol for example), chase missions glitch to the point of failure and the game crashes every time I exit if episodic weapons are installed. Wdr and wtd size, and the quantity of added weapons has no effect (it will crash with only one added). How I add the weapons (completely stand alone or added to the existing files) makes no difference either. I'm not sure of the exact error message i get when it crashes at exit, but mma10 rings a bell. Something about out of memory. Other mods dont cause it. I've added weapons on a clean install with no mods other than snt and the files needed to run it.

Im runnin IV 1.0.7.0 on a Pc with 64-bit win7 home premium, a phenom II x4, 8gb ram, and a 1gb gtx460.

 

I havent tried addeing any to eflc yet. I did try r. schundits mod and it does the same things.

Edited by J.A.G.
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
savagejustice85

how do i make img,xmls, and ide files in open iv please help

Link to comment
Share on other sites

savagejustice85

and how do assign certain weapons to gangs and police

Link to comment
Share on other sites

savagejustice85

ive done alll the the steps to make a melee weapon but no luck the trainer does not spawn it

Link to comment
Share on other sites

  • 2 months later...

hey, nice tutorial smile.gif , it's clear enough to understand, but i don't understand with sound, i try to follow step by step, and i succeeded spawn it on the game, but no sound on firing, what's wrong here? if i have a miss reading, please quote it, need help!!

Link to comment
Share on other sites

  • 3 weeks later...
Jeansowaty
hey, nice tutorial smile.gif , it's clear enough to understand, but i don't understand with sound, i try to follow step by step, and i succeeded spawn it on the game, but no sound on firing, what's wrong here? if i have a miss reading, please quote it, need help!!

You will have to adjust the sounds with the trainer. Use simple native trainer's ini and search for the episodic weapons sound. I hope I helped tounge.gif

DhF4CUK7S5mrQmZkTLK8DA.png

Link to comment
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
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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