You are viewing a potentially older version of this package. View all versions.
TWIGDefenders-TWIG_Defenders-0.4.0 icon

TWIG Defenders

Experimental base defenders with eight biome-material tiers, 30m spear throws, melee, and hammer repair. Required on all peers. Real Steam and dedicated-server multiplayer testing is still pending.

Date uploaded 3 weeks ago
Version 0.4.0
Download link TWIGDefenders-TWIG_Defenders-0.4.0.zip
Downloads 158
Dependency string TWIGDefenders-TWIG_Defenders-0.4.0

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2350 icon
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.2350
ValheimModding-Jotunn-2.30.0 icon
ValheimModding-Jotunn

Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.

Preferred version: 2.30.0

README

T.W.I.G. Defenders

Build a line of stationary wooden defenders that turn toward hostile creatures, throw spears, and fight at close range. Eight separately buildable tiers use materials from Meadows through Deep North. The normal training dummy keeps its vanilla behavior.

v0.4.0 is an experimental playtest build. Tested on Windows with Steam Valheim 1.0.12 (build 25253764). Real Steam multiplayer, dedicated servers, rendered presentation, and raid balance still need player testing. Start in a new disposable world and back up any existing saves before trying the mod there. A separate mod-manager profile does not isolate your world saves.

Features

  • Build under Hammer → Misc, starting with T.W.I.G. Defender (Wood).
  • Thirty-metre engagement range, spears at 35 m/s, and a minimum four-second interval between ranged attack starts. No ammunition is consumed.
  • Native close-range melee when enemies get near. Spears deal 75% of each tier's melee base damage as pierce.
  • Defenders stay anchored, turn toward enemies, and require line of sight. Walls stop attacks.
  • They ignore players, tamed creatures, passive animals, and other defenders. Neutral Dvergr are excluded unless aggravated.
  • Hammer repair restores health near the tier's station, with normal tool/stamina costs and ward restrictions. No repair materials are required.
  • Player-built defenders return their recipe when dismantled or destroyed.

These are separate pieces, not automatic raid scaling or an in-place upgrade system. All tiers currently share the vanilla model and icon. This release adds spear attacks, not bows or new equipment models.

Installation

Mod manager (recommended)

  1. Close Valheim. In Thunderstore Mod Manager or r2modman, select Valheim and create a fresh test profile.
  2. Install TWIG Defenders and its declared dependencies: BepInExPack Valheim 5.4.2350 and Jotunn 2.30.0. The manager handles dependency installation; verify the actual versions in the profile.
  3. Start Valheim through the manager's modded launch option.
  4. Create a disposable test world. Obtain a hammer, discover a Workbench and Wood, and build a Wood defender near the Workbench for 10 Wood.

You do not need Unity, a .NET SDK, the source project, or the developer test plugin to play. The package follows Thunderstore's BepInEx layout; a clean mod-manager installation still needs acceptance testing.

Manual installation

  1. Close the game/server. Install the two dependencies above using their own instructions.

  2. Copy this ZIP's BepInEx/plugins/TwigDefenders folder into your Valheim installation's BepInEx/plugins folder. The final DLL location is:

    <Valheim>/BepInEx/plugins/TwigDefenders/TwigDefenders.dll
    
  3. Keep only one active copy of TwigDefenders.dll. Do not leave an older copy in another plugins subfolder or combine duplicate manual/profile installations.

  4. Launch the modded game and use a test world first.

Multiplayer

Install the same mod version on the host/server and every player, along with BepInEx and Jotunn. This is not a server-only mod. Version matching is required. Dedicated-server deployment and Steam/PlayFab sessions are still test targets, not confirmed supported configurations.

Biome tiers

Damage below is base damage before native difficulty, skill, and resistance modifiers. Costs and stats are provisional.

Tier / biome Health Melee blunt Spear pierce Materials Station
Wood / Meadows 300 20 15 Wood ×10 Workbench
Bronze / Black Forest 600 40 30 Corewood ×20, Bronze ×10, Deer Hide ×4 Forge
Iron / Swamp 1,000 65 48.75 Ancient Bark ×20, Iron ×15, Chain ×2 Forge
Silver / Mountains 1,400 90 67.5 Finewood ×20, Silver ×15, Wolf Pelt ×6 Forge
Black Metal / Plains 1,900 120 90 Finewood ×20, Black Metal ×20, Linen Thread ×10 Forge
Carapace / Mistlands 2,500 160 120 Yggdrasil Wood ×20, Carapace ×20, Refined Eitr ×5 Black Forge
Flametal / Ashlands 3,200 210 157.5 Ashwood ×20, Flametal ×20, Asksvin Hide ×10 Black Forge
Bloodgold / Deep North 4,000 260 195 Timberwood ×20, Bloodgold ×20, Bear Hide ×10 Black Forge

Learn each required material and station to discover its piece. A station is needed for building, repair, and dismantling; an existing defender does not need a nearby station to keep fighting.

First playtest

  1. Place a Wood defender, check that 10 Wood is consumed, and walk around it. It should leave you alone.
  2. Bring a Greydwarf into clear sight at roughly 10–25 metres. Watch the defender turn and throw spears. It should use melee at close range and never chase.
  3. Put a wall in the way, then remove it. Check that the wall blocks shots without taking defender damage. Check tamed animals and other friendly bystanders as well.
  4. Damage the defender, repair it with the hammer, then save and restart. Confirm its location, facing while idle, tier, and health.
  5. With a friend connected, have one player place/repair a defender while the other watches. Check both players see the same attacks and health; then test a disconnect/rejoin.

If using console spawn commands for testing, use them only in your disposable world. Normal hammer building is preferred because it exercises material costs and refunds.

What has been tested

On the stated Windows/game version, 561 in-engine assertions passed: 476 local progression/building/maintenance/combat checks, 61 checks after saving and restarting the game, and 24 across two networked local game processes. All eight tiers produced native spear hits and kills at 29 m against stationary controlled targets. Additional checks covered friendly Lox, walls, and a spear whose defender was destroyed during flight.

The two-process test used native loopback sockets with one Wood defender. It covered synchronized throws/facing/health, a windup ownership transfer without duplicate hits, remote repair, and reclaiming the defender after a clean disconnect. This does not establish Steam matchmaking, crossplay, dedicated servers, mixed-tier multiplayer, or remote rendered visuals.

Still to test: normal rendered UI/animations, moving and flying enemies, slopes and raids, enemy retaliation, 10–50 defenders, simultaneous repairs/removal, reconnects, older mod saves, other mods, and other operating systems. Balance may change between experimental versions.

Troubleshooting and feedback

  • No build piece: verify a modded launch, both dependencies, the game version, and discovery of the tier's materials/station. Look under Hammer → Misc.
  • No attack: check for a live hostile enemy within 30 m and a clear line of sight. Mist/obstacles can block native visibility. Wait for the attack interval and facing to align.
  • Cannot join: check that every peer has exactly the same TWIG Defenders version and required dependencies.
  • Need diagnostics: close the game, set DebugLogging = true in BepInEx/config/twig.defenders.cfg, then restart. Logs are in BepInEx/LogOutput.log inside the game folder or active manager profile.
  • Reporting a test: give the person who supplied the build your game/mod versions, host/client role, tier, other installed mods, reproduction steps, and expected/actual behavior. Include relevant log errors. Review logs before sharing publicly because they can contain player or server identifiers.

Only diagnostic logging is configurable in this build; range, damage, health, and cooldown are fixed defaults.

Updating or removing

Close all game/server processes before updating. Back up the world and install the same new version on every peer. Test updates in a copy before using an existing world.

Before removing the mod from a world, dismantle its defenders while the mod is still installed and save. Loading a world with missing custom prefabs can lose those objects; reinstalling the DLL is not a guaranteed recovery. Do not open and save a valued modded world in vanilla as an uninstall test.

Credits

Uses Valheim's existing T.W.I.G. animations/model and Fuling spear assets at runtime. No Valheim assemblies or assets, dependency DLLs, or developer test harness are redistributed. Built with BepInEx, Harmony, and Jotunn. This is an unofficial mod and is not affiliated with Iron Gate or Coffee Stain. Code and the original package icon were prepared with AI assistance.

CHANGELOG

Changelog

0.4.0

Initial Thunderstore package prepared for experimental testing.

  • Eight biome-material defender tiers with station/discovery requirements.
  • Native 30 m spear combat, 35 m/s launch speed, four-second minimum ranged interval, and close melee fallback.
  • Tier-scaled damage, friendly/structure protection, and checks for targets lost during windup or attackers destroyed in flight.
  • Hammer placement, repair, removal/refunds, and save/restart handling.
  • 561 in-engine checks passed, including a limited two-process native loopback network scenario.
  • Steam/dedicated-server playtesting, raid balance, performance, visual acceptance, and older-save compatibility remain pending.