ERACC wrote: > I am looking at the Valriel random map settings (within the map > /scorn/temples/valriel3) in anticipation of reducing the number of > levels, reducing monster density, adding some "new", tougher monsters > called "saints" using existing NPC arches and making the random maps > larger. One question I have but haven't been able to resolve: is > random map monster density determined by /styles/monsterstyles/* or is > it elsewhere? There seems to be no parameter to set monster density. The random map monster generator places monster until at least one of the following conditions is met: - average experience per tile is above limit: (total monster experience) > (exp for difficulty level)*(map area)/1000 For example for a random map with dungeon_level 24, difficulty 0, difficulty_increase 0, and size 25x40 the difficulty is 23 (=dungeon_level-1). You need 10.6 million experience to reach level 23. Therefore the total monster experience is limited to (10.6 million*25*40/1000) = 10.6 million. - 100 failed monster placements (because no free spot could be found) - number of monsters exceeds (map area)/8 For the above example at most 25*40/8=125 monsters would be placed. I wonder why the last condition uses the number of monsters but not the area these monsters occupy. Since multi-tile monsters occupy much space, just a few of them can increase the monster density quite considerably. The attached patch changes this. The reduced monster density is noticeable, but since the resulting maps do not feel sparse to me, I think it is still acceptable. Besides that, it also affects the total experience: current with patch =========== ======= ======= Valriel 542-720 156-288 Undead TC 34-139 34-139 Gorokh 83-237 14-122 Dragon TC 70-258 35-119 Demon TC 43-173 20- 67 Humanoid TC 54-204 17- 58 (all values are million experience) If you really need less monster density I could add another configuration parameter. It could default to 8 and be used instead of the fixed number "8" in the third of the above conditions. -------------- next part -------------- Index: random_maps/monster.c =================================================================== RCS file: /cvsroot/crossfire/crossfire/random_maps/monster.c,v retrieving revision 1.13 diff -c -5 -r1.13 monster.c *** random_maps/monster.c 8 Mar 2003 05:35:32 -0000 1.13 --- random_maps/monster.c 4 Jun 2005 10:14:54 -0000 *************** *** 67,76 **** --- 67,77 ---- char styledirname[256]; mapstruct *style_map=0; int failed_placements; sint64 exp_per_sq, total_experience; int number_monsters=0; + archetype *at; sprintf(styledirname,"%s","/styles/monsterstyles"); style_map = find_style(styledirname,monsterstyle,difficulty); if(style_map == 0) return; *************** *** 94,104 **** copy_object_with_inv(this_monster,new_monster); new_monster->x = x; new_monster->y = y; insert_multisquare_ob_in_map(new_monster,map); total_experience+= this_monster->stats.exp; ! number_monsters++; RP->total_map_hp+=new_monster->stats.hp; /* a global count */ } else { failed_placements++; } --- 95,106 ---- copy_object_with_inv(this_monster,new_monster); new_monster->x = x; new_monster->y = y; insert_multisquare_ob_in_map(new_monster,map); total_experience+= this_monster->stats.exp; ! for(at = new_monster->arch; at != NULL; at = at->more) ! number_monsters++; RP->total_map_hp+=new_monster->stats.hp; /* a global count */ } else { failed_placements++; }