Skip to content

Mana and Attributes

Drehverschluss edited this page Nov 6, 2026 · 1 revision

Mana and attributes

Every player has a mana pool. Spells take mana from it, regeneration fills it up again. Its size and speed are normal attributes, so any gear, effect, enchantment or affix can change them.

The mana pool

  • Size: the attribute runelessrpg:max_mana. Every player starts with the base value from the server config (baseMaxMana, default 20).
  • Regeneration: the attribute runelessrpg:mana_regen in mana per second (baseManaRegen, default 0.5). Every tick a twentieth of it is added. It can be negative: then mana drains down to 0.
  • Stored with the player: the current mana is saved with the player and sent to the client whenever it changes.

The base values of Max Mana and Mana Regeneration are set from the server config whenever a player logs in, respawns, changes the dimension and when the server config changes. Gear and effects add modifiers on top; do not change the base value of these two attributes with other mods or commands, it is reset to the config value.

Login, respawn and dimension change

Situation Mana
New player (never had mana) Starts full, no matter which mod reads the mana first
Login Keeps the saved value. Max mana from gear counts (gear modifiers are applied on the first tick after login, before anything is lowered)
Death and respawn Full again (on the first tick after respawning, so max mana from kept gear counts). Not after leaving the End through the exit portal
Dimension change Keeps the value
Max mana goes down (gear taken off) Lowered to the new maximum

Worlds from older versions keep the stored mana of their players.

The six attributes

Attribute Base Range Kind Effect
Max Mana (runelessrpg:max_mana) 20 (config) 0 – 100000 value Size of the mana pool
Mana Regeneration (runelessrpg:mana_regen) 0.5 (config) −1000 – 1000 per second Mana restored per second; shown as "+0.5/s"
Mana Cost (runelessrpg:mana_cost) 100 % 0 – 1000 % percentage Multiplier for spell costs; lower is better. Has a lower limit (minManaCostPercent, 50 %), see Spell costs
Overcharge (runelessrpg:overcharge) 0 % 0 – 1000 % percentage Spells cost this much more and deal more damage and healing, see Overcharge and leech
Mana Leech (runelessrpg:mana_leech) 0 % 0 – 100 % percentage Part of the weapon damage you deal comes back as mana
Spell Mana Leech (runelessrpg:spell_mana_leech) 0 % 0 – 100 % percentage Part of the damage of your direct spell hits comes back as mana

All six are synchronized to the client, so tooltips and other mods show the right values. In item tooltips Mana Cost going down is shown as a bonus (blue), Overcharge is neutral (grey).

Attribute tooltip

The percentage attributes use add_value modifiers with fractions: -0.1 on mana_cost is −10 %, 0.15 on overcharge is +15 %.

Debt (mana below 0)

Mana only goes below 0 when a spell is paid in a debt mode (manaMode = DEBT or DEBT_LIMIT) or under Borrowed Power. Then:

  • positive regeneration pays the debt back;
  • negative regeneration never makes the debt deeper;
  • potions and mana leech pay the debt back first and never fill above max mana;
  • the mana display shows the debt in its own color (debtColor).

Debt

Where mana comes from

Source How
Regeneration Always, runelessrpg:mana_regen per second
Potion of Mana 25 % / 50 % of max mana at once
Mana Leech, Spell Mana Leech Part of the damage you deal
Respawn Full
Commands and other mods /runelessrpg mana, RunelessApi

Clone this wiki locally