LivingCompanion
Autonomous AI companion NPC: follows, fights bosses, gathers, crafts from zero, survives death; at home it keeps fires, smelters and animals going and sorts chests. Russian and English. Beta.Changelog
0.3.4
Two scenes left over from 0.3.3, and the log pile again from watching the companion in the game.
- Log piles. When a swing at a log lying a little below the companion cannot reach it (the blow ended in the ground in front of the log), the companion now aims at the top of the log, with the axe's heavy downward swing first, instead of walking round it. If the swing still does not pass, it chops the logs within reach from where it stands; it no longer has to be boxed in by logs first. Not yet re-checked in the game.
- Falling overboard. The companion climbs back aboard from the rim of the deck too; before, a ship with no free spot away from the edge made it stay in the water. If the deck gives no spot at all, it swims to the shore after 2 seconds. Checked in the game (run 130).
- Wood hauling test scene. The test world has a fixed forest site for the haul-wood-home scene (test fixture only, no change for players).
0.3.3
From watching the companion in the game: it blocks, decides faster, stays calm, and no longer freezes in a pile of logs. Tested in the game on Valheim 1.0.20 (run 129): 16 of 18 re-checked scenes pass, including the pack fight, portals, chest sorting, crypts, the Elder and both death scenes.
- Combat. The shield goes up for every hit it can halve (small hits were simply taken before); against a pack it keeps the shield toward the one swinging; the bow is put away when an enemy is within 4 m; ordinary light enemies are fought at once instead of waiting for an opening; the shaman of a pack is killed first; no more jerking back and forth at the edge of reach.
- Log piles. Boxed in by logs it felled itself, the companion chops the logs within reach where it stands, with a heavy downward swing when they lie low, instead of waiting for a new command.
- Portals. Attacked at a portal after you went through, it fights back and then follows you through.
- Walking. It steps around you instead of pushing you when you stand in its way.
- Chest sorting. A chest it could not reach the first time is tried again at the end, so ores no longer stay split over two chests.
- Chopping. It no longer keeps swinging at one log until it is too tired.
0.3.2
Boss fights re-checked in the game on Valheim 1.0.20 (run 127): Eikthyr and the Elder are both killed; ordinary fights, self-defense and the troll fight pass; swimming after you and falling overboard pass.
- The Elder. The companion no longer slows down for the whole fight after hearing the Elder's distant scream: it times its swings only by the attacks the boss can really make at that distance. It also no longer calls off a fight it is winning when the boss is almost dead and heals a little between hits.
- Sea. Refusing to follow you into the open sea is confirmed in the game again.
0.3.1
Fixes for the three scenes that were still shaky in 0.3.0. Tested in the game (Valheim 1.0.20, run 125): ship passenger, crypt enter-and-return, lake swim-after, death and grave recovery all pass.
- Ships. Boarding a ship whose deck is higher than the beach no longer gives up in mid-jump: the companion keeps its boarding spot while it jumps and climbs on from the hull instead of falling back into the water.
- Crypts. The way out of a crypt is found reliably: the companion takes the door it came in through and remembers it, so a crowded crypt room no longer hides the exit; it also climbs back to the level of the door before waiting for it.
- Grave inside a crypt. The trip back to a grave inside a crypt finds the way out the same way.
- Lakes. After swimming after you, the companion walks on until its feet are out of the water instead of stopping in the shallows on a flat beach. It still refuses to follow you into the open sea.
0.3.0
"Base life", chests, errands, a "why isn't it working" card, idle life, English orders and the fixes of 0.2.2. Tested in the game on Valheim 1.0.20: 86 of 89 non-boss test scenes pass (runs 122-124), including every new base-life feature; boss fights were not re-run for this version. Requirements are unchanged (Valheim 1.0.20, BepInEx 5.4.23).
Base life
A companion that stands idle at home now keeps the base running. It starts after it has stood quietly for 2 minutes ([Autonomy] IdleSeconds) in Stay, Guard or beside you. Danger, a conversation or any order ends the job at once.
- Fires. It refuels the campfires, hearths, torches and braziers at home that went out or will not last two game days.
- Smelters and coal. It starts idle smelters and furnaces with ore and fuel from your chests, brings fuel to one that holds ore but has none, and burns wood in the charcoal kiln when there is ore and no coal. A smelter that has ore and coal both at hand is fed first, then left alone for 10 minutes. Bars and coal go to a chest. Only wood above
CoalWoodReserve(100) is burnt; the coal stock it keeps isCoalTarget(50). - Windmill. It loads barley (5 to 20), walks away and comes back for the flour. Only barley and flax above
MillSeedReserve(20) are used: the rest is your seed. - Hot tub. It adds wood to a hot tub you built that is burning but will not last two days. A cold tub is never relit.
- Hives, sap, eggs, feathers. The collect round empties the beehives and sap collectors you built, picks up feathers, loose honey and sap, and the spare chicken eggs once the flock is full (
FlockHens; warm eggs are left to hatch), then puts everything into a chest. Daylight only. - Hand feeding. After
feed the animals yourself, hungry tame animals are fed from its hands, over the fence if need be. The seeds your garden needs are kept back (SeedReserve). - Base repair. After
allow repairsit mends the damaged buildings you made at home with a hammer from its pack or a chest, load-bearing pieces first, never during a raid or while it is being hit. - Replanting saplings. After felling trees near home it picks up the seeds and cones and plants young trees back (the Cultivator must be in its pack).
- Keep-stock orders.
keep 50 arrows stocked,always keep 5 cooked meat: it tops the stock up from your chests (crafting at a station near home, or cooking) and puts it into a chest. Up to 5 orders;stop keeping arrowscancels,what do you keep stockedasks. - Rights it needs. Nothing starts without rights you saved yourself: supply work (Rules tab, "Chest access and crafting"; no phrase does this), a home (
this is our home), a chest with the take right for fuel and ore and a chest with the deposit right for what it brings home. Replanting needs no right. - Hand feeding and replanting are the mod's own functions (the stock game has neither for a companion), disclosed in the config.
Chests
- Look at a chest and press L to label it by key (Shift+L goes back). The first press labels it after what it holds; the hover text shows the label.
- On a gamepad hold the Block button (left trigger, or left bumper in controller layout Alternative 1) and press D-pad right or left (
[Storage] ChestLabelPad). The game still zooms the small map with that chord. - A sort chest: drop things in and the companion sorts them into the labelled chests (
this is the sort chest,sort the chests). When several chests carry one label, it prefers the one next to the station that uses that category. BepInEx/config/LivingCompanion/chest-categories.txtmoves items between categories. A file it cannot read is ignored with one warning.- A chest right can cover any item, separately for take and for deposit: tick boxes in the Rules tab, or
take anything from this chest/put everything in this chest. The goods of base life have words too:coal,honey,sap,feathers,eggs,bars,feed. Old saves load as before.
Errands
bring me 20 wood from the chest: it fetches that amount from the chests it may take from (never below a chest's reserve), walks to you and hands it over. One kind of item per errand. If it cannot, it says why: nothing in the chests, no room in its pack, danger, another job. Any new order ends it. Switch:[BringMe] Enabled.
Why isn't it working?
- A status line under the companion's name says what it is doing and, when it stands idle, why, with numbers.
- A What is wrong card at the top of the Notes tab lists the problems at the base, since when, and what to do about each. It looks again every 30 seconds.
- The console command
lc_whyprints the same (lc_why rescanlooks again at once). Switch:[Diagnostics] WhyAdvisor.
Idle life
- With nothing to do the companion no longer stands like a post: it sits on a bench or by a burning fire, walks over to look at a station, a chest, a fire or the garden, and now and then comes up to you with a short line about the time of day, the rain or what it did today (about 55 lines, at most one every 10 minutes, only when you stand still close by). Every 15 minutes at most it says why it is idle.
- Any order, danger or job ends it at once. It does nothing at night or in the rain. Switch:
[Idle] Enabled.
Smarter movement at the base
- To a chest, a fire or a smelter it walks to a checked standing point next to it instead of the middle, steps aside when it makes no progress, and skips a target it cannot reach for a growing pause (1, 2, 4, 8, then 10 minutes). Switch:
[Movement] WorkStandPoints. - A following companion drops every base job when you walk far from home (70 m); a standing one walks back to its post afterwards.
English
- Chest rights (
put wood in this chest,take from this chest,do not touch this chest,take anything from this chest), handing items over (give me the axe,take my ore), numbers in words (chop fifty wood,kill three deer), big gather orders (chop 50 wood,get 100 wood), small ones (get 10 wood,grab 5 flint,mine 3 stone) and a plainandbetween two orders (chop 20 wood and go home) now work like their Russian twins. - The new orders are in English too:
bring me 20 wood from the chest,keep 50 arrows stocked,feed the animals yourself,allow repairs,this is the sort chest. A few more twins for berries, brewing and the journal.
Fixes from 0.2.2 and from the in-game runs 119 to 121
- Dungeon. After exploring, the companion climbs the stairs out of the pit to the base instead of standing on them.
- Obstacles. With the standing right to clear obstacles (the campaign autonomy right or a gather order) it cuts a log or a rock in the way without waiting for you to come within 3 m. It can also jump a low wall at the corner where two pieces of the same wall meet.
- Explore slot. An explore-biome trip is no longer refused because of a trip of another companion that ended long ago.
- Potions in combat. A carried health potion is drunk where the companion would otherwise run away (up to 50 % health), not only at 40 %.
- Exploration arrival. The way home from an exploration ends 6 m from you (it used to stop about 10 m away).
- Phrase timeouts. The time limit of every phrase pattern was raised from 50 to 250 ms, so a slow moment no longer makes the companion refuse a phrase.
- Refuelling. A refuel is no longer reported as failed when the fuel really went into the fire (a rounding hair in the count); a round with several fires ends with the last one. A fire or smelter it paused on no longer holds up the others.
- Collect round. The first hive is no longer skipped as stuck the moment the round starts; every honey drop is picked up, and honey is carried to the chest although it counts as food.
- Hand feeding. A fed animal now counts as fed (the count used to hand its food back, so the round looked like a failure).
- Mill and smelter. Only your own windmill is tended. A round spends only what it actually fetched.
- Busy states. Base rounds and idle life no longer start while it recovers its body after a death or stands on a ship deck, and idle life does not run on a post that has no home. Replanting no longer pulls a following companion away from you.
- Bring me and repair. Items it has equipped count, healing items may be brought at low health, only a usable hammer counts, and both hands are restored after a repair.
- Speed. Base rounds scan your buildings once per decision instead of up to five times.
- Texts. Messages use the game's own terms, and numbers read correctly in both languages.
Upgrading from 0.2.x
[Autonomy] WorkChooserwas off by default in 0.2.x, and every saved config saysfalse. The first start of 0.3 switches it on once (DefaultsApplied030becomestrueandLogOutput.loggets one line). Nothing starts without a saved right.- Before its first fire or smelter round the companion says once, in a line, that it now keeps the fires and furnaces going from the chests it may take from.
- To switch things off, close the game and edit
BepInEx/config/gtorens.valheim.livingcompanion.cfg:[Autonomy] WorkChooser = false: nothing starts by itself (it is not switched on again).[Autonomy] BaseRounds = false: no fire, smelter, mill, tub or collect rounds; other jobs go on.[Autonomy] BaseRepair = false: no base repair.[Autonomy] KeepStock = false: keep-stock orders are saved but not run.[Idle] Enabled = false: no sitting, looking around or chat.[Forestry] Replant = false: no replanting.
- To take the supply work away without the config, press "Disable autonomous supply work" in the Rules tab. Saves need no conversion.
Known limits
- Single-player only. House building is still not reliable.
- On a gamepad the companion window cannot be closed with a button; close it with Esc on the keyboard.
- A chest that accepts any item does not make the companion empty its backpack: the rounds still choose what to move. Cooked food, tin ore and silver ore have no word of their own in chest rights; use "any item".
- In-game test status: the new parts (windmill, hot tub, base repair, replanting, bring-me) passed in the game. Three older scenes still fail now and then in the test world, as they did in 0.2.x: stepping off a ship (ShipPassenger), the walk back up out of a crypt pit (DungeonEnter) and climbing out of a lake right beside you (SwimFollow).
0.2.1
- HUD fix. The small Companion box (the remote access button and the "Alt: cursor" hint) no longer covers the minimap. It moved to the right screen edge and is vertically centred.
- Nothing else changed since 0.2.0: same features, same cheats and settings, same requirements (Valheim 1.0.20, BepInEx 5.4.23). The in-game status is unchanged (see "Status" under 0.2.0).
0.2.0 (beta)
First public build for testers (previous internal version: 0.1.6). Requires Valheim 1.0.20 (Steam build 25909357; 1.0.17 also works) and BepInEx 5.4.23.
New in 0.2.0
- English language. Every player-visible text (replies, window, buttons, module reports, hints) has an English twin, about 6,200 texts. The mod language follows the game language (
[Localization] Language = auto;enandruforce it). The translation catalog limit was raised to 12,288 entries. Orders can be typed in English; the English guide lists the phrases that really work. - Bosses. One boss-fight director with profiles: Eikthyr; the Elder (roots, vine stream, melee); Bonemass (leaves the poison cloud, waits on the shore); Moder (flight and ground phases, breath cone, honest arrow supply); Yagluth (steps out of the nova, avoids meteors, kills his Fulings first); the Queen; Fader (fights only on the arena). Rest camp: its own fire farther than 40 m from the altar, food and mead in the pauses.
- Combat tactics for 163 creatures. Measured attack timings, group fights (pulls one by one, backs to a wall or a doorway, retreats by plan), summoned boss helpers are not counted as a crowd.
- Swimming. Honest stamina and weight, swimming through shallow water to work, swimming along with you, falling overboard.
- Long tasks from zero. The companion decides who gets what and where (gathering, stations, smelting, trade, fishing), crafts from zero, and refuses honestly with a reason. Checks readiness (cold, fog, fire) before the Mountain, the Deep North, the Mistlands and the Ashlands.
- Gear. Armor set choice, handing surplus gear to a chest, upgrading worn gear with a voice right.
- Base defense. During a raid on the base it goes to those who break walls, keeps the commander first, does not repair under hits and reports.
- Dungeons and crypts. Profiles of the game's dungeons, "clear the crypt" and "clear the troll cave", entering in sections, resting and returning, doorway tactics, keys for locked dungeons.
- Death and recovery. Like a player: swims to the grave, second trip, hunting loot near the grave, avoids places of frequent deaths, honest report. Skills are not lost on death.
- Smelting, trees, ore, silver. Smelt all ore; all 89 tree kinds with an honest "needs a bronze axe for birch"; ore on the Black Forest slopes; Mistlands like a player (Yggdrasil root, giant remains); silver with the Wishbone (scout, probe, dig, carry home); Yggdrasil sap.
- Portals, trade, animals, raid. Build a portal home, return from a far trip through its own portals; "buy the megingjord" (trader trip, allowed sales only, the deal survives a reload); taming, feeding, breeding cap, luring wild animals into a pen; raid on a Fuling village (Plains).
- Houses. Nordic houses by material tier, workbench add-ons on the house floor, fencing the base, repair of damaged pieces. House building is NOT reliable yet.
- Cheats (disclosed, on by default, each can be switched off in the config).
SilentAim,MagicBullets,CarryMultiplier(2.5),FastCraft,WorkWithoutStamina,EternalOwnFire,NoWetCold,ArrowsWithCap,StationNoRoof. - Talk. Everyday questions answered from live data (health, food, arrows, pack, mood, time, nearest place, next boss); it reports important things by itself, not too often, and a command switches these remarks off.
- Reliability. Protection against empty-prefab clones, saving on unload, reopening a lost body, parking on network events. A series of hot-path performance fixes.
- Valheim 1.0.20 support. Inventory item schema 110 (109 still readable), the new station cheated mark, the new drop flag, knowledge base carried over from 1.0.17 (a WARNING is logged until a fresh dump from 1.0.20 exists).
Fixes after in-game runs on 1.0.20
- A follower that the game released far from the commander (outside the simulated area) is claimed back and catches up.
- The companion's soul respawn near the commander works (the stock point search was called with a wrong agent id; the path is now checked with
HavePath). - The navmesh check for dungeons was fixed.
- A race in the "rest at the fire" command was fixed.
- Far trips are no longer refused because of a stale "the game is too slow" frame reading.
Status
- Offline: all test projects and the verification run (Verify 100, OFFLINE PASS) against Valheim 1.0.20.
- In the game (Valheim 1.0.20, runs 116 to 118): 69 of 79 non-boss scenarios passed; the Eikthyr and Elder fights passed in runs 111 to 115.
- Known open: coming back out of a dungeon, passing a narrow obstacle gap, an explore-biome trip being refused, combat against a pack is slow. House building is not reliable and is excluded from the checks. The later bosses (Bonemass, Moder, Yagluth, the Queen, Fader) are not confirmed in the game.
