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. |
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. |
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:
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
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.