Sinka
Snap points for chests, fences and anything else that will not line up.
About this mod Author’s original text
Sinka
Sinka adds snap points to the vanilla pieces that ship without any, mainly chests, fences
and stake walls. Place one and the next snaps flush beside it or squarely on top, the same
way walls and floors already do.
Named for the dovetail joint. It started as a chest mod and now covers fences too; the name
stayed so existing config files keep working.
Features
- Eight snap points, one on each corner of a piece's own measured footprint.
- Fences and stake walls get a ladder of points up each end instead, so a fence line can
follow sloping ground.
- A standing torch placed on a pole snaps down into it, centred, with only its head showing
above the top. Which torches and which poles is a config list, and how much of the torch
still shows is measured off its own fire when you do not say.
- Gap is per prefab where you want it to be, so chests can sit flush in the same world
where stakes stand a hand apart.
- A chest can be set down on top of another chest, which vanilla refuses outright. Read the
server warning under Stacking chests before using it on a server.
- Containers are matched by component, so modded chests are covered without naming them.
- Fences are matched by a config list you can extend.
- PointOverrides takes exact coordinates for a named prefab when the derived box is wrong.
- Optional: snap every buildable piece the game never gave points to.
- Pieces that already have snap points, vanilla or from another mod, are left alone.
- Nothing is added to prefabs you cannot build, so dungeon loot chests and pots stay
unsnappable.
How the snapping works
A snap point in Valheim is a child transform tagged snappoint, and that is all the game
needs. While you hold a placement ghost, FindClosestSnapPoints picks the closest pair of
points within 0.5m, one on the ghost and one on a placed piece nearby, then moves the ghost
so the two points become the same point.
That rule is why Sinka uses corners and nothing else. A ghost's left corner landing on a
placed chest's right corner is flush adjacency, and a bottom corner landing on a top corner
is a clean stack. Mixing corners with face centres would let a chest snap half its own
width out of line.
Gap pushes the corners outward by half its value, since both pieces contribute half the
space between them. Gap = 0.1 leaves 10cm between two chained chests.
Footprints are measured at load from collider data, and only from the geometry that will
actually be standing there. A built piece carries its damage states and destruction chunks
in the same prefab, and measuring all of them at once inflates the box: wood_fence comes
out 2.72 x 2.30 x 0.85 that way against a panel of roughly 2.0 x 1.5, which would leave
chained fences standing 0.72m apart.
The fence ladder
Eight corners give a fence two heights to attach at, its base and a full panel up. Neither
helps you run a fence up a hill, so a fence gets points up both ends instead, at mid-depth,
every FenceLadderStep metres, starting FenceLadderBelow metres under its own base so
the next panel can step down as well as up. The rungs run along whichever horizontal axis
of the piece is longer.
The ladder is capped at 24 rungs per piece. A tall piece with a small step hits that cap and
logs a warning saying where the ladder stopped.
Torches on poles
Aim a standing torch at the top of a pole and it snaps down into the pole, centred on it,
with only its head standing above the top. Build the pole first; the torch goes on afterwards.
What pairs with what is the Sockets setting, one entry per line of pieces:
piece, piece: target, target: metres showing; next entry
Semicolons separate entries, colons separate an entry's three fields, commas separate names
within a field. Out of the box that is the four standing torches and the mist demister, into
the seven poles that exist and can be built: wood, core wood, darkwood and ashwood. The
dvergr pole is a prefab you cannot place, so it is not among them.
The torch snaps only while
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- 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.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- 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.
Install these first, or the mod will not work: