Skip to content

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

FieldDescription
idUnique attribute id used by other modules.
display_nameDisplay name and lore matching key. Defaults to id.
value_kindValue style, such as FLAT, PERCENT, CHANCE, REGEN, RESOURCE, or DERIVED.
target_typeTarget system, such as GENERIC, DAMAGE, RESOURCE, or VANILLA.
target_idDamage type id, resource id, or vanilla attribute id depending on target_type.
mmoitems_statMMOItems stat id mapping, used to bridge attribute reads when MMOItems is installed.
default_valueDefault base value.
min_value / max_valueOptional clamps.
allow_negativeWhether negative values are allowed.
priorityLore parsing priority. Higher values match earlier.
lore_format_idLinked lore format definition.
lore_pattern / lore_patternsRegex patterns used for lore parsing.
attribute_powerWeight used when calculating total power.
tagsOptional 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_modeStack 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_attributeWhether 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_bonusesMap of child attribute contributions per allocated parent point. Child targets must exist and must not be parent attributes.
descriptionDescription 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.

yaml
id: strength
display_name: '<red>Strength'
value_kind: FLAT
parent_attribute: true
child_bonuses:
  physical_attack: 2.0
  max_health_bonus: 5.0

Parent 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

ValueDescription
FLATFixed additive value.
PERCENTPercentage value. Lore parsing handles % suffixes.
CHANCEChance-like percentage value.
REGENRegeneration rate.
RESOURCEResource capacity contribution.
DERIVEDDerived attribute calculated from other values.

Target types

ValueDescription
GENERICGeneral-purpose attribute.
DAMAGEParticipates in a damage_types/*.yml damage pipeline.
RESOURCEAffects resource maximums or recovery.
VANILLASyncs 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:

yaml
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 PERCENT and CHANCE attributes. Keep one consistent scale across the system; do not mix 0.15 and 15 for 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:

VariableExpands 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 IDPriority
default_percent100
default_regen80
default_resource60
default_flat50

Higher priority formats are matched first when several formats could match the same lore line.