简体中文
占位符参考
强化模块对外提供的占位符和内部模板变量如下, 各自可用的位置一并标明, 键名逐字照抄即可
PlaceholderAPI 占位符
扩展标识符: emakistrengthen
前置条件: PlaceholderAPI 已安装. 装好后 EmakiStrengthen 会自动注册以下占位符, 全部读取玩家主手物品的强化数据
| 占位符 | 说明 | 示例 |
|---|---|---|
%emakistrengthen_mainhand_star% | 主手物品当前星级 (不可强化时为 0) | 7 |
%emakistrengthen_mainhand_temper% | 主手物品锻印等级 | 3 |
%emakistrengthen_mainhand_recipe% | 主手物品关联的强化配方 ID (无则为空) | weapon_basic |
%emakistrengthen_mainhand_eligible% | 主手物品是否可强化 | true |
%emakistrengthen_mainhand_success_count% | 主手物品累计成功次数 | 5 |
%emakistrengthen_mainhand_failure_count% | 主手物品累计失败次数 | 2 |
%emakistrengthen_mainhand_max_star% | 配方最大星级上限 | 12 |
%emakistrengthen_mainhand_success_rate% | 当前星级的强化成功率 | 65.5 |
%emakistrengthen_mainhand_crack_level% | 裂缝等级 (锻印值) | 3 |
使用示例
yaml
lore:
- '<gray>星级: <white>%emakistrengthen_mainhand_star%'
- '<gray>锻印: <white>%emakistrengthen_mainhand_temper%'
- '<gray>配方: <white>%emakistrengthen_mainhand_recipe%'
- '<gray>可强化: <white>%emakistrengthen_mainhand_eligible%'内部模板变量
以下变量在强化层展示构建时注入, 可在配方的 name_actions, lore_actions 与属性行模板里使用
通用变量
| 变量 | 说明 | 示例 |
|---|---|---|
%star% | 当前星级 | 7 |
%temper% | 锻印等级 | 3 |
%max_temper% | 配方最大锻印上限 | 4 |
%temper_color% | 锻印颜色标记 (锻印 > 0 时为 <red>, 否则为 <green>) | <red> |
属性行变量
用于属性行模板中:
| 变量 | 说明 | 示例 |
|---|---|---|
%id% | 属性 ID | physical_attack |
%sign% | 正负号 | + |
%value% | 格式化后的属性绝对值 | 15.5 |
%<stat_id>% | 任意累计属性值 (动态, 实际 key 来自配方中累计的属性或变量) | 120 |
NOTE
stat_lines 会被解析并存放在配方模型中; 当前版本的强化层输出来自各星级的 name_actions / lore_actions, 还没把属性行模板渲染接进来. 属性行变量 %id% / %sign% / %value% 只在渲染属性行模板时可用
模板示例
配方级 lore_actions (可用通用变量):
yaml
lore_actions:
- action: "prepend"
content:
- "<yellow>★ 强化等级: +%star%"
- "%temper_color%锻印: %temper%/%max_temper%"stat_lines 属性行模板 (可用属性行变量):
yaml
stat_lines:
physical_attack:
template: "<gray>攻击力: <white>%sign%%value%"
section_id: "strengthen.stats.primary"
section_order: 210动作上下文变量
强化成功/失败动作 (StrengthenActionCoordinator) 触发时, 下面这些变量会注入到 Action 上下文:
| 变量 | 说明 | 示例 |
|---|---|---|
%strengthen_recipe_id% | 强化配方 ID | weapon_basic |
%strengthen_recipe% | 强化配方显示名 | 基础武器强化 |
%strengthen_star% | 结果星级 | 8 |
%strengthen_temper% | 锻印等级 | 3 |
%strengthen_max_star% | 配方最大星级 | 12 |
%strengthen_success_rate% | 本次尝试的成功率 | 65.5 |
%strengthen_show_item% | 结果物品的 hover 文本 | [影刃 +8] |
%strengthen_result_slot% | 结果落地槽位 ID | main_hand |
%strengthen_operation_id% | 本次强化的操作 ID | 3f1c… |
%operation_id% | 同 %strengthen_operation_id% | 3f1c… |
%star% | 结果星级 (与 %strengthen_star% 同值) | 8 |
%temper% | 锻印等级 (与 %strengthen_temper% 同值) | 3 |
%was_star% | 强化前的星级 (仅失败动作) | 8 |
%dropped% | 物品是否掉落 (仅失败动作) | false |
%protected% | 是否触发了保护 (仅失败动作) | true |
说明
- PlaceholderAPI 占位符里以
mainhand_开头的 key, 读的都是主手物品数据 - 主手物品没有强化数据时,
star和temper返回0,recipe返回空字符串 - 内部模板变量只在 Strengthen 的
name_actions/lore_actions与属性行模板中生效 %<stat_id>%是动态变量, 取决于配方中配置的属性 key