Skip to content

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

ItemValue
Module version4.6.3
Main command/emakiattribute
Aliases/eattribute, /ea
Hard dependencyEmakiCoreLib
Soft dependenciesMythicMobs, PlaceholderAPI, MMOItems
Default permissionsemakiattribute.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

text
plugins/EmakiAttribute/
├── config.yml
├── attribute_balance.yml
├── attributes/
├── conditions/
├── damage_types/
├── lore_formats/
├── presets/
├── gui/
├── lang/
└── data/
PathPurpose
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.ymlAttribute 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

  1. Define attributes in attributes/.
  2. Define display formats in lore_formats/.
  3. Configure damage calculation in damage_types/.
  4. Let Item / Forge / Strengthen / Gem write attribute payloads.
  5. Attribute aggregates player stats after equipment changes or resync.
  6. Combat uses damage type, attacker stats, and target stats to calculate the result.
  7. Messages, action bars, PlaceholderAPI, or debug output can show the result.

Relations with other modules

ModuleIntegration
EmakiItemItems can carry base attributes and set attributes.
EmakiForgeForge results can write extra attributes.
EmakiStrengthenStrengthen stars can add attributes.
EmakiGemGems can provide attributes.
EmakiSkillsSkills can read or consume Attribute resources and check stat requirements.
MythicMobsCan participate in skill or mob combat ecosystems.
PlaceholderAPIExposes player stats, resources, or combat data.

Pages

PageContent
ConfigurationMain config, attribute folders, damage folders, condition folders, and troubleshooting order.
AttributesAttribute fields, display formats, and ID design.
Scaling CurvesThresholds, curves, and balancing advice for high stat values.
DamageMulti-stage damage pipeline, hard lock, hit feedback, and recovery config.
ConditionsEquipment conditions, attribute conditions, and cross-module conditions.
Lore FormatsLore display templates and read patterns.
Commands/ea commands, lint, preview, dump, source, trace, and debug.
PlaceholdersPlaceholderAPI output and damage message template variables.
MythicMobsDamage mechanic, temporary attribute mechanics, and attribute condition.
CoreLib ActionsAction IDs and parameters registered by Attribute.
APIEmakiAttributeApi, PdcAttributeApi, and integration contracts.
EventsPublic Bukkit events.
Damage EventEmakiAttributeDamageEvent in detail.
JavaScriptScript module facade and extension registration API.

Suggested configuration order

  1. Start the server with default attributes and confirm the module loads.
  2. Add or edit one attribute file, then run reload / lint.
  3. Write that attribute onto one test item.
  4. Use preview / dump commands to confirm the attribute is read.
  5. Then configure damage types and combat tests.

Main config.yml fields

FieldTypeDefaultDescription
languagestringzh_CNLanguage file name under lang/.
release_default_databooleantrueWhether bundled sample attributes, damage types, conditions, lore formats, and example scripts are released.
hard_lock_damagebooleantrueGlobal damage hard lock. When true, all matching damage events go through the attribute system.
default_damage_typestringphysicalFallback damage type id.
projectile_damage_typestringprojectileDamage type used when projectiles hit.
vanilla_event_damage.enabledbooleantruePerfect takeover of vanilla event damage; disabling it uses compatibility synthetic damage mode.
vanilla_event_damage.damage_typestringsame as default_damage_typeDamage type used for unmapped vanilla damage.
same_signature_ignores_invulnerability.enabledbooleantrueWhether same-batch, same-signature hits bypass the vanilla invulnerability window.
same_signature_ignores_invulnerability.window_mslong500Batch window in milliseconds.
regen_interval_ticksinteger20Resource regeneration interval in ticks. Minimum 1; 20 ticks = 1 second.
sync_delay_ticksinteger1Ticks to wait after an equipment change before syncing. Minimum 0.
health_display_scaling.enabledbooleanfalseWhether the client health bar is compressed; real health and damage are unaffected.
health_display_scaling.targetdouble20.0Target displayed health on the client.
synthetic_hit_feedback.knockbackbooleantrueWhether compatibility-mode synthetic damage re-applies knockback.
synthetic_hit_feedback.knockback_strengthdouble0.4Knockback strength.
synthetic_hit_feedback.hurt_soundbooleantrueWhether compatibility-mode synthetic damage plays a hurt sound.

Resource configuration

default_profile.resources defines the player's default resources:

FieldTypeDefaultDescription
idstringsection keyResource id such as health or mana; bundled config uses the section key.
display_namestringsame as idDisplay name.
default_maxdouble0Default maximum.
min_maxdouble0Lower bound of the maximum after bonuses.
max_maxdoublevery largeUpper bound of the maximum.
sync_to_bukkitbooleanfalseWhether to sync to vanilla Bukkit health (only needed for the health resource).
full_on_initbooleantrueWhether the resource is filled on initialization.
regen_per_seconddouble0Natural 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:

yaml
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'