Jump to content

[DOC] WeaponInfo.xml


Recommended Posts

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)

Edited by resignator
  • Like 2
Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/
Share on other sites

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...

Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/#findComment-1058757402
Share on other sites

When I change anything along the lines of say sniper gun to shoot rockets with the following codes it doesnt show my sniper rifle..

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

 

 

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

Edited by laso49
Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/#findComment-1058757613
Share on other sites

 

When I change anything along the lines of say sniper gun to shoot rockets with the following codes it doesnt show my sniper rifle..

 

 

 

 <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:

 

 

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

 

 

 

Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/#findComment-1058757821
Share on other sites

 

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.

Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/#findComment-1058758201
Share on other sites

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.

Edited by morphadron
Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/#findComment-1058758772
Share on other sites

 

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%)

Edited by Beady.
Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/#findComment-1058759009
Share on other sites

 

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]

Edited by Beady.
Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/#findComment-1058760403
Share on other sites

 

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.

Edited by resignator
Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/#findComment-1058760448
Share on other sites

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

Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/#findComment-1058760695
Share on other sites

 

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!

Edited by laso49
Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/#findComment-1058760706
Share on other sites

 

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?

I imagine it is so the weapon doesn't make noise while flying through the air. Wont know until someone tests it :cough:

Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/#findComment-1058760710
Share on other sites

it does work, it can be used to eliminate the rocket flying sound for example, it needs to be set on the "rocket" though, not the "Rlauncher"

 

also, i dont think the minigun or flamer will every work, ive tried to load their weapon models but they dont exist so we will have to get our own model ingame.

 

too bad that the first person view doesnt have a crosshair..

 

 

also, i made a grenade launcher today: user posted image

 

 

i may list some flag explanations

Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/#findComment-1058761072
Share on other sites

 

it does work, it can be used to eliminate the rocket flying sound for example, it needs to be set on the "rocket" though, not the "Rlauncher"

 

also, i dont think the minigun or flamer will every work, ive tried to load their weapon models but they dont exist so we will have to get our own model ingame.

 

too bad that the first person view doesnt have a crosshair..

 

 

also, i made a grenade launcher today: user posted image

 

 

i may list some flag explanations

Thanks for checking it out. Updating the info now...

Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/#findComment-1058761134
Share on other sites

 

<aiming accuracy="" - Auto-aim accuracy while standing.

crouchedoffset x="" y="" z="" - Auto-aim accuracy while crouched.

 

are you sure these are only used for auto aim? i thought they were global values, for manual aiming too.

 

 

explosion type="" - Defines the explosion model.

 

maybe you should write "type" instead of "model" to avoid confusion.

 

 

 

not 100% sure about all my flag explanations, some needs testing which i cant be bothered to do but with a bit of imagination and by comparing different weapon data it should be relatively easy for anyone to figure out why which flag is used.

 

<flag>GUN</flag> - identifies weapon as firearm

<flag>MELEE_CLUB</flag> - something that smashes, used for victims behaviour when hit

<flag>MELEE_BLADE</flag> - something that cuts, used for victims behaviour when hit

<flag>2HANDED</flag> - weapon is held in 2 hands

<flag>TREAT_AS_2HANDED_IN_COVER</flag> - wether it should be held with 1 or 2 hand when blind fireing from cover?

<flag>FIRST_PERSON</flag> - aiming in first person (no crosshair though)

<flag>HEAVY</flag> - used to decide which running anims/speed are used

<flag>CREATE_VISIBLE_ORDNANCE</flag> - ?

<flag>HIGHER_BREAK_FORCE</flag> - breaks dynamic map objects more easily?

<flag>EXPLOSION_BASED_ON_IMPACT</flag> - if angle is too shallow -> no explosion? (since its only used for "rocket")

<flag>ADD_SMOKE_ON_EXPLOSION</flag> - render additional smoke when exploding?

<flag>SILENCED</flag> - Silences the projectile/thrown weapon while in flight.

<flag>INSTANT_KILL_IN_MP</flag> - self explanatory, may not even work, since it only used on 1 weapon that that weapon isnt even used in the game

<flag>ARMOUR_PENETRATING</flag> - Bypasses body armor hit check.

<flag>KEEP_CAMERA_BEHIND</flag> - ?

<flag>CAN_AIM</flag> - can lock on to humans when using auto aim?

<flag>CAN_FREE_AIM</flag> - can aim freely

<flag>ANIM_RELOAD</flag> - wether reload anims should be used or not?

<flag>ANIM_CROUCH_FIRE</flag> - wether weapon can be fired while crouching?

 

 

also, i think you should add something about the ability to generate a projectile like the RL does:

 

 

<projectile>

    <typetocreate type="ROCKET"/>

    <offset    x="0.54" y="0.0" z="0.055"/>

    <rotoffset x="0.0"  y="0.0" z="-1.571"/>

   </projectile>

 

edit: looks like this flag is missing: <flag>THROWN</flag> - weapon is being thrown, even if it isnt a projectile (uses gravity, obviously)

 

maybe theres more missing?

Edited by rebel_36
Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/#findComment-1058761354
Share on other sites

<flag>GUN</flag> - identifies weapon as firearm

<flag>MELEE_CLUB</flag> - something that smashes, used for victims behaviour when hit

<flag>MELEE_BLADE</flag> - something that cuts, used for victims behaviour when hit

<flag>2HANDED</flag> - weapon is held in 2 hands

<flag>TREAT_AS_2HANDED_IN_COVER</flag> - wether it should be held with 1 or 2 hand when blind fireing from cover?

<flag>FIRST_PERSON</flag> - aiming in first person (no crosshair though)

<flag>HEAVY</flag> - used to decide which running anims/speed are used

<flag>CREATE_VISIBLE_ORDNANCE</flag> - ?

<flag>HIGHER_BREAK_FORCE</flag> - breaks dynamic map objects more easily?

<flag>EXPLOSION_BASED_ON_IMPACT</flag> - if angle is too shallow -> no explosion? (since its only used for "rocket")

<flag>ADD_SMOKE_ON_EXPLOSION</flag> - render additional smoke when exploding?

<flag>SILENCED</flag> - Silences the projectile/thrown weapon while in flight.

<flag>INSTANT_KILL_IN_MP</flag> - self explanatory, may not even work, since it only used on 1 weapon that that weapon isnt even used in the game

<flag>ARMOUR_PENETRATING</flag> - Bypasses body armor hit check.

<flag>KEEP_CAMERA_BEHIND</flag> - ?

<flag>CAN_AIM</flag> - can lock on to humans when using auto aim?

<flag>CAN_FREE_AIM</flag> - can aim freely

<flag>ANIM_RELOAD</flag> - wether reload anims should be used or not?

<flag>ANIM_CROUCH_FIRE</flag> - wether weapon can be fired while crouching?

 

 

also, i think you should add something about the ability to generate a projectile like the RL does:

 

 

<projectile>

    <typetocreate type="ROCKET"/>

    <offset    x="0.54" y="0.0" z="0.055"/>

    <rotoffset x="0.0"  y="0.0" z="-1.571"/>

   </projectile>

 

edit: looks like this flag is missing: <flag>THROWN</flag> - weapon is being thrown, even if it isnt a projectile (uses gravity, obviously)

 

maybe theres more missing?

Thanks for all the descriptions rebel_36 smile.gif. I also appreciate the feedback.

 

About the auto aim accuracy...it wasn't too clear either way from the few tests I ran. Any additional input from the community would be great.

Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/#findComment-1058761724
Share on other sites

it does work, it can be used to eliminate the rocket flying sound for example, it needs to be set on the "rocket" though, not the "Rlauncher"

 

also, i dont think the minigun or flamer will every work, ive tried to load their weapon models but they dont exist so we will have to get our own model ingame.

 

too bad that the first person view doesnt have a crosshair..

 

 

also, i made a grenade launcher today: user posted image

 

 

i may list some flag explanations

Have you tried loading the models using names of the ones used in San Andreas? It could be possible. On a side note... has anyone tried editing the m4, so it's data is replaced with the minigun's? smile.gif

Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/#findComment-1058762241
Share on other sites

Does anyone know how to make the punch really strong, like intant kill..? I have seen a vid on youtube with this mod..!

 

Ohh yeah.. I meant to add physics force, I tried adding that line in weaponsinfo.xml but it didnt seem to work..! The vid had physics applied to punch and shove..!

Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/#findComment-1058765600
Share on other sites

Does anyone know how to make the punch really strong, like intant kill..? I have seen a vid on youtube with this mod..!

 

Ohh yeah.. I meant to add physics force, I tried adding that line in weaponsinfo.xml but it didnt seem to work..! The vid had physics applied to punch and shove..!

 

 

I havent tried editing weapons YET, .., but have you tried editing pedpersonality.dat to increase Nikos meleemartiallevel% I've tried to max out his settings in there, my meleelev is set to 100 I think thats the limit, its the 9th value from left - right..

It kills ppl usually w/ one hit and makes for some pretty cool things, I can flip some cars, bash the heck outta them w/ it but I really havent tried punching them w/ his fist ..

Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/#findComment-1058765786
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
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

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