此模组需要 Project MMO 和 Iron's Spells and Spellbooks(适用于 1.20.1)
简介
这是一款兼容性模组,允许你通过数据包为法术添加技能需求。如果玩家未满足这些需求,则无法施放该法术。它还支持按法术等级分别指定需求。你可以配置这些需求仅在从卷轴、法杖或剑施放时生效。此外,你还可以设置使这些需求阻止玩家将法术刻录到其法典中。
另外,还有一个配置选项,允许玩家在法术治愈其他玩家时获得经验值。这使得治疗者/牧师原型能够在支援其他玩家的同时提升相关技能等级。
指南
最简单的方法是进入相关世界并运行以下命令:
/pmmo_irons_compat genSpellData
我知道,一个命令里同时使用蛇形命名法和驼峰命名法,确实挺挑衅的。这将生成一个数据包,为 Iron's Spells and Spellbooks 中当前启用的所有法术设置默认值。你可以修改这个数据包,然后删除你未配置的法术对应的 JSON 文件。你可以随时运行此命令以重新填充法术列表,且不会影响你已有的 JSON 文件。
运行命令并生成了数据包后,我修改了 fireball.json 文件,使其内容如下:
{
"requirements": {
"1": {},
"2": { "magic": 5}
},
"default_requirements": {
"magic": 10,
"charisma": 2
},
"sources": [
"scroll",
"spellbook",
"sword",
"inscribe"
],
"replace": true
}
"default_requirements
“requirements”(需求)部分允许你为特定法术等级设置施放条件。在此 JSON 配置中,1 级火球术现在无需任何条件即可施放。这将覆盖该特定法术等级的 “default_requirements”(默认需求)。2 级火球术被配置为需要 5 点魔法值才能施放。其余所有等级的火球术则需要 10 点魔法值和 2 点魅力值才能施放。
“sources”(来源)部分允许你指定在何种情况下应用这些需求,以及在哪些情况下不应用。目前,这将限制从卷轴、法杖和剑中施放火球术。除非满足需求,否则也不允许将火球术刻录到法杖中。例如,如果你希望某些法术可以从卷轴施放,你可以从 “sources” 列表中移除 “scroll”,这样它就不再受限制。
“replace”(替换)字段用于解决数据包冲突。如果有多个数据包对同一法术(如火球术)应用了需求,那么设置了 "replace": true 的数据包将覆盖那些设置为 false 的配置。如果有多个数据包的 "replace": true 均设为 true,则会使用最后加载的那个数据包的配置。
上述字段并非全部必需;如果你只想为某个法术的特定等级添加需求,则完全不需要包含 “default_requirements”。如果你希望所有法术拥有相同的需求,请移除 “requirements” 并仅使用 “default_requirements”。如果省略 “sources”,则需求将不对任何来源生效。在这种情况下,你可以直接删除该 JSON 文件。
常见问题解答 (FAQ)
我不会为此模组进行低版本移植,也不会将其移植到 Fabric。我只是没有时间,并且今后只会在 1.20.1 及以上版本游玩。当然,欢迎其他人进行移植!
你可以在任何整合包中使用此模组,但不得以任何方式对其进行商业化,也不得发布到其他 Minecraft 资源站。
衷心感谢 Caltinor / Project MMO 团队持续提供的帮助以及对项目源代码的访问权限。同时也感谢 Iron's Spells and Spellbooks 团队允许我合并几个 PR 以发出事件,从而无需使用任何 mixins 即可实现此功能。
This mod requires Project MMO and Iron's Spells and Spellbooks for 1.20.1
About
This compatability mod allows you to add skill requirements to spells using datapacks. If a player doesn't meet the requirements then they can't cast the spell. It allows you to specify requirements on a per spell level basis as well. These requirements can be configured to only apply when casting from scrolls, spellbooks, and/or swords. You can also make it so these requirements prevent players from inscribing the spell into their spellbook entirely.
Additionally there is a config that allows you to award xp to a player when their spell heals another player. This enables healers/priest archetypes to actually be able to level a skill while supporting other players.
Guide
The easiest way to start is to load into the world in question and run the command:
/pmmo_irons_compat genSpellData
I know, snake case and camel case in one command, provocative. This will generate a datapack with defaults for every spell that is currently enabled in Iron's Spells and Spellbooks. You can modify this datapack and then delete the JSON files for spells that you did not configure. You can run this command at any time to repopulate the list of spells and it won't affect the JSON files you already have in there.
After running the command and generating the datapack I modified the fireball.json file to look like this:
{
"requirements": {
"1": {},
"2": { "magic": 5}
},
"default_requirements": {
"magic": 10,
"charisma": 2
},
"sources": [
"scroll",
"spellbook",
"sword",
"inscribe"
],
"replace": true
}
The "default_requirements" key will add a requirement to all fireball spell levels. In this case all fireball spell levels will require a magic of level 10 and a charisma of level 2 to cast.
The "requirements" section allows you to set requirements for specific spell levels. In this json the level 1 fireball spell now has no requirement to cast. This will override "default_requirements" for that specific spell level. The level 2 fireball spell has been configured to require level 5 magic to cast. Every other level of fireball would require 10 magic and 2 charisma to cast.
The "sources" section allows you to specify when to apply these requirements and when not to. Right now this would restrict casting fireball spells from scrolls, spellbooks, and swords. It would also not allow you to inscribe the fireball spell into a spellbook unless you meet the requirements. If you would like any spell to be castable from a scroll for example, you could remove "scroll" from the "sources" list and it would no longer be restricted.
The "replace" is there to solve datapack disputes. If there are multiple datapacks with requirements applied to a spell, say fireball, then the datapack with "replace": true will overwrite any that have it set to false. If there are multiple datapacks with "replace": true then it will use whichever was the last loaded datapack.
None of these are required; if you only want to add a requirement to a specific level of a spell then don't include "default_requirements" at all. If you want every spell to have the same requirement, remove "requirements" and only use "default_requirements". If you leave off "sources" then the requirements wouldn't apply to anything. You could just delete the JSON at that point.
FAQ
I will not backport this or port it to fabric. I just don't have the time and I will only be playing on 1.20.1+ going forward. You are welcome to do so though!
You can use this mod in any modpacks, but you cannot monetize it in any way or post it to another minecraft site.
Huge thanks to Caltinor / Project MMO team for their constant help and access to the project source code. Also thanks to the Iron's Spells and Spellbooks team for allowing me to merge a few PR's to emit events so I didn't have to use any mixins to make this work.
下载 Project MMO: Iron's Spellbooks Compat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Project MMO: Iron's Spellbooks Compat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Project MMO: Iron's Spellbooks Compat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Project MMO: Iron's Spellbooks Compat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Project MMO: Iron's Spellbooks Compat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Project MMO: Iron's Spellbooks Compat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Project MMO: Iron's Spellbooks Compat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Project MMO: Iron's Spellbooks Compat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Project MMO: Iron's Spellbooks Compat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Project MMO: Iron's Spellbooks Compat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
1.0.4
- 修复编解码器合并控制台日志。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
所有本应存在的事物
模组
为 Minecraft 添加了小幽灵 :D
模组
一款功能齐全的 Minecraft 模组,关于驾驭色彩的力量
模组
沼泽村落与音乐蛙群!
模组
一个专注于小调整和品质生活添加的 Ars Nouveau 模组扩展。
模组
一种追求终极力量的奥术技艺
评论 0
登录后参与评分
还没有评论,来抢沙发吧