Skip to content

Lore Formats ​

Lore format files live in lore_formats/*.yml; each one defines how attributes render in item lore and how existing lore lines parse back into attribute values

Fields ​

FieldTypeDefaultDescription
idstring—Format id referenced by lore_format_id in attribute definitions. A file without it is not loaded
formatstring%sign%%value% %name%Display template
precisioninteger2Decimal precision
read_priorityintegersee belowHigher priority patterns are tried first
read_patternslist[]Patterns used to parse values from lore

read_patterns also accepts aliases: read_pattern, lore_patterns, and lore_pattern

When read_priority is omitted, the four built-in format ids fall back to their own defaults (default_percent 100, default_regen 80, default_resource 60, default_flat 50); any other id defaults to 0

Template variables ​

VariableDescription
%name%Attribute display name
%sign%+ or -
%value%Formatted attribute value

Built-in formats ​

FileIDformatprecisionread_priorityUse case
default_percent.ymldefault_percent%name% %sign%%value%%2100Percent attributes
default_regen.ymldefault_regen%name% %sign%%value%/秒180Regeneration attributes
default_resource.ymldefault_resource%name% %sign%%value%260Resource attributes
default_flat.ymldefault_flat%name% %sign%%value%250Flat numeric attributes

The bundled read_patterns use the %Key% / %Value% template variables rather than raw regex, for example default_flat uses "%Key%.*?: ?%Value%$". %Value% accepts both single values and ranges such as 1-5 or 1~5

Note that the four bundled formats do not use the same separator. default_flat and default_percent accept only the half-width colon (: ?), default_regen additionally requires the /秒 suffix, while default_resource uses the character class [::] ? so it accepts both the half-width and the full-width colon. Pick the form that matches the punctuation in your target lore; when full-width colons must also match, use a character class like default_resource

Example ​

yaml
id: custom_percent
format: "%name%: %sign%%value%%"
precision: 1
read_patterns:
  - '%Key%.*?: ?%Value%%$'

Reference the format from an attribute definition with lore_format_id:

yaml
id: physical_attack
display_name: "Physical Attack"
lore_format_id: default_flat