EmakiAttribute Overview
RPG attribute and combat system providing three damage categories, resource states, PDC attribute integration, condition checks, and combat feedback capabilities.
Basic Information
| Property | Value |
|---|---|
| Version | 3.3.0 |
| Main Class | emaki.jiuwu.craft.attribute.EmakiAttributePlugin |
| Root Command | /emakiattribute |
| Aliases | /eattribute, /ea |
| Hard Dependencies | EmakiCoreLib |
| Soft Dependencies | MythicMobs, PlaceholderAPI, MMOItems |
Core Responsibilities
- Maintain attribute definitions, damage types, default profiles, Lore formats, attribute presets, and PDC reading rules
- Aggregate item and combat attribute snapshots, maintain attribute state storage and resource states
- Handle damage calculation, stage-based settlement, vanilla attribute synchronization, combat debugging, and feedback output
- Provide optional bridges for MythicMobs, MMOItems, PlaceholderAPI, etc.
- Register
PdcAttributeApiandEmakiAttributeBridgein BukkitServicesManager
config.yml Full Format
yaml
# Config file version number, do not modify manually
config_version: 1
# Language file identifier, corresponds to the file name under the lang/ directory
language: zh_CN
# Whether to enable hard-lock damage mode
# When enabled, only damage causes listed in allowed_damage_causes will trigger attribute damage calculation
hard_lock_damage: true
# Default damage type ID, used when the damage type cannot be determined
default_damage_type: physical
# Resource natural regeneration interval (unit: ticks, 20 ticks = 1 second)
regen_interval_ticks: 20
# Attribute sync delay (unit: ticks), delays vanilla attribute synchronization after equipment changes
sync_delay_ticks: 1
# Default attribute profile — baseline attributes and resource caps shared by all players
default_profile:
id: default
priority: 1000000
description: "Default base attributes and resource caps shared by all players."
# Resource definitions
resources:
health:
display_name: "Health"
default_max: 20.0 # Default maximum
min_max: 1.0 # Minimum cap
max_max: 2048.0 # Maximum cap
sync_to_bukkit: true # Whether to sync to Bukkit vanilla health
full_on_init: true # Whether to fill on initialization
mana:
display_name: "Mana"
default_max: 100.0
min_max: 0.0
max_max: 99999.0
sync_to_bukkit: false
full_on_init: true
# Attribute defaults
attributes:
physical_attack: 0.0
physical_defense: 0.0
physical_damage_bonus: 0.0
physical_crit_rate: 0.0
physical_crit_damage: 0.0
projectile_attack: 0.0
projectile_damage_bonus: 0.0
projectile_crit_rate: 0.0
projectile_crit_damage: 0.0
projectile_defense: 0.0
spell_attack: 0.0
spell_damage_bonus: 0.0
spell_crit_rate: 0.0
spell_crit_damage: 0.0
spell_defense: 0.0
health_regen: 0.0
mana_regen: 0.0
# Synthetic hit feedback configuration
synthetic_hit_feedback:
knockback: true # Whether to produce knockback effect
knockback_strength: 0.4 # Knockback strength
hurt_sound: true # Whether to play hurt sound
# Allowed damage causes list
# Each entry can be a simple string or a full object
allowed_damage_causes:
- cause: entity_attack
damage_type: physical
enabled: true
- cause: projectile
damage_type: projectile
- cause: entity_sweep_attack
damage_type: physical
- cause: entity_explosion
damage_type: physicalAbout default_profile
default_profile is the attribute baseline for all players. Additional profile files can be defined under the profiles/ directory, which are stacked on top of the baseline sorted by priority.
About hard_lock_damage
When hard_lock_damage: true, only damage causes explicitly listed in allowed_damage_causes will enter the attribute damage calculation pipeline. Unlisted damage causes will retain vanilla behavior.
Default Resource Directory
| File/Directory | Description |
|---|---|
attributes/ | Attribute definition files |
conditions/ | Condition definition files |
damage_types/ | Damage type definitions |
lore_formats/ | Lore format templates |
profiles/ | Attribute profiles |
config.yml | Main configuration |
attribute_balance.yml | Attribute combat power score configuration |
lang/ | Language files |
Default Content Statistics
| Content Type | Count |
|---|---|
| Attribute Definitions | 42 |
| Condition Definitions | 4 |
| Damage Type Definitions | 3 |
Overview of 42 Default Attributes by Category
- Resource (4): health, mana, health_regen, mana_regen
- Physical (8): physical_attack, physical_damage_bonus, physical_defense, physical_armor_penetration, physical_crit_rate, physical_crit_damage, physical_crit_evasion, physical_crit_multiplier_resistance
- Projectile (8): projectile_attack, projectile_damage_bonus, projectile_defense, projectile_armor_penetration, projectile_crit_rate, projectile_crit_damage, projectile_crit_evasion, projectile_crit_multiplier_resistance
- Spell (8): spell_attack, spell_damage_bonus, spell_defense, spell_armor_penetration, spell_crit_rate, spell_crit_damage, spell_crit_evasion, spell_crit_multiplier_resistance
- Movement/Utility (6): speed, movement_speed, attack_speed, entity_scale, entity_interaction_range, block_interaction_range
- Special (6): real_damage, lifesteal, percentage_lifesteal, lifesteal_resistance, dodge_chance, attribute_power
- Vanilla Mapping (2): attack_speed_vanilla, max_health_vanilla