Haven’s Respec
Safe Skill Tree Respec · Tree-driven, Undo-aware|
v1.2.0Haven’s Respec lets you cleanly reset any of the five profession skill trees — Combat, Farming, Fishing, Mining, Exploration — without editing save files or forcing a new character. A styled confirmation dialog surfaces exactly how many skill points you are about to refund, a per-profession one-step Undo catches mis-clicks, and an optional cost model (free, gold, or gems) adds friction if you want some weight to the decision.
This is a clean-room mod — inspired by other community skill-respec mods but written from scratch. No node names are hardcoded: the service enumerates live SkillNode instances from Skills._professionNodeDictionary and whatever keys already exist on Profession.Nodes, so a game update that adds, renames, or re-arranges nodes does not break the reset.
Quick Controls
Core Features
Per-Tab Reset
A styled Reset button is injected onto every profession skill panel. Clicking it refunds every point spent in that tree and zeroes out Skills.skillPointsUsed and numActiveNodes for that profession.
One-Step Undo
Before a reset fires, the service snapshots the full node dictionary plus counters for that profession. An Undo button next to Reset restores the snapshot exactly, refunding the cost if one was charged. Snapshots do not survive a game restart.
Themed Confirmation
A uGUI modal built in the mod’s parchment-and-ink palette shows the exact number of points to refund, the cost (if any), and your current balance. Cancel / Reset buttons with hover tints; keyboard dismissable.
Configurable Cost
Three cost models: None (free, default), Gold (GoldPerPoint × points refunded), and Gems (GemsPerPoint × points refunded). Balances come from GameSave.Coins / Tickets; deductions go through Player.AddMoney / AddTickets.
Tree-Driven
No node-name allowlists. SkillResetService enumerates live SkillNode instances via reflection on Skills._professionNodeDictionary and unions in any keys already stored in Profession.Nodes, so every point is caught regardless of whether the panel has been opened yet.
Hotkeys
Two optional hotkeys — ResetCurrentTab and Undo — that act on whichever profession panel is currently open. Both default to KeyCode.None so nothing fires by accident.
Config Manager Ready
Every option is a BepInEx ConfigEntry bound through ConfigFileHelper so it shows up live in the BepInEx Configuration Manager — change cost mode, confirmation, hotkeys, or disable button injection without restarting the game.
Client-Side & Safe
All operations are applied to the local player’s Skills component. No network packets are sent. If you disable the mod, the next time you spend a point everything behaves exactly as stock Sun Haven.
Why a New Respec Mod?
The short version
Some other mods in this space hardcode node names ({Prof}{1..10}{a|b|c|d}), ship without confirmation, undo, or cost controls, or are no longer maintained. Haven’s Respec is written from the ground up with those gaps in mind — no files were copied from other mods.
What we do differently
- Tree-driven enumeration. We read the live
SkillNodeobjects the game builds inSkills._professionNodeDictionaryinstead of guessing node names. - Confirm + Undo. A dialog shows you what is about to happen, and a session-level snapshot lets you take it back.
- Optional cost. Default is free, matching the original behaviour, but you can enable a gold or gem cost per refunded point if you want the decision to sting.
- First-class Config Manager support. Every setting is live-editable.
- Maintained in the open. Ships out of this repository’s normal build / release pipeline alongside the rest of AzraelGodKing’s Sun Haven mods.
How It Works
Plugin Load
On Awake, the plugin replaces its own Config with a nicely named file via ConfigFileHelper, registers RespecConfig, instantiates SkillResetService, CostService, and RespecController, and applies a Harmony patch that postfixes Skills.SetupProfession.
Button Injection
When Skills.SetupProfession runs (opening a profession tab), RespecController spawns a RespecButtonInjector for that profession. It anchors off the existing _skillPointsTMP label and drops Reset / Undo buttons beside it with matching typography and hover tints.
Reset Flow
Clicking Reset runs BeginResetFlow: cost is checked, a confirmation dialog is built (unless Shift is held and skipping is enabled), and on confirm SkillResetService.ResetProfession zeroes every node and refreshes the UI. The cost (if any) is deducted through CostService.TryDeduct.
Undo Flow
Before the reset fires, a ResetSnapshot is pushed with the full node dictionary, skillPointsUsed, and numActiveNodes. Clicking Undo restores those values exactly and refunds the cost. Snapshots are per-profession and session-only.
Configuration
Every setting below is live-editable in the BepInEx Configuration Manager. The config file on disk lives at BepInEx/config/HavensRespec.cfg.
| Setting | Default | Description |
|---|---|---|
General → Enabled |
true | Master on / off. When false the mod loads but installs no patches and adds no buttons. |
UI → InjectButtons |
true | Add styled Reset / Undo buttons to each skill tab. Disable to use only hotkeys or external integrations. |
UI → RequireConfirmation |
true | Show the confirmation dialog before wiping a skill tree. Strongly recommended. |
UI → ShiftSkipsConfirmation |
true | If RequireConfirmation is on, holding Shift while clicking Reset bypasses the dialog. |
UI → EnableUndo |
true | Keep a one-step in-memory snapshot per profession and show an Undo button. |
UI → EnableResetAll |
true | Show a "Reset All" button above the profession tabs that confirms once and resets every tree in sequence. |
Cost → Mode |
None | Cost model: None (free), Gold (coins per refunded point), or Gems (tickets per refunded point). |
Cost → GoldPerPoint |
100 | Coins charged per refunded skill point when Mode = Gold (range 0–100,000). |
Cost → GemsPerPoint |
1 | Tickets / gems charged per refunded skill point when Mode = Gems (range 0–1,000). |
Hotkeys → ResetCurrentTab |
None | Optional key that triggers a reset of the currently-open skill tab. |
Hotkeys → Undo |
None | Optional key that undoes the last reset for the currently-open skill tab. |
Debug → DebugLogging |
false | Verbose logging for patch hits, button injection, node zero-out, and snapshot operations. |
Install
- Install BepInEx 5.x for Sun Haven if you haven’t already.
- Grab
HavensRespec.dllfrom GitHub Releases, Thunderstore, or Nexus Mods (files). - Drop it into
Sun Haven/BepInEx/plugins/HavensRespec/. - Launch the game, open any skill tree — you should see the Reset button next to the skill points counter.
- (Optional) Install BepInEx Configuration Manager to edit settings live.
Compatibility & Notes
BepInEx 5.x
Standard BepInEx 5 plugin targeting net48. Drop the DLL into BepInEx/plugins/HavensRespec/.
Reflection-Backed
All game-side reads (Skills, Profession, Player, GameSave) use cached reflection with graceful fallbacks. No AccessTools spam if a member name drifts on a future patch.
Multiplayer
Client-side only. Haven’s Respec edits the local player’s Skills component; it does not send anything over the network. In multiplayer, re-opening your tree or a quick reload will re-sync.
Save Safety
No save-file editing. If you uninstall the mod, your character keeps whatever state the skill tree was in the last time you played.
Localization
Button labels are injected without I2.Loc.Localize components attached so they render verbatim regardless of the active language.
Not a Copy
Haven’s Respec was written from scratch; no files were copied from other mods. The idea existed in the community before; this implementation is new.