Hud, format numbers

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

Hud, format numbers

Postby koka778 » Fri Feb 18, 2011 3:38 pm

Hello!
Want to compact some space in my hud.
First of all I want format the numbers in the hud that they will show only 1 number.
For examle 1 instead 6 or 12, 9 instead 100 and low till 86.
Id make the custom stats, by just dup the general stats and put 10 instead 100% for the Value Expression.
I will do this with the "Check Raise Flop" stat for example:
(cnt_f_check_raise / cnt_f_check_raise_opp) * 10
it kinda worked, but then in pop-up for that stat of course Value is not correct, than I missed the opportunity numbers there.
My next step was to put format expression:
format_number( (cnt_f_check_raise / cnt_f_check_raise_opp) * 100, 2, false, false )
Than pop-up shows correct Value, but still no opportunity times.
What could I do to rich my plan ?
Thank you!
koka778
 
Posts: 47
Joined: Sun Nov 16, 2008 12:49 pm

Re: Hud, format numbers

Postby WhiteRider » Fri Feb 18, 2011 4:29 pm

This expression will work:

(cnt_f_check_raise / cnt_f_check_raise_opp) * 10

..but the times/opportunities will only work if you use 100.

You could leave the Value Expression as "(cnt_f_check_raise / cnt_f_check_raise_opp) * 100" and add a Value Expression like:
format_number( (cnt_f_check_raise / cnt_f_check_raise_opp) * 10, 0, false, false )
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Hud, format numbers

Postby koka778 » Fri Feb 18, 2011 5:53 pm

I really need to see times/opportunities stat sometimes, but I need the hud showing 1 number as well.
I will try to find other way, probably will make pop-up with the original stats, than in pop-up there I can see it.
Just don't sure if it is the best way ?
Also, is there any way to always showing 9 instead of 10 ? Still want to avoid 2 numbers.
Thank you!..
koka778
 
Posts: 47
Joined: Sun Nov 16, 2008 12:49 pm

Re: Hud, format numbers

Postby koka778 » Fri Feb 18, 2011 6:47 pm

WhiteRider wrote:This expression will work:

(cnt_f_check_raise / cnt_f_check_raise_opp) * 10

..but the times/opportunities will only work if you use 100.

You could leave the Value Expression as "(cnt_f_check_raise / cnt_f_check_raise_opp) * 100" and add a Value Expression like:
format_number( (cnt_f_check_raise / cnt_f_check_raise_opp) * 10, 0, false, false )


I left the Value Expression as "(cnt_f_check_raise / cnt_f_check_raise_opp) * 100" and added a Value Expression like:
format_number( (cnt_f_check_raise / cnt_f_check_raise_opp) * 10, 0, false, false ) in Edit Stat Info-Format-Format Expression tab,
but in the Hud appears still the same number - cnt_f_check_raise / cnt_f_check_raise_opp) * 100 ,
in the pop-up for that stat Value appears what I need ( * 10),also for Tracker its working, but in the hud- not.
Do I need to run housekeeping for all my dbs or what wrong did I do ?
koka778
 
Posts: 47
Joined: Sun Nov 16, 2008 12:49 pm

Re: Hud, format numbers

Postby WhiteRider » Sat Feb 19, 2011 6:06 am

Hmm - that's not working correctly for me either. I used to have a stat which worked like that - I'll mention this to the development team. In the meantime you could display the * 10 version in your main HUD and use the original * 100 stat in your popup, although that won't help for tooltips, I'm afraid.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Hud, format numbers

Postby koka778 » Sat Feb 19, 2011 11:08 am

ok,
is there any way to always showing 9 instead of 10 ? (Still want to avoid 2 numbers) Or will it lead me to the same problem?
koka778
 
Posts: 47
Joined: Sun Nov 16, 2008 12:49 pm

Re: Hud, format numbers

Postby WhiteRider » Sat Feb 19, 2011 12:01 pm

The simplest way will probably be to multiply by 9 instead of 10. This will lead to a few minor rounding errors, such as 46% being shown as 4 instead of 5, but otherwise you'll need to use the format expression to check for values over .95 and display another character instead.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 0 guests