Configuration
Configuration
Below the configuration is explained, as reference the example configuration is used, which will be automatically generated if the file "config.yml" is not present.
Basic settings
Weight allows to control how much is put into a chest, you can give a diamond armor piece a high weight and some seeds a lower weight. These settings concern the total treasures added to a chest.
weight: min: 1 max: 10
Randomization settings. With each try, xz attempts are made to find a treasure place in a random x,z position within radius of the player. y attmepts will be done to find a valid treasure position on each of those x,z coordinats then. max-add limits the number of attempts to add items to a newly created chest. It can happen that nothing is added, due to randomization settings for an individual treasure (see below). p-abort is a value between 0.0 and 1.0 stating a probability that no further items will be added once the weight.min value is reached, tested on each further treasure added.
attempts: y: 5 xz: 1 max-add: 30 p-abort: 0.33
Block settings
These setings should be set on top level of the configuration as default block settings, but they can also be added to each individual treasure definition section to control where those treasures might appear.
y.min and y.max restrict the height at which those treasures may appear.
replace is a list of block types which a chest is allowed to replace, neighbours is a list of block types which may be orthogonal neighbours to the chests. Such you can make treasures that are only found near sand and water for instance. Further you can optionally set blocks one of which must appear as a neighbour with neighbour-must.
y-min: 2 y-max: 255 replace: - stone - dirt - sand - sandstone - gravel - bedrock neighbours: - stone - dirt - sand - sandstone - gravel - bedrock
Example for neighbours-must - if added to the above example this would demand the treasure to be next to stone or sandstone:
neighbours-must: - stone - sandstone
Treasure settings
Now in the treasures section you can define what items shall be foud in chests, how likely they are found, and how likely more items will be added to a chest if this is in. Further you can define individual block settings for each treasure.
Each treasure needs its own configuration section within treasures, the key is arbitrary, just use alphanumeric simple namesadn do not use duplicate names. Same with the items sub-sections, each item needs an own section with an arbitrary key.
Example treasure indicating all possible settings, except for block settings:
part describes the frequency with which this item may occur, the sum of all part values of possible items will count in for the range of choice.
weight describes how likely more items can be added if this one is in, the sum of all weights for added items for one chest will be examined, at least weight.min will be put in, at most weight.max.
The random flag indicates wether the amount will be randomized from 0...amount of the items.
The items section then holds the item definitions, you specify the block type with type (id numbers are ok), the data value (or durability value), the amount and enchantments, which is a list with the enchentment name (Bukkit internals), you can specify the enchantment level with <name>:<level>, if not given the maximal (!) enchantment level is used, it is capped with the normal maximal enchantment level. The enchantments are not (yet) randomized.
treasures: t1: part: 10 weight: 3 random: false items: i1: type: diamond_sword data: 500 amount: 1 enchantments: - DAMAGE_ALL:1
You don't need to specify amount (1) and data(0), of course there is no need to add empty enchantments entries. You can specify several items per treasure definition.
For a list of the enchantment names, see:
http://jd.bukkit.org/apidocs/org/bukkit/enchantments/Enchantment.html
Comments