图鉴配置
图鉴条目通常放在 guide 目录,套装条目通常放在 suit 目录。图鉴负责定义收集条件、奖励和展示内容,套装负责把多个图鉴组合成额外进度。
图鉴基础结构
yaml
示例图鉴:
id: "example"
name: "&a示例图鉴"
lore:
- "&7击杀指定怪物后获得"
item: "BOOK"
max-collect-count: 1
base-point: 1| 配置 | 说明 |
|---|---|
id | 图鉴唯一 id |
name | 图鉴显示名 |
lore | 图鉴说明 |
item | 图鉴展示物品 |
max-collect-count | 最大收集次数 |
base-point | 每次收集提供的基础点数 |
id 不要重复。后续变量、指令、套装都会通过这个 id 找到图鉴。
收集条件
yaml
collect-condition:
- "permission:guide.example"
- "papi:%player_level% >= 10"常见条件:
| 条件 | 说明 |
|---|---|
guide:{图鉴id} | 已拥有指定图鉴 |
noguide:{图鉴id} | 未拥有指定图鉴 |
permission:权限 | 拥有权限 |
nopermission:权限 | 没有权限 |
papi:表达式 | PlaceholderAPI 条件 |
所有条件通过后,图鉴才会进入收集判断。
收集方式
yaml
collect-methods:
- "first_kill{name=示例怪物;chance=1}"
- "kill{name=示例怪物;amount=100;chance=1}"| 方式 | 说明 |
|---|---|
first_kill{name=怪物id;chance=几率} | 首次击杀指定怪物时尝试收集 |
kill{name=怪物id;amount=次数;chance=几率} | 累计击杀达到次数后尝试收集 |
pickup_name{name=物品名;chance=几率} | 拾取指定名称物品时尝试收集 |
pickup_lore{lore=物品说明;chance=几率} | 拾取带有指定说明的物品时尝试收集 |
pickup_id{id=物品id;chance=几率} | 拾取指定物品 id 时尝试收集 |
use_name{name=物品名;chance=几率} | 使用指定名称物品时尝试收集 |
use_lore{lore=物品说明;chance=几率} | 使用带有指定说明的物品时尝试收集 |
use_id{id=物品id;chance=几率} | 使用指定物品 id 时尝试收集 |
chance 取值通常为 0-1,1 表示必定触发。
属性奖励
yaml
attribute-addition-placeholder: "%tjr_collect_count_example%"
attribute:
- "生命值: {10-20-%.0f}"| 配置 | 说明 |
|---|---|
attribute-addition-placeholder | 属性加成计算时可使用的变量 |
attribute | 图鉴提供的属性列表 |
属性可以配合随机范围写法,用于生成不同数值的图鉴奖励。
点击与获得指令
yaml
click-command:
- "[player]say 我点击了图鉴"
get-command:
- "[console]say {player} 收集了示例图鉴"| 配置 | 触发时机 |
|---|---|
click-command | 玩家在界面中点击图鉴 |
get-command | 玩家成功获得图鉴 |
常见前缀:
| 前缀 | 执行身份 |
|---|---|
[console] | 控制台执行 |
[op] | 临时以管理员身份执行 |
[player] | 玩家身份执行 |
套装结构
yaml
示例套装:
id: "example_suit"
index: 1
name: "&b示例套装"
lore:
- "&7收集指定图鉴后激活"
item: "CHEST"
guide:
- "example"
point: 5| 配置 | 说明 |
|---|---|
id | 套装唯一 id |
index | 排序序号 |
name | 套装显示名 |
lore | 套装说明 |
item | 套装展示物品 |
guide | 套装包含的图鉴 id |
point | 套装提供或统计的点数 |
套装属性
yaml
effective-attribute-need-count: 3
effective-attribute-point: 10
attribute:
- "攻击力: 5"
collected-command:
- "[console]say {player} 激活了示例套装"| 配置 | 说明 |
|---|---|
effective-attribute-need-count | 收集达到指定数量后生效 |
effective-attribute-point | 点数达到指定值后生效 |
attribute | 套装提供的属性 |
collected-command | 套装达成后执行的指令 |
套装适合把同一地图、同一怪物组、同一装备系列的图鉴组合起来,作为额外成长目标。