Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Sinka
Snap points for chests, fences and anything else that will not line up.
| Date uploaded | 10 hours ago |
| Version | 1.0.1 |
| Download link | Ezomic-Sinka-1.0.1.zip |
| Downloads | 355 |
| Dependency string | Ezomic-Sinka-1.0.1 |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.
Preferred version: 5.4.2350README
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.
- Containers are matched by component, so modded chests are covered without naming them.
- Fences are matched by a config list you can extend.
PointOverridestakes 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.
Picking a snap point by hand
Q and E cycle the ghost's snap point while you are holding a piece (TabLeft / TabRight
in the keybinds, so they follow a rebind), and the chosen point's name shows in the middle
of the screen. Sinka names its points by position for that reason:
snap_top-front-left for corners, snap_left-y0.60 for a fence rung, snap_custom1 for a
point you supplied through PointOverrides.
What gets snapped
A piece has to be something you can actually build. The buildable set is read off the game's
own piece tables, so the Hammer, Hoe, Cultivator and any modded tool with its own table all
contribute and nothing needs listing. Turning BuildablePiecesOnly off drops that filter
and snaps anything with a Piece component, which includes dungeon loot chests and pots.
Past that filter there are three ways in:
- Containers (
SnapContainers, on): anything with both aPieceand aContainer. Ships are excluded. - Fences (
SnapFences, on): the prefab names inFencePrefabs. Nothing about a fence's components distinguishes it from any other wall, so this one needs names. - Everything else with no points of its own (
SnapUnsnappedPieces, off): mostly chests, fences and loose decoration, since walls, floors and beams ship with their own. It also catches chairs, banners and item stands, where snapping tends to get in the way.
ExcludePrefabs wins over all of it, including PointOverrides. Prefab names are matched
case-insensitively everywhere.
Installation
- Install BepInEx 5.4.2350. BepInEx 5 only, not 6.
- Install Sinka from Thunderstore with
a mod manager, or drop
Sinka.dllintoBepInEx\plugins\Sinka\.
No other dependencies. Sinka does not use Longhouse Core.
Snapping happens on the client while you place a piece, so only the players who want it need it. A dedicated server gains nothing from having it installed, and loses nothing either.
Configuration
BepInEx\config\ezomic.valheim.sinka.cfg, written on first run.
| Key | Default | What it does |
|---|---|---|
SnapContainers |
true |
Snap anything buildable that holds items |
SnapFences |
true |
Snap the pieces named in FencePrefabs |
SnapUnsnappedPieces |
false |
Snap every buildable piece with no snap points of its own |
BuildablePiecesOnly |
true |
Only snap pieces that appear in a build menu |
FencePrefabs |
see below | Comma-separated prefab names treated as fences |
ExcludePrefabs |
empty | Comma-separated prefab names to leave alone, whatever else matches |
PointOverrides |
empty | Exact points for named prefabs, replacing anything derived |
Gap |
0 |
Metres left between two chained pieces. 0 is flush; negative values are ignored |
FenceLadderStep |
0.2 |
Vertical spacing of a fence's rungs, in metres. 0 gives fences plain corners |
FenceLadderBelow |
0.2 |
How far under its own base a fence's lowest rung sits, in metres |
Verbose |
false |
Log the measured footprint of every piece that gets points, and the colliders behind it |
Everything except Verbose is in the [Snapping] section; Verbose is in [Diagnostics].
FencePrefabs defaults to wood_fence, piece_sharpstakes, piece_stakewall_blackwood, piece_dvergr_sharpstakes, piece_dvergr_stake_wall. Names that match no prefab are listed in
the log at startup.
BepInEx writes every setting to the .cfg on first run, and the saved value beats a new
default in a later version. If a setting looks like it is being ignored, edit the .cfg.
PointOverrides
One axis-aligned box cannot describe an L-shape or a piece whose geometry sits off centre.
piece_dvergr_sharpstakes measures 2.40 x 1.70 x 3.94 centred 0.35 off in x, so the corners
of its box are nowhere near the actual stakes. PointOverrides replaces the derived points
with exact ones:
PointOverrides = piece_dvergr_sharpstakes: -0.5,0,2 | -0.5,0,-2 ; wooden_fence_1_gate: -2.4,0,0 | -2.4,1.17,0
Semicolons separate prefabs, a colon follows the prefab name, pipes separate points, and commas separate the three local coordinates of one point. Decimals must use a dot, because a comma already means something here.
Naming a prefab is enough to get it snapped: it does not also have to be a container or a
listed fence, and it skips the buildable filter. Gap and the fence ladder do not apply,
since a point given by hand is used exactly as written. A malformed entry is reported in the
log and dropped, and the rest of the config still loads.
Multiplayer
Snap points are added to prefabs in your own game, nothing is sent over the network, and world data is unaffected. A player without Sinka sees the pieces exactly where you placed them, they just have more work to do lining up their own.
Sinka does not register with Longhouse Core's version check, so nothing tells you when two players are running different builds of it. In practice that only shows up as one player finding a piece harder to align than the other did.
Compatibility
Sinka skips any piece that already has snap points, so it will not fight another mod for the same prefab, but whichever one registers first wins and the order is not something you control. Do not run it alongside other mods that add snap points to prefabs:
- FenceSnap by MSchmoecker
- ChestSnap by Frogger
- Extra Snap Points Made Easy by Searica
Extra Snap Points Made Easy is much broader than this mod: manual point cycling with keybinds, grid snapping, and points derived per piece shape across beams, triangles, rectangles and roofs. If you want the whole toolbox rather than chests and fences that line up, use that instead.
These work alongside Sinka, because they do not touch prefabs:
- Snap Points Made Easy by MathiasDecrock cycles the points a piece already has, with separate keys for the ghost's point and the target's. It adds none of its own, so Sinka supplies the points and it picks between them.
- PrecisePlacement, originally by Koosemose and re-uploaded by AcidWerks, now marked deprecated. Free rotation, arrow-key nudging, and copying a targeted piece's rotation and position onto the one you are holding.
Troubleshooting
A piece snaps at the wrong distance. Set Verbose = true and restart. Every piece that
gets points logs its measured footprint followed by the colliders it was measured from, so
you can see which collider is inflating the box. If the box cannot describe the piece, give
it exact points through PointOverrides.
A fence name in the config does nothing. Check the startup log for a
FencePrefabs names that match no prefab warning. The same check runs on PointOverrides.
A piece snaps while I place it, but nothing will snap to it afterwards. The game finds
nearby pieces with a search limited to the piece and piece_nonsolid layers, and a piece
whose colliders sit elsewhere is invisible to it. Sinka lists these in one warning at
startup. Rewriting another mod's or the game's colliders onto a different layer changes what
they collide with, so Sinka reports it rather than fixing it.
"No piece tables found after 900 frames". The buildable filter could not be built, so
Sinka fell back to snapping anything with a Piece component, loot chests and pots
included. Usually means another mod delayed or replaced ObjectDB.
Snap points did not appear at all. They are added to prefabs when the scene loads, so
a config change needs a restart to the main menu at minimum. Check the startup line reading
Added snap points to N piece(s).
Bug reports
Post in the Discord or open an issue at github.com/Ezomic/valheim-sinka. Useful to include:
BepInEx\LogOutput.log, ideally withVerbose = true.- Your
ezomic.valheim.sinka.cfg. - The prefab name of the piece involved. The log lines from
Verbosegive you these. - Whether you were in single player or on a server, and any other snapping or building mods installed.
Discord
The Discord is where mod information, updates, support, bug reports and compatibility questions go.
There's also a small EU server running the Longhouse pack if you want somewhere to play. Details are in the Discord.
Building
dotnet build
Targets net462 and references the game's managed DLLs from the default Steam path. Output
deploys to the repo-local testprofile\; override with -p:ProfileDir=..., or build it into
the shared play profile with own-profile\build-all.ps1.
Design notes
How the corner set is derived, why face centres were left out, what the measured footprint has to exclude, and why the one-way pieces are reported rather than fixed: DESIGN.md.
Credit where it is due: the fence ladder is MSchmoecker's idea, from FenceSnap. Sinka derives
its rungs from the measured footprint instead of hand-placing them, which is how a modded
fence gets the same treatment from one config entry. FenceSnap's hand-tuned numbers are also
what caught a measuring bug here, since it puts wood_fence points at x = 1.0 where Sinka's
inflated box said 1.36.
Author
Sinka is an original mod by Robbin Thijssen (Thijssen Software). Copyright (c) 2026 Robbin
Thijssen. MIT licensed, see LICENSE.
Part of Longhouse
Sinka ships in the Longhouse modpack, which pins the exact versions of the Ezomic mods used on the Ezomic setup. It behaves exactly the same installed on its own.
CHANGELOG
Changelog
Notable changes to Sinka. Format follows Keep a Changelog, and the mod uses semantic versioning.
[1.0.1] - 2026-09-12
Changed
- Rewritten README. Same mod, clearer documentation: what it does and how to install it come first, then configuration, multiplayer behaviour, compatibility and troubleshooting. Every config table was checked against the plugin's own Config.Bind calls, so the settings, sections and defaults listed are the ones actually bound. No code changed in this release.
[1.0.0] - 2026-08-27
The 0.9.0 build, proven in play and given its release number - chests snap flush beside and atop each other, fences ladder up hillsides, and world-spawned loot stays unsnappable. Renamed from Dovetail on the way: Sinka is the dovetail joint itself in the Scandinavian tongues, beside the pack's other Old Norse names. Nothing was published under the old name, so nothing breaks.
[Unreleased]
Changed
- Core is gone entirely. Sinka no longer references Core, declares it as a soft dependency, or registers with its version gate. It was already optional; now it is absent. Nothing here has to agree with anything running elsewhere, which is what lets this be played and versioned on its own. The gate is what is given up: nothing reports two ends running different builds of it.
Fixed
- The measured footprint was too big, and fences paid for it. A prefab carries its
damage states and destruction chunks inside itself (
WearNTear.m_new,m_worn,m_broken,m_fragmentRoots), and every collider in all of them was being measured as one box.wood_fencecame out 2.72 × 2.30 × 0.85 against a panel roughly 2.0 × 1.5, so two chained fences would have stood 0.72m apart, the exact thing this mod exists to prevent. The footprint now starts atWearNTear.m_new, skips subtrees switched off viaactiveSelf, and skips colliders on their own rigidbody the wayWearNTear.SetupCollidersdoes. - Credit for catching it goes to MSchmoecker's FenceSnap, whose hand-placed
wood_fencepoints sit at x = ±1.0 against the ±1.36 measured here. Two sources disagreeing is what made it findable without building a fence first.
Added
- Only buildable pieces are snapped (
BuildablePiecesOnly, on). Having aPiececomponent is not the same as being placeable: 35 of the 46 prefabs previously snapped were dungeon loot chests, pots and other things you cannot build. Snap points work both ways, so a chest carried into a crypt snapped to the loot chests standing there. The set is read off the game's own piece tables viaItemDrop.m_itemData.m_shared.m_buildPieces, so every tool including modded ones contributes and nothing needs naming. PointOverrides, exact points for named prefabs. One axis-aligned box cannot describe an L-shape or an off-centre piece, andpiece_dvergr_sharpstakesis the proof at 2.40 × 1.70 × 3.94 centred 0.35 off in x. Both earlier mods needed per-prefab data too: FenceSnap hand-places its gate points and ChestSnap keeps a YAML file of them. Naming a prefab is enough to get it snapped and skips the buildable filter,ExcludePrefabsstill wins, andGapand the ladder do not apply to a point given by hand.- A warning for pieces that can only snap one way.
FindClosestSnapPointstakes the ghost's own points straight off the piece being placed, but finds neighbours throughLayerMask.GetMask("piece", "piece_nonsolid"). A piece whose colliders sit on another layer therefore snaps fine while you place it, and cannot be snapped to once it stands. Six vanilla prefabs are like this, the three gifts and the three pots, so it is one line at startup rather than one per piece. ChestSnap and FenceSnap both rewrite such colliders onto the piece layer; this deliberately does not, because that changes what they collide with and the piece belongs to whoever shipped it. It says so instead. - A ladder of snap points up each end of a fence, so a fence line can follow sloping
ground. Eight corners give a fence two heights to attach at, its base and a full panel up,
and a hill needs the heights in between. Rungs run every
FenceLadderStepmetres (default 0.2) fromFenceLadderBelowunder its base (default 0.2) to its top, at mid-depth on both ends, along whichever horizontal axis is longer. - This is FenceSnap's idea, taken deliberately. The difference is that the rungs come
off the measured footprint rather than being typed in per prefab, so a modded fence is one
config entry rather than a code change.
FenceLadderStep = 0restores plain corners. - It knowingly gives up the uniform point set: a fence rung and a chest corner can now pair and land half a piece out of line. Fences are opt-in by name, which contains it, and FenceSnap made the same call.
Verbosenow names every collider a footprint was measured from, not just the result. Finding which collider inflates a box previously took a rip.- Applying is now tracked per world rather than per process. It keyed off a static bool,
which answers yes for the rest of the session once set, while logging out to the menu and
back in tears down
ZNetSceneand builds a new one. That is the failure CLAUDE.md records as having silently destroyed a built piece elsewhere, and the fix is the same: ask the world, do not answer from a field. If prefab assets do keep their points across a reload the second pass simply finds them under "already had their own", and the log now says which happened.
[0.9.0] - 2026-08-16
Not released yet. Everything below is written, deployed and confirmed loading, but the snapping has only been loaded and not yet played. The version stays under 1.0 until it has, and 1.0.0 will be the release.
Snapping
- Chests and fences line up. Place one and the next snaps flush beside it or squarely on top, with no nudging and no gaps you find after the wall is built.
- Each piece's own footprint is measured at load and given a snap point on all eight corners of it.
- Corners rather than face centres, and the set is deliberately uniform. The game snaps by making the closest pair of points coincide, so a corner meeting a corner is flush adjacency and a corner meeting a face centre would put a piece half its own length out of line.
Gappushes the corners outward by half its value, because each of the two pieces contributes half the space between them. Insetting them, which is the intuitive reading, makes pieces overlap by exactly the same arithmetic.
What gets snapped
- Containers, matched on components rather than names: anything with both a
Pieceand aContainer. Modded chests are covered without a list to maintain. Ships are excluded. - Fences, matched by name, because nothing about a fence's components distinguishes it from any other wall. The list is config rather than code, and any configured name matching no prefab is reported in the log at startup rather than silently doing nothing.
- Everything the developers never gave snap points to, off by default. That set is mostly chests, fences and loose decoration, but it also catches chairs, banners and item stands, where snapping fights you rather than helps.
- Pieces that already have snap points of their own are always left alone.
Correctness
- Footprints are read from collider data rather than from
Collider.bounds. Prefabs sit inactive inZNetScene, where world-space bounds have never been computed and read as zero, exactly when they are wanted. - Loads on dedicated servers.
- Core is optional. Installed, it is used: the mod joins Core's version gate, which compares mod versions and build ids on connect and refuses a client that disagrees. That matters here because this adds child transforms to shared prefabs. Absent, nothing is degraded and the mod runs standalone, so installing Sinka no longer pulls Core in with it. A hard dependency would have been worse than no gate at all, since a missing hard dependency means the plugin never loads.
Naming
Named for chests because that is where it started. It now covers fences and stake walls too, and the name stays so existing configs keep working.