ChestSnapping

v1.0.0·Updated 2026-10-09

Lets chests use Valheim's built-in snap system. Press Q/E while placing to pick one of 14 snap points. Works with modded chests, and the snap points can be adjusted in-game.

About this mod Author’s original text

Chest Snapping

Lets chests and other containers use Valheim's built-in snap system, the same way walls and floors do.

While placing a chest, press Q / E to cycle through its snap points. The normal message in the middle of the screen shows which one is active (for example Snapping: Bottom Front Left). Nothing about input or messages is re-implemented: vanilla already does the cycling and the message for any piece that has snap points. This mod just gives chests snap points.

Client-side only. Other players and servers do not need it.

Install

Requires BepInEx (BepInExPack_Valheim) and Jötunn. A mod manager such as Gale installs Jötunn for you.

Install with a mod manager, or put ChestSnapping.dll in BepInEx/plugins (Jötunn needs to be installed as well).

Snap points (cycle order)

| # | Name |

|---|------|

| 1-4 | Bottom Front Left, Bottom Front Right, Bottom Back Left, Bottom Back Right |

| 5-8 | Top Front Left, Top Front Right, Top Back Left, Top Back Right |

| 9-14 | Bottom Center, Top Center, Back Center, Front Center, Left Center, Right Center |

Points are placed on the chest's real collider bounds, so chests snap flush against each other. Front is the chest's local +Z and Right is +X, from the chest's own point of view. Names are localizable (English is provided, other languages fall back to English).

How to use it: pick a point on the chest you are holding (for example Bottom Back Right), aim near a snap point on another piece (another chest's corner or face center, or a wall/floor corner), and it locks on within vanilla's snap range (0.5 m). Rotation still matters: match the other chest's rotation with the normal rotate controls so the faces line up.

Built-in chests: piece_chest_wood, piece_chest, piece_chest_private, piece_chest_blackmetal.

Modded chests (or future vanilla chests)

No recompile needed. Use either way:

Console (F5)

| Command | What it does |

|---------|--------------|

| chestsnap_list [filter] | Lists every buildable container prefab and whether it has snap points. |

| chestsnap_add | Adds a prefab. Saved to the config, existing chests update immediately. |

| chestsnap_remove | Takes a prefab you added back off the list. |

Config file BepInEx/config/com.kydldev.ChestSnapping.cfg

  • ExtraPrefabs: comma-separated prefab names.
  • ExcludedPrefabs: prefabs that should not get snap points (also works for the built-in ones).
  • AutoDetectContainers (default off): every buildable piece with a Container on its root (ships and carts excluded) gets snap points automatically. Good for big modpacks, use ExcludedPrefabs for anything it catches that you do not want.

Prefab names are not case-sensitive.

Adjusting the snap points

Some modded chests have an oversized invisible collider or an off-center model, which puts the snap points in the wrong place. Each chest can be tuned separately. All distances are in meters along the chest's own axes (+X right, +Y up, +Z front). Both 0.05 and 0,05 are accepted in the console.

| Command | What it does |

|---------|--------------|

| chestsnap_show [on\|off] | Draws a sphere on every snap point (yellow = corners, cyan = face centers). Session only. |

| chestsnap_info | Prints the measured box, the current adjustments and where each of the 14 points ends up. |

| chestsnap_shift x y z | Moves all points together. |

| chestsnap_grow x y z | Adds to the box's half-size per axis. 0.05 makes the box 10 cm bigger on that axis, negative values shrink it. |

| chestsnap_point x y z | Offsets a single point. ` is 1-14 (the Q/E order) or a name such as top_front_left`. |

| chestsnap_reset [point] | Clears the adjustments of a chest, or of just one point. |

Setting a value to 0 0 0 clears it. Changes apply to chests that are already standing, and are saved in the config.

Example for a chest whose collider is 10 cm too wide and deep:

chestsnap_list crate

chestsnap_add MyMod_Crate

chestsnap_show on

chestsnap_grow MyMod_Crate -0.05 0 -0.05

chestsnap_point MyMod_Crate top_center 0 0

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.

Dependencies

Install these first, or the mod will not work:

ValheimModding-Jotunn

File & checksum

Filename
ChestSnapping-1.0.0.zip
File size
104.0 KiB