blenderLoadingScreenss
Intermission content mod for server.
Screenshots 5 screenshots
About this mod Author’s original text
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
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- 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.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- 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.
Install these first, or the mod will not work: