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: (2) [1] 2   ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 Adding Weapon to GTA IV Without Bugs

 not replacing of course!
 
Nima_1i  
Posted: Friday, Mar 12 2010, 21:42
Quote Post


ni.va
Group Icon
Group: Members
Joined: Jun 16, 2009

ir.gif

XXXXX



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

CODE
WEAPONINFO common:/data/epweaponinfo.xml


Your default.dat should be like this:

CODE

#
# Object types
#
IDE common:/data/default.ide
IDE common:/data/vehicles.ide
IDE common:/data/peds.ide

ANIMGRP common:/data/animgrp.dat
HANDLING common:/data/handling.dat
VEHICLEEXTRAS common:/data/VehicleExtras.dat
PLAYER platform:/models/cdimages/playerped.rpf
PEDGRP common:/data/pedgrp.dat
CARGRP common:/data/cargrp.dat
RADIO common:/data/radiohud.dat
RADIOLOGOS independent:/textures/radio_hud.itd
WEAPONINFO common:/data/weaponinfo.xml
THROWNWEAPONINFO common:/data/thrownweaponinfo.xml
PEDPERSONALITY common:/data/pedpersonality.dat
MELEEANIMS common:/data/meleeanims.dat
ACTIONTABLE common:/data/action_table.csv
EXPLOSIONFX common:/data/effects/explosionFx.dat
VEHOFF common:/data/vehOff.csv
FMENUFILE common:/data/frontend_menus.xml
LBDATAFILE common:/data/leaderboards_data.xml
LBICONSFILE independent:/textures/Leaderboards.itd
WEAPONINFO common:/data/epweaponinfo.xml                                       <-------
HTML http:




1.2. gta.dat:

Put this line at the end of gta.dat :

CODE
IDE common:/data/newdef.ide


Your gta.dat should be like this:

CODE
#
# Load IDEs first, then the models and after that the IPLs
#

#IMG ASSETS.IMG
IMGLIST common:/data/images.txt

#
#  Water
#
WATER common:/DATA/WATER.DAT common:/DATA/WATERLOW.DAT


.
.
.
.
.
.
.
#
#  Lod Cullers
#
IPL platform:/DATA/MAPS/GENERIC/lodcull_j.IPL
IPL platform:/DATA/MAPS/GENERIC/lodcull_m.IPL
IPL platform:/DATA/MAPS/GENERIC/lodcull_e.IPL
IDE common:/data/newdef.ide                                                    <------------


1.3. images.txt

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

CODE
platformimg:/models/cdimages/newwep  1


Your images.txt should be like this:

CODE
# 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 disk

commonimg:/data/cdimages/navgen_script
commonimg:/data/cdimages/script_network 1
platformimg:/anim/cutsprops  1
platformimg:/anim/cuts   1
platformimg:/data/maps/interiors/Int_Props/props_ss 1
platformimg:/data/maps/interiors/Int_Props/props_ab 1
platformimg:/data/maps/interiors/Int_Props/props_km 1
platformimg:/data/maps/interiors/Int_Props/props_mp 1
platformimg:/data/maps/interiors/Int_Props/props_ld 1
platformimg:/data/maps/interiors/Int_Props/props_ah 1
platformimg:/data/maps/interiors/Mission/level_2 1
platformimg:/data/maps/interiors/Mission/level_5 1
.
.
.
.
.
.
.
.
platformimg:/data/maps/east/bronx_e 0
platformimg:/data/maps/east/bronx_e2 0
platformimg:/data/maps/east/bronx_w 0
platformimg:/data/maps/east/bronx_w2 0
platformimg:/models/cdimages/newwep  1                                 <-----------


#map xref

#map instance



2. Creating files:

2.1. newdef.ide

Open Notepad & type these lines on it:

CODE
weap
###############################################################################

w_test,   w_test,   gun@ak47,   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:

CODE
<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="gun@ak47">
   <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.gif sly.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.

This post has been edited by Nima_1i on Saturday, Jul 7 2012, 08:41
PMYahoo
  Top
 

 
r.schuindt  
Posted: Wednesday, Mar 31 2010, 20:28
Quote Post


Hustler
Group Icon
Group: Members
Joined: Jul 7, 2007

ba.gif

XXXXX



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!

This post has been edited by r.schuindt on Wednesday, Mar 31 2010, 20:41
PMMSN
  Top
 

 
Nima_1i  
Posted: Sunday, Apr 4 2010, 10:04
Quote Post


ni.va
Group Icon
Group: Members
Joined: Jun 16, 2009

ir.gif

XXXXX



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.

This post has been edited by Nima_1i on Sunday, Apr 4 2010, 10:14
PMYahoo
  Top
 

 
OutOfTimer  
Posted: Saturday, May 8 2010, 17:06
Quote Post


PC Enthusiast
Group Icon
Group: Members
Joined: Mar 4, 2009

eu.gif

XXXXX



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

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

 
MadcapSmoky22  
Posted: Saturday, May 8 2010, 17:25
Quote Post


Li'l G Loc
Group Icon
Group: BUSTED!
Joined: Nov 9, 2009

ja.gif

XXXXX



QUOTE (OutOfTimer @ May 8 2010, 17:06)
Your tutorial has been very useful. I can now transfer any weapon I want back and forth. Thank you. cookie.gif cookie.gif cookie.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.
Users WebsitePM
  Top
 

 
OutOfTimer  
Posted: Saturday, May 8 2010, 21:08
Quote Post


PC Enthusiast
Group Icon
Group: Members
Joined: Mar 4, 2009

eu.gif

XXXXX



QUOTE (MadcapSmoky22 @ May 8 2010, 17:25)
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.
PMXbox Live
  Top
 

 
r.schuindt  
Posted: Friday, May 14 2010, 15:22
Quote Post


Hustler
Group Icon
Group: Members
Joined: Jul 7, 2007

ba.gif

XXXXX



QUOTE (OutOfTimer @ May 8 2010, 21:08)
QUOTE (MadcapSmoky22 @ May 8 2010, 17:25)
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
PMMSN
  Top
 

 
MadcapSmoky22  
Posted: Friday, May 14 2010, 16:44
Quote Post


Li'l G Loc
Group Icon
Group: BUSTED!
Joined: Nov 9, 2009

ja.gif

XXXXX



QUOTE (r.schuindt @ May 14 2010, 15:22)
QUOTE (OutOfTimer @ May 8 2010, 21:08)
QUOTE (MadcapSmoky22 @ May 8 2010, 17:25)
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.
Users WebsitePM
  Top
 

 
OutOfTimer  
Posted: Friday, May 14 2010, 18:12
Quote Post


PC Enthusiast
Group Icon
Group: Members
Joined: Mar 4, 2009

eu.gif

XXXXX



QUOTE (r.schuindt @ May 14 2010, 15:22)
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.
PMXbox Live
  Top
 

 
r.schuindt  
Posted: Friday, May 14 2010, 19:21
Quote Post


Hustler
Group Icon
Group: Members
Joined: Jul 7, 2007

ba.gif

XXXXX



QUOTE (OutOfTimer @ May 14 2010, 18:12)
QUOTE (r.schuindt @ May 14 2010, 15:22)
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!
PMMSN
  Top
 

 
Mr. Violence  
Posted: Saturday, Aug 14 2010, 22:50
Quote Post


Psycho Dude
Group Icon
Group: Members
Joined: Jul 31, 2010

cw.gif

XXXXX



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

 
D5 Driver  
Posted: Wednesday, Dec 22 2010, 12:13
Quote Post


Mechanic
Group Icon
Group: Members
Joined: Nov 27, 2010

sf.gif

XXXXX



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

 
D5 Driver  
Posted: Thursday, Dec 23 2010, 09:08
Quote Post


Mechanic
Group Icon
Group: Members
Joined: Nov 27, 2010

sf.gif

XXXXX



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

 
gtabttffan  
Posted: Thursday, Dec 23 2010, 20:27
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Oct 31, 2009

us.gif

XXXXX



You would probably have to reprogram the trainer to add your new weapon confused.gif
PMMSN
  Top
 

 
D5 Driver  
Posted: Saturday, Dec 25 2010, 08:41
Quote Post


Mechanic
Group Icon
Group: Members
Joined: Nov 27, 2010

sf.gif

XXXXX



^ Oh.. Well, I try something, but I already got that working smile.gif Somehow... =_=
-D5 Driver xmas.gif
PM
  Top
 

 
Jakemeow  
Posted: Saturday, Sep 24 2011, 16:25
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jan 19, 2010

XXXXX



SOLVED

This post has been edited by Jakemeow on Sunday, Jan 1 2012, 17:34
PM
  Top
 

 
Jakemeow  
Posted: Sunday, Sep 25 2011, 07:32
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jan 19, 2010

XXXXX



QUOTE (D5 Driver @ Thursday, Dec 23 2010, 09:08)
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.
PM
  Top
 

 
jaspertrailor  
Posted: Tuesday, Dec 20 2011, 10:56
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Dec 20, 2011

XXXXX



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.

PM
  Top
 

 
Jakemeow  
Posted: Sunday, Jan 1 2012, 17:33
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jan 19, 2010

XXXXX



QUOTE (Nima_1i @ Friday, Mar 12 2010, 21:42)
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

This post has been edited by Jakemeow on Monday, Jan 2 2012, 11:35
PM
  Top
 

 
.Olbricht.  
Posted: Monday, Jan 2 2012, 15:28
Quote Post


Peon
Group Icon
Group: Members
Joined: Dec 11, 2010

ph.gif

XXXXX



QUOTE (Jakemeow @ Sunday, Jan 1 2012, 17:33)
QUOTE (Nima_1i @ Friday, Mar 12 2010, 21:42)
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
PM
  Top
 

 

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

0 Members:

Pages: (2) [1] 2 

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



 
IMG IMG