Adding Stat with Text

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Adding Stat with Text

Postby Leem » Wed Mar 22, 2017 1:04 pm

Hi Guys,

Hope you are good.

Wonder if you could help me please, I have input this into the value expression in order to categorise players by text not a number based on RFI.

if (cnt_p_raise_first_in > 20 and cnt_p_raise_first_in < 30, format('MED'),
if (cnt_p_raise_first_in < 20, format('NIT'),
if (cnt_p_raise_first_in > 30, format('FISH'))))

But it doesn't work, its just gives an (Err), any ideas guys?

Also is it possible to do this by position? Thanks.

Thanks a lot in advance.

Lee
Leem
 
Posts: 79
Joined: Thu May 19, 2011 5:06 pm

Re: Adding Stat with Text

Postby Leem » Wed Mar 22, 2017 1:44 pm

Image of my workings if that helps :)
Attachments
RFI.PNG
Leem
 
Posts: 79
Joined: Thu May 19, 2011 5:06 pm

Re: Adding Stat with Text

Postby WhiteRider » Thu Mar 23, 2017 3:52 am

Your final IF doesn't have an 'else' part:

if (cnt_p_raise_first_in > 30, format('FISH'))

You need something like:

if (cnt_p_raise_first_in > 30, format('FISH'), format('-'))

You will also need to make a simpler Value Expression - you need to have a numeric expression in the Value Expression and just use this in the Format Expression.
e.g. I'd just use the name of the column that you're using:
cnt_p_raise_first_in

I'm not sure this will do exactly what you want, though; you're testing the absolute number of times the player raised first in, not the percentage. If you want to test the RFI percentage then you'd need to use the same type of expression as the RFI stat; e.g.
if ((cnt_p_raise_first_in / cnt_p_open_opp) between 0.20 and 0.30, ...
WhiteRider
Moderator
 
Posts: 53972
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Adding Stat with Text

Postby Leem » Thu Mar 23, 2017 8:35 am

Fantastic WhiteRider, thanks :D

One thing if I may, if I want to make these stats positional eg. Nit from EP but agro monster from BTN, how best to add the position(s) to this?

Thanks again in advance

Lee
Leem
 
Posts: 79
Joined: Thu May 19, 2011 5:06 pm

Re: Adding Stat with Text

Postby WhiteRider » Thu Mar 23, 2017 10:27 am

To do that you'd need to make new columns for each position you want.
So for example you'd need to add a column like cnt_p_raise_first_in_btn, and in that expression include a test for position with "cash_hand_player_statistics.position = 0".
"EP" isn't so simple because that is different position numbers for different numbers of players (if you play more than 6-max) - you can see how EP is defined in a column by looking at "cnt_p_rfi_ep" for example. (In fact, this and cnt_p_rfi_btn are columns you'll want are already available as built-in stats, but you'll need to make new columns for other positions.)
WhiteRider
Moderator
 
Posts: 53972
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Adding Stat with Text

Postby Leem » Thu Mar 23, 2017 1:24 pm

Ok cheers for that, will have a go :D
Leem
 
Posts: 79
Joined: Thu May 19, 2011 5:06 pm

Re: Adding Stat with Text

Postby Leem » Thu Mar 23, 2017 1:51 pm

Hi Whiterider, this shows up as an invalid value expression, any idea why?

if ((cnt_p_raise_first_in / cnt_p_open_opp) between 0.20 and 0.30, format('FISH'), format('-'))

Thanks in advance

Lee :)
Leem
 
Posts: 79
Joined: Thu May 19, 2011 5:06 pm

Re: Adding Stat with Text

Postby Leem » Thu Mar 23, 2017 3:00 pm

Tried this simple one as a test but it just shows everyone as "Fish"
Attachments
Simple.PNG
Leem
 
Posts: 79
Joined: Thu May 19, 2011 5:06 pm

Re: Adding Stat with Text

Postby Leem » Thu Mar 23, 2017 3:47 pm

Apologies, update:

if ((this / cnt_p_open_opp) *100 <20, format('Tight'), format('-'))

This works fine but how do I add 'between 5 and 10' into this for example? I have tried several ways but it doesn't work.

Cheers again in advance
Leem
 
Posts: 79
Joined: Thu May 19, 2011 5:06 pm

Re: Adding Stat with Text

Postby Leem » Thu Mar 23, 2017 6:19 pm

Leem wrote:Apologies, update:

if ((this / cnt_p_open_opp) *100 <20, format('Tight'), format('-'))

This works fine but how do I add 'between 5 and 10' into this for example? I have tried several ways but it doesn't work.

Cheers again in advance


I am also wondering how we put multiple ifs into one stat eg. Nit, Fish, TAG etc.. Thanks
Leem
 
Posts: 79
Joined: Thu May 19, 2011 5:06 pm

Next

Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 35 guests

cron