DualExp:分离经验值角色:等级 vs 货币
DualExp 是一款 Minecraft 模组,它将传统的经验值系统拆分为两个独立的角色:用于限制解锁诸如附魔等功能访问权限的“等级(Level)”,以及用于将经验值消费于各种操作的“货币(Currency)”。
这种解耦允许对进度机制进行更精确的控制,并为整合包或数据包定义其自身的经验值使用模型铺平了道路。
默认情况下,经验球会同时为这两种角色贡献数值,但模组开发者和整合包创建者可以完全自定义经验值的获取、存储和消耗方式。DualExp 提供了一个轻量级且可扩展的 API,用于独立地访问、同步和操作这两种经验值角色。
适用于 RPG 系统、自定义经济系统,或任何希望将经验值不仅仅视为单一池子的模组。
功能
核心机制
本模组使用 Mixin 拦截原版经验值行为:
- 经验值的获得/消耗被完全重定向至符文(rune)的获得/损失。
- 经验值等级的提升保持原版逻辑;等级降低则转化为符文的损失。
- 经验球同时提供经验值和符文。
/xp 命令仅影响经验值;新增的 /rune 命令(可重命名)用于管理符文。
次要机制
- 通过一个固定比例(或在未来版本中:映射表)来决定经验值如何转换为符文数值。
- 一个简单的客户端 HUD 显示符文信息。
- 死亡时符文和经验值的行为遵循
keepInventory 规则。
DualExp: Split XP roles: level vs currency
DualExp is a Minecraft mod that separates the traditional XP system into two distinct roles: Level, used for gating access to features like enchanting, and Currency, used for spending experience on actions.
This decoupling allows more precise control over progression mechanics and paves the way for modpacks or datapacks to define their own experience usage models.
By default, XP orbs contribute to both roles simultaneously, but mod developers and pack creators can fully customize how experience is earned, stored, and consumed. DualExp provides a lightweight yet extensible API for accessing, syncing, and manipulating both XP roles independently.
Ideal for RPG systems, custom economies, or any mod that wants to treat XP as more than just a single pool.
Features
Core Mechanics
This mod intercepts vanilla XP behavior using Mixin:
- XP gain/consumption is fully rerouted to rune gain/loss.
- XP level increases remain vanilla; level reductions are translated to rune loss.
- Experience orbs grant both XP and rune.
/xp affects only XP; a new /rune command (renameable) manages rune.
Secondary Mechanics
- A constant (or in future: a mapping table) determines how XP translates to rune values.
- A simple client-side HUD displays rune information.
- Customizable via config options.
- Rune and XP behavior on death respects the
keepInventory rule.
评论 0
登录后参与评分
还没有评论,来抢沙发吧