***************************************************************************
	             DungeonDoom 5.0 CUSTOMIZATION GUIDE
	           Leif Dehmelt --- leif@gravity-music.net
***************************************************************************

Topics:

1. Adding/changing monster spawning behavior
2. Modifying weapons/items
3. Changing wall textures
4. General game balancing
5. Spell gaining with experience
6. Hidden rooms, Boss rooms and boss behavior.


***************************************************************************
1. Adding/changing monster spawning behavior:
***************************************************************************

In the file autoexec.cfg, you find a number of cvars, which can be edited 
or extended using a text editor. If you want to add additional enemies, 
increase the cvars "mon_div" by the number of added enemies. Each enemy has 
a number of values specified. Each value ends with the enemy type number, 
which is 1 in the following example:

"mon_type1" - entity name of spawned enemy. Example: "monster_zombie_fat"
"mon_min1" - minimal level at which this enemy spawns (1-100).
"mon_max1" - maximal level at which this enemy spawns (1-100).
"mon_prob1" - probablility modifier (any float value). 
"mon_exp1" - experience given for killing this enemy ("exp1"-"exp10").
"mon_gold1" - amount of gold given for killing this enemy ("gold1"-"gold10").
"mon_infl1" - special behavior. Can be set to: "teleport", "teleporter", 
	     "paralyze", "blind", "mana_drain", "life_drain" or "none"
"mon_arg1_1" 
"mon_arg2_1"
"mon_arg3_1" - parameters to specify how the special behaviors are implemented
	       these have to be set for the behavior to work correctly.

The use of these values is illustrated by the following example:


Example: From level 1 to level 25 you wish to spawn only monster_zombie_fat,
	 between level 25 and 50 you wish to spawn monster_zombie_fat,
	 monster_demon_imp and monster_demon_tick, but you want imps to
         spawn with only half the frequency as compared to ticks and zombies.
	 Between level 51 and 75, you wish to spawn only ticks and imps, 
	 but this time, imps and ticks should spawn with the same 
	 probability.

To do this you can set the following values:

"mon_type1" "monster_zombie_fat"
"mon_min1" "1"
"mon_max1" "50"
"mon_prob1" "10" 
"mon_exp1" "exp1"
"mon_gold1" "gold1"

"mon_type2" "monster_demon_imp"
"mon_min2" "25"
"mon_max2" "75"
"mon_prob2" "5" 
"mon_exp2" "exp2"
"mon_gold2" "gold2"

"mon_type3" "monster_demon_tick"
"mon_min3" "25"
"mon_max3" "75"
"mon_prob3" "10" 
"mon_exp3" "exp1"
"mon_gold3" "gold1"

"mon_type4" "monster_demon_imp"
"mon_min4" "51"
"mon_max4" "75"
"mon_prob4" "5" 
"mon_exp4" "exp2"
"mon_gold4" "gold2"

Note that the imp is set in two different classes to ensure, that it's 
spawning probability is increased between levels 51 and 75. The sum of 
it's probability modifier between levels 51 and 75 is the same as the 
probability modifier of the tick.

Basically, the enemy spawning function checks which enemies are
available at a given level and then calculates the probablility
of spawning a certain type. For example, at level 30, the probability
to spawn enemies are: zombie 10/25 (40%), tick 10/25 (40%), and imp 
5/25 (20%). The number of enemies spawned is not dependent on the number
of different types that can be spawned at a certain level, but is 
instead controlled by the DD_monsters and DD_monstersr console variables 
(see DungeonDoom.txt).

A diagram of the currently set parameters is given in monster-spawning.txt.

It is also very easy to add customized enemies. Just use the custom 
definition entity name in place of "mon_type1".

***************************************************************************
2. Modifying weapons/items:
***************************************************************************

The following cvars can be set:

-Cost aof weapons/spells etc:


"soulcube_cost"
"bfg_cost"

etc.

-Experince and Gold reward for killing enemies:

Ten different amounts of experience can be defined and linked to enemy
types using the "mon_exp" cvars (see above).

"r_exp1"
"r_exp2"
"r_exp3"
"r_exp4" 
"r_exp5"
"r_exp6" 
"r_exp7"
"r_exp8"
"r_exp9"
"r_exp10"

Ten different amounts of gold rewards can be defined and linked to enemy
types using the "mon_gold" cvars (see above). Each reward has a constant and
random modifier:

"r_gold1"
"r_gold1r"
"r_gold2" 
"r_gold2r"
"r_gold3"
"r_gold3r"
"r_gold4"
"r_gold4r"
"r_gold5"
"r_gold5r"
"r_gold6"
"r_gold6r"
"r_gold7"
"r_gold7r"
"r_gold8"
"r_gold8r"
"r_gold9"
"r_gold9r"
"r_gold10"
"r_gold10r"

***************************************************************************
3. Changing wall textures	
***************************************************************************

Texture settings can be adjusted by modifying the DungeonDoom.mtr file
in the DungeonDoom/materials directory. 

The texture "textures/dungeondoom/default" is used for all materials on
walls, floors, columns. Currently, the system can only assign different 
textures to the floor and walls. Columns (which connect each wall segment) 
and exits/entrances can be assigned the default texture, which will be 
constant thorughout levels. The texture receives parm6 and parm7 which 
communicate the current dungeon level depth (parm7) and if the texture 
should be used on the walls (parm6==0) or floor (parm6==1). Thus, for 
setting the floor texture between levels 2-9, for example, the following 
logical expression has to be used:

if (parm6 == 1 && (parm7 > 1 && parm7<10))

For setting the corresponding wall texture use this expression:

if (parm6 == 0 && (parm7 > 1 && parm7<10))

This expression has to be added to each shader parameter which set the
bump-, specular- and diffusemaps (or additional shader functions) for the
texture.

	{
    		if (parm6 == 0 && (parm7 > 1 && parm7<10))
		blend bumpmap		
		map heightmap (textures/base_floor/conc_panel02_h.tga, 4)
        }

	
	{
    		if (parm6 == 0 && (parm7 > 1 && parm7<10))
		blend specularmap		    
		map textures/base_floor/conc_panel02_s.tga
        }

	
	{
    		if (parm6 == 0 && (parm7 > 1 && parm7<10))
		blend diffusemap	    
		map textures/base_floor/conc_panel02_d.tga
    	}

Change the parm7 boundaries to select different levels at which the texture
should be placed. Global parameters cannot be set this way, but most 
functionality can be set using specific parameters. Many of the premade 
textures use the global functions bumpmap [texure], diffusemap [texure] and 
specularmap [texure], which can be reformated to

{
 blend bumpmap	
 map heightmap [texure]
}

etc. and put into separate brackets as shown in the example above.

As far as I know, you can add as many textures as you wish.

***************************************************************************
4. General game balancing	
***************************************************************************

The mod can be made more challenging by altering the 
following console variables:

DD_monsters
DD_monstersr

-sets the number of enemies. DD_monsters is the number of 
 enemies which is always spawned, whereas DD_monstersr is the 
 maximum number of additional enemies spawned randomly. 
 Default is 5 for DD_monsters and 10 for DD_monstersr. The 
 sum of DD_monsters and DD_monstersr should not exceed 29.

DD_goldmulti
DD_expmulti

-sets multipliers on the reward for killing enemies. Setting a lower number makes the game more challenging.

DD_gold
DD_exp

-sets the amount of starting gold/exp

***************************************************************************
5. Spell gaining with experience	
***************************************************************************

Example for benefits of gaining level 2:

adv_lvl2 "2000"         -experience to gain level 2 (2000exp)
spell_lvl2 "thunder"	-spell available at level 2
spellm_lvl2 "30"	-mana needed to cast this spell
maxmana_lvl2 "160"	-maximal mana available for spellcaster at this level.
			 the supernatural can accumulate double the amount of 
			 mana


***************************************************************************
6. Hidden rooms, Boss rooms and boss behavior.	
***************************************************************************

Please contact me (leif@gravity-music.net), if you have questions regarding 
advanced modifications of Dungeondoom, including addition of custom boss rooms.


These console variables are set in the file autoexec.cfg and can be
altered permanently by editing this file.


Have fun modifying and extending DungeonDoom!
