[GH-ISSUE #5942] Let a game Experience pass player-selected lorebook entries into the experience-generation call #3285

Closed
opened 2026-10-21 06:01:41 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @kolacheee on GitHub (Sep 8, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5942

Originally assigned to: @kolacheee on GitHub.

Engine half of a Pixelforge feature ruled in by the maintainer: when a player sets up a generated world, they should be able to pick specific lorebook entries to inform the world-writing call — the GM should know about places like the other settlements in an attached lorebook so it can name and detail new settlements consistently with the lore (and never by sending a whole book unselected).

Scope of the Engine change (deliberately minimal; the picker UI lives in the Pixelforge package):

  • experienceGenerationSchema gains lorebookEntryIds — z.array(z.string()).max(LIMITS.MAX_LOREBOOK_ENTRIES).optional(). Absent or empty is a byte-identical no-op for every existing caller (headline regression property).
  • The experience-generation handler gains a processLorebooks call modeled on /setup's block: macro context, scope exclusions, the three-part worldInfo join appended to the outbound content, with the selection passed as forcedEntryIds.
  • The contract when a selection is present: exactly the ticked entries (after enabled/timing/character-filter eligibility) reach the call — no ambient global/constant additions; this route is not a chat turn.
  • An explicitly ticked entry bypasses the probability roll (a selection that can dice-roll away is not a selection) via a scoped ignoreProbability ScanOptions flag read only in the forced-entry gate — every existing caller byte-identical.
  • The forced-entry location budget is sized by the caller through the existing defaulted tokenBudget parameter; drops follow the existing selection order (constants first, then book position) at whole-entry granularity, and the skipped entries are reported back so the package can tell the player what was omitted.

Branch in progress: feat/experience-lore-entries.

Originally created by @kolacheee on GitHub (Sep 8, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5942 Originally assigned to: @kolacheee on GitHub. Engine half of a Pixelforge feature ruled in by the maintainer: when a player sets up a generated world, they should be able to pick **specific lorebook entries** to inform the world-writing call — the GM should know about places like the other settlements in an attached lorebook so it can name and detail new settlements consistently with the lore (and never by sending a whole book unselected). Scope of the Engine change (deliberately minimal; the picker UI lives in the Pixelforge package): - `experienceGenerationSchema` gains `lorebookEntryIds` — `z.array(z.string()).max(LIMITS.MAX_LOREBOOK_ENTRIES).optional()`. Absent or empty is a **byte-identical no-op** for every existing caller (headline regression property). - The experience-generation handler gains a `processLorebooks` call modeled on `/setup`'s block: macro context, scope exclusions, the three-part worldInfo join appended to the outbound content, with the selection passed as `forcedEntryIds`. - The contract when a selection is present: **exactly the ticked entries** (after enabled/timing/character-filter eligibility) reach the call — no ambient global/constant additions; this route is not a chat turn. - An explicitly ticked entry **bypasses the probability roll** (a selection that can dice-roll away is not a selection) via a scoped `ignoreProbability` ScanOptions flag read only in the forced-entry gate — every existing caller byte-identical. - The forced-entry location budget is sized by the caller through the existing defaulted `tokenBudget` parameter; drops follow the existing selection order (constants first, then book position) at whole-entry granularity, and the skipped entries are reported back so the package can tell the player what was omitted. Branch in progress: `feat/experience-lore-entries`.
bsakaguchi 2026-10-21 06:01:41 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Sep 8, 2026):

Maintainer follow-up: @SpicyMarinara (Codex) is updating the existing @kolacheee PR #5944 against staging and checking its regression/review gates. Work remains on that PR; no duplicate implementation PR is being opened.

<!-- gh-comment-id:5581942261 --> @SpicyMarinara commented on GitHub (Sep 8, 2026): Maintainer follow-up: @SpicyMarinara (Codex) is updating the existing @kolacheee PR #5944 against staging and checking its regression/review gates. Work remains on that PR; no duplicate implementation PR is being opened.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#3285
No description provided.