Hey all,
I rigged up the AHK HUD to show zone-by-zone stats for tournaments. I don't suggest using this for cash games, but it does have an emergency cash game mode.
It requires some minor surgery to include\misc.ahk, so I recommend that you make another copy of the HUD directory to apply these changes.
The default stat list gives hands, VPIP, PFR, and AF for any M, M <= 6, 6 < M <= 11, 11 < M <= 20, and M > 20.
The F5 stat list gives VPIP, PFR, AF, attempted to steal blinds, folded SB to blind steal and folded BB to blind steal for M <= 6
The F6 stat list is the emergency cash mode and gives VPIP, PFR, AF, attempted to steal blinds, folded SB to blind steal and folded BB to blind steal for all hands.
Copy and paste this to your stats.ahk file (though you may want to paste this over the old stats and statlist definitions):
- Code: Select all
; M Zone boundaries
red_zone_max := 6
orange_zone_max := 11
yellow_zone_max := 20
; Stack size definition
stack_size := "hhpd.amt_before / (hb.amt_bb + hb.amt_sb + hhs.cnt_players * hhpd.amt_ante)"
; Define stats here as SQL "SELECT" statements - count on the left, oppurtunities on the right
; Overall stats
hands := "count (hhps.id_player)"
hands_range := "10=0000ff,30=3333ff,50=5555ff,100=7777ff,200=9999ff,1000=aaaaff,5000=bbbbff,10000=ccccff"
hands_size := 4
vpip_total := "SUM(case when (hhps.flg_vpip) then 1 else 0 end) || '/' || count (hhps.id_player)"
vpip_total_range := "20=ff0000,30=ff9600,100=00ff00"
vpip_total_handgrid := "SELECT hhps.id_hand FROM holdem_hand_player_statistics hhps WHERE hhps.flg_vpip = 't'"
vpip_total_size := 2
pfr_total := "SUM(case when (hhps.cnt_p_raise > 0) then 1 else 0 end) || '/' || count (hhps.id_player)"
pfr_total_range := "7=0000ff,14=ff9600,100=ff0000"
pfr_total_size := 2
total_postflop_aggr_factor := "SUM(hhps.cnt_r_raise) + SUM(case when (hhps.flg_r_bet) THEN 1 ELSE 0 END) + SUM(hhps.cnt_t_raise) + SUM(case when (hhps.flg_t_bet) THEN 1 ELSE 0 END) + SUM(hhps.cnt_f_raise) + SUM(case when (hhps.flg_f_bet) THEN 1 ELSE 0 END) || '/' || SUM(hhps.cnt_r_call) + SUM(hhps.cnt_t_call) + SUM(hhps.cnt_f_call)"
total_postflop_aggr_factor_range := "1=00ff00,2=ffff00,3=ff9600,100=ff0000"
total_postflop_aggr_factor_size := 2
attempt_to_steal_blinds := "SUM(case when (hhps.flg_steal_att) then 1 else 0 end) || '/' || SUM(case when (hhps.flg_steal_opp) then 1 else 0 end)"
attempt_to_steal_blinds_range := "20=0000ff,50=ff0000,70=ff9600,100=00ff00"
attempt_to_steal_blinds_size := 3
fold_BB_to_blind_steal := "SUM(case when (hhps.flg_bb_steal_fold) then 1 else 0 end) || '/' || SUM(case when (hhps.flg_blind_def_opp AND hhps.flg_blind_b) then 1 else 0 end)"
fold_BB_to_blind_steal_range := "30=00ff00,60=ff9600,100=ff0000"
fold_BB_to_blind_steal_size := 3
fold_SB_to_blind_steal := "SUM(case when (hhps.flg_sb_steal_fold) then 1 else 0 end) || '/' || SUM(case when (hhps.flg_blind_def_opp AND hhps.flg_blind_s) then 1 else 0 end)"
fold_SB_to_blind_steal_range := "30=00ff00,60=ff9600,100=ff0000"
fold_SB_to_blind_steal_size := 3
; Red Zone Stats
red_zone_hands := "SUM(case when ((" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end)"
red_zone_hands_range := "0=ff0000"
red_zone_hands_size := hands_size
red_zone_vpip := "SUM(case when (hhps.flg_vpip and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end)"
red_zone_vpip_range := vpip_total_range
red_zone_vpip_size := vpip_total_size
red_zone_pfr := "SUM(case when ((hhps.cnt_p_raise > 0) and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end)"
red_zone_pfr_range := pfr_total_range
red_zone_pfr_size := pfr_total_size
red_zone_aggr_factor := "SUM(case when ((" . stack_size . " <= " . red_zone_max . ")) then (hhps.cnt_r_raise + hhps.cnt_t_raise + hhps.cnt_f_raise) else 0 end) + SUM(case when (hhps.flg_r_bet and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end) + SUM(case when (hhps.flg_t_bet and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end) + SUM(case when (hhps.flg_f_bet and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " <= " . red_zone_max . ")) then (hhps.cnt_r_call + hhps.cnt_t_call + hhps.cnt_f_call) else 0 end)"
red_zone_aggr_factor_range := total_postflop_aggr_factor_range
red_zone_aggr_factor_size := total_postflop_aggr_factor_size
red_zone_attempt_to_steal_blinds := "SUM(case when (hhps.flg_steal_att and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when (hhps.flg_steal_opp and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end)"
red_zone_attempt_to_steal_blinds_range := attempt_to_steal_blinds_range
red_zone_attempt_to_steal_blinds_size := attempt_to_steal_blinds_size
red_zone_fold_BB_to_blind_steal := "SUM(case when (hhps.flg_bb_steal_fold and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when (hhps.flg_blind_def_opp and hhps.flg_blind_b and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end)"
red_zone_fold_BB_to_blind_steal_range := fold_BB_to_blind_steal_range
red_zone_fold_BB_to_blind_steal_size := fold_BB_to_blind_steal_size
red_zone_fold_SB_to_blind_steal := "SUM(case when (hhps.flg_sb_steal_fold and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when (hhps.flg_blind_def_opp and hhps.flg_blind_s and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end)"
red_zone_fold_SB_to_blind_steal_range := fold_SB_to_blind_steal_range
red_zone_fold_SB_to_blind_steal_size := fold_SB_to_blind_steal_size
; Orange Zone Stats
orange_zone_hands := "SUM(case when ((" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then 1 else 0 end)"
orange_zone_hands_range := "0=ff8000"
orange_zone_hands_size := hands_size
orange_zone_vpip := "SUM(case when (hhps.flg_vpip and (" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then 1 else 0 end)"
orange_zone_vpip_range := vpip_total_range
orange_zone_vpip_size := vpip_total_size
orange_zone_pfr := "SUM(case when ((hhps.cnt_p_raise > 0) and (" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then 1 else 0 end)"
orange_zone_pfr_range := pfr_total_range
orange_zone_pfr_size := pfr_total_size
orange_zone_aggr_factor := "SUM(case when ((" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then (hhps.cnt_r_raise + hhps.cnt_t_raise + hhps.cnt_f_raise) else 0 end) + SUM(case when (hhps.flg_r_bet and (" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then 1 else 0 end) + SUM(case when (hhps.flg_t_bet and (" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then 1 else 0 end) + SUM(case when (hhps.flg_f_bet and (" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then (hhps.cnt_r_call + hhps.cnt_t_call + hhps.cnt_f_call) else 0 end)"
orange_zone_aggr_factor_range := total_postflop_aggr_factor_range
orange_zone_aggr_factor_size := total_postflop_aggr_factor_size
; Yellow Zone Stats
yellow_zone_hands := "SUM(case when ((" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then 1 else 0 end)"
yellow_zone_hands_range := "0=ffff00"
yellow_zone_hands_size := hands_size
yellow_zone_vpip := "SUM(case when (hhps.flg_vpip and (" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then 1 else 0 end)"
yellow_zone_vpip_range := vpip_total_range
yellow_zone_vpip_size := vpip_total_size
yellow_zone_pfr := "SUM(case when ((hhps.cnt_p_raise > 0) and (" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then 1 else 0 end)"
yellow_zone_pfr_range := pfr_total_range
yellow_zone_pfr_size := pfr_total_size
yellow_zone_aggr_factor := "SUM(case when ((" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then (hhps.cnt_r_raise + hhps.cnt_t_raise + hhps.cnt_f_raise) else 0 end) + SUM(case when (hhps.flg_r_bet and (" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then 1 else 0 end) + SUM(case when (hhps.flg_t_bet and (" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then 1 else 0 end) + SUM(case when (hhps.flg_f_bet and (" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then (hhps.cnt_r_call + hhps.cnt_t_call + hhps.cnt_f_call) else 0 end)"
yellow_zone_aggr_factor_range := total_postflop_aggr_factor_range
yellow_zone_aggr_factor_size := total_postflop_aggr_factor_size
; Green Zone Stats
green_zone_hands := "SUM(case when ((" . stack_size . " > " . yellow_zone_max . ")) then 1 else 0 end)"
green_zone_hands_range := "0=00ff00"
green_zone_hands_size := hands_size
green_zone_vpip := "SUM(case when (hhps.flg_vpip and (" . stack_size . " > " . yellow_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " > " . yellow_zone_max . ")) then 1 else 0 end)"
green_zone_vpip_range := vpip_total_range
green_zone_vpip_size := vpip_total_size
green_zone_pfr := "SUM(case when ((hhps.cnt_p_raise > 0) and (" . stack_size . " > " . yellow_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " > " . yellow_zone_max . ")) then 1 else 0 end)"
green_zone_pfr_range := pfr_total_range
green_zone_pfr_size := pfr_total_size
green_zone_aggr_factor := "SUM(case when ((" . stack_size . " > " . yellow_zone_max . ")) then (hhps.cnt_r_raise + hhps.cnt_t_raise + hhps.cnt_f_raise) else 0 end) + SUM(case when (hhps.flg_r_bet and (" . stack_size . " > " . yellow_zone_max . ")) then 1 else 0 end) + SUM(case when (hhps.flg_t_bet and (" . stack_size . " > " . yellow_zone_max . ")) then 1 else 0 end) + SUM(case when (hhps.flg_f_bet and (" . stack_size . " > " . yellow_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " > " . yellow_zone_max . ")) then (hhps.cnt_r_call + hhps.cnt_t_call + hhps.cnt_f_call) else 0 end)"
green_zone_aggr_factor_range := total_postflop_aggr_factor_range
green_zone_aggr_factor_size := total_postflop_aggr_factor_size
;**************************************************************************************
; PANEL CONFIGURATION - THIS IS IMPORTANT
;
; use a comma between all stats, or an asterisk. asterisk makes a new panel
; add a slash before the comma of a stat to make a newline
;**************************************************************************************
; Default/F4 statlist -- Hands/VPIP/PFR/AF stats for overall, red zone (M <= 6), orange zone (6 < M <= 11), yellow zone (11 < M <= 20), and green zone (M > 20)
statlist1 := "hands,vpip_total,pfr_total,total_postflop_aggr_factor/,red_zone_hands,red_zone_vpip,red_zone_pfr,red_zone_aggr_factor/,orange_zone_hands,orange_zone_vpip,orange_zone_pfr,orange_zone_aggr_factor/,yellow_zone_hands,yellow_zone_vpip,yellow_zone_pfr,yellow_zone_aggr_factor/,green_zone_hands,green_zone_vpip,green_zone_pfr,green_zone_aggr_factor"
; F5 statlist -- Red zone stats
statlist2 := "hands,vpip_total,pfr_total,total_postflop_aggr_factor/,red_zone_hands,red_zone_vpip,red_zone_pfr,red_zone_aggr_factor/,red_zone_attempt_to_steal_blinds,red_zone_fold_BB_to_blind_steal,red_zone_fold_SB_to_blind_steal"
; F6 statlist -- Overall and emergency cash game stats
statlist3 := "hands,vpip_total,pfr_total,total_postflop_aggr_factor/,attempt_to_steal_blinds,fold_BB_to_blind_steal,fold_SB_to_blind_steal"
Then, copy this code, open include\misc.ahk, and paste over lines 1572 - 1642
- Code: Select all
if (this_is_tournament)
{
tourney := "tourney_"
; Unlike other PT3 database tables, one can't prepend "tourney_" to
; "holdem_limit" to get the equivilent table for tournaments.
; The actual table is "tourney_holdem_blinds." Similarly, the
; primary key of these tables are "id_limit" or "id_blinds," respectively.
; -- sopoRific
limit_or_blinds := "blinds"
}
else
{
tourney := ""
limit_or_blinds := "limit"
}
StringTrimRight, sql_stats, sql_stats, 1
sql := "BEGIN ISOLATION LEVEL SERIALIZABLE;"
;StringReplace, safe_player, player, `', \`', All
num_handed := 0
Loop, Parse, seatednow, `,
{
num_handed++
}
SendUpdate("plrs=" . num_handed)
;msgbox, %num_handed%
Loop, Parse, seatednow, `,
{
if (A_LoopField = hero && ignore_hero)
{
continue
}
else if (A_LoopField = hero && !ignore_hero && hand_number)
{
StringReplace, safe_player, A_LoopField,`',`'`', All
if (site = "PTY")
{
site_num := 200
}
else if (site = "FTP")
{
site_num := 300
}
else if (site := "PS")
{
site_num := 100
}
else
{
continue
}
if (restrict_results_to_current_num_handed)
{
sql .= "SELECT player_name, " . sql_stats . " FROM " . tourney . "holdem_hand_player_statistics hhps, player p, " . tourney . "holdem_hand_summary hhs, " . tourney . "holdem_hand_player_detail hhpd, " . tourney . "holdem_" . limit_or_blinds . " hb WHERE hhpd.id_player=p.id_player and hhps.id_player=p.id_player and hhps.id_hand=hhpd.id_hand and hhps.id_player=hhps.id_player and hhps.id_" . limit_or_blinds . "=hb.id_" . limit_or_blinds . " and hhs.id_hand=hhps.id_hand and hhs.id_hand=hhpd.id_hand AND hhs.cnt_players IN (" . num_handed . "," . num_handed-1 . ") AND p.player_name_search = lower('" . safe_player . "') "
}
else
{
sql .= "SELECT player_name, " . sql_stats . " FROM " . tourney . "holdem_hand_player_statistics hhps, player p, " . tourney . "holdem_hand_summary hhs, " . tourney . "holdem_hand_player_detail hhpd, " . tourney . "holdem_" . limit_or_blinds . " hb WHERE hhpd.id_player=p.id_player and hhps.id_player=p.id_player and hhps.id_hand=hhpd.id_hand and hhps.id_player=hhps.id_player and hhps.id_" . limit_or_blinds . "=hb.id_" . limit_or_blinds . " and hhs.id_hand=hhps.id_hand and hhs.id_hand=hhpd.id_hand AND p.player_name_search = lower('" . safe_player . "') "
}
sql := sql . " AND hhps.id_session = (SELECT DISTINCT id_session FROM player p, holdem_hand_summary hhs, holdem_hand_player_statistics hhps WHERE hhps.id_hand=hhs.id_hand AND hhs.hand_no=" . hand_number . " AND hhs.id_site = " . site_num . " AND hhps.id_player = p.id_player AND p.player_name_search = lower('" . safe_player . "'))"
;msgbox, %hand_number% %session_id%
sql := sql . " GROUP BY player_name"
}
else
{
StringReplace, safe_player, A_LoopField,`',`'`', All
if (restrict_results_to_current_num_handed)
{
sql .= "SELECT player_name, " . sql_stats . " FROM " . tourney . "holdem_hand_player_statistics hhps, player p,, " . tourney . "holdem_hand_summary hhs, " . tourney . "holdem_hand_player_detail hhpd, " . tourney . "holdem_" . limit_or_blinds . " hb WHERE hhpd.id_player=p.id_player and hhps.id_player=p.id_player and hhps.id_hand=hhpd.id_hand and hhps.id_player=hhps.id_player and hhps.id_" . limit_or_blinds . "=hb.id_" . limit_or_blinds . " and hhs.id_hand=hhps.id_hand and hhs.id_hand=hhpd.id_hand AND hhs.cnt_players IN (" . num_handed . "," . num_handed-1 . ") AND p.player_name_search = lower('" . safe_player . "') GROUP BY player_name"
}
else
{
sql .= "SELECT player_name, " . sql_stats . " FROM " . tourney . "holdem_hand_player_statistics hhps, player p, " . tourney . "holdem_hand_summary hhs, " . tourney . "holdem_hand_player_detail hhpd, " . tourney . "holdem_" . limit_or_blinds . " hb WHERE hhpd.id_player=p.id_player and hhps.id_player=p.id_player and hhps.id_hand=hhpd.id_hand and hhps.id_player=hhps.id_player and hhps.id_" . limit_or_blinds . "=hb.id_" . limit_or_blinds . " and hhs.id_hand=hhps.id_hand and hhs.id_hand=hhpd.id_hand AND p.player_name_search = lower('" . safe_player . "') GROUP BY player_name"
}
}
I can upload my stats.ahk and/or include\misc.ahk files if someone requests.
I hope someone finds this useful.
And extra thanks to _dave_ for creating such a useful and fun-to-hack program.