Go to file
pseudonym-2669 5af5a51604 oops, fix again 2022-09-02 15:40:51 +00:00
sounds add stomach growling noises when players get hungry 2021-01-13 17:21:08 -07:00
textures Stamina mod. 2016-02-16 16:33:58 -08:00
.luacheckrc Create an API for stamina with player_monoids compatbility (#26) 2019-07-31 19:45:37 +02:00
API.txt Create an API for stamina with player_monoids compatbility (#26) 2019-07-31 19:45:37 +02:00
README.txt Create an API for stamina with player_monoids compatbility (#26) 2019-07-31 19:45:37 +02:00
bower.json Add bower support 2017-06-20 13:02:24 -07:00
depends.txt Create an API for stamina with player_monoids compatbility (#26) 2019-07-31 19:45:37 +02:00
description.txt Stamina mod. 2016-02-16 16:33:58 -08:00
init.lua oops, fix again 2022-09-02 15:40:51 +00:00
mod.conf Stamina mod. 2016-02-16 16:33:58 -08:00
screenshot.png Add a screenshot. 2018-02-18 21:57:24 -08:00
settingtypes.txt Create an API for stamina with player_monoids compatbility (#26) 2019-07-31 19:45:37 +02:00

README.txt

Minetest mod "Stamina"
=====================

(C) 2015 - BlockMen
(C) 2016 - Auke Kok <sofar@foo-projects.org>


About this mod:
---------------
This mod adds a stamina, or "hunger" mechanic to Minetest. Actions like
crafting, walking, digging or fighting make the player exhausted. When
enough exhaustion has been accumulated, the player gets more hungry,
and loses stamina.

If a player is low on stamina, they start taking periodical damage,
and ultimately will die if they do not eat food.

Eating food no longer heals the player. Instead, it increases the
stamina of the player. The stamina bar shows how well fed the player
is. More bread pieces means more stamina.


Q&A time: Why won't I move the stamina bar to the right?

Answer: this conflicts with the builtin breath bar. To move the
builtin breath bar, I basically have to entirely re-implement it
in lua including timers to catch breath changes for each online
player, which is all a waste of time, just to move a few pixels
around.


For Modders:
------------
This mod intercepts minetest.item_eat(), and applies the hp_change
as stamina change. The value can be positive (increase stamina) or
negative (periodically damage the player by 1 hp).

See API.txt for information on the API.

License:
--------
Code:
- all code LGPL-2.1+
Textures:
- stamina_hud_poison.png - BlockMen (CC-BY 3.0)
- stamina_hud_fg.png - PilzAdam (WTFPL), modified by BlockMen
- stamina_hud_bg.png - PilzAdam (WTFPL), modified by BlockMen
Sounds:
- stamina_eat.*.ogg - http://www.freesound.org/people/sonictechtonic/sounds/242215/ CC-BY-3.0