Stylesheets - gottsch/gottsch-minecraft-Dungeons2 GitHub Wiki

A stylesheet is made up of three main components: layouts, styles, and themes

layouts

Assigns styles to all the design elements or frames that make up a dungeon room. The frames are all the different architectural components that a room may have, basic ones being floor, walls, and ceiling, to more advanced ones such as trim, pillars, cornices, plinths etc.

Partial of default Layout:

"layouts": {
  "default": {
"useAll": false,
"frames": {
	"PLINTH": {
		"style": "default-plinth"
	},
	"CROWN": {
		"style": "default-crown"
	},
	"TRIM": {
		"style": "default-trim"
	},
	...
    }
  }
}

Here, "default" is the name of the layout. "default" is a special layout required by Dungeons2! and contains all possible frames. It should not be edited directly. Instead, edit the "base" layout.

base Layout

"base": {
  "ref": "default",
  "category": "default",
  "useAll": false,
  "frames": {}
}

Notice that "base" does not define any frames. That is because it uses the "ref" field to reference the "default" layout - so it will inherit all the frames from it. Here you can override the definitions for the frames.

  • "ref" - refers to another layout that it inherits from.
  • "category" - the category of the layout. Layouts can be grouped, so that only those that belong to a category will used for a specific dungeon.
  • "useAll" - flag to indicate if all the frames in a layout should be used when generated a room. The default is false, and only a random select number will be used.
  • "frames" - a list of named frames.

Each frame has it's own set of properties:

  • "PLINTH", "CROWN", etc. - these are the keys/names of the frames.
  • "alias" - the name of the themed alias to apply to the frame.
  • "style" - the name of the style to apply to the frame.

styles

A style is a set of rules used to determine which block to use to generate the frame. (Remember, a frame isn't just a single block, but represents an architectural component, such as an entire wall, or a pillar, etc).

default Style

"styles": {
  "default": {
    "block": "minecraft:stonebrick@0",
    "category": "default",
    "decay": 15.0,
      "decayBlocks": [
        "minecraft:stonebrick@1",
        "minecraft:stonebrick@2",
        "minecraft:cobblestone@0",
        "minecraft:gravel@0",
        "minecraft:air@0"
      ]
  },
  ...
}

[TODO]

themes

[TODO]