TargetLockOn
Lock-on reticle for controller gameplay, with camera adjustment based on your equipped weapon and a trajectory preview for ranged aiming.
About this mod Author’s original text
TargetLockOn
ARPG lock-on system for Valheim, built for controller. The camera adapts to the weapon you're holding, and ranged shots get ballistic aim and a trajectory preview.
What it does
R3 to lock, flick the right stick to switch target. On keyboard: 0 to lock, and a quick mouse swipe to switch.
With melee weapons you keep vertical aim. With bows, crossbows, staffs, bombs and spears the camera locks vertically too, and your shots are aimed to land on the target, drop included.
Features
- Ballistic aim: locked shots go where the camera points and account for projectile speed, gravity, air drag and how far you've drawn the bow. No homing: a target that dodges can still be missed. Locked bombs land 30 m out at most. Weapon spread still applies.
- Trajectory preview always with bombs, and in free aim while drawing a bow or holding a loaded crossbow.
- Lock points on big creatures: trolls, the Gammeltroll, the Elder, Moder, Fader and their Aspects, the Abomination, the Gjall and Seekers. Weak spots are the game's own (troll head, Gjall belly, Seeker Soldier tail) and take weak spot damage.
- Light and weather: darkness and fog shorten how far you can lock, and a torch or campfire lights a target back up. A target hidden for 3 seconds (behind cover, in fog, or in Mistlands mist past 30 m) drops the lock. Bosses and big creatures are half as affected.
- Contextual HUD: creature health bars hide behind cover and in fog, fade right after your crosshair leaves, and stay on your target.
- The game's own crosshair jumps onto your target while locked, bow draw circle and stealth indicators included.
- R3 with nothing to lock turns your character toward the camera.
- Client side. Works on vanilla servers and with friends who don't have it.
Configuration
The config file is created after the first launch: BepInEx/config/vktr.targetlockon.cfg
| Section | Setting | Default | What it does |
|---|---|---|---|
| Input | GamepadLockButton | JoyRStick | Gamepad button that locks and releases (game button name). Ignored while L3 is also held |
| Input | LockKey | 0 (Alpha0) | Keyboard or mouse key that locks and releases |
| Input | PrevTargetKey / NextTargetKey | none | Keys that switch to the next target on the left / right |
| Input | MouseFlickPixels | 60 | Mouse move (pixels) that switches target while locked. 0 turns it off |
| Input | FaceCameraWithoutTarget | true | With nothing to lock, the lock button turns your character toward the camera |
| Lock | LockRange | 50 | Max lock distance (m) in full light and clear weather |
| Lock | DarkRangeFactor | 0.4 | Share of LockRange for a creature in full darkness. 1 turns it off |
| Lock | WeatherHidesTargets | true | Fog and Mistlands mist hide creatures, both for locking and for keeping the lock |
| Lock | MistRange | 30 | In Mistlands mist, creatures farther than this (m) count as hidden |
| Lock | LargeCreatures | trolls, Gjall, Valkyrie, Abomination, Aspects | Creatures that light and weather affect less. Bosses count without being listed |
| Lock | LargeEnvironmentWeight | 0.5 | How much light and weather count for those creatures. 0.5 = half |
| Lock | LockAngle | 37 | How far from the screen center (degrees) a target can be when you lock |
| Lock | SwitchAngle | 53 | How far from the screen center (degrees) the next target can be when you switch |
| Lock | LostSightSeconds | 3 | Seconds a target can stay hidden before the lock is lost |
| Lock | RelockOnKill | true | When your target dies, lock onto the next one in view |
| Lock | IgnoreTargets | empty | Prefab names that can never be locked, comma separated |
| Lock | MultiNodeTargets | true | Lock points on the creatures listed in TargetNodes |
| Lock | TargetNodes | see below | Lock points per creature |
| Camera | PitchLock | RangedAndSpears | Which weapons lock the vertical camera too: Off, RangedAndSpears, AllWeapons |
| Camera | CameraSpeed | 12 | How fast the camera turns to the target |
| Camera | StrafeWhileLocked | true
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.
Install these first, or the mod will not work: