Hopeful: Enchanting 的目标是重构附魔系统,使其专注于选择、自定义和意图。
所有系统在设计时都充分考虑了数据包与整合包创作者的需求。
这是我的第一个“商业”模组,因此我准备好接受建设性的反馈! :)
- 如需提供反馈或报告 Bug,请访问 代码仓库 或在 Discord 上联系我:2uble_pi
- 如需查看更新日志,请访问 此页面。
- 如需访问 Wiki,请访问 此页面。
当前功能
XP 重构
- 现在每个等级需要 16 点经验值。
- 新增了 3 个游戏规则以改进经验处理机制:
xpPerLevel(或在 26.1 版本中为 hopeful:xp_per_level)定义每级所需的经验点数(默认值:16)
percentageXPLost(或在 26.1 版本中为 hopeful:percentage_xp_lost)定义死亡时永久丢失的经验百分比(不可恢复)(默认值:0)
percentageXPDropped(或在 26.1 版本中为 hopeful:percentage_xp_dropped)定义死亡时掉落在地上的经验百分比(默认值:100)
铁砧重构
- 可以使用铁锭修复铁砧(详见
#hopeful:anvil_mends)
- 铁砧现在只需一种修复材料即可完全修复物品(感谢 Forgery 提供的代码)
- 修复逻辑由数据驱动。
- 下界合金工具可以使用钻石进行 50% 的修复。
工具等级
- 每种工具都有一个工具等级,将其放入锻造台时可见。
- 当工具等级耗尽后,它将不再接受卷轴。
- 某些工具在使用时会升级,如锁子甲和弓。升级后它们可以接受更多的卷轴。
- 启用内置的数据包 Hopeful Unlimited 后,工具将获得无限的工具等级,从而使该机制变得过时。
- 名为
hopeful:sealed_enchants 的数据组件允许工具拥有不占用工具等级的附魔,且无法被移除。
卷轴
- 卷轴是应用附魔的新方式。
- 在锻造台中将工具、卷轴与青金石组合,可将附魔等级提升卷轴指定的等级。
- 卷轴可以是祝福(消耗工具等级的正面附魔)、诅咒(释放工具等级的负面附魔),以及混合效果(两者兼具)。
- 卷轴可以增加普通等级和密封等级。
- 卷轴可能需要工具等级、玩家等级(经验值)和现有附魔等级作为前置条件。
- 在野外获取附魔书和工具时——它们会被剥离并转化为卷轴。
stripAllEnchants 游戏规则决定是剥离所有附魔,还是仅剥离至有效配置状态(即使用的工具等级不大于默认工具等级),而 giveStrippedScrolls 则决定剥离出的卷轴是被给予玩家还是直接销毁。
- 使用内置的数据包
normalized_enchants,附魔将被标准化为 1 级或 3 级。
附魔台 overhaul(彻底改造)
附魔台菜单已消失。现在用纸张点击附魔台有几率将其转化为卷轴。
不过默认几率相当低,但你可以使用催化剂来提高几率!
这些方块必须放置在附魔台周围 5x5x5 的区域内,并能提供不同的效果。
目前我们有:
- 书架:增加产生卷轴的几率,但会增加经验需求。
- 青金石块:降低经验等级需求,但有蒸发(失效)的几率。
- 以下方块会增加卷轴产生的几率,但会增加经验需求:
- 岩浆块:火焰卷轴。
- 海晶石:鳍与鳃卷轴。
- 灵魂方塊 & 灵魂火方块:不死生物卷轴。
- Vault(宝箱?注:此处可能指代特定方块或结构,保留原文语境通常指代某种特殊方块,若无对应中文通用译名可保留或根据上下文调整,此处暂译为“Vault”或视具体实现而定,鉴于这是模组内容,建议保留英文或意译,但根据指令专有名词保留英文,故保留):风卷轴(有几率生成旋风人)。
- 雕刻南瓜:绑定卷轴。
- 附魔台:无尽卷轴。
- 避雷针:引导卷轴。
- 尖锥石笋:歼灭卷轴。
- 幽匿方块:回响卷轴。
开发相关
卷轴
卷轴将放置在 datapack_name/hopeful/scroll/scroll_name.json,其格式如下所示:
{
"title":{
"translate": "scroll.hopeful.acceleration"
},
"type": "blessing",
"tool_levels": 1,
"enchantments": {
"minecraft:quick_charge": 1,
"minecraft:riptide": {
"normal": 1,
"sealed": 2,
"requirement": {
"min": 1,
"max": 2
}
}
}
}
密封附魔是可选的。
卷轴还支持战利品表功能:
- 战利品表中的卷轴剥离功能会自动生效,使用
hopeful:strip_to_scrolls 战利品表修饰符
- 存在一种
random_scroll 战利品池条目类型,可在 unknown_scroll 战利品表中看到其实际效果。
卷轴应用还包含一个进度触发器,带有工具等级、卷轴和基础物品堆栈谓词。
图书管理员现在会交易卷轴,每个等级分别在标签 #hopeful:librarian_trade_1、2 和 3 中定义。
密封附魔
该组件的结构与原版附魔相同。
请注意,固有附魔不会应用附魔效果,因此,例如要召唤一把具有固有保护 II(实际生效)的金镐:
/give @s minecraft:golden_pickaxe[minecraft:enchantments={fortune:2},hopeful:sealed_enchantments={fortune:2}]
等级
工具等级统计信息可以在 datapack_name/data/hopeful/data_maps/item/tool_levels.json 中进行修改,格式如下:
{
"values": {
"minecraft:chainmail_chestplate": {
"starting_level": 5,
"level_ups": [10,50,100]
},
"minecraft:crossbow": {
"starting_level": 3,
"level_ups": [50, 100, 150]
}
}
}
请注意,这些数字是指达到上一级所需的使用次数增量。
例如,对于弩,达到 2 级后,你需要再使用 50 次才能升级到 3 级。
工具修复逻辑可以在 datapack_name/data/hopeful/data_maps/item/tool_repairs 中进行修改。
格式如下:
{
"values": {
"minecraft:iron_sword": [
{
"material": "minecraft:diamond",
"level_cost": 1,
"durability": 100,
"is_percentage": true
}
]
}
}
可以省略 materials 以使用物品的默认修复材料。请注意,数据映射(datamap)遵循从低到高的优先级规则,因此最通用的覆盖项应放在前面。
附魔台
附魔台是允许你点击进行附魔的方块。默认情况下,只有附魔台属于此类。
该数据映射位于 data/hopeful/data_maps/block/enchanters.json,其格式如下:
{
"values": {
"minecraft:enchanting_table": {
"catalyst_limit": 4,
"range": 2,
"effects": [
{
"type": "hopeful:scroll_weight",
"scrolls": "#hopeful:default",
"increase_by": 10
},
{
"type": "hopeful:scroll_weight",
"scrolls": "#hopeful:scrolls",
"increase_by": 10
},
{
"type": "hopeful:success_chance",
"increase_by": 0.25
}
]
}
}
}
附魔功能还包含一个进度触发器,其设置谓词中包含大量选项。
催化剂
这些催化剂由数据驱动,目前提供 6 种效果,未来还会增加更多。
催化剂的形式为:datapack_name/hopeful/hopeful/catalyst/unused_name.json
示例如下:(虚构的催化剂)
{
"blocks": "minecraft:bedrock",
"limit": 2,
"effects": [
{
"type": "hopeful:scroll_weight",
"scrolls": "hopeful:acceleration",
"increase_by": 2
},
{
"type": "hopeful:xp_levels_requirement",
"increase_by": 10000
},
{
"type": "hopeful:success_chance",
"increase_by": 0.5
},
{
"type": "hopeful:function",
"function": "hopeful:test",
"chance_on_success": 0.5
}
]
}
羊皮纸
羊皮纸是你用于附魔的物品。
这是一个位于 hopeful/data_maps/item/parchments 的数据映射,目前仅支持纸张。
就像附魔台和催化剂一样,它们也拥有各自的效果!
The aim of Hopeful: Enchanting is to rebuild the system of enchanting to be focused
on choice, customizability, and intent.
All systems are built with datapacks & modpack creators in mind.
This mod is my first "commercial" mod, so I'm ready for constructive feedback! :)
Current Features
XP Rework
- Now each level is 16 points.
- There are 3 new gamerules to improve XP handling:
xpPerLevel (or hopeful:xp_per_level on 26.1) defines the number of experience points per level (default: 16)
percentageXPLost (or hopeful:percentage_xp_lost on 26.1) defines the percentage of XP lost (unrecoverable) on death (default: 0)
percentageXPDropped (or hopeful:percentage_xp_dropped on 26.1) defines the percentage of XP dropped on the ground on death (default: 100)
Anvil Rework
- Anvils can be mend using iron ingot (as detailed in
#hopeful:anvil_mends)
- Anvils will fully repair an item using only one repair material (Thanks Forgery for the code)
- Repairs are data-driven.
- Netherite tools can be repaired by 50% using a diamond.
Tool Levels
- Each tool has Tool Level that can be seen when placed in a smithing table.
- When they are all used up, it will no longer accept scrolls.
- Some tools can level up when being used like chainmail and bows. Leveling up will allow them to accept more scrolls.
- With Hopeful Unlimited, a built-in datapack you can enable, tools will get infinite tool level, so this mechanic becomes obsolete.
- A data component called
hopeful:sealed_enchants allows for tools to have enchantments that don't take up tool levels, and can't be removed.
Scrolls
- Scrolls are the new way to apply enchantments.
- Combine a tool with a scroll and lapis lazuli in a smithing table to upgrade an enchantment's level by the level specified on the scroll.
- Scrolls can be blessings (positive enchantments that use up Tool Levels), curses (negative enchantments that free up
Tool Levels), and deals (both).
- Scrolls can add normal levels & sealed levels.
- Scrolls can require tool levels, player levels (xp) and existing enchantment levels.
- When getting enchanted books and tools in the wild - They will be stripped to their scrolls.
stripAllEnchants gamerule would decide if all the enchants will be stripped, or only until valid configuration
(where used tool level is not bigger than default tool level), and giveStrippedScrolls whether stripped scrolls will be given or voided.
- Using the built-in
normalized_enchants datapack, enchantments would normalized to be 1 or 3 levels.
Enchanting Table Overhaul
The enchanting table menu is gone Now, clicking on it with a piece of paper has a chance of transforming into a
scroll.
Default chance is quite low though, but you can increase it with catalysts!
These are blocks that have to be in a 5x5x5 area around the table, and can give different effects.
Currently, we have:
- Bookshelves: increase chance of producing a scroll, but increase xp requirement.
- Lapis Block: decreases xp level requirement, but has a chance of evaporating.
- The following increase chance of a scroll, but increase xp requirement:
- Magma: flame scroll.
- Prismarine: fins and gills scrolls
- Soul blocks & soul fire blocks: undead scroll
- Vault: wind scroll (has a chance of spawning a breeze)
- Carved pumpkins: binding scroll
- Enchanting Table: Endless scroll
- Lightning Rod: channeling scroll
- Pointed Dripstone: extermination scroll.
- Sculk blocks: echoes scroll.
Dev Stuff
Scroll
Scrolls will be placed in datapack_name/hopeful/scroll/scroll_name.json and its format will look like this:
{
"title":{
"translate": "scroll.hopeful.acceleration"
},
"type": "blessing",
"tool_levels": 1,
"enchantments": {
"minecraft:quick_charge": 1,
"minecraft:riptide": {
"normal": 1,
"sealed": 2,
"requirement": {
"min": 1,
"max": 2
}
}
}
}
Sealed Enchantments are optional.
Scrolls also have loot table functionality:
- Scrolls stripping works automatically in loot tables using
hopeful:strip_to_scrolls loot table modifier
- There's a
random_scroll loot pool entry type, which can be seen in action in unknown_scroll loot table.
Scroll applying also has an advancement trigger, with tool level, scroll, and base itemstack predicates.
Librarians trade scrolls now, with each level defined in tags #hopeful:librarian_trade_1, 2, and 3.
Sealed Enchantments
The component has the same structure as vanilla enchantments.
Do note that innate enchantments don't apply the enchantments, so for example, to summon a gold pick with innate fortune 2 (that actually works):
/give @s minecraft:golden_pickaxe[minecraft:enchantments={fortune:2},hopeful:sealed_enchantments={fortune:2}]
Levels
Tool Level stats can be modified in datapack_name/data/hopeful/data_maps/item/tool_levels.json in
this format:
{
"values": {
"minecraft:chainmail_chestplate": {
"starting_level": 5,
"level_ups": [10,50,100]
},
"minecraft:crossbow": {
"starting_level": 3,
"level_ups": [50, 100, 150]
}
}
}
Note that the numbers are the uses above previous that it takes to level up.
For example, for the crossbow, after reaching level 2, you'd need 50 more uses to get to level 3.
Repairing tools can be modified in datapack_name/data/hopeful/data_maps/item/tool_repairs.
This is the format:
{
"values": {
"minecraft:iron_sword": [
{
"material": "minecraft:diamond",
"level_cost": 1,
"durability": 100,
"is_percentage": true
}
]
}
}
materials can be omitted to use default repair material for the item. Note that data maps are lowest-to-highest priority,
so the most general overrides should appear first
Enchanters
Enchanters are the blocks you are allowed to click on to enchant with. By default, only the enchanting table is one.
The datamap is located at data/hopeful/data_maps/block/enchanters.json and it follows this format:
{
"values": {
"minecraft:enchanting_table": {
"catalyst_limit": 4,
"range": 2,
"effects": [
{
"type": "hopeful:scroll_weight",
"scrolls": "#hopeful:default",
"increase_by": 10
},
{
"type": "hopeful:scroll_weight",
"scrolls": "#hopeful:scrolls",
"increase_by": 10
},
{
"type": "hopeful:success_chance",
"increase_by": 0.25
}
]
}
}
}
Enchanting also has an advancement trigger, with a setup predicate that contains lots of options.
Catalysts
These catalysts are data-driven, and we have 6 effects, with plenty more to come.
The catalysts are of the form: datapack_name/hopeful/hopeful/catalyst/unused_name.json
And look like so: (made up catalyst)
{
"blocks": "minecraft:bedrock",
"limit": 2,
"effects": [
{
"type": "hopeful:scroll_weight",
"scrolls": "hopeful:acceleration",
"increase_by": 2
},
{
"type": "hopeful:xp_levels_requirement",
"increase_by": 10000
},
{
"type": "hopeful:success_chance",
"increase_by": 0.5
},
{
"type": "hopeful:function",
"function": "hopeful:test",
"chance_on_success": 0.5
}
]
}
Parchments
Parchments are the items u can use to enchant.
This is a datamap in hopeful/data_maps/item/parchments and currently only host paper.
Just like enchanters and catalysts, they also have their own effects!
评论 0
登录后参与评分
还没有评论,来抢沙发吧