Jump to content

[DOC] WeaponInfo.xml


Recommended Posts

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.

 

 

The "aiming accuracy" is only for auto aim.Free aim has no cone spread at all.

Thanks for clearing that up morphadron smile.gif Updating the info now.

Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/page/2/#findComment-1058765929
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..!

http://www.gtaforums.com/index.php?showtop...st&p=1058734813

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

How can one set the Grenade to hae huge physics force applied but no damage.. If you look in the Weaponinfo.xml file, you will notice that the grenade part has no mention of player damage exept the MP entry. I have inserted the damage base= 0 but it didnt do anything as far as I can tell. So what gives..? All the other weapons have damage base multiplier but not grenade.

 

I want to be able to drop a grenade at my feet with insane physics force applied so it basicly shoots me into the air, but not kill me in the process. Anybody got any ideas..? icon14.gif

 

<weapon type="GRENADE">

<data slot="THROWN" firetype="PROJECTILE" damagetype="EXPLOSIVE" group="GRENADE" targetrange="35.0" clipsize="1" ammomax="25">

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

</aiming>

 

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

 

<controller>

<rumble duration="50" intensity="0.1"/>

</controller>

 

<flags>

<flag>THROWN</flag>

<flag>CAN_AIM</flag>

<flag>CAN_FREE_AIM</flag>

<flag>ANIM_RELOAD</flag>

<flag>ANIM_CROUCH_FIRE</flag>

<flag>ADD_SMOKE_ON_EXPLOSION</flag>

<flag>SILENCED</flag>

</flags>

 

<projectile type="FUSE" fusetime="5000">

<explosion type="GRENADE"/>

<physics force="15000.0" vehiclevelocity="5.0"/>

</projectile>

</data>

 

<assets model="w_grenade">

<anim group="grenade"/>

</assets>

</weapon>

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

Well, i couldnt find how to make grenade with no damage, but there is a thing u could do: u can set it to 15000 physics force and than go online in free mod and dont allow friendly fire and ask someone to throw a grenade at u, than u will be flying away smile.gif.

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

the damage for the grenade is stored in the effect folder inside of /data/effects/explosionfx.dat it has 2 damages that ramp one for center and one for edge of the explosion same as the molotov

 

here is an example

 

GRENADE 500.0 75.0 2.0

 

the 500.0 represents damage at center and the 75.0 would be damage at edge the 2.0 would be the network modifier

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

Well, i couldnt find how to make grenade with no damage, but there is a thing u could do: u can set it to 15000 physics force and than go online in free mod and dont allow friendly fire and ask someone to throw a grenade at u, than u will be flying away smile.gif.

If you want a grenade with no damage then to edit explosionFx.dat.

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

How can one set the Grenade to hae huge physics force applied but no damage.. If you look in the Weaponinfo.xml file, you will notice that the grenade part has no mention of player damage exept the MP entry. I have inserted the damage base= 0 but it didnt do anything as far as I can tell. So what gives..? All the other weapons have damage base multiplier but not grenade.

 

I want to be able to drop a grenade at my feet with insane physics force applied so it basicly shoots me into the air, but not kill me in the process. Anybody got any ideas..? icon14.gif

 

<weapon type="GRENADE">

<data slot="THROWN" firetype="PROJECTILE" damagetype="EXPLOSIVE" group="GRENADE" targetrange="35.0" clipsize="1" ammomax="25">

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

</aiming>

 

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

 

<controller>

<rumble duration="50" intensity="0.1"/>

</controller>

 

<flags>

<flag>THROWN</flag>

<flag>CAN_AIM</flag>

<flag>CAN_FREE_AIM</flag>

<flag>ANIM_RELOAD</flag>

<flag>ANIM_CROUCH_FIRE</flag>

<flag>ADD_SMOKE_ON_EXPLOSION</flag>

<flag>SILENCED</flag>

</flags>

 

<projectile type="FUSE" fusetime="5000">

<explosion type="GRENADE"/>

<physics force="15000.0" vehiclevelocity="5.0"/>

</projectile>

</data>

 

<assets model="w_grenade">

<anim group="grenade"/>

</assets>

</weapon>

ExplosionFx.dat contains everything you need.

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

So guys, I´ve been trying a couple of things, but i have a problem, It won't work, it just won't. I've edited handling.dat succesfully, but my modified weapons.xml doesn't work. Any ideas?

 

Edit: nvm i got it to work.

Edited by Kelco
Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/page/2/#findComment-1058772237
Share on other sites

K, resignator, I get what you were saying..

 

I've been tinkering and I dont remember who it was that had a pistol-RPG but as I was trying things, for one, my pistol ended up w/ these paper-looking things flying off when I fire it and a vehicle develops a black spot, well it took about 20 shots to make it catch fire..

 

Well I kept lookin at things in the file.. And this is what I came up w/ ( I dont know if ALL of these things are what makes the weapon but these are simply changes I made ... PLEASE take note that these are ONLY the changes I made, not the full code of the file,

 

 

" firetype="PROJECTILE" damagetype="EXPLOSIVE" group="ROCKET"

 

and then the latter parts,

 

<flag>CREATE_VISIBLE_ORDNANCE</flag>

<flag>EXPLOSION_BASED_ON_IMPACT</flag>

<flag>ADD_SMOKE_ON_EXPLOSION</flag>

</flags>

 

 

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

and then for the effects, actually the only thing I pasted in here was the muzzle fx...muz_rocket

 

<effects>

<muzzle fx="muz_pistol_small"/>

<muzzle fx="muz_rocket"/>

<shell fx="weap_ejected_pistol"/>

</effects>

"

 

So after that I loaded up and threw a grenade at a car (they are almost like flashbangs - well they emit a lightening looking flash) a dude jumpt out another car and shot at me it was abit diff this time, a freakin rocket flew by me, then another from another ped shootin at him which blew up the car and nearly killt me mercie_blink.gif , Well so now I have a pistol-RPG too, and ofcourse so do all the cops and other civis on the street, I think that'd make for a pretty fun & challenging game.. In my case tho I kinda have the cops where I still get wanted but they "ignore me" & runaway colgate.gif

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

 

K, resignator, I get what you were saying..

 

I've been tinkering and I dont remember who it was that had a pistol-RPG but as I was trying things, for one, my pistol ended up w/ these paper-looking things flying off when I fire it and a vehicle develops a black spot, well it took about 20 shots to make it catch fire.

Here are some of the fun mods I have made to weapons (I recommend watching in HD) :

 

 

Here is a pistol that shoots a custom projectile with an altered explosion type. It is quite the show tounge.gif

 

 

Here is my flamethrower bullets mod.

 

 

Here is a gun that shoots err....guns. The "bullets" explode with a nice carpet bomb effect.

 

 

And last here is my water pistol mod.

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

K, resignator, I get what you were saying..

 

I've been tinkering and I dont remember who it was that had a pistol-RPG but as I was trying things, for one, my pistol ended up w/ these paper-looking things flying off when I fire it and a vehicle develops a black spot, well it took about 20 shots to make it catch fire.

Here are some of the fun mods I have made to weapons (I recommend watching in HD) :

 

 

Here is a pistol that shoots a custom projectile with an altered explosion type. It is quite the show tounge.gif

 

 

Here is my flamethrower bullets mod.

 

 

Here is a gun that shoots err....guns. The "bullets" explode with a nice carpet bomb effect.

 

 

And last here is my water pistol mod.

whatsthat.gif

That is the kind of thing I've wanted!! That was so cool, it was almost like napalm tounge.gif What gun did you use, the one labeled "Deagle" or "Baretta" ? Cuz the one I had used ofcourse was the pistol, the one everyone has ..

 

I'm guessin you wouldnt mind sharing what file(s) you edited to get that effect ?

 

Ever since I playt the Ps3 version I wanted to get BIGGER more spectacular explosions!! The biggest you could get was putting multiple vehicles next to the few "gas holding tanks" you could explode or load up cars at the gas station & blow em up ..

 

Ha, the flamemod, I know where thats from, from those tanks you can shoot and it'll spray out a flame, I think one of Ben Buja-machinima YT vids had done that, the guy was in the perfect spot, he shot the tank and the dude caught fire!

 

Yea I member seeing & posting on the gun shooter, be better to shoot into an area and if ppl dint run away but walkt right through...

 

lol, have you used the water pistol in a crowd of ppl ? Thats the thing at the sound of a shot, they run, I remember something like that in hmm... a file I edited.. shockingevents.dat, I tried editing but dint see much difference... Then you have their personality, where what they do in response to certain incidents ..

Anyways Ty for sharin res

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

Here is a gun that shoots err....guns. The "bullets" explode with a nice carpet bomb effect.

I would put those "bullets" on the Ak-47 and replace the guns with grenades that explode like the first weapon you listed... sly.gif

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

 

whatsthat.gif

That is the kind of thing I've wanted!! That was so cool, it was almost like napalm tounge.gif  What gun did you use, the one labeled "Deagle" or "Baretta" ?  Cuz the one I had used ofcourse was the pistol, the one everyone has ..

 

I'm guessin you wouldnt mind sharing what file(s) you edited to get that effect ?

Sure, I dont mind sharing at all. First, you want to create a completely new weapon in WeaponInfo.xml like so:

 

	<weapon type="EPISODIC_1"> <data slot="THROWN" firetype="PROJECTILE" damagetype="EXPLOSIVE" group="ROCKET" targetrange="900.0" weaponrange="500.0" clipsize="750" stattype="RLAUNCHER"> 	<damage networkplayermod="1.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="750"/> 	<controller>   <rumble duration="0" intensity="0.0"/> 	</controller> 	<flags>   <flag>THROWN</flag> 	</flags> 	<projectile type="ROCKET">   <explosion type="SHIP_DESTROY"/>   <physics force="300.0"/> 	</projectile> </data> <assets model="cj_rpg_rocket"> 	<effects>   <trail fx="weap_rocket_player"/> 	</effects> </assets></weapon>

 

 

Then you have to make a gun shoot your new weapon. Here is what I added to the pistol to make that happen:

 

	<weapon type="PISTOL"> <data slot="HANDGUN" firetype="PROJECTILE" damagetype="EXPLOSIVE" group="ROCKET" targetrange="900.0" weaponrange="500.0" clipsize="750" ammomax="1500" timebetweenshots="133"> 	<networkplayermod="1.0" networkpedmod="1.0"/> 	<reload time="1000" fasttime="1000" crouchtime="2000"/> 	<aiming accuracy="0.5">   <offset         x="0.15" y="1.0" z="0.55"/>   <crouchedoffset x="0.2"  y="1.0" z="0.05"/>   <reticule standing="0.6" ducked="0.5" scale="0.3"/> 	</aiming> 	<pickup regentime="120000" ammoonstreet="750"/> 	<controller>   <rumble duration="110" intensity="0.02"/> 	</controller> 	<flags>   <flag>GUN</flag>   <flag>CAN_AIM</flag>   <flag>CAN_FREE_AIM</flag>   <flag>ANIM_RELOAD</flag>   <flag>ANIM_CROUCH_FIRE</flag> 	</flags> 	<projectile>   <typetocreate type="EPISODIC_1"/>   <offset    x="180.54" y="0.0" z="0.055"/>   <rotoffset x="0.0"  y="0.0" z="-1.571"/> 	</projectile> 	 </data> <assets model="w_glock"> 	<anim group="gun@handgun" meleegroup1="firearm_core"/> 	<effects>   <muzzle fx="muz_pistol_small"/> 	</effects> </assets></weapon>

 

 

Now open up \common\data\effects\explosionFx.dat. and edit this explosion.

 

SHIP_DESTROY  500.0  200.0  2.0  1.0  15.0   100.0  -1.2  60.0  0.0035  	0.0  0.0  exp_ship_destroy	exp_ship_destroy	1.0  0	0	0.0	0.0	0.4	EXPLOSION	0  0.0	1.0	0.1	350.0	24.0	1.0	2

 

 

That's it. Make sure to always backup your files FIRST!

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

 

Why the hell can't I edit my xml files?

McWaffle are you trying to edit them in notepad or in your browser ?

You can right-click the file, "open with" choose "notepad"..

 

IF you double click the file it opens by default in your internet browser, if you opened it in the browser, you can just right-click in the browser windows select "view source" and it will automatically open notepad.

 

 

 

 

WOOHOO Ty res, I can't wait to try that!! biggrin.gif

So I'm guessing when you create a "new" weapon this keeps it from overwriting the original, and so no one else in the game will have that weapon for example ... O wait, I ... Ok now I've read and see you said you altered the pistol to shoot this new "weapon", I was thinking of this as a whole new stand alone weapon but this is more like a type of "ammo" for an existing "weapon" ..

 

What is the "thrown - rocket" (weapon) near the end of the file ?? The only thrown weapons in the game are molotovs, grenades and well "objects" ..

 

Updating: IT WORX tounge.gif Its very cool, it even emits a green shadow-like flash and if I cant see the actual explosion, where you see all the yellow, basically upon impact its like a bright green flash of light..

 

I put it on the "Deagle" handgun in the weapons tier 1, I dont think anyone else on the street has that one.. I also tried using the default pertrol pump on the AK47, so I havent edited it yet but its cool to shoot mutliple rpg's from it heh, Ty again for sharin!

 

Its also evident that the ship_destroy is the biggest explosion apparently.. I thought there was a way to increase the size of the flash onscreen, if is I dont see it, I guess these are some kind of "pre-rendered effect" or encrypted setting. I've playt a lil w/ the colors, one thing I noticed w/ the ship_destroy, there is never an "impact" if you fire into open-space. I tried the HI_OCTANE on the AK also and when firing into the sky in rapid succession it loox a lil like fireworx tounge.gif

Edited by Costar
Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/page/2/#findComment-1058779991
Share on other sites

 

What is the "thrown - rocket" (weapon) near the end of the file ?? The only thrown weapons in the game are molotovs, grenades and well "objects" ..

 

Updating: IT WORX tounge.gif  Its very cool, it even emits a green shadow-like flash and if I cant see the actual explosion, where you see all the yellow, basically upon impact its like a bright green flash of light..

 

I put it on the "Deagle" handgun in the weapons tier 1,  I dont think anyone else on the street has that one.. I also tried using the default pertrol pump on the AK47, so I havent edited it yet but its cool to shoot mutliple rpg's from it heh, Ty again for sharin!

 

Its also evident that the ship_destroy is the biggest explosion apparently.. I thought there was a way to increase the size of the flash onscreen, if is I dont see it, I guess these are some kind of "pre-rendered effect" or encrypted setting. I've playt a lil w/ the colors, one thing I noticed w/ the ship_destroy, there is never an "impact" if you fire into open-space. I tried the HI_OCTANE on the AK also and when firing into the sky in rapid succession it loox  a lil like fireworx tounge.gif

Actually, all "projectiles" are thrown even rockets smile.gif

 

The flash of green is something I added. If you want to change it you can edit explosionFx.dat:

 

[sHIP_DESTROY  500.0  200.0  2.0  1.0  15.0   100.0  -1.2  60.0  0.0035   0.0  0.0  exp_ship_destroy exp_ship_destroy 1.0  0 0 0.0 0.0 0.4 EXPLOSION 0  0.0 1.0 0.1 350.0 24.0 1.0 2

 

You can see I set green to 1.0 here and zeroed the red. If you want a red explosion simply set the green value to 0.0 and red to 1.0.

 

Hope this helps.

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

one thing I noticed w/ the ship_destroy, there is never an "impact" if you fire into open-space.

can you reproduce this? i really need it wow.gif

 

i used ship_destroy on a rocket but it still exploded after the usual amount of time, or did you use a different projectile?

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

one thing I noticed w/ the ship_destroy, there is never an "impact" if you fire into open-space.

can you reproduce this? i really need it wow.gif

 

i used ship_destroy on a rocket but it still exploded after the usual amount of time, or did you use a different projectile?

Are you making sure to increase the weaponrange on both the rocket and the gun shooting it? Also, are you creating a completely new weapon or just editing the existing rocket? I would suggest making a new rocket weapon like in my example.

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

well ive tried to increase the range but it always explodes after the same amount of time and i dont think creating a new weapon makes a difference.

 

i wanted to create mines but the rocket always explodes even if it doesnt hit anything and nades explode at the slightest touch when set to "impact" even if i use the EXPLOSION_BASED_ON_IMPACT flag and add modified explodeimpactthreshold and explodeimpactwithvehiclethreshold info.

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

well ive tried to increase the range but it always explodes after the same amount of time and i dont think creating a new weapon makes a difference.

 

i wanted to create mines but the rocket always explodes even if it doesnt hit anything and nades explode at the slightest touch when set to "impact" even if i use the EXPLOSION_BASED_ON_IMPACT flag and add modified explodeimpactthreshold and explodeimpactwithvehiclethreshold info.

It might help to post your code in here to see what changes you've made .. or upload your file someplace like resignator did (megaupload.com) or somethin.. So ppl can dld & view it .. I say that cuz I know it isnt the most ideal thing to have pages of code in a post ..

 

Yea I figured that out res, " R, G, B ", mine is actually a somewhat pinkish red, I'd like to get a sort of red & blue .. I think it'd be cool to see the rocket w/ a green-like flare as it flies through the air. The weapons are cool, I have the AK as a HI_OCTANE w/ a few values altered so its not a big flash like the monstrous ship_destroy but its still pretty cool, I think its actually a good anim for like a cluster explosion, ofcourse the AK kix out the ammo rapidly, its cool ..

 

Only thing is, HAVE to be careful being mindful of the weapons in your hands at the time you use em, cuz I sent poor Niko flyin forgettin in the instance the gun I had in my hand was the "ship_destroy" lol ..

 

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

 

 

 

It might help to post your code in here to see what changes you've made .. or upload your file someplace like resignator did (megaupload.com) or somethin.. So ppl can dld & view it .. I say that cuz I know it isnt the most ideal thing to have pages of code in a post ..

 

ive already tried numerous things but it never worked. you should know how to do it right? if you dont then why should i waste my time posting my non working code? incase you dont remember the setting you used then nevermind, i just thought itd be worth asking wink.gif

 

 

 

How can I USE THE MINIGUN!!!! Please tell me I can use the minigun on my hand and not on the heli!!!!

 

the minigun of the annihilator belongs to the annihilator model itself so you cant carry it around by hand

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

 

 

 

It might help to post your code in here to see what changes you've made .. or upload your file someplace like resignator did (megaupload.com) or somethin.. So ppl can dld & view it .. I say that cuz I know it isnt the most ideal thing to have pages of code in a post ..

 

ive already tried numerous things but it never worked. you should know how to do it right? if you dont then why should i waste my time posting my non working code? incase you dont remember the setting you used then nevermind, i just thought itd be worth asking wink.gif

 

 

 

How can I USE THE MINIGUN!!!! Please tell me I can use the minigun on my hand and not on the heli!!!!

 

the minigun of the annihilator belongs to the annihilator model itself so you cant carry it around by hand

whoa, wait a sec, I never saw your previous post about my mentioning "no impact"... It wasnt anything I "produced". Resignator came up w/ that weapon idea using "ship_destroy" .. I simply followed his example and implemented it into the D-eagle handgun... I stated that when I fire off into ok "sky/space" it never impacted... I can still fire it ground level and it still seemt to hit something in the FAR distance but NOT ALWAYS just most times cuz it apparently intersected w/ something that had a range less than "900", that is assuming the range of "900" is not an in-game visible range.. I think thats why resignator questioned if you changed the range ....

 

If you take the RPG unaltered, fire it into the sky it usually explodes visibly, his modified weapon did not, hence the lower range on the RPG and his extended range on the modified handgun.. So I dont know exactly what it is you were looking for, it's nothing I did.

 

RPG (default)

Target range=50 Weapon range=100

 

Res's weapon

Target range=900 Weapon range=500

 

Definite difference there. The reason you post code relevant to the change is, if you tried entering the code & can't get it to work, then its probable that you have a simple typo or you've added/left out something crucial.

Link to comment
https://gtaforums.com/topic/383690-doc-weaponinfoxml/page/2/#findComment-1058786743
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.