Skip to content

Latest commit

 

History

History
539 lines (396 loc) · 26.9 KB

README.md

File metadata and controls

539 lines (396 loc) · 26.9 KB

Better Chests

Adds enhanced chest features to the game.

Contents

Features

Access Chests

Remotely access storages in the game from anywhere.

Config Description Default Value Other Value(s)
AccessChest Enables the Access Chest feature. "Location" "Disabled", "Default", "Inventory", "World" 1
AccessChestShowArrows Displays previous/next arrows for navigating chests. true true, false
AccessPreviousChest Assigns the keybind for accessing the previous chest. LeftTrigger Any valid button code.2
AccessNextChest Assigns the keybind for accessing the next chest. RightTrigger Any valid button code.2
  1. See Range Values.

See Button Codes.

Auto Organize

Every night, after going to bed, your chests will automatically organize items based on the same rules as Categorize Chest and Stash to Chest. Items will only move between chests with the feature enabled, and only from a lower priority chest to a higher priority chest.

It also applies your Sort Inventory rules at the end.

Config Description Default Value Other Value(s)
AutoOrganize Enables the Auto Organize feature. "Enabled" "Disabled", "Default"1
  1. See Option Values.

Carry Chest

With Carry Chest enabled, you can hit the Use Tool button to pick up chests into your inventory even if it has items.

Config Description Default Value Other Value(s)
CarryChest Enables the Carry Chest feature. "Enabled" "Disabled", "Default"1
CarryChestLimit Limits how many chests can be carried. 3 Any positive integer.2
CarryChestSlow Enables the Carry Chest Slow feature. Enabled "Disabled", "Default"1
CarryChestSlowAmount The speed penalty for carrying chests above the limit. -1 Positive integer from 0 (normal speed) to 4 (slime speed debuff)
CarryChestSlowLimit The limit in which the slowness effect is applied. 1 Any positive integer.2
  1. See Option Values.
  2. Use 0 for unlimited chests.

Categorize Chest

Assigns items to a chest based on a search term to be used for Auto Organize and Stash to Chest.

See Using Search for more information.

Config Description Default Value Other Value(s)
CategorizeChest Enables the Categorize Chest feature. "Enabled" "Disabled", "Default"1
CategorizeChestBlockItems Determines if non-categorized items will be blocked. "Disabled" "Disabled", "Default"1
CategorizeChestIncludeStacks Determines if existing stacks will be included. "Enabled" "Disabled", "Default"1
  1. See Option Values.

Chest Finder

Search for which chest(s) have the item you're looking for.

See Using Search for more information.

Config Description Default Value Other Value(s)
ChestFinder Enables the Chest Finder feature. "Enabled" "Disabled", "Default"1
ToggleSearch Assigns a keybind to toggle the chest finder. "LeftControl + F, RightControl + F" Any valid button code.1
  1. See Option Values.

See Button Codes.

Collect Items

While you are carrying a chest in your inventory, any items you pick up may be collected directly into the chest, bypassing your inventory.1

Config Description Default Value Other Value(s)
CollectItems Enables the Collect Items feature. "Enabled" "Disabled", "Default"1
  1. See Option Values.

Configure Chest

Set individual configuration options for storages.

Config Description Default Value Other Value(s)
ConfigureChest Enables the Configure Chest feature. "Enabled" "Disabled", "Default"1
ConfigureChest Assigns the keybind for configuring a chest. "End" Any valid button code.2
  1. See Option Values.

See Button Codes.

Craft From Chest

Hit a configurable key to bring up a crafting menu that uses items stored in nearby chests. This feature requires Better Crafting to be installed.

Config Description Default Value Other Value(s)
CraftFromChest Enables the Craft From Chest feature. "Location" "Disabled", "Default", "Inventory", "Location", "World" 1
OpenCrafting Assigns the keybind for opening the crafting menu. "K" Any valid button code.2
CraftFromChestDisableLocations A list of locations that crafting will not be allowed in. [] The locations to block.3
CraftFromChestDistance Limits the distance that a chest can be crafted from. -1 Any positive integer or -1.4
  1. See Range Values.

See Button Codes.

  1. Add "UndergroundMine" to the list to disable in Mine and Skull Cavern.
  2. Measured in tiles away from the player. Use -1 for "unlimited" distance.

HSL Color Picker

Replaces the Chest Color Picker with a more precise version that lets you pick a color with sliders for hue, saturation, and lightness.

Config Description Default Value Other Value(s)
HSLColorPicker Enables the HSL Color Picker feature. "Enabled" "Disabled", "Default"1
HSLColorPickerHueSteps How many intervals of hue can be selected. 29 Any positive integer.
HSLColorPickerSaturationSteps How many intervals of saturation can be selected. 16 Any positive integer.`
HSLColorPickerLightnessSteps How many intervals of lightness can be selected. 16 Any positive integer.
HSLColorPickerPlacement Which side will the Color Picker be added to. "Right" "Left"
  1. See Option Values.

Inventory Tabs

Adds inventory tabs to the side of the menu.

Config Description Default Value Other Value(s)
InventoryTabs Enables the Inventory Tabs feature. "Enabled" "Disabled", "Default"1
InventoryTabList Determines what inventory tabs will appear.

Lock Item

Lock an item in its storage so to prevent it from being moved or sold.

Config Description Default Value Other Value(s)
LockItem Enables the Lock Item feature. "Enabled" "Disabled", "Default"1
LockItemHold Hold the LockSlot key and click to lock a slot. true false
LockSlot Assigns the keybind for locking a slot. "A" Any valid button code.3
  1. See Option Values.

See Button Codes.

Open Held Chest

With a chest as your active item, you can hit the action button to bring up the chest menu and access the chests contents.

Config Description Default Value Other Value(s)
OpenHeldChest Enables the Open Held Chest feature. "Enabled" "Disabled", "Default"1
  1. See Option Values.

Resize Chest

The default storage for a chest is 36 items. With Resize Chest enabled you can increase storage space up to virtually unlimited storage.1

Config Description Default Value Other Value(s)
ResizeChest Enables the Resize Chest feature. "Large" "Disabled", "Default", "Small", "Medium", "Large"2
ResizeChestCapacity The number of items the chest can store. 70 Any positive integer or -1.3
ScrollDown Assigns a keybind to scroll down. "DPadDown" Any valid button code.4
ScrollUp Assigns a keybind to scroll up. "DPadUp" Any valid button code.4
ScrollPage Assigns a keybind to hold to scroll one page at a time. "LeftShift, RightShift" Any valid button code.4
  1. If the number of items exceeds the menu space, you can scroll to access the overflow.
  2. See Option Values.
  3. Use -1 for "unlimited" items or a positive multiple of 12 for limited storage.

See Button Codes.

Search Items

Adds a search bar to the top of the Chest Menu to only display items that meet a search criteria.

See Using Search for more information.

Config Description Default Value Other Value(s)
SearchItems Enables the Search Items feature. "Enabled" "Disabled", "Default"1
SearchItemsMethod Determines how the search will be applied. "GrayedOut" "Default", "Sorted", "GrayedOut", "Hidden"
  1. See Option Values.

Shop From Chest

Allows shops to access items in chests for purchases.

Config Description Default Value Other Value(s)
ShopFromChest Enables the Shop From Chest feature. "Location" "Disabled", "Default", "Inventory", "Location", "World" 1
  1. See Range Values.

Sort Inventory

Organize Chest allows you to group and sort items by a configurable property of those items.

Config Option Description Default Value Other Value(s)
SortInventory Enables the Sort Inventory feature. "Enabled" "Disabled", "Default"1
SortInventoryBy The fields that inventory will be sorted by. "" See Sort By Values.
  1. See Option Values.

Stash To Chest

Hit a configurable key to instantly stash items from your inventory into nearby chests.1

Config Option Description Default Value Other Value(s)
StashToChest Enables the Stash To Chest feature. "Location" "Disabled", "Default", "Inventory", "Location", "World"2
StashItems Assigns the keybind for stashing items. "Z" Any valid button code.3
StashToChestDisableLocations A list of locations that stashing will not be allowed in. [] The locations to block.4
StashToChestDistance Limits the distance that a chest can be stashed into. -1 Any positive integer or -1.5
StashToChestPriority Prioritize certain chests over others. 0 Any integer value.
TransferItems Assigns the keybind to hold for transferring items up. "LeftShift, RightShift" Any valid button code.3
TransferItemsReverse Assigns the keybind to hold for transferring items down. "LeftAlt, RightAlt" Any valid button code.3
  1. Included chests are determined by config options.
  2. See Range Values.

See Button Codes.

  1. Add "UndergroundMine" to the list to disable in Mine and Skull Cavern.
  2. Measured in tiles away from the player. Use -1 for "unlimited" distance.

Storage Info

Display stats about the storage in the chest menu and when hovering the cursor over a storage.

Config Description Default Value Other Value(s)
StorageInfo Enables the Chest Info feature. "Enabled" "Disabled", "Default"1
StorageInfoHoverItems The info to show on hover. "Icon","Name","Type","Capacity","TotalValue" Any valid button code.2
StorageInfoMenuItems The info to show in menu. "Type","Location","Position","Inventory","TotalItems","UniqueItems","TotalValue" See Info Values.
ToggleInfo Assigns a keybind to show/hide chest info. "LeftShift + OemQuestion, RightShift + OemQuestion" See Info Values.
  1. See Option Values.

See Button Codes.

Usage

Using Search

Searching can be applied to an item's name, but it's often more useful to use tags which are shared by multiple items.

The game adds various Context Tags to each item which are used throughout this mod.

There are a few ways to see what context tags each item contains:

  • Enter the console command debug listtags to show all tags for the currently held item.
  • Refer to the Modding Docs for some tags.
  • Install Lookup Anything, enable ShowDataMiningField in its config and hit F1 while hovering over any item.

Here are examples of some useful tags:

Description Tags
Category category_clothing, category_boots, category_hats, ...
Color color_red, color_blue, ...
Name item_sap, item_wood, ...
Type wood_item, trash_item, ...
Quality quality_none, quality_gold, ...
Season season_spring, season_fall, ...
Index id_o_709, id_r_529, ...

Configurations

For ease of use, it is recommended to set config options from Generic Mod Config Menu.

Config Inheritance

For some config options, the same options can be applied to multiple levels. The lowest level config will always take precedence.

  • Default Chest - Every chest inherits from the Default Chest options.
  • Chest Type - Applies to a particular type of chest.
    • Chest
    • Stone Chest
    • Junimo Chest
    • Auto-Grabber
    • Mini-Fridge
    • Mini-Shipping Bin
    • Fridge
    • Custom chests added by other mods.1
  • Individual Chest - A single instance of a chest can be configured individually.

Sort By Values

Group by is a text property of the item that organize will order by first.

  • Category - Sort by the category.
  • Name - Sort by the name.
  • Quantity - Sort by the quantity.
  • Quality - Sort by the quality.
  • Type - Sort by the item type.

Info Values

The types of info that can be displayed.

  • Name - The storage name.
  • Icon - The storage icon.
  • Type - The type of storage.
  • Location - The location of the storage.
  • Position - The position of the storage.
  • Inventory - The farmer whose inventory contains the storage.
  • Capacity - The number of item stacks and slots in the storage.
  • TotalItems - The total items in the storage.
  • UniqueItems - The number of unique items in the storage.
  • TotalValue - The total value of all items in the storage.

Option Values

The option value determines whether a feature will be enabled or disabled for a chest.

  • Default - The value will be inherited from a parent config.1
  • Disabled - The feature will be disabled.
  • Enabled - The feature will be enabled.
  1. If parent value is unspecified, Enabled will be the default value.

Range Values

The Range value limits which chests will be selected for a feature relative to the player.

  • Default - The value will be inherited from a parent config.1
  • Disabled - The feature will be disabled.
  • Inventory - Only chests in the player inventory.
  • Location - Only chests in the players current location.
  • World - Any chest accessible to the player in the world.
  1. If parent value is unspecified, Location will be the default value.

Mod Integrations

Automate

When Filter Items is enabled, then any categorizations that a chest has will be applied to Automate. This means that Automate will be blocked from adding items into the chest if the Filter list does not allow it.

Better Crafting

Craft from Chest will launch a Better Crafting Page and it will correctly include all chests with the feature enabled.

Horse Overhaul

Better Chests automatically integrates with Horse Overhaul saddlebags. The distance to the player's Horse will be considered for features such as Craft from Chest and Stash to Chest.

The SaddleBag can have its own Better Chest config by adding an entry for a chest named "SaddleBag" to the BetterChests/assets/chests.json file.

Customization

API

Register your chest using the Better Chests API.

Other Assets

Icons

Replace any or all of the icons for the Configure, Craft from Chest, and Stash to Chest buttons by editing the image1:

furyx639.BetterChests/Icons.

Sample content.json:

{
  "Format": "1.24.0",
  "Changes": [
    {
      "Action": "EditImage",
      "Target": "furyx639.BetterChests/Icons",
      "FromFile": "assets/MyConfigureButton.png",
      "FromArea": {"X": 0, "Y": 0, "Width": 16, "Height": 16},
      "ToArea": {"X": 0, "Y": 0, "Width": 16, "Height": 16}
    },
  ]
}
  1. See the Edit Image docs for Content Patcher.

Tab Texture

Replace any or all of the default tab textures by editing the image1:

furyx639.BetterChests\\Tabs\\Textures

Sample content.json:

{
  "Format": "1.24.0",
  "Changes": [
    // Replace texture for mining icon
    {
      "Action": "EditImage",
      "Target": "furyx639.BetterChests\\Tabs\\Texture",
      "FromFile": "assets/mining-icon.png",
      "FromArea": {"X": 0, "Y": 0, "Width": 16, "Height": 16},
      "ToArea" {"X": 48, "Y": 0, "Width": 16, "Height": 16}
    }
  ]
}
  1. See the Edit Image docs for Content Patcher.

Translations

See here for the base translation file.

Language Status Credits
Chinese ✔️ Complete Andyc66, zhaokun0914
French ✔️ Complete Ayatus, CaranudLapin
German ❔ Incomplete Loni4ever, Popa-42, Kuhlyus
Hungarian ❔ Incomplete martin66789
Italian ✔️ Complete zomboide
Japanese ❌️ Not Translated
Korean ✔️ Complete wally232
Portuguese ✔️ Complete Aulberon
Russian ❔ Incomplete Newrotd
Spanish ✔️ Complete Querbis
Turkish ✔️ Complete KawaiFoxHappyClaws76