你是否曾觉得经验修补(Mending)过于强大?
你觉得移除它是唯一的解决方案?
但即便如此,你依然喜爱经验修补?
那么无需恐惧,
耐久度调整(Durability Tweak)正是为你而设!
其概念相当简单(不确定“简单”是否是恰当的形容):
- 改变“先前使用惩罚”(Prior Use Penalty)的运作方式。
- 移除铁砧中的“过于昂贵”限制。
- 增加无损修复(Unbreaking)的最高等级。
- 更改无损修复在工具和盔甲上的运作机制。
- 通过降低耐久值/经验值比率来降低经验修补的效率。
- 为经验修补添加随机性(有时生效,有时不生效)。
- 经验修补的效率与无损修复挂钩:无损修复等级越高,经验修补效率越低。
- 限制经验修补可修复的最大耐久度上限(类似于降低最大耐久度,但你仍可使用铁砧修复该物品)。
计划:
- 移植至 Fabric + NeoForge。
- 更新以支持更新的 Minecraft 版本。
许可证
没关系,你可以制作自己的版本、移植到 Fabric、回溯兼容其他 Minecraft 版本、添加或移除功能,或者……随你便。只需保留我的署名即可。谢谢。
原因与技术信息:
Minecraft 中的耐久度机制简直是一场灾难。在引入经验修补之前,你必须使用铁砧来修复你的工具和盔甲,这在达到等级上限前还算容易实现 -_- 而在更早的时候,当附魔刚加入游戏时,除非运气好获得无损修复,否则你的工具很快就会化为尘土。
Mojang 将经验修补作为改善游戏体验(QoL)的附魔加入游戏,旨在解决耐久度机制的问题。但它对游戏玩法的影响如此巨大,以至于它成为了每个世界中必须拥有的附魔。
说实话,我认为耐久度机制本身并非问题的根源。它鼓励玩家随着时间推移去探索并更换装备。在我看来,真正的问题在于铁砧。
铁砧在修复和附魔时使用经验值消耗系统。起初看起来还行,但费用很快会变得极高,导致你几乎无法提升太多等级,再加上铁砧40级的等级上限。大部分这些经验值消耗来自“先前使用惩罚”,基于你使用铁砧修复/附魔物品的次数:
priorUsePenalty = 2^useCount - 1;
事实上,Minecraft 使用的是递归方法:
public static int calculateIncreasedRepairCost(int previousUseCost) {
int newUseCost = previousUseCost * 2 + 1;
return newUseCost;
}
好吧,这个模组将其改为线性比例:
newUseCost = previousUseCost + 3;
我是理解为什么 Mojang 决定使用之前的公式。但这实在太糟糕了。而且,兄弟,经验等级本身就不是线性的,那为什么要这样设计呢?Mojang?
但在非常、非常漫长的后期,你可能仍然需要更换装备,或者干脆给它们加上经验修补 :V
嘿,当然,更改惩罚并移除“过于昂贵”并不是万能灵药。毕竟经验修补依然存在。因此为了平衡它(这正是本模组的初衷,但老实说很难),我做的第一件事是增强无损修复(是的,为什么不呢)。
现在无损修复的最高等级为5级,附魔台中的附魔成本更低(隐藏机制),并且在所有可损坏物品(工具和盔甲)之间共享相同的公式:
durabilityDropChance = 1 / (unbreakingLevel + 0.35)
结果如下:
| 无损修复等级 |
耐久掉落概率 |
| 0 |
100% |
| 1 |
74.07% |
| 2 |
42.55% |
| 3 |
29.85% |
| 4 |
22.99% |
| 5 |
18.69% |
注意1:我使用了 mixin,直接挂钩到 DigDurabilityEnchantment.class,因此你可以在村民的交易中找到无损修复 V。
注意2:实际概率似乎略低于原版,但盔甲的效果要好得多。
接下来是经验修补。经验修补的核心是“让你的工具永不过期”,但它没有任何缺点。我个人不想改变其核心,但该附魔本身需要有一些缺点才能保持平衡,这足以让玩家在给装备附加经验修补三思,同时该附魔本身仍需足够有用,不至于被扔进垃圾桶。
所以,第一个削弱是改变经验修补的效率。它现在与无损修复等级挂钩。无损修复等级越高,经验修补效率越低。
在原版 Minecraft 中,1点经验值 => 2点耐久度,且没有随机性。这太高了,你只需要2分钟就能修复一套完整的下界合金装备。
现在,当玩家获得经验球时,1个经验球将被分配给选定列表中的1个随机物品(稍后我会解释这个列表),然后对于该经验球内的每一点经验值,它将执行以下(伪)代码:
if (RandomSource.create().next(unbreakingLevel + 2) == 0)
item.repair();
这意味着,如果你的 RNG(随机数生成)够好,1点经验值 => 1点耐久度 :V
随机性表格如下:
| 无损修复等级 |
经验修补效率 |
| 0 |
50.00% |
| 1 |
33.33% |
| 2 |
25.00% |
| 3 |
20.00% |
| 4 |
16.67% |
| 5 |
14.29% |
经验修补的下一个方面是经验获取。有点杀鸡用牛刀,但当你的至少一个装备槽位(盔甲 + 副手 + 主手)中有6个槽位之一装备了带有经验修补的物品时,你将无法获得经验值。所有这些经验值都将用于修复物品,即使它们已经拥有满耐久,这些经验值也会直接消失。相当直白。
最后一个方面是耐久度限制。我设计这个机制主要是为了我的服务器,其中包含 C4 和一些种类的爆炸物。它们可以轻松破坏你的装备,即使你侥幸存活下来。为了让铁砧在某些特定情况(如 PVP)下重新发挥作用,经验修补只能修复装备最大耐久度的一部分。是的,这也再次与无损修复挂钩(没错,我在耐久度机制中让无损修复变得如此重要)。
比例为:
float dmgRatio = 9F / (6 + 4*unbreakingLevel);
结果如下:
| 修复等级 |
最大经验修补耐久度 |
| 0 |
100% |
| 1 |
90.00% |
| 2 |
64.29% |
| 3 |
50.00% |
| 4 |
40.91% |
| 5 |
34.62% |
请记住,你仍然可以通过铁砧完全修复你的齿轮。只有当你的齿轮耐久度降至这些数值以下时,经验修补才会生效。我设定的这些数值足够高,以确保在正常情况(对抗怪物)下,你的齿轮不会损坏。
另外,还记得我之前说的“1个经验球将分配给选定列表中的1个随机物品”吗?在原版 Minecraft 中,游戏会随机选择一个满足以下条件的物品:
它……有点作用,但对这个模组来说并不理想。因此,我设计了自定义逻辑:
- 属于6个装备槽之一
- 具有经验修补附魔
- 耐久度低于激活阈值。
就是这样。希望你喜欢。
Have you ever thought that Mending is way too overpowered?
You thought that remove it is the only solution?
But even that, you still LOVE Mending?
Then fear not,
Durability Tweak is for you!
The concept is quite simple (idk if 'simple' is the right word):
- Change how Prior Use Penalty work.
- Remove 'Too Expensive' in Anvil.
- Increase max level of Unbreaking.
- Change how Unbreaking work, both tools and armors.
- Lower the efficiency of Mending by lower the DUR/XP ratio.
- Add RNG to Mending (Sometimes it works, sometimes not.)
- The efficiency of Mending is tied to Unbreaking, the higher Unbreaking level is, the lower efficiency of Mending is.
- Limit the maximum durability that Mending can repair (kinda like lower the maximum durability, but you can still repair that item using anvil).
Planning:
- Port to Fabric + NeoForge.
- Update to newer Minecraft version.
License
Nah, you can make your own version, port to Fabric, backport to another version of Minecraft, add / remove features, or... whatever. Just leave me a credit. Thanks
Why + Techinal Info:
The durability mechanics in Minecraft is such a disaster. Before Mending is a thing, you have to repair your tools & armors with Anvil, which you can easily done until it reach level cap -_- And even before that, when Enchantment first added to the game, unless you have lucky to get Unbreaking, your tools will return to the dust so quickly.
Mojang added Mending to the game like a QoL enchantment that act as a solution for Durability mechanics. But it affect the gameplay so much that it turns to the MUST-HAVE enchantment in every single world.
To be honest, I don't think the Durability mechanics is the root of problem. It encourage player to explore and change their gears overtime. The actual one, in my opinion is Anvil.
The Anvil using XP cost system when repair and enchant. It's seem ok at first, but the cost will soon become so high that you just can never get much level, plus the 40-level cap in Anvil. Most of these XP cost come from Prior Use Penalty, based on how many times you repair / enchant an item using Anvil:
priorUsePenalty = 2^useCount - 1;
In fact, Minecraft using a recursive method:
public static int calculateIncreasedRepairCost(int previousUseCost) {
int newUseCost = previousUseCost * 2 + 1;
return newUseCost;
}
And yah, this mod change it to a linear scale:
newUseCost = previousUseCost + 3;
I mean, I can understand why Mojang decide to use previous formula. But it's just so terrible. And bruh, XP Level itself is not linear, so why? Mojang?
But in very, very long run, you may still need to replace your gears, or just put Mending on them :V
Heck yeah, change the Penalty and remove 'Too Expensive' is NOT the silver-bullet solution. Mending is still a thing, after all. So in order to balance it (which it's the original goal of this mod, but kinda hard, to be honest), the first thing I do is buffing Unbreaking (yeah, why not).
Unbreaking now have max level is 5, lower enchanting cost in Enchant Table (hidden mechanics), and share the same formula between all damagable item (tools & armors):
durabilityDropChance = 1 / (unbreakingLevel + 0.35)
and the result:
| Unbreaking Level |
Durability Drop Chance |
| 0 |
100% |
| 1 |
74.07% |
| 2 |
42.55% |
| 3 |
29.85% |
| 4 |
22.99% |
| 5 |
18.69% |
Note1: I did it using mixin, directly hook to DigDurabilityEnchantment.class, so you can find Unbreaking 5 in trade with Villager.
Note2: Seem like the actual rate is a bit lower than Vanilla, but armor still much better.
Next is Mending. The core of Mending is "Let you use your tools forever", but it comes with zero drawback. I personally don't wanna change its core, but the enchantment itself need to have some downsides to be balanced, which can have enough impact to make player think before add Mending to their gears, but the enchantment itself still need to be useful enough to not being throw to the garbage.
So, first nerf is change the efficiency of Mending. It's now tied to Unbreaking level. The higher Unbreaking level is, the lower efficiency of Mending is.
In vanilla Minecraft, 1 XP => 2 durability with no RNG. It's so high that you can repair a full netherite set in only 2 minutes.
Now, when player receive XP Orb, 1 orb will be assign to 1 random item in a selected list (I'll explain the list later), then for every XP inside this orb, it'll run though this (pseudo-)code:
if (RandomSource.create().next(unbreakingLevel + 2) == 0)
item.repair();
That means, 1 XP => 1 durability, if your RNG is good :V
The RNG table is:
| Unbreaking Level |
Mending Efficiency |
| 0 |
50.00% |
| 1 |
33.33% |
| 2 |
25.00% |
| 3 |
20.00% |
| 4 |
16.67% |
| 5 |
14.29% |
Next aspect of Mending is XP Earning. Kinda overkill, but when you have Mending item in atleast 1 of 6 EquipmentSlot (Armors + OffHand + MainHand), you will not earn XP. All of them will be using in repairing items and even they have full durability, these XP will just disappeared. Kinda straight forward.
Next one is Durability Limit. I design this mechanics mostly for my server, which have C4 and some kinds of explosive items. All of them can easily break your gears, even you somehow manage to survive. So to make anvil shine again in some specific cases (like PVP), Mending enchantment can only repair a part of maximum durability of gears. And yes, it's again tied to Unbreaking (hell yeah I make Unbreaking so important in durability mechanics).
The ratio is:
float dmgRatio = 9F / (6 + 4*unbreakingLevel);
and the result:
| Unbreaking Level |
Max Mending Durability |
| 0 |
100% |
| 1 |
90.00% |
| 2 |
64.29% |
| 3 |
50.00% |
| 4 |
40.91% |
| 5 |
34.62% |
Remember, you can still fully repair your gears with anvil. Mending will only work if durability of your gears drop to below these number. I set these number high enough that in normal situation (fighting against mobs), your gears just can't break.
And yeah, remember I said 1 orb will be assign to 1 random item in a selected list? In vanilla Minecraft, the game will random choose a item that meet these conditions:
- Is in 1 of 6 EquipmentSlot
- Has Mending Enchantment
- Not has full durability
It... kinda works, but not idealy for this mod. So I design my own one:
- Is in 1 of 6 EquipmentSlot
- Has Mending Enchantment
- Has durability below the activation point.
Yeah that is. Hope you like it.
评论 0
登录后参与评分
还没有评论,来抢沙发吧