Skip to content

配置与规则

服务端配置目录:

/plugins/Behemiron/sound/*.yml

1. 路径规则(强制)

  • 只允许 sound/ 目录下的相对路径
  • 禁止 behemiron: 前缀
  • 禁止 sound/sounds/ 前缀

✅ 正确:

ui/confirm
battle/loop_1
ambient/forest/day

❌ 错误:

behemiron:ui/confirm
sound/ui/confirm

2. 场景(scenes)

yml
scenes:
  town:
    # 总线名称(可自定义)
    bus: ambient
    tracks:
      - id: ambient/town_day
        volume: 0.8
        pitch: 1.0
        loop: true
        weight: 1
        stream: true
      - ambient/town_night  # 简写(只填 id)

字段:

  • id:音效路径(相对 sound/)
  • volume / pitch
  • loop:是否循环
  • weight:权重(随机选轨道时使用)
  • stream:长音频流式(推荐长环境音乐)
  • source:可选音效源(缺省走 bus 默认)

3. 事件(events)

yml
events:
  quest_accept:
    sound: ui/quest_accept
    bus: ui
    volume: 1.0
    pitch: 1.0

字段:

  • sound / id:音效路径
  • bus / source / volume / pitch

4. 场景控制

服务端可通过网络包切换场景(激活/关闭),客户端会自动:

  • 播放/停止该场景
  • 屏蔽对应的原版音效源