selective monster spawning per dungeon or category of dungeon

Talk about the mods you'd like to see in Daggerfall Unity. Give mod creators some ideas!
User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: selective monster spawning per dungeon or category of dungeon

Post by pango »

Well, you can use the trick already in use in the tables: duplicate values. That has to be done somewhat carefully because it will shift the odds for those duplicates, but without changing the selection mechanics that's the way to go.


I did some analysis to compare classic and alternate random enemies selections:
(characters above level 20 are handled like level 20)

Classic:
heatmap-RandomEncounters.png
heatmap-RandomEncounters.png (21.26 KiB) Viewed 5101 times
Alternate:
heatmap-AlternateRandomEnemiesSelection.png
heatmap-AlternateRandomEnemiesSelection.png (20.95 KiB) Viewed 5101 times
(heatmaps generated using heatmapper)

At character level 1, classic puts more focus on the first 3 monster slots (for Privateer's Hold, which is a human stronghold, that would mean more warriors, rogues and rats than bears, archers and nightblades).
At level 2, it loosens a bit its focus on first slots, and does not open an additional slot like alternate does (so for PH that means adding more bears to the mix, but not adding giant bats yet).
Alternate selection probably makes PH a little bit more dangerous, I don't know how significant you feel it is.

As character level raises, classic lowers the probability of low level monsters, but never totally eradicates them.

On the other difficulty side, starting with character level 6, there's a small chance of any random monster slot (if you look closely at the heatmap, the background changes from solid black to very dark grey), so you can get some "surprise" monster in classic that alternate does not have.

At character level 19 onward, alternate has a problem: it picks from less slots than classic, and starting from level 20 it uses only 4 slots while classic uses 6; So contrary to its goal (increase monsters randomness), it actually lessens monsters variety in end game.

I think the latter problem should be fixed, but overall I think alternate lacks several of the good properties of classic...
Attachments
tables.zip
(1.08 KiB) Downloaded 144 times
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
BadLuckBurt
Posts: 948
Joined: Sun Nov 05, 2017 8:30 pm

Re: selective monster spawning per dungeon or category of dungeon

Post by BadLuckBurt »

Not my area of interest but that's an impressive analysis! You really have a knack for presenting your conclusions in a very clear way.

I've been using the alternate spawns but seeing this, wonder if I should go back to classic
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

.

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: selective monster spawning per dungeon or category of dungeon

Post by pango »

Well, I was interested in the current alternate selection worthiness too...

The other main difference between classic monsters selection and alternate, is that alternate removes an indirection:
In classic, 256-slots tables (water and non-water) are filled with random monsters selected using probabilities described above, then when dungeon layout mentions random monsters, and index provided by the dungeon layout is used to select the slot from the tables (or, if it's #0, a random slot between #1 and #6 is selected). Alternate gets rid of those tables, and directly pick random enemies on case-by-case.
I have no idea what is the distribution of the values provided by the dungeons (and would really like to hear about it), so it's hard to tell how it affects the variety of monsters found in dungeons. Say, if a dungeon layout uses random slots, the result should be very close to case-by-case random enemies selection; But if dungeon layout only use a few slots, you'll only encounter as many different random enemies.
However classic mechanism opens up possibilities to dungeon designer; For example if several random monsters are put in a room, but all with the same (non zero) slot number, they'll be random but all identical monsters; Which, with enemies infighting, could make even more difference!

To make a long story short, current version of alternate random enemies selection feels to me as experimental, and too basic to be a solid contender if you just want to play Daggerfall.
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
BadLuckBurt
Posts: 948
Joined: Sun Nov 05, 2017 8:30 pm

Re: selective monster spawning per dungeon or category of dungeon

Post by BadLuckBurt »

pango wrote: Sun Nov 17, 2019 11:32 am Well, I was interested in the current alternate selection worthiness too...

The other main difference between classic monsters selection and alternate, is that alternate removes an indirection:
In classic, 256-slots tables (water and non-water) are filled with random monsters selected using probabilities described above, then when dungeon layout mentions random monsters, and index provided by the dungeon layout is used to select the slot from the tables (or, if it's #0, a random slot between #1 and #6 is selected). Alternate gets rid of those tables, and directly pick random enemies on case-by-
case.
I think classic Doom did something similar with values and tables for 'randomness', it's a good way to control the probabilities.
pango wrote: Sun Nov 17, 2019 11:32 am I have no idea what is the distribution of the values provided by the dungeons (and would really like to hear about it), so it's hard to tell how it affects the variety of monsters found in dungeons. Say, if a dungeon layout uses random slots, the result should be very close to case-by-case random enemies selection; But if dungeon layout only use a few slots, you'll only encounter as many different random enemies.
The distribution is probably controlled by multiple parameters like player level, dungeon type, etc. I can see if I can dig it up later, I diving into the broken dungeon stuff tonight.

I'm not sure I follow the bit about: 'if a dungeon layout uses random slots, the result should be very close to case-by-case random enemies selection'. The result depends on how the 256-slot table has been filled, case-by-case just picks a random index from the list of monsters available right?
pango wrote: Sun Nov 17, 2019 11:32 am However classic mechanism opens up possibilities to dungeon designer; For example if several random monsters are put in a room, but all with the same (non zero) slot number, they'll be random but all identical monsters; Which, with enemies infighting, could make even more difference!

To make a long story short, current version of alternate random enemies selection feels to me as experimental, and too basic to be a solid contender if you just want to play Daggerfall.
This should also be possible with the case-by-case but would require more logic to be added and I think you are correct when you say it feels like alternate enemy selection is experimental, mechanics like these really need playtesting and feedback by several people to tweak it. Does sound like it's already off to a good start though
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

.

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: selective monster spawning per dungeon or category of dungeon

Post by pango »

BadLuckBurt wrote: Sun Nov 17, 2019 3:27 pm The distribution is probably controlled by multiple parameters like player level, dungeon type, etc. I can see if I can dig it up later, I diving into the broken dungeon stuff tonight.
No, the monster selection functions already depends on player level and dungeon type.
Slot numbers come directly from the dungeon modules.

RDBLayout.AddRandomRDBEnemyClassic():

Code: Select all

                int slot = obj.Resources.FlatResource.Flags;
                if (slot == 0)
                    slot = UnityEngine.Random.Range(1, 7);
What I don't know is how those obj.Resources.FlatResource.Flags are distributed in dungeon modules...
Do they use many or few different slot numbers, do they often use the Slot #0, do they often use the same slot number for compact groups of enemies?
BadLuckBurt wrote: Sun Nov 17, 2019 3:27 pm I'm not sure I follow the bit about: 'if a dungeon layout uses random slots, the result should be very close to case-by-case random enemies selection'. The result depends on how the 256-slot table has been filled, case-by-case just picks a random index from the list of monsters available right?
Now I'm the one not following.
Slot numbers come from the dungeon layout; What I meant is, if their values are all over the place, the result from the lookups in the randomly prefilled tables should be about as random as how the tables were filled.
Dungeon random monsters2.png
Dungeon random monsters2.png (39.88 KiB) Viewed 5055 times
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
BadLuckBurt
Posts: 948
Joined: Sun Nov 05, 2017 8:30 pm

Re: selective monster spawning per dungeon or category of dungeon

Post by BadLuckBurt »

pango wrote: Sun Nov 17, 2019 4:22 pm What I don't know is how those obj.Resources.FlatResource.Flags are distributed in dungeon modules...
Do they use many or few different slot numbers, do they often use the Slot #0, do they often use the same slot number for compact groups of enemies?
I have to dump the dungeon blocks this week anyway. I'll extract the monster marker flats and give you a list per block, it'll be nice to have an exact map / monster count for each block.
pango wrote: Sun Nov 17, 2019 4:22 pm Now I'm the one not following.
Slot numbers come from the dungeon layout; What I meant is, if their values are all over the place, the result from the lookups in the randomly prefilled tables should be about as random as how the tables were filled.
My question was probably too confusing, apologies. Making a list of all the markers and their flags should shed some light on this, I don't know how random the flags are atm.
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

.

User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: selective monster spawning per dungeon or category of dungeon

Post by Ralzar »

pango wrote: Sun Nov 17, 2019 11:32 am However classic mechanism opens up possibilities to dungeon designer; For example if several random monsters are put in a room, but all with the same (non zero) slot number, they'll be random but all identical monsters; Which, with enemies infighting, could make even more difference!
Oh wow, that is a good point. So what is the benefits of Alternate method? That you will not run into low level enemies once you outlevel them? And then wind up with actually fewer enemy types at endgame because of this?

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: selective monster spawning per dungeon or category of dungeon

Post by pango »

If you look at the two heatmaps, Alternate has a wider "main sequence"; So if you exclude its endgame issue, it can pick, with high probability, from more enemy slots at once, so hopefully generate a more varied enemies selection (assuming the slots are not repeats). Classic can pick "surprise enemies" of any kind when the player reaches level 5, but the probability is very low.
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: selective monster spawning per dungeon or category of dungeon

Post by King of Worms »

Question is, if this feature adds anything good to the game than... ;)

Post Reply