English
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
| Field | Type | Default | Description |
|---|---|---|---|
id | string | — | Format id referenced by lore_format_id in attribute definitions. A file without it is not loaded |
format | string | %sign%%value% %name% | Display template |
precision | integer | 2 | Decimal precision |
read_priority | integer | see below | Higher priority patterns are tried first |
read_patterns | list | [] | 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
| Variable | Description |
|---|---|
%name% | Attribute display name |
%sign% | + or - |
%value% | Formatted attribute value |
Built-in formats
| File | ID | format | precision | read_priority | Use case |
|---|---|---|---|---|---|
default_percent.yml | default_percent | %name% %sign%%value%% | 2 | 100 | Percent attributes |
default_regen.yml | default_regen | %name% %sign%%value%/秒 | 1 | 80 | Regeneration attributes |
default_resource.yml | default_resource | %name% %sign%%value% | 2 | 60 | Resource attributes |
default_flat.yml | default_flat | %name% %sign%%value% | 2 | 50 | Flat 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