附魔衰减
魔法是一种令人惊叹的力量,源自远古时代,它能让你提升对世界的掌控力。 在旅途之中,你可能会偶然发现这种古老知识的残留痕迹——附魔。 但随着时间流逝,这些知识逐渐流失,即便你从掌握这门艺术的古代文明残骸中获取的也不完美。然而,你还是成功复刻了它。你能够制作出自己的附魔台,并将旅途中积累的力量灌注到你的工具之中。 但正如预期,你所积累的知识仍有不足,你意识到随着使用附魔装备,魔法会逐渐消退……
⚠️ 本模组目前状态极不平衡。因此,非常欢迎任何关于如何改善平衡性的建议。 请在 相应的 GitHub 讨论区 分享你的想法。
工作原理
每种附魔都有各自特定的方式来影响你的生活。 本模组会在附魔被使用的多种场合进行挂钩,并将其使用记录为潜在的衰减来源。 因此,每次附魔影响你的游戏玩法时,都有一定概率使其微量衰减。当衰减达到一定阈值时,该附魔等级将下降一级,且衰减值重置。
你可以在工具名称旁的附魔名字后面看到其衰减等级。但在探索世界时,当你发现带有附魔的战利品时,它有可能 免疫衰减。你可以通过名称前的绿色 ˣ 来识别这些情况。
配置方法
在游戏启动后的 config 文件夹中,会生成一个 enchantment_decay.properties 文件。
在该文件中,你可以找到配置本模组所需的所有选项。
默认值
配置文件包含了一些供模组使用的默认值,包括:
- 默认最大衰减:此数值表示附魔最多可以衰减的程度,默认为...
- 默认衰减概率:此数值表示每百次使用中,附魔发生衰减的概率,默认为...。设为 0 则默认禁用所有衰减。
- 战利品衰减概率:此数值表示每百次生成的战利品附魔中,已经存在一定衰减值的概率。这不会影响免疫衰减的附魔。 设为 0 则禁用生成战利品中的所有衰减。
- 战利品最大衰减值百分比:此数值表示通过战利品生成的附魔,相对于该附魔的最大衰减值,其衰减程度的上限百分比。
- 战利品免疫衰减概率:此数值表示每百次生成的战利品附魔中,免疫衰减的概率。
特定附魔的值
配置文件也支持针对单个附魔的具体设置:
- 最大衰减:注册为
decay.max.<namespace>.<path>,此数值表示该特定附魔实例的最大衰减值。 - 衰减概率:注册为
decay.probability.<namespace>.<path>,此数值表示每百次使用中,该附魔实例发生衰减的概率。
示例:
decay.max.minecraft.efficiency=50
decay.probability.minecraft.efficiency=8
上述示例意味着,任何原版效率(Efficiency)附魔实例在降级前最多可累积 49 点衰减值,并且每次使用时有 8% 的概率发生衰减。
附魔控制
本模组使用附魔标签来运作。每个标签对应一种潜在的衰减来源(例如 kill 代表击杀,fall 代表跌落,hurt 代表受到伤害,damage 代表装备损坏等)。
所有这些附魔都注册为 enchantment_decay:decay/<name>,位于数据包中的 data/enchantment_decay/tags/enchantments/decay/ 文件夹下。
你可以简单地使用数据包来覆盖或添加这些标签,从而改变哪些附魔在何种情况下会发生衰减。
blacklist 标签是唯一的例外,它定义了不会发生衰减的附魔。
默认情况下,此标签仅包含诅咒类附魔。
伤害类型
自 1.20 版本起,Enchantment Decay 还使用了伤害类型(Damage Types),以便在受到特定类型伤害时为盔甲应用衰减。为此,每个衰减源都可以链接到一个伤害来源标签,该标签指示受影响的附魔是否能够从此类伤害中产生衰减。
用于此目的的标签均注册为 enchantment_decay:decay/<name>,位于数据包中的 data/enchantment_decay/tags/damage_type/decay/ 文件夹下。
展示
Enchantment Decay
Magic is an incredible force, coming from days of old, that allows you to improve your power over the world. One of the traces remaining of this ancient knowledge that you could stumble upon on your travels is Enchantments. But as time passed by, this knowledge eroded, and even that you may get from the few remains of the old civilisation that mastered this art isn't even perfect. And yet, you were able to recreate it. You were able to put together your own enchanting table, and infuse the very power accumulated throughout your journey into your very tools. But as expected, all the knowledge you could accumulate is still lacking, and you realize that as you make use of your enchanted gear, the magic slowly wears off...
⚠️ this mod, as it stands, is highly unbalanced. Hence, any input about how to improve that would be gladly welcome. Please share those on the appropriate Github discussion
How it works
Enchantments each have a more or less specific way to affect your life. This mod will hook itself on many occasions upon which enchants are used, and register their use as a potential source of decay. Hence, each time an enchantment affects your gameplay, there will be a chance it decays a small bit. And when the decay reaches a certain level, the enchantment will go down a level, and the decay reset.
You will be able to see the decay level of you tool next to the enchantment name. But as you will venture the world,
when you discover enchanted loot, there will be a chance it is immune to decay. You will recognize these occurences
with a green ˣ before the name.
How to configure
In your game's config folder, after the first launch, will be generated a enchantment_decay.properties file.
Within this file, you will find everything you need to configure the mod.
Default values
The configuration file includes a few default values for the mod to use, including:
- The default max decay: This value indicates how much can an enchantment decay, by default
- The default decay probability: This value indicates, out of a hundred, the probability for an enchantment to decay upon use, by default. Set to 0 to disable all decay by default.
- The loot decay probability: This value indicates, out of a hundred, the probability for an enchantment applied on some generated loot to already have some decay. This will not affect decay immune enchantments. Set to 0 to disable all decay on generated loot.
- The loot decay max percentile: This value indicates the maximum percentile an enchantment generated upon loot can be decayed, compared to the enchantment's maximum decay.
- The decay immune loot probability: This value indicates, out of a hundred, the probability for an enchant applied on some generated loot to be decay-immune.
Enchantment-specific values
The configuration files also support some per-enchantment specific values:
- The max decay: registered as
decay.max.<namespace>.<path>, this value indicates the maximum decay value for instances of this very enchantment. - The decay probability: registered as
decay.probability.<namespace>.<path>, the value indicates, out of a hundred, the probability for an instance of this enchantment to decay upon use.
Example:
decay.max.minecraft.efficiency=50
decay.probability.minecraft.efficiency=8
The above example would make it so any instance of the vanilla Efficiency enchantment will be able to have up to 49 as a decay value before going down a level, and that upon each use, it will have a 8% chance to decay.
Enchantments control
This mod uses enchantment tags in order to work. Each tag corresponds to a potential source of decay (suc as kill for
killing, fall for falling, hurt for getting hurt, damage for when the gear piece gets damaged, etc.)
All of these enchantments are registered as enchantment_decay:decay/<name>, so under the
data/enchantment_decay/tags/enchantments/decay/ folder within a datapack.
You can simply make use of a datapack in order to overhaul or add to these tags, thus being able to change which enchantment gets to decay on what occasion.
The blacklist tag is the one and only exception, as it defines enchantments that cannot decay.
By default, this tag only contains curses.
Damage types
As of 1.20, Enchantment Decay also uses damage types, in order to apply decay on armor upon receiving certain types of damage. To do this, each decay source can be linked to a damage source tag, that will indicate whether the subject enchantments should be able to receive decay from such damage.
The used tags for this are all registered as enchantment_decay:decay/<name>, so under the
data/enchantment_decay/tags/damage_type/decay/ folder within a datapack.
Showcase
下载 Enchantment Decay
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Enchantment Decay
下载 Enchantment Decay
下载 Enchantment Decay
下载 Enchantment Decay
下载 Enchantment Decay
下载 Enchantment Decay
下载 Enchantment Decay
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Enchantment Decay
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
修复模组文件补丁问题
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
可定制的鞘翅模组,支持装饰纹饰、旗帜图案等更多功能!
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧