Forums Index >> Modding >> Weapon help



Page : <1> :


How do I make more weapons? Like in repent's mod he has like 3 different type of speedy p-ups. I have a hunch that it's in the special.cs file but correct me if I'm wrong.

Tuesday, January 18, 2005 at 3:48:07 PM

It is, and modify $NumPupTypes, then add the names of your custom projectile names to the $PupTypes array.

Tuesday, January 18, 2005 at 4:11:29 PM

Heya! I've got a lot of time on my hands so,

Here's a quick tutorial on making new weapons and adding them to the powerup cycle- and you're right, it's in special.cs. This tutorial won't be on editing the settings, but more the concept of adding.

Start by opening up special.cs (if you haven't downloaded the original file, do that now) and scrolling down to the part about weapon datablocks, this is where you're first bit of work will begin. I wrote up a quick datablock on a flamethrower (since the flamethrower is fun) so you won't have to do the work.

datablock ProjectileData(FlameThrowerProjectile)
{
velocity = 14.0; // meters per second
inheritVelocity = 0.97; // how much of shooters velocity to inherit
numBounce = 0; // usually 0
splashArea = 0.0; // usually 0
count = 15000; // how many shots per clip?
saveOldCartridge = true; // chuck old cartridge or keep it around
canSave = false; // can this cartridge be saved if another comes along?
reloadTime = 1; // in milliseconds
burstDelay = 2000; // milliseconds until next burst if button held down
burstCount = 500; // number of projectiles to fire per burst
synchTime = 1000; // synch over this many milliseconds
synchBefore = 500; // synch if not older than this in milliseconds
damage = 3.47; // usually 1
gravityScale = 1.7; //
sizeScale = 1.6; // scale of projectile (meters for bitmaps)
resource = "~/data/shapes/tanks/defaultexplosion.dts"; // shape or bitmap
tankExplosion = "DefaultTankExplosion"; // datablock for explosion
ownTankExplosion = "DefaultOwnTankExplosion"; // datablock for explosion
bounceExplosion = "DefaultExplosion"; // datablock for explosion
otherExplosion = "DefaultExplosion"; // datablock for explosion
reticle = "SpeedyReticle";
};

Just copy and pase that into special under the "reticle = "HeavyReticle"; };" line. I won't go through making a new reticle right now, so I'm just pointing it to the speedyreticle. Save if you want, but you're still not done yet. Now its time to put the projectile and its sound (the volcano) in the cycle :)
Scroll down to the line "$NumPupTypes = 3;" - this is where the amount of powerups are determined. Since you'll have 4 of these, change the number to 4. The game is now aware that there are 4 projectiles, but it doesn't know which one is the 4th. So after "$pupTypes[2] = "SplashProjectile";" add the following on a new line "$pupTypes[3] = "FlameThrowerProjectile";" Now you have a projectile but no sound for it! So you'll have to define that too. After the line "$pupSnds[2] = "ActivateSplash";" add this: "$pupSnds[3] = "EruptSound";", which is the volcano sound.

As I said before, this tutorial isn't complete but it should be a good start if I wrote it right. :) Happy modding!

~Jaj Jr~

Tuesday, January 18, 2005 at 4:21:39 PM

Thanks Jaj, I'm waiting for complete version of this! First time this month I find something interesting. :) :)

Wednesday, January 19, 2005 at 7:19:08 AM

Oh yea I was suppoused to help you around with that... Completaly forgot it, too busy you see. Don't got even much time to come online anymore.

You don't have to let go of one rope before grabbing the other. But you'll have to let go of one if you want to swing forward.

Wednesday, January 19, 2005 at 9:24:43 AM

I knew I had to do that but I wasn't sure. Thanks a lot.

Wednesday, January 19, 2005 at 3:31:23 PM

Page : <1> :

insert quote insert url insert email insert image bold italic underline superscript subscript horizontal rule : : Help on using forum codes

Add comment:

HTML is disabled within comments, but ZBB Code is enabled.

Back to the top

Web site designed, maintained and funded by -z- and Dan MacDonald