Skip to content

feat(LazyExperience): Rewrite for Beacon sheets, Jumpgate and other new features - #2380

Open
steverobertsuk wants to merge 15 commits into
Roll20:masterfrom
steverobertsuk:sr/lazyexperience-v1
Open

steverobertsuk wants to merge 15 commits into
Roll20:masterfrom
steverobertsuk:sr/lazyexperience-v1

Conversation

@steverobertsuk

Copy link
Copy Markdown
Contributor

1.0.0 - 2026-11-19

A rewrite of Robin Kuiper's 0.1.14. Existing games are upgraded automatically.

Added

  • Game-system profiles, picked per character from its sheet. Each was tested in Roll20 except where noted, and the README lists them under Supported sheets:

    • D&D 5E 2024 (Beacon, read and written with getSheetItem/setSheetItem)
    • D&D 5E 2014 and 5e Shaped
    • Pathfinder 1E (Roll20 and Community) and Pathfinder 2E
    • Starfinder, Old-School Essentials, Dungeon Crawl Classics and Dungeon World
    • WFRP 4E (XP ledger rows; partly supported, as the sheet does not recalculate its totals), Shadowrun 5E/6E (karma) and Cypher
    • Savage Worlds, 13th Age, Cosmere (not tested) and Call of Cthulhu, which have no XP: awards are refused with a warning
    • A custom profile with your own field names and level table
  • Roll20's own party (Jumpgate's Party Member) as the roster, falling back to characters controlled by players. party add/remove ticks Party Member from chat.

  • Defeated creatures, noticed in the same way as HealthColors:

    • the HP bar dropping to 0 (on the token, on its linked attribute, or through TokenMod)
    • the defeated marker (built-in or custom)
    • DeathTracker 1.0's dead status

    The GM is asked first, or the XP is added automatically. Creature XP comes from the sheet's XP value, the challenge rating, or (Pathfinder 2E) the level difference.

  • Fair splits: absent characters (with an Absent share), per-character shares, bonus XP and give. XP that doesn't divide evenly carries over.

  • Level-up notices from each system's level table or next-level field, sent once per level.

  • The LazyExperience - Session Log handout, newest session first, and per-player whispers of each character's XP at the end of a session.

  • Help and Command Deck handouts, chat menus for the session, party, settings and status, 24 languages, One-Click options and a public API for other Mods.

Changed

  • The main command is now !lazyxp (and !lazyexperience). !xp still works unless EasyExperience or ExperienceTracker, which also use it, is installed. A custom command from 0.1 keeps working.
  • Characters controlled only by "All players" (such as helper tokens) no longer share XP.
  • Sheets are updated by default on new installs; upgraded games keep their setting.

Fixed

  • Nothing was written to D&D 2024 sheets.
  • Adding XP to a character controlled by "all" or by several players crashed the Mod.
  • Characters controlled by "all" were counted once for every player.
  • Refreshing characters left gaps in the list, so some characters were skipped.
  • Instant XP wasn't rounded and divided by zero when nobody was active. Text in an XP box became NaN.
  • The defeated prompt could appear twice, and appeared for player characters.
  • Whispers went to the first word of a character's name.
  • The player card always showed 0 XP. The help listed two commands, and show was titled Help.

LazyExperience moves to the same layout as the other rewritten Mods: a
src/ tree bundled by Rollup into one IIFE, Prettier settings, and the
shared build, bump-version and sync-locales scripts. The build writes
the root script and the version snapshot folder from the same bundle,
so they stay byte-identical.

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
… parties and other systems

Users reported 0.1.14 broken on the D&D 2024 sheet. It read XP with
getAttrByName and wrote legacy attributes, which Beacon sheets do not
have, assumed the 2014 OGL attribute names, and only noticed defeated
creatures through a "dead" marker set by DeathTracker or similar.

Sheets
- Game-system profiles are picked per character. D&D 2024 is read and
  written with getSheetItem/setSheetItem (checked live). The others
  were checked against the Roll20 sheet sources: D&D 2014, 5e Shaped,
  Pathfinder 1E (Roll20 and Community) and 2E, Starfinder, OSE, DCC,
  Dungeon World, WFRP 4E (XP ledger rows), Shadowrun (karma and total
  karma) and Cypher. Level-only systems use milestones. Any other
  sheet uses common field names or custom fields.
- Roll20 does not publish sheet names, so a profile is also chosen by
  attributes only that sheet has.
- The 2024 sheet ignores a write of 0 XP, so the Mod warns instead.

Party and splitting
- Roll20's own party (inParty) is the roster, falling back to
  characters controlled by players. "party add/remove" ticks Party
  Member.
- Absent characters get an Absent share, characters can have their
  own share, and there are bonus XP and extra shares. XP that does not
  divide evenly carries over. Payout is at the end of the session or
  instant.

Defeats, levels and logging
- Defeated creatures are noticed as in HealthColors: the HP bar
  dropping to 0 on the token, on its linked attribute or through
  TokenMod, the defeated marker, or DeathTracker 1.0's dead status.
  The GM is prompted, or the XP is added automatically. Creature XP
  comes from the sheet, its challenge rating, or (Pathfinder 2E) the
  level difference.
- Level-up notices come from each system's table or next-level field.
  Milestone mode announces levels and awards no XP.
- A Session Log handout records each session, and each player is
  whispered their character's total.

Commands and housekeeping
- The main command is !lazyxp. !xp stays as an alias unless
  EasyExperience or ExperienceTracker, which also use it, is
  installed.
- 0.1.14 state is migrated and left in place for a rollback.
- Help and Command Deck handouts, menus, One-Click options in
  script.json and a public API.
- Strings in 24 languages. The 23 translations were written by Claude
  after Google Translate refused the sync, and checked by script for
  keys, placeholders and commands.
- Fixes the 0.1.14 bugs: a crash for characters controlled by "all" or
  several players, "all" characters counted once per player, holes in
  the character list, unrounded instant XP and divide by zero, NaN
  XP, duplicate prompts, whispers to a character's first name.

46 Node tests cover the split, defeats, levels, every profile,
migration and the cards. A live run in a copy of Mod Test Lab passed.

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…sting guide

The changelog covers 1.0.0 (dated 2026-11-05) and the earlier releases
back to 0.1.7, worked out from the git history and the version
folders. TESTING.md records the live results in Mod Test Lab -
LazyExperience and what is still untested: sheets other than D&D 2024,
DeathTracker 1.0, upgrading a live 0.1.14 game and sandbox v1.0.

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…ups found in sheet tests

Testing 16 sheets in Mod Test Lab - Sheets showed several problems
that the stubbed tests could not catch.

- The D&D 5E (Classic) sheet ignored every award. Its sanitizeXP
  worker calls .trim() on the XP, so writing a number crashed it.
  Legacy attributes are now written as text, as a player would type
  them.
- Most guessed sheet names were wrong (5eshaped instead of
  dnd5eshaped2, for example), and the loose /pathfinder/ pattern took
  the Community sheet for Pathfinder 1E. The profiles now list the
  exact names from the Game Settings sheet list, and the match
  patterns are no longer used.
- Pathfinder and Starfinder only store xp_max when it differs from the
  sheet's default, so a blank next-level field gave no level-up
  notice. Pathfinder now falls back to the medium track and Starfinder
  to its own table, and a next-level value on the sheet still wins.
- Characters on systems without XP were listed as paid in the session
  summary.

The tests use the real sheet names and expect text values, and cover
the fallback tables and exact-name precedence.

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…sults

The README gains a Supported sheets section listing, for each sheet,
its name in Roll20's settings, the name Mods see, the XP field, where
level-up notices come from, how creature XP is found and the test
result. The Help handout's game-system table now shows the Roll20
names and wraps long sheet names so it fits the handout; its new
strings are translated into the other 23 languages.

TESTING.md records the sheet tests, what they found and what is still
untested: Cosmere, which Roll20 would not switch the test game to, and
the WFRP 4E totals, which the sheet did not recalculate after a ledger
row was added. The changelog, developer guide, One-Click description
and bundle are updated to match.

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…unding them

The new Playwright spec gave Atala a half share in a party of four, and
the menu showed "Shares 4" while the split used 3.5. The XP per share
was right; only the count was rounded by formatNumber. Shares now keep
up to two decimal places, and a Node test covers it.

TESTING.md describes the Playwright spec and its 12 passing live tests
in Mod Test Lab - LazyExperience.

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
… the Journal

The handouts now use the plain LazyExperience icon from Roll20's file store as their journal icon (the handout avatar). The icon is set when a handout is created and added to handouts from earlier versions, so existing games get it too.

Roll20 stores the avatar as max.webp with a number, so a handout counts as having the icon when its avatar contains the image's path. Only the webp files exist (thumb.png is a 404), so the URL uses thumb.webp. A test covers new handouts and handouts made before.

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
The root script and the 1.0.0 snapshot are rebuilt without a version bump and remain identical.

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…he handout

Roll20 always stores a handout's journal icon as the full-size file, whatever size the Mod asks for, and shows that file at its natural size at the top of an open handout. The LazyExperience icon was a 1024 pixel upload, so it filled the handout above the text.

The icon now points at a 100 pixel copy of the same artwork. Handouts from earlier builds are matched on the image path, so they change to the small icon the next time the Mod starts.

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
The built script and its 1.0.0 copy carry the new icon path. The version number is unchanged.

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
Levelling happens on the character sheet or in Roll20's Charactermancer,
so a mode that only announced levels added little. The milestone command,
the Mode setting and One-Click option, the menu's Level Up and Milestone
buttons and the Command Deck's Milestone button are gone. Level-up notices
when a character has enough XP stay.

Sheets with no XP (Savage Worlds, 13th Age, Cosmere, Call of Cthulhu) now
refuse awards with a warning instead of pointing to milestone mode. The
milestone strings are removed from all 24 languages, and the Help
handout, README, CHANGELOG, TESTING, DEVELOPERS, MOD_FILE_MAP and
script.json are updated to match.

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
Section labels on the chat cards (Settings, Party, Status) were small grey
capitals that were hard to pick out. They now use the same bar as the
handouts: gold small capitals on the header colour with a gold left edge.

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…n bars

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
The changelog still carried 2026-11-05, the day the rewrite began. Version 1.0.0 is released on 2026-11-19, so the entry now says so.

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant