Skip to content

Overvault-64/Balatro-HandProgress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HandProgress

A Steamodded mod for Balatro that displays a panel during rounds showing how close each poker hand is to completion, based on the cards currently in your hand.

screenshot


Features

  • Progress bar for each hand type (e.g. 3/5 for Flush)
  • Color coding: grey → orange → yellow → green as progress increases
  • Draggable panel, configurable position
  • Toggle individual hands on/off from the mod settings
  • Secret hands hidden by default to avoid spoilers

screenshot


Analysis Methodology

The mod reads the cards in hand every 200ms and runs a full analysis. Each section below describes how progress is calculated for each hand category.

Card Normalization

Before any analysis, each card is passed through a normalization step:

  • Face-down cards (boss blinds like The Fish or The Wheel) are excluded entirely — they are not counted for any hand, preventing spoilers.
  • Stone Cards (m_stone) have no rank or suit and are excluded entirely.
  • Wild Cards (m_wild) are treated as belonging to all four suits simultaneously for flush and straight flush detection, while retaining their real rank for rank-based hands (pairs, straights, etc.).
  • Aces are stored by Balatro as rank 1 internally, but are normalized to 14 so that straight detection can correctly treat them as both high (A-K-Q-J-10) and low (A-2-3-4-5).

Rank-Based Hands

Pair, Two Pair, Three of a Kind, Four of a Kind, Full House, and Five of a Kind are computed from rank groups: the list of how many cards share each rank, sorted descending.

Hand Formula
Pair min(g1, 2) / 2
Two Pair min(g1, 2) + min(g2, 2) / 4
Three of a Kind min(g1, 3) / 3
Four of a Kind min(g1, 4) / 4
Full House min(g1, 3) + min(g2, 2) / 5
Five of a Kind min(g1, 5) / 5

Where g1 and g2 are the sizes of the two largest rank groups.

Straight & Straight Flush

Progress is measured using a sliding window approach rather than counting consecutive runs. Every possible 5-wide window of ranks (1–5, 2–6, … 10–14) is scanned, and the window containing the most cards from the current hand is chosen. This naturally handles gaps:

  • 3 4 6 7 → window 3–7 contains 4 cards → 4/5
  • A 2 3 4 5 → window 1–5 contains 5 cards → 5/5
  • 10 J Q K A → window 10–14 contains 5 cards → 5/5

This also means Shortcut (which allows straights with a 1-rank gap) is implicitly supported: the sliding window already finds the best gapped window without any special case.

For Straight Flush, the same window algorithm is applied independently within each suit bucket. Wild Cards are added to all four suit buckets, so a Wild in hand boosts the straight flush progress of every suit.

Flush

The suit with the most cards is identified as the best suit. Wild Cards boost the count of every real suit equally, so they always contribute to the best suit. Progress is best_suit_count / flush_req (5 normally, 4 with Four Fingers).

Flush House and Flush Five

These hands have two independent requirements that are tracked separately, and the bottleneck is reported:

  • Flush House = Full House + Flush. The Full House component uses the global rank groups (all cards, regardless of suit), identical to the standalone Full House calculation. The Flush component checks whether at least flush_req cards share the same suit.
  • Flush Five = Five of a Kind + Flush. Same principle: Five of a Kind uses the global best rank group; the Flush component checks flush_req same-suit cards.

If the flush condition is not yet met, the suit count is the bottleneck and is shown directly (e.g. 3/5 if you have 3 cards of the best suit and need 4). Once the flush condition is satisfied, progress reflects the hand component (Full House or Five of a Kind).

Example with Four Fingers (flush_req = 4): A♣ A♣ K♠ K♣ K♣ → Full House = 5/5, suited clubs = 4 ≥ 4 → flush satisfied → 5/5

Joker Effects

Two jokers modify the hand requirements and are auto-detected at analysis time:

Joker Key Effect on analysis
Four Fingers j_four_fingers required for Straight, Flush, and Straight Flush drops from 5 to 4. Flush House and Flush Five always require 5 (the flush component relaxes, but the underlying Full House / Five of a Kind still needs 5 cards)
Smeared Joker j_smeared Suits are merged before analysis: Diamonds → Hearts, Clubs → Spades

Shortcut (j_shortcut) requires no special handling because the sliding window already handles 1-rank gaps by design.


Configuration

Settings are available in the in-game mod menu:

  • Enable/disable the panel entirely
  • Show only completed hands (hides hands below 100%)
  • Reset position to default
  • Per-hand show/hide toggles for all standard hands
  • Separate Secret Hands tab for Five of a Kind, Flush House, Flush Five

Config is saved automatically via Steamodded on panel drag and toggle changes.


Requirements

About

A Steamodded mod for Balatro that displays a panel during rounds showing how close each poker hand is to completion, based on the cards currently in your hand.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages