-
Notifications
You must be signed in to change notification settings - Fork 53
Overrides
Type: array of string
Example: ["TOWER", "ROOMS"]
Overrides the specified settings instead of merging from inherited dungeon settings.
Possible values come from the SettingsType enum and include the following values as text strings.
TOWER
LOOTRULES
SECRETS
ROOMS
THEMES
As an example, by default, when a dungeon settings definition inherits or contains multiple loot tables, it will try to merge them, providing all of the loot from all loot rules across all chests for each loot type. The override
Given the dungeon definition below, the dungeon will generate with only a single wheat seed in every chest.
{
"name" : "dungeon:builtin_ice",
"exclusive" : true,
"overrides": ["LOOTRULES", "THEMES"],
"inherit" : [
"theme:ice",
"segments:chests_increasing",
"rooms:nice",
"demo:loot"
],
"criteria" : {},
"tower": {
"type": "HOLE",
"inherit": [
"theme:ice"
]
},
"loot_rules" : [
{
"level" : [0,1,2,3,4],
"loot" : [
{"data" : {"name" : "minecraft:wheat_seeds"}, "weight" : 1}
],
"each" : true,
"quantity" : 1
}
]
}
The loot will appear in every chest because the it is defined for every floor ("level" : [0,1,2,3,4],
).
The loot will only contain wheat seeds because the top-level loot_rules
definition overrides the inherited loot rules from demo:loot
. Any loot tables loaded from demo:loot
are discarded, whereas the additional loot_rules
are preserved and their items will appear in chests throughout the dungeon.
For further reading, refer to the tests as documentation.