Sinka
Snap points for chests, fences and anything else that will not line up.
- Features
- How the snapping works
- What gets snapped
- Installation
- Configuration
- Multiplayer
- Compatibility
- Troubleshooting
- Bug reports
- Discord
- Building
- Design notes
- Author
- Part of Longhouse
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 wood torch placed on a wood pole snaps down into it, centred, with only its head showing above the top.
- 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.
Torches on poles
Aim a standing wood torch at the top of a 1m or 2m wood pole and it snaps down into the pole,
centred on it, with the top TorchStickOut metres of the torch (0.25 by default) standing
above the pole. Build the pole first; the torch goes on afterwards.
The torch snaps only while the crosshair is on a listed pole's top face, and only into that pole. Aimed at anything else, a floor, a wall, the side of a pole, the ground beside one, a torch has no snap point at all and places exactly as it does without Sinka. Nothing ever snaps to a torch. Hold the place-without-snapping key to set a torch on a pole top without sinking it.
The snap has to slide the torch down most of its own length, and the game only looks half a metre around the ghost for something to snap to. So for a torch aimed at a pole top, Sinka widens that search to the distance it measures off the torch at load.
TorchStickOut has a floor, about 0.21 for the wood torch. A burning torch spreads fire into
a zone around its flame, and sunk any deeper that zone reaches into its own pole, which in the
Ashlands burns the pole out from under it. A lower value is raised to the floor with a warning
in the log.
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_into-pole for a
torch, 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 |
SnapTorchesToPoles |
true |
Snap the torches in TorchPrefabs into the tops of the poles in PolePrefabs |
TorchPrefabs |
piece_groundtorch_wood |
Comma-separated prefab names of torches that snap into poles |
PolePrefabs |
wood_pole, wood_pole2 |
Comma-separated prefab names of poles a torch snaps into |
TorchStickOut |
0.25 |
Metres of torch left standing above the pole's top, never below the fire floor |
Verbose |
false |
Log the measured footprint of every piece that gets points, and the colliders behind it |
The four torch settings are in the [Torches] section, Verbose is in [Diagnostics], and
everything else is in [Snapping].
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,
TorchPrefabs and PolePrefabs, and a listed pole with no snap points or no place in a build
menu gets a warning of its own.
A torch will not snap into a pole. The pole's name has to be in PolePrefabs. With
Verbose = true the log names the torch's socket height and how far it reaches.
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
1.1.0 in Longhouse
Added
Torches on poles. A standing wood torch aimed at the top of a wood pole snaps down into it, centred, with its top
discussTorchStickOutmetres (0.25) standing above the pole. The torch snaps only while aimed at a pole's top face, and aimed anywhere else it has no snap point, so a torch on a floor is placed exactly as before. Because the snap slides the torch most of its own length, the game's half-metre snap search is widened for that one case to a reach measured off the torch at load.TorchStickOutnever goes below the point where the torch's fire-spread zone would reach its own pole. New[Torches]section:SnapTorchesToPoles,TorchPrefabs,PolePrefabs,TorchStickOut. Tested in game on 1m and 2m poles.
1.0.1
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.
discuss
1.0.0
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.
0.9.0
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.
discussEach piece's own footprint is measured at load and given a snap point on all eight corners of it.
discussCorners 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.
discuss
discussGappushes 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
discussPieceand 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.
discussEverything 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.
discussPieces that already have snap points of their own are always left alone.
discuss
Correctness
Footprints are read from collider data rather than from
discussCollider.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.
discussCore 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.
discuss
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.
Every setting · 15
All of it lives in one file, written on first run with each description beside its default. The file is the source of truth; edit it there.
BepInEx/config/ezomic.valheim.sinka.cfg
Diagnostics 1
| Setting | What it does | Default |
|---|---|---|
| Verbose | Log the measured footprint of every piece that gets snap points, and the colliders it was measured from. | false |
Snapping 10
| Setting | What it does | Default |
|---|---|---|
| SnapContainers | Snap anything buildable that holds items. Matched on components, so modded chests are covered without naming them. | true |
| SnapFences | Snap the fences and stake walls listed in FencePrefabs. | true |
| SnapUnsnappedPieces | Snap every buildable piece the game never gave snap points to. Catches modded pieces for free, but also chairs, banners and item stands, where snapping tends to fight you rather than help. | false |
| BuildablePiecesOnly | Only snap pieces that actually appear in a build menu. Off means anything with a Piece component qualifies, which includes dungeon loot chests and pots you cannot place and probably do not want to snap to. | true |
| FencePrefabs | Comma-separated prefab names treated as fences. Names that do not exist are reported in the log at startup. | DefaultFences |
| ExcludePrefabs | Comma-separated prefab names to leave alone, whatever else matches. | (empty) |
| PointOverrides | Exact snap points for named prefabs, replacing anything derived. Format: # prefab: x,y,z | x,y,z ; other_prefab: x,y,z # Semicolons separate prefabs, a colon follows the name, pipes separate # points, commas separate the three coordinates of one point. Naming a # prefab here is enough to get it snapped - it does not also have to be a # container or a listed fence. Decimals must use a dot, never a comma, # because a comma already separates coordinates. Gap and the fence ladder # do not apply: a point given here is used exactly as written. | (empty) |
| Gap | Metres of space left between two chained pieces. 0 places them flush. Negative values are ignored - overlapping pieces just clip. | 0 |
| FenceLadderStep | Vertical spacing of the snap points up each end of a fence, in metres. Smaller follows sloping ground more closely and costs more points per piece. 0 turns the ladder off and gives fences plain corners like a chest. | 0.2 |
| FenceLadderBelow | How far below its own base a fence's lowest rung sits, in metres. This is what lets the next panel step down rather than only up. | 0.2 |
Torches 4
| Setting | What it does | Default |
|---|---|---|
| SnapTorchesToPoles | Aim a torch from TorchPrefabs at the top of a pole from PolePrefabs and it snaps down into the pole, centred, with only its head showing above the top. The torch snaps only while aimed at a pole's top face, to that pole and nothing else, and nothing ever snaps to a torch. Hold the place-without-snapping key to set a torch on a pole top without sinking it. | true |
| TorchPrefabs | Comma-separated prefab names of standing torches that snap into pole tops. Only the wood one by default. The iron standing torches have never been measured for this, so adding one is a look to check in game first. | piece_groundtorch_wood |
| PolePrefabs | Comma-separated prefab names of poles a torch snaps into. A pole's own highest snap point is the one used, so a pole of any length works as long as the game gave it points - the startup log names any listed pole that has none, or that is not in a build menu. | wood_pole, wood_pole2 |
| TorchStickOut | How far the top of a torch stands above the top of the pole it snaps into, in metres. The wood torch's head is its top 5cm and its flame sits above that, so 0.25 shows the head and a hand's width of shaft. Larger shows more shaft; the torch is 1.41m long in all and cannot stick out further than that. There is a floor too, about 0.21 for the wood torch: any lower and the zone a burning torch spreads fire into reaches down into its own pole, which in the Ashlands burns the pole out from under it. A value under the floor is raised to it, with a warning in the log. | 0.25 |
Discussion
Nothing said yet.
Sign in or make an account to join in.