IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Monster spawning formula?
Mordion
post Sep 27 2018, 03:34 AM
Post #1


Drifter
**

Group: Members Plus
Posts: 32
Joined: 30-September 07
Member No.: 3,924
referrer:google



Does anyone know how monsters are spawned? I assume that, like item drops, a list of candidates are generated and then the odds are monster chance/sum of all candidate chances. But how is that list generated? Is it the set of all monsters from the current floor with a type that matches the areas spawn flags? I know sometimes easier monsters show up. Are all monsters from the previous floor candidates too? How are their chance scores modified, if at all? How are the odds modified by laired monsters?
Go to the top of the page
 
+Quote Post
Nudibranch
post Sep 28 2018, 03:34 AM
Post #2


Fire Master
*********

Group: Mordor MP Prog
Posts: 1,553
Joined: 19-November 04
Member No.: 71
referrer:search



An examination of the source reveals the following. I might have misread some of it, it's very tangled. I didn't look into how the "companions" of the lead monster are generated, though Wabbit's editor gives a general idea (num group, in group, comp type, companions).

- If there's a laired monster, there's a 75% chance of it showing up.
- If it's a stud room, the maximum level of the lead monster in that room is the current level+1 (as advertised!). There's a 2/3 chance that its minimum level is the current level. Otherwise, the min level is the same as for a normal room (see next step).
- If it's a normal room, the minimum level is about 80% of the current level (not sure how it's rounded off), with a 20% chance of it being an additional -1 level, a 20% chance of it being -2 levels, and a 10% chance of -3 levels. (This would suggest that the lowest possible level of a lead monster on level 15 will be 9, and you might still meet level 1 groups on level 5.)
- For the general monster type (insect, demon, thief, etc.), there's a 1% chance it's randomly chosen from all possible types - otherwise, the type is randomly chosen out of what types are assigned to the room.
- For the specific monster within that type, the selection is weighted by each valid monster's "chance". Monsters above or below the previously determined max or min level are excluded.

On level 1, rooms #1 to #17 have special restrictions on what monsters can appear. These rooms are all within 2 rooms of the entry stairs, plus a few directly to the east of the stairs up to about 5 rooms away.
- They can only have one monster group.
- They can never have a random type.
- They can never be higher than "guild level 2", so no Orcs, Slaves, or Twisted Dwarves. Also no Margoyles or Zombies even in the couple of sub-#18 rooms that allow devils or undead. It looks like Tengus are possible, though still rare.

I still can't discern why T'Manas and Dragon Turtles never show up.


--------------------
You're welcome!
Go to the top of the page
 
+Quote Post
Roland
post Sep 28 2018, 04:32 AM
Post #3


Explorer
***

Group: Members Plus
Posts: 131
Joined: 20-September 16
From: Maryland
Member No.: 8,408
referrer:Google



QUOTE (Nudibranch @ Sep 27 2018, 11:34 PM) *
I still can't discern why T'Manas and Dragon Turtles never show up.

I run a mod by DarkerMuffin that fixes the spawning of a number or problematic monsters, including T'Manas and Dragon Turtles. When he posted the mod, DarkerMuffin explained the spawning problems and how he fixed them. Most of the spawning problems result from the monster being assigned a companion type that can never spawn with it. In the case of Dragon Turtles, they are supposed to spawn with cascading Kyu-type Water Dwellers. But the first one, the Kyu t'Salli, is just a level-10 monster and therefore can't spawn in the second slot on level 14. When that happens, the game apparently goes back to the drawing board and re-rolls the encounter.

DarkerMuffin fixed Indiginis by assigning them animals as companions. It seems to have worked. Immediately after I installed the mod, I started encountering Indiginis, and I've seen lots of T'Manas.

If you want more detail, read DarkerMuffin's original post. He posted it in this forum in 2015, so you won't have to scroll down very far to find it.
Go to the top of the page
 
+Quote Post
Mordion
post Sep 28 2018, 08:51 PM
Post #4


Drifter
**

Group: Members Plus
Posts: 32
Joined: 30-September 07
Member No.: 3,924
referrer:google



QUOTE (Nudibranch @ Sep 27 2018, 11:34 PM) *
An examination of the source reveals the following. I might have misread some of it, it's very tangled. I didn't look into how the "companions" of the lead monster are generated, though Wabbit's editor gives a general idea (num group, in group, comp type, companions).

- If there's a laired monster, there's a 75% chance of it showing up.
- If it's a stud room, the maximum level of the lead monster in that room is the current level+1 (as advertised!). There's a 2/3 chance that its minimum level is the current level. Otherwise, the min level is the same as for a normal room (see next step).
- If it's a normal room, the minimum level is about 80% of the current level (not sure how it's rounded off), with a 20% chance of it being an additional -1 level, a 20% chance of it being -2 levels, and a 10% chance of -3 levels. (This would suggest that the lowest possible level of a lead monster on level 15 will be 9, and you might still meet level 1 groups on level 5.)
- For the general monster type (insect, demon, thief, etc.), there's a 1% chance it's randomly chosen from all possible types - otherwise, the type is randomly chosen out of what types are assigned to the room.
- For the specific monster within that type, the selection is weighted by each valid monster's "chance". Monsters above or below the previously determined max or min level are excluded.

On level 1, rooms #1 to #17 have special restrictions on what monsters can appear. These rooms are all within 2 rooms of the entry stairs, plus a few directly to the east of the stairs up to about 5 rooms away.
- They can only have one monster group.
- They can never have a random type.
- They can never be higher than "guild level 2", so no Orcs, Slaves, or Twisted Dwarves. Also no Margoyles or Zombies even in the couple of sub-#18 rooms that allow devils or undead. It looks like Tengus are possible, though still rare.

I still can't discern why T'Manas and Dragon Turtles never show up.


Does it pick a type and then pick a monster of the type or does it put all monsters of allowed types in a pile and pick from the pile?

What line of what file is the function? My copy of the source is from a VB3 decompiler and it has no annotations.

I remember getting violated by a Tengu close to the stairs the first time I played M2. Thought I was a Mordor pro at the time. Didn't see it coming.
Go to the top of the page
 
+Quote Post
Mordion
post Sep 28 2018, 08:53 PM
Post #5


Drifter
**

Group: Members Plus
Posts: 32
Joined: 30-September 07
Member No.: 3,924
referrer:google



QUOTE (Roland @ Sep 28 2018, 12:32 AM) *
I run a mod by DarkerMuffin that fixes the spawning of a number or problematic monsters, including T'Manas and Dragon Turtles. When he posted the mod, DarkerMuffin explained the spawning problems and how he fixed them. Most of the spawning problems result from the monster being assigned a companion type that can never spawn with it. In the case of Dragon Turtles, they are supposed to spawn with cascading Kyu-type Water Dwellers. But the first one, the Kyu t'Salli, is just a level-10 monster and therefore can't spawn in the second slot on level 14. When that happens, the game apparently goes back to the drawing board and re-rolls the encounter.

DarkerMuffin fixed Indiginis by assigning them animals as companions. It seems to have worked. Immediately after I installed the mod, I started encountering Indiginis, and I've seen lots of T'Manas.

If you want more detail, read DarkerMuffin's original post. He posted it in this forum in 2015, so you won't have to scroll down very far to find it.


This one?
http://dejenol.com/forum/index.php?showtopic=4928
Go to the top of the page
 
+Quote Post
Roland
post Sep 29 2018, 01:15 AM
Post #6


Explorer
***

Group: Members Plus
Posts: 131
Joined: 20-September 16
From: Maryland
Member No.: 8,408
referrer:Google



This is the one I meant:
http://dejenol.com/forum/index.php?showtopic=4968

But it looks like there is even more detail in the one you posted, which I had not seen previously. Thanks for digging it up.

This post has been edited by Roland: Sep 29 2018, 01:49 AM
Go to the top of the page
 
+Quote Post
Nudibranch
post Sep 29 2018, 04:36 AM
Post #7


Fire Master
*********

Group: Mordor MP Prog
Posts: 1,553
Joined: 19-November 04
Member No.: 71
referrer:search



QUOTE (Mordion @ Sep 28 2018, 04:51 PM) *
Does it pick a type and then pick a monster of the type or does it put all monsters of allowed types in a pile and pick from the pile?

What line of what file is the function? My copy of the source is from a VB3 decompiler and it has no annotations.

I remember getting violated by a Tengu close to the stairs the first time I played M2. Thought I was a Mordor pro at the time. Didn't see it coming.

It picks a type then a monster of the type.

Module4.bas, line 1354.


--------------------
You're welcome!
Go to the top of the page
 
+Quote Post
fischsemmel
post Dec 10 2018, 04:21 PM
Post #8


Journeyman
*

Group: Members Plus
Posts: 24
Joined: 28-February 11
Member No.: 6,580
referrer:Search engine



QUOTE (Nudibranch @ Sep 27 2018, 10:34 PM) *
On level 1, rooms #1 to #17 have special restrictions on what monsters can appear. These rooms are all within 2 rooms of the entry stairs, plus a few directly to the east of the stairs up to about 5 rooms away.
- They can only have one monster group.
- They can never have a random type.
- They can never be higher than "guild level 2", so no Orcs, Slaves, or Twisted Dwarves. Also no Margoyles or Zombies even in the couple of sub-#18 rooms that allow devils or undead. It looks like Tengus are possible, though still rare.

I still can't discern why T'Manas and Dragon Turtles never show up.


Hmm. I saw two groups of 10-12 slaves in the small room immediately right of the stairs (10,11 and 10,10) just an hour ago.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 12th December 2018 - 04:17 AM
Bridged By IpbWiki: Integration Of Invision Power Board and MediaWiki © GlobalSoft
Copyrights and Credits