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 »

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: 143
Joined: Tue Mar 26, 2019 12:38 am

Re: Making Dungeons Smaller

Post by Azteca »

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 »

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: 4070
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: Making Dungeons Smaller

Post by Jay_H »

Hazelnut already implemented an item compass through his Archaeologist guild ;) Here's a demonstration: https://youtu.be/SX01Vq6_i1g?t=2955

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

Re: Making Dungeons Smaller

Post by Eric »

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

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

Re: Making Dungeons Smaller

Post by Jay_H »


Post Reply