pluginiPlugin

AttributePlus

AttributePlus Plugin Integration for Implementing Zaphkiel Item Custom Attribute Functionality

Quick Start

Basic Configuration

In the item configuration file, you only need to add the attribute-plus configuration under the data node:

plugins/Zaphkiel/item/def.yml
my_sword:
  display: sword_display
  icon: diamond_sword
  name:
    item_name: '&6Legendary Sword'
  data:
    attribute-plus:
      物理伤害: "10-20"
      暴击几率: "0.15"
      生命力: "50"

Attribute Value Formats

  • Fixed Attribute Value: Write the number directly, e.g., "10"
  • Random Attribute Value: Use the range format, e.g., "10-20"
  • Percentage Attribute: Follow the AttributePlus standard format, e.g., "0.15" represents 15%

Important Reminders

Finding Your Attribute Names

You must use the exact attribute names (in Chinese) defined in the AttributePlus configuration file.

Examples:

  • ✅ Correct: 物理伤害: "35" (corresponds to attack: 物理伤害 in AttributePlus)
  • ❌ Incorrect: damage: "35" (does not match the attribute name in AttributePlus configuration)

How to View Your Attribute Configuration

  1. Open the plugins/AttributePlus/attribute.yml file on your server
  2. Check each category under the attribute.key node
  3. Use the Chinese attribute names (on the right side of the configuration) as the attribute names in Zaphkiel settings

Configuration Example

Suppose your AttributePlus configuration includes:

plugins/AttributePlus/attribute.yml
attribute:
  key:
    attackOrDefense:
      attack: 物理伤害
      crit: 暴击几率
    update:
      health: 生命力

Then you should configure it like this in Zaphkiel:

plugins/Zaphkiel/item/def.yml
warrior_sword:
  display: default_display_1
  icon: diamond_sword
  data:
    attribute-plus:
      物理伤害: "35"        # Corresponds to the "attack" key in AttributePlus
      暴击几率: "0.12"      # Corresponds to the "crit" key in AttributePlus
      生命力: "100"         # Corresponds to the "health" key in AttributePlus

Damage Stacking Mechanism

Note: Attributes of Zaphkiel items will stack with the base attributes of vanilla items. For example:

  • Vanilla base damage of Diamond Sword: 7
  • Zaphkiel 物理伤害 (Physical Damage): 35
  • Final Damage: 42 (7 + 35)

Practical Configuration Examples

Warrior Weapon

plugins/Zaphkiel/item/def.yml
warrior_sword:
  display: warrior_display
  icon: netherite_sword
  data:
    attribute-plus:
      物理伤害: "25-35"
      暴击几率: "0.12"
      暴伤倍率: "150"
      护甲穿透: "10"

Mage Equipment

plugins/Zaphkiel/item/def.yml
mage_staff:
  display: mage_display
  icon: blaze_rod
  data:
    attribute-plus:
      真实伤害: "20-30"
      燃烧几率: "0.25"
      燃烧伤害: "15"
      生命力: "100"

Protective Equipment

plugins/Zaphkiel/item/def.yml
guardian_armor:
  display: armor_display
  icon: diamond_chestplate
  data:
    attribute-plus:
      护甲值: "100-150"
      物理防御: "20-30"
      生命力: "200"
      闪避几率: "0.15"

Working Mechanism

The system automatically handles attribute application: 2

  • When Equipped: Automatically detects and applies the item's attributes
  • When Unequipped: Automatically removes the corresponding attributes
  • When Switched: Seamlessly updates attribute values
  • Multiple Equipment Pieces: Automatically stacks attributes of the same type

Usage Tips

Understanding Attribute Categories

AttributePlus classifies attributes into four categories:

  • attackOrDefense: Attack and defense category, calculated in real-time during combat
  • update: Update category, triggered when attributes refresh
  • runtime: Runtime category, triggered every few seconds
  • other: Other category, with special calculation logic

Using Random Ranges

Using random ranges can increase item diversity:

# Fixed value
物理伤害: "50"
 
# Random range (minimum-maximum)
物理伤害: "45-55"

Frequently Asked Questions

Why aren't the attributes taking effect?

  1. Check if the Chinese attribute names exactly match those in the AttributePlus configuration
  2. Confirm that you are using items generated by Zaphkiel, not vanilla items
  3. Verify that the AttributePlus plugin is running properly

Why are attribute values displayed abnormally? Verify that the value format is correct and that the random range uses the correct separator (-).

Why is the damage higher than expected? Check if you have considered the base attributes of the vanilla item. Final Damage = Vanilla Base Damage + Zaphkiel Attribute Damage (e.g., 物理伤害).

How to view current attributes? Use the commands provided by the AttributePlus plugin to check the player's current attribute status.