Перейти к содержимому
Mineforgian

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

Загрузки
186
Подписчики
2
Обновлён
29 июня 2026 г.
Лицензия
GPL-3.0-only

Опубликован 28 марта 2026 г.

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

Ченджлог

4.4.0Релиз1.21.9, 1.21.10, 1.21.11 · 29 июня 2026 г.

Added

  • Public Bukkit event PlayerResourceConsumeEvent, fired before resource consumption; cancellable, with overridable amount.
  • JavaScript damage extensions: custom damage types and damage pipeline hooks.
  • Script access through emaki.module("attribute").
  • Config precheck on startup and reload.

Fixed

  • Fixed attribute damage being zeroed out for very large values formatted in scientific notation.

Refactored

  • Refactored public API models and the script bridge layer; external behavior unchanged.

Improved

  • Better combat debug output and attribute source diagnostics.
  • Reduced noisy startup and extension logs.

Notes

  • Breaking: MythicMobs bridge legacy parameter aliases removed (damage/operator/value/value_2).
  • Breaking: legacy default damage rule auto-replacement removed.
4.3.0Релиз1.21.9, 1.21.10, 1.21.11 · 16 июня 2026 г.

Added

  • Web Console Attribute diagnostics panel.
  • Attribute contribution traces and damage traces.
  • Clearer PDC attribute API capabilities.
  • JavaScript runtime attributes, contribution providers, and damage hooks.
  • Script access through emaki.module("attribute").

Fixed

  • Fixed /ea debug player trace command handling and tab completion.
  • Fixed unclear diagnostics wording and PDC read-rule output.
  • Fixed default conditions to match the shared condition system.

Refactored

  • Public API facade/Bridge flow.
  • PDC read rule models and script bridge handling.

Improved

  • Better combat debug output and attribute source diagnostics.
  • Cleaner localized Web Console text.
4.2.0Релиз1.21.9, 1.21.10, 1.21.11 · 5 июня 2026 г.

Attribute v4.2.0 makes the attribute system much friendlier to script-based extensions. You can now add runtime attributes, providers, and damage hooks without writing a separate Java plugin.

Highlights

  • JavaScript extensions for runtime attributes, providers, and damage hooks.
  • Damage hook scripts can inspect attacker and target attribute snapshots.
  • Attribute script module access through emaki.module("attribute").

Improved

  • Generic MythicMobs JavaScript mechanics moved to CoreLib.
  • Cleaner localized JavaScript extension logs.
  • Less repeated startup output.
  • CoreLib-managed bStats and runtime dependency handling.

Notes

  • Review custom scripts and prefer emaki.module("attribute").
4.1.0Релиз1.21.9, 1.21.10, 1.21.11 · 2 июня 2026 г.

EmakiAttribute v4.1.0

Vanilla damage takeover, combat debug system, scaling curves, and attribute contribution API.


✨ New Features

Vanilla Damage Takeover

A new configuration option lets you control whether EmakiAttribute fully takes over vanilla damage calculation, giving you complete control over how damage is computed in your server.

Perfect Takeover Coordinator

A new coordination mechanism ensures smooth integration between EmakiAttribute's damage calculation and vanilla Minecraft damage events, preventing conflicts and double-calculations.

Combat Debug System

A new combat debug handler and listener allow server admins to trace damage calculations step by step — invaluable for debugging complex combat mechanics and ensuring everything works as expected.

Damage Calculation Cache

A new caching service reduces redundant damage calculations, improving combat performance especially in high-frequency combat scenarios.

Scaling Curve Configuration

Customizable attribute scaling curves allow you to define how attribute values grow — linear, exponential, logarithmic, or any custom curve you need for balanced stat progression.

Attribute Contribution API

A new API interface allows other plugins to register custom attribute sources, enabling cross-plugin attribute bonuses and integrations.

Web Console Integration

EmakiAttribute is now accessible through the built-in Web management console, allowing you to edit attribute configurations and damage types directly in your browser.

♻️ Improvements

  • The damage handling system has been refactored, splitting the original monolithic listener into a dedicated combat damage listener for cleaner, more maintainable code.
  • Lore format templates have been updated and optimized.
  • The attribute snapshot collector has been optimized for better performance.
  • The attribute API has been extracted to a separate module for cross-plugin reference.
  • Language files have been significantly expanded with new translations.
4.0.0Релиз1.21.9, 1.21.10, 1.21.11 · 11 мая 2026 г.

EmakiAttribute 4.0.0 Release

This release adds skill-based damage integration, enhanced damage messages, and PAPI placeholder expansion, while unifying condition expression syntax.

New Features

  • EmakiSkills Damage Integration: When EmakiSkills is installed, skill scripts can use attribute_damage to trigger the full attribute damage pipeline (attribute bonuses, crits, penetration, dodge, damage messages, etc.) with configurable damage type, target, and element tag.
  • Enhanced Damage Messages: New placeholders in damage message templates: {attacker_health}, {attacker_max_health}, {target_health}, {target_max_health}, {distance}.
  • PAPI Resource Regen Placeholder: %emakiattribute_resource_<id>_regen% returns per-second regeneration rate for HUD/scoreboard display.
  • Damage API: Other plugins can invoke the attribute damage pipeline via EmakiAttributeBridge.applyDamage().

Improvements

  • Config and language files auto-merge new keys on upgrade.
  • All attribute definition files and condition files now include detailed field comments.
  • Console log messages streamlined for cleaner startup/shutdown output.

Breaking Changes

  • Condition expression syntax changed from %value% to {value} (e.g., %player_name%{player_name}). Custom condition files must be updated manually.

Upgrade Notes

  • Default condition files are auto-updated; custom condition files need manual syntax migration (%var%{var}).
  • Config version updated to 4.0.0 — structure remains compatible, new entries are auto-merged.

View Full Documentation | Join Discord Community | QQ Group

3.5.0Релиз1.21.9, 1.21.10, 1.21.11 · 4 мая 2026 г.

EmakiAttribute 3.5.0 Release

This release improves player runtime state cleanup and adds default EmakiItem condition support.

  • Player kick events now clean combat/runtime caches like normal quit events.
  • Added default conditions/emakiitem.yml for item-based attribute conditions.
  • Improved cache hygiene for cooldowns, synthetic damage markers, and damage type overrides.
  • Synchronized plugin, config, and language versions to 3.5.0.

Upgrade Notes

  • Review conditions/emakiitem.yml if you use EmakiItem integration.
  • Existing permission nodes and attribute configs remain compatible.

View Full Documentation | Join Discord Community | QQ Group

3.4.0Релиз1.21.9, 1.21.10, 1.21.11 · 28 апреля 2026 г.

EmakiAttribute 3.4.0 Dev Update

This dev update includes the weight → score terminology rename, PDC attribute API service registration, and permission centralization.

  • weight → score rename: AttributeBalanceRegistry fields renamed from weights to scores; weightOfscoreOf.
  • PDC attribute API as service: EmakiAttribute now registers PdcAttributeApi via Bukkit ServicesManager, removing reflection.
  • Centralized permissions: added AttributePermissions for admin, reload, resync, and debug nodes.
  • Cleaner command checks: admin command handlers now use shared constants.
  • Entity state cleanup: player quit and kick events clear runtime state for that player.
  • PDC cache guard: regex compilation cache now has a fixed limit.
  • Language fallback improvements: language loading supports non-string values and merges missing fallback entries.

Upgrade Notes

  • Update code references from weightOf/weights to scoreOf/scores.
  • attribute_balance.yml structure has changed.
  • Existing permission plugin configs should continue working.

View Full Documentation | Join Discord Community | QQ Group

3.3.0Релиз1.21.9, 1.21.10, 1.21.11 · 25 апреля 2026 г.

EmakiAttribute 3.3.0

EmakiAttribute 3.3.0 adds timed temporary attributes and makes PDC attribute reads more useful in real server conditions. Skills, rewards, events, or other action-driven systems can now add, set, or remove temporary attribute effects, while player snapshots automatically account for those effects until they expire.

  • Temporary attribute actions: attribute_add, attribute_set, and attribute_remove can be called from CoreLib action chains.
  • Automatic cleanup and recalculation: temporary effects expire on their own and invalidate affected player snapshots when necessary.
  • Placeholder-aware PDC reads: condition text can resolve player context values and PlaceholderAPI output when available.
  • Better balance metadata: attribute_balance.yml can define semantic groups, roles, summaries, and weights for attributes.
  • Combat-path cleanup: damage caching, resource handling, snapshot collection, and error paths were refined for maintainability and performance.
  • Unified version fields: default resources now use the current version key style.

Upgrade Notes

  • Use Java 25.
  • Migrate custom version fields to version.
  • Only call temporary attribute actions where a player context exists.
  • Keep custom resources on the current non-EA-prefixed attribute names.

View Full Documentation | Join Discord Community | QQ Group

Комментарии

Загружаем…