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 GTA Modification Forums

Help and Discussion of IV modding only. Please post mod releases in the Mod Showroom

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

 [DOC] WeaponInfo.xml

 documentation
 
resignator  
Posted: Saturday, Dec 13 2008, 23:42
Quote Post


Square Civilian
Group Icon
Group: Members
Joined: Aug 8, 2005

XXXXX



I figured it would be a good idea to gather everyone's knowledge on WeaponInfo.xml in one place. I will start with what I know and what is obvious.


weapon type="" - Determines weapon name. You can create up to 25 additional weapons by using the unassigned names UNUSED0 and/or EPISODIC_1 - EPISODIC_24 (Thanks man2104 smile.gif).
Explained in more detail here: http://www.gtaforums.com/index.php?showtop...st&p=1058751902.
data slot="" - Slot to carry weapon in.
firetype="" - Bullet characteristics to use...is also defined under "PROJECTILE TYPE="
damagetype="" - Determines type of impact damage...is also defined under "EXPLOSION TYPE=".
group="" - Determines what effect to create from weaponFx.dat file.
targetrange="" - Distance auto-aim can be used and target's health appears in reticule.
weaponrange="" - Defines how far the weapon shoots. Distances are also determined by the projectile's velocity, mass, etc defined under "PROJECTILE TYPE=".
clipsize="" - Ammo per clip.
ammomax="" - Max ammo allowed for weapon.
timebetweenshots="" - Time in milliseconds between each shot. Must be used in conjunction with <rate firerate="" blindfirerate=""/> multiplier.
damage base="" - Damage dealt by bullets. Projectile and explosion damage is defined in explosionFx.dat.
networkplayermod="" - Modifier for the weapon's damage in multiplayer.
networkpedmod="" - Same as above but for peds in multiplayer.
physics force="" - For guns, 'physics force' defines the impact force, but for projectiles (ie, grenade, molotov, rocket), 'physics force' changes the force with which Niko "throws" the projectile (ie, the speed of the projectile). Can also be defined under "PROJECTILE TYPE=".
reload time="" - Reload time in milliseconds.
fasttime="" - Time it takes to aim in milliseconds.
crouchtime="" - Time it takes to crouch in milliseconds.

<aiming accuracy="" - Aiming accuracy.
offset x="" y="" z="" - Determines where the weapon is placed/held.
crouchedoffset x="" y="" z="" - Determines the where weapon is placed/held when crouched.
reticule standing="" ducked="" scale="" - Reticule size while standing and crouched and target scale (zoom).

pickup regentime="" - Time in milliseconds it takes pickups to respawn.
ammoonstreet="" - Ammo given on weapon pickup.

rumble duration="" - Controller rumble time in milliseconds.
intensity="" - Controller rumble strength.

Known flags:
<flag>GUN</flag> - Identifies the weapon as a firearm
<flag>MELEE_CLUB</flag> - Used for victims behavior when hit
<flag>MELEE_BLADE</flag> - Used for victims behavior when hit
<flag>2HANDED</flag> - Weapon is held with both hands
<flag>THROWN</flag> - Weapon is thrown (affected by gravity)
<flag>TREAT_AS_2HANDED_IN_COVER</flag> - Weapon is held in both hands while in cover
<flag>FIRST_PERSON</flag> - First person aim with no crosshair
<flag>HEAVY</flag> - Forces heavy weapon anims to be used
<flag>CREATE_VISIBLE_ORDNANCE</flag> - Shows projectile before it is fired.
<flag>HIGHER_BREAK_FORCE</flag> -
<flag>EXPLOSION_BASED_ON_IMPACT</flag> - Determines when weapon explodes based on explodeimpactthreshold="" explodeimpactwithvehiclethreshold="" data defined under <projectile>
<flag>ADD_SMOKE_ON_EXPLOSION</flag> - Adds smoke effect on impact.
<flag>SILENCED</flag> - Silences the projectile/thrown weapon while in flight.
<flag>INSTANT_KILL_IN_MP</flag> - Instant kill on impact in a MP game
<flag>ARMOUR_PENETRATING</flag> - Bypasses body armor hit check.
<flag>KEEP_CAMERA_BEHIND</flag> -
<flag>CAN_AIM</flag> - Allows weapon to be auto-aimed
<flag>CAN_FREE_AIM</flag> - Allows weapon to free aim
<flag>ANIM_RELOAD</flag>
<flag>ANIM_CROUCH_FIRE</flag>


projectile type="" - Defines the projectile type. "NONE" makes a copy of the item held in your hand.
typetocreate type="" - Defines projectile type. Used in special cases such as creating a rocket.
fusetime="" - Time in milliseconds it takes for projectile to explode after it is fired/thrown.
explosion type="" - Defines the effect to use from explosionFx.dat
vehiclevelocity="" - ?


assets model="" - Weapon model to use.
anim group="" - Weapon animation to use.
<rate firerate="" blindfirerate=""/> - Rate of fire/animation speed for a weapon. Must be defined under anim group. For an example and formula check out this post.
meleegroup1="" - Weapon melee animation to use.

<effects>
muzzle fx="" - Muzzle flash effect to use.
shell fx="" - Ejected shell effect to use.
trail fx="" - Projectile trail effect to use.



Please help correct me if any of this is wrong, if you have have something to add, or if the descriptions need more defining. Flags still need descriptions if anyone wants to start there. tounge.gif

http://www.megaupload.com/?d=TF2RL8VA - Unaltered WeaponInfo.xml (for those that forget to make backups)

This post has been edited by resignator on Friday, May 7 2010, 16:13
PM
  Top
 

 
man2104  
Posted: Saturday, Dec 13 2008, 23:55
Quote Post


MC Spy
Group Icon
Group: Members
Joined: Jun 12, 2002

XXXXX



EPISODIC_1 to EPISODIC_24 is a range.
We can create up to 25 more weapons biggrin.gif
PMICQ
  Top
 

 
resignator  
Posted: Saturday, Dec 13 2008, 23:59
Quote Post


Square Civilian
Group Icon
Group: Members
Joined: Aug 8, 2005

XXXXX



QUOTE (man2104 @ Dec 13 2008, 23:55)
EPISODIC_1 to EPISODIC_24 is a range.
We can create up to 25 more weapons biggrin.gif

Holy! I didn't realize that. Updating it now. Thanks again smile.gif
PM
  Top
 

 
Ricksta  
Posted: Sunday, Dec 14 2008, 01:27
Quote Post


Homeboy
Group Icon
Group: Members
Joined: Sep 17, 2006

en.gif

XXXXX



vehiclevelocity ?

fusetime ?


I guess fuse it time it takes to blow up (grenade)
PMMSN
  Top
 

 
resignator  
Posted: Sunday, Dec 14 2008, 01:33
Quote Post


Square Civilian
Group Icon
Group: Members
Joined: Aug 8, 2005

XXXXX



QUOTE (Ricksta @ Dec 13 2008, 19:27)
vehiclevelocity ?

fusetime ?


I guess fuse it time it takes to blow up (grenade)

vehiclevelocity is the projectile travel speed.

fusetime is the time in milliseconds it takes for the projectile to explode after fired.

updating it now...
PM
  Top
 

 
laso49  
Posted: Sunday, Dec 14 2008, 02:40
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 1, 2008

XXXXX



When I change anything along the lines of say sniper gun to shoot rockets with the following codes it doesnt show my sniper rifle..
CODE
<weapon type="SNIPERRIFLE">
<data slot="HEAVY" firetype="PROJECTILE" damagetype="EXPLOSIVE" group="ROCKET" targetrange="50.0" weaponrange="100.0" clipsize="1000" ammomax="4000" timebetweenshots="100">
  <damage networkplayermod="2.0" networkpedmod="1.0"/>
  <reload time="066" fasttime="066" crouchtime="2066"/>

  <aiming accuracy="1.0">
   <offset         x="0.15" y="1.0" z="0.53"/>
   <crouchedoffset x="0.12" y="1.0" z="0.05"/>
   <reticule standing="1.0" ducked="1.0" scale="0.0"/>
  </aiming>

  <pickup regentime="600000" ammoonstreet="4000"/>

  <controller>
   <rumble duration="200" intensity="0.4"/>
  </controller>

  <flags>
   <flag>GUN</flag>
   <flag>HEAVY</flag>
   <flag>CAN_FREE_AIM</flag>
   <flag>ANIM_RELOAD</flag>
   <flag>ANIM_CROUCH_FIRE</flag>
   <flag>CREATE_VISIBLE_ORDNANCE</flag>
   <flag>2HANDED</flag>
   <flag>KEEP_CAMERA_BEHIND</flag>
  </flags>

  <projectile>
   <typetocreate type="UNUSED0"/>
   <offset    x="0.54" y="0.0" z="0.055"/>
   <rotoffset x="0.0"  y="0.0" z="-1.571"/>
  </projectile>
 </data>

 <assets model="rpg">
  <anim group="gun@rocket"/>

  <effects>
   <muzzle fx="muz_rocket"/>
  </effects>
 </assets>
</weapon>

CODE
<weapon type="UNUSED0">
<data slot="THROWN" firetype="PROJECTILE" damagetype="EXPLOSIVE" group="ROCKET" targetrange="35.0" clipsize="1000" stattype="RLAUNCHER">
 <damage networkplayermod="2.0" networkpedmod="1.0"/>

 <aiming accuracy="1.0">
  <offset         x="0.0" y="1.0" z="0.0"/>
  <crouchedoffset x="0.0" y="1.0" z="0.0"/>
  <reticule standing="0.65" ducked="0.55" scale="0.3"/>
 </aiming>

 <pickup regentime="360000" ammoonstreet="8"/>

 <controller>
  <rumble duration="0" intensity="0.0"/>
 </controller>

 <flags>
  <flag>THROWN</flag>
  <flag>EXPLOSION_BASED_ON_IMPACT</flag>
  <flag>ADD_SMOKE_ON_EXPLOSION</flag>
 </flags>

 <projectile type="ROCKET">
  <explosion type="ROCKET"/>
  <physics force="230.0" explodeimpactthreshold="0.25" explodeimpactwithvehiclethreshold="0.05"/>
 </projectile>
</data>

<assets model="cj_rpg_rocket">
 <effects>
  <trail fx="weap_rocket_player"/>
 </effects>
</assets>
</weapon>

Help
edit: I tried seeing if it was me having clipsize 1000 that made it do that but that wasn't it ><

This post has been edited by laso49 on Sunday, Dec 14 2008, 02:43
PM
  Top
 

 
resignator  
Posted: Sunday, Dec 14 2008, 03:44
Quote Post


Square Civilian
Group Icon
Group: Members
Joined: Aug 8, 2005

XXXXX



QUOTE (laso49 @ Dec 13 2008, 20:40)
When I change anything along the lines of say sniper gun to shoot rockets with the following codes it doesnt show my sniper rifle..



CODE

 <assets model="rpg">
 <anim group="gun@rocket"/>


Laso, you have the sniper rifle model and animation set wrong.
Change the two lines above to this:

CODE

 <assets model="w_psg1">
 <anim group="gun@rifle"/>


PM
  Top
 

 
laso49  
Posted: Sunday, Dec 14 2008, 03:59
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 1, 2008

XXXXX



thanks xD testing as we speak (Feels like a idiot)
Edit:
Now it doesnt show either the sniper rifle or the rocket launcher.

This post has been edited by laso49 on Sunday, Dec 14 2008, 04:04
PM
  Top
 

 
resignator  
Posted: Sunday, Dec 14 2008, 06:09
Quote Post


Square Civilian
Group Icon
Group: Members
Joined: Aug 8, 2005

XXXXX



QUOTE (laso49 @ Dec 13 2008, 21:59)
thanks xD testing as we speak (Feels like a idiot)
Edit:
Now it doesnt show either the sniper rifle or the rocket launcher.

Try changing data slot="HEAVY" back to data slot="SNIPER". Also, make sure you are using a zero not the letter "o" when spelling UNUSED0.
PM
  Top
 

 
morphadron  
Posted: Sunday, Dec 14 2008, 10:12
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Dec 5, 2008

XXXXX



It's wierd all automatic weapons have a "firerate" multiplyer, but the micro uzi doesn't.
Adding the line doesnt work ether.Since the weapons have a really low ROF.350 for the M4
and 500 for the smg's.
But can't change the micro uzi, since in reality it should have a ROF of 1700 rpm biggrin.gif.

Can you change accuracy while not auto aiming?No recoil or sway, makes for a really
cheap expiriance.Even the good old cone spread would be enough, to involve a little skill to the aiming part of the game.

This post has been edited by morphadron on Sunday, Dec 14 2008, 10:15
PM
  Top
 

 
Beady.  
Posted: Sunday, Dec 14 2008, 11:22
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Dec 14, 2008

lh.gif

XXXXX



QUOTE (man2104 @ Dec 13 2008, 23:55)
EPISODIC_1 to EPISODIC_24 is a range.
We can create up to 25 more weapons biggrin.gif

did any1 try'ed to create new weapon in Episodic_part and where should it appear in game ??? Like can u find it on ground or weapon shops i think its not that simple u would need to add some part of code to other scripts so that weapon could appear in game. So this part of code is practical unusable for now sly.gif
P.s. group="" - Determines ? it's basically determinate weapon class like "Shotgun" "SMG" "PISTOL_LARGE" "PISTOL_SMALL" << i don't think it affects weapon reaction in game.
offset x="" y="" z="" - it's basically acts like accuracy less the numbers are more accuracy you will get when shooting. Because if any1 played gta4 seen that when u shoot weapon bullet fly in different directions (bullets never fly at same spot they have those offsets so accuracy isn't 100%)

This post has been edited by Beady. on Sunday, Dec 14 2008, 11:30
Users WebsitePM
  Top
 

 
Jost_Vice  
Posted: Sunday, Dec 14 2008, 11:38
Quote Post


realtime, not prerendered
Group Icon
Group: Members
Joined: Oct 30, 2005

es.gif

Member Award




Nice find on the new weapon slots, anyway, yes, you have to add the spawn code in the game's script wich is not openable yet. sigh.gif
Users WebsitePMMSNPlayStation Network
  Top
 

 
DeeperRed  
Posted: Sunday, Dec 14 2008, 16:33
Quote Post


Damn it feels good to be gangsta
Group Icon
Group: Zaibatsu
Joined: Dec 17, 2007

en.gif

XXXXX



ayone else notice the "Minigun" in there. Now just to find out how to accsess it
PM
  Top
 

 
Beady.  
Posted: Sunday, Dec 14 2008, 16:43
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Dec 14, 2008

lh.gif

XXXXX



QUOTE (DeeperRed @ Dec 14 2008, 16:33)
ayone else notice the "Minigun" in there. Now just to find out how to accsess it

and interesting thing is that :
<pickup regentime="0" ammoonstreet="500"/>
so it means that you can pick it up only once because it don't have regentime (so it does not respawn) and it gives only 500 rounds and it has a 750rounds cap [clipsize="750"]

This post has been edited by Beady. on Sunday, Dec 14 2008, 16:52
Users WebsitePM
  Top
 

 
resignator  
Posted: Sunday, Dec 14 2008, 16:52
Quote Post


Square Civilian
Group Icon
Group: Members
Joined: Aug 8, 2005

XXXXX



QUOTE (Beady. @ Dec 14 2008, 05:22)
P.s. group="" - Determines ? it's basically determinate weapon class like "Shotgun" "SMG" "PISTOL_LARGE" "PISTOL_SMALL"  << i don't think it affects weapon reaction in game.
offset x="" y="" z="" - it's basically acts like accuracy less the numbers are more accuracy you will get when shooting. Because if any1 played gta4 seen that when u shoot weapon bullet fly in different directions (bullets never fly at same spot they have those offsets so accuracy isn't 100%)


group="" - Determines what effect to create from the weaponFx.dat file. Figured it out finally.

This post has been edited by resignator on Wednesday, Dec 17 2008, 21:46
PM
  Top
 

 
MasterK  
Posted: Sunday, Dec 14 2008, 17:29
Quote Post


The main protagonist.
Group Icon
Group: Members
Joined: Oct 3, 2005

hg.gif

XXXXX



Hmm, just one question... what does the silenced flag stand for? It's used for the molotov as far as I know mercie_blink.gif
Users WebsitePMMSN
  Top
 

 
resignator  
Posted: Sunday, Dec 14 2008, 17:36
Quote Post


Square Civilian
Group Icon
Group: Members
Joined: Aug 8, 2005

XXXXX



QUOTE (MasterK @ Dec 14 2008, 11:29)
Hmm, just one question... what does the silenced flag stand for? It's used for the molotov as far as I know  mercie_blink.gif

Add the flag to another weapon and find out tounge.gif Any help describing all those flags is welcome.
PM
  Top
 

 
laso49  
Posted: Sunday, Dec 14 2008, 17:37
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 1, 2008

XXXXX



QUOTE (MasterK @ Dec 14 2008, 17:29)
Hmm, just one question... what does the silenced flag stand for? It's used for the molotov as far as I know mercie_blink.gif

I'm not sure, my guess is the flag is so the projectile doesnt make a loud sound like a rocket on impact?
PM
  Top
 

 
MasterK  
Posted: Sunday, Dec 14 2008, 17:42
Quote Post


The main protagonist.
Group Icon
Group: Members
Joined: Oct 3, 2005

hg.gif

XXXXX



QUOTE (resignator @ Dec 14 2008, 17:36)
QUOTE (MasterK @ Dec 14 2008, 11:29)
Hmm, just one question... what does the silenced flag stand for? It's used for the molotov as far as I know  mercie_blink.gif

Add the flag to another weapon and find out tounge.gif Any help describing all those flags is welcome.

Mate, believe me if I'd get more than 2-5 FPS in the game, I'd probably have done it already smile.gif
Users WebsitePMMSN
  Top
 

 
laso49  
Posted: Sunday, Dec 14 2008, 17:44
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 1, 2008

XXXXX



QUOTE (MasterK @ Dec 14 2008, 17:42)
QUOTE (resignator @ Dec 14 2008, 17:36)
QUOTE (MasterK @ Dec 14 2008, 11:29)
Hmm, just one question... what does the silenced flag stand for? It's used for the molotov as far as I know  mercie_blink.gif

Add the flag to another weapon and find out tounge.gif Any help describing all those flags is welcome.

Mate, believe me if I'd get more than 2-5 FPS in the game, I'd probably have done it already smile.gif

Im going to try it on rocket, I'll see if there's a difference or anything.
I'll edit this topic after with my conclusion hopefully.
Edit:
you have got to be kidding me it seems to be a useless flag;
I put it on a rocket, no changes what so ever in sound, animation or anything
Tried taking it off of Molotov no difference either. doesn't seem likely though that rockstar would use or even add a useless flag, makes no sense.



select Me for president elect!

This post has been edited by laso49 on Sunday, Dec 14 2008, 17:56
PM
  Top
 

 

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

0 Members:

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

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



 
IMG IMG