README.txt 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. Minetest mod "Stamina"
  2. =====================
  3. (C) 2015 - BlockMen
  4. (C) 2016 - Auke Kok <sofar@foo-projects.org>
  5. About this mod:
  6. ---------------
  7. This mod adds a stamina, or "hunger" mechanic to Minetest. Actions like
  8. crafting, walking, digging or fighting make the player exhausted. When
  9. enough exhaustion has been accumulated, the player gets more hungry,
  10. and loses stamina.
  11. If a player is low on stamina, they start taking periodical damage,
  12. and ultimately will die if they do not eat food.
  13. Eating food no longer heals the player. Instead, it increases the
  14. stamina of the player. The stamina bar shows how well fed the player
  15. is. More bread pieces means more stamina.
  16. Walking while holding down Aux1 (usually E key) will make player sprint so
  17. long as their stamina bar is 3 or more bread. This will make the player run
  18. that bit faster and jump a tiny bit higher.
  19. Q&A time: Why won't I move the stamina bar to the right?
  20. Answer: this conflicts with the builtin breath bar. To move the
  21. builtin breath bar, I basically have to entirely re-implement it
  22. in lua including timers to catch breath changes for each online
  23. player, which is all a waste of time, just to move a few pixels
  24. around.
  25. For Modders:
  26. ------------
  27. This mod intercepts minetest.item_eat(), and applies the hp_change
  28. as stamina change. The value can be positive (increase stamina) or
  29. negative (periodically damage the player by 1 hp).
  30. Callbacks that are registered via minetest.register_on_item_eat()
  31. are called after this mod, so the itemstack will have changed already
  32. when callbacks are called. You can get the original itemstack as 6th
  33. parameter of your function then.
  34. A global function is available for mods to change player stamina levels:
  35. stamina.change(player, change)
  36. TenPlus1 Additions:
  37. -------------------
  38. - Added support for POVA and player_monoids
  39. - Added Pipeworks checks for fake players
  40. - Added 60 second drunk effect when foods have {alcohol=1} group (eat 4 or more)
  41. - Moved exhaustion and hud_id to player table instead of player attributes
  42. License:
  43. --------
  44. Code:
  45. - all code LGPL-2.1+
  46. Textures:
  47. - stamina_hud_poison.png - BlockMen (CC-BY 3.0)
  48. - stamina_hud_fg.png - PilzAdam (WTFPL), modified by BlockMen
  49. - stamina_hud_bg.png - PilzAdam (WTFPL), modified by BlockMen
  50. Sounds:
  51. - stamina_eat.*.ogg - http://www.freesound.org/people/sonictechtonic/sounds/242215/ CC-BY-3.0
  52. stamina_burp.ogg - https://www.freesfx.co.uk/sfx/burp (small burp)
  53. stamina_sip.ogg - https://elements.envato.com/sip-16081-C7V5YLG