Skip to content

How It Works

Drehverschluss edited this page Nov 26, 2026 · 3 revisions

How it works

The leading pool

Every player has exactly one mana pool. One mod holds the number, the leading mod; it is chosen with manaSystem in the server config, since 0.2.0 also with a question at the first start, a command or the config screen (see Modes):

  • "runelessrpg" (default): RunelessRPG's own mana is the pool.
  • "irons_spellbooks": Iron's own mana (MagicData) is the pool. RunelessRPG reads and writes it through its API for other mana systems.
  • "ars_nouveau": Ars' own mana (its mana capability) is the pool, the same way.

The leading mod keeps everything of its own: base max mana, regeneration, its rules for respawn and death and its own gear (for Ars also progress and familiars). If the chosen mod cannot lead (not installed, its adapter is off, the self test failed, another bridge is active), RunelessRPG leads and the log says why.

The switch

The other mods follow. A small set of mixins redirects their mana:

  • Reading their mana gives the shared pool in their own units, writing sends the difference to the pool (Iron's ChangeManaEvent still fires, so Iron's addons that listen to it keep working; Ars addons that add or remove mana through Ars' mana capability go through the switch too).
  • Their own regeneration is off for players, and so is Iron's respawn rule (switchable, see Configuration).
  • Their max mana, where it limits or scales the mana (bars, potions, Ars' spell book and Caster Tome), is the shared max in their units.
  • Their spells pay through RunelessRPG, with RunelessRPG's Mana Cost and debt rules and, since 0.2.0, its Overcharge. This also applies while Iron's or Ars leads.

Only real players are affected. Iron's mobs and bosses, Ars turrets, runes and familiars as casters, fake players and other entities keep their own mana.

The factor

Inside, everything is counted in RunelessRPG mana. Every other mod has a factor: 1 mana of that mod = factor RunelessRPG mana.

The factor is set automatically from the base values: RunelessRPG's base max mana divided by the other mod's base max mana (Iron's: the base value of irons_spellbooks:max_mana, Ars: baseMax in Ars' server config). With the defaults that is 20 ÷ 100 = 0.2 for both. If a pack changes a base value, the factor follows, so the base pools stay the same size (RunelessRPG's baseMaxMana = 10 gives a factor of 0.1, Ars' baseMax = 200 gives 0.1 for Ars). A fixed factor can be set with irons_spellbooks.manaFactor and ars_nouveau.manaFactor. Because both default factors are 0.2, 1 Iron's mana = 1 Ars mana.

Amount Iron's or Ars mana RunelessRPG mana (factor 0.2)
Base pool 100 20
Iron's Firebolt 10 2
Iron's Fireball 60 12
Iron's Electrocute (channeled) 6 per second 1.2 per second
Ars projectile + Harm 25 5
Ars projectile + Linger + Harm 525 105
RPG Series Fireball 20 4
RPG Series Fire Meteor 50 10
RPG Series Frost Blizzard 140 28

A mode change only changes the regeneration

Every attribute counts in the units of its own mod: RunelessRPG's attributes in RunelessRPG mana, Iron's attributes in Iron's mana, Ars' attributes and progress in Ars mana. Gear and costs are converted into the leading pool with the same factors. So the same gear and the same spells give the same share of the pool in all three modes; only the number on the bar is five times larger while Iron's or Ars leads.

Example with gear from all three mods (measured in my tests): an Iron's chestplate with +50 max mana, Ars boots with Mana Boost III (+75), RunelessRPG's Manafused V (+15), +10 % Iron's max mana of the base value, +10 % RunelessRPG max mana of the total and +10 % Ars max mana of the total:

RunelessRPG leads Iron's leads Ars leads
Max mana without gear 20 100 Iron's mana (= 20) 100 Ars mana (= 20)
Max mana with the gear (20 + 10 + 15 + 15) × 1.1 × 1.1 × 1.1 = 79.86 399.3 (= 79.86) 399 (= 79.8)
+ 10 learned glyphs and spell book tier 1 133.1 665.5 (= 133.1) 665 (= 133.0)
+ a familiar (reserve 15 %) 113.135 565.675 (= 113.135) 565 (= 113.0)
RPG Series Fireball 4 20 20
Iron's Fireball 12 60 60
Ars projectile + Harm 5 25 25

What is different on purpose is the regeneration: each mod brings its own rule (RunelessRPG 0.5 per second, Iron's 2 % of the max mana per second, Ars 5 per second plus glyphs, spell book tier and gear). That is the reason to let one mod or another lead. See Modes.

The bridge for gear

Bonuses on max mana and regeneration of the following mods count for the leading pool. The bridge reads them every server tick for every player (all sources end as modifiers on the attribute, so armor, enchantments, Curios slots, spell books, upgrade orbs, effects and /attribute all count) and gives them to the leading mod as modifiers of the same operation (ids runelessrpg_bridge:bridge_*, not saved). Modifiers of the bridge itself are left out when reading, so nothing counts twice.

  • Flat values are converted with the factors: +125 Iron's max mana → +25 RunelessRPG max mana; +75 Ars max mana → +15; +25 RunelessRPG max mana → +125 Iron's or Ars max mana.
  • Percent values stay percent: +10 % of the base value stays +10 % of the leading mod's base value, +10 % of the total stays +10 % of its total.
  • Regeneration: Iron's mana_regen is a factor on Iron's regeneration (1.0 = 100 %), so it becomes a percent bonus on the leading pool's regeneration (+15 % → × 1.15). Ars' regeneration bonuses are flat (Mana Regen II +4 Ars mana per second → +0.8 RunelessRPG mana per second). While Iron's leads, RunelessRPG's flat regeneration bonuses (+0.25 per second → +1.25 Iron's mana per second) are paid into the pool besides Iron's own regeneration; while Ars leads, they become a modifier on Ars' regeneration (+1.25 Ars mana per second). Percent bonuses multiply the leading mod's regeneration.
  • Ars progress (learned glyphs, spell book tier) and the reserve of Ars familiars count too while Ars follows, with their own switches bridgeProgression and applyFamiliarReserve. Details: Ars Nouveau.
  • RunelessRPG's base values (baseMaxMana, baseManaRegen) do not count while another mod leads; the base values of Iron's and Ars do not count while they follow.

Which bonuses cross over is set with the bridge… switches in Configuration.

Rounding

Iron's counts mana as a decimal on the server but sends whole numbers to the client, its costs are whole numbers and its regeneration cuts the mana to the whole max. Ars counts mana as a decimal, but its costs and its max mana are whole numbers. So numbers can differ by up to one Iron's or Ars mana, that is 0.2 RunelessRPG mana, from what you would compute. Examples: a client checks a cast with the whole number (the server decides); while Iron's leads, 272.25 becomes 272 Iron's mana (54.4 instead of 54.45 RunelessRPG mana); while Ars leads, 399.3 becomes 399 Ars mana (79.8 instead of 79.86) and a familiar's 15 % of 100 become 84 instead of 85. Ars costs are converted as decimals (25 × 0.8 = 20 Ars mana = 4 RunelessRPG mana). Displayed amounts are rounded to two decimals.

Clone this wiki locally