A Balatro Mod to send info to an overlay for Major League Balatro
All json sent along with the username (pulled from the Multiplayer mod) Set the serverUrl in Init.lua to the URL of the server (Only sends http not https)
Sent at the start of every Balatro run (including a Multiplayer match) Also resets all internally stored variables (highest score, money earned, etc) Nemesis property will only be present in multiplayer matches Stake is numeric where "white stake" equals 1, adds +1 for each higher stake chosen
{ user = <username>, nemesis = <username_opponent>, stake = <chosen_stake>, deck = <chosen_deck>, action = "game_start", starting_lives = <starting_lives> }
{ user = "Fantom", nemesis = "oathkeep", stake = 1, deck = "Red Deck", action = "game_start", starting_lives = 4 }
Sent whenever a new ante is reached (not sent ante 1)
{user = <username>, action = "ante_reached", amount = <ante>}
{user = "Fantom", action = "ante_reached", amount = 2}
Sent whenever a life is lost
{user = <username>, action = "life_lost"}
{user = "Fantom", action = "life_lost"}
Sent whenever money is earned (does not include starting $4 or $14 on yellow deck) Total money earned is all money earned throughout the entire run/match (resets on game_start)
{user = <username>, action = "money_earned", amount = <amount_earned>, total = <total_money_earned>}
{user = "Fantom", action = "money_earned", amount = 4, total = 312}
Sent whenever money is lost (buying something from the shop, rerolls, rental jokers, etc.) Total money spent is all money spent/lost throughout the entire run/match (resets on game_start)
{user = <username>, action = "money_spent", amount = <amount_spent>, total = <total_money_spent>}
{user = "Fantom", action = "money_earned", amount = 10, total = 291}
Sent whenever the reroll button is pressed Total rerolls is the total amount of rerolls used throughout the entire run/match
{user = <username>, action = "reroll_shop", cost = <reroll_cost>, total_rerolls = <total_rerolls>}
{user = "Fantom", action = "reroll_shop", cost = 5, total_rerolls = 12}
Sent whenever a voucher is bought New voucher is the voucher that was just bought Vouchers is the list of all vouchers bought that run/match (excludes new_voucher) Uses Balatro's internal center keys to refer to vouchers
{user = <username>, action = "bought_voucher", new_voucher = <voucher_bought> vouchers = <all_vouchers_bought>}
{user = "Fantom", action = "reroll_shop", action = "bought_voucher", new_voucher = "v_crystal_ball", vouchers = "v_wasteful-v_telescope-v_hone"}
Sent whenever a joker/consumable/card is bought and whenever a consumable is used Uses Balatro's internal center keys to refer to what is gotten
{user = <username>, action = "got_card", card = <joker_or_consumable_or_card>}
{user = "Fantom", action = "got_card", card = "j_hanging_chad"}
Sent whenever the highest recorded score by a player in a single hand during that run/match is beaten Does not use scientific notation. It simply sends the raw number
{user = <username>, action = "high_score", score = <high_score>}
{user = "Fantom", action = "high_score", score = 103420856}
Sent when the player changes locations Locations: 1 = shop, 2 = selecting, 3 = small blind, 4 = shop, 5 = selecting, 6 = big blind, 7 = shop, 8 = selecting, 9 = boss/nemesis
{user = <username>, action = "location_change", location = <location>}
{user = "Fantom", action = "location_change", location = 3}
Sent when the player enters pvp
{user = <username>, action = "start_pvp"}
{user = "Fantom", action = "start_pvp"}
Sent at start of PvP and whenever a discard is used in PvP
{user = <username>, action = "pvp_discards", count = <discards_left>}
{user = "Fantom", action = "pvp_discards", count = 2}
Sent at start of PvP and whenever a hand is used in PvP
{user = <username>, action = "pvp_hands", count = <hands_left>, score = <current_total_pvp_score>}
{user = "Fantom", action = "pvp_hands", count = 3, score = 10156}
Sent when selecting a blind or using a relevant consumable Sends info about deck composition
{user = <username>, action = "deck_check", numLucky = <num_luckies_in_deck>, numGlass = <num_glass_in_deck>, numGold = <num_gold_cards_in_deck>, numSteel = <num_steel_cards_in_deck>, numRedSeal = <num_red_seals_in_deck>, numPurpleSeal = <num_purple_seals_in_deck>, numBlueSeal = <num_blue_seals_in_deck>, numGoldSeal = <num_gold_seals_in_deck>}
{user = "Fantom", action = "deck_check", numLucky = 10, numGlass = 0, numGold = 1, numSteel = 3, numRedSeal = 10, numPurpleSeal = 2, numBlueSeal = 1, numGoldSeal = 0}
Sent at start of PvP and whenever a hand/discard is used in PvP
Syntax for a card is as follows:
suit-rank-enhancement-edition-seal
suit can be S,C,H,D
rank can be A,2,3,4,5,6,7,8,9,T,J,Q,K
enhancement is m_<enhancement> (c_base is no enhancement)
edition is e_<edition>
seal can be Red, Gold, Blue, Purple
{user = <username>, action = "full_deck", deck = <deck_string>}
{user = "Fantom", action = "full_deck", deck = ";S-A-c_base-none-none;S-K-c_base-none-none;S-Q-c_base-none-none;S-J-c_base-none-none;S-T-c_base-none-none;S-9-c_base-none-none;S-8-c_base-none-none;S-7-c_base-none-none;S-6-c_base-none-none;S-5-c_base-none-none;S-4-c_base-none-none;S-3-c_base-none-none;S-2-c_base-none-none;H-A-c_base-none-none;H-K-c_base-none-none;H-Q-c_base-none-none;H-J-c_base-none-none;H-T-c_base-none-none;H-9-c_base-none-none;H-8-c_base-none-none;H-7-c_base-none-none;H-6-c_base-none-none;H-5-c_base-none-none;H-4-c_base-none-none;H-3-c_base-none-none;H-2-c_base-none-none;C-A-c_base-none-none;C-K-c_base-none-none;C-Q-c_base-none-none;C-J-c_base-none-none;C-T-c_base-none-none;C-9-c_base-none-none;C-8-c_base-none-none;C-7-c_base-none-none;C-6-c_base-none-none;C-5-c_base-none-none;C-4-c_base-none-none;C-3-c_base-none-none;C-2-c_base-none-none;D-A-c_base-none-none;D-K-c_base-none-none;D-Q-c_base-none-none;D-J-c_base-none-none;D-T-c_base-none-none;D-9-c_base-none-none;D-8-c_base-none-none;D-7-c_base-none-none;D-6-c_base-none-none;D-5-c_base-none-none;D-4-c_base-none-none;D-3-c_base-none-none;D-2-c_base-none-none;D-4-c_base-none-Gold;S-8-m_gold-none-none"}
Sent whenever a hand/discard is used in PvP (includes cards still in hand and in deck)
Syntax for a card is as follows:
suit-rank-enhancement-edition-seal
suit can be S,C,H,D
rank can be A,2,3,4,5,6,7,8,9,T,J,Q,K
enhancement is m_<enhancement> (c_base is no enhancement)
edition is e_<edition>
seal can be Red, Gold, Blue, Purple
{user = <username>, action = "current_deck", deck = <deck_string>}
{user = "Fantom", action = "current_deck", deck = ";S-A-c_base-none-none;S-K-c_base-none-none;S-Q-c_base-none-none;S-J-c_base-none-none;S-T-c_base-none-none;S-9-c_base-none-none;S-8-c_base-none-none;S-7-c_base-none-none;S-6-c_base-none-none;S-5-c_base-none-none;S-4-c_base-none-none;S-3-c_base-none-none;S-2-c_base-none-none;H-A-c_base-none-none;H-K-c_base-none-none;H-Q-c_base-none-none;H-J-c_base-none-none;H-T-c_base-none-none;H-9-c_base-none-none;H-8-c_base-none-none;H-7-c_base-none-none;H-6-c_base-none-none;H-5-c_base-none-none;H-4-c_base-none-none;H-3-c_base-none-none;H-2-c_base-none-none;C-A-c_base-none-none;C-K-c_base-none-none;C-Q-c_base-none-none;C-J-c_base-none-none;C-T-c_base-none-none;C-9-c_base-none-none;C-8-c_base-none-none;C-7-c_base-none-none;C-6-c_base-none-none;C-5-c_base-none-none;C-4-c_base-none-none;C-3-c_base-none-none;C-2-c_base-none-none;D-A-c_base-none-none;D-K-c_base-none-none;D-Q-c_base-none-none;D-J-c_base-none-none;D-T-c_base-none-none;D-9-c_base-none-none;D-8-c_base-none-none;D-7-c_base-none-none;D-6-c_base-none-none;D-5-c_base-none-none;D-4-c_base-none-none;D-3-c_base-none-none;D-2-c_base-none-none;D-4-c_base-none-Gold;S-8-m_gold-none-none"}
Sent at start of PvP and whenever a hand/discard is used in PvP
Syntax for a card is as follows:
suit-rank-enhancement-edition-seal
suit can be S,C,H,D
rank can be A,2,3,4,5,6,7,8,9,T,J,Q,K
enhancement is m_<enhancement> (c_base is no enhancement)
edition is e_<edition>
seal can be Red, Gold, Blue, Purple
{user = <username>, action = "current_hand", hand = <hand_string>}
{user = "Fantom", action = "current_hand", hand = ";H-Q-c_base-none-none;C-Q-c_base-none-none;D-9-c_base-none-none;H-8-c_base-none-none;C-8-c_base-none-none;H-5-c_base-none-none;C-3-c_base-none-none;D-2-c_base-none-none"}