Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
InstantTame
Valheim 1.0 ready. Hotkey instantly tames creatures in a set radius. 9 tames normal tameables, 0 force-tames (and untames) monsters like Draugr and Greydwarves.
| Last updated | a day ago |
| Total downloads | 173 |
| Total rating | 0 |
| Categories | Mods Tools Client-side AI Generated Deep North Update |
| Dependency string | YouDied-InstantTame-1.2.0 |
| Dependants | 0 other packages depend on this package |
This mod requires the following mods to function
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.2350README
InstantTame
Instantly tame creatures within a configurable radius using a hotkey. Updated for Valheim 1.0 (Unity 6).
Two keys, two behaviors:
- TameKey (default
9): tame-only, for creatures that are naturally tameable (Boar, Wolf, Lox, etc). Never untames anything, so your pets are always safe from this key. - ForceTameKey (default
0): tame/untame toggle, for creatures that are NOT naturally tameable (Draugr, Skeletons, Greydwarves, Trolls, and anything else runningMonsterAI). Press once to force-tame a wild one in range, press again to untame a force-tamed one in range. Normal tameables are completely ignored by this key in both directions.
GUID: YouDied.InstantTame
Requirements
- Valheim 1.0
- BepInExPack_Valheim 5.4.2350 or newer (the 1.0-compatible build)
Default Config
| Setting | Default | Description |
|---|---|---|
| TameKey | 9 (Alpha9, main row) |
Tame-only hotkey for normally-tameable species |
| ForceTameKey | 0 (Alpha0, main row) |
Tame/untame toggle hotkey for non-tameable species |
| TameRadius | 10 (1-50) |
Search radius in meters, shared by both keys |
| TameAllInRadius | false |
Act on every eligible creature in range vs. just the nearest one |
| ForceTameCommandable | true |
Force-tamed creatures get a Tameable component added so they can be given follow/stay commands. If false, they just stop being hostile with no command support |
| TamedSpawnersMakeTameChildren | true |
Creatures freshly spawned next to a tamed spawner (e.g. a tamed Gjall's ticks) are tamed automatically instead of spawning hostile |
| SpawnerNames | $enemy_gjall |
Comma-separated Character.m_name values of the tamed spawners to watch |
Config is adjustable via BepInEx Configuration Manager, no restart required.
How it works
Both keys scan a sphere around the player via Physics.OverlapSphere, filtering out the player and dead creatures.
TameKey (9) targets only creatures that already have a Tameable component and are not already tamed, and invokes its private Tame() method via reflection. This is the exact vanilla flow: MonsterAI.MakeTame(), m_tamedEffect VFX, and the "$hud_tamedone" message. Full parity with natural taming. There is no untame behavior on this key at all.
ForceTameKey (0) targets only creatures without a native Tameable component (tracked internally by ZDOID once force-tamed, since a Tameable may get injected). Behaves as a toggle:
- If an untamed eligible monster is in range, it force-tames the nearest one (or all, if
TameAllInRadius). If the creature runsMonsterAI(true for Draugr, Skeletons, Greydwarves, Trolls, etc.), it calls the publicMonsterAI.MakeTame()directly, which sets the tamed flag, clears alert state, and drops current targets. Hostility toward the player is gated onCharacter.IsTamed()checks inMonsterAI.UpdateTarget(), not a faction system, so no faction reassignment is needed. IfForceTameCommandableis on, aTameablecomponent is added afterward withm_commandable = trueso follow/stay works. Creatures with noMonsterAI(e.g.AnimalAI-driven passive animals) fall back toCharacter.SetTamed(true)directly. Best effort only, no commands, no VFX. - If no untamed eligible monster is in range but a force-tamed one is, it untames the nearest one instead: reverses
SetTamed, removes any injectedTameable, and clears the follow target. - Untaming only ever applies to creatures this mod itself force-tamed. It will never touch a creature that's naturally tameable, regardless of tamed state.
Both keys are blocked while chat, console, or inventory has focus.
Tamed spawners (Gjall ticks)
In vanilla, a tamed Gjall still spawns untamed ticks, so it ends up fighting its own spawn. Every 0.5 seconds the mod looks for characters that are still wild, spawned within the last 6 seconds, and are within 30 m of a tamed creature whose name is in SpawnerNames, and tames them the same way the ForceTameKey does (they are also added to the force-tame set, so key 0 can untame them).
This is a proximity heuristic, not a hook into the spawn code. A wild creature that happens to spawn right next to a tamed Gjall inside that window would also be tamed. Ticks that were already hostile before the Gjall was tamed are not touched. Press 0 near them to force-tame them.
Build
The project uses direct HintPath references only (no NuGet). Everything resolves from your local Valheim install:
valheim_Data\Managed\forassembly_valheim.dll, the UnityEngine modules, and Valheim's ownnetstandard.dllBepInEx\core\forBepInEx.dlland0Harmony.dll
VALHEIM_INSTALL defaults to C:\Program Files (x86)\Steam\steamapps\common\Valheim. Override it with an environment variable or edit the .csproj if your install lives elsewhere.
Project settings that matter for Valheim 1.0:
- Targets
net472(needs the .NET Framework 4.7.2 targeting pack installed) FrameworkPathOverridepoints at the 4.7.2 reference assembliesnetstandardis referenced from Valheim'sManagedfolder (v2.1.0.0) to avoid a version conflict with the Unity assembliesImplicitUsingsdisabled, andVector3/Objectare fully qualified asUnityEngine.Vector3/UnityEngine.Objectin the source to avoid ambiguity withSystem.NumericsandSystem.Object
Build from a terminal in the project folder:
dotnet restore InstantTame.csproj
dotnet build InstantTame.csproj -c Release
The DLL is copied to BepInEx\plugins\InstantTame\ automatically if that folder exists. If Visual Studio reports a stale project.assets.json target error after changing frameworks, delete bin\, obj\ and .vs\, then run the restore command above.
Troubleshooting
The plugin logs to BepInEx\LogOutput.log:
Harmony patches applied successfully.on load confirms thePlayer.Updatepatch attached.[Diag]lines (every ~3 seconds while in-world) report the focus-guard and key state, and fire lines appear when a hotkey is detected. These are diagnostic only and can be removed fromPlayer_Update_Patch.Postfixonce you no longer need them.NormalTame failed/ForceUntame failedwarnings include the exception message if a tame call throws.
Known gaps
- Runtime-added
Tameableon force-tamed creatures has zeroed fields (m_tamingTime,m_fedDuration,m_tamedEffect, etc.) since it wasn't set up on the prefab.TamingUpdate()no-ops onceIsTamed()is true, so this is safe, but force-tamed monsters get no tame VFX or name tag beyond the on-screen message. - Non-
MonsterAIcreature fallback (Character.SetTamed(true)alone, no component) has no command support and may not persist cleanly across a relog, sinceTameablenormally owns some of that ZDO state. Untaming one flips the flag but has no extra cleanup. - Force-tame tracking is per session (an in-memory ZDOID set), so after a restart the toggle can't untame monsters force-tamed in a previous session.