Note: This is an old page that has been updated/formatted, you can view the original here.

Weapons Templates

Author: GuNbOy

In this tutorial you will learn how to make different types of weapons templates and how to make them work together in the static.jkl file.

Things you will need are:

The Basics of Templates

Messages in Templates

Specific Messages for Weapon Types

Messages for Explosions

Particle Messages

How to Make the Freakin' Things Work!!!

I hope I didn't scare you all away with that crapload of messages... anyway, first off you go get the static.jkl I included with the tutorial. Open it up in notepad, then go to the templates section. After the _gexplosion and _gweapon templates, make the templates you want. Here are some examples to show you how to compile the templates yourselves (if this wont help you, go look at the tempref document and look at a weapon similar to the one you want to create, then modify it to fit your needs. Be sure to put the weapons explosion and anything that the explosion creates BEFORE the template itself, otherwise it won't work).

+bulletcloud none orient=(0.000000/0.000000/0.000000) type=particle timer=0.150000 typeflags=0x3f material=00gsmoke.mat range=0.006000 rate=64.000000 maxthrust=4.000000 elementsize=0.004000 count=16 // this is for when the bullet hits the wall

+bloodcloud +bulletcloud material=bloody.mat range=0.030000 count=40 // all I changed from the bullet cloud was: material so it looks like blood, range so its a bigger area, and count so it will be more dense. this will be used when a person gets hit by the bullet

+bulletfleshhit _gexplosion timer=0.001000 soundclass=exp_bullet.snd creatething=+bloodcloud typeflags=0x0 // for when a person is hit

+bullethit _gexplosion timer=0.001000 soundclass=exp_bullet.snd creatething=+bulletcloud typeflags=0x0 // for when the bullet hits something not living

+bullet _gweapon thingflags=0x20000001 light=0.400000 model3d=bullet.3do size=0.001000 movesize=0.001000 soundclass=bry.snd maxrotvel=0.000000 vel=(0.000000/20.000000/0.000000) explode=+bullethit fleshhit=+bulletfleshhit damage=30.000000 mindamage=10.000000 typeflags=0x20440d rate=15.000000

As you can see, I put the +bullethit under explode= and the +bulletfleshhit under the fleshhit= so it will do different things when you hit a person or a wall :)

Now you can experiment with all sorts of things. I hope that this helped a little to make people not totally confused about templates.