-
Notifications
You must be signed in to change notification settings - Fork 6
Chest Wand

The Chest Wand is a special item which allows you to create a set of customizable chest generation rules through an ingame menu, and then attach them to chests you plan to include in structures. When a structure is generated, it will apply the rules set on the chest to decide which items and how many of those items to place in the chest.
The chest wand can be a bit confusing at first, but this guide will hopefully allow you to understand it and utilize it to it's full potential.
-
In order to begin creating a set of rules, spawn yourself a chest wand and then right-click anywhere on the screen. This will bring up the chest rule editor UI.
-
From here you will see an empty list and 5 buttons at the top, the first 4 buttons correspond to the different types of rules you can add to your rule set, and the last button will close the menu.
-
Start by adding a new rule by clicking on one of the 4 new rule buttons.

Each rule type will give a short description of it's behavior when hovered over. The four types of rules are:
Guaranteed (Red): Every item in the guaranteed rule will be placed in the chest, in the order they appear in the menu
Chance (Green): Every item in the chance rule will try to be placed in the chest, with a success rate determined by the "chance" parameter on the rule, in the order they appear in the menu
Pool (Purple): A quantity of items, decided by the count parameter of the rule, are chosen from the rule at random and placed in the chest. This type of rule ignores the order of items but allows you to set a configurable weight for each item
Pool + Chance (Blue): Acts as a combination of the chance and pool rule types -- it will behave identically to a pool rule if it succeeds the random check (with configurable probability), and do nothing if it fails it.
For more information about when and how to use these rule types, see the tips and tricks section.
-
Next, add the desired items to your rule. This is done by taking the item from your inventory and left-clicking it onto the rule in the menu. When you do so you should see a sub-entry under the rule detailing the item's name, along with a few options for it.
All items will have the ability to configure a "minimum" and "maximum" quantity, when an item is placed from any rule it will be placed in an amount randomly selected between these values. To generate a constant amount of an item, simply set both to the same value.
Items in a "Guaranteed" or "Chance" rule can be moved up/down in the order by clicking on the arrows to the left of the icon

Items in a "Pool" or "Pool + Chance" rule can have their "weight" configured, higher weighted items appear more frequently from the pool

-
Repeat the above steps until you're satisfied with your rule set. You can add an unlimited number of items to a rule and an unlimited amount of rules to a set, though note that any items that would exceed the chests capacity will be ignored. Also note that items are placed in chests according to the order of rules, you can use the arrows to the left of a rule to re-order your rules as you please.
-
Close the chest rule editor menu, and then left-click the chest you wish to set your rules on with your chest wand. You should see a glowing blue circle appear around the corner of the chest, indicating that it has a set of rules saved on it.
Overwriting an existing set of rules is simple, simply create your new set of rules as explained above and left-click on the chest with the ruleset you want to replace.
While there is no true way to "edit" a set of rules, you can accomplish the same result by copying and then overwriting the set of rules on a chest.
- Right click on a chest which has rules bound to it with your chest wand, this will copy the rules on that chest into the rule editor menu. (WARNING: This will overwrite the rules currently in the menu)
- Edit the rules as you see fit.
- Left click again on the chest you copied from to overwrite the old rule set with the newly edited one.
If your chest has already been saved into a structure, you can use the structure placement wand with null tile placement enabled to place a version of your structure where chests have their rulesets bound to them instead of generating using their rulesets, and use this to copy the rules into your chest wand.
If you wish to remove a ruleset on a chest and instead have it generate empty, simply open the rule editor menu, remove all rules, and then overwrite the chest with the empty ruleset. You should see the blue ring disappear, indicating no rules are bound to it anymore.
If you save a structure which contains a chest with rules bound to it, when that structure is generated, items are placed into the chest based on the rules bound to it when you saved it. You can test the results of your rules by saving the chest with a structure wand and then placing it a few times with a placer wand, and seeing what generates inside of it.
"One of item from this set of items" - A pool rule, containing every item in the set with equal weights, and with 1 for the count parameter.
"A rare chance for this item" - A chance rule, set to a low probability such a 1% or 5%, containing only that item.
"These items each with a different chance, but with a chance for none at all" - Multiple chance rules, each containing a different item and set to the probability you want for each.
"These items, each with a different chance, but always X of them" - A pool rule, containing every item, each having a weight appropriate to the frequency you want them to show up. The count parameter of the rule should be set to X.
"Sometimes an item from this set of items" - a pool + chance rule, with the count set to 1 and the chance set to the desired probability of an item from that pool generating, and containing every item in the pool with equal weights.
-
You can place multiple entries of the same type but with different quantities into a rule to allow different stack sizes to generate. A good example of this would be having multiple different stack size ranges for gold in a pool rule, with greater weight towards lower quantities.
-
You can place duplicate entries into a pool or pool + chance rule to allow that amount of repeats of that item. By default these rules do not allow repeats within the rule.
-
The rules on your chest wand aren't cleared when you apply them to a chest, if you want to apply the same ruleset to many chests, you can make it once and then click every chest.
-
You can use the eye icon on a rule to collapse it, hiding the items and parameters on it.
