Engineering Specification Document
📦

Senpai's Chest

Smart Chest Auto-Sorting System

v2.0.1
REV. B • Classification: Quality-of-Life • Status: Production

Abstract: Senpai's Chest lets you designate chests as "Smart Chests" with custom sorting rules. Items are automatically pulled from regular chests into the right smart chest based on your rules. Use built-in rule types or create your own Groups (e.g. Flowers, Vegetables) in the Manage Groups tab. Items that don't belong are ejected and rerouted. Set it and forget it.

Control Interface

F9
Open Config (Keyboard)
LB / L1
Open Config (Controller)
D-pad
Navigate UI
B / Esc
Close Config
Manage Groups
Button in config to create/edit custom groups

🔗 S.M.U.T. Interface Module

If S.M.U.T. (Museum Utility Tracker) is installed, the Museum Items property will automatically exclude items you've already donated. Only items you still need to donate will be sorted into your museum chest.

📝 Todo Subsystem Link

When both S.M.U.T. and Sun Haven Todo are installed, Senpai's Chest will automatically create todo tasks for undonated museum items found in your chests. When you donate the item, the todo is auto-completed — so you never forget to visit the museum!

System Components

🔄

Sort Engine

Items are automatically scanned and moved from regular chests into the correct smart chest on a configurable timer. No manual sorting needed.

🚫

Ejection Module

Items that don't match a smart chest's rules are automatically ejected and rerouted to the correct chest or back to a regular chest.

🎮

Controller Driver

Full controller navigation in the config UI. Open with LB/L1, navigate with D-pad, close with B. All buttons and fields are selectable.

🔍

Item Resolver

Search for items by name instead of memorizing IDs. Results show the item name and ID, and you can click to add a rule instantly.

👤

Save Manager

Each character has their own smart chest configuration. Switch characters and your sorting rules are always preserved.

🏛

Museum Filter

A dedicated property for museum-donable items. With S.M.U.T. installed, already-donated items are automatically excluded from sorting.

📝

Todo Bridge

With S.M.U.T. and Todo installed, auto-creates todo tasks for undonated museum items found in chests. Todos auto-complete when donated.

📋

Manage Groups Tab

Create custom subcategories (e.g. Flowers, Vegetables, Withergate Crops) and attach them to chests with one click. Edit a group once to update every chest using it. Reuse groups across multiple chests.

Sorting Rule Specifications

📦 Rule Type: ITEM

Sort a specific item by searching its name. The mod resolves the name to the correct item ID.

Input: "Gold Bar" → Output: Sorts all Gold Bars to this chest

🏷 Rule Type: TYPE

Sort all items of a specific type, like Equipment, Furniture, Consumable, etc.

Input: Type "Consumable" → Output: Sorts all food and potions

📁 Rule Type: CATEGORY

Sort by the game's internal item category such as Farming, Mining, Fishing, etc.

Input: Category "Mining" → Output: Sorts all ores and gems

✨ Rule Type: PROPERTY

Sort by item properties like Gems, Forageables, Meals, Fruits, Potions, Museum Items, and more.

Input: Property "Gems" → Output: Sorts all gem items

📋 Rule Type: GROUP

Sort by your own custom groups. Create groups in the Manage Groups tab, add items via search, then attach them to chests with one click. Ideal for separating flowers from crops or defining your own categories.

Input: Group "Flowers" → Output: Sorts all items in that group to this chest

Operating Procedure

1

Access Target Chest

Walk up to any chest in your farm and interact with it to open it normally.

2

Initialize Smart Mode

Press F9 on keyboard or LB/L1 on controller to open the Smart Chest configuration UI.

3

Define Rule Set

Choose a rule type (By Item, By Type, By Category, By Property, or By Group) and select what items this chest should collect. Use Manage Groups to create custom subcategories (e.g. Flowers, Vegetables) and attach them to chests with one click.

4

Engage Auto-Sort

Close the UI and go about your day. Every 60 seconds (configurable), the mod scans all nearby chests and sorts matching items into your smart chests.

System Parameters

Parameter Default Description
ScanInterval 60s Seconds between automatic scans (minimum 10)
EnableNotifications true Show in-game notification when items are sorted
MaxItemsPerScan 50 Maximum item stacks to move per scan cycle
ToggleKey F9 Key to open the config UI while a chest is open
RequireCtrlModifier false Require Ctrl to be held with the toggle key
ControllerToggleButton LB/L1 Controller button to open the config UI

Configuration file: BepInEx/config/com.azraelgodking.senpaischest.cfg

Assembly Instructions

📦

1. Install BepInEx

Download and install BepInEx 5.x for Unity games if you haven't already.

📥

2. Download Senpai's Chest

Get SenpaisChest.dll from Nexus Mods.

📁

3. Install the Module

Place the DLL in your BepInEx/plugins/SenpaisChest/ folder.

🎮

4. Commission!

Launch Sun Haven, open a chest, and press F9 to start configuring your smart chests.