HornOfCalling

v0.1.1·Updated 2026-09-18

Craft a horn at the Workbench that sounds a blast other players hear out to 64 m. Made for no-map servers where finding each other is part of the game.

About this mod Author’s original text

Horn of Calling

Adds a craftable Horn of Calling to the Workbench. Equip it and left click to sound

a blast. Its volume is a slider on the Audio tab of the game's settings menu.

Status: in progress. The horn looks and sounds right, costs 1 Bronze + 1 Deer

Hide at a level 1 Workbench, and is heard by other players out to 64 m. What is left

is the behaviour: see Not done yet.

Plain BepInEx + Harmony, no extra runtime dependency — install HornOfCalling.dll into

BepInEx/plugins/ and nothing else.

The mod adds an item and a recipe, so it needs to be on every client and on the

dedicated server.

Building

dotnet build HornOfCalling/HornOfCalling.csproj -c Release

Defaults to the Linux Steam install (~/.local/share/Steam/steamapps/common/Valheim),

falling back to the default Windows path. Override it by creating

Directory.Build.user.props next to Directory.Build.props (gitignored):

D:\Games\Valheim

A successful build copies the DLL straight into BepInEx/plugins. There is no hot

reload — restart the game after each build.

The build errors early with a named message if assembly_valheim.dll or BepInEx.dll

can't be found, rather than emitting a wall of CS0246.

How it works

Three registration steps, all idempotent, driven from Harmony postfixes in

src/Patches.cs:

| Step | Where | Why there |

|---|---|---|

| Clone the prefab, add to ObjectDB.m_items | ObjectDB.Awake, ObjectDB.CopyOtherDB | ObjectDB is built twice — a stripped main-menu copy, then the real world one |

| Add the Recipe | any of the three patches | Needs the Workbench, which is a piece and may not exist at the first ObjectDB.Awake |

| Add to ZNetScene.m_prefabs / m_namedPrefabs | ZNetScene.Awake | Lets the item and its sound effect exist as networked objects |

The item is cloned from the vanilla Horn of Celebration (prefab TankardAnniversary),

which supplies the horn model, the icon and the hold pose without an AssetBundle.

The clone needs three things undone. Its m_ammoType is "mead" — vanilla, the horn

drinks a mead from your inventory when you sound it, and refuses to sound at all without

one — so that is cleared. Its inherited weapon stats (knockback, backstab, block, parry)

are zeroed so the tooltip is just the flavour text. And its start effects, a mead splash

and a burp, are replaced by the blast.

The blast is not played by a patch. The clip — a 16-bit PCM WAV embedded in the

assembly, decoded in src/HornSound.cs — is hung off the item's

m_startEffect, which the game fires once per attack after the stamina check. That

also routes it through the SFX mixer group, so the player's volume slider applies.

The clip is peak-normalised to −0.3 dBFS, and that is the whole of the horn's loudness at

100%: Unity clamps AudioSource.volume at 1, so once the mod asks for full volume the

only headroom left is inside the recording.

The volume row in src/VolumeSlider.cs is the vanilla SFX row

cloned: the Slider sits on the row GameObject with its caption and percentage as

children, so one Instantiate copies the whole thing. It is then retitled, spliced into

the tab's navigation chain, and pointed at the config entry.

Settings

Settings → Audio → Horn of Calling, sitting under the three vanilla volume sliders.

It moves live while you drag it, saves on OK and is discarded on Back, the same as

the sliders above it.

The value is stored in BepInEx/config/com.greg.hornofcalling.cfg:

[Audio]

How loud the horn blast is, as a fraction of the recorded level. [...]

Setting type: Single

Default value: 1

Acceptable value range: From 0 to 1

BlastVolume = 1

Editing the file, or the F1 ConfigurationManager overlay if you have it, applies without

a restart — the settings row is a front end for this entry, not a separate setting.

It multiplies Valheim's own sound-effects volume rather than replacing it, and it is

per player: it changes every blast you hear, whoever sounded it, and never what

anyone else hears. That is why it is not synced through MushroomSync — see

docs/CONTEXT.md.

The

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. 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.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. 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.

Dependencies

Install these first, or the mod will not work:

denikson-BepInExPack_Valheim

File & checksum

Filename
HornOfCalling-0.1.1.zip
File size
315.4 KiB