Dynamic HUD decimals: 1 decimal if stat < 10, but 0 decimals

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Dynamic HUD decimals: 1 decimal if stat < 10, but 0 decimals

Postby dave2085 » Tue Oct 13, 2026 1:19 pm

Hi,
I am trying to create a custom statistic (specifically for 3Bet Preflop) where the HUD dynamically changes the number of decimals displayed based on the value of the stat.
My Goal:
• If the stat value is under 10, show 1 decimal place (e.g., 4.2).
• If the stat value is between 10 and 100, show 0 decimal places (e.g., 15).

In Configure -> Statistics, I am using the following code in the Format Expression (right now):
if((cnt_p_3bet / cnt_p_3bet_opp) * 100 >= 99,99, format_number( (cnt_p_3bet / cnt_p_3bet_opp) * 100 , 1 , false , false ))


I have tested different Format Types (Expression, Number, Percent) in the Statistic Editor, and I have set the HUD Item Properties -> Decimals to 0.
The Problem:
The code itself evaluates as valid and works perfectly in the Tooltip / Hover menu (when I hover over the stat in the HUD, it shows the decimal exactly how I want it).
However, directly on the live table / in the Hand Replayer, the decimal for values under 10 is completely cut off. It seems the live HUD overrides the Format Expression and forces a flat integer because HUD Decimals is set to 0. If I change HUD Decimals to 1, then every number gets a .0 attached, which I don't want.
How can I bypass the live HUD's formatting filter so that the decimals from my Format Expression are actually drawn directly onto the table, and not just in the tooltip?

Thank you for your help!
dave2085
 
Posts: 205
Joined: Mon Jun 02, 2008 10:41 am

Re: Dynamic HUD decimals: 1 decimal if stat < 10, but 0 deci

Postby dave2085 » Tue Oct 13, 2026 2:11 pm

if( (cnt_p_3bet / cnt_p_3bet_opp) * 100 >= 99.99, format('{1} ', format_number((cnt_p_3bet / cnt_p_3bet_opp) * 100, 1, false, false)), if( (cnt_p_3bet / cnt_p_3bet_opp) * 100 < 10, format('{1} ', format_number((cnt_p_3bet / cnt_p_3bet_opp) * 100, 1, false, false)), format('{1}', format_number((cnt_p_3bet / cnt_p_3bet_opp) * 100, 0, false, false)) ) )

I tried stuff like this.
dave2085
 
Posts: 205
Joined: Mon Jun 02, 2008 10:41 am

Re: Dynamic HUD decimals: 1 decimal if stat < 10, but 0 deci

Postby Flag_Hippo » Thu Oct 15, 2026 6:11 am

Setting decimals within a format expression isn’t compatible with the HUD due to the property within the HUD Profile itself. Unfortunately I don’t have a workaround for this that would allow the HUD to show a different number of decimals depending on the stat value.
Flag_Hippo
Moderator
 
Posts: 17092
Joined: Tue Jan 31, 2012 7:50 am

Re: Dynamic HUD decimals: 1 decimal if stat < 10, but 0 deci

Postby dave2085 » Thu Oct 15, 2026 11:41 am

This could be implented in a future update?!
It seems like there are couple of ways to implement it.
dave2085
 
Posts: 205
Joined: Mon Jun 02, 2008 10:41 am


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 0 guests