Counting Dungeon & Building Resources Per Region

For all talk about quest development - creation, testing, and quest system.
Post Reply
User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Counting Dungeon & Building Resources Per Region

Post by Interkarma »

This post is a response to a conversation between myself and Jay in the Bug Reports forums here. I wanted to clarify how the "remote dungeonX" works for quest authors.

The attached RegionCounts.zip has a tally of every dungeon and building resource by region. Here's an example of the output for region of Daggerfall:

Code: Select all

{
        "index": 17,
        "name": "Daggerfall",
        "counts": {
            "dungeonCounts": {
                "Cemetery": 72,
                "VampireHaunt": 21,
                "RuinedCastle": 24,
                "Prison": 21,
                "Laboratory": 21,
                "Coven": 13,
                "GiantStronghold": 18,
                "Crypt": 23,
                "BarbarianStronghold": 9,
                "NaturalCave": 13,
                "HumanStronghold": 2,
                "DragonsDen": 20,
                "HarpyNest": 2,
                "SpiderNest": 9
            },
            "buildingCounts": {
                "House5": 2061,
                "House2": 35196,
                "House3": 2293,
                "Tavern": 2001,
                "House1": 200,
                "Town23": 2568,
                "GeneralStore": 854,
                "Temple": 334,
                "Palace": 28,
                "GuildHall": 161,
                "Bookseller": 136,
                "GemStore": 119,
                "ClothingStore": 99,
                "Library": 40,
                "WeaponSmith": 39,
                "Armorer": 154,
                "PawnShop": 132,
                "Bank": 90,
                "Alchemist": 119,
                "HouseForSale": 194,
                "FurnitureStore": 10,
                "House6": 79,
                "House4": 33
            }
        }
    },
Each dungeon type above maps to an index used by the Place resource. For example "Place _mondung_ remote dungeon1" will gather a random dungeon type of OrcStronghold. You can see from the above list that Daggerfall does not contain any OrcStronghold dungeon types, so it is impossible to use "dungeon1" in the region of Daggerfall. Several other regions do contain this dungeon type however.

Here are the mappings for each dungeon type. Their number maps to a dungeonX value.

Code: Select all

public enum DungeonTypes
        {
            Crypt = 0,
            OrcStronghold = 1,
            HumanStronghold = 2,
            Prison = 3,
            DesecratedTemple = 4,
            Mine = 5,
            NaturalCave = 6,
            Coven = 7,
            VampireHaunt = 8,
            Laboratory = 9,
            HarpyNest = 10,
            RuinedCastle = 11,
            SpiderNest = 12,
            GiantStronghold = 13,
            DragonsDen = 14,
            BarbarianStronghold = 15,
            VolcanicCaves = 16,
            ScorpionNest = 17,
            Cemetery = 18,
            NoDungeon = 255,
        }
Likewise, the .zip contains a tally for each building type. Some of the house types (like house4) are very rare and currently the Place resource has trouble locating them. I'm working on a better solution for finding these building types that will make it into the game before too long.

And for completeness here's the enum mappings for building types.

Code: Select all

public enum BuildingTypes
        {
            /// <summary>Alchemist</summary>
            Alchemist = 0x00,
            /// <summary>HouseForSale</summary>
            HouseForSale = 0x01,
            /// <summary>Amorer</summary>
            Armorer = 0x02,
            /// <summary>Bank</summary>
            Bank = 0x03,
            /// <summary>Town4</summary>
            Town4 = 0x04,
            /// <summary>Bookseller</summary>
            Bookseller = 0x05,
            /// <summary>ClothingStore</summary>
            ClothingStore = 0x06,
            /// <summary>FurnitureStore</summary>
            FurnitureStore = 0x07,
            /// <summary>GemStore</summary>
            GemStore = 0x08,
            /// <summary>GeneralStore</summary>
            GeneralStore = 0x09,
            /// <summary>Library</summary>
            Library = 0x0a,
            /// <summary>Guildhall</summary>
            Guildhall = 0x0b,
            /// <summary>PawnShop</summary>
            PawnShop = 0x0c,
            /// <summary>WeaponSmith</summary>
            WeaponSmith = 0x0d,
            /// <summary>Temple</summary>
            Temple = 0x0e,
            /// <summary>Tavern</summary>
            Tavern = 0x0f,
            /// <summary>Palace</summary>
            Palace = 0x10,
            /// <summary>House1</summary>
            House1 = 0x11,
            /// <summary>House2</summary>
            House2 = 0x12,
            /// <summary>House3</summary>
            House3 = 0x13,
            /// <summary>House4</summary>
            House4 = 0x14,
            /// <summary>House5</summary>
            House5 = 0x15,
            /// <summary>House6</summary>
            House6 = 0x16,
            /// <summary>Town23</summary>
            Town23 = 0x17,
            /// <summary>Ship</summary>
            Ship = 0x18,
            /// <summary>Special1</summary>
            Special1 = 0x74,
            /// <summary>Special2</summary>
            Special2 = 0xdf,
            /// <summary>Special3</summary>
            Special3 = 0xf9,
            /// <summary>Special4</summary>
            Special4 = 0xfa,
        }
Please let me know if there's anything I can expand on and I'm more than happy to try and help. :)
Attachments
RegionCounts.zip
(6.97 KiB) Downloaded 164 times

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

Re: Counting Dungeon & Building Resources Per Region

Post by Jay_H »

Cool! I had figured this would be the case. Now it's good to have it in numbers.

I believe classic simply blocked quests that attempted to use invalid parameters. That appears to have been removed from DFU, hasn't it? I haven't seen anyone "giving it to some spellsword" for quite awhile now. I assumed that would be a halfway solution until something more permanent appears, but if that's far away from current DFU, there's no need to alter it.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Counting Dungeon & Building Resources Per Region

Post by Interkarma »

The "gave it to some spellsword" handler for failing to compile a quest should be functional. I very specifically put this in some time back. Something might have broken it however, or it's just not firing in this case. I'll take a look when I can.

Post Reply