This is a weapon making tutorial by Fanatic that describes how he made an uzi with DDF. Slightly modified by Ziggy Gnarly to include instructions on creating a weapon icon and pickup message.
There's a lot involved in implementing one item, if you are doing a completely new weapon. I'll assume you know how to make sounds, pretty weapon pictures and how to use Wintex and make a WAD file.
Here's what it took to implement the Uzi for DOOM Anomaly.
1) Create the new sounds for it:
-weapon up sound called UZI12) Import and name them to a new WAD using Wintex called:
-weapon firing sound called UZI2
-DSUZI1All digital sounds MUST be called DS[name]. You can have 6 character names total. Like DSSPINDN for example.
-DSUZI2
3) We need to define the sounds, so open EDGE's existing SOUNDS.DDF, PAGE DOWN to the bottom to add new stuff:
Anything following // is a comment, ex: // THIS IS A COMMENT. DDF doesn't pay attention to upper or lower case, but I use upper cause it looks better.
Add the following:
[UZI1] // UZI SELECT SOUND LUMP_NAME="DSUZI1"; // THIS IS THE LUMP NAME OF THE SOUND PRIORITY=90; // LOW PRIORITY, GETS CUT OFF BY HIGHER PRIORITY SOUNDS
[UZI2] // UZI FIRING SOUND
|
4) We now need to define the attack for the weapon, so open EDGE's existing ATTACKS.DDF, PAGE DOWN to the bottom to add new stuff.
Add the following:
[PLAYER_UZI] // NAME OF THE ATTACK -SHOULD BE UNIQUE ATTACKTYPE=SHOT; // TYPE OF ATTACK SHOTCOUNT=1; // NUMBER OF ITEMS SHOT DAMAGE.VAL=3; // DAMAGE AMOUNT DAMAGE.MAX=15; // DAMAGE AMOUNT ATTACK_HEIGHT=32; // 32 IS ABOUT CHEST HIGH ACCURACY_ANGLE=3.0; // LOW BULLET SPREAD ACCURACY_SLOPE=1.5; ATTACKRANGE=1024; // PLAYER PROJECTILE ATTACKS SHOULD ALWAYS BE 1024, CHAINSAW IS 63.9, FOR EXAMPLE ENGAGED_SOUND=UZI2; // SOUND TO PLAY WHEN THIS ATTACK IS ACTIVE  
|
5) We now need to create our weapon sprites, and a null one, plus the weapon icon:
-the gun idle called UZIGAll sprites HAVE to be 4 letters as the description, and the last two characters are the frame letter, A, B, C, etc., to define the sequence, and 1 thru 8 for the direction. See the Wintex documentation for more info on this.
-the gun firing called UZIF
-the blank one called NULL (this is a pic that is ONE pixel of cyan)
-the gun icon called UZIC
Weapon sprites will always be 0 (zero) for "all views" (like a dead monster, or an item you pick up, same from all directions and spins to face you when you walk around it).
6) We now need to import them into our WAD file that we already have our sounds in, name them as such:
-UZIGA07) We now need to code the weapon, this is the good part, open EDGE's existing WEAPONS.DDF, PAGE DOWN to the bottom to add new stuff.
-UZIFA0
-NULLA0
-UZICA0
Add the following (no word wrap either):
[UZI] // WEAPON NAME AMMOTYPE=BULLETS; // TYPE OF AMMO AMMOPERSHOT=1; // AMMO PER SHOT, SHOTGUN USES A LOT MORE, ROCKET LAUNCHER USES 1, ETC. AUTOMATIC=TRUE; // LOOPS AUTOMATICALLY BINDKEY=8; // KEY TO SELECT THIS WEAPON PRIORITY=-1; // WHEN YOU RUN OUT OF AMMO, IT SELECTS WHATEVER IS NEXT IN PRIORITY LIST ATTACK=PLAYER_UZI; // ATTACK TYPE DEFINED IN ATTACKS.DDF START_SOUND=UZI1; // THIS IS THE SOUND PLAYED WHEN THE WEAPON IS SELECTED, DOOM ONLY USES THIS FOR THE CHAINSAW, BUT WE CAN USE IT HERE STATES(UP)=UZIG:A:1:NORMAL:RAISE; // WEAPON SELECTED FRAME STATES(DOWN)=UZIG:A:1:NORMAL:LOWER; // WEAPON DESELECT FRAME STATES(READY)=UZIG:A:1:NORMAL:READY; // BOBBING OR IDLE FRAME
STATES(ATTACK)=UZIF:A:1:BRIGHT:SHOOT, // FIRING FRAME
STATES(FLASH)=NULL:A:1:BRIGHT:LIGHT1, // LOW LIGHT FLASH
// I USED THE NULL IN FLASHSTATE CAUSE I ALREADY SET THE FIRING FRAMES
|
Now, the frames work as such:
[state]=[4 letter sprite name]:[frame letter]:[duration of the frame]:[light level -NORMAL or BRIGHT]:[action];
Remember to close the lines with a semi-colon ";". Commas indicate to continue the loop.
The #REMOVE statement tells the frame to dissapear. Otherwise the sprite will remain on the screen. Use this for one time sprites, e.g an explosion's last frame.
This is enough to get the gun up and running - but to put the gun into a TC or mod, you'll need to make:
a) an icon for the new weapon
b) a pickup message for the weapon
8) We are now going to add a weapon icon. So open THINGS.DDF, and PAGE DOWN to the bottom to add new stuff.
Add the following (no word wrap either):
[UZI:200] // IDENTIFIES THE WEAPON ICON + NUMBER USED BY MAP EDITORS BENEFIT_TYPE=BULLETS(40), // AMOUNT OF BULLETS THE GUN COMES WITH BULLETS.LIMIT(400); // LIMIT THAT THE GUN CAN HOLD RADIUS=20; HEIGHT=16; PICKUP_MESSAGE=GotUzi; // CALLS A STRING STORED IN LANGUAGE.LDF PICKUP_SOUND=WPNUP; // STANDARD DOOM SFX FOR WHEN YOU GET THE UZI SPECIAL=SPECIAL; RESPAWN_EFFECT=ITEM_RESPAWN; STATES(IDLE)=UZIC:A:-1:NORMAL:NOTHING; // ONE ROTATION
|
We now need to create a text string to play when you pick up the weapon. If we don't do this, we'll run into problems.
9) We'll add our pickup message to the weapon. Open LANGUAGE.LDF, and begin a text search.
You should search (or scroll down) until you find the text "GotShotgun". This marks the end of the normal doom weapon pickup messages. You'll need to insert a new entry called GotUzi (see above)
Add the following:
GotUzi="You got the Uzi 9mm";
At this point, you've done almost everything necessary to get your gun working. You can access it by using the IDFA cheat code, or by placing the uzi into a map (most good map editors have a specific method of adding new or custom items - so read the documentation that came with the map editor for more info). You could also make enemies drop the uzi when killed by assigning DROPITEM=UZI; to a creature in THINGS.DDF.
But before you charge off to use your new weapon, you'll have to use Wintex or DeuSF to append all sprites to your WAD file with the sounds and sprites, then run EDGE as such:
edge -file [wadname].wad
That's it!
I keep my DDF file I'm editing in another directory for Anomaly, and refer to the originals in my DOOM2 directory when editing.
If you do this, you'll need to run it as such:
edge -ddf [directory where you store your DDF files] -file [wadname].wad
back to top
DDF docs written by Andy Baker and Ziggy Gnarly, with updates by Andrew Apted, Andy Brewood and Luke Brennan.
Site design by Fanatic (with graphics and modifications by Ziggy Gnarly). Problems with the docs, errors and comments should be directed to the EDGE team.
© EDGE Team 1998 - 2021.