The following information explains how the weapons of DooM ][ work. It doesn't really talk about their firing much but instead covers the fine nuances of DooM weapons. It explains just how DooM uses the Select and De- select code pointers to power its weapons. It explains why the chainsaw does what it alone does with sounds, and why this behavior cannot be changed or used elsewhere. I hope this helps with somebody's editing. I personally only found it by accident, creating a weapon that lit up a room, screwing up, and pur- suing the screwup; there are a couple of things I've thought of to do with this information, not the least but the easiest of which is letting DooM weapons be selected like Quake weapons--instantly. Read on if you want to improve your hacking itinerary. The Doomweps.zip file that should be in this directory also includes proofs of my findings, all in .deh format. You get to load them yourself, because I didn't feel like explaining how. If you can understand any of this information you can probably load .deh patch files anyway. It also includes this very text file, for reference. HOW THE WEAPONS OF DOOM WORK ============================ The weapons of Doom all work the same way, with the same code pointers. Even the chainsaw. But not weapon 8. (Read on to find out what I just meant.) A weapon is selected using code pointer 185552. This is actually referred to as the Deselect Frame in Dehacked; however, it is definately the selecting code pointer. Though this frame loops for each of DooM's weapons, it does not have to always be active. 16 uses of the code pointer are needed to raise the weapon and let you fire. Only after the code pointer is acti- vated 16 times can you actually fire the weapon. Once you select another weapon, the Deselect frame goes into action. It is referred as the Select Frame in Dehacked; the Deselect pointer is 185488. Again, this code pointer must be activated 16 times to work fully; only after the code pointer is used 16 times will the weapon you selected will activate. {1} An interesting fact about the Select pointer is it is entirely unnecessary; if you link a weapon's Dehacked Deselect frame to its correct Bobbing frame, it will work, and there will be no weapon selection delay. Though it looks odd, you can even link it to another weapon's Bobbing frame. Make no mistake, however, that the Deselect pointer IS needed for a weapon's Dhe Select frame; if you link a weapon's Dhe Select frame to any frame other than one with the Deselect pointer, you'll get an ugly scrambled screen and a grating sound emanating from your speakers for your troubles. {2} When the chainsaw is acquired, it takes up both weapon slot 1 and 8. When selected, inner coding in the DooM executable calls text offset 21144, adds D_ to the beginning, and plays that as a sound, getting it from the .wad file. This is SAWUP in the original DooM executable. However, THIS IS NOT AN EFFECT OF THE CHAINSAW ITSELF. The coding demands the sound be played only if you have weapon 8 and push either 1 or 8. (Getting a berserk pack lets you toggle between weapon 8 and 1; the inner coding, of course, only demands the sound be played when you select weapon 8.) {3} Weapons bob using code pointer 185072; however, this, too, is for the most part unnecessary. The Bobbing track is laid out when you're walking in the game. If a weapon is on this code pointer, it will follow that track. The Select/Deselect code pointers do NOT reset the Bobbing track. Different durations mean nothing. The graphic will still follow where it would be on the track at that moment. In other words, you can never in- or decrease how fast a weapon bobs; increasing the duration of the bobbing frame(s) makes them flash around the track, like the chainsaw does, and decreasing their duration does nothing, as long as at least one if its Bobbing frames has a duration above 0. You can even have the frame with the Bobbing pointer have a duration of 0 and have it go to another frame with a duration of 1 and nothing will change. If all bobbing frames have a duration of 0, it freezes the game quite instantly and nicely and you get to hit the ANY key--the reset button. {4} As for why the chainsaw plays SAWIDL during its Bobbing frames, it, again, is a property of not the chainsaw but of weapon 8. This, however, is much more selective. If one of weapon 8's bobbing frames is frame 67 and its code pointer is 185072, SAWIDL is played when it is displayed. Otherwise, the sound will not play. It will not play when frame 67 is displayed in any other weapon's bobbing frames; it will not play during any other bobbing frame of weapon 8; it will not play unless frame 67's code pointer is 185072. (Reminds me of the Revenant fireball.) {5} What this all means is really very little. There aren't too many effects you can produce knowing this, since the code pointer must be acti- vated 16 times. However, there are a couple of tricks that can be done if you know this. You can have a weapon: -Instantly be de/selected -Take twice (or half) as long to de/select -Play a sound while being de/selected, to alert other DooMers to what weapon is being de/selected -Stay in one place while you're moving (Finally, the always-alert Marine!) Etc., etc., etc. Therefore, there is really very little use to this knowledge. How- ever, it is knowledge. And knowledge is power. And some strange people might actually find these things interesting to know. (Weirdos.) Jjukil Comments/error corrections? Contact Jjukil@aol.com. {1} The Dehacked Select/Deselect error is proven with Pain.deh. It causes the fist to play BOSPN just before being Deselected. The frame that does this is frame 6, which goes straight to frame 3. Notice, how- ever, that this is the Select frame for the fist, weapon 1. (Notice also that the weapon no longer ever actually punches. Oh well.) {2} The Select code pointer is proven useless with Select.deh. It causes the fist to come up instantly and start bobbing if you're moving upon Select. {3} Weapon 8 and not the Chainsaw is shown to play SAWUP in Sawup.deh. It causes the Chainsaw to be replaced with the fist; nevertheless, it still revs up when you get the Chainsaw or otherwise select it. {4} The Bobbing code pointer is proven useless with Bob.deh. It causes the fist to ignore the bobbing track (stay still) while moving. The Bob- bing track is proven to stay constant in Track.deh. The pistol and super/shotgun are instantly de/selected; if you're moving while selecting different weapons, you'll notice they follow the same track. The Bobbing code pointer is proven to follow the track always with Follow.deh. It causes the chainsaw to flash across the track and the fist to look normal despite its Bobbing frame having a duration of 0; it is linked to another frame that has a duration of 1 but looks like the original bobbing frame. {5} The Chainsaw is silent in Quiet.deh. It still looks perfectly normal, but it no longer makes any noise until it "fires."