Skip to content

Symphony把属性玩出花

给 RPG 服务端的可编程属性引擎 — 配置即玩法

Symphony

一份配置,一个流血词条

yaml
# plugins/Symphony/affixes/bleed.yml
id: bleed
display_name: "&c流血"
description:
  - "&7攻击时有 {chance}% 概率使目标流血"
max_level: 3
rarity: RARE

levels:
  1:
    chance: 10
    damage: 5
  2:
    chance: 20
    damage: 12
  3:
    chance: 30
    damage: 25

triggers:
  - type: ON_ATTACK
    conditions:
      - type: CHANCE
        value: "{chance}"
      - type: COOLDOWN
        value: 2000
    actions:
      - type: STATUS_STACK
        status_id: bleeding
        stacks: 1
      - type: DAMAGE
        amount: "{damage}"

MythicMobs 怪物属性,写在 mob yml 里

yaml
BanditBoss:
  Type: ZOMBIE
  Display: '&c山贼头目'
  Health: 200
  Symphony:
    attributes:
      physical_damage: 40
      physical_defense: 20
      critical_chance: 15%
      fire_resistance: 30%
    affixes:
      - bleed
      - id: fire_aura
        level: 2

无需 Symphony 命令,无需重载。怪物一生成自动套属性、自动挂词条。

装上之后的 5 分钟

  1. Symphony.jarplugins/,启动服务器
  2. /sym menu — 玩家看到自己所有属性
  3. scripts/attributes/combat/physical_damage.aria 数值,/sym reload 立即生效
  4. 给一把武器加 NBT 属性,玩家拿起来 /sym explain physical_damage 看完整流水线
  5. 写一个 mob 配置加 Symphony: 段,召唤一只测试

跟谁配合

你已有的插件Symphony 怎么接
MythicMobsmob yml 写 Symphony: 段;同时注册了 symphony_damage / heal / buff 三个 mechanic 给 MM skill 用
PlaceholderAPI%symphony_attribute_xxx% %symphony_when_in_combat% 等占位符自动可用
MMOItems / ItemsAdder自定义 IAttributeProvider 读对应物品的 NBT,几十行代码即可接通
Vault / 经济插件用属性当货币系数,监听 AttributeUpdateEvent 即可