Track jokers / improve telemetry#365
Track jokers / improve telemetry#365adilw3nomad wants to merge 6 commits intoBalatro-Multiplayer:mainfrom
Conversation
Add on_joker_acquired/on_joker_removed functions to track joker buy/sell events throughout a match. build_joker_report generates a telemetry payload at match end, and record_match now sends it via matchJokerReport action before resetting lifecycle state.
|
Thanks for putting this together - the lifecycle data would be genuinely useful. A couple of thoughts before this goes further: Inline: The Broader: could this piggyback on the existing gameplay signals instead? We already send That approach would also make it easier to extend coverage incrementally – each new event type (booster open, tag redeem, Madness destroy) enriches the stream automatically once it exists, rather than needing matching |
|
Thanks for having a look at it Stephen! You're right; it doesn't consider other forms of acquiring/removing jokers. I'll have a closer look at the |
This PR introduces some new log events, intended to track jokers being bought/sold during a match, and for how long.
How it appears in the log file
INFO - [G] 2026-03-01 09:33:49 :: TRACE :: MULTIPLAYER :: Client sent message: {"jokers":[{"cost":4,"ante_acquired":1,"key":"j_zany","edition":"none","seal":"none","held_at_end":true,"hold_duration_antes":1,"source":"shop"},{"cost":5,"ante_acquired":1,"ante_removed":1,"key":"j_wrathful_joker","edition":"none","seal":"none","held_at_end":false,"hold_duration_antes":0,"source":"shop","removal_reason":"sold"},{"cost":7,"ante_acquired":2,"ante_removed":2,"key":"j_mp_bloodstone","edition":"none","seal":"none","held_at_end":false,"hold_duration_antes":0,"source":"shop","removal_reason":"sold"}],"ruleset":"ruleset_mp_blitz","ante_reached":2,"won":false,"gamemode":"gamemode_mp_attrition","deck":"Red Deck","stake":1,"action":"matchJokerReport"}I'm following this up with a PR to accumulate and store this data in the API server, however this PR works in isolation as it has no affects on behaviour.
I've tested it locally with no issues.