promotional bannermobile promotional banner

RPG Lore

A data-driven lore book mod for Minecraft Forge 1.20.1. Define custom books via simple JSON files and have them drop from mobs based on configurable conditions.
Back to Files

RPG Lore 2.2.1 (Forge 1.20.1)

File namerpg_lore-2.2.1.jar
Uploader
OtectusOtectus
Uploaded
Sep 20, 2026
Downloads
37
Size
381.4 KB
Mod Loaders
Forge
File ID
8931619
Type
R
Release
Supported game versions
  • 1.20.1

Curse Maven Snippet

Forge

implementation fg.deobf("curse.maven:rpg-lore-1488132:8931619")

Learn more about Curse Maven

What's new

New Features

  • Lore Codex browser -- search across titles, authors, categories, and tags with live filtering; organize by category; filter by All, Collected, Unread, Favorites, or Missing; sort by Default, Title, Category, or Recently found; browse with arrow keys and Enter; press Esc to close or exit search; all view state (search text, category, filter, sort, page, selection) is restored when you return from reading a book
  • Unread markers and favorites -- collected books show an unread indicator (toggleable in client config) when not yet read; click the star icon to mark any book as a favorite; favorite status persists across sessions
  • Codex spare copy display -- duplicates appear as ×n with a copy icon (greyed when no spares remain); extraction is blocked when the spare bank is empty
  • Entry tooltips -- hover over a Codex entry to see the collected book's full details, category, and series position
  • Optional "Open Lore Codex" keybind -- unbound by default; opens the Codex from inventory or Curios slot when set (server verifies possession)
  • Interactive text in books -- hover tooltips with show_text and click events (suggest_command, copy_to_clipboard, open_url, change_page) work in page text; run_command requires the server config reader.allowRunCommandClicks=true (default false) for security
  • Book title wrapping -- titles up to two lines auto-scale (1.0× down to 0.75×) and truncate with ellipsis if needed, preventing poor display on long titles
  • Pack validation command -- /rpglore validate [book_id] (OP level 2) checks JSON syntax, unknown fields, field types and ranges, and format_version without reloading; bulk validation lists each definition, single-book validation shows full diagnostics
  • Structured validation diagnostics -- validation errors and warnings include JSON path, line/column position, and actionable suggestions; strict JSON parsing with lenient fallback
  • Reload report -- /rpglore reload displays loaded/added/changed/removed counts, config overrides of datapack definitions, and warning/error counts in chat; /reload logs a summary to the server log
  • Datapack lore support -- define books at data/<namespace>/rpg_lore/books/<path>.json with automatic ID generation (<namespace>:<path> unless the JSON declares id); config definitions override datapack ones (logged at INFO)
  • Multiple acquisition routes -- books acquire through additive entity_drop, loot_table, and advancement rules, allowing the same book to drop from mobs, appear in chests, and be granted by advancements simultaneously; legacy drop_conditions still works and becomes a single entity_drop rule
  • Loot-table injection -- rules with type loot_table inject books into named tables (chests, fishing, gameplay) with configurable chance and weight; at most one book per table generation
  • Advancement delivery -- rules with type advancement grant books when players earn advancements; delivery mode chooses between Codex (permanent) or inventory (once per player per book; a revoke and re-grant cannot mint a duplicate)
  • Book discovery metadata -- tags are searchable keywords; discovery_hint shows on uncollected entries when enabled; series and series_order organize related books
  • Acquisition rules public API -- mods call LoreAcquisitionService.collect() to add books with source attribution; LoreCollectedEvent fires on the Forge event bus (server-side, first-time collection only) carrying player, book ID, and source
  • Automated regression tests -- JUnit tests cover data parsing and save format migration; Forge GameTests cover Codex gameplay including entity-drop conditions, Codex pruning and reset, player granting, and death/respawn scenarios (run ./gradlew runGameTestServer or ./gradlew runData with Curios excluded from both headless runs)

Bug Fixes

  • Long lore titles remain readable -- books with titles longer than vanilla's 32-character limit now load their pages without showing an invalid-book error; JSON text components and plain-text fallback remain supported
  • Long author names fit the title page -- author text wraps within the page width and truncates with an ellipsis when it exceeds the remaining vertical space
  • Starter Codex no longer lost on grant when inventory is full -- previously, the inventory-full path used the standard item-drop route, triggering the soulbound toss guard which cancelled the drop and pushed the item back at the full inventory, destroying the Codex while the grant flag was already set; the Codex is now placed directly on the ground at the player's feet via ItemEntity creation, so it can be picked up without re-triggering the guard

Improvements

  • Reading marks books as read -- opening a book from the Codex or from your hand immediately records read state; read state persists with discovery timestamp
  • Save format 2 with auto-migration -- existing 2.1.x saves migrate automatically; all pre-2.2.0 books are marked read so returning players are not flooded with "new" entries
  • Network protocol 3 -- clients and servers must both update; traffic is reduced by sending the full catalog only when it changes or when a book switches from hidden to revealed
  • Format version validation -- format_version: 1 is supported; any other value produces an error
  • Codex read state and discovery timestamps -- tracked per book per player and persisted to data/rpg_lore_codex.dat
  • Entity drop indexing -- registry builds an immutable index at load time with exact-mob buckets, tag/biome buckets, and loot-table/advancement lookups, so mob deaths only evaluate applicable rules instead of scanning all books
  • Load resilience -- if the books directory becomes unreadable, the previous catalog remains active instead of being replaced with an empty one
  • Duplicate handling naming -- "duplicate prevention" terminology replaced with "duplicates" control offering two modes: store spares (default) or leave on ground
  • New server config options -- acquisition.enableEntityDrops (default true), acquisition.enableLootTables (default true), acquisition.enableAdvancements (default true), codex.enableDiscoveryHints (default true), reader.allowRunCommandClicks (default false)
  • New client config options -- codex_display.rememberSearch (default true) and codex_display.showUnreadMarkers (default true)
  • Two-layer reload workflow -- /reload rescans both datapack and config; /rpglore reload rescans config only and merges with the existing datapack layer
  • Auto-regenerating config README -- config/rpg_lore/books/_README.txt regenerates when documentation version increments, keeping field docs current without user intervention
  • Ribbon controls for Codex browsing -- category, filter, and sort are now interactive red ribbon tabs that stick out from the book's top-right edge, each showing its role and current value (e.g. "Category: All", "Filter: Collected", "Sort: Default"); left-click cycles forward, Shift-click cycles backward, and all ribbons remain keyboard-accessible and remembered when returning from a book
  • Codex header layout with 8 books per page -- removing the button row reflowed the header so the book list now displays eight entries per page instead of seven
  • Codex progress counter removed -- the "x / y" collected-count display at the top of the parchment is removed; only the bottom page counter remains
  • Spare-copy indicator simplified -- the duplicate-count display on each row now shows only the copy icon with spare count in tooltip, removing the textual "×n" annotation
  • Read action replaced with icon -- the "Read" text link on each Codex entry is replaced by a small open-book icon with tooltip (new translation key rpg_lore.codex.open_book, added to all 60 locales)
  • Title truncation with ellipsis -- row titles receive approximately 30 px additional width, and any title that still does not fit is truncated with "..." instead of being clipped mid-glyph
  • Textured duplicate-handling icon button -- the spare/duplicate-prevention toggle is now a styled icon drawn from textures/gui/codex.png (stacked books with a green tick = store spares; single book with a red cross = leave duplicates on the ground) instead of a vanilla button, keeping the same tooltip and behavior
  • Styled search field with magnifier glyph -- the search input gained a magnifier glyph and thin underline so it reads as an input field on the parchment rather than a plain vanilla box
  • Ribbon translation keys for all 60 locales -- three new translation keys rpg_lore.codex.ribbon.category, rpg_lore.codex.ribbon.filter, rpg_lore.codex.ribbon.sort (format "Category: %s" etc.) are added to all 60 locale files (translated where the locale already translates the Codex controls, English elsewhere); very long category names are automatically trimmed with the full label preserved in the tooltip
  • Curios slot icon texture -- the "codex" slot's empty-slot icon is a 16x16 greyscale silhouette of the Lore Codex item, following Curios's convention for empty-slot icons; data/rpg_lore/curios/slots/codex.json points icon to rpg_lore:slot/empty_codex_slot.

This mod has no related projects