主题
Kether(服务端脚本)
Kether 运行在服务端,用于处理逻辑与触发行为。 Behemiron 主要在以下场景使用 Kether:
- 服务端热键触发
- 动画行为触发
- 音效播放
Kether 只在服务端执行,不影响客户端性能。
1. 命名空间
Behemiron 的 Kether Action 在命名空间 behemiron 下。
热键触发时默认启用:
behemironchemdahadyeshach
2. 动画相关 Action
语法:
anim trigger <behavior> <action>
anim var <key> <value>
anim flag <key> <value>示例:
anim trigger dash start
anim var speed 1.2
anim flag footIk true说明:
trigger用于触发行为系统中的动画动作var/flag用于写入运行变量(驱动 Graph 条件)
3. 音效相关 Action
语法示例:
sound play "ui/quest_accept"
sound play "ambient/forest" volume 0.6 pitch 1.0 bus environment loop true
sound play "combat/tension_1" at 100 64 100
sound event quest_accept
sound scene combat true
sound stop "combat/tension_1"参数说明:
volume/pitch:音量与音高bus:音效总线source:音效源(可选)loop:是否循环relative:相对玩家位置at x y z:指定坐标播放
路径规则(强制):
- 只能写
sound/目录下的相对路径 - 禁止
behemiron:或sound/前缀
4. 与热键结合
服务端热键的 action 就是 Kether 脚本:
yml
bindings:
skill_dash:
context: gameplay
pattern: "W, W"
trigger: press
action: |-
anim trigger dash start
sound play "ui/quest_accept"5. 常见问题
- 执行失败:检查命名空间是否包含
behemiron。 - 音效无声:路径写错或未放入
sound/。