feat(the-order): log each idol hit for the website log parser - #519
Merged
V-rtualized merged 1 commit intoJul 30, 2026
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-lands the idol roll logging on
dev.#511 merged this into
main, butdevnever had it — and #518 (v0.5.3), cutfrom
dev, then overwrotecompatibility/TheOrder.luaand stripped it backout. So the change is currently in no shipping branch:
main's copy wasremoved by the release, and
devnever carried it.Same commit, cherry-picked onto
dev. One file, +22 lines, no behaviour changebeyond 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 sothe line stays a single token in the log. The website side is
Balatro-Multiplayer/www#55.
Notes
raw_random < thresholdbranch, right after thewinner is assigned and before the
break, so it fires exactly once per rolland only when a winner was actually picked.
valid_idol_cardsorder is preserved, which is what lets the parser walkcumulative thresholds and land the roll in the winning slice.
{"roll":0.456…,"winner":"9D","cards":["AS1",…,"2D1"]}, winner present incards.