Azrael's Mods

← All Sun Haven mods

The Vault

Locked to the character

BepInExStorage

A per-character vault for the currencies and keys that clutter a bag. Deposit, withdraw, and let shops spend from the vault when the game checks your pockets.

Open it with Ctrl+V, F8, or LB+Y. F7 shows or hides the HUD. On Steam Deck, amount chips and touch-sized rows are there, and B closes the window.

Download the-vault-4.3.1.zipThunderstoreNexus

What it does

Deposit and withdraw

Pick a row, set an amount (or 1 / 5 / 10 / Max), then withdraw into the bag or deposit from it. Drag the HUD's top strip to park it.

Shops and keys

When the game checks or spends a vault-backed currency, the vault counts. Auto-deposit can put new currency away for you.

Custom currencies

Other mods can register a currency at runtime. Those show on the Custom tab. The API lives in TheVault.Abstractions.dll, which must sit next to TheVault.dll.

v4.3.1Current

  • Cleanup: Unused and unreachable code removed across these mods. Nothing you use changes, and saves are untouched.
Older versions (v4.3.0, v4.2.2, v4.2.1, v4.2.0, v4.1.3, v4.1.2, v4.1.1)

v4.3.0Download v4.3.0

  • Save format: New saves use CSVAULT3: a random per-vault salt, a fresh IV per write, PBKDF2-SHA256 with 100,000 iterations, and an HMAC-SHA256 integrity check verified before decrypting. A corrupted or edited file fails cleanly and falls back to the backup. CSVAULT2 and older files still load and are rewritten as CSVAULT3 on load.
  • Fix: CSVAULT3 keys use the character name only, so they no longer depend on Steamworks load timing. For older files, a failed Steam ID lookup is retried instead of latched for the session, and the player-portable key is always tried.

v4.2.2Download v4.2.2

  • Fix: The vault window consumes mouse input. Inventory slots under the cursor no longer pick up or throw items while the window is open.

v4.2.1Download v4.2.1

  • Fix: Window scale follows Screen.height/1080 when ScaleWithResolution is on, so 1440p and ultrawide stay readable. AutoHighResLayout raises the default scale once on those displays.
  • Removed unused door, shop, save, and inventory hooks that were never registered.

v4.2.0Download v4.2.0

  • Touch targets: Currency row toggle and -1/-5/-10 withdraw buttons use a ≥44px minimum (scale with WindowScale). Row height 52; window width 560.
  • Amount chips: When a currency is selected, 1 / 5 / 10 / Max chips set the qty field (Max = vault balance). Deposit/Withdraw/chips use ≥44px control height.
  • Controller open: Hold LB + press Y (JoystickButton4 held + JoystickButton3 down) toggles the vault via ToggleMainVaultWindow. Configurable: [UI] ControllerOpenEnabled (default true), ControllerOpenModifier, ControllerOpenButton. Settings tab has an Enable toggle + hint; F8 AltToggle still works for Steam Input keyboard layers.
  • Controller close: Escape still closes; also tries game cancel (UICancel / Cancel / Close) so Steam Input B can dismiss the vault. No global Harmony block of UICancel.
  • Deck layout defaults: [Display] AutoDeckLayout (default true) once raises WindowScale / HUD Scale to at least 1.35 on Deck-like resolutions (1280×800 / 1280×720 or ≤1366×800 ~16:10). [Display] DeckLayoutApplied prevents re-fighting user prefs.

v4.1.3

  • Fix: Legacy vault recovery skips the plaintext CSVAULT2 header (shared VaultCryptography) so key-mismatch recovery can succeed again.
  • Fix: After a failed load, saving is blocked until you confirm Start Fresh in the Vault UI — so a surviving .backup is not overwritten by an empty in-memory vault.

v4.1.2

  • Fix: Tab buttons use owned textures on every IMGUI interaction state (including focused), so switching categories cannot fall back to the skin atlas "zoomed text" background.

v4.1.1

  • Fix: HasEnough combines bag + vault; deposit/auto-deposit rolls back inventory when vault credit fails; menu ResetState clears auto-deposit guard flags.
  • Fix: Load restores from .backup when the primary save file is missing or unreadable (crash during atomic save), instead of silently starting an empty vault. Tries candidates in order canonical → backup → legacy; quarantines corrupt primary when backup/legacy loads; resets re-encryption flag per candidate.
  • Fix (pt-BR): Re-applied native-speaker Portuguese (Brazil) strings with correct UTF-8 encoding.
  • Fix: GetVaultAmount supports registered custom_ currencies in inventory merge paths.
  • Fix: Shop currency deduction runs only after prefix-approved vault purchases.
  • Fix: HUD recreated when destroyed without recreating the full vault window.
  • Fix: Encryption mode and secret-gift hash logs downgraded to debug.

Good to know

  • Ship both TheVault.dll and TheVault.Abstractions.dll.
  • A release that cannot keep old vault saves says so at the top of the mod readme, on the store pages, and in the log. Until that warning, do not delete the vault save for a normal update.

Works with

  • HavenDevToolsThe full currency inspector is switched on from HavenDevTools, not from TheVault.cfg.
  • Haven's AlmanacAlmanac can read vault totals into the morning briefing.

Report a problem

This report is for The Vault on Sun Haven.