Data Realms Fan Forums http://45.55.195.193/ |
|
Making guns shoot explosive projectiles http://45.55.195.193/viewtopic.php?f=1&t=6341 |
Page 1 of 1 |
Author: | Sithlordz [ Fri Jul 13, 2007 10:42 pm ] |
Post subject: | Making guns shoot explosive projectiles |
I could use a little modding enlightenment. I was wondering, how could you make guns shoot exploding projectiles? Could someone give me an example of what code I would need to put in to a weapon file to get it to shoot grenades or some other explosive projectile? |
Author: | Alenth Eneil [ Fri Jul 13, 2007 10:58 pm ] |
Post subject: | Re: Making guns shoot explosive projectiles |
You could always look at the Long Cannon code or is it Flak Cannon? |
Author: | ProjektTHOR [ Sat Jul 14, 2007 4:20 am ] |
Post subject: | Re: Making guns shoot explosive projectiles |
For reasons I have not exactly figured out, the Frag Shell (round for the Flak Cannon) only detonates in an arc when fired by the Flak Cannon. Anyone have any idea why this is? |
Author: | Alenth Eneil [ Sat Jul 14, 2007 4:22 am ] |
Post subject: | Re: Making guns shoot explosive projectiles |
Uh, momentum. |
Author: | Sithlordz [ Sat Jul 14, 2007 3:12 pm ] |
Post subject: | Re: Making guns shoot explosive projectiles |
Also all teh 1337 c0d1ng in the Flak Cannon confuses my tiny mind. Could someone paste example explosive bullet code here and walk me through how it works? |
Author: | Nfsjunkie91 [ Sat Jul 14, 2007 4:46 pm ] |
Post subject: | Re: Making guns shoot explosive projectiles |
Let me give you a basic idea, without the code, of how the flak cannon works. First, a standard TDexplosive with a timer is defined, in this case, Frag Shell. Then, the ammunition is made. However, rather than defining an MOPixel, the code uses a CopyOf to take all the information of the Frag Shell previously defined. Then, it's the same as other guns. A magazine is defined, it uses the round information that you just made, gun defined, etc. The code should be in Base.rte/Devices/Flak Cannon or whatever the folder is for the Flak Cannon. It's probably Cannons or something. |
Author: | Sithlordz [ Sun Jul 15, 2007 2:12 pm ] |
Post subject: | Re: Making guns shoot explosive projectiles |
*Whoosh sound as NFS's post goes over my head* Bwuh? Thanks for putting the effort into helping me but I didn't understand any of that :/ |
Author: | Pyrorex [ Sun Jul 15, 2007 4:40 pm ] |
Post subject: | Re: Making guns shoot explosive projectiles |
Meh, then I wouldn't suggest making a cannon one of your first mods( I assume?), as they're pretty mucyh the hardest thing to do besides vehicles. |
Author: | Alenth Eneil [ Sun Jul 15, 2007 8:08 pm ] |
Post subject: | Re: Making guns shoot explosive projectiles |
My first mod aside from brain edits was a modification of the Cannon... |
Author: | Pyrorex [ Sun Jul 15, 2007 8:09 pm ] |
Post subject: | Re: Making guns shoot explosive projectiles |
Yeah, but what build was this? |
Author: | MaximDude [ Sun Jul 15, 2007 8:11 pm ] |
Post subject: | Re: Making guns shoot explosive projectiles |
8, if not then 7, cause seperate RTEs came in build 8 My firsrt mod was a gun, also for build 8 |
Author: | Alenth Eneil [ Sun Jul 15, 2007 8:12 pm ] |
Post subject: | Re: Making guns shoot explosive projectiles |
Uh... B9... back when it was the Long Cannon. Nothing has really changed about it. As long as you look over the code and find out the path the dependencies take it's simple. EDIT : Might have been B8. |
Author: | Pyrorex [ Sun Jul 15, 2007 8:33 pm ] |
Post subject: | Re: Making guns shoot explosive projectiles |
Yeah, but not everyone's a genius, Alenth. |
Author: | Demented [ Sun Jul 15, 2007 10:14 pm ] |
Post subject: | Re: Making guns shoot explosive projectiles |
What's so hard about a Cannon? The TDExplosive? The fragments? Also, to Sithlordz... (This is a description of the dependencies Alenth mentioned) When you're editing a weapon, look for this: Code: RoundCount = 3 RTTRatio = 0 RegularRound = Round CopyOf = Round Cannon TracerRound = None This is found in the Magazine, which is usually in the same .ini as the weapon. The "RegularRound" is the type of object that's being fired. It's always a 'Round'. The "CopyOf" is more important. That determines what 'Round' you're firing. In this example, it's the 'Round Cannon'. Let's zoom over to the Round Cannon (it's in ammo.ini). Code: InstanceName = Round Cannon ParticleCount = 1 Particle = TDExplosive CopyOf = Frag Shell Shell = MOSRotating CopyOf = Cannon Casing FireVelocity = 90 ShellVelocity = 10 Separation = 5 Most of these determine aspects about the round that are necessary for a weapon to know when it fires the round. What you're looking for is the "Particle". That determines the type of 'Particle' that will be fired. For the cannon, it's a 'TDExplosive'. Again, the "CopyOf" is more important, as it determines what 'TDExplosive' will be used when the Round is fired. In this case, it's the 'Frag Shell', the thing that you see when you fire the Flak Cannon in-game. You can look for the Frag Shell in ammo.ini as well. It's a good example of a TDExplosive that detonates after a short time. Warning, block o' text! To change what a weapon fires, you first make the Particle. If it's a bomb or grenade, it's a TDExplosive. If it's a bullet, it's an MOPixel. Other choices are MOSParticle and MOSRotating. Then you give the particle a unique "Instancename" (it's just a name, really). Then you make a round for it (give it a unique instancename), and set the Round's "Particle" to the type of Particle, and the "CopyOf" to the Particle's Instancename. Then you go to the weapon's Magazine, and set the "RegularRound" to the Round's instancename. (TracerRounds are made the same way. Tracers fire once for every few times the regular round fires, as determined by RTTRatio.) |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |