blenderLoadingScreenss
Intermission content mod for server.
截圖 共 5 張
模組介紹 作者原文
PetPantry
The PetPantry mod for Valheim automatically feeds tamed animals from nearby containers, ensuring your pets stay happy and healthy without manual intervention. This mod is optimized for performance, reducing the overhead typically associated with continuous checks for nearby containers and food items.
Version checks with itself. If installed on the server, it will kick clients who do not have it installed.
This mod uses ServerSync, if installed on the server and all clients, it will sync all configs to client
This mod uses a file watcher. If the configuration file is not changed with BepInEx Configuration manager, but changed in the file directly on the server, upon file save, it will sync the changes to all clients.
Made this quickly since people asked for it and most of the other alternatives are either broken or have issues.
PetPantry Mod
Benefits
Compared to Counterparts that are usually a named variation of "AutoFeed" or reuploads of Aedenthorn's AutoFeed mod, PetPantry offers the following advantages:
- Event-Driven Feeding: Unlike other mods that constantly check for food, PetPantry only checks when an animal
becomes hungry.
- Efficient Container Management: Registers and unregisters containers dynamically, avoiding unnecessary checks on
non-food containers.
- Cooldown Mechanism: Introduces a cooldown for feed checks to prevent frequent and redundant operations.
Performance:
- Reduced Overhead: By leveraging a cooldown mechanism and event-driven checks, the mod minimizes the frequency of
potentially expensive operations.
- Optimized Filtering: Efficiently filters and processes containers and items, ensuring only relevant data is
handled.
- Caching Mechanism: Utilizes caching to store last feed check times, preventing repeated processing for the same
animal within short intervals.
How It Works
Key Mechanisms:
- Container Registration: Containers are registered when they are created and unregistered when destroyed. This
ensures the list of containers is always up-to-date.
- Hunger Check: The IsHungry method is patched to trigger a food search only when an animal becomes hungry,
ensuring checks are made only when necessary.
- Food Search and Feeding: When an animal is hungry, the mod searches nearby registered containers for suitable
food and feeds the animal if found.
Configuration
ContainerRange: Defines the range in meters within which containers are checked for food items.
RequireOnlyFood: Ensures only containers with acceptable food items are considered for feeding.
FeedCheckCooldown: Cooldown in seconds between feed checks. Checks only occur when the pet is hungry.
Objectively shite code here: PetPantry on GitHub
Installation Instructions
You must have BepInEx installed correctly! I can not stress this enough.
Manual Installation
Note: (Manual installation is likely how you have to do this on a server, make sure BepInEx is installed on the server correctly)
- Download the latest release of BepInEx.
- Extract the contents of the zip file to your game's root folder.
- Download the latest release of PetPantry.io.
- Extract the contents of the zip file to the BepInEx/plugins folder.
- Launch the game.
Installation through r2modman or Mod Manager
- Install r2modman
or Mod Manager.
For r2modman, you can also install it through the site. Mod Manager, you can also install it through the Overwolf app store
- Open the Mod Manager and search for "PetPantry" under the Online
tab. Note: You can also search for "Azumatt" to find all my mods.
The image below shows VikingShip as an example, but it was easier to reuse the image.
- Click the Download button to install the mod.
- Launch the game.
Feel free to reach out to me on discord if you need manual download assistance.
Author Information
Azumatt
DISCORD: Azumatt#2625
STEAM:
For Questions or Comments, find me in the
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。
下面這些內容需要先安裝,否則該模組不會生效: