Roguelike Dungeons -- Fnar's Edition

Roguelike Dungeons -- Fnar's Edition

13M Downloads

Custom Rooms

Steven11q opened this issue ยท 3 comments

commented

Is there a way to define a custom room and add it to the generation of a custom dungeon? Im trying to make a replacement strongehold for my pack and Id like to make an end portal room for a custom dungeon.

commented

Probably super late on this, but it's a work in progress. ๐Ÿ˜€

commented

Alright, Thanks. Is there any more information you could give me about it in the meantime?

commented

Sorry for the delay in response. I'm still designing the feature, and I'm open to feedback. I wish I was aware of a Minecraft standard for custom room layout and block specifications, like Recurrent Complex.

In the meantime, here's what I'm using internally (unsure if you can read Java).
https://github.com/fnar/minecraft-roguelike/blob/master/roguelike-core/src/main/java/com/github/fnar/roguelike/worldgen/generatables/thresholds/Doorway.java#L26

The central premise is that users will create symbol -> block maps. I'm not sure if I'll require this to be in JSON, .ini, or how this will work yet textually, but the idea is that a user will specify something akin to:

Block Map

block map = {
  ".": "minecraft:air"
  "#": "minecraft:stone",
  "D": "minecraft:oak_door",
  "L": "minecraft:log2",
  "~": "minecraft:water"
}

Room Definition

A series of block layers, with 0 being the base relative to where the room would generate.

{
  0: [
    "###",
    "###",
    "###",
  ],
  1: [
    "###",
    "D~D",
    "###"
  ],
  2: [
    "###",
    "D D",
    "###"
  ],
  3: [
    "###",
    "# #",
    "###"
  ],
  4: [
    "###",
    "# #",
    "###"
  ],
  5: [
    "###",
    "###",
    "###"
  ]

There are still many problems with this approach, such as specifying which block is central to generation, specifying entrances so that hallways know where to connect, how to provide optional generatables and variance, and the general community's comfort with, for example, JSON.

I'm open to feedback if you're accustomed to anything else.