You are viewing a potentially older version of this package. View all versions.
Aestelwen-DvergrWorkers-0.2.0 icon

DvergrWorkers

Dvergr workers help around your base and defend it when it is under attack.

Date uploaded 2 weeks ago
Version 0.2.0
Download link Aestelwen-DvergrWorkers-0.2.0.zip
Downloads 27
Dependency string Aestelwen-DvergrWorkers-0.2.0

This mod requires the following mods to function

ValheimModding-Jotunn-2.30.2 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.2
denikson-BepInExPack_Valheim-5.4.2351 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.2351

README

Dvergr Workers

Dvergr workers help around your base and defend it when it is under attack:

  • Repair Worker - fixes damaged structures around the base.
  • Woodcutter Worker - fells trees and collects wood.
  • Blacksmith Worker - manages smelters, kilns, and blast furnaces.

Note: This mod is an early work in progress!

Repair Worker Woodcutter Worker Blacksmith Worker

How It Works

Dvergr workers each have a job to do around the base. They have designated beds that serve as their spawning point and their work area. They use chests for storing resources and materials needed for their tasks. They even fend off enemies attacking the base!

Roles

Each job loop:

  • Repair Worker - finds all damaged pieces within its work area and repairs them.
  • Woodcutter Worker - fells trees, chops logs, clears leftover stumps, and collects wood within its work area.
  • Blacksmith Worker - adds wood to kilns, refuels smelters and blast furnaces before adding ores/scrap to them, collects the finished products and delivers them to the output chests.

Beds

Each role has a buildable bed that spawns the corresponding worker. The worker will perform its tasks automatically within its designated area (a configurable radius around its bed). Workers will respawn if they die as long as their bed remains intact, and destroying the bed will despawn the worker. The bed's hover text indicates the worker's status (e.g., idle, working, resting, or waiting for resources).

Chests

The workers use input and output chests to store and retrieve materials needed for their tasks. These chests must be within the worker's job radius to be used. Currently, the workers share input and output chests within their job radius. This may be changed in the future to allow for more complex chest management or individual chest assignments. Workers that need chests will not begin their jobs until they are built within the job radius. If the output chests are full, the worker stops and the bed's hover text says so.

Role Required Chests
Repair Worker None
Woodcutter Worker Output Chest
Blacksmith Worker Input and Output Chests

Known limitations

  • The Dvergr workers do not have animations for their specific tasks so the visual representation may not accurately reflect their actions.
  • Items a worker is carrying are lost if it dies or unloads mid-trip.
  • Occasionally workers may get stuck or be prevented from reaching their work stations. If a worker cannot quite get close enough to a target, it will work from a little further away than its normal reach. Clear pathing around the base minimises how often this happens!

Roadmap

More roles, social behaviour such as chatting, sleeping at night and greeting players.

CHANGELOG

Changelog

0.9.0

  • Added an .editorconfig, Directory.Build.props and a CI workflow that runs dotnet format, a Release build and a NuGet vulnerability check.
  • Reformatted the code and fixed analyzer warnings to match the new code style rules (no behaviour change).
  • Tidied up packaging scripts and workflow files.
  • Added a .gitattributes to keep line endings consistent.
  • Moved the local Valheim install paths into Directory.Build.props; set VALHEIM_DIR and BEPINEX_PROFILE_DIR once to build every mod without editing the .csproj.
  • Updated README and icon.

0.8.1

  • Workers no longer damage player-built structures when attacking enemies.

0.8.0

  • Workers now use the player's own animations when working: the repairer swings the hammer, the woodcutter swings the axe, the farmers use the cultivator, and the machine workers use the player's interact animation.
  • Removed the AnimationTrigger setting from every role, as workers always use the vanilla tool for their job.

0.7.0

  • Workers now come in a variety of Dvergr looks. Each bed picks one at random the first time it spawns its worker (the original crossbow Dvergr, or one of the four mages) and the worker keeps that look every time it respawns.
  • Workers from earlier versions are unaffected. Rebuild your beds to get new Dvergrs!

0.6.0

  • Workers now go to bed at night: when it is time to rest, the Dvergr walks to its bed, lies down on it and stays there until morning. The bed shows "Sleeping" while it does.
  • Workers put their weapons away when they get into bed and take them back when they wake up.
  • A sleeping worker still gets up to defend itself if an enemy comes near or it is hurt, and returns to bed afterwards.
  • Workers get into bed from whichever side is closest. One that cannot get within reach of its bed retries once a minute, up to 5 times, then rests where it is for the night.
  • The woodcutter now also picks up the resin and feathers that fall out of trees and delivers them to output chests.

0.5.2

  • Workers now look for chests which contain the item they are depositing, then for an empty chest to start a new category in, and fall back to the nearest chest only if neither is found. They deposit one kind of item at a time so different items are not mixed together. This helps keep chests better organised.

0.5.1

  • Workers no longer keep walking up to places they cannot reach. The farmer and tree farmer check that a planting spot can be walked to (so nothing is planted behind a wall or fence), and all workers remember targets they gave up on for a few minutes. The game builds its navigation mesh a few seconds after a place is first checked, so a spot that fails once is checked again before it is written off, and the farmers look again within seconds.
  • Updated bed descriptions.
  • Removed the Machines and Fuels settings: workers now always tend the vanilla machines and use the vanilla fuels.
  • The refueler now uses every vanilla fuel, including greydwarf eyes and guck, so it also tends the blue and green iron torches and the blue brazier.

0.5.0

  • Added the Barley Bed: its Dvergr feeds windmills with barley from the input chest, collects the flour, and delivers it to output chests.
  • Added the Flax Bed: its Dvergr feeds spinning wheels with flax from the input chest, collects the linen thread, and delivers it to output chests.
  • Both take the farmer's barley and flax from output chests, so the farm, the mill and the spinning wheel run without you moving anything.
  • Added the Eitr Bed: its Dvergr feeds eitr refineries with sap and soft tissue from the input chest, collects the eitr, and delivers it to output chests.
  • Workers that use the same item now split the stock in the chests equally instead of one depleting it, so the farmer can replant barley or flax while the barley or flax worker processes the rest.
  • Workers now drop what they are carrying when they die or their bed is removed, and keep it when the world is saved and reloaded mid-trip.
  • Added settings for which windmills, spinning wheels and eitr refineries they tend.

0.4.0

  • Added the Farmer Bed: its Dvergr holds a cultivator, harvests ripe crops on your tilled soil, and plants every free spot, spreading the crops evenly. It uses seeds from the input chest, plants raw ingredients (carrots, turnips...) to make more seeds when they run low, respects each crop's biome, and ignores tree seeds. Crops go to output chests and seeds back to the input chest.
  • Added the Tree Farmer Bed: its Dvergr holds a cultivator and plants tree saplings from seeds, cones and acorns in the input chest. It plants species evenly, only in biomes where they grow, keeps clear of buildings and farmland, and stops at a configurable tree limit.
  • The woodcutter now also collects the seeds felled trees drop, so the tree farmer can use them.
  • Added settings for the farmer's seed reserve and how many of a crop it plants per trip.

0.3.0

  • Added the Refueler Bed: its Dvergr carries a Dvergr lantern and tops up torches, fires, braziers and hearths with resin, wood and coal from the input chest, returning any spare fuel afterwards.
  • Workers now pass items to each other through output chests: the blacksmith takes the woodcutter's wood for the kilns, and the blacksmith and refueler can use the blacksmith's coal. Only items another nearby worker makes are taken (TakeFromOutputChests setting), replacing the blacksmith's FuelFromOutputChests setting.
  • Added settings for which fuels the refueler uses and how low a fire must burn before it is topped up.

0.2.0

  • Added the Woodcutter Bed: its Dvergr fells trees, chops logs, clears leftover stumps, and delivers the wood to output chests.
  • Added the Blacksmith Bed: its Dvergr feeds charcoal kilns, smelters and blast furnaces from input chests, collects the finished coal and metal, and delivers it to output chests. Coal from the output chests can be used as fuel.
  • Added Worker Input Chest and Worker Output Chest. Workers use every chest of the right kind within their job radius, closest first.
  • Beds now show the worker's status, including which chests are missing or full.
  • Added settings for worker inventory size, trees and stumps per round, and which machines the blacksmith tends.

0.1.0

  • Added the Repair Bed: its Dvergr walks around the base and repairs damaged pieces with a hammer.
  • Workers respawn if killed, stay within a set radius of their bed, rest at night, and are invincible to players while still defending themselves against enemies.
  • Added settings for job radius, repair interval, reach and respawn delay.