Creating a monster: Difference between revisions
From Eternity Wiki
Jump to navigationJump to search
Altazimuth (talk | contribs) (Started off the article. Need to comment frame definitions and add the next monster.) |
Altazimuth (talk | contribs) m (Fixed code not being in one big block.) |
||
Line 15: | Line 15: | ||
{ | { | ||
doomednum 30001 // This is the thing number used to place the object in a map. | doomednum 30001 // This is the thing number used to place the object in a map. | ||
basictype Monster // This uses a predefined set of flags for this object. basictype Monster is equivalent | basictype Monster // This uses a predefined set of flags for this object. basictype Monster is equivalent | ||
// to setting cflags as SOLID | SHOOTABLE | COUNTKILL | FOOTCLIP | SPACMONSTER | PASSMOBJ. | // to setting cflags as SOLID | SHOOTABLE | COUNTKILL | FOOTCLIP | SPACMONSTER | PASSMOBJ. | ||
spawnhealth 30 // The amount of health the monster spawns with. | spawnhealth 30 // The amount of health the monster spawns with. | ||
painchance 128 // The likelihood that the monster goes to a pain state if it is hit. | painchance 128 // The likelihood that the monster goes to a pain state if it is hit. | ||
// Percentage chance is (painchance/256)*100, so for this monster it would be 50%. | // Percentage chance is (painchance/256)*100, so for this monster it would be 50%. | ||
speed 8 // | speed 8 // | ||
radius 20.0 // The radius and height set the physical size | radius 20.0 // The radius and height set the physical size | ||
height 56.0 // of the object, for collision detection. | height 56.0 // of the object, for collision detection. | ||
droptype AmmoClip // The thingtype dropped by the monster when it dies. | droptype AmmoClip // The thingtype dropped by the monster when it dies. | ||
seesound sawup // The sounds made when the monster sees, attacks, is put in pain state, dies, | seesound sawup // The sounds made when the monster sees, attacks, is put in pain state, dies, | ||
attacksound sawhit // and makes ambient noise respectively. These particular sounds are defined by sounds.edf | attacksound sawhit // and makes ambient noise respectively. These particular sounds are defined by sounds.edf | ||
Line 35: | Line 35: | ||
deathsound sawidl | deathsound sawidl | ||
activesound sawhit | activesound sawhit | ||
obituary_normal "was turned to goo by a mutated zombie" // The message displayed when the player is killed by this | obituary_normal "was turned to goo by a mutated zombie" // The message displayed when the player is killed by this | ||
// monster, using a a projectile or other miscellaneous attack. | // monster, using a a projectile or other miscellaneous attack. | ||
acs_spawndata // The identification number used by various parameterised specials, like Thing_Spawn. | acs_spawndata // The identification number used by various parameterised specials, like Thing_Spawn. | ||
{ // it also limits the number to a game namespace. Heretic objects use "modes heretic" | { // it also limits the number to a game namespace. Heretic objects use "modes heretic" | ||
Line 44: | Line 44: | ||
modes doom | modes doom | ||
} | } | ||
firstdecoratestate S_POSS_STND | firstdecoratestate S_POSS_STND | ||
states | states |
Revision as of 07:29, 22 June 2016
Though not quite as easy as creating a simple decoration, creating a monster is still a relatively basic task. In this tutorial we will define two monsters: one which only uses IWAD assets, and one that uses brand new sprites. We will also start using includes in order to keep both these monsters in separate EDF lumps.
Much like creating a simple decoration, we will start by creating a text lump named EDFROOT, but for this tutorial we will also make another two text lumps called EZOMBIE and EARACORB. We will include these lumps in EDFROOT so that the monsters defined in the files can be used.
stdinclude("root.edf") // Includes the file base/root.edf, which in turns includes the other files // that are required for definition of all sprites, sounds, things etc. // New monsters: lumpinclude("EZOMBIE") // A new monster using already defined assets lumpinclude("EARACORB") // A new monster using brand new sprites
Now we will start editing EZOMBIE to define on of our new monsters. For this tutorial we will start using DECORATE state syntax.
thingtype MutatedZombie { doomednum 30001 // This is the thing number used to place the object in a map. basictype Monster // This uses a predefined set of flags for this object. basictype Monster is equivalent // to setting cflags as SOLID | SHOOTABLE | COUNTKILL | FOOTCLIP | SPACMONSTER | PASSMOBJ. spawnhealth 30 // The amount of health the monster spawns with. painchance 128 // The likelihood that the monster goes to a pain state if it is hit. // Percentage chance is (painchance/256)*100, so for this monster it would be 50%. speed 8 // radius 20.0 // The radius and height set the physical size height 56.0 // of the object, for collision detection. droptype AmmoClip // The thingtype dropped by the monster when it dies. seesound sawup // The sounds made when the monster sees, attacks, is put in pain state, dies, attacksound sawhit // and makes ambient noise respectively. These particular sounds are defined by sounds.edf painsound sawful // and are the DeHackEd names for the chainsaw noises. deathsound sawidl activesound sawhit obituary_normal "was turned to goo by a mutated zombie" // The message displayed when the player is killed by this // monster, using a a projectile or other miscellaneous attack. acs_spawndata // The identification number used by various parameterised specials, like Thing_Spawn. { // it also limits the number to a game namespace. Heretic objects use "modes heretic" num 255 // instead of "modes doom". modes doom } firstdecoratestate S_POSS_STND states @" Spawn: POSS AB 10 A_Look loop See: POSS AABBCCDD 4 A_Chase loop Missile: POSS E 10 A_FaceTarget POSS F 8 A_MissileAttack(MBFBetaPlasma1) POSS E 8 goto See Pain: POSS G 3 POSS G 3 A_Pain goto See Death: POSS H 5 POSS I 5 A_Scream POSS J 5 A_Fall POSS K 5 POSS L -1 stop XDeath: POSS M 5 POSS N 5 A_XScream POSS O 5 A_Fall POSS PQRST 5 POSS U -1 stop Raise: POSS KJIH 5 goto See "@ }