# Keep Items On Death

**Keep 100% of your inventory when you die.** No corpse run, no gravestone to hike back to.

Adds a **Keep Items On Death** toggle to *Settings → Gameplay*, so you can turn it on and off
without touching files.

- **Version:** 1.1.0
- **Game build:** RuneScape: Dragonwilds `CL-232224` (UE 5.6.1) — the current live build
- **Requires:** UE4SS — a build that supports **Unreal Engine 5.6** (see step 1 below)

Nothing else — no content/pak mods, and no other mods need to be installed alongside it.

> **Do not use UE4SS stable 3.0.1.** It predates Unreal Engine 5.6 and will not attach to
> Dragonwilds. It fails quietly, so it looks like this mod is broken when nothing has loaded at
> all. Step 1 points at the builds that do work.

---

## How it works

Dragonwilds already knows how to let you keep your inventory when you die — it exists as one of
the game's own difficulty settings. The catch is that the game decides which of those settings
are offered in the menus, and on a Normal or Hard world this one is simply never shown to you.

This mod turns that existing setting on. It does not add a new death system, patch game files,
or replace any assets — which is why it is small, and why it should survive minor patches.

When it is on you simply keep everything, and **no gravestone is created at all**.

As a safety net, the mod also empties any gravestone that already belongs to you back into your
inventory — useful for a grave you left behind *before* installing the mod. If your inventory
is full, whatever does not fit stays in the grave rather than being destroyed.

## Installation

Starting from a clean game install, there are four steps. Most of the work is UE4SS; the mod
itself is drag-and-drop.

### 1. Get a UE4SS build that supports UE 5.6

Either of these works:

- **Recommended —** the Dragonwilds-specific UE4SS build on Nexus Mods
  ([runescapedragonwilds/mods/4](https://www.nexusmods.com/runescapedragonwilds/mods/4)). Engine
  detection for this game is already sorted out, so it is the path with the fewest surprises.
- **Alternative —** upstream [RE-UE4SS](https://github.com/UE4SS-RE/RE-UE4SS) from the
  **`experimental-latest`** release. UE 5.6 support lives in the experimental line, *not* in the
  stable 3.0.1 download.

Use the complete download rather than a cut-down one. This mod uses the shared helper library
UE4SS ships with, at `...\ue4ss\Mods\shared\` — present in any normal install, but if it has
been stripped out the mod will not start.

### 2. Install UE4SS

Extract it so the loader and its folder sit directly in the game's `Win64` folder:

```
<Steam>\steamapps\common\RSDragonwilds\RSDragonwilds\Binaries\Win64\
    dwmapi.dll
    ue4ss\
```

Close the game first — those files are locked while it runs.

### 3. Check UE4SS actually attached

**Do this before installing the mod**, so that if something is wrong you know which half it is.
Launch the game once, quit, then look for:

```
...\Binaries\Win64\ue4ss\UE4SS.log
```

It should exist and mention engine version **5.6**. Pressing **Tilde (~)** or **F10** in game
should also open a console.

If the log is missing or reports no engine version, UE4SS did not attach. Open
`...\ue4ss\UE4SS-settings.ini`, find the `[EngineVersionOverride]` section and set:

```
MajorVersion = 5
MinorVersion = 6
```

That skips version detection entirely and is the normal fix for a recent engine.

### 4. Install the mod

Extract this archive into the UE4SS `Mods` folder, so you end up with:

```
...\Binaries\Win64\ue4ss\Mods\KeepItemsOnDeath\
    enabled.txt
    mod.json
    README.md
    Scripts\main.lua
```

Launch the game and check *Settings → Gameplay* for the **Keep Items On Death** row.

**If the mod still does not load**, your UE4SS build may use the mod list instead of
`enabled.txt`. Open `...\ue4ss\Mods\mods.txt` and add this line above the final `; end` marker:

```
KeepItemsOnDeath : 1
```

## Using it

The mod is **on by default**. Your choice is remembered between sessions.

| How | What it does |
|---|---|
| *Settings → Gameplay* → **Keep Items On Death** | Tick / untick. The row is at the bottom of the page. |
| `dw_keepitems` | Force a recovery from your gravestone now |
| `dw_keepitems on` / `off` | Turn the mod on or off |
| `dw_keepitems status` | Report the current state |
| **Ctrl+Shift+F6** | Toggle on / off |

Console commands go in the game's dev console, opened with **Tilde (~)** or **F10**. That console
is provided by one of UE4SS's own bundled mods, which is switched on out of the box — if you have
turned it off, the settings checkbox and the keybind still work as normal.

## Uninstalling

Delete the `KeepItemsOnDeath` folder from `...\ue4ss\Mods\`. If you added the `mods.txt` line,
remove it too.

Nothing is written to your save. The mod changes settings in memory each session, so removing it
restores the game's stock death behaviour immediately.

## Notes and limitations

- **Tested in single-player and in co-op as the host.** Keeping items is a world-level setting, so
  the **host's** copy is the one that governs the session — install it on whichever machine hosts
  the world. Joining someone else's world with this installed is untested and is not expected to
  change their world's behaviour.
- The gravestone recovery only ever touches graves belonging to your own character, never another
  player's.
- **Turning it off mid-session** restores the values the game shipped with, which the mod records
  before changing anything.
- Built and verified against `CL-232224`. It looks the setting up from the game itself rather
  than assuming anything about it, so a patch that reorganises things internally is more likely
  to make the mod quietly do nothing than to make it misbehave — but after any large patch, check
  that it still works before trusting it with a long run.
- If it ever seems inert, check the log for `loaded OK` at startup. If that line is missing the
  mod failed to start, and the lines above it will say why.
- Logs to `...\ue4ss\UE4SS.log`, prefixed `[KeepItemsOnDeath]`, if you need to see what it did.

## Credits

Built against the shipping game build rather than guesswork — everything the mod touches was
checked against the client it runs on.
