nwPlugin | NN
  • Introduction
    • Community & Support
  • My Plugins
    • nwMMOUpgrade
      • English
        • Config & Command
        • Feature
          • Upgrade
          • Add Socket
          • Repair
      • Chinese
        • 配置與指令
        • 功能介紹
          • 升級
          • 增加插槽
          • 修復
    • nwFurnitureShow
      • English
        • Supported Plugins
        • Config & Command
        • Feature
          • Preview
          • Search
          • Price
          • Dye (HMCColor Integration)
Powered by GitBook
On this page
  • 升級 Upgrade
  • How Upgrading Works
  • Features
  1. My Plugins
  2. nwMMOUpgrade
  3. Chinese
  4. 功能介紹

升級

Previous功能介紹Next增加插槽

Last updated 2 days ago

升級 Upgrade

升級功能能強化你的裝備,透過提升屬性讓它們更強大,你可在插件設定中自由調整成功率、材料需求與屬性提升幅度,打造最適合你伺服器的升級系統

How Upgrading Works

物品若要使用 nwMMOUpgrade 升級,必須先綁定升級模板,模板會決定該物品的升級路線與屬性成長

插件會依照物品綁定的升級模板來套用屬性和升級規則,如果沒有套用模板,這件裝備就不能升級


Features

1. 升級材料

設定升級時需要使用的材料,以及升級所需數量

materials:
  upgrade: #this
    type: MATERIAL # Item type (MATERIAL, MMOITEM)
    id: STEEL_INGOT # Item ID
    amount: 1
  protection:
    type: MATERIAL
    id: SILVER_INGOT
    amount: 1

2. 保護道具

設定可防止升級失敗降級的保護道具(可選)並指定所需數量

materials:
  upgrade:
    type: MATERIAL # Item type (MATERIAL, MMOITEM)
    id: STEEL_INGOT # Item ID
    amount: 1
  protection: #this
    type: MATERIAL
    id: SILVER_INGOT
    amount: 1

3. 幸運道具

設定能提升升級成功率的道具(可設定多種道具)

# Success rate boost settings
success:
  enabled: true # Enable/disable success rate boost system
  stones:
    - type: MATERIAL # Item type (MATERIAL, MMOITEM)
      id: RARE_DIAMOND # Item ID
      bonus: 5 # Success rate bonus (percentage)
    - type: MATERIAL
      id: GEM
      bonus: 50

4. 升級模式

升級模式分為兩種類型:

4.1 遞減機率升級(Decay-Level-Upgrade)

此模式會隨著裝備等級提升而降低成功率 你可以自訂以下設定: 初始成功率、最低成功率、每升一級所降低的成功率百分比

decay-level-upgrade:
  enabled: true # Enable/disable decay success rates per item level
  keep-level-on-failure: true # Enable/disable keeping item level on failure
  base-success: 35.0 # Base success rate
  decay-per-level: 5.0 # Success rate decay per item level
  min-success: 10.0 # Minimum success rate
  min-downgrade-level:
      enabled: False
      amount: 1

4.2 自訂機率升級(Custom-Level-Upgrade)

此模式可讓你為每個等級單獨設定成功率,實現更靈活的升級控制,你可以為每一個裝備等級自訂專屬的成功機率

custom-level-upgrade:
    enabled: false # Enable/disable custom success rates per item level
    allow-downgrade: false # Enable/disable item level downgrade on failure
    min-downgrade-level: 1 # Minimum downgrade level
    rates:
      1: 100 # Success rate at level 1
      2: 95 # Success rate at level 2
      "3-20": 25 # Success rate at levels 3 to 20

5. 自訂公式

自訂公式功能讓你可以計算升級所需的費用與材料數量,讓升級成本能隨著裝備等級提升而變化。

成本與材料增加

當此功能啟用(enabled: true)時, 若同時啟用 cost-level,升級所需的金錢與材料數量都會隨著裝備等級提升而增加 這能確保高等級裝備的升級需要更高的投入,讓成長過程更加平衡

增加的幅度由你自訂的公式決定,讓你能掌握升級成長比例

總結:

  • 等級越高 = 所需費用與材料越多

公式設定

此功能核心在於公式欄位,你可以在這裡定義數學公式

  • 語法: 你可以使用標準的數學運算符號:+(加)-(減)*(乘)/(除)

  • 占位符: 公式中支援特定的占位符,會在運算時自動替換為對應的動態數值

    • {chance}: 表示基本成功率(在其他設定中定義)

      Represents the base success chance (as defined elsewhere in your configuration).

    • {material}: 表示基礎所需材料數量(在其他地方定義)

    • {level}: 表示目前正在升級的裝備等級

custom-formula:
  enabled: true
  formula: "{level} * {material} + 1"
  cost-level: false

6. 隨機屬性升級(Random Stat Upgrade)

當升級成功時,將隨機提升模板中的一項屬性,而不是同時升級所有屬性

random-stat:
  enabled: false # Enable/disable
  amount: 1 #Amount Stat

7. 升級失敗銷毀裝備(Destroy Item When Fail)

當升級失敗時,該裝備會被替換成預先設定的材料物品。 重要說明:若有使用保護道具,升級失敗時裝備將不會被銷毀

destroy-item-when-fail:
  enabled: false
  item-return:
    type: MATERIAL # Item type (MATERIAL, MMOITEM)
    id: STEEL_INGOT # Item ID
    amount: 1

8. 升級成功動作(Action When Success)

當升級成功時,你可以根據裝備的等級增加要執行的動作

#placeholder {player_name} / {player} / {player_uuid} / {level} / {item_name}
#syntax [sound], [broadcast], [message], [console], [player]
action-when-success:
  enabled: false
  level:
    1:
      - '[sound] BLOCK_ANVIL_USE'
      - '[broadcast] &7{player} กำลังทำให้ &f{item_name}&7 แข็งแกร่งขึ้น!'
      - '[message] &bพลังของ {item_name} เพิ่มขึ้นอีกระดับ! &e{level}'
    2-15:
      - '[sound] ENTITY_DRAGON_FIREBALL_EXPLODE'
      - '[console] execute console command "crate givekey %player_name% epic_upgrade_key 1"' # ตัวอย่างการให้ crate key
      - '[message] &6{player} ได้ปลดปล่อยพลังอันยิ่งใหญ่ของ &a{item_name}&6!'

9. 升級費用(Cost Upgrade)

此功能可讓你在每次升級時消耗 Vault(金錢)作為升級成本

cost-upgrade:
    enabled: false #Cost
    amount: 5000

10. 適用物品類型(Applies To)

你可以指定多種 MMOItem 類型套用此設定

applies-to:
  - SWORD
  - PICKAXE
Upgrade GUI