Custom Monsters Tutorial for DungeonDoom6XP:

This tutorial contains specific information for adding new monsters with special abilities to DungeonDoom.

**************************************************************************************

Chapter 1: Adding a custom monster:

**************************************************************************************

Monsters can easily be added to the following parts of DungeonDoom:

-the random spawning routines in the Dungeon
-as boss monsters
-as quest monsters
-as special ability "wizards"

Dungeon Monsters:
Randomly spawning monsters are defined in the difficulty.def file:

this file contains the definitions

normal_difficulty
easy_difficulty
hard_difficulty

normal_difficulty is the default setting. If you set a value in the hard or easy difficulty definitions as well, that value will be used to overwrite the setting in the normal definition, if hard or easy difficulty is set, respectively.

If you want to add a monster you will need to increase the value set in mon_div. Then you need to add a monster definition at the end of the list of monster definitions.

a monster definition needs at least these keys:

mon_type: the classname of the monster
mon_min: the minimal dungeonlevel at which this monster can be spawned
mon_max: the maximal dungeonlevel at which this monster will be spawned
mon_prob: the absolute probablility with which this monster will be spawned
mon_exp: the experience reward (exp1 to exp10)
mon_gold: the gold reward (gold1 to gold10)

for all standard monsters the absolute probablity is set to 10. Increase/decrease this number to increase or decrease spawning frequency of this specific type.

Monsters can also use special abilities. These are set by adding keys to the monster:

mon_keys: the number of keys to be set
mon_key1: keys in the format key*val
mon_key2: keys in the format key*val
...

Example for the format key*val: "DDinfl1*monster_shot" sets the key "DDinfl1" to the value "monster_shot".)

Special abilities will be discussed in chapter 2

Example for addition of the custom model 'The Shambler' as a Dungeon Monster definition in vanilla DungeonDoom6XP:

in teh definition normal_difficult within defficulty.def:

change "mon_div" "56" to "mon_div" "57"

after the last monster definition

"mon_type57" "monster_zombie_tough"
"mon_min57" "100"
"mon_max57" "100"
"mon_prob57" "10"
"mon_exp57" "exp5"
"mon_gold57" "gold5"

add the new one:

"mon_type58" "monster_shambler"
"mon_min58" "40"
"mon_max58" "60"
"mon_prob58" "10"
"mon_exp58" "exp6"
"mon_gold58" "gold6"

If you copy the original obihb shambler release (obihb_shambler.pk4) to the DungeonDoom6XP directory, the above modification includes the custom shambler model in DungeonDoom as a randomly spawned Dungeon Monster. The Shambler will be spawned between levels 40 and 60 of the long gameplay variant (for the short gameplay variant that corresponds to between levels 8 and 12) with the same probability than any other monster. If killed it will give a lot of gold and experience.

Boss Monsters:
see the Story Tutorial for basic setup of boss monsters and check out chapter 2 for configuring special abilities.

Quest Monsters:
see the Story Tutorial for basic setup of boss monsters and check out chapter 2 for configuring special abilities.

Special Ability "Wizards":
Wizards are defined in the wizard definition inside the difficulty.def file:

wizards are generated by randomly combining different key values which confer special abilities (wizard_keys) together with a basic shape (wizard_shapes). If you want to add a new monster model to the collection of shapes, just increase the value of wizard_shapes, add a new shape defined by wizard_shape (for example "wizard_shape14" "monster_shambler") and add a level min/max pair defined by wizard_slevel (for example "wizard_slevel14" "3*5", which means that only wizards of the level 3 to 5 can have this shape - the higher the wizard level the more powerful it is and the deeper in the dungeon it lives). Finally add a name definition defined by wizard_nameA (for example "wizard_nameA14" "Shambler Mage")

**************************************************************************************

Chapter 2: Adding special abilities:

**************************************************************************************

In DungeonDoom6XP, all special abilities are set by key/val pairs. These can be set for any of the monster types as detailed above.

For Dungeon Monsters, the number of keys needs to be set using mon_keys. Then the individual keys are set by adding them with mon_key1, on_key2, mon_key3... etc. For boss or minions these keys are written slightly different as boss_keys, boss_key1... or minion_keys etc. The format for setting the keys is key*val for example "DDinfl1*monster_shot" sets the key "DDinfl1" to the value "monster_shot".

For setting special monster abilities the following keys need to be set:

DDinflnum: number of special abilities
DDinfl1: type of special ability 1
DDinfl1ARG1: argument 1 of special ability 1
DDinfl1ARG2: argument 2 of special ability 1
DDinfl1ARG3: argument 3 of special ability 1
...
DDinfl2: type of special ability 2
DDinfl2ARG1: argument 1 of special ability 2
DDinfl2ARG2: argument 2 of special ability 2
...

for Dungeon Monster number 5 this is done by:

"mon_keys5" "5"
"mon_key1_5" "DDinfl1*teleport"
"mon_key2_5" "DDinfl1ARG1*0.75"
"mon_key3_5" "DDinfl1ARG2*10"
"mon_key4_5" "DDinfl1ARG3*1000"
"mon_key5_5" "DDinflnum*1"

These values set the special ability teleport for monster number 5 with certain arguments that define how the teleport
ability works for this specific monster.


**************************************************************************************

Chapter 3: List of special abilities:

**************************************************************************************

.....................................................................
deathflash
.....................................................................

no arguments

Player temporarily blinded when entity dies

.....................................................................
blind
.....................................................................

arguments

ARG1: duration[sec]
ARG2: distance (usually set to 100-500)

Player blinded for ARG1 sec if distance to player is smaller than ARG2

.....................................................................
paralyze
.....................................................................

arguments

ARG1: duration[sec/100]
ARG2: distance (usually set to 100-500)

Player movement impaired for ARG1/100 sec if distance to player is smaller than ARG2

.....................................................................
confuse
.....................................................................

arguments

ARG1: duration[sec/100]
ARG2: distance (usually set to 100-500)

Player movement becomes eratic for ARG1/100 sec if distance to player is smaller than ARG2

.....................................................................
teleport
.....................................................................

arguments

ARG1: fraction (usually set to 0.75)
ARG2: minimal distance (usually set to 10)
ARG3: maximal distance (usually set to 10000)

Monster teleports itself towards the player if it's distance to the player is larger than ARG2 and smaller than ARG3. The distance traveled is the total distance between the monster and player divided by ARG1.

.....................................................................
life_drain
.....................................................................

arguments

ARG1: amount (usually set to 10)
ARG2: distance (usually set to 100-500)

Monster substracts ARG1 experience form the player every second if player is within the distance ARG2.

.....................................................................
mana_drain
.....................................................................

arguments

ARG1: amount (usually set to 10)
ARG2: distance (usually set to 100-500)

Monster substracts ARG1 mana form the player every second if player is within the distance ARG2.

.....................................................................
steal
.....................................................................

arguments

ARG1: amount
ARG2: distance

Monster steals ARG1 gold if distance to player is smaller than ARG2.

.....................................................................
health_drain
.....................................................................

no arguments

The nearer the monster gets to the player the more life the player will loose per 1/2 second.

.....................................................................
explode
.....................................................................

no arguments

Engulf the player in flames if the distance to the monster is below 100.

.....................................................................
heal
.....................................................................

arguments

ARG1: amount (usually set to 50)

The monster heals itself by the amount of ARG1. Inbetween healing, there
is a pause of 2-12 seconds. The monster never heals itself above its
starting health.

.....................................................................
teleporter
.....................................................................

arguments

ARG1: pause[sec] (usually set to 10)
ARG2: minimal distance (usually set to 200)
ARG3: maximal distance (usually set to 3000)

Monster teleports the player near the monster if it's distance to the player is larger than ARG2 and smaller than ARG3. A pause of ARG1 sec will be set between teleports.

.....................................................................
multiply
.....................................................................

arguments

ARG1: number (usually set below 10)
ARG2: class name

Monster spawns ARG1 minions of the class ARG2. If the number of minions falls below ARG1, new minions will be spawned rapidly.

.....................................................................
shield
.....................................................................

arguments

ARG1: duration (usually set to 5)

Monster generates a shield for ARG1*1.2 seconds that blocks any damage. Inbetween shield generation, there is a pause of 1-10 seconds.

.....................................................................
destroylight
.....................................................................

arguments

ARG1: distance (usually set to 200)

Monster destroys your lightsource if the distance between the monster and the player is below ARG1.

.....................................................................
destroyweapon
.....................................................................

arguments

ARG1: distance (usually set to 200)

Monster removes all the ammo of your currently equipped weapon if the distance between the monster and the player is below ARG1.

.....................................................................
monster_shot
.....................................................................

arguments

ARG1: effect (implemented:paralyze_shot,blast_shot,blast2_shot,blind_shot)
ARG2: particle
ARG3: speed (units/10msec) should not be higher than 30
ARG4: frequency [sec]
ARG5: red
ARG6: green
ARG7: blue
ARG8: sound

If monster sees player, it fires a shot displayed by the model ARG2 with a lightsource of the color (ARG5,ARG6,ARG7) and the sound ARG8 attached. The monster will fire a particle every ARG4 seconds and the particle movement speed is defined by ARG3. If a shot hits the player, the script function ARG1 will be called. Several script functions are implemented already.

.....................................................................
monster_shot_seq
.....................................................................

arguments

ARG1: effect (implemented:paralyze_shot,blast_shot,blast2_shot,blind_shot)
ARG2: particle
ARG3: speed (units/10msec) should not be higher than 30
ARG4: frequency [sec]
ARG5: red
ARG6: green
ARG7: blue
ARG8: sound
ARG9: number
ARG10: burst

If monster sees player, it fires a sequence of shots, each displayed by the model ARG2 with a lightsource of the color (ARG5,ARG6,ARG7) and the sound ARG8 attached. The monster will fire a particle blast every ARG4 seconds and the particle movement speed is defined by ARG3. The number of particles in each blast is ARG9 and the temporal pause between each particle is ARG10. If a shot hits the player, the script function ARG1 will be called. Several script functions are implemented already.

.....................................................................
monster_fx
.....................................................................

arguments

ARG1: FX
ARG2: duration

Starts the effect ARG1 on the monster every ARG2 seconds. The duration of the effect and ARG2 should be synchronized.

.....................................................................
light
.....................................................................

arguments

ARG1: red
ARG2: green
ARG3: blue
ARG4: radius

Attaches a lightsource of the color (ARG1,ARG2,ARG3) with the radius ARG4 to the monster.

.....................................................................
darken
.....................................................................

no arguments

Darkens all general lightsources, including the players lightsource when near.

Please let me know if you have any additional questions.

-hellborg

Back to Tutorials Overview...

contact: leif@gravity-music.net