EmakiAttribute | RPG Attribute, Resource & Damage Engine
PluginGPL-3.0-only

EmakiAttribute | RPG Attribute, Resource & Damage Engine

A configurable RPG combat core: 50+ ready-made attributes across physical / projectile / spell / crit / penetration / lifesteal / resource lines, multi-stage damage pipelines, vanilla damage takeover, resource pools, scaling curves, lore formats, condition

162
Downloads
2
Followers
Yesterday
Updated
📦
18
Versions

📖About EmakiAttribute | RPG Attribute, Resource & Damage Engine

EmakiAttribute is the stat and combat backbone of the Emaki series. It defines attributes, damage types and conditions, writes equipment stats into a PDC payload instead of relying on lore parsing, and aggregates the attributes written by every module (Item, Forge, Strengthen, Gem, Skills, Level) into the real values that drive combat. Damage is not a single fixed formula — it runs through ordered, fully configurable stages, so you decide exactly how attack, defense, crit, penetration and recovery interact.

Every attribute is its own YAML file, so adding a new stat is as simple as copying and editing one file. Display text and real combat power stay in sync because attributes are read from structured PDC payloads, and scaling curves keep late-game numbers from spiraling out of control.

attack

Key Highlights

  • 50+ ready-made attributes — Physical, projectile and spell lines each ship a full set: attack, defense, crit rate, crit damage, crit evasion, crit resistance, damage bonus and penetration. Plus lifesteal (and lifesteal resistance), regen, dodge, movement/attack speed, entity scale, interaction ranges, real (true) damage and a combat-power weight. Add your own by copying one file.
  • Damage is a configurable pipeline, not a fixed formula — Each damage type is an ordered list of stages (base attack → crit → defense reduction → penetration → post-hit recovery), and every stage reads attributes from attacker, target or context with its own min/max clamps.
  • Two vanilla damage takeover modes — Perfect takeover (default) rewrites the final damage in place without cancelling the event, preserving vanilla side effects (knockback, shields, thorns, absorption, death stats). Compatibility mode cancels and replays for special combat plugins.
  • Resource system — Health, mana and custom resources with configurable caps, per-second regen, Bukkit sync and full-on-init, output anywhere through PlaceholderAPI.
  • Anti-inflation scaling curves — Logarithmic, square-root and piecewise-linear curves fold the portion of a stat above a threshold, so crit rate, defense and resource caps stay balanced at high values.
  • Six value kinds and four target types — FLAT, PERCENT, CHANCE, REGEN, RESOURCE and DERIVED values; GENERIC, DAMAGE, RESOURCE and VANILLA targets (VANILLA stats sync straight to Minecraft attributes like movement speed and scale).
  • Range-roll attribute rolls — Write a stat as a range (e.g. 10-20, 5%-12%) for randomized weapon affixes, with the rolled value written into the PDC snapshot.
  • Deep MythicMobs integration — A damage mechanic, an attribute/resource condition, and per-mob attribute blocks that resync automatically on spawn and reload.

Feature Overview

Attribute system

  • Every attribute is an independent YAML file with id, display name, value kind, target type, default/min/max, negativity, priority, lore format, combat-power weight and description.
  • Physical line: attack, defense, crit rate, crit damage, crit evasion, crit-multiplier resistance, damage bonus, armor penetration.
  • Projectile line: a complete, independent set for bows/tridents (attack, defense, crit rate/damage/evasion/resistance, damage bonus, penetration).
  • Spell line: attack, defense, crit rate, crit damage, damage bonus, magic penetration, magic crit evasion, magic crit-multiplier resistance.
  • Lifesteal/recovery: percentage lifesteal, lifesteal resistance (for anti-lifesteal counterplay), health regen, mana regen.
  • Survival/mobility: dodge chance, movement speed, speed, attack speed, plus vanilla-mapped variants.
  • Interaction/scale: entity scale (maps vanilla SCALE), entity and block interaction ranges.
  • Real damage that bypasses normal reductions, and a combat-power weight that auto-aggregates into a total power score.

Six value kinds

  • FLAT (flat value), PERCENT (auto-handles the % suffix), CHANCE (probability), REGEN (per-second/tick regen), RESOURCE (resource cap bonus), DERIVED (computed from other attributes, e.g. effective health or combined power).

Four target types

  • GENERIC for general attributes read by conditions/display/other modules.
  • DAMAGE feeding the damage pipeline (target id points to a damage type).
  • RESOURCE affecting resource caps/regen.
  • VANILLA mapping to a Minecraft attribute (e.g. movement speed, scale), auto-synced to Bukkit on change.

Multi-stage damage pipeline

  • Default damage types: physical (melee), projectile and spell, each independently configuring attack/defense/crit/penetration/recovery.
  • Each type is an ordered list of stages; each stage has a kind (standard FLAT_PERCENT or CUSTOM expression), a source (attacker/target/context), a mode (add/subtract), flat/percent/chance/multiplier attribute lists, and min/max clamps on result, chance and multiplier.
  • A recovery block handles post-hit lifesteal with resistance attributes, custom expressions and clamps.
  • Separate attacker and target combat messages, with aliases for legacy config compatibility.

attribute

Vanilla damage takeover

  • Perfect takeover (default, vanilla_event_damage.enabled: true): does not cancel the vanilla event, resolves EA damage synchronously and rewrites the final value in place, preserving vanilla side effects — burning zombies, iron-golem knockback, shield blocking, absorption hearts, thorns, death statistics.
  • Compatibility mode (false): the legacy approach that cancels and replays, for integrating with special combat plugins.
  • hard_lock per damage type can fully take over matching vanilla events; a global hard-lock controls whether non-whitelisted damage also runs through the attribute system.
  • An event whitelist (ENTITY_ATTACK / PROJECTILE / SWEEP, etc.) and a damage-cause map (FALL, LAVA, etc. → a damage type with base damage).
  • Synthetic hit feedback in compatibility mode re-adds knockback and hurt sounds so reactions feel close to vanilla.

Resource system

  • Default resources: health (max 20, synced to Bukkit) and mana (max 100, not synced), each with configurable default/min/max caps.
  • Per-resource sync-to-Bukkit, full-on-init, and per-second regen, with a global regen interval and a post-equip sync delay.

Scaling curves (anti-inflation)

  • Beyond a threshold, the excess is folded by a curve: logarithmic (smooth, for main output/defense), square-root (stronger compression, for tankiness/resource caps), piecewise-linear (proportional retention, for probability stats such as keeping only part of crit rate above 80).
  • Each rule configures attribute, threshold and factor.

Lore format system

  • Four default formats: flat, percent, regen (per-second) and resource, each with a template, precision, read priority and parse patterns.
  • Template variables for name, sign and value; built-in read priority (percent > regen > resource > flat).
  • Can parse attributes from existing item lore via regex (for legacy/external items), though new setups are recommended to use PDC.

Condition system

  • Condition groups combine with all-of / any-of / at-least / exactly / none-of.
  • Entry types: PDC meta check, lore regex (with capture groups), PDC attribute check and source id check.
  • Expression variables include the matched value, capture groups, source meta/attribute, source id, player name and player level, plus all PlaceholderAPI placeholders when PAPI is installed.
  • Default condition files for strengthen, forge (required-level check), emakiitem, gem bind and equipment level — usable for equip limits, recipe limits and skill gates across modules.

Actions, API and events

  • Registers four actions into CoreLib: apply attribute damage, add a timed attribute bonus, set a timed attribute value, and remove a timed effect.
  • A PDC attribute API with source isolation: each module registers its own source and writes/reads/clears only its own data, validated before write.
  • A cancellable damage event fired before damage is applied (main thread), exposing attacker/target/projectile, damage type, base/final damage, crit state, crit roll, damage cause and per-stage values, with setFinalDamage to adjust the result.

item tooltip

MythicMobs integration

  • A damage mechanic (emaki_damage, with aliases) deals attribute-system damage with configurable crit, dodge, defense and on-damaged trigger flags.
  • An attribute/resource condition (emaki_attribute, with aliases) checks an entity's attribute or resource value with comparison operators.
  • Per-mob attribute blocks support math expressions and auto-sync on spawn and after reload.

JavaScript scripting

  • emaki.module("attribute") exposes source registration, read/readAll/write/clear and damage hooks.
  • Scripts can register attributes and providers at runtime and hook damage to read both sides' snapshots, multiply damage, set meta or cancel.
  • A sample script (fire mastery) ships as a no-op so it never affects a live server by default.

PlaceholderAPI

  • Attribute values: %emakiattribute_<attribute_id>% (up to 2 decimals, 0 if absent).
  • Combat power: %emakiattribute_power%.
  • Resources: %emakiattribute_resource_<id>_<field>% with fields current/max/default/bonus/percent/regen.
  • All placeholders are color-free for direct numeric comparison in scoreboards, chat, menus and holograms.

Commands

Command Description
/ea reload Reload configuration
/ea resync [player|all] Resynchronize attribute state
/ea preview [player] [slot] Preview a given equipment slot's attribute contribution
/ea dump [player] Dump full attribute/resource debug
/ea debug [player] [toggle|on|off] Toggle combat debug
/ea lint Check config references, attribute ids, formats and conditions

Main command /emakiattribute, aliases /eattribute, /ea.

Permissions

  • emakiattribute.use — basic usage (default: true)
  • emakiattribute.reload — reload configuration (default: op)
  • emakiattribute.resync — resync attribute state (default: op)
  • emakiattribute.debug — combat/debug commands (default: op)
  • emakiattribute.admin — administrative commands (default: op)

PlaceholderAPI

Expansion identifier emakiattribute:

  • %emakiattribute_<attribute_id>% — any attribute's current value
  • %emakiattribute_power% — total combat power
  • %emakiattribute_resource_<id>_current% / _max% / _default% / _bonus% / _percent% / _regen% — resource fields

Compatibility & Dependencies

Item Details
Java 25
Bukkit API 1.21
Server Spigot / Paper and downstream forks
Folia Supported
Required EmakiCoreLib
Optional MythicMobs, PlaceholderAPI, MMOItems

Installation & Quick Start

  1. Install EmakiCoreLib.jar first (required dependency).
  2. Place EmakiAttribute.jar into plugins/.
  3. Start the server to generate the default attributes, damage types, lore formats and conditions.
  4. Adjust attributes / damage pipelines / resources / scaling curves, then /ea reload and /ea lint to verify.

Links