Making Dungeons Smaller

Discuss modding questions and implementation details.
Post Reply
Eric
Posts: 7
Joined: Sun Mar 22, 2015 9:49 am

Making Dungeons Smaller

Post by Eric » Thu Aug 08, 2019 9:26 pm

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?

User avatar
Azteca
Posts: 80
Joined: Tue Mar 26, 2019 12:38 am

Re: Making Dungeons Smaller

Post by Azteca » Thu Aug 08, 2019 9:31 pm

viewtopic.php?t=1689

However, I applaud your effort.

Eric
Posts: 7
Joined: Sun Mar 22, 2015 9:49 am

Re: Making Dungeons Smaller

Post by Eric » Thu Aug 08, 2019 9:39 pm

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.

User avatar
Jay_H
Posts: 2832
Joined: Tue Aug 25, 2015 1:54 am

Re: Making Dungeons Smaller

Post by Jay_H » Thu Aug 08, 2019 10:31 pm

Hazelnut already implemented an item compass through his Archaeologist guild ;) Here's a demonstration: https://youtu.be/SX01Vq6_i1g?t=2955
ON HIATUS. Will be difficult to find.
Come join the Unofficial Daggerfall Unity Discord.
See the Daggerfall Unity Wiki on the UESP.

Eric
Posts: 7
Joined: Sun Mar 22, 2015 9:49 am

Re: Making Dungeons Smaller

Post by Eric » Thu Aug 08, 2019 11:01 pm

Nice :D Cant wait for it to be published :D

User avatar
Jay_H
Posts: 2832
Joined: Tue Aug 25, 2015 1:54 am

Re: Making Dungeons Smaller

Post by Jay_H » Thu Aug 08, 2019 11:14 pm

ON HIATUS. Will be difficult to find.
Come join the Unofficial Daggerfall Unity Discord.
See the Daggerfall Unity Wiki on the UESP.

Post Reply