Skip to content

Lore Formats

Lore format files are stored in lore_formats/*.yml. They define how attributes are rendered in item lore and how existing lore lines can be parsed back into attribute values.

Fields

FieldTypeDefaultDescription
idstringFormat id referenced by lore_format_id in attribute definitions.
formatstring%sign%%value% %name%Display template.
precisioninteger2Decimal precision.
read_priorityinteger0Higher priority patterns are tried first.
read_patternslist[]Regex patterns used to parse values from lore.

read_patterns also accepts aliases: read_pattern, lore_patterns, and lore_pattern.

Template variables

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

Built-in formats

FileIDUse case
default_flat.ymldefault_flatFlat numeric attributes.
default_percent.ymldefault_percentPercent attributes.
default_regen.ymldefault_regenRegeneration attributes.
default_resource.ymldefault_resourceResource attributes.

Example

yaml
id: custom_percent
format: "%name%: %sign%%value%%"
precision: 1
read_patterns:
  - '(.+): ([+-]?\d+\.?\d*)%'

Reference it from an attribute definition:

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