CompatLink
为任意模组武器添加 Epic Fight 动作组 —— 无需编码,只需 JSON。
Epic Fight 开箱即用仅支持原版武器。CompatLink 允许你通过将一个小 JSON 文件放入配置文件夹,将任何模组武器连接到 Epic Fight 动作组。巨剑像大剑一样挥舞,武士刀像日本刀一样拔刀,长矛像长矛一样突刺 —— 适用于任何模组,几分钟即可完成。
适用于 Forge 1.20.1(Epic Fight 20.14.17+)和 NeoForge 1.21.1(Epic Fight 21.13+)
任何物品,任何 Epic Fight 动作组 —— 包括来自其他 Epic Fight 附加模组的武器类型,而不仅仅是内置的那些
挥动轨迹、战斗属性调整以及(实验性)生物动作组 —— 全部来自同一个 JSON
100% 数据驱动:无需代码,基本使用不需要数据包知识
设计安全:损坏的映射文件会被跳过并记录日志消息 —— 绝不会崩溃
未安装 Epic Fight 时也能正常加载(映射只是等待其存在)
面向玩家与整合包制作者:30 秒设置
安装 CompatLink(加上 Epic Fight)。
打开 config/compatlink/mappings/ —— CompatLink 会在首次运行时创建一个包含示例的文件夹。
创建 mymappings.json:
{
"format": 1,
"backend": "epicfight",
"weapons": [
{ "target": "simplyswords:iron_claymore", "preset": "epicfight:greatsword" },
{ "target": "cataclysm:the_incinerator", "preset": "epicfight:greatsword" },
{ "target": "somemod:*_katana", "preset": "epicfight:uchigatana" }
]
}
启动游戏(或运行 /reload)。完成 —— 日志会打印 CompatLink: N entity mappings, M weapon mappings applied.。
通配符(somemod:*)和优先级(较高者胜出;精确 ID 在平局时优于通配符)让你可以在一行中映射整个模组,并在之后覆盖单个物品。
可用的武器预设包括 epicfight:sword、epicfight:greatsword、epicfight:longsword、epicfight:uchigatana、epicfight:tachi、epicfight:spear、epicfight:dagger、epicfight:axe、epicfight:bow 以及由 Epic Fight 数据包添加的任何武器类型。
使用来自其他 Epic Fight 附加模组的动作组
预设仅仅是 Epic Fight 的武器类型 ID,因此你不仅限于内置的那些 —— 你可以借用由其他 Epic Fight 附加模组注册的動作组。任何物品都可以采用任何动作组:
{
"format": 1,
"backend": "epicfight",
"weapons": [
{ "target": "minecraft:golden_apple", "preset": "wom:ender_blaster" }
]
}
这里一个普通的金苹果采用了另一个附加模组中 wom:ender_blaster 武器类型的完整攻击动画。无论你的整合包中注册了哪些武器类型 —— 无论是 Epic Fight 自带的还是其他模组添加的 —— 都是有效的预设。
使用 params 调整武器属性
每个武器映射还可以调整 Epic Fight 的战斗属性 —— 含义与 Epic Fight 自己的数据包 attributes.common 相同,无需数据包:
{
"target": "simplyswords:iron_claymore",
"preset": "epicfight:greatsword",
"params": { "impact": 8.0, "max_strikes": 6, "damage_bonus": 2.0 }
}
impact — 僵直/击退强度(小数)
armor_negation — 忽略的护甲百分比(小数)
damage_bonus — 战斗模式下的额外伤害(小数)
speed_bonus — 攻击速度加成(小数)
max_strikes — 每次挥击可击中的最大目标数(整数)
未知的键或格式错误的数字会在日志中发出警告并被忽略 —— 武器仍然获得其动作组。
武器轨迹
映射的武器会自动继承其武器类型的 Epic Fight 挥动轨迹 —— 无需额外设置。想要自定义?在映射中添加一个 trail 对象(Epic Fight item_skins schema):
{
"target": "simplyswords:runic_katana",
"preset": "epicfight:uchigatana",
"trail": {
"color": [120, 40, 255],
"begin_pos": [0.0, 0.0, -0.2], "end_pos": [0.0, -0.22, -1.25],
"lifetime": 4, "interpolations": 6,
"texture_path": "epicfight:textures/particle/swing_trail.png",
"particle_type": "epicfight:swing_trail"
}
}
小物品上的轨迹太大?使用 "trail": "none"(或 false)关闭该武器的轨迹。要完全禁用自动轨迹 —— 以便只有具有显式 trail 对象的武器才拥有轨迹 —— 在 config/compatlink/settings.json 中设置 "auto_trails": false。
来自配置映射的轨迹从游戏开始即可见;通配符/数据包映射的轨迹在资源重载后生效(F3+T)。由 Epic Fight 本身或其他模组定义的轨迹始终优先于 CompatLink 生成的轨迹。
面向整合包/模组作者:作为数据包分发映射
在任何数据包或模组 jar 中的 data/<your_namespace>/compatlink/mappings/*.json 放置映射文件。它们参与 /reload 并与配置文件夹中的映射根据相同的优先级规则合并。现成的整合包:CompatLink: Simply Swords(所有 122 把武器已映射)—— 请参阅项目页面侧边栏。
实体映射(实验性)
你还可以使用 entities 数组赋予生物 Epic Fight 战斗 AI/动画。这是一个面向高级整合包作者的实验性功能:
{
"format": 1,
"backend": "epicfight",
"entities": [
{ "target": "illagerinvasion:basher", "preset": "minecraft:vindicator" },
{ "target": "illagerinvasion:necromancer", "preset": "minecraft:evoker" }
]
}
预设必须与目标的模型家族和纹理布局共享(一个类灾民形状的生物需要像 minecraft:evoker/minecraft:vindicator 这样的灾民预设,一个僵尸形状的生物需要 epicfight:zombie 等)。设计上不支持自定义模型生物(GeckoLib Bosses)。
内置安全措施:在连接任何东西之前,CompatLink 会比较目标的纹理大小与预设的纹理大小。如果不匹配,映射将被拒绝并显示清晰的日志消息(例如 texture size mismatch 64x128 vs 64x64 — mapping skipped),生物保持 100% 原版状态 —— 没有损坏的模型,没有崩溃。
验证严格:如果映射的任何部分无法安全连接,CompatLink 不会为其注册任何内容,并记录原因。
常见问题解答
服务器需要它吗?客户端呢?
专用服务器上两者都需要 —— 在客户端和服务端都安装 CompatLink(以及相同的映射文件)。在单人游戏中,安装一次就足够了。
如果缺少 Epic Fight 会发生什么?
不会导致崩溃。CompatLink 会正常加载,解析你的文件,并在日志中报告“后端 'epicfight' 不可用”。
映射文件中存在拼写错误——我的游戏会崩溃吗?
不会。该文件会被跳过并记录原因;其他部分照常生效。
我应该下载哪个加载器/版本?
Forge 1.20.1 (Java 17) 请使用 compatlink-1.1.2.jar,NeoForge 1.21.1 (Java 21) 请使用 compatlink-neoforge-1.1.2.jar。两者功能相同,JSON 格式也一致。
可以支持其他战斗模组吗?
核心 API 是一个与加载器无关、采用 MIT 许可证授权的后端 SPI(服务提供者接口)。Epic Fight 是首个后端实现。
武器参数有什么用?
有用——impact(冲击力)、armor_negation(护甲穿透)、damage_bonus(伤害加成)、speed_bonus(速度加成)和 max_strikes(最大连击数)的应用方式与 Epic Fight 数据包属性完全一致。参见上方的“调整武器属性”部分。
CompatLink
Give ANY modded weapon Epic Fight movesets — no coding, just JSON.
Epic Fight only knows vanilla weapons out of the box. CompatLink lets you connect any modded weapon to an Epic Fight moveset by dropping a small JSON file in your config folder. Claymores swing like greatswords, katanas draw like uchigatana, spears thrust like spears — for any mod, in minutes.
Available for Forge 1.20.1 (Epic Fight 20.14.17+) and NeoForge 1.21.1 (Epic Fight 21.13+)
Any item, any Epic Fight moveset — including weapon types from other Epic Fight addon mods, not just the built-in ones
Swing trails, combat-stat tuning, and (experimental) mob movesets — all from the same JSON
100% data-driven: no code, no datapack knowledge required for basic use
Safe by design: broken mapping files are skipped with a log message — never a crash
Loads fine without Epic Fight installed (mappings just wait until it's there)
For players & modpack makers: 30-second setup
Install CompatLink (plus Epic Fight).
Open config/compatlink/mappings/ — CompatLink creates it with an example on first run.
Create mymappings.json:
{
"format": 1,
"backend": "epicfight",
"weapons": [
{ "target": "simplyswords:iron_claymore", "preset": "epicfight:greatsword" },
{ "target": "cataclysm:the_incinerator", "preset": "epicfight:greatsword" },
{ "target": "somemod:*_katana", "preset": "epicfight:uchigatana" }
]
}
Start the game (or run /reload). Done — the log prints CompatLink: N entity mappings, M weapon mappings applied.
Wildcards (somemod:*) and priorities (higher wins; exact id beats wildcard on ties) let you map whole mods in one line and override single items afterwards.
Available weapon presets include epicfight:sword, epicfight:greatsword, epicfight:longsword, epicfight:uchigatana, epicfight:tachi, epicfight:spear, epicfight:dagger, epicfight:axe, epicfight:bow and any weapon type added by Epic Fight datapacks.
Use movesets from other Epic Fight addons
A preset is just an Epic Fight weapon-type id, so you're not limited to the built-in ones — you can borrow movesets registered by other Epic Fight addon mods. Any item can take any moveset:
{
"format": 1,
"backend": "epicfight",
"weapons": [
{ "target": "minecraft:golden_apple", "preset": "wom:ender_blaster" }
]
}
Here a plain golden apple picks up the full attack animations of the wom:ender_blaster weapon type from another addon. Whatever weapon types are registered in your modpack — Epic Fight's own or ones added by other mods — are all valid presets.
Tune weapon stats with
params
Each weapon mapping can also tune Epic Fight combat attributes — same meaning as Epic Fight's own datapack attributes.common, no datapack needed:
{
"target": "simplyswords:iron_claymore",
"preset": "epicfight:greatsword",
"params": { "impact": 8.0, "max_strikes": 6, "damage_bonus": 2.0 }
}
impact — stagger/knockback strength (decimal)
armor_negation — % of armor ignored (decimal)
damage_bonus — extra damage in battle mode (decimal)
speed_bonus — attack speed bonus (decimal)
max_strikes — max targets hit per swing (integer)
Unknown keys or malformed numbers are warned about in the log and ignored — the weapon still gets its moveset.
Weapon trails
Mapped weapons automatically inherit their weapon type's Epic Fight swing trail — no extra setup. Want a custom one? Add a trail object to the mapping (Epic Fight item_skins schema):
{
"target": "simplyswords:runic_katana",
"preset": "epicfight:uchigatana",
"trail": {
"color": [120, 40, 255],
"begin_pos": [0.0, 0.0, -0.2], "end_pos": [0.0, -0.22, -1.25],
"lifetime": 4, "interpolations": 6,
"texture_path": "epicfight:textures/particle/swing_trail.png",
"particle_type": "epicfight:swing_trail"
}
}
Trail too big on a small item? Turn it off for that one weapon with "trail": "none" (or false). To disable automatic trails entirely — so only weapons with an explicit trail object get one — set "auto_trails": false in config/compatlink/settings.json.
Trails from config mappings show from game start; wildcard/datapack mapping trails apply after a resource reload (F3+T). Trails defined by Epic Fight itself or other mods always take priority over CompatLink's generated ones.
For pack/mod authors: ship mappings as a datapack
Put mapping files at data/<your_namespace>/compatlink/mappings/*.json in any datapack or mod jar. They participate in /reload and merge with config-folder mappings under the same priority rules. Ready-made packs: CompatLink: Simply Swords (all 122 weapons mapped) — see the project page sidebar.
Entity mapping (EXPERIMENTAL)
You can also give mobs Epic Fight combat AI/animations with an entities array. This is an experimental feature for advanced pack authors:
{
"format": 1,
"backend": "epicfight",
"entities": [
{ "target": "illagerinvasion:basher", "preset": "minecraft:vindicator" },
{ "target": "illagerinvasion:necromancer", "preset": "minecraft:evoker" }
]
}
The preset must share the target's model family and texture layout (an illager-shaped mob needs an illager preset like minecraft:evoker/minecraft:vindicator, a zombie-shaped mob needs epicfight:zombie, etc.). Custom-model mobs (GeckoLib bosses) are not supported by design.
Built-in safeguard: before wiring anything, CompatLink compares the target's texture size with the preset's. On mismatch the mapping is rejected with a clear log message (e.g. texture size mismatch 64x128 vs 64x64 — mapping skipped) and the mob stays 100% vanilla — no broken models, no crashes.
Validation is strict: if anything about a mapping can't be wired safely, CompatLink registers nothing for it and logs the reason.
FAQ
Does the server need it? The client?
Both, on dedicated servers — install CompatLink (and the same mapping files) on client and server. In singleplayer one install is enough.
What happens if Epic Fight is missing?
Nothing breaks. CompatLink loads, parses your files, and reports "backend 'epicfight' unavailable" in the log.
A mapping file has a typo — will my game crash?
No. That one file is skipped and the reason is logged; everything else applies.
Which loader/version do I download?
compatlink-1.1.2.jar for Forge 1.20.1 (Java 17), compatlink-neoforge-1.1.2.jar for NeoForge 1.21.1 (Java 21). Same features, same JSON format on both.
Can other combat mods be supported?
The core API is a loader-agnostic, MIT-licensed backend SPI. Epic Fight is the first backend.
Do weapon params do anything?
Yes — impact, armor_negation, damage_bonus, speed_bonus and max_strikes are applied exactly like Epic Fight datapack attributes. See "Tune weapon stats" above.
评论 0
登录后参与评分
还没有评论,来抢沙发吧