You are viewing a potentially older version of this package. View all versions.
Baka_Gaijin-FinalSunsetPermadeath-1.4.1 icon

FinalSunsetPermadeath

Hardcore permadeath: loose loot destroyed on death, all skills reset to zero. Equipped gear AND every ExtraSlots slot are left in your grave to recover; worn backpack is kept but its contents are wiped. SecondChance-compatible.

Date uploaded 2 weeks ago
Version 1.4.1
Download link Baka_Gaijin-FinalSunsetPermadeath-1.4.1.zip
Downloads 25
Dependency string Baka_Gaijin-FinalSunsetPermadeath-1.4.1

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2200 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.

Preferred version: 5.4.2200
ValheimModding-Jotunn-2.29.0 icon
ValheimModding-Jotunn

Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.

Preferred version: 2.29.0

README

Final Sunset Permadeath

Hardcore death penalties for the Final Sunset modpack. When you die for real, you lose your loose loot and skills — but the gear you were wearing and everything in your special slots stays in your grave to be recovered.

What happens on death

Slot Result
Equipped gear (armor, weapon, shield, cape, utility, trinket) KEPT IN GRAVE — walk back to your tombstone to recover
ExtraSlots: equipment, trinket/utility, food, ammo, quick, misc KEPT IN GRAVE
Worn AdventureBackpacks backpack ITEM KEPT IN GRAVE, but its stored contents are WIPED
Hotbar (slots 1-8) DESTROYED
Inventory (vanilla backpack grid) DESTROYED
All skill levels RESET TO 0
Tombstone Holds your equipped gear + all ExtraSlots items (backpack emptied)

Loose items in the vanilla backpack grid and hotbar are permanently destroyed — not dropped, not recoverable. The contents stored inside a worn backpack are also destroyed (the backpack itself is kept). Skills are fully zeroed, not just reduced. Your worn gear and special-slot items survive in the tombstone.

Edge case safety (v1.1)

  • Boss fights / multi-death: Each client tracks tombstone instance IDs before and after death. Only the tombstone created by YOUR death is processed — never another player's, never an old uncollected one.
  • Old tombstones nearby: Instance-ID tracking means proximity doesn't matter. Your old tombstone 1m away is safe.

How gear and slots are kept (v1.2 / v1.3)

In the CreateTombStone Prefix the plugin snapshots the object references of every item that should be kept — captured before those items move into the tombstone:

  • vanilla equipped items (m_equipped): weapon, tool, shield, armor, cape…
  • every item in an ExtraSlots special slot, via ExtraSlots.API.GetAllExtraSlotsItems() (equipment, trinket/utility, food, ammo, quick, misc, and the worn backpack item)

In the Postfix it removes everything from the new tombstone except those snapshotted references (with the m_equipped flag as a fallback). Because the references survive the move, this works even if the game clears the equipped flag during death processing.

ExtraSlots and AdventureBackpacks are both soft dependencies (queried by reflection). If ExtraSlots is absent, the keep-set falls back to equipped-only (v1.2 behaviour). If AdventureBackpacks is absent, the backpack-wipe step is skipped.

Backpack content wipe (v1.4)

A worn AdventureBackpacks backpack is one of the items kept in the grave (it's equipment). To prevent it from being a permadeath loophole, its stored contents are emptied: the plugin resolves the backpack via AdventureBackpacks.API.ABAPI.GetBackpack(item), clears the backpack's internal inventory, and persists the emptied state through the Vapok custom-data save path so the grave stores an empty backpack. You keep the backpack; you lose what was inside it.

SecondChance compatibility

This plugin is fully compatible with BalrondSecondChance's downed/revive system:

  • Downed (HP reaches 0): SecondChance activates. You can be revived by a friend (free) or self-revive with MeadHealthMinor. No permadeath penalties applied.
  • Dead (revive timer expires): Permadeath penalties fire. Non-equipped items destroyed, equipped gear left in grave, skills reset.

The plugin detects real death vs downed state by tracking whether CreateTombStone was called inside OnDeath. If SecondChance blocks death (downed state), no tombstone is created and the plugin skips.

Server enforcement (v1.2 / v1.3)

The server requires this mod on every connecting client, at a matching major.minor version (now 1.4.x). This is enforced through Jötunn's NetworkCompatibility(EveryoneMustHaveMod, VersionStrictness.Minor):

  • A client missing the mod → rejected at the connection screen.
  • A client on an older version (e.g. 1.3.x) → rejected with a version-mismatch UI listing the offending mod.
  • A client on 1.4.x → allowed.

This guarantees death processing is identical for everyone — nobody can join with a stale build and lose (or keep) the wrong items. Every player who can die needs a matching 1.4.x build. Requires Jötunn (listed as a dependency).

Installation

Install on the server and all clients (required — both the network check and client-authoritative death processing depend on it). Every player who can die needs a matching 1.4.x build.

Drop FinalSunsetPermadeath.dll into BepInEx/plugins/ or install via Thunderstore Mod Manager. Jötunn must also be present. ExtraSlots and AdventureBackpacks are optional (soft dependencies) but recommended for the full keep-set / backpack-wipe behaviour.

Verification

Check BepInEx console on startup for:

FinalSunsetPermadeath v1.4.0 loaded | skillData=ok level=ok acc=ok createTombStone=ok extraSlotsApi=ok backpackApi=ok itemInfoData=ok

On death, console will show:

[FinalSunsetPermadeath] Tombstone [id=XXXXX]: kept N item(s) (equipped + extra slots) in grave, destroyed M item(s), wiped K item(s) from backpack(s)
[FinalSunsetPermadeath] Reset N skill(s) to level 0

CHANGELOG

Changelog

1.4.1

  • FIX: the mod is now authoritative over death regardless of the world's difficulty/preset. If the world has the Hardcore death penalty baked in (the deathdeleteitems / deathdeleteunequipped world modifiers), vanilla would delete your entire inventory on death and never create a tombstone — so nothing was kept and no grave appeared. A new patch (Patch_NeutralizeDeathDeleteModifier) intercepts every single-argument ZoneSystem.GetGlobalKey overload (string and GlobalKeys enum) and reports those two death-delete keys as inactive, so vanilla always builds the tombstone and the keep-equipped-gear logic runs. Every other world modifier (no-map, portals, boss keys, etc.) is untouched.
  • The death check runs on the dying player's client, so this DLL must be present on the server and every client for the grave to appear for that player. Network compatibility is unchanged (1.4.x), so 1.4.0 clients can still connect — but they must update to 1.4.1 for the fix to apply to their own deaths.

1.4.0

  • NEW: The worn AdventureBackpacks backpack is kept in the grave, but its STORED CONTENTS are now WIPED on death. You recover the backpack item itself, but everything inside it is destroyed — closing the permadeath loophole where a full backpack rode along untouched on the kept backpack item. Implemented via the AdventureBackpacks public API (ABAPI.GetBackpack) → live backpack Inventory.RemoveAll() → persisted through the Vapok custom-data save path (ItemExtensions.Data(item).Save()); the tombstone container is then force-re-serialized via Inventory.m_onChanged so the grave stores the emptied backpack. AdventureBackpacks is a soft dependency — no effect if it isn't installed.
  • Server enforcement bumped to 1.4.x (NetworkCompatibility(EveryoneMustHaveMod, Minor)): clients on 1.3.x or earlier, or missing the mod, are now rejected at the connection screen with a version-mismatch UI. Update all clients.
  • Tombstone log now reports kept N item(s) (equipped + extra slots) in grave, destroyed M item(s), wiped K item(s) from backpack(s).

1.3.0

  • CHANGE: The keep-set expanded from "equipped only" to "equipped + ALL ExtraSlots special slots". On death, everything in an ExtraSlots slot — equipment, trinket/utility, food, ammo/arrows, quick, misc, and the worn backpack — plus your vanilla equipped gear (armor, cape, shield, and the currently equipped weapon/tool/pickaxe) is now KEPT IN YOUR GRAVE. Only loose loot in the vanilla backpack grid and hotbar is destroyed. Skills still reset to 0. ExtraSlots is a soft dependency: if it's absent, the mod falls back to the v1.2 equipped-only behaviour.
  • ExtraSlots items are captured by object-reference snapshot in the CreateTombStone Prefix (before they move into the grave), queried through ExtraSlots.API.GetAllExtraSlotsItems().
  • Server enforcement bumped to 1.3.x (NetworkCompatibility(EveryoneMustHaveMod, Minor)): clients on 1.2.x or missing the mod are now rejected. Update all clients.
  • Tombstone log now reports kept N item(s) (equipped + extra slots) in grave, destroyed M item(s).

1.2.0

  • NEW: Server now REQUIRES this mod on every client. Via Jötunn NetworkCompatibility(EveryoneMustHaveMod, Minor), any client missing the mod or running a different major.minor version (e.g. 1.1.x) is rejected at the connection screen with a version-mismatch UI. This guarantees death processing is consistent for everyone — no friend can connect without keeping their worn gear / losing the rest. Requires Jötunn (added as a dependency).
  • CHANGE: Equipped gear is now KEPT IN YOUR GRAVE on death (recoverable) instead of destroyed. Walk back to your tombstone to reclaim the armor/weapon/shield/utility you were wearing. Everything non-equipped (hotbar, inventory, food, ammo, misc) is still destroyed, and all skills still reset to 0.
  • Equipped items are identified by an object-reference snapshot taken in the CreateTombStone Prefix, before the items move into the tombstone — robust against the equipped flag being cleared during the move. The m_equipped flag is used as a secondary fallback.
  • Tombstone log now reports kept-vs-destroyed counts: kept N equipped item(s) in grave, destroyed M item(s).

1.1.0

  • FIX: Wrong tombstone targeted during boss fights — v1.0 used proximity-based search (nearest within 4m) which could target another player's tombstone or an old uncollected one. Now uses instance-ID tracking: Prefix snapshots all existing tombstone IDs, Postfix finds the exact new tombstone created by this death.
  • FIX: Old tombstone near death position — no longer possible to accidentally destroy items from a previous death's tombstone.
  • Tombstone destruction log now includes instance ID for debugging.

1.0.0

  • Initial release
  • Destroys all inventory and hotbar items on death (tombstone spawns empty)
  • Resets all skill levels (vanilla + modded) to 0 on death
  • SecondChance-safe: only fires on real death, not downed state
  • ExtraSlots-compatible: equipped armor preserved, everything else destroyed
  • Reflection-based skill access (works with modded skills from Smoothbrain etc.)