User Tools

Site Tools


howto:create_a_new_monster
You were redirected here from howto:create_a_barrel_monster.

This article describes how to create a new monster in Doomsday.

A mobj in Doomsday is defined with a thing definition and one or more states.

The below will explain how to use these to create a new monster.

Notes: For this HOW TO I'm going to assume you are already familar with creating and using ded files and how to load them in doomsday.

Using existing resources to create a NEW monster

For this HOW TO, I'm going to guide you through the process of creating a new monster for use in your wads. Back in the early days of Doom editing when DeHackED? was first released, one of the earliest DEH? patches was the Barrel Monster. So I thought it would be fitting to recreate this fearsome foe using Doomsday.

Now because we're going to be using existing resources (the barrel sprites and sounds) this process is made very easy. In fact all we need for our new monster is a DED and a WAD (containing at least one start position for our new monster). Once you understand how to create the Barrel Monster it's relatively easy to then go on to create a proper monster, with new sprites, sounds and even modified behaviour.

Also you will need to know how to create a WAD and add THINGS to it. You need to have a WAD editor capable of editing the ID number of a THING, I will be using DoomBuilder but there are many other editors that can do this.

Designing the Barrel Monster

The first thing we need to do is to decide exactly how our new monster should behave. The Barrel Monster is a simple creature so rather than explaining the decision making process, I have outlined the main characteristics of our new monster below:

  • Looks exactly the same as a regular Barrel.
  • If killed the Barrel Monster explodes as normal.
  • Lies in wait for the player. Upon sighting the player it growls and starts chasing the player.
  • When the Barrel Monster gets close enough to the player it explodes as normal.

Ok, lets have a look at that list. We can use the existing sprites and sounds of the Barrel, plus it behaves pretty much like a normal Barrel so I'm going to base the Barrel Monster on the existing Barrel rather than one of the monsters. For the growl I'm going to use the Zombieman's see sound. So it looks like all I need to create my Barrel Monster is a new DED.

Let's get started.

STEP 1: The Header and the Thing definition

First thing we need to do is create our new DED file.

Create a new DED file called BarrelMonster.ded.

Now open BarrelMonster.ded in your favorite text editor (I will be using notepad). I always like to include the Header in my DED files and force of habit makes me put a nice big comment to make the content of the DED instantly obvious. So lets do that next.

Type the following:

   Header { Version = 6 }
   # -----------------------------------------------
   # -               Barrel Monster                -
   # -----------------------------------------------

The first step in defining our Barrel Monster is the Thing definition. This is largely based on the Barrel definition found in /Defs/jDoom/Objects.ded. We will be creating new State definitions for all the states even though it is possible to re-use some of the existing ones.

Note the line that says DoomEd number = 8000, this is the ID of our Barrel Monster we'll use to place it in our level so remember it for latter.

Type the following starting on a new line:

   #------------------------------------------------------------------
   # THING DEFINITION
   Thing {
     ID = "BARRELMONSTER"
     Name = "Barrelmonster"
     DoomEd number = 8000
     Spawn state = "BAR_STND"
     See state = "BAR_RUN"
     Pain state = "NULL"
     Melee state = "BAR_EXP"
     Missile state = "NULL"
     Death state = "BAR_EXP"
     Xdeath state = "BAR_EXP"
     Raise state = "NULL"
     See sound = "posit1"
     Attack sound = "None"
     Pain sound = "None"
     Death sound = "barexp"
     Active sound = "None"
     Reaction time = 8
     Spawn health = 20
     Speed = 12
     Radius = 10
     Height = 42
     Mass = 100
     Flags = solid | shootable | countkill | noblood
   }

STEP 2: The State definitions

The next stage in creating our Barrel Monster is creating the new State definitions. From the above Thing definition you'll see that in total we need at least three new States; BAR_STND , BAR_RUN , BAR_EXP Now because there is a two sprite animation for the barrel we need two states for both BAR_STND and BARRUN. In fact the only differences between the two are the ID of the State, the Action? that is performed and the Next State. Also notice the * character before every State after the first one. This allows me to save time by telling Doomsday to Copy the settings from the pervious state, so that I don't have to repeatedly enter the same values.

Type the following starting on a new line:

   #------------------------------------------------------------------
   # STATE DEFINITIONS
   State {
     ID = "BAR_STND"
     Sprite = "BAR1"
     Frame = 0
     Tics = 6
     Action = "A_Look"
     Next state = "BAR_STND2"
   }
   * State {
     ID = "BAR_STND2"
     Frame = 1
     Action = "A_Look"
     Next state = "BAR_STND"
   }
   * State {
     ID = "BAR_RUN"
     Frame = 0
     Action = "A_Chase"
     Next state = "BAR_RUN2"
   }
   * State {
     ID = "BAR_RUN2"
     Frame = 1
     Action = "A_Chase"
     Next state = "BAR_RUN"
   }

The last state we need to create is BAR_EXP. This animation consists of 5 Sprites so we actually need 5 States for this sequence. It is actually an exact copy of the Barrel's BEXP State sequence, all I've done is change the ID and Next State values.

Notice that this time I have not used the Copy shortcut. This is because some of the states have no Action? assigned to them. If I had then Doomsday would have copied the previous Action? into States it's not supposed to be in.

Type the following starting on a new line:

   State {
     ID = "BAR_EXP"
     Sprite = "BEXP"
     Frame = 32768
     Tics = 5
     Next state = "BAR_EXP2"
   }
   State {
     ID = "BAR_EXP2"
     Sprite = "BEXP"
     Frame = 32769
     Tics = 5
     Action = "A_Scream"
     Next state = "BAR_EXP3"
   }
   State {
     ID = "BAR_EXP3"
     Sprite = "BEXP"
     Frame = 32770
     Tics = 5
     Next state = "BAR_EXP4"
   }
   State {
     ID = "BAR_EXP4"
     Sprite = "BEXP"
     Frame = 32771
     Tics = 10
     Action = "A_Explode"
     Next state = "BAR_EXP5"
   }
   State {
     ID = "BAR_EXP5"
     Sprite = "BEXP"
     Frame = 32772
     Tics = 10
     Next state = "NULL"
   }

Thats it! We now have everything we need for Doomsday to be able to create and understand our new Barrel Monster. However there is still one thing that we need to do, we need to place a few Barrel Monsters in our level.

Save your BarrelMonster.ded

Close your text editor.

STEP 3: Placing the new Barrel Monster in our level

Now we need to place our Barrel Monster in our level. The following details how to use DoomBuilder to accomplish this.

Launch DoomBuilder and Open the wad you want to edit (remembering to select jDoom from the Game selection box).

The problem we now have is that DoomBuilder doesn't know about our Barrel Monster, so we can't just select it from the Edit Thing dialog. What we need to do is to manually edit the Thing ID.

  1. Switch to Thing mode by pressing T on your keyboard.
  2. Right click to place a new Thing where you want our Barrel Monster.
  3. Now Right click again on the new Thing to open the Edit Thing dialog.

At the bottom of the Edit Thing dialog you'll see a box labeled Thing Type. Remember that the DoomEd? number for the Barrel Monster is 8000.

  1. Enter 8000 in the Thing Type entry box.
  2. Click OK.

After that the Edit Thing dialog will disappear and you'll see that the Thing object has changed to the ? character. This is fine, it just means that DoomBuilder doesn't know what Thing 8000 is.

You can now Save your level.

Close DoomBuilder.

Finished!

All you need to do now is load Doomsday with our BarrelMonster.wad and BarrelMonster.ded.

Have fun! DaniJ

howto/create_a_new_monster.txt · Last modified: 2011-02-16 14:20 by 127.0.0.1