Description
Hytale Hunger Mod
Introduces a Hunger system to Hytale, requiring players to manage their food intake to survive and thrive in the game world.
Designed with maximum compatibility and performance in mind.
Features
- Hunger Bar: A visual representation of the player's hunger level displayed on the HUD
- Hunger Depletion: Hunger decreases over time, with the rate influenced by player actions such as stamina usage, or mining blocks.
- Hunger Saturation: Some foods will saturate your hunger bar over the 100% value, providing a buffer before hunger starts depleting again.
- Preview Hunger Restoration: When initiating the food consumption animation, a preview of the hunger restoration and saturation values is displayed.
- Food Consumption: Players can consume various food items to restore their hunger levels.
- Status effects: When hunger drops below a certain threshold, players experience reduced movement speed and disabled sprint.
- Starvation Damage: Players take damage over time when their hunger reaches zero.
- SFX and VFX: Includes screen effects and sound effects when starving.
- Safe areas: Hunger depletion is paused when players are in designated safe zones (provided by other plugins).
- Configurable Settings: Customize hunger depletion rates, starvation interval, starvation damage, hungry threshold, how much stamina usage and mining affects hunger, and food restoration values via a configuration file.
Actions affecting hunger
- Basal Metabolic Rate: Hunger slowly depletes over time, even when the player is idle.
- Stamina usage: The more stamina the player uses, the faster their hunger depletes. This includes sprinting, blocking, bashing, and charging attacks.
- Hitting blocks: Each time the player hits a block, a small amount of hunger is depleted. Using better tools requires fewer hits to break a block, resulting in less hunger lost per block broken.
Balance
Currently, the default configuration is pretty forgiving, if you want a more challenging experience, you may want to tweak the configuration file to increase the starvation rate and damage.
With the default configuration, you'll go from max hunger (100) to starvation (0) in about 27 minutes of real-life time. If you're running all the time, it may take around 15 minutes.
Changelog
The full list of changes can be found on the GitHub Releases page.
Compatibility
This mod have been designed with compatibility in mind, ensuring it works well alongside other mods, including HUD, food and safe zone mods.
- If you use other HUD mods, make sure to use the MultipleHUD mod. The other HUD mods that you use must support it too.
- This mod works in both single-player worlds and multiplayer servers.
- This mod is compatible with most custom food items, as long as they use the Template_Food and don't override the default consume food interaction, which most food mod doesnt.
- Safe Areas defined by other plugins will pause hunger depletion as long as the mod that defines it uses the
Invulnerablecomponent, which most mods use. - This mod modifies the
Server.Item.Interactions.Consumables.Consume_Charge_Food_T*.jsonassets, so it won't be compatible with other mods that modify that asset.
Configuration
CurseForge tables are not rendered correctly. I recommend checking the configuration section in Github instead.
Commands
CurseForge tables are not rendered correctly. I recommend checking the commands section in Github instead.
Performance
This mod is optimized for performance in high pop servers, ensuring minimal impact on TPS. It achieves so by:
- Ensure that hunger updates are distributed evenly across multiple ticks
- Hunger ticks only apply to elegible players (Not dead, not in safe zone, not in creative, spawned in a world)
- Use events whenever possible instead of polling
- Use partial UI updates (Please note some other popular HUD mods such as EyeSpy and RPGLeveling forces full UI updates for all HUD mods)
In high pop servers its recommended that the StarvationTickRate is set to at least 2 seconds (default). Setting it to a lower value may result in performance issues.
Food tiers
This mod natively support all vanilla food tiers from Common to Legendary. Please note that the vanilla game only includes food items up to Rare tier. For Epic and Legendary food items you need to install custom food mods such as Hidden's Harvest Delights. This mod also support modded food tiers such as Mythic and Unique.
Recommended mods
- Poisonous Raw Meat: As the name implies, makes raw meat poison you instead of healing
- Hidden's Harvest Delights: Adds a lot of new food recipes, with balanced buffs and hunger restoration values. Includes food tiers Epic, Legendary, Mythic and Unique.
- MultipleHUD: Makes this mod compatible with other HUD mods, as long as the other HUD mods also use MultipleHUD.
Changelog
For the full changelog of all versions, check the releases page at GitHub
Mod authors guide
If you're a mod author and want to customise the hunger restoration and saturation values of your food items, please refer to the mod authors guide in Github.
Special thanks
- trouble-dev: For his UI guides and noels-whitelist-manager plugin, which I used as a reference for updating UI elements.
- Darkhax: For his Spellbook mod that I used as reference for creating new interactions
- oskarscot: For his Hytale ECS Basics guide
- Buuz135: For his MultipleHUD mod, which I rely on for making this mod compatible with other HUD mods.
- ItsNeil17: For his numerous contributions to the HytaleModding website, such as the creating events, creating commands and Store persistent data to a Player guides.
- underscore95: For his contributions to the HytaleModding website, such as the Custom UI guide
- Elliesaur: For her contributions to the HytaleModding guides, such as the creating events guide.
- OwnerAli: For his CODECs and Custom Config guide.
- bird3681: For his How to use death event guide on the HytaleModding discord.
- HytaleModding: For providing valuable resources for Hytale modding.
- Santoniche: For the chicken leg icon used in the HUD.
- @jezebelhunter at discord: For helping me debug issues with the multiplayer functionality.
- To all the helpful people in both Hytale and HytaleModding discords
This project could not have been possible without the shared effort of the Hytale modding community!
Open source
Licensed under the GNU Affero General Public License v3.0
