Page 1 of 1

Making Dungeons Smaller

Posted: Thu Aug 08, 2019 9:26 pm
by Eric
I really enjoy Daggerfall Unity. But in my opinion most dungeons are just too big. I want to create a mod making the non main quest dungeons smaller. These dungeons often seem random but are hardcoded in the game files (at least in classic Daggerfall). For this to be possible there need to be a way to generate a dungeon with the appropriate theme (e.g. crypt, mine, laboratory, ...) and matching npcs. I think I remember a early blog post (~2014) where this was already possible.

I imagine things the following way:
  • Create three integer input fields "small", "medium" and "large" in the mod config for dungeon size
  • The values of the fields have to be 100 in sum an represent the probability for a small, medium and large dungeon respectively
  • Take the utf8 representation of the English name of the dungeon and calculate its MurmurHash3 32bit
  • The resulting 32bit can be interpreted as an integer (lets call it the seed), and will be
    1. the same on all platforms
    2. uniformly distributed
    3. always the same for the same dungeon name
  • Taking v:=(seed mod 100) will place the dungeon in one of the size categories (small if v<"small", medium if v<"small"+"medium", large else)
  • Use the seed to initalize a Random
  • Make a first call to determinate the actual dungeon size in blocks (between 8 and 15 for small, 16 and 24 for medium, and 25 to 32 for large)
  • Use the Random to calculate the dungeon and place the npcs, do NOT use this Random for the loot placement

Since I'm not sure if a), b), and c) (e.g. different behaviour on .net core) hold for the build-in C# hashCode field I suggest MurmurHash3.
This procedure will guarantee that dungeons are still the same for all people using the same size distribution.

Now before I start I first want some thoughts on my approach. Is there maybe already a mod?

Re: Making Dungeons Smaller

Posted: Thu Aug 08, 2019 9:31 pm
by Azteca
viewtopic.php?t=1689

However, I applaud your effort.

Re: Making Dungeons Smaller

Posted: Thu Aug 08, 2019 9:39 pm
by Eric
Haha, thanks for the answer, good that I asked in advance before starting :lol:

Any chance there is already a mod for better dungeon navigation? This would have been my next idea on dungeon improvement.
I thought of something like Target Stones (usable item to mark the current cell of a target), something like a "Magic Compass" (adding a marker on the ingame compass that always points in the direction of the target, as long as the compass is in the inventory) and simple Chalk (to draw on dungeon walls, much more comfortable and rp style than comments on the map). To not break the balance of the game, this items could by buyable to prices proportional to their usfullness.

Re: Making Dungeons Smaller

Posted: Thu Aug 08, 2019 10:31 pm
by Jay_H
Hazelnut already implemented an item compass through his Archaeologist guild ;) Here's a demonstration: https://youtu.be/SX01Vq6_i1g?t=2955

Re: Making Dungeons Smaller

Posted: Thu Aug 08, 2019 11:01 pm
by Eric
Nice :D Cant wait for it to be published :D

Re: Making Dungeons Smaller

Posted: Thu Aug 08, 2019 11:14 pm
by Jay_H