Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Adding new monsters

0 views
Skip to first unread message

Cyde Weys

unread,
Aug 19, 2004, 9:10:46 PM8/19/04
to
Here's just a little info dump. I was preparing a text file on
how to make new monsters with all of the definitions in one file, and I
decided I might as well share with you guys. This is sort of meant as a
replacement to http://members.shaw.ca/rob.ellwood/sources.txt , which is
outdated as to the source of the game (by nine years, it's amazing how
much is still the same).

//What the source says
* name, symbol (S_* defines),
* difficulty level, move rate, armor class, magic resistance,
* alignment, creation/geno flags (G_* defines),
* 6 * attack structs ( type , damage-type, # dice, # sides ),
* weight (WT_* defines), nutritional value, extension length,
* sounds made (MS_* defines), physical size (MZ_* defines),
* resistances, resistances conferred (both MR_* defines),
* 3 * flag bitmaps (M1_*, M2_*, and M3_* defines respectively)
* symbol color (C(x) macro)

//My interpretation
MON("name", S_GROUP,
LVL({lvl}, {movement}, {AC}, {magic resist}, {align}), (G_FLAGS|
{freq}),
A(ATTK({attack type}, {damage type}, {# dice}, {# sides}), ATTK
(...), NO_ATTK,
NO_ATTK, NO_ATTK, NO_ATTK),
SIZ({weight}, {nutrition}, {ext. length}, MS_SOUNDS, MZ_SIZE),
MR_RESISTS, {MR_RESISTS conferred},
M1_TYPES|{more M1_TYPES},
M2_TYPES|{more M2_TYPES}, M3_TYPES, {color}),
another MON


//Definitions
#define S_ANT 1
#define S_BLOB 2
#define S_COCKATRICE 3
#define S_DOG 4
#define S_EYE 5
#define S_FELINE 6
#define S_GREMLIN 7
#define S_HUMANOID 8
#define S_IMP 9
#define S_JELLY 10
#define S_KOBOLD 11
#define S_LEPRECHAUN 12
#define S_MIMIC 13
#define S_NYMPH 14
#define S_ORC 15
#define S_PIERCER 16
#define S_QUADRUPED 17
#define S_RODENT 18
#define S_SPIDER 19
#define S_TRAPPER 20
#define S_UNICORN 21
#define S_VORTEX 22
#define S_WORM 23
#define S_XAN 24
#define S_LIGHT 25
#define S_ZRUTY 26
#define S_ANGEL 27
#define S_BAT 28
#define S_CENTAUR 29
#define S_DRAGON 30
#define S_ELEMENTAL 31
#define S_FUNGUS 32
#define S_GNOME 33
#define S_GIANT 34
#define S_JABBERWOCK 36
#define S_KOP 37
#define S_LICH 38
#define S_MUMMY 39
#define S_NAGA 40
#define S_OGRE 41
#define S_PUDDING 42
#define S_QUANTMECH 43
#define S_RUSTMONST 44
#define S_SNAKE 45
#define S_TROLL 46
#define S_UMBER 47
#define S_VAMPIRE 48
#define S_WRAITH 49
#define S_XORN 50
#define S_YETI 51
#define S_ZOMBIE 52
#define S_HUMAN 53
#define S_GHOST 54
#define S_GOLEM 55
#define S_DEMON 56
#define S_EEL 57
#define S_LIZARD 58
#define S_WORM_TAIL 59
#define S_MIMIC_DEF 60

#define G_UNIQ 0x1000 /* generated only once */
#define G_NOHELL 0x0800 /* not generated in "hell" */
#define G_HELL 0x0400 /* generated only in "hell" */
#define G_NOGEN 0x0200 /* generated only specially */
#define G_SGROUP 0x0080 /* appear in small groups
normally */
#define G_LGROUP 0x0040 /* appear in large groups
normally */
#define G_GENO 0x0020 /* can be genocided */
#define G_NOCORPSE 0x0010 /* no corpse left ever */
#define G_FREQ 0x0007 /* creation frequency mask */

#define AT_ANY (-1) /* fake attack; dmgtype_fromattack
wildcard */
#define AT_NONE 0 /* passive monster (ex. acid blob) */
#define AT_CLAW 1 /* claw (punch, hit, etc.) */
#define AT_BITE 2 /* bite */
#define AT_KICK 3 /* kick */
#define AT_BUTT 4 /* head butt (ex. a unicorn) */
#define AT_TUCH 5 /* touches */
#define AT_STNG 6 /* sting */
#define AT_HUGS 7 /* crushing bearhug */
#define AT_SPIT 10 /* spits substance - ranged */
#define AT_ENGL 11 /* engulf (swallow or by a cloud) */
#define AT_BREA 12 /* breath - ranged */
#define AT_EXPL 13 /* explodes - proximity */
#define AT_BOOM 14 /* explodes when killed */
#define AT_GAZE 15 /* gaze - ranged */
#define AT_TENT 16 /* tentacles */
#define AT_WEAP 254 /* uses weapon */
#define AT_MAGC 255 /* uses magic spell(s) */

#define AD_ANY (-1) /* fake damage; attacktype_fordmg
wildcard */
#define AD_PHYS 0 /* ordinary physical */
#define AD_MAGM 1 /* magic missiles */
#define AD_FIRE 2 /* fire damage */
#define AD_COLD 3 /* frost damage */
#define AD_SLEE 4 /* sleep ray */
#define AD_DISN 5 /* disintegration (death ray) */
#define AD_ELEC 6 /* shock damage */
#define AD_DRST 7 /* drains str (poison) */
#define AD_ACID 8 /* acid damage */
#define AD_SPC1 9 /* for extension of buzz() */
#define AD_SPC2 10 /* for extension of buzz() */
#define AD_BLND 11 /* blinds (yellow light) */
#define AD_STUN 12 /* stuns */
#define AD_SLOW 13 /* slows */
#define AD_PLYS 14 /* paralyses */
#define AD_DRLI 15 /* drains life levels (Vampire) */
#define AD_DREN 16 /* drains magic energy */
#define AD_LEGS 17 /* damages legs (xan) */
#define AD_STON 18 /* petrifies (Medusa, cockatrice) */
#define AD_STCK 19 /* sticks to you (mimic) */
#define AD_SGLD 20 /* steals gold (leppie) */
#define AD_SITM 21 /* steals item (nymphs) */
#define AD_SEDU 22 /* seduces & steals multiple items */
#define AD_TLPT 23 /* teleports you (Quantum Mech.) */
#define AD_RUST 24 /* rusts armour (Rust Monster)*/
#define AD_CONF 25 /* confuses (Umber Hulk) */
#define AD_DGST 26 /* digests opponent (trapper, etc.) */
#define AD_HEAL 27 /* heals opponent's wounds (nurse) */
#define AD_WRAP 28 /* special "stick" for eels */
#define AD_WERE 29 /* confers lycanthropy */
#define AD_DRDX 30 /* drains dexterity (quasit) */
#define AD_DRCO 31 /* drains constitution */
#define AD_DRIN 32 /* drains intelligence (mind flayer) */
#define AD_DISE 33 /* confers diseases */
#define AD_DCAY 34 /* decays organics (brown Pudding) */
#define AD_SSEX 35 /* Succubus seduction (extended) */
/* If no SEDUCE then same as AD_SEDU */
#define AD_HALU 36 /* causes hallucination */
#define AD_DETH 37 /* for Death only */
#define AD_PEST 38 /* for Pestilence only */
#define AD_FAMN 39 /* for Famine only */
#define AD_SLIM 40 /* turns you into green slime */
#define AD_ENCH 41 /* remove enchantment (disenchanter) */
#define AD_CORR 42 /* corrode armor (black pudding) */
#define AD_CLRC 240 /* random clerical spell */
#define AD_SPEL 241 /* random magic spell */
#define AD_RBRE 242 /* random breath weapon */
#define AD_SAMU 252 /* hits, may steal Amulet (Wizard) */
#define AD_CURS 253 /* random curse (ex. gremlin) */

#define MS_SILENT 0 /* makes no sound */
#define MS_BARK 1 /* if full moon, may howl */
#define MS_MEW 2 /* mews or hisses */
#define MS_ROAR 3 /* roars */
#define MS_GROWL 4 /* growls */
#define MS_SQEEK 5 /* squeaks, as a rodent */
#define MS_SQAWK 6 /* squawks, as a bird */
#define MS_HISS 7 /* hisses */
#define MS_BUZZ 8 /* buzzes (killer bee) */
#define MS_GRUNT 9 /* grunts (or speaks own language) */
#define MS_NEIGH 10 /* neighs, as an equine */
#define MS_WAIL 11 /* wails, as a tortured soul */
#define MS_GURGLE 12 /* gurgles, as liquid or through saliva
*/
#define MS_BURBLE 13 /* burbles (jabberwock) */
#define MS_ANIMAL 13 /* up to here are animal noises */
#define MS_SHRIEK 15 /* wakes up others */
#define MS_BONES 16 /* rattles bones (skeleton) */
#define MS_LAUGH 17 /* grins, smiles, giggles, and laughs */
#define MS_MUMBLE 18 /* says something or other */
#define MS_IMITATE 19 /* imitates others (leocrotta) */
#define MS_ORC MS_GRUNT /* intelligent brutes */
#define MS_HUMANOID 20 /* generic traveling companion */
#ifdef KOPS
#define MS_ARREST 21 /* "Stop in the name of the law!" (Kops)
*/
#endif
#define MS_SOLDIER 22 /* army and watchmen expressions */
#define MS_GUARD 23 /* "Please drop that gold and follow
me." */
#define MS_DJINNI 24 /* "Thank you for freeing me!" */
#define MS_NURSE 25 /* "Take off your shirt, please." */
#define MS_SEDUCE 26 /* "Hello, sailor." (Nymphs) */
#define MS_VAMPIRE 27 /* vampiric seduction, Vlad's
exclamations */
#define MS_BRIBE 28 /* asks for money, or berates you */
#define MS_CUSS 29 /* berates (demons) or intimidates (Wiz)
*/
#define MS_RIDER 30 /* astral level special monsters */
#define MS_LEADER 31 /* your class leader */
#define MS_NEMESIS 32 /* your nemesis */
#define MS_GUARDIAN 33 /* your leader's guards */
#define MS_SELL 34 /* demand payment, complain about
shoplifters */
#define MS_ORACLE 35 /* do a consultation */
#define MS_PRIEST 36 /* ask for contribution; do cleansing */
#define MS_SPELL 37 /* spellcaster not matching any of the
above */
#define MS_WERE 38 /* lycanthrope in human form */
#define MS_BOAST 39 /* giants */

#define MZ_TINY 0 /* < 2' */
#define MZ_SMALL 1 /* 2-4' */
#define MZ_MEDIUM 2 /* 4-7' */
#define MZ_HUMAN MZ_MEDIUM /* human-sized */
#define MZ_LARGE 3 /* 7-12' */
#define MZ_HUGE 4 /* 12-25' */
#define MZ_GIGANTIC 7 /* off the scale */

#define MR_FIRE 0x01 /* resists fire */
#define MR_COLD 0x02 /* resists cold */
#define MR_SLEEP 0x04 /* resists sleep */
#define MR_DISINT 0x08 /* resists disintegration */
#define MR_ELEC 0x10 /* resists electricity */
#define MR_POISON 0x20 /* resists poison */
#define MR_ACID 0x40 /* resists acid */
#define MR_STONE 0x80 /* resists petrification */

#define MR2_SEE_INVIS 0x0100 /* see invisible */
#define MR2_LEVITATE 0x0200 /* levitation */
#define MR2_WATERWALK 0x0400 /* water walking */
#define MR2_MAGBREATH 0x0800 /* magical breathing */
#define MR2_DISPLACED 0x1000 /* displaced */
#define MR2_STRENGTH 0x2000 /* gauntlets of power */
#define MR2_FUMBLING 0x4000 /* clumsy */

#define M1_FLY 0x00000001L /* can fly or float */
#define M1_SWIM 0x00000002L /* can traverse water */
#define M1_AMORPHOUS 0x00000004L /* can flow under doors */
#define M1_WALLWALK 0x00000008L /* can phase thru rock */
#define M1_CLING 0x00000010L /* can cling to ceiling */
#define M1_TUNNEL 0x00000020L /* can tunnel thru rock */
#define M1_NEEDPICK 0x00000040L /* needs pick to tunnel */
#define M1_CONCEAL 0x00000080L /* hides under objects */
#define M1_HIDE 0x00000100L /* mimics, blends in with
ceiling */
#define M1_AMPHIBIOUS 0x00000200L /* can survive underwater */
#define M1_BREATHLESS 0x00000400L /* doesn't need to breathe */
#define M1_NOTAKE 0x00000800L /* cannot pick up objects */
#define M1_NOEYES 0x00001000L /* no eyes to gaze into or blind
*/
#define M1_NOHANDS 0x00002000L /* no hands to handle things */
#define M1_NOLIMBS 0x00006000L /* no arms/legs to kick/wear on
*/
#define M1_NOHEAD 0x00008000L /* no head to behead */
#define M1_MINDLESS 0x00010000L /* has no mind--golem, zombie,
mold */
#define M1_HUMANOID 0x00020000L /* has humanoid head/arms/torso
*/
#define M1_ANIMAL 0x00040000L /* has animal body */
#define M1_SLITHY 0x00080000L /* has serpent body */
#define M1_UNSOLID 0x00100000L /* has no solid or liquid body
*/
#define M1_THICK_HIDE 0x00200000L /* has thick hide or scales */
#define M1_OVIPAROUS 0x00400000L /* can lay eggs */
#define M1_REGEN 0x00800000L /* regenerates hit points */
#define M1_SEE_INVIS 0x01000000L /* can see invisible creatures
*/
#define M1_TPORT 0x02000000L /* can teleport */
#define M1_TPORT_CNTRL 0x04000000L /* controls where it teleports
to */
#define M1_ACID 0x08000000L /* acidic to eat */
#define M1_POIS 0x10000000L /* poisonous to eat */
#define M1_CARNIVORE 0x20000000L /* eats corpses */
#define M1_HERBIVORE 0x40000000L /* eats fruits */
#define M1_OMNIVORE 0x60000000L /* eats both */
#ifdef NHSTDC
#define M1_METALLIVORE 0x80000000UL /* eats metal */
#else
#define M1_METALLIVORE 0x80000000L /* eats metal */
#endif

#define M2_NOPOLY 0x00000001L /* players mayn't poly into one
*/
#define M2_UNDEAD 0x00000002L /* is walking dead */
#define M2_WERE 0x00000004L /* is a lycanthrope */
#define M2_HUMAN 0x00000008L /* is a human */
#define M2_ELF 0x00000010L /* is an elf */
#define M2_DWARF 0x00000020L /* is a dwarf */
#define M2_GNOME 0x00000040L /* is a gnome */
#define M2_ORC 0x00000080L /* is an orc */
#define M2_DEMON 0x00000100L /* is a demon */
#define M2_MERC 0x00000200L /* is a guard or soldier */
#define M2_LORD 0x00000400L /* is a lord to its kind */
#define M2_PRINCE 0x00000800L /* is an overlord to its kind */
#define M2_MINION 0x00001000L /* is a minion of a deity */
#define M2_GIANT 0x00002000L /* is a giant */
#define M2_MALE 0x00010000L /* always male */
#define M2_FEMALE 0x00020000L /* always female */
#define M2_NEUTER 0x00040000L /* neither male nor female */
#define M2_PNAME 0x00080000L /* monster name is a proper name
*/
#define M2_HOSTILE 0x00100000L /* always starts hostile */
#define M2_PEACEFUL 0x00200000L /* always starts peaceful */
#define M2_DOMESTIC 0x00400000L /* can be tamed by feeding */
#define M2_WANDER 0x00800000L /* wanders randomly */
#define M2_STALK 0x01000000L /* follows you to other levels
*/
#define M2_NASTY 0x02000000L /* extra-nasty monster (more xp)
*/
#define M2_STRONG 0x04000000L /* strong (or big) monster */
#define M2_ROCKTHROW 0x08000000L /* throws boulders */
#define M2_GREEDY 0x10000000L /* likes gold */
#define M2_JEWELS 0x20000000L /* likes gems */
#define M2_COLLECT 0x40000000L /* picks up weapons and food */
#ifdef NHSTDC
#define M2_MAGIC 0x80000000UL /* picks up magic items */
#else
#define M2_MAGIC 0x80000000L /* picks up magic items */
#endif

#define M3_WANTSAMUL 0x0001 /* would like to steal the
amulet */
#define M3_WANTSBELL 0x0002 /* wants the bell */
#define M3_WANTSBOOK 0x0004 /* wants the book */
#define M3_WANTSCAND 0x0008 /* wants the candelabrum */
#define M3_WANTSARTI 0x0010 /* wants the quest artifact */
#define M3_WANTSALL 0x001f /* wants any major artifact */
#define M3_WAITFORU 0x0040 /* waits to see you or get
attacked */
#define M3_CLOSE 0x0080 /* lets you close unless
attacked */

#define M3_COVETOUS 0x001f /* wants something */
#define M3_WAITMASK 0x00c0 /* waiting... */

#define CLR_BLACK 0
#define CLR_RED 1
#define CLR_GREEN 2
#define CLR_BROWN 3 /* on IBM, low-intensity yellow is
brown */
#define CLR_BLUE 4
#define CLR_MAGENTA 5
#define CLR_CYAN 6
#define CLR_GRAY 7 /* low-intensity white */
#define NO_COLOR 8
#define CLR_ORANGE 9
#define CLR_BRIGHT_GREEN 10
#define CLR_YELLOW 11
#define CLR_BRIGHT_BLUE 12
#define CLR_BRIGHT_MAGENTA 13
#define CLR_BRIGHT_CYAN 14
#define CLR_WHITE 15
#define CLR_MAX 16

/* The "half-way" point for tty based color systems. This is used in */
/* the tty color setup code. (IMHO, it should be removed - dean). */
#define BRIGHT 8

/* these can be configured */
#define HI_OBJ CLR_MAGENTA
#define HI_METAL CLR_CYAN
#define HI_COPPER CLR_YELLOW
#define HI_SILVER CLR_GRAY
#define HI_GOLD CLR_YELLOW
#define HI_LEATHER CLR_BROWN
#define HI_CLOTH CLR_BROWN
#define HI_ORGANIC CLR_BROWN
#define HI_WOOD CLR_BROWN
#define HI_PAPER CLR_WHITE
#define HI_GLASS CLR_BRIGHT_CYAN
#define HI_MINERAL CLR_GRAY
#define DRAGON_SILVER CLR_BRIGHT_CYAN
#define HI_ZAP CLR_BRIGHT_BLUE


MON("giant ant", S_ANT,
LVL(2, 18, 3, 0, 0), (G_GENO|G_SGROUP|3),
A(ATTK(AT_BITE, AD_PHYS, 1, 4),
NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK),
SIZ(10, 10, 0, MS_SILENT, MZ_TINY), 0, 0,
M1_ANIMAL|M1_NOHANDS|M1_OVIPAROUS|M1_CARNIVORE,
M2_HOSTILE, 0, CLR_BROWN),


--
~ Cyde Weys ~
Bite my shiny metal ass.

Haakon Studebaker

unread,
Aug 19, 2004, 9:28:11 PM8/19/04
to
Cyde Weys <vze2...@verizon.net> wrote in
news:Xns954AD77505EA42g...@199.45.49.11:

> Here's just a little info dump.

A little? Heh.

That's definitely something nice to read considering my pipe dreams of
introducing some new beasts to Nethack who may never hit vanilla.

Cyde Weys

unread,
Aug 19, 2004, 9:35:29 PM8/19/04
to
Haakon Studebaker <hept...@yahoo.com> wrote in
news:Xns954AC60EB3EBC...@216.168.3.44:

It's not really that hard, now that I've looked into it. Heck, it wouldn't
be that hard to write some sort of a web script where it prompts you for
monster parameters (through drop-down selections), and then outputs a
properly formatted monster struct that you could drop directly into the
code.

Christopher

unread,
Aug 20, 2004, 1:54:22 AM8/20/04
to
Cyde Weys <vze2...@verizon.net> wrote in message news:<Xns954AD77505EA42g...@199.45.49.11>...

> Here's just a little info dump. I was preparing a text file on
> how to make new monsters with all of the definitions in one file, and I
> decided I might as well share with you guys. This is sort of meant as a
> replacement to http://members.shaw.ca/rob.ellwood/sources.txt , which is
> outdated as to the source of the game (by nine years, it's amazing how
> much is still the same).
>
>
<SUPERsnip>

Nice. Permision to use for webzine article?

Cyde Weys

unread,
Aug 20, 2004, 2:18:38 AM8/20/04
to
l07a...@allsaints.wa.edu.au (Christopher) wrote in
news:befbd26b.04081...@posting.google.com:

Well, seeing as how I am on the staff ... *g*

If it's going to be used as an article, give me some time to make it nice.
That was just sort of an info dump. I can make it a lot better.

We're doing HTML, right?

0 new messages