技能与属性

自定义技能

自定义技能配置可以在 plugins/EcoSkills/customeffects.yml 中找到,它的一般配置如下:

effects:
  - <第一个技能>
  - <第二个技能>

其中,effects 为一个 List 类型的自定义技能的键,所有自定义技能的一般配置如下:

- id: gold_touch
  placeholder: "%level%" 
  description: "&a%placeholder%%&8 几率每次挖掘方块获得 50 金币!"

  effects:
    - id: give_money
      args:
        chance: "%level%"
        amount: 50
      triggers:
        - mine_block

  conditions: [ ]

我们可以看出它由以下部分组成:

  • id:技能的 id,用在 EcoSkills/skills 内各个大技能下的奖励设置。例如我们可以为挖掘大技能设置一个挖掘钻石双倍掉落的技能,一个大技能的示例文件如下:

enabled: true
name: 酿造
description: 通过酿造药水获得酿造经验值
disabled-in-worlds: []
gui:
  item: player_head texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTExYTNjZWM3YWFmOTA0MjEyY2NmOTNiYjY3YTNjYWYzZDY0OTc4M2JhOTBiOGI2MGJiNjNjNzY4N2ViMzlmIn19fQ==
  lore:
  - '&f提升属性:'
  - '&8» &r%ecoskills_wisdom_name%'
  - '&f'
  - '&f技能效果:'
  - '&8» &r&6药水大师 %ecoskills_potionmaster_numeral%'
  - '   %ecoskills_potionmaster_description%'
  - '&8» &r&6持久酿造 %ecoskills_efficient_brewing_numeral%'
  - '   %ecoskills_efficient_brewing_description%'
  - '&8» &r&6神秘抗性 %ecoskills_mystic_resilience_numeral%'
  - '   %ecoskills_mystic_resilience_description%'
  name: 酿造
  position:
    column: 4
    row: 4
level-xp-requirements:
- 50
- 125
- 200
- 300
- 500
- 750
- 1000
- 1500
- 2000
- 3500
- 5000
- 7500
- 10000
- 15000
- 20000
- 30000
- 50000
- 75000
- 100000
- 200000
- 300000
- 400000
- 500000
- 600000
- 700000
- 800000
- 900000
- 1000000
- 1100000
- 1200000
- 1300000
- 1400000
- 1500000
- 1600000
- 1700000
- 1800000
- 1900000
- 2000000
- 2100000
- 2200000
- 2300000
- 2400000
- 2500000
- 2600000
- 2750000
- 2900000
- 3100000
- 3400000
- 3700000
- 4000000
rewards:
  chat-messages:
    '1':
    - ' &8» &r&f+1 %ecoskills_wisdom_name%'
    - ' &8» &r&6药水大师 %ecoskills_potionmaster_numeral%'
    - '    %ecoskills_potionmaster_description%'
    - ' &8» &r&6神秘抗性 %ecoskills_mystic_resilience_numeral%'
    - '    %ecoskills_mystic_resilience_description%'
    '10':
    - ' &8» &r&f+1 %ecoskills_wisdom_name%'
    - ' &8» &r&6药水大师 %ecoskills_potionmaster_numeral%'
    - '    %ecoskills_potionmaster_description%'
    - ' &8» &r&6持久酿造 %ecoskills_efficient_brewing_numeral%'
    - '    %ecoskills_efficient_brewing_description%'
    - ' &8» &r&6神秘抗性 %ecoskills_mystic_resilience_numeral%'
    - '    %ecoskills_mystic_resilience_description%'
  progression-lore:
    '1':
    - ' &8» &r&f+1 %ecoskills_wisdom_name%'
    - ' &8» &r&6药水大师 %ecoskills_potionmaster_numeral%'
    - '    %ecoskills_potionmaster_description%'
    - ' &8» &r&6神秘抗性 %ecoskills_mystic_resilience_numeral%'
    - '    %ecoskills_mystic_resilience_description%'
    '10':
    - ' &8» &r&f+1 %ecoskills_wisdom_name%'
    - ' &8» &r&6药水大师 %ecoskills_potionmaster_numeral%'
    - '    %ecoskills_potionmaster_description%'
    - ' &8» &r&6持久酿造%ecoskills_efficient_brewing_numeral%'
    - '    %ecoskills_efficient_brewing_description%'
    - ' &8» &r&6神秘抗性 %ecoskills_mystic_resilience_numeral%'
    - '    %ecoskills_mystic_resilience_description%'
  level-commands: []
  rewards:
  - wisdom::1
  - potionmaster::1
  - efficient_brewing::1:10:100
  - mystic_resilience::1
xp-rewards:
- nether_wart:6
- redstone:6
- glowstone_dust:6
- fermented_spider_eye:6
- gunpowder:6
- dragon_breath:42
- sugar:14
- rabbit_foot:22
- glistering_melon_slice:22
- spider_eye:8
- pufferfish:14
- magma_cream:12
- golden_carrot:22
- blaze_powder:12
- ghast_tear:12
- turtle_helmet:80
- phantom_membrane:34

在这其中:

  • enabled:是否开启该大技能。

  • name:该大技能的名称。

  • description:该大技能的描述。

  • disabled-in-worlds:该大技能禁用的世界。

  • gui:该大技能的在技能菜单中的设置。大部分选项前文可以找到相似,不再赘述。其中 gui.position 下分别为第几行和第几列的选项。

  • level-xp-requirements:各个等级需要的大技能经验值。

  • rewards:大技能升级的奖励。

其中:

  • rewards.chat-messages:升级后的聊天框提示。

  • rewards.progression-lore:升级后的技能菜单物品的 Lore 显示内容。

以上两个选项的子选项键名为其需要的等级,值为对应的聊天框提示和 Lore 内容。

  • rewards.level-commands:升级后执行的指令,其值为 需要的等级:指令内容,例如:

level-commands:
  - "10:eco give %player% 5000"
  • rewards.rewards:升级后给予的属性和技能,其值格式为 属性或者技能的id::增加的属性或者技能等级数量::最小激活大技能等级::最大激活大技能等级,后面的 最小激活大技能等级和最大激活技能等级 可以去除,这样无论大技能等级是几级,每次升级都会给予该奖励,例如:

- "strength::1:1:14"
- "strength::2:15:100"

代表1-14级时每次升级给予 id 为 strength 的属性 1 级,15-100级时给予 id 为 strength 的属性 2 级。如果该属性每次升级时都是给予该属性 1 点,那么就可以理解为给予该属性 1 点。

  • xp-rewards:大技能经验值来源设置。

继续自定义技能配置的讲解:

  • placeholder:该技能的变量符显示公式。

  • description:该技能的描述内容。%level% 代表该技能当前的等级。

  • effects/conditions:The Effect System(自定义技能系统)的内容,将在后文介绍。

自定义属性

自定义属性配置可以在 plugins/EcoSkills/customstats.yml 中找到,它的一般配置如下:

stats:
- <第一个属性>
- <第二个属性>

其中,stats 为一个 List 类型的自定义属性的键,所有自定义属性的一般配置如下:

  - id: saturation 
    name: "&#f5aa42🍖 耐力" 
    placeholder: "%level% / 3" 
    description: "&8饱食度消耗减少 &a%placeholder%%&8" 
    stats-gui:
      enabled: false
      position:
        row: 4
        column: 4
      item:
        item: player_head texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDMzZGRiOTJjYjZiM2E3OTI4MGI4YmRjZWQ4OTc2YWVhYjEzYTRiZmZlYWVmMmQ0NmQ4MjhiZDkxZGVlMGYzZSJ9fX0=
        name: "%stat%"
        lore:
          - "&f等级: &a%level%"
          - "&8&o%description%"
    effects:
      - id: hunger_multiplier
        args:
          multiplier: "1 - (%level% / 300)"

    conditions: [ ]

以上与自定义技能近乎一致,不再赘述,其中 stats-gui 下的 enabled 子选项代表该属性是否在属性菜单显示。

Last updated