TrollCompanion
Friendly troll companions with clubs, saved names and progress, shared kills, combat orders and an F6 stats panel with individual recall. Live server configuration. Required on server and clients. Development release.TrollCompanion 0.2.10
Summon friendly trolls with the Trollstaff, keep their names and progress, and give them combat orders. Your companions always carry a club. Wild trolls remain unchanged.
Development release: 0.2.10 adds English mod text, an F6 stats panel with individual recall, shared kill progression and live server configuration. It also changes both default base combat multipliers to 2. Automated checks cover the new rules and migrations; full in-game single-player, co-op and dedicated-server validation is still pending.
Installation
Install the same TrollCompanion version on the server/host and every client. Client-only installation is insufficient for multiplayer.
Dependencies:
- BepInExPack Valheim 5.4.2351.
- Jotunn 2.30.2.
These are the dependency versions used for the local compatibility checks.
- Stop Valheim and the server before replacing plugin files.
- Install through Thunderstore Mod Manager, or use its local-mod import to install
TrollCompanion-0.2.10.zipinto a test profile. - For a manual server installation, put
plugins/TrollCompanion.dllintoBepInEx/plugins/TrollCompanion. Keep only one copy. Remove any former manual DLL/PDB before switching that installation to the manager. - Start the server and client with mods enabled. Check both logs for
Loading [TrollCompanion 0.2.10]andTrollCompanion loaded.
Keep your existing configuration and companion data. The first update to 0.2.10 performs the configuration migration described below.
Controls and companion panel
| Input | Action | Staff required? |
|---|---|---|
| F6 | Open or close the companion panel | No |
| Left mouse button | Summon one available companion | Yes |
| Middle mouse button | Recall all active companions | Yes |
| J on ground | Advance, fight along the route, then hold position | Yes |
| J on a hostile creature | Focus that enemy, then hold position | Yes |
| H | End the current order and follow again | Yes |
| Right mouse button | Native blocking | Yes |
Key bindings are configurable locally. Menus and text input block command hotkeys. F6 is unbound in the inspected native defaults; other mods or custom key bindings may still conflict. G remains available for the game's radial menu.
The panel shows each owned companion's name, slot, variant, order/status, current and maximum HP, stars, kills, next star threshold, death cooldown and club attack values. Each eligible active companion has its own recall control. The server checks ownership and the current instance before recalling it; a stale panel row cannot select a newer summon.
The panel distinguishes live network values, last-known network values and stored/next-summon values. Club attack values are calculated before target armour, resistance and other situational effects; they are not damage per second.
J and H control all active companions. A new J order replaces the old order. Attack-move, focus and holding suspend automatic catch-up to the owner, including portal travel. H restores normal following and catch-up. Unreachable orders hold at the current position rather than teleporting to the destination.
Names and roster
Use the game's normal naming dialog on an owned companion. Its native ten UTF-16-character limit and content filtering remain in effect. Clearing the name restores the default label. Extra star indicators stay separate from the saved name.
Names, identity, progression and health persist through recall and resummoning. Names and progression also survive companion death, world restarts, variant changes and temporarily locked slots. Names already lost by an earlier version cannot be reconstructed; rename those companions once.
Default settings
| Setting | Default |
|---|---|
| Companion variant | Ashlands; Forest is optional |
| Active limit at Blood Magic 0 / 50 / 100 | 2 / 3 / 4 |
| Star thresholds | 25 total kills for one star; 75 for two |
| Maximum stars | 2; configurable |
| Shared kill progression | Enabled within 25 m of the defeated enemy |
| Blood Magic XP factor | 0.25 per eligible kill; 0 disables it |
| Death cooldown | 30 s at Blood Magic 0 down to 5 s at 100 |
| Native Eitr / HP cost multipliers | 1 / 1 |
| Target range / combat radius | 80 m / 25 m |
| Follow catch-up distance | 100 m |
| Technical-failure refunds | Enabled |
Both variants use the forest troll's inspected 600-HP base and club attack profiles. With base health and damage multipliers of 2:
| Stars | Maximum HP | Club damage factor | Boss factor before native resistance |
|---|---|---|---|
| 0 | 1200 | ×2 | ×1 |
| 1 | 2400 | ×3 | ×1.5 |
| 2 | 3600 | ×4 | ×2 |
Resistance penetration defaults to 0.75 for ordinary body hits against hostile non-boss creatures. It restores 75% of the damage removed by resistance: 50% native damage becomes 87.5%, and 25% becomes 81.25%. Immunity, weaknesses, ignored damage and explicit weak spots retain native behavior. Bosses receive no resistance compensation and have a separate 0.5 combat damage multiplier. Generic, chopping and pickaxe damage are excluded from these target-specific rules.
Recall is free, creates no loot and preserves remaining HP. Stored companions do not heal over time. A dead companion retains identity/progress, waits until its saved deadline, then returns with full HP. The deadline runs while offline and is not changed by later skill or configuration edits. Actual death loot is separately configurable and disabled by default. Player, tame, structure and environment protection are enabled by default. The axe is not included.
Shared kill progression
The killer receives each eligible hostile-creature kill, including bosses. With sharing enabled, the same owner's other living active companions within 25 m of the victim also gain one kill. Recalled, dead, recalling, distant and other players' companions are excluded. The range is configurable, and sharing can be disabled.
Each victim event is saved once for all recipients. Blood Magic XP is awarded once per kill, regardless of how many companions share the progression. Players, tamed animals and companions are not eligible victims.
English configuration and live changes
The file is BepInEx/config/de.steve.valheim.trollcompanion.cfg.
On the first 0.2.10 migration, recognized German keys become English and the previous file is saved beside it as .pre-0.2.10.<timestamp>.<id>.bak. Other saved settings are retained. Both base HP and damage multipliers are set to 2 once. Later changes to these values are retained. Preserve [Configuration] MigrationVersion = 1; removing the marker requests migration again. Invalid values block migration without replacing the original file.
[Combat]
BaseHealthMultiplier = 2
BaseDamageMultiplier = 2
HealthPerStar = 1
DamagePerStar = 0.5
ResistancePenetration = 0.75
BossDamageMultiplier = 0.5
[Progression]
ShareKillProgress = true
SharedKillRadius = 25
[Input]
CompanionPanel = F6
Save changes to the server/host configuration during play. Once the file stays unchanged for about one second, a complete validated rules snapshot is synchronized. Invalid edits retain the last accepted rules and produce a diagnostic. Server gameplay settings are authoritative; key bindings, display options and detailed combat logging stay local.
Live health balance changes preserve the existing HP percentage at the old star count. A star change then preserves absolute HP, capped at the new maximum. Gaining stars or repeating an update does not heal. Variant changes take effect on the next summon; existing death deadlines remain fixed.
Placement and failed summons
Placement is checked before casting and again before the companion appears. A clear location within 3 m of a blocked target may be chosen before casting; it stays fixed during the animation. Water, unsuitable slopes or insufficient space produce a specific failure message.
The mod uses copies of the native Trollstaff arrival and impact effects with impact/terrain damage disabled. Recall or player death cancels an arrival.
Costs/RefundFailedSummons=true refunds the Eitr and HP actually paid when a technical failure is confirmed, once and within native resource limits. Before a request is sent, a known local failure can be handled locally; afterwards the server must confirm it. Death, recall, portals, disconnection and leaving range are not refundable. A timeout alone does not grant resources. Refunds cannot revive a player or transfer to a respawned character.
Data and updates
The server/host stores companions per character and world under:
BepInEx/config/TrollCompanion/worlds
Back up this directory with your server. Do not delete it when updating. The mod does not edit game or character saves. Unrecoverable mod storage errors block new summons rather than overwrite progress.
Schema 3 adds the health maximum, applied balance, star count and state revision alongside current HP. Existing schema-1/2 data is upgraded on the next successful save. Names, IDs, kills and deadlines remain intact. Where an older stored record has no trustworthy former maximum, it keeps absolute HP, capped by the new maximum. The mod does not guess an HP percentage. Older versions do not understand schema 3; retain backups before any downgrade.
Update the server/host and every client together, keep one plugin copy, and restart after replacing the DLL. Version-specific deterministic package timestamps allow BepInEx to refresh cached plugin metadata. If synchronization fails, collect BepInEx/LogOutput.log from both server and client.
For a first test, open F6 without a staff, inspect two differently named companions and recall only one. Then compare a nearby shared kill, a distant non-shared kill, a live configuration change and a restart. These steps are acceptance tests to perform, not a claim of completed in-game validation.
Changelog
See Thunderstore's Changelog tab or the included CHANGELOG.md. Release notes are maintained explicitly; Thunderstore does not generate them from the source code.
