Mana is intended to be a secondary player attribute. In mfany RPGs mana is used as a resource for magical items or spells. Each time you use one of those, this reduces your mana reserves until you hit 0 eventually, at which point you cannot use these magical items anymore; you have to recharge your mana level somehow then.
In Minetest, it could be used for all kinds of special items and tools and what else you may think of.
Mana could also be used as a lazy measure to limit the uses of special items without destroying them, so the items do not neccessarily have to be magical.
That's the basic idea behind mana.
By default, all players start with 0/200 mana, and will regenerate 1 mana each fifth of a second. Note that the regeneration rate is the same for all players and can only be changed globally.
The values can be changed on a per-player basis with an API, the mod also recognizes a few server settings.
Here is a screenshot showing a HUD bar for the mana, using the optional dependency on HUD bars mod:
Current API features:
- Add and subtract mana from a player
- Set/get the current and maximum mana of a player
- Set/get the amount of mana regeneration of a player
- mana_default_max: Initial maximum mana for new players (default: 200)
- mana_default_regen: The initial amount of mana a new player will generate (default: 1)
- mana_regen_timer: Time in seconds all (!) players will generate mana (default: 0.2)
Also, the maximum must not be smaller than 0 as well.
Download: https://codeberg.org/Wuzzy/minetest_man ... /1.3.3.zip
Version: 1.3.3 (This mod uses semantic versioning, as of 2.0.0 of the standard)
Works in Minetest 5.0.0 or later
License of mana icon: CC-BY 3.0 by Buch.
License of everything else: MIT License
Project page: https://codeberg.org/Wuzzy/minetest_mana
Optional dependencies:
- HUD bars [hudbars] (major version 1). Recommended. If you don't have this mod, you will just see a simple text instead of a “fancy” HUD bar.
Mods using this mod (partial list):