Page 1 of 1

Hud, format numbers

PostPosted: Fri Feb 18, 2011 3:38 pm
by koka778
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!

Re: Hud, format numbers

PostPosted: Fri Feb 18, 2011 4:29 pm
by WhiteRider
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 )

Re: Hud, format numbers

PostPosted: Fri Feb 18, 2011 5:53 pm
by koka778
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!..

Re: Hud, format numbers

PostPosted: Fri Feb 18, 2011 6:47 pm
by koka778
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 ?

Re: Hud, format numbers

PostPosted: Sat Feb 19, 2011 6:06 am
by WhiteRider
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.

Re: Hud, format numbers

PostPosted: Sat Feb 19, 2011 11:08 am
by koka778
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?

Re: Hud, format numbers

PostPosted: Sat Feb 19, 2011 12:01 pm
by WhiteRider
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.