技能配置 skills.yml
plugins/GTSkillView/skills.yml 控制技能分组、技能槽、技能定义、学习条件、升级消耗、释放消耗、冷却、外部技能绑定和被动技能预留。
修改后执行:
/gtsv reload如果改了 MythicMobs 或 SkillAPI 技能文件,先重载对应插件,再重载 GTSkillView。
文件结构
groups:
active: {}
slots:
1: {}
skills:
thunder_slash: {}| 节点 | 作用 |
|---|---|
groups | 技能分组,用于界面分类和展示 |
slots | 玩家可绑定的技能槽 |
skills | 技能本体配置 |
技能 ID 直接使用 skills 下的键名,例如:
skills:
thunder_slash:这里的技能 ID 是 thunder_slash。命令、绑定、变量和数据存储都会使用这个 ID。
groups 技能分组
groups:
all:
display: "全部技能"
icon: "BOOK"
active:
display: "主动技能"
icon: "DIAMOND_SWORD"
passive:
display: "被动技能"
icon: "SHIELD"| 字段 | 作用 |
|---|---|
display | 分组显示名 |
icon | 分组图标 |
技能通过 group 归入分组:
skills:
thunder_slash:
group: active分组只影响展示,不直接影响技能释放。是否能看见、学习、升级和释放,由技能自身条件控制。
slots 技能槽
slots:
1:
display: "一号技能"
unlock:
permissions: []
conditions: []
3:
display: "三号技能"
unlock:
permissions: []
conditions:
- "{level} >= 5"
5:
display: "五号技能"
unlock:
permissions:
- "gtskillview.slot.5"
conditions: []| 字段 | 作用 |
|---|---|
display | 槽位显示名 |
unlock.permissions | 解锁权限 |
unlock.conditions | 解锁条件 |
默认 3 号槽需要等级达到 5,4 号槽需要等级达到 10,5 号槽需要权限 gtskillview.slot.5。
常见写法:
slots:
4:
display: "四号技能"
unlock:
permissions:
- "vip.skill.slot4"
conditions:
- "{level} >= 20"效果:
- 玩家必须有
vip.skill.slot4。 - 玩家等级必须达到 20。
- 两个条件都满足才能使用 4 号槽。
skills 基础字段
skills:
thunder_slash:
enabled: true
group: active
type: active
name: "&b雷霆斩"
icon: "DIAMOND_SWORD"
texture: "textures/gtskillview/thunder_slash.png"| 字段 | 作用 |
|---|---|
enabled | 是否启用技能 |
group | 所属分组 |
type | 技能类型 |
name | 显示名 |
icon | 原版 GUI 或物品图标 |
texture | 客户端图片图标 |
type 常用值:
| 类型 | 说明 |
|---|---|
active | 主动技能,可以释放 |
passive | 被动技能,不走主动释放 |
icon 原版与物品图标
原版材质:
icon: "DIAMOND_SWORD"CustomModelData:
icon: "DIAMOND_SWORD#10001"GTCore 统一物品:
icon: "gtitem:thunder_sword"MythicMobs 物品写法可按后续 GTCore 统一物品入口收敛。当前配置保留兼容字段,适合先让原版 GUI 和客户端模板显示起来。
texture 客户端图片图标
texture: "textures/gtskillview/thunder_slash.png"texture 是客户端资源路径,不是服务端文件路径。
PaiUI、AX、KongCore、DragonCore 模板会优先读取这个字段显示技能图片。图片需要放到对应客户端资源包中。
AX 图片示例:
.minecraft/resourcepacks/ArcartX/resource/textures/gtskillview/thunder_slash.png客户端图片按 UI 引擎的资源目录放置。
bind 外部技能绑定
MythicMobs:
bind:
provider: mythicmobs
id: "ThunderSlash"
power: "1 + {skill_level} * 0.15"SkillAPI:
bind:
provider: skillapi
id: "Blink Step"被动技能:
bind:
provider: passive
id: ""| 字段 | 作用 |
|---|---|
provider | 外部技能来源 |
id | 外部技能 ID |
power | 传给外部技能的强度公式 |
provider 支持:
mythicmobs
mm
skillapi
passiveMythicMobs 的 id 必须和 MythicMobs 技能名一致。SkillAPI 的 id 必须和 SkillAPI 技能名一致。
max-level 与 default-level
max-level: 5
default-level: 0| 字段 | 作用 |
|---|---|
max-level | 最大等级 |
default-level | 新玩家默认等级 |
default-level: 0 表示玩家需要学习后才拥有技能。
如果要做出生自带技能:
default-level: 1如果技能只做解锁开关:
max-level: 1
default-level: 0description 描述
description:
- "&7向前方斩出雷霆剑气。"
- "&7命中目标后造成额外雷属性伤害。"描述会出现在原版 GUI、PaiUI、AX 等技能界面中。
支持颜色符号、内置变量和 PAPI 变量。
带等级变量:
description:
- "&7当前等级: &e{skill_level}"
- "&7伤害倍率: &f{skill_level} * 1.2"visible 可见条件
visible:
permissions: []
conditions: []| 字段 | 作用 |
|---|---|
permissions | 看见技能需要的权限 |
conditions | 看见技能需要的条件 |
只让战士职业看见:
visible:
permissions: []
conditions:
- "%player_class% == warrior"只让有权限的玩家看见:
visible:
permissions:
- "class.warrior"
conditions: []不可见技能不会出现在技能列表中,但已经绑定的数据仍会保留。隐藏技能前先处理旧数据。
learn 学习规则
learn:
permissions: []
conditions:
- "{level} >= 1"
costs:
points: 1
money: 0
items: []
actions:
- "[message]&a你学会了 &b雷霆斩&a。"| 字段 | 作用 |
|---|---|
permissions | 学习需要的权限 |
conditions | 学习需要的条件 |
costs.points | 技能点消耗 |
costs.money | 金币消耗 |
costs.items | 物品消耗 |
actions | 学习成功后的动作 |
学习需要 10 级、1000 金币和 2 个青金石:
learn:
conditions:
- "{level} >= 10"
costs:
points: 1
money: 1000
items:
- "vanilla:lapis_lazuli:2"upgrade 升级规则
upgrade:
costs:
points: "{next_level}"
money: "{next_level} * 100"
items:
- "vanilla:lapis_lazuli:{next_level}"
actions:
- "[sound]ENTITY_PLAYER_LEVELUP"| 字段 | 作用 |
|---|---|
costs.points | 升级技能点消耗 |
costs.money | 升级金币消耗 |
costs.items | 升级物品消耗 |
actions | 升级成功后动作 |
常用变量:
{skill_level} 当前等级
{next_level} 下一等级
{max_level} 最大等级
{level} 玩家等级每级固定 1 技能点:
upgrade:
costs:
points: 1
money: "{next_level} * 250"高等级递增消耗:
upgrade:
costs:
points: "{next_level}"
money: "pow({next_level}, 2) * 100"mana 释放 MP 消耗
mana: "10 + {skill_level} * 2"mana 支持数字或公式。释放时会先计算当前技能等级下的 MP 消耗。
固定 8 MP:
mana: "8"等级越高消耗越高:
mana: "6 + {skill_level} * 3"不消耗 MP:
mana: "0"cooldown 冷却
cooldown: "6 - min({skill_level}, 4) * 0.6"单位是秒。支持公式。
固定 5 秒:
cooldown: "5"等级越高冷却越短:
cooldown: "8 - {skill_level}"最低不低于 2 秒:
cooldown: "max(2, 8 - {skill_level})"拥有 gtskillview.bypass.cooldown 的玩家可以免冷却。
conditions 释放条件
conditions:
- "{skill_level} > 0"释放前会检查所有条件。任意一个失败,技能不会执行。
常用写法:
conditions:
- "{skill_level} > 0"
- "%player_level% >= 10"
- "%player_world% != spawn"条件用于控制技能是否能释放。学习和升级条件分别写在 learn.conditions、upgrade.conditions 中。
actions 动作
actions:
pre:
- "[actionbar]&b雷霆正在凝聚..."
cast:
- "[message]&7释放额外联动动作。"
success:
- "[sound]ENTITY_PLAYER_ATTACK_SWEEP"
failed:
- "[actionbar]&c雷霆斩释放失败: {reason}"| 节点 | 执行时机 |
|---|---|
pre | 扣蓝、冷却和外部技能执行前 |
cast | 外部技能执行时的额外动作 |
success | 释放成功后 |
failed | 释放失败后 |
动作会逐步向 GTCore 统一动作系统收敛。当前配置保留本地兼容写法,常用动作包括:
[message]文本
[actionbar]文本
[sound]声音IDpassive 被动技能
passive:
attributes:
- "攻击力: {skill_level} * 2"
actions-on-login:
- "[message]&7战斗本能 Lv.{skill_level} 已载入。"| 字段 | 作用 |
|---|---|
attributes | 被动属性文本 |
actions-on-login | 玩家登录后执行的动作 |
被动技能适合做条件、属性展示、登录加载和后续 GTCore 属性系统预留。
当前外部属性是否立即生效,取决于服务器使用的属性插件和 GTCore 统一属性能力。
完整主动技能示例
skills:
fire_burst:
enabled: true
group: active
type: active
name: "&c烈焰爆发"
icon: "BLAZE_POWDER"
texture: "textures/gtskillview/fire_burst.png"
bind:
provider: mythicmobs
id: "FireBurst"
power: "1 + {skill_level} * 0.2"
max-level: 5
default-level: 0
description:
- "&7向目标方向释放火焰爆发。"
- "&7等级越高伤害越高。"
visible:
permissions: []
conditions: []
learn:
permissions: []
conditions:
- "{level} >= 5"
costs:
points: 1
money: 500
items:
- "vanilla:blaze_powder:3"
actions:
- "[message]&a你学会了 &c烈焰爆发&a。"
upgrade:
costs:
points: 1
money: "{next_level} * 500"
items:
- "vanilla:blaze_powder:{next_level}"
actions:
- "[sound]ENTITY_PLAYER_LEVELUP"
mana: "12 + {skill_level} * 3"
cooldown: "max(3, 9 - {skill_level})"
conditions:
- "{skill_level} > 0"
- "%player_world% != spawn"
actions:
pre:
- "[actionbar]&c烈焰正在聚集..."
success:
- "[sound]ENTITY_BLAZE_SHOOT"
failed:
- "[actionbar]&c烈焰爆发失败: {reason}"测试顺序:
- 在 MythicMobs 中创建
FireBurst。 /gtsv reload。/gtsv points set 玩家名 10。/gtsv upgrade fire_burst。/gtsv bind 1 fire_burst。/gtsv cast 1。
完整被动技能示例
skills:
battle_instinct:
enabled: true
group: passive
type: passive
name: "&6战斗本能"
icon: "GOLDEN_APPLE"
bind:
provider: passive
id: ""
max-level: 5
default-level: 0
description:
- "&7提升基础战斗能力。"
learn:
conditions:
- "{level} >= 1"
costs:
points: 1
money: 0
items: []
upgrade:
costs:
points: 1
money: "{next_level} * 150"
items: []
actions:
- "[message]&6战斗本能 &7已提升。"
passive:
attributes:
- "攻击力: {skill_level} * 2"
actions-on-login:
- "[message]&7战斗本能 Lv.{skill_level} 已载入。"配置排查
技能不显示:
enabled是否为true。group是否存在。visible.permissions是否满足。visible.conditions是否成立。/gtsv reload是否成功。
技能不能学习:
learn.conditions是否成立。- 技能点是否足够。
- 金币和物品消耗是否满足。
- 技能是否已达到最高等级。
技能不能释放:
- 玩家是否学习了技能。
- 技能是否绑定到槽位。
mana是否足够。cooldown是否结束。conditions是否成立。bind.provider是否正确。bind.id是否真实存在。
