
两个模组,一套火系法术强度。 法术强度(Spell Power)以点数计算火系伤害,而 Iron's Spells 则以百分比计算,且来自不同模组的装备只会提升其各自对应的数值。Attributification 将一个模组的属性映射到另一个模组的对应属性上:物品加成会按正确的比例转移到目标属性,而被替换的源属性则会显示转换后的值,从而确保读取该属性的工具提示和公式仍能正常工作。
在 Fabric 加载器下,还需安装 Fabric API。
在服务端和每个客户端上都安装它(在单人游戏中,你的游戏既是服务端也是客户端)。没有安装该模组的玩家仍然可以加入服务器,但他们看到的工具提示和背包中的数值未经转换,且无法打开编辑器。

- 映射关系由数据包文件定义, 因此你可以将其随整合包一起分发,针对不同世界进行更改,并通过
/reload命令应用。 - 加成按比例转移。 法术强度的 +6 火系伤害会变成 +30% 火系法术强度;固定加成也可以转换为百分比。
- 另一模组的工具提示和公式继续正常工作。
- 对生物同样有效: 拥有源属性但不具备目标属性的实体将获得目标属性(在所有模式除
onlyVisualChange外),使其加成仍能被转换;目标属性会被保存到实体中。 - 回退机制: 可列出多个目标,使用第一个已安装的模组提供的属性。
- 通配符支持:
spell_power:*会映射某模组的所有属性,exclude可排除某些特定属性。 - 无双重加成: 在
fullReplacement模式下,源属性保持其基础值不变,因此只有目标属性的模组会使用加成。 - 客户端数值一致: 服务端会在玩家加入及每次重载后向其发送映射配置。
- 游戏内编辑器: 供操作员(权限等级 2)使用:
/attributification gui。保存的更改立即生效。 - 预置映射配置: 适用于 Spell Power、Iron's Spells、Apothic Attributes、Obscure API、Turtleboi's Core Library、GTBC 的 SpellLib 和 Geomancy Plus、Ars Nouveau、Eidolon、Goety、Lodestone、Wizard's Reborn、Ranged Weapon API、More RPG Classes、Iter RPG 以及 T.O Magic 'n Extras。如果你没有安装某个模组,针对它的映射配置将不会执行任何操作。

将其安装在与存在属性重叠的模组旁边。内置映射配置无需设置:带有法术强度火系加成的戒指现在会提升 Iron's Spells 的火系法术强度。
要添加映射配置,请打开 /attributification gui 并在其中创建文件(它保存在世界中,位于 <world>/datapacks/attributification_gui/),或者将文件放入任意数据包的 data/<namespace>/attributification/mappings/ 目录下并运行 /reload。例如,data/mypack/attributification/mappings/earth.json:
{
"mappings": [
{
"source": "spell_power:earth",
"targets": ["gtbcs_geomancy_plus:geo_spell_power", "irons_spellbooks:nature_spell_power"],
"equivalence": 3.0,
"conversionEquivalence": 20.0,
"operationConversion": "ADDITION_TO_MULTIPLY_BASE"
}
]
}
具有 +6 法术强度土系加成的靴子现在提供 +30% 地系法术强度(6 / 20 = 0.3,作为基础值的份额添加),或者在地系法术强度模组未安装时提供自然法术强度。法术强度的土系属性显示为地系法术强度 × 3。

| 字段 | 省略时的默认值 | 作用 |
|---|---|---|
source / sources |
- | 要替换的属性,单个 ID 或列表;* 匹配 ID 的任何部分 |
target / targets |
- | 加成转移的目标位置,单个 ID 或列表:使用第一个已安装的模组;此处的 * 会填充源属性 * 所匹配的内容(例如从 spell_power:* 到 mymod:*_power) |
exclude |
无 | 通配符源属性跳过的 ID(允许使用 *) |
mode |
bidirectional |
bidirectional:加成转移到目标,源属性读数为 目标值 × equivalence;unidirectional:加成转移到目标,源属性读数为 目标值,无缩放;onlyVisualChange:仅工具提示中的名称发生变化,加成保留在源属性上;fullReplacement:加成转移到目标,源属性保持其基础值 |
equivalence |
1 | 源属性读数为 目标值 × 此系数;不允许为 0 |
conversionEquivalence |
0(使用 equivalence) |
到达源属性的加成(来自物品、效果或其他模组)在向目标转移时会除以该值 |
subtractValue |
0 | 在应用 equivalence 之前从目标值中减去,用于处理基础值不同的属性 |
operationConversion |
DEFAULT |
DEFAULT 保持加成原样;ADDITION_TO_MULTIPLY_BASE 或 ADDITION_TO_MULTIPLY_TOTAL 将固定加成转换为基于基础值或总值的百分比 |
comment |
无 | 给人看的注释;模组会忽略它 |
内置映射配置位于模组内的 data/attributification/attributification/mappings/defaults.json:一个路径相同的文件的数据包可以覆盖它们,其中的 {"mappings": []} 可禁用这些内置映射。
编辑器(/attributification gui,仅限操作员)列出所有映射文件。世界数据包中的文件可以编辑和删除(子文件夹中的文件除外);来自其他数据包和模组本身的文件为只读。覆盖操作会将可编辑的副本保存到世界中;该副本将替换原始文件。保存立即生效;如果编辑器提示运行 /reload,请执行此命令。大于 1 MB 的文件无法在编辑器中打开。保存可能在几百 KB 时就失败:此时编辑器会提示文件过大。请将此类文件拆分或手动编辑。模组本身最多支持加载 8 MB 的文件。
**如果某个映射未生效,**请查看服务器日志。每处错误都会报告对应的文件和映射内容:例如属性 ID 拼写错误、未知字段或模式、equivalence 为 0、除以零等。此类映射将被跳过。一行摘要信息会显示有多少映射处于激活状态,以及有多少映射因依赖未安装的模组而等待加载。如果命令 /attributification gui 不被识别,说明你并非操作员(权限等级 2)。如果该命令未能打开编辑器,请在你的客户端安装与服务器相同版本的模组。
日志级别(默认为 NONE、ERRORS、WARNINGS,可选 ALL)位于 Fabric 的 config/attributification.json 中的 debug.logLevel,Forge 和 NeoForge(最高至 26.2 版本)的 config/attributification-common.toml,以及 NeoForge 26.3 的 config/attributification-local.toml。数据包可以通过在 data/<namespace>/attributification/config.json 中设置 {"logLevel": "ALL"} 来更改此级别。
从 2.0 版本升级? Fzzy Config 已不再需要。打开 /attributification gui:它会查找旧配置文件(config/attributification/attributification.toml)中的映射,并在你点击“转换旧配置”时将其转换为世界的数据包。随后,旧文件会被添加 .converted 后缀(变为 attributification.toml.converted),以便其他世界不会看到它。若要在其他世界获得相同的映射,请将已转换世界中的 datapacks/attributification_gui 复制到其他世界的文件夹中。对于值为 0 的 2.0 版 equivalence 映射,若修改安全则就地修复;否则将跳过并附带警告。
相同理念,用于效果: Effectification。

想要和朋友一起拥有自己的服务器吗?通过我的链接使用 BisectHosting,首单可享 25% 折扣,我将获得少量佣金。


MIT 许可证:可免费使用、修改、分享并包含在整合包中,前提是保留版权声明。详见 LICENSE。
本作品非官方 Minecraft 产品。未经 Mojang 或 Microsoft 批准或认可。


Two mods, one Fire Spell Power. Spell Power counts fire power in points, Iron's Spells in percent, and gear from each mod raises only its own number. Attributification maps an attribute of one mod onto the matching attribute of another: item bonuses move to the target attribute at the right scale, and the source attribute (the one being replaced) reports the converted value, so tooltips and formulas that read it keep working.
On Fabric, also install Fabric API.
Install it on the server and on every client (in single player, your game is both). A player without the mod can still join a server, but sees unconverted numbers in tooltips and the inventory and cannot open the editor.

- Mappings are data-pack files, so you can ship them with a modpack, change them per world and apply them with
/reload. - Bonuses move at the right scale. Spell Power's +6 Fire becomes +30% Fire Spell Power; a flat bonus can turn into a percentage.
- Tooltips and formulas of the other mod keep working.
- Works on mobs too: an entity that has the source attribute but not the target gets the target (in every mode but
onlyVisualChange), so its bonuses still convert; the target is saved with the entity. - Fallbacks: list several targets, and the first one that is installed is used.
- Wildcards:
spell_power:*maps every attribute of a mod,excludeleaves some out. - No double bonuses: in
fullReplacementmode the source attribute stays at its base value, so only the target's mod uses the bonus. - Same numbers on the client: the server sends its mappings to every player on join and after each reload.
- An editor in the game for operators (permission level 2):
/attributification gui. Saved changes apply at once. - Ready-made mappings for Spell Power, Iron's Spells, Apothic Attributes, Obscure API, Turtleboi's Core Library, GTBC's SpellLib and Geomancy Plus, Ars Nouveau, Eidolon, Goety, Lodestone, Wizard's Reborn, Ranged Weapon API, More RPG Classes, Iter RPG and T.O Magic 'n Extras. A mapping for a mod you don't have does nothing.

Install it next to the mods whose attributes overlap. The built-in mappings need no setup: a ring with Spell Power's Fire now raises Iron's Spells' Fire Spell Power.
To add a mapping, open /attributification gui and create a file there (it is saved in the world, in <world>/datapacks/attributification_gui/), or put a file into any data pack under data/<namespace>/attributification/mappings/ and run /reload. For example, data/mypack/attributification/mappings/earth.json:
{
"mappings": [
{
"source": "spell_power:earth",
"targets": ["gtbcs_geomancy_plus:geo_spell_power", "irons_spellbooks:nature_spell_power"],
"equivalence": 3.0,
"conversionEquivalence": 20.0,
"operationConversion": "ADDITION_TO_MULTIPLY_BASE"
}
]
}
Boots with +6 Spell Power Earth now give +30% Geo Spell Power (6 / 20 = 0.3, added as a share of the base value), or Nature Spell Power when Geomancy Plus is not installed. Spell Power's Earth reads as Geo Spell Power × 3.

| Field | If left out | What it does |
|---|---|---|
source / sources |
- | the attribute to replace, one ID or a list; * matches any part of the ID |
target / targets |
- | where the bonuses go, one ID or a list: the first installed one is used; a * here is filled with what the source's * matched (spell_power:* to mymod:*_power) |
exclude |
none | IDs (* allowed) that a wildcard source skips |
mode |
bidirectional |
bidirectional: bonuses go to the target, the source reads as the target × equivalence; unidirectional: bonuses go to the target, the source reads as the target, unscaled; onlyVisualChange: only the name in tooltips changes, bonuses stay on the source; fullReplacement: bonuses go to the target, the source keeps its base value |
equivalence |
1 | the source reads as the target's value times this; 0 is not allowed |
conversionEquivalence |
0 (use equivalence) |
bonuses that reach the source (from items, effects, other mods) are divided by it on their way to the target |
subtractValue |
0 | taken off the target's value before equivalence, for attributes with different base values |
operationConversion |
DEFAULT |
DEFAULT keeps the bonus as it is; ADDITION_TO_MULTIPLY_BASE or ADDITION_TO_MULTIPLY_TOTAL turn a flat bonus into a percentage of the base or the total value |
comment |
none | a note for people; the mod ignores it |
The built-in mappings are data/attributification/attributification/mappings/defaults.json in the mod: a data pack with a file of the same path replaces them, and {"mappings": []} in it turns them off.
The editor (/attributification gui, operators only) lists every mapping file. Files in the world's data pack can be edited and deleted (except files in subfolders); files from other data packs and from the mod are read-only. Override saves an editable copy into the world; the copy replaces the original. A save applies at once; if the editor asks for /reload, run it. Files larger than 1 MB cannot be opened in the editor. Saving can fail earlier, at a few hundred KB: the editor then says the file is too large. Split such files or edit them by hand. The mod itself loads files up to 8 MB.
If a mapping does nothing, look in the server log. Every mistake is reported with the file and the mapping: a typo in an attribute ID, an unknown field or mode, equivalence 0, a division by zero. Such a mapping is skipped. One summary line tells how many mappings are active and how many wait for mods that are not installed. If the command /attributification gui is unknown, you are not an operator (level 2). If it does not open the editor, install the mod on your client, in the same version as on the server.
The log level (NONE, ERRORS, WARNINGS by default, ALL) is debug.logLevel in config/attributification.json on Fabric, config/attributification-common.toml on Forge and NeoForge up to 26.2, and config/attributification-local.toml on NeoForge 26.3. A data pack can set it with {"logLevel": "ALL"} in data/<namespace>/attributification/config.json.
Coming from 2.0? Fzzy Config is no longer needed. Open /attributification gui: it finds the mappings of the old config file (config/attributification/attributification.toml) and converts them into the world's data pack when you press Convert Old. The old file then gets a .converted suffix (attributification.toml.converted), so other worlds won't see it. To get the same mappings there, copy datapacks/attributification_gui from the converted world into the other world's folder. A 2.0 mapping with equivalence 0 is fixed where it is safe; otherwise it is skipped with a warning.
Same idea, for effects: Effectification.

Want your own server to play on with friends? BisectHosting gives you 25% off your first purchase through my link, and I get a small commission.


MIT License: free to use, modify, share and include in modpacks, as long as the copyright notice stays with it. See LICENSE.
Not an official Minecraft product. Not approved by or associated with Mojang or Microsoft.

下载 Attributification [Attribute Unification]
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Attributification [Attribute Unification]
下载 Attributification [Attribute Unification]
下载 Attributification [Attribute Unification]
下载 Attributification [Attribute Unification]
下载 Attributification [Attribute Unification]
下载 Attributification [Attribute Unification]
下载 Attributification [Attribute Unification]
下载 Attributification [Attribute Unification]
下载 Attributification [Attribute Unification]
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
已更改
- 具有映射源属性但缺少目标属性的实体(许多生物)现在会获得目标属性,所有模式均适用,除了
onlyVisualChange。此前,此类实体上的加成未被转换;现在映射同样适用于它们 - 在
bidirectional和unidirectional模式下,新的目标属性从源属性的基础值开始(源属性值本身不发生变化),而在fullReplacement模式下,则从目标属性自身的默认值开始。已存在于源属性上的加成将转移至目标属性,且由 2.1.1 版本保存的源属性值将在世界加载时迁移至目标属性 - 创建的目标属性会与实体一同保存,并在客户端存在,因此其他模组现在也能在这些实体上看到目标属性
- 如果目标属性未注册(即其所属模组未安装),源属性将像以前一样作为普通属性工作
修复
Convert Old(转换旧配置)现在能找到 2.0.x 版本的配置文件config/attributification/attributification.toml;在此之前,它会查找不同的文件并导致无法转换任何内容fullReplacement(完全替换)模式:直接添加到源属性的加成(饰品、效果、套装加成、其他模组的技能)现在也会同步移动到目标属性fullReplacement(完全替换)模式:对于没有目标属性的实体,源属性将作为普通属性工作
升级须知
- 请同时在服务器和所有客户端上更新模组。如果客户端的模组版本不同,它将无法从服务器获取映射数据(其工具提示和小地图 HUD 会显示未转换的值),并且无法打开编辑器;在 Forge 1.20.1 中,它甚至无法加入游戏
- Fabric:按 Minecraft 版本所需的最低 Fabric Loader 版本:1.20 - 1.20.1 → 0.16.10,1.20.2 - 1.20.6 → 0.16.0,1.21 - 1.21.1 → 0.16.5,1.21.2 - 1.21.3 → 0.16.8,1.21.4 → 0.16.9,1.21.5 → 0.16.10,1.21.6 - 1.21.8 → 0.16.13,1.21.9 - 1.21.10 → 0.17.0,1.21.11 → 0.17.3,26.1 - 26.2 → 0.18.4,26.3 → 0.19.3
- NeoForge:按 Minecraft 版本所需的最低 NeoForge 版本(较旧的构建版和测试版无法加载此模组):1.20.4 → 20.4.167,1.20.6 → 20.6.115,1.21.1 → 21.1.215,1.21.3 → 21.3.56,1.21.4 → 21.4.121,1.21.5 → 21.5.74,1.21.8 → 21.8.9,1.21.10 → 21.10.63,1.21.11 → 21.11.42,26.1.2 → 26.1.2.71,26.2 → 26.2.0.57,26.3 → 26.3.0.76
- Fzzy Config 和 Architectury API 不再需要,可以移除
- 不再加载 2.0.x 配置文件中的映射数据:在一个世界中打开
/attributification gui并按下 Convert Old(转换旧数据)。随后旧文件将被重命名为attributification.json5.converted;若要在其他世界使用相同的映射数据,请将该世界的datapacks/attributification_gui文件夹复制到其他世界中 - 首次启动后,请检查日志以查看被跳过的映射数据:现在带有错误、循环或等效值为 0 的映射数据将在发出警告后被跳过
新功能
- 映射数据现为数据包文件:
data/<namespace>/attributification/mappings/<file>.json。你可以将其随整合包一起分发,针对不同世界进行修改,并通过/reload应用。通配符和排除规则在所有 Minecraft 版本中均有效,包括 1.20.1 - 游戏内编辑器
/attributification gui(仅限操作员,权限等级 2):将所有映射文件列在一个列表中,提供每个映射数据的编辑器,并支持对所有属性进行搜索 - 编辑器会立即执行保存、删除或转换操作,无需
/reload;当无法自动完成时,它会提示你需要/reload - 编辑器会在丢弃未保存的更改或删除前进行询问,在保存前检查属性 ID 和数值,保留文件中未知的字段和注释,并显示服务器对每个请求的响应。文件大小不超过 1 MB 时可直接在编辑器中打开;过大的文件可能因体积过大而无法从游戏中保存(编辑器会提示)
- 2.0.x 映射数据转换器:当你要求转换时,编辑器会在旧配置文件中找到映射数据并将其写入当前世界的数据包中。带有无效数值的条目将在发出警告后被跳过;在映射模式不使用等效值的情况下,等效值 0 会被替换为 1;否则,转换后的映射数据将保持为 0,并在你设置非零等效值之前发出警告并被跳过
- 日志级别在
config/attributification.json(Fabric)、config/attributification-common.toml(Forge、NeoForge 最高至 26.2)或config/attributification-local.toml(NeoForge 26.3)中设置,数据包可以在data/<namespace>/attributification/config.json中覆盖它(最后加载的数据包生效)。默认级别现改为 WARNINGS(警告),而非 ERRORS(错误) - 客户端使用服务器的映射数据:当玩家加入或每次重载后,服务器都会发送这些映射数据,因此小地图 HUD、物品栏和工具提示显示的值与服务器一致
- 新增支持的 Minecraft 版本:Fabric 1.20 - 1.21.11 和 26.1 - 26.3;NeoForge 1.20.4, 1.20.6, 1.21.3 - 1.21.5, 1.21.8, 1.21.10, 1.21.11, 26.1.2, 26.2 和 26.3(2.0.x 版本支持:Fabric 和 Forge 1.20.1,Fabric 和 NeoForge 1.21.1)。由于 NeoForge 没有 1.20.3, 1.20.5, 1.21.2, 1.21.7, 1.21.9, 26.1 和 26.1.1 的正式构建版,因此模组不支持在这些 NeoForge 版本上运行
- 内置映射数据也适用于 Apothic Attributes、Eidolon Repraised 和 More RPG Library 在 1.21 中的模组 ID
- 俄语翻译(编辑器及其消息)
变更
- 等效值为 0 的映射数据将在发出警告后被跳过;2.0.x 版本在设置
conversionEquivalence时接受此值 - 映射数据文件中的错误将报告具体文件和映射数据项:如拼写错误的属性 ID、未知字段(附带建议)、未知的
mode或operationConversion、会导致除以零的转换等。此类映射数据将被跳过 mode和operationConversion的值忽略大小写和下划线_- 对于未安装的模组的映射数据不再逐条报告;而是用一行汇总信息告知有多少映射数据处于激活状态
- 每秒执行的属性查询产生的消息仅记录一次,而非每次执行都记录
修复:属性和存档
fullReplacement(完全替换)模式原本会移除源属性的物品修饰符,而不是将其移动到目标属性,导致两个属性均未改变 (#2)- 物品修饰符曾被转换两次(数值被转换等效值除去了两次)
- 目标属性自身的修饰符也曾被转换等效值除过;现在只有源自源属性的修饰符才会被转换
- 通过任何方法(永久、临时、替换、由其他模组添加)添加到源属性的修饰符都会被转换,而不仅仅是部分修饰符
- 源修饰符移除后,已转换的修饰符可能会残留在目标属性上
- 读取或设置映射源属性的基础值(通过命令或其他模组)现在会在源单位和目标单位之间进行转换
- 从存档加载实体时可能会改变其属性的基础值
- 修复了因服务器和客户端线程共享查找缓存而在单人游戏中偶尔导致的崩溃或数值错误
- 向目标属性添加修饰符时,内存不再无限增长
- 1.21+ 版本的工具提示也会转换来自附魔的物品修饰符
修复:映射数据
- 始终能找到并跳过映射数据之间的循环
- 在映射链(A 到 B,B 到 C)中,A 会直接转换为 C,并使用正确的回退目标
- 显式编写的映射数据优先级高于由通配符生成的映射数据
修复:兼容性和网络
-
未安装模组的玩家可以加入安装了该模组的服务器(Fabric、Forge 和 NeoForge);他们既无法使用编辑器,也无法获得服务器的映射数据
-
服务器会对每个编辑请求检查操作员权限,拒绝会使数据包文件夹越界的文件名以及 Windows 保留名称(如
con、nul等),限制文件和数据包的体积大小,仅接受有效的映射文件,并限制单个玩家的保存频率
- 1.21.1 正式版
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
可定制的鞘翅模组,支持装饰纹饰、旗帜图案等更多功能!
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧