0.3.0 新增内容:装备套装!
通过数据包创建自定义装备套装奖励!为任意物品组合创建 RPG 风格的套装奖励,套装可以拥有层级、自定义格式,并且几乎可以应用于任何物品!套装奖励的提示文字会自动显示在相关的套装中,甚至还支持 EMI 以展示所有套装、其包含的物品以及奖励描述!
装备套装支持属性(包括自定义属性)和装备修饰符。目前仅能通过数据包添加属性,修饰符必须先在代码中创建,然后在装备套装中进行引用。我的“待办事项”列表中有关于基于数据包的装备修饰符的功能,敬请期待!
以下是来自 Imbued Gear 的一个装备套装示例。此图片中展示了所有激活的奖励:
这是用于创建该套装的 JSON 代码。很快我会在 wiki 上提供该格式的文档。
{
"name": "set.imbued_gear.lich_kings",
"active_formatting": [
"GREEN",
"BOLD"
],
"items": {
"tag": "imbued_gear:lich_kings_gear"
},
"bonuses": {
"2": {
"name":"lich_kings_amplifier",
"attribute": "amethyst_core:spell_amplifier",
"amount": "2.0",
"operation": "ADDITION"
},
"4": {
"name":"lich_kings_duration",
"attribute": "amethyst_core:spell_duration",
"amount": "0.15",
"operation": "MULTIPLY_TOTAL"
},
"5": "imbued_gear:horde_master"
}
}
装备修饰符
这是一个库模组,旨在促进创建装备修饰符,这些修饰符可以应用标准的 Minecraft 实体属性,或追踪各种事件,如受到伤害、击杀生物、挖掘方块等。这些修饰符不受磨刀石、附魔台或其他 Minecraft 特性的影响。这些修饰符使用 Fzzy Core 修饰符框架;因此,它们可以排列成谱系,从一个修饰符传递到下一个,而不仅仅是数值上的堆叠。
当前支持的物品与示例
Gear Core 内置了对 ArmorItem、ToolItem、BowItem、CrossBowItem、ShieldItem、TridentItem 和 Trinket 的修改支持,但提供了(借助 Fzzy Core)使任何其他类型的物品可被修改的框架。
Gearifiers 中装备修饰符的实际应用示例:
装备修饰符的修改特性
装备修饰符可以影响装备的以下方面:
属性修饰符
可以将标准的 Minecraft 属性 附加到装备修饰符上。这些属性会叠加在装备原有的任何固有属性以及其他修改之上。
耐久度修饰符
可以使用 Fzzy Core 的 PerLvlI 实例来修改装备的耐久度,这允许对耐久度进行固定数值的改变或百分比的改变(或者两者兼有!)。
命中后事件
可以向装备修饰符添加命中后事件消费者。这些消费者在 ItemStack 的 postHit 方法触发时执行,允许实现类在玩家击中某物后执行特定操作。
挖掘后事件
类似于命中后事件,也可以为 postMine 添加消费者,这在玩家成功破坏一个方块后触发。
使用事件
为物品添加激活能力!这些事件在 use 方法触发时执行,就像任何右键点击动作一样。只有当物品固有的 use 行为不成功时,这些事件才会触发。
受到的伤害修改与事件
可以将伤害修改函数附加到装备修饰符上,既可以在玩家受到伤害时触发事件代码,也可以进行伤害修改(例如减少所有魔法伤害的 10%)。
生物击杀事件
当玩家击杀生物时触发的事件,结构与所有其他事件类似,实现类向修饰符传递一个特殊的消费者供其处理。
其他修饰符
可以将其他类型的修饰符附加到装备修饰符上,并提供 ModifierProcessor 以便实现类决定如何处理它们。
修饰符随机系统
Gear Core 提供了一个修饰符随机化系统,用于向某些装备添加随机修饰符。查看 Gearifiers 以获取该系统实际应用的完整示例。简要来说,该系统的工作原理如下:
修饰符目标
Gear Core 添加了 EquipmentModifierTargets。它们的工作方式类似于 Minecraft 中的 EnchantmentTarget,但它们是一个可扩展的类而不是枚举。当修饰符随机系统选择修饰符时,它只会从正确的目标中选择修饰符。
权重
像 Minecraft 中的战利品和其他事物一样,可以为修饰符提供权重。这个权重的作用正如你所期望的那样……每个匹配目标的修饰符会根据其权重放入池中 X 次,然后使用总池来进行随机修饰符抽取。
稀有度
可以为修饰符指定稀有度。这是一个枚举,定义了修饰符在物品提示文本中的格式,不同的稀有度提供不同的颜色(部分加粗)
| 稀有度 | 格式 |
|---|---|
| 传说 | 金色,加粗 |
| 史诗 | 浅紫色 |
| 稀有 | 青色 |
| uncommon | 深绿色 |
| 普通 | 灰色 |
| 糟糕 | 暗红色 |
| 非常糟糕 | 暗红色,加粗 |
代价
每个修饰符都会对滚动池造成一定的消耗。该池初始具有一定数量的可用消耗值,每添加一个修饰符就会从池中扣除其对应的消耗,直到剩余数量不足以支持下一次成功滚动的消耗为止。默认消耗为 5,平均初始池容量约为 5.75。
提供不同的消耗值允许对选择概率进行精细调整。
滚动时的持久性与可用性
可以创建 persistent(持久化)的修饰符,以防止其在重掷时被移除。这可用于“固有”修饰符或“诅咒”修饰符。
修饰符也可以被标记为不可用于随机选择。这同样可能用于那些不属于随机几率系统、而是随物品实例自动提供的“固有”修饰符。
New as of 0.3.0, Gear Sets!
Create custom gear set bonuses via datapack! Create RPG set bonuses for any combination of items, the sets can have tiers, custom formatting, and can be applied to virtually any item! Tooltips for your set bonuses appear automatically in the relevant sets, and there is even EMI support for displaying all of the sets, their items, and the bonus descriptions!
Gear sets support Attributes, including custom attributes, and Equipment Modifiers. Currently only attributes can be added strictly via datapack, modifiers have to be created in code before being referenced in a gear set. Somewhere in my "want to do" list is datapack-based equipment mods, so stay tuned!
Here is an example Gear Set from Imbued Gear. All of the bonuses are active in this picutre:
And here is the JSON used to create it. Soon I'll have documentation of the format in wiki.
{
"name": "set.imbued_gear.lich_kings",
"active_formatting": [
"GREEN",
"BOLD"
],
"items": {
"tag": "imbued_gear:lich_kings_gear"
},
"bonuses": {
"2": {
"name":"lich_kings_amplifier",
"attribute": "amethyst_core:spell_amplifier",
"amount": "2.0",
"operation": "ADDITION"
},
"4": {
"name":"lich_kings_duration",
"attribute": "amethyst_core:spell_duration",
"amount": "0.15",
"operation": "MULTIPLY_TOTAL"
},
"5": "imbued_gear:horde_master"
}
}
Equipment Modifiers
Library mod that facilitates the creation of equipment modifiers that can apply standard Minecraft entity attributes or track a variety of events like taking damage, killing mobs, mining blocks, and more. These modifiers aren't affected by grindstones, enchanting tables, or other Minecraft features. These modifiers use the Fzzy Core modifier framework; as such they can be arranged into lineages that pass from one to the next rather than simply stacking numerically.
Current Item Support and Example
Gear Core has built-in modification support for ArmorItem, ToolItem, BowItem, CrossBowItem, ShieldItem, TridentItem, and Trinket, but provides a framework (with the help of Fzzy Core) for making any other type of item modifiable.
Example of Equipment Modifiers in action via Gearifiers:
Modification Features of an Equipment Modifier
Equipment modifiers can affect the following aspects of equipment:
Attribute Modifiers
Standard Minecraft Attributes can be attached to equipment modifiers. These attributes stack on top of whatever innate attributes the gear has and on top of other modifications.
Durability Modifier
The durability of the gear can be modified using a Fzzy Core PerLvlI instance, which allows for flat changes to durability or percentage changes (or both!).
Post Hit Events
Post-hit event consumers can be added to an Equipment Modifier. These consumers are fired on the postHit method of ItemStack, allowing implementations to perform actions after a player has hit something.
Post Mine Events
Similar to the post-hit events, consumers can also be added for postMine, which fires after a player has successfully broken a block.
On Use Events
Add activated abilities to items! These events fire on the use method, like any right click action. The events only fire if the items innate use isn't successful.
Incoming Damage Modification and Event
Damage modification functions can be attached to equipment modifiers, both allowing for event code upon a player getting damaged, and for damage modification (reduction by 10% of all magic damage, for example).
Mob Kill Events
An event that fires when a player kills a mob, similar structure to all the other events, implementations pass a special consumer to the Modifier for it to process.
Other Modifiers
Other types of modifiers can be attached to equipment modifiers, with a ModifierProcessor available so an implementation can decide what to do with them.
Modifier Rolling System
Gear Core provides a modifier randomization system for adding of random modifiers to certain gear. Check out Gearifiers for a thorough example of this system in action. The short story of how this system works:
Modifier Targets
Gear Core adds EquipmentModifierTargets. These work is a similar manner to EnchantmentTarget in Minecraft, but they are an extendable class rather than an enum. When the modifier rolling system is picking modifiers, it will only pick modifiers from the proper targets.
Weight
Like loot and other things in Minecraft, modifiers can be provided with a weight. This weight works exactly as you'd expect.. every modifier who matches up to the target is put into a pool X times based on it's weight, and the total pool is used for random modifier rolls.
Rarity
Modifiers can be given a rarity. This is an enum that defines the formatting of the modifier on the item tooltip, with the different rarities providing different colors (and some bold)
| Rarity | Format |
|---|---|
| Legendary | Gold, Bold |
| Epic | Light Purple |
| Rare | Aqua |
| Uncommon | Dark Green |
| Common | Gray |
| Bad | Dark Red |
| Really Bad | Dark Red, Bold |
Toll
Each modifier takes a certain toll on the rolling pool. The pool starts with a certain amount of toll it can spend, with each modifier added spending it's toll out of that pool until there isn't enough left for the next roll to succeed. The default toll is 5, with a default pool of about 5.75 on average.
Providing different tolls allows for fine tuning of selection probability.
Persistence and Availability for Rolling
A modifier can be created to be persistent, which prevents it from being removed on a reroll. This might be used for "innate" modifiers or for "cursed" modifiers.
Modifiers can also be marked as unavailable for random selection. This might be used, again, for "innate" modifiers that aren't part of a random chance system but are simply provided with every instance of the item.
下载 Gear Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Gear Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Gear Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Gear Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Gear Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Gear Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Gear Core
下载 Gear Core
下载 Gear Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Gear Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
- 实现新的 Fzzy Core 0.5.0 修饰符默认值系统。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
可定制的鞘翅模组,支持装饰纹饰、旗帜图案等更多功能!
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
适用于 MC 1.18+ 的 Effekseer 加载器

评论 0
登录后参与评分
还没有评论,来抢沙发吧