|
 |
|
|
|
|
|
GTA Modification Forums
[DOC] WeaponInfo.xml documentation
 |
|
 |
| |
Kelco  |
Posted: Tuesday, Dec 16 2008, 20:48
|
Player Hater

Group: Members
Joined: Dec 11, 2008


|
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.
This post has been edited by Kelco on Tuesday, Dec 16 2008, 21:12
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Costar  |
Posted: Thursday, Dec 18 2008, 00:48
|
Playa

Group: Members
Joined: Jan 7, 2006


|
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  , 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
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
resignator  |
Posted: Thursday, Dec 18 2008, 04:01
|
Square Civilian

Group: Members
Joined: Aug 8, 2005

|
| QUOTE (Costar @ Dec 17 2008, 18:48) | 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) : http://www.youtube.com/watch?v=PePvi5XeU2YHere is a pistol that shoots a custom projectile with an altered explosion type. It is quite the show http://www.youtube.com/watch?v=Y0s2K2Uv3eAHere is my flamethrower bullets mod. http://www.youtube.com/watch?v=mqTEfLoeL1oHere is a gun that shoots err....guns. The "bullets" explode with a nice carpet bomb effect. http://www.youtube.com/watch?v=y6Bxj_c4GMIAnd last here is my water pistol mod. This post has been edited by resignator on Thursday, Dec 18 2008, 04:10
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Costar  |
Posted: Thursday, Dec 18 2008, 05:23
|
Playa

Group: Members
Joined: Jan 7, 2006


|
| QUOTE (resignator @ Dec 18 2008, 04:01) | | QUOTE (Costar @ Dec 17 2008, 18:48) | 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) :
http://www.youtube.com/watch?v=PePvi5XeU2Y Here is a pistol that shoots a custom projectile with an altered explosion type. It is quite the show 
http://www.youtube.com/watch?v=Y0s2K2Uv3eA Here is my flamethrower bullets mod.
http://www.youtube.com/watch?v=mqTEfLoeL1o Here is a gun that shoots err....guns. The "bullets" explode with a nice carpet bomb effect.
http://www.youtube.com/watch?v=y6Bxj_c4GMI And last here is my water pistol mod. | That is the kind of thing I've wanted!! That was so cool, it was almost like napalm  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
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
resignator  |
Posted: Thursday, Dec 18 2008, 05:49
|
Square Civilian

Group: Members
Joined: Aug 8, 2005

|
| QUOTE (Costar @ Dec 17 2008, 23:23) | That is the kind of thing I've wanted!! That was so cool, it was almost like napalm 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: | CODE | <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: | CODE | <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. | CODE | 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! This post has been edited by resignator on Thursday, Dec 18 2008, 05:59
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Costar  |
Posted: Thursday, Dec 18 2008, 15:16
|
Playa

Group: Members
Joined: Jan 7, 2006


|
| QUOTE (Mcwaffle @ Dec 18 2008, 13:33) | | 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!! 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  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 This post has been edited by Costar on Thursday, Dec 18 2008, 19:04
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
resignator  |
Posted: Thursday, Dec 18 2008, 19:20
|
Square Civilian

Group: Members
Joined: Aug 8, 2005

|
| QUOTE (Costar @ Dec 18 2008, 09:16) | 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 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  |
Actually, all "projectiles" are thrown even rockets  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. This post has been edited by resignator on Thursday, Dec 18 2008, 19:30
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Costar  |
|
Playa

Group: Members
Joined: Jan 7, 2006


|
| QUOTE (rebel_36 @ Dec 19 2008, 00:17) | 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 ..
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Costar  |
Posted: Saturday, Dec 20 2008, 03:04
|
Playa

Group: Members
Joined: Jan 7, 2006


|
| QUOTE (rebel_36 @ Dec 19 2008, 13:08) | | QUOTE (Costar @ Dec 19 2008, 04:12) |
|
| QUOTE | 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 
| QUOTE | | 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.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Pages:
(15) 1 2 [3] 4 5 ... Last »
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|