Lore Configuration

Declare the readable entries an Almanac milestone's lore reward unlocks, with the heading and body each one shows.

A lore entry is a piece of opt-in reading a player unlocks through the Almanac: a heading and a body of text, opened from the Almanac’s Lore chapter. It is what a milestone paying the lore reward family grants.

Lore is reading, never power. An entry carries no stat, item or gate, which is what lets it be granted by a milestone and kept in the player’s own profile rather than on the server.


File Location

lore-config.yaml, at the root of a mod, declared in the mod manifest:

# <ModName>.yaml
lore-config:

Only the client loads this file. A lore entry is read by the player who earned it, on their own screen; the server never shows it to anyone else and has nothing to validate.


Fields

Each entry under the top-level entries: key is one lore entry.

FieldTypeRequiredDescription
idstringyesStable identifier, namespaced to the declaring mod. A milestone’s reward names this, and a player’s profile records it, so renaming it drops the grant.
titlestringnoThe heading shown on the entry’s Almanac row and above its body. Omitted, the entry renders as its title-cased id. Translatable by id — see Localization.
bodystringyesThe text read when the entry is opened. Wrapped to the Almanac page; a blank line in the YAML block starts a new paragraph. Must not be empty.

Entry order is the order the Lore chapter lists entries in.


Granting an entry

Declaring an entry says it exists, never that anyone has it. The grant comes from the milestone table:

# almanac-milestones-config.yaml
milestones:
  - id: some_milestone
    name: TODO_NAME
    chapter: discoveries
    metric: event
    reward:
      family: lore
      id: some_entry     # must match an `entries:` item's id

See almanac-milestones-config.md for the milestone side. The ids must agree: a granted id with no entry here reads as nothing.

A grant is recorded in the player’s per-user profile, so an entry stays readable across saves and seeds.


Reading one

The Almanac’s Lore chapter lists the whole catalog. An entry the player has no grant for shows as ???; an earned one shows its heading. Clicking an earned row replaces the page with that entry’s heading and body, and clicking anywhere on the page returns to the chapter list. Closing the Almanac also returns to the list.

The chapter appears only when at least one loaded mod declares a lore entry.


Localization

Both strings resolve through the mod’s lang/<locale>.yaml, keyed by the entry’s id:

  • the heading by the id itself (some_entry), and
  • the body by the id with .body appended (some_entry.body).

A locale with no override for either reads the title / body from this file.


Load errors

A malformed entry is skipped with an error rather than failing the mod. An entry is refused when it:

  • declares an empty id,
  • declares an id in another mod’s namespace,
  • reuses an id an earlier entry already declared, or
  • has an empty body.

An empty title is not an error; it reads the same as an omitted one.


Example

entries:
  - id: some_entry
    title: TODO_NAME
    body: |
      TODO_TEXT

      TODO_TEXT

Last updated