Qua8ion-LetMeTameYouServerFix icon

LetMeTameYouServerFix

Server-side fix for LetMeTameYou on dedicated servers: the server sets up tames the way clients do, so it no longer deletes newborns like fawns, and the tames it simulates keep their tamed AI.

By Qua8ion
Last updated 19 hours ago
Total downloads 24
Total rating 0 
Categories Mods Tweaks Server-side Utility AI Generated
Dependency string Qua8ion-LetMeTameYouServerFix-1.0.1
Dependants 0 other packages depend 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
Meldurson-LetMeTameYou-0.1.0 icon
Meldurson-LetMeTameYou

Rewrite of the taming portion of AllTameable. Overhauls the taming system and allows you to tame and modify taming for almost any creature.

Preferred version: 0.1.0

README

LetMeTameYouServerFix

A server-side fix for LetMeTameYou on dedicated servers. The server sets up tames the same way clients do, so it no longer deletes newborns.

The bug

LetMeTameYou makes creatures tameable by changing their prefabs: it adds taming and breeding, swaps the AI and creates a prefab for the young (for deer it is MiniDeer). Clients do this once they receive the tame list from the server. A dedicated server skips it and keeps the vanilla prefabs.

With a server-side simulation mod (Dedicated Simulation and the like) the server itself creates every object near players, and an object whose prefab it does not know is deleted on the spot (Destroyed invalid prefab ZDO in the server log). So on such a server:

  • a newborn (a fawn, for example) disappears right after it is born;
  • a taming tool dropped on the ground disappears too;
  • tames the server takes over run on vanilla AI, so a tamed deer behaves like a wild one.

What this mod does

When the world loads on a dedicated server, it runs the same setup LetMeTameYou runs on clients (TameManager.UpdatesFromServer, then PrefabManager.ItemReg for the taming tool), from the same tame list. Clients, single player and hosted games are not touched.

If LetMeTameYou changes and these methods are gone, the mod logs an error and does nothing.

Installation

Server only, next to LetMeTameYou. Players do not need it, and it does not check versions.

  • Mod manager: install it on the server.
  • Manual: put LetMeTameYouServerFix.dll into BepInEx/plugins on the server.

Log

  • On start: Tames from LetMeTameYou are set up on a dedicated server too.
  • When the world loads: Tames set up on the server: Deer (offspring MiniDeer) — every tame from your list, with its offspring prefab.
  • If an offspring prefab is still missing: <creature>: offspring prefab <name> is not registered, the server will delete newborns.

Tested with LetMeTameYou 0.1.0 on a Linux dedicated server with Dedicated Simulation.