EmakiAttribute
EmakiAttribute owns real stats, resources, and combat calculation. It defines RPG attributes, damage types, and conditions, then exposes PDC attribute APIs for other modules. Equipment stats should be written as Attribute payloads, not only as lore text.
Basic information
| Item | Value |
|---|---|
| Module version | 4.6.3 |
| Main command | /emakiattribute |
| Aliases | /eattribute, /ea |
| Hard dependency | EmakiCoreLib |
| Soft dependencies | MythicMobs, PlaceholderAPI, MMOItems |
| Default permissions | emakiattribute.use and emakiattribute.points default to true; other administrative permissions default to op |
What it solves
When vanilla attributes are not enough for RPG combat, use EmakiAttribute to define your own stat and damage logic, such as:
- physical, spell, and projectile attack.
- physical, spell, and projectile defense.
- critical chance, critical damage, and critical resistance.
- armor penetration, spell penetration, and true damage.
- health, mana, regeneration, dodge, lifesteal, attack speed, movement speed, and vanilla attribute mapping.
Stats can come from PDC payloads written by Item, Forge, Strengthen, Gem, Skills, or external modules. Attribute aggregates and calculates them instead of forcing each plugin to implement its own stat system.
Default runtime folder
plugins/EmakiAttribute/
├── config.yml
├── attribute_balance.yml
├── attributes/
├── conditions/
├── damage_types/
├── lore_formats/
├── presets/
├── gui/
├── lang/
└── data/| Path | Purpose |
|---|---|
attributes/ | Attribute definitions. |
damage_types/ | Damage types such as physical, projectile, and spell. |
conditions/ | Attribute read conditions (PDC read rules). |
lore_formats/ | How attributes are displayed in lore. |
attribute_balance.yml | Attribute balance semantics and power score weights. |
presets/ | Attribute preset definitions. |
gui/ | Attribute points GUI configuration (attribute_points.yml). |
lang/ | Language files (bundled zh_CN.yml and en_US.yml). |
data/ | Runtime data, for example data/parent_attributes/<UUID>.yml. |
Typical workflow
- Define attributes in
attributes/. - Define display formats in
lore_formats/. - Configure damage calculation in
damage_types/. - Let Item / Forge / Strengthen / Gem write attribute payloads.
- Attribute aggregates player stats after equipment changes or resync.
- Combat uses damage type, attacker stats, and target stats to calculate the result.
- Messages, action bars, PlaceholderAPI, or debug output can show the result.
Relations with other modules
| Module | Integration |
|---|---|
| EmakiItem | Items can carry base attributes and set attributes. |
| EmakiForge | Forge results can write extra attributes. |
| EmakiStrengthen | Strengthen stars can add attributes. |
| EmakiGem | Gems can provide attributes. |
| EmakiSkills | Skills can read or consume Attribute resources and check stat requirements. |
| MythicMobs | Can participate in skill or mob combat ecosystems. |
| PlaceholderAPI | Exposes player stats, resources, or combat data. |
Pages
| Page | Content |
|---|---|
| Configuration | Main config, attribute folders, damage folders, condition folders, and troubleshooting order. |
| Attributes | Attribute fields, display formats, and ID design. |
| Scaling Curves | Thresholds, curves, and balancing advice for high stat values. |
| Damage | Multi-stage damage pipeline, hard lock, hit feedback, and recovery config. |
| Conditions | Equipment conditions, attribute conditions, and cross-module conditions. |
| Lore Formats | Lore display templates and read patterns. |
| Commands | /ea commands, lint, preview, dump, source, trace, and debug. |
| Placeholders | PlaceholderAPI output and damage message template variables. |
| MythicMobs | Damage mechanic, temporary attribute mechanics, and attribute condition. |
| CoreLib Actions | Action IDs and parameters registered by Attribute. |
| API | EmakiAttributeApi, PdcAttributeApi, and integration contracts. |
| Events | Public Bukkit events. |
| Damage Event | EmakiAttributeDamageEvent in detail. |
| JavaScript | Script module facade and extension registration API. |
Suggested configuration order
- Start the server with default attributes and confirm the module loads.
- Add or edit one attribute file, then run reload / lint.
- Write that attribute onto one test item.
- Use preview / dump commands to confirm the attribute is read.
- Then configure damage types and combat tests.
Main config.yml fields
| Field | Type | Default | Description |
|---|---|---|---|
language | string | zh_CN | Language file name under lang/. |
release_default_data | boolean | true | Whether bundled sample attributes, damage types, conditions, lore formats, and example scripts are released. |
hard_lock_damage | boolean | true | Global damage hard lock. When true, all matching damage events go through the attribute system. |
default_damage_type | string | physical | Fallback damage type id. |
projectile_damage_type | string | projectile | Damage type used when projectiles hit. |
vanilla_event_damage.enabled | boolean | true | Perfect takeover of vanilla event damage; disabling it uses compatibility synthetic damage mode. |
vanilla_event_damage.damage_type | string | same as default_damage_type | Damage type used for unmapped vanilla damage. |
same_signature_ignores_invulnerability.enabled | boolean | true | Whether same-batch, same-signature hits bypass the vanilla invulnerability window. |
same_signature_ignores_invulnerability.window_ms | long | 500 | Batch window in milliseconds. |
regen_interval_ticks | integer | 20 | Resource regeneration interval in ticks. Minimum 1; 20 ticks = 1 second. |
sync_delay_ticks | integer | 1 | Ticks to wait after an equipment change before syncing. Minimum 0. |
health_display_scaling.enabled | boolean | false | Whether the client health bar is compressed; real health and damage are unaffected. |
health_display_scaling.target | double | 20.0 | Target displayed health on the client. |
synthetic_hit_feedback.knockback | boolean | true | Whether compatibility-mode synthetic damage re-applies knockback. |
synthetic_hit_feedback.knockback_strength | double | 0.4 | Knockback strength. |
synthetic_hit_feedback.hurt_sound | boolean | true | Whether compatibility-mode synthetic damage plays a hurt sound. |
Resource configuration
default_profile.resources defines the player's default resources:
| Field | Type | Default | Description |
|---|---|---|---|
id | string | section key | Resource id such as health or mana; bundled config uses the section key. |
display_name | string | same as id | Display name. |
default_max | double | 0 | Default maximum. |
min_max | double | 0 | Lower bound of the maximum after bonuses. |
max_max | double | very large | Upper bound of the maximum. |
sync_to_bukkit | boolean | false | Whether to sync to vanilla Bukkit health (only needed for the health resource). |
full_on_init | boolean | true | Whether the resource is filled on initialization. |
regen_per_second | double | 0 | Natural regeneration per second. |
Bundled default resources:
health: default max 20, synced to Bukkit, min max 1, max max 2048.mana: default max 100, not synced to Bukkit, min max 0, max max 99999.
Attribute actions
EmakiAttribute registers attribute damage, temporary attribute, resource, tag, and synchronization actions into CoreLib. Full action IDs, parameters, and examples are documented in CoreLib Actions.
Common examples:
actions:
- 'attributedamage amount=50 type=physical'
- 'attribute_add effect_id=forge_buff attribute=physical_attack value=20 duration_ticks=10s'
- 'attribute_resource_consume resource=mana amount=20'
- 'attribute_sync all=false'