Confirm with your password

BlockSoundReplacer

Replaces the Staff of Protection barrier hit sound and the parry (perfect block) sound with a custom clip. Client-side.

· MIT license · Website

Stars
0
Downloads
18
Version
0.5.0
Updated
Author
Amyxandrite
Virus scan
✓ Scan successful
Runs on
Client-only

Description

Block Sound Replacer

Replaces the Staff of Protection barrier hit sound and the parry (perfect block) sound in Valheim with a custom clip (hitsound.wav). Client-side only.

Requirements

Install

Install through your mod manager, or copy BlockSoundReplacer.dll and hitsound.wav together into BepInEx/plugins/BlockSoundReplacer/.

Config

BepInEx/config/local.blocksoundreplacer.cfg (created on first launch)

Setting Default What it does
ReplaceBarrierHit true Replace the Staff of Protection barrier hit sound
ReplaceParry true Replace the parry / perfect-block sound
ReplaceBlock false Replace the normal block sound
Volume 1.0 Volume of the replaced sounds, from 0 (silent) to 1 (full). Changes apply while the game is running if you use a configuration manager
DirectPlayback true Play the clip through its own audio source for parry/block effects
FileName hitsound.wav Audio file next to the DLL (WAV or OGG)

To use your own sound, replace hitsound.wav in the plugin folder or point FileName at another file.

Building from source

  1. Install the .NET SDK and BepInEx.
  2. Double-click build.bat. It finds Valheim and BepInEx (game folder, r2modman or Thunderstore profile), builds, and copies the DLL and hitsound.wav into BepInEx/plugins/BlockSoundReplacer/.
  3. To build by hand: dotnet build -c Release -p:ValheimDir="<Valheim folder>" -p:BepInExCore="<BepInEx\core folder>"

Troubleshooting

Search BepInEx/LogOutput.log for Block Sound Replacer. It lists the effects found and the prefabs changed. After a parry, lines starting with [probe] show what the parry effect looked like when it spawned.

Changelog

0.5.0 Latest
  • Added a Volume setting (0 to 1, shown as a slider in a configuration manager). It applies to the barrier hit sound and the parry sound.
  • Volume changes apply while the game is running.
0.4.0
  • Renamed from Staff Shield Hit Sound to Block Sound Replacer. The plugin ID, config file (local.blocksoundreplacer.cfg), DLL and install folder all changed. build.bat removes the old StaffShieldHitSound plugin folder so the two don't load together.
  • Parry (perfect block) sounds are now played through the mod's own audio source and the original sound is muted (DirectPlayback, on by default).
  • Added [probe] log lines that report what a replaced effect looked like when it spawned, for debugging the parry sound.
  • Barrier hit replacement is on by default, and uses the game's own sound component as before.
  • Removed the F9 test key.
  • The bundled clip is now the louder, compressed version, with its full decay kept.
  • Added manifest.json, README.md and an icon for Thunderstore.
0.3.0
  • Added replacement of parry and normal block sounds, with ReplaceParry, ReplaceBlock and ReplaceBarrierHit settings.
  • Dodge sounds are excluded from replacement.
  • Added an F9 key that plays the clip directly, for testing (removed in 0.4.0).
  • Removed the old Volume setting, because the game overrode it.

2 older entries, full version history & downloads →

Manual installation instructions
1

Install BepInExPack Valheim

BepInExPack Valheim is required to run mods in Valheim.

Download BepInExPack Valheim 5.4.2351 · View mod page

Check out the mod page for detailed installation instructions.

2

Install BlockSoundReplacer

This mod only needs to be installed on the client.

Download BlockSoundReplacer 0.5.0

Extract the ZIP and place the file(s) into the BepInEx/plugins/ folder inside your Valheim game folder.