Attribute Definitions
Attribute files are stored under attributes/*.yml. Each file usually defines one attribute, including how the value is identified, clamped, displayed, parsed, and used by combat or other modules.
Important fields
| Field | Description |
|---|---|
id | Unique attribute id used by other modules. |
display_name | Display name and lore matching key. Defaults to id. |
value_kind | Value style, such as FLAT, PERCENT, CHANCE, REGEN, RESOURCE, or DERIVED. |
target_type | Target system, such as GENERIC, DAMAGE, RESOURCE, or VANILLA. |
target_id | Damage type id, resource id, or vanilla attribute id depending on target_type. |
mmoitems_stat | MMOItems stat id mapping, used to bridge attribute reads when MMOItems is installed. |
default_value | Default base value. |
min_value / max_value | Optional clamps. |
allow_negative | Whether negative values are allowed. |
priority | Lore parsing priority. Higher values match earlier. |
lore_format_id | Linked lore format definition. |
lore_pattern / lore_patterns | Regex patterns used for lore parsing. |
attribute_power | Weight used when calculating total power. |
tags | Optional attribute tags (e.g. DEBUFF). Used by the MythicMobs emaki_attribute_add_tag / emaki_attribute_clear_tag mechanics to add or clear temporary attributes in bulk. Case-insensitive. |
temporary_stack_mode | Stack behavior when the same temporary attribute (same effect_id) is applied again: REPLACE (default) overwrites, STACK adds value and remaining duration. A skill-provided stack_mode overrides this. |
parent_attribute | Whether this definition is a parent attribute used by the attribute-points system. Parent attributes may also enter item snapshots from lore or EA attribute PDC and expand child_bonuses. |
child_bonuses | Map of child attribute contributions per allocated parent point. Child targets must exist and must not be parent attributes. |
description | Description text (string or list) usable in GUIs or help output. |
Parent attributes and attribute points
Parent attributes power the attribute-points system. A player allocates available points into attributes marked with parent_attribute: true; the allocated point count contributes to the parent attribute itself and each child_bonuses entry contributes additional child-attribute values per point. Player data is stored under data/parent_attributes/<UUID>.yml with available_points, reset_points, and allocations.
id: strength
display_name: '<red>Strength'
value_kind: FLAT
parent_attribute: true
child_bonuses:
physical_attack: 2.0
max_health_bonus: 5.0Parent attributes appear in traces and final snapshots and can be read like normal numeric attributes from item lore or the ea_attribute.ea_attributes PDC. An item parent value keeps its own ID and also contributes to each child attribute ID through child_bonuses. The same parent attribute from lore and PDC is added first, then expanded. The runtime has no fixed parent or child IDs and creates no fallback parent attribute when definitions are absent; every relationship comes from the currently loaded attribute YAML. EmakiItem variables remain text placeholders only and do not automatically become EA attributes. If child_bonuses points to a missing attribute or another parent attribute, /ea lint reports the configuration issue.
Value kinds
| Value | Description |
|---|---|
FLAT | Fixed additive value. |
PERCENT | Percentage value. Lore parsing handles % suffixes. |
CHANCE | Chance-like percentage value. |
REGEN | Regeneration rate. |
RESOURCE | Resource capacity contribution. |
DERIVED | Derived attribute calculated from other values. |
Target types
| Value | Description |
|---|---|
GENERIC | General-purpose attribute. |
DAMAGE | Participates in a damage_types/*.yml damage pipeline. |
RESOURCE | Affects resource maximums or recovery. |
VANILLA | Syncs to a vanilla Minecraft/Bukkit attribute. |
Ranged random values
Current Attribute parsing supports ranged contributions. A range keeps the minimum, maximum, and resolved actual value in the snapshot contribution, which is useful for random attack rolls or random percentage bonuses.
Example:
ea_attributes:
physical_attack: "10-20"
physical_crit_rate: "5%-12%"Guidelines:
- Numeric ranges are suitable for attack, defense, and resource-capacity attributes.
- Percentage ranges are suitable for
PERCENTandCHANCEattributes. Keep one consistent scale across the system; do not mix0.15and15for the same meaning. - Debug output should inspect the min, max, and actual resolved value when a contribution comes from a range.
- New equipment systems should still prefer PDC payloads over lore-only parsing.
Lore parsing
lore_pattern and lore_patterns can use these variables:
| Variable | Expands to |
|---|---|
%Key% / %key% | Escaped display_name. |
%Value% / %value% | Numeric capture group. |
Lore parsing is mainly for compatibility with old or external items. For new Emaki item flows, prefer explicit PDC payloads from EmakiItem, Forge, Strengthen, or Gem. Text parsing is sensitive to colors, language, and formatting, can be altered by players or other plugins, and may mis-match similar lines.
Built-in lore format priority
| Format ID | Priority |
|---|---|
default_percent | 100 |
default_regen | 80 |
default_resource | 60 |
default_flat | 50 |
Higher priority formats are matched first when several formats could match the same lore line.