跳到正文

Savaru’s Mana

作者:RowLan_232oO

Cast from a mana pool instead of a pouch of runes, with a mana cost you set per spell.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Savaru’s Mana

Overview

Spell Engine prices its spells in items. That works, but it turns a caster’s inventory into bookkeeping: stacks of runes to craft, carry, and top up before every trip out.

Savaru’s Mana replaces that with a pool. Rune-priced spells are paid for out of your mana instead, and the runes stay in the chest. Every spell has its own cost, written to a config file you can edit line by line, so a cheap utility cast and an ultimate are not priced by the same equation.

Everything else the mod exposes is an ordinary entity attribute, which means gear, potions, talent trees and affix systems can all move your mana around using nothing more than a vanilla attribute modifier.


What it does

Mana instead of runes

Any spell whose listed price is a rune is taken over: if you can afford it in mana, the cast goes through and no item is consumed. Ammunition that is genuinely physical — arrows, bullets, rounds, cartridges — is deliberately left alone, because paying for those out of a mana bar would change how those weapons play rather than just where their cost comes from.

Spells you cannot afford fail the way any spell fails when you lack its price, with the usual feedback naming mana as the thing you are missing.

A cost per spell, not one formula

On first world load every spell in the pack is priced and written to config/savaru_mana/spell_costs.json, one editable line each:

"spells": {
  "wizards:arcane_bolt": 20.0,
  "wizards:fire_meteor": 80.0
}

Change a number and only that spell changes. Delete a line and it is re-derived from the spell’s own data — its damage coefficients and projectile count — using the tunable weights in the same file.

Attributes anything can drive

Attribute Default What it does
savaru_mana:mana 100 Maximum mana
savaru_mana:mana_regen 4 Mana restored per second
savaru_mana:mana_cost 100 Cost multiplier, as a percentage
savaru_mana:mana_damage_reduction 100 Damage taken while mana remains
savaru_mana:mind_over_matter 0 Free capacity for other mods to drive

Because these are real attributes they show up in attribute panels, and any mod that can add an attribute modifier can grant mana without knowing this mod exists.

A bar you can actually place

Open the settings from Mod Menu and the bar is drawn live, at its real position, by the same code the HUD uses — drag it where you want it, or nudge it a pixel at a time with the arrow keys. The preview fill drifts up and down while you work, so the low-mana colour and its threshold can be judged in motion rather than guessed at.

Sliders cover width, height, opacity, scale and the low-mana threshold, with an anchor corner that re-measures the offsets as you switch it, so changing anchor never teleports the bar. Everything is stored in config/savaru_mana/hud.json, which stays hand-editable — the screen is a front end for that file, not a second source of truth.


For mod authors

com.savaru.mana.api.SavaruManaApi is the entry point. Every method is static and takes a PlayerEntity, so it can be driven entirely by reflection and needs no hard dependency:

double  getMana(PlayerEntity player);
double  getMaxMana(PlayerEntity player);
void    restore(PlayerEntity player, double amount);
boolean spend(PlayerEntity player, double amount);   // all-or-nothing
double  drain(PlayerEntity player);                  // empties, returns what it held

Compatibility

  • Requires Spell Engine 1.10 or newer, Fabric API, and Minecraft 1.21.1.
  • Cannot be installed alongside RPG Mana; the two do the same job.
  • Mod Menu is optional; without it the config file still works. No config library is needed.

Coming from RPG Mana

This mod registers its attributes under its own namespace only. Gear rolled while RPG Mana was installed carries rpgmana: attribute ids, and Minecraft discards an item’s entire attribute block when one id in it no longer resolves — taking base attack damage and attack speed with it. Re-roll or re-obtain affected gear after switching.


常见问题

Savaru’s Mana 支持哪些 Minecraft 版本?

Savaru’s Mana 支持 Minecraft Java 版 1.21.1,可用的加载器:Fabric / NeoForge。下载时注意选择和你游戏版本一致的文件。

Savaru’s Mana 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

RowLan_232oO 的其他作品

查看全部 →