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
- the same on all platforms
- uniformly distributed
- 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?