ValheimLumberNPC
Friendly lumber trolls for Valheim. Place a homestead, set a work radius, assign chests - they chop, smash logs, collect wood, and store it. Optional replanting. Multiplayer-safe.Valheim Lumber NPC
Put your logging on autopilot. Place a homestead, set a work radius, assign a few chests — then let a friendly Lumber Troll chop trees, smash logs and stumps, pick up wood, and store it while you get on with raiding, building, and exploring.

Highlights
- Hands-off logging — chops trees, smashes fallen logs and stumps, collects drops, and deposits wood.
- You decide the mix — set chop priorities and replant priorities per tree type, filtered to the homestead biome.
- Optional replanting — after clearing a stump, can plant a sapling from seeds carried in the bag.
- Storage handled — assigns normal Valheim chests; deposits surplus and pauses when chests are full.
- Multiplayer-safe — works on local worlds, player-hosted games, and dedicated servers.
- Simple in-game menu — everything is driven from one panel on the Homestead piece.
| Version | 1.0.0 |
| Author | Pjanky |
| License | MIT |
| Requires | BepInExPack Valheim + Jötunn |
| Install on | Dedicated server and all clients (same version) |
Install
With r2modman / Thunderstore Mod Manager (recommended)
- Install BepInExPack Valheim and Jötunn.
- Install Valheim Lumber NPC (
Pjanky-ValheimLumberNPC). - Use the same mods on the dedicated server and every client.
Manual
- Install BepInEx for Valheim and Jötunn.
- Copy
ValheimLumberNPC.dllintoBepInEx/plugins/ValheimLumberNPC/on the server and every client. - Launch once so the config file is created under
BepInEx/config/.
The mod adds one hammer build piece: Lumber Homestead.
By default only server admins can place the homestead and open the panel. To let any player manage lumber yards, set
AdminOnlyPlacementandAdminOnlyAccesstofalse(see Configuration).
Quick start
Everything runs from the Lumber Homestead panel — interact with the placed homestead to open it.
- Place the Homestead where you want logging done. It spawns your first Lumber Troll automatically.
- Set the work radius on the main page (default 40 m, adjustable 10–100 m).
- Add storage. Place chests nearby and click Add chest for each.
- Tune tree priorities under Lumber settings if you want (biome-filtered).
That's it — as long as a player keeps the area loaded, the troll will chop, smash logs/stumps, collect wood, and deposit into your chests. When chests fill up, work pauses until you free space or add another chest, then unpause.

Trolls vanishing when you leave is normal. They are temporary workers, not permanent creatures. Your homestead settings, radius, and chest assignments are saved. When you return, open the panel and click Add Troll if none are present.
How it works
- The Homestead piece stores persistent data (chests, pause state, work radius, tree priorities) in the world save.
- Lumber Trolls only work while a player keeps the area loaded — they are summoned workers, not wandering monsters.
- Work loop: find tree → chop → smash logs → smash stump → (optional replant) → collect wood → deposit.
- On multiplayer, AI runs on the peer that owns the NPC’s network view, which keeps dedicated servers safe without forcing the headless server to simulate every troll.
- Talking to a troll toggles pause/resume for that homestead.
Full setup walkthrough
1. Place the Lumber Homestead
Open the hammer, pick Lumber Homestead, and place it near the trees you want cleared (exact facing doesn’t matter). Interact with it to open the panel. The status line shows pause state, troll count, work radius, and chest count.
2. Set the work radius
On the main page under Work area, drag the Work radius slider (10–100 m). Trees outside this circle are ignored.
Tip:
MaxWorkRadiusin the BepInEx config is a server ceiling, not the homestead’s current radius. Change the radius in the UI. If the config ceiling is stuck at 40, the slider cannot go higher until that config is raised (newer builds auto-correct a ceiling of 40 up to 100).
3. Assign chests (storage)
- Place normal Valheim chests (or compatible containers) near the homestead.
- Click Add chest to assign the nearest free chest within
ChestAssignRange(default 20 m). Repeat for more storage. - Clear chests unassigns all chests (their contents are never deleted).
- Chest inventory shows the combined contents of all assigned chests.
4. Configure lumber settings

Open Lumber settings. Only tree types for the homestead’s biome (shown top-right) appear.
- Tree priorities (left) — relative chance to pick that tree type when chopping. Higher = preferred. Set to 0 to skip chopping that type.
- Replant priorities (right) — after a stump is cleared, which seed family to prefer when planting a sapling from the bag. Set to 0 to never replant that type. Replanting only uses seeds already in the troll’s bag (it does not fetch seeds from chests).
Click Back when done.
Which trees appear where
| Biome | Tree types shown |
|---|---|
| Meadows, Ocean | Beech, Birch |
| Black Forest | Beech, Birch, Fir, Pine, Oak |
| Swamp | Swamp (Ancient) |
| Plains | Birch, Oak |
| Mountains, Deep North | Fir |
| Mistlands | Ygga |
| Ashlands | Ashwood |
The homestead’s position decides the biome. Not every family has a plantable sapling — replant rows only matter where seeds and saplings exist (e.g. Beech / Birch / Fir / Pine / Oak).
5. Add trolls and go
- Stay near the homestead so the area stays loaded (placing the Homestead already spawned one troll).
- Use Add Troll for more workers, or to recover one that vanished after you left.
- Make sure the status is Working (use Toggle Pause if needed).
- Remove Troll despawns one worker; Deposit all empties carried wood into chests. The world-wide cap is
MaxLumberjacks(default 8).
The Homestead panel
Main menu
The hub for everything: pause/resume, manage trolls, assign storage, set radius, and open lumber settings.
| Control | What it does |
|---|---|
| Toggle Pause | Pause or resume logging for this homestead |
| Add Troll | Spawn another lumberjack, or recover one that disappeared |
| Remove Troll | Despawn one troll from this homestead |
| Deposit all | Push carried items into assigned chests |
| Troll inventory | View what nearby trolls are carrying |
| Add chest | Assign the nearest free chest in range |
| Clear chests | Unassign all chests (contents kept) |
| Chest inventory | Browse combined chest contents |
| Work radius | Slider for the chop / search radius (10–100 m) |
| Lumber settings | Tree chop priorities and replant priorities |
Troll inventory & Chest inventory
Quick read-outs of what your trolls are holding and what’s in the assigned chests — each with a live item list, a total-items footer, and a Refresh button.
| Troll inventory | Chest inventory |
|---|---|
![]() |
![]() |
Configuration
After first launch, edit BepInEx/config/com.pjanky.valheimlumbernpc.cfg. On dedicated servers these values are server-authoritative; reconnect after changing them.
Per-homestead work radius and tree priorities are not in this file — they live on each Homestead and are edited in the UI.
General
| Setting | Default | Description |
|---|---|---|
| AdminOnlyPlacement | true |
Only admins may place/remove the Lumber Homestead. |
| AdminOnlyAccess | true |
Only admins may open the panel and change settings. Set false for open access. |
| MaxLumberjacks | 8 |
Hard cap on active lumber NPCs across the whole world/server. |
Logging
| Setting | Default | Description |
|---|---|---|
| MaxWorkRadius | 100 |
Server hard ceiling (m) for work radius — not the homestead’s current radius. Set radius in the UI (10–this value). |
| DefaultLayoutMode | Weighted |
Default priority mode for new homesteads (Weighted). |
| ScanInterval | 2 |
Seconds between background tree/work-area refreshes while lumberjacks work. |
| ChestAssignRange | 20 |
Max distance (m) from the homestead when using Add chest. |
Inventory
| Setting | Default | Description |
|---|---|---|
| InventoryCapacity | 20 |
Max distinct item stacks a troll can carry (not total item count). |
Networking
| Setting | Default | Description |
|---|---|---|
| ReservationTimeout | 30 |
Seconds a tree reservation lasts before another lumberjack may take it. |
AI
| Setting | Default | Description |
|---|---|---|
| EnableLumberSounds | true |
Troll vocal sounds. Set false to mute lumberjacks. |
| ThinkInterval | 0.5 |
Seconds between AI decision ticks. Lower = snappier, more CPU. |
| MoveSpeed | 2.5 |
Walking speed between tasks. |
| WorkRange | 3 |
Distance (m) to chop, pick up wood, or use a chest. |
Debug / UI
| Setting | Default | Description |
|---|---|---|
| DebugLogging | false |
Verbose AI logs. Leave off for normal play. |
| LogFeedbackToChat | true |
Also write homestead feedback to chat. Center-screen messages always show. |
Multiplayer notes
- Install the same mod version on the server and all clients.
- Homestead data is saved in the world via the piece.
- Multiple trolls can share one homestead; they coordinate so two won’t fight over the same tree.
- Trolls only work while someone keeps the area loaded.
- When assigned chests cannot accept more wood, the homestead pauses and announces that chests are full.
Troubleshooting
| Issue | What to try |
|---|---|
| Can’t place Homestead | You’re not an admin and AdminOnlyPlacement is true. |
| Can’t open the panel | AdminOnlyAccess is true and you’re not an admin. |
| Radius stuck at 40 m | Check config MaxWorkRadius — it is a ceiling. Raise it (or update to a build that auto-fixes a ceiling of 40). |
| Trolls idle | Paused; no trees in radius; priorities all 0; bags full and chests full; or the area is unloaded. |
| Trolls vanished | Normal after you leave — Add Troll again while nearby. |
| Chests not assigned | Move chests within ChestAssignRange and click Add chest again. |
| “Chests full” pause | Free space in assigned chests or add another chest, then Toggle Pause / unpause. |
| No replanting | Carry seeds in the troll bag; set replant priority above 0; stump must be smashed first. |
Development
Repository: github.com/nico8034/LumberNPC
# Local Debug build → r2modman Default profile plugins
powershell -ExecutionPolicy Bypass -File ValheimLumberNPC/scripts/deploy-local.ps1
# Thunderstore zip → ValheimLumberNPC/dist/
# (bump Plugin.PluginVersion first; update Package/CHANGELOG.md)
powershell -ExecutionPolicy Bypass -File ValheimLumberNPC/scripts/package-thunderstore.ps1
Also copy Environment.props.example → Environment.props and set VALHEIM_INSTALL for the IDE/Jötunn post-build deploy. Version source of truth: Plugin.PluginVersion in Plugin.cs (semantic versioning).
License
Licensed under the MIT License. Valheim is © Iron Gate AB — this mod requires a legitimate copy of the game.


