Skip to content

feat(the-order): log each idol hit for the website log parser - #519

Merged
V-rtualized merged 1 commit into
Balatro-Multiplayer:devfrom
ChronoFinale:feat/idol-roll-log-dev
Jul 30, 2026
Merged

feat(the-order): log each idol hit for the website log parser#519
V-rtualized merged 1 commit into
Balatro-Multiplayer:devfrom
ChronoFinale:feat/idol-roll-log-dev

Conversation

@ChronoFinale

Copy link
Copy Markdown
Contributor

Re-lands the idol roll logging on dev.

#511 merged this into main, but dev never had it — and #518 (v0.5.3), cut
from dev, then overwrote compatibility/TheOrder.lua and stripped it back
out. So the change is currently in no shipping branch: main's copy was
removed by the release, and dev never carried it.

Same commit, cherry-picked onto dev. One file, +22 lines, no behaviour change
beyond the log line.

What it does

Under The Order the idol card is a weighted lottery over your deck — each card's
chance scales with how many copies you hold — but the roll happens at the start
of a blind and then vanishes. This logs it so the website log parser can show
the distribution the roll was made against.

IDOL_ROLL::<base64 of {"roll":0.62,"winner":"QH","cards":["KS4","QH3","AS1"]}>

Cards are <rank><suit><count> tokens in selection order (T = 10), base64'd so
the line stays a single token in the log. The website side is
Balatro-Multiplayer/www#55.

Notes

  • Sits inside the existing raw_random < threshold branch, right after the
    winner is assigned and before the break, so it fires exactly once per roll
    and only when a winner was actually picked.
  • valid_idol_cards order is preserved, which is what lets the parser walk
    cumulative thresholds and land the roll in the winning slice.
  • Verified emitting on a local 0.5.2 install: a full 52-card deck roll logged
    {"roll":0.456…,"winner":"9D","cards":["AS1",…,"2D1"]}, winner present in
    cards.

…o-Multiplayer#511)

The Order weights the idol card by how many copies of each card are in the
deck, but nothing about that reaches the player after the fact. Log the hit
so the website log parser can show which card won, the value that was
rolled, and how likely that card was.

Emitted once per selection, right after the winning card is stored:

  IDOL_ROLL::<base64 of
    {"roll":0.3536,"winner":"TC","cards":["AS1","AH1","KS4"]}>

`cards` are compact "<rank><suit><count>" tokens (T = 10) in the same order
the weighted threshold walk uses, so the reader can reconstruct the exact
distribution the roll was made against. base64 keeps it to a single opaque
token in the log. Logging only — no game state or RNG is touched.
@V-rtualized
V-rtualized merged commit 758024e into Balatro-Multiplayer:dev Jul 30, 2026
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.

2 participants