This reminds me of the genre of Dungeon-Core fics where usually the protagonist of the story finds themself as the core or central mind of a "dungeon" that more or plays out like someone playing the game Dungeon Keeper. They have a central core to protect and can build/rearrange a dungeon and populate it with monsters, etc to keep the place running.

Dungeon Keeper Ami is the first one of these I've seen. It's basically a crossover fic where Sailor Mercury ends up teleported to a world based on the Dungeon Keeper game. In this setting, dungeons are all run and maintained by Keepers, people who have bonded with dungeon hearts which were created by the dark gods to drain mana from the world and spread their influence. Keepers gain access to significant wealth and power due to the dungeon hearts ability to summon or enslave minions and transmute valuable items into gold and then transmute ratios of gold and mana into whatever else they may desire. However, if a Keeper's dungeon heart is ever destroyed then they get banished to the realm of the dark gods and usually get consumed by them.

So, in this setting, "dungeons" can basically be whatever sort of base or lair the Keeper constructs to protect their dungeon heart and house their minions. The hearts also drain mana from the world (which conveniently requires there to be an unbroken pathway from the surface to the heart itself so Keeper's can't just wall their dungeon heart in a sealed room) and spreads a corruption across the land. The heroes of this setting would love nothing more than to wipe out every dungeon heart they can, but Keepers can create multiple dungeon hearts (though they still get banished temporarily if one gets destroyed and risk being consumed) and can spread their influence. Heroes don't explicitly gain anything from killing a Keeper's minions (as far as I know) but the gods of Light do support people's efforts to destroy the Keepers and can grant powers to champions.


The other one I know of is "I Woke up as a Dungeon, Now What?" where the dungeons are basically like demiplanes. Each one has an intelligent dungeon core that runs it, it needs and entrance connecting it to the material world, and it populates it's little demiplane with rooms, monsters, set pieces, and pieces of loot. It's apparent goal is to lure people or animals into it where they can be killed by the monsters and it does that by supplying loot. The dungeons also apparently feed off of conflict or dead bodies.

From what I've read, dungeons here are treated kind of like a risky but rewarding source of resources and wealth since skilled adventurers can repeatedly delve into them and get valuable loot. A small tribe of people finding the titular protagonist dungeon consider it a blessing since they can use it to support themselves and there are larger empires who intentionally wiped out dungeons in an area to deprive people of the resources.


I haven't heard of a setting where "dungeons" of this sort are the setting's main source of XP, but it does sound like an interesting take on it. TVtropes has a page listing these sorts of stories.