6Vikings-Canons icon

Canons

BETA - Stops the endless "Missing prefab hash" log spam (ValheimRAFT 5.0.9 cannonballs and any other unknown object). Client-side, not enforced.

Last updated a day ago
Total downloads 26
Total rating 0 
Categories Gear Server-side Client-side AI Generated
Dependency string 6Vikings-Canons-1.0.1
Dependants 1 other package depends on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2351 icon
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.2351
ValheimModding-Jotunn-2.30.2 icon
ValheimModding-Jotunn

Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.

Preferred version: 2.30.2

README

Canons

Stops the endless Missing prefab hash log spam in Valheim.

When the game receives a networked object whose prefab it does not know, it logs a warning and retries about 25 times per second, for every such object, forever. With ValheimRAFT 5.0.9, cannonballs are in that case: a client near a cannon fills its log. On our server one client wrote 2.6 million of these lines in 2 h 24 min, up to 980 per second, while all three players had heavy FPS drops.

This mod lets the game log the first warning for each unknown prefab, then answers "nothing to create" silently, with at most one summary line per minute, and only when something new happened.

  • Client-side, not enforced. It protects the game it is installed in. The server does not need it, other players do not need it, and it never blocks a connection.
  • It works for any unknown prefab, not only cannonballs, and does not depend on ValheimRAFT.
  • It does not create, change or remove any object. The orphan cannonballs still exist (from the code, until the player whose game created them disconnects); the real fix belongs in ValheimRAFT.

In game

The console answers and the in-game message follow your game language: English, or French when your game is in French.

Console (F5):

Command Effect
canons Status: active or not, patch applied or not, what was silenced since launch
canons off Turn it off without restarting: the game logs as before. The choice is saved and survives a restart
canons on Turn it back on

After 30 days with nothing to silence, the mod says in game that it can be removed. That only means nothing happened for 30 days: check that your ValheimRAFT version says the bug is fixed before removing it. And if the fix was turned off (canons off) and forgotten, the message can come without it ever having run.

Measured

On an RTX 4080 PC, with BepInExPack Valheim's logging config, writing these warnings the way the game does costs about 0.37 ms per line. 35 stuck cannonballs (about 970 lines per second) dropped an empty scene by 21 to 28 % (two runs: 177.5 to 127.0 FPS, then 175.6 to 138.5 FPS).

Proven in single player with fake unknown objects (50 lines without the mod, 1 with it). The real case, a client connected to a dedicated server, goes through the same game method but has not been measured yet.

Made by San Tiépi (team 6Vikings). Feedback and bug reports: Discord 6Vikings Mods, forum #bugs: give the mod's version, what happened, and your BepInEx\LogOutput.log file.


En français

Fait taire la répétition Missing prefab hash du jeu. Quand Valheim reçoit un objet dont il ne connaît pas le modèle, il l'écrit dans son journal et réessaie environ 25 fois par seconde, sans fin. Les boulets de canon de ValheimRAFT 5.0.9 sont dans ce cas.

Le mod laisse passer la première ligne par modèle inconnu, puis se tait, avec au plus un résumé par minute, et seulement s'il y a du nouveau. Il se pose chez chaque joueur qui le veut : ni le serveur ni les autres n'en ont besoin, et il ne refuse jamais une connexion. Commandes : canons, canons on, canons off.

Retours et bugs : Discord 6Vikings Mods, forum #bugs : la version du mod, ce qui s'est passé, et le fichier BepInEx\LogOutput.log.