dhelogo2.gif (5079 bytes)

Making the shotgun into a sniper rifle Tested with Boom, PRBoom and Zdoom

This procedure shows how to change the properties and appearance of a weapon, and introduces the use of BEX codepointers. It uses multiple simultaneous weapon shots to increase the apparent strength of a weapon.

This is not the best way to actually do this procedure. The BFG is a better candidate for reasons I will discuss below, but it shows how to use a fairly common procedure used in TCs that give a weapon quite a different feel.  In fact this whole example is a bit "rough and ready".  If you are making a sniper rifle for your TC, use these principles, but take a little more time over it than I did.

Step 1. Go to the misc and weapons screen (F4)

Step 2. Use page up/page down to until the shotgun is in the weapons box.

Step 3. Use the cursor keys to move to the shooting frame for the weapon and hit j to jump to that frame in the frame editor (frame 21).

Step 4. Move down to frame 22. This is the frame that has the shotgun blast codepointer. Change it to the pistol code pointer by highlighting the codepointer, hitting enter and entering the codepointer number for the player pistol shot (14).

Step 5. Change the duration of frames 22-27 to be 0. Change the duration of frame 28 to something appropriate to give a reasonable pause between shots. I have chosen 20 on this occasion.

Step 6. Change the sprite sub numbers for all the above frames to be 0, the simple shotgun at rest appearance.

Step 7. Save your deh file and open it in a text editor. You are now going to have to add a bex section to the file. At the end, enter the following:

#BEX section

[CODEPTR]

FRAME 23 = FirePistol

FRAME 24 = FirePistol

FRAME 25 = FirePistol

FRAME 26 = FirePistol

FRAME 27 = FirePistol

FRAME 28 = FirePistol

This shows one of the main advantages of the BEX codepointers. We are able to give codepointers to frames that do not normally have them. This is impossible when just using dehacked.

Things to note:

Every time you fire the shotgun, it actually fires 7 simultaneous pistol shots. It still uses shells as ammo, however because we did not change this in the weapon editor.

The shots are accurate, ie all the pistol shots land at the same point, meaning a target gets hit by all 7 shots. If you keep your finger on the fire button, however, the shots may start to scatter.

Because we are using 7 shots at one go, you may end up using more ammo than you have available and end up with negative values in your ammo counter, or other funny values depending on the source port you are using. This is why you may wish to use the BFG for this type of multiple shot weapon. You can set the number of cells per shot for the BFG in the misc page of dehacked. If we had used the BFG and set this value to 7, doom would not attempt to fire the weapon if there were less than 7 cells available.

You are using ammo very quickly and may wish to increase the ammo per item values in the ammo editor. This will mean all the ammo pick ups give increased ammo values.

With a little careful editing you can make a very powerful weapon with this technique. I had a TC with a 20 pistol blast sniper rifle that would stop almost anything with one shot. You can increase the power of the shotgun or super shotgun quite easily too using the same method. Even monsters can have their attacks made more powerful using 0 duration frames (eg super shotgun sergeants).

Download the example file. 

Home