Convert stat into a scale of 1-10 based upon user defined bo

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Convert stat into a scale of 1-10 based upon user defined bo

Postby oracle3001 » Sat Sep 15, 2012 7:02 am

I was wondering if it would be possible to convert say VPIP into scale of say 1 to 10 based upon user-defined boundaries (in the way colour coding may be done). Or if it possible to convert it into x many digit number e.g 1 digit to 10 digit, then I could use a custom font to convert that output into say 1 dot to 10 dots.
oracle3001
 
Posts: 851
Joined: Fri Jan 25, 2008 4:12 am

Re: Convert stat into a scale of 1-10 based upon user define

Postby WhiteRider » Sat Sep 15, 2012 12:47 pm

You can certainly make it a number from 1 to 10 (instead of 1 to 100) simply by duplicating the stat and changing the multiplier in the expression from 100 to 10.

(cnt_vpip / (cnt_hands - cnt_walks)) * 10

Set Format Type to Number and untick "Decimals" to display as a whole number.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Convert stat into a scale of 1-10 based upon user define

Postby oracle3001 » Sat Sep 15, 2012 1:18 pm

I presume because you aren't adding any new columns there should be any issues with caching / slow down?

Any idea about 1-10 digits? e.g. 10% -> 0, 20% -> 00, 30% -> 000 (or 1, 11, 111 if that is easier).
oracle3001
 
Posts: 851
Joined: Fri Jan 25, 2008 4:12 am

Re: Convert stat into a scale of 1-10 based upon user define

Postby WhiteRider » Sat Sep 15, 2012 4:24 pm

oracle3001 wrote:I presume because you aren't adding any new columns there should be any issues with caching / slow down?

Correct.

Any idea about 1-10 digits? e.g. 10% -> 0, 20% -> 00, 30% -> 000 (or 1, 11, 111 if that is easier).

I can't think of a terribly elegant way off the top of my head, but you could do something like this:

format( '{1}{2}...{10}', if( this>=1, '*', ''), if( this >=2, '*', ''), ... )

..(fill in the ... with increasing values in the same way) or:

if( this=1, '*', if( this=2, '**', if( this=3, '***', ... )))
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Convert stat into a scale of 1-10 based upon user define

Postby oracle3001 » Sat Sep 15, 2012 4:51 pm

Performance wise how do you think that would work out? I wondering is it is possible to replace a number of stats with something along these lines, would it cause a lot of extra work for the HUD process? The last thing I want to do is replace a series of stats with something that might be easier to read, but causing the HUD take forever to fill for villains who I have a lot of hands on.

Do you have a link to the operation of the function command. I know it is somewhere, but I just can't find it.
oracle3001
 
Posts: 851
Joined: Fri Jan 25, 2008 4:12 am

Re: Convert stat into a scale of 1-10 based upon user define

Postby oracle3001 » Sat Sep 15, 2012 5:17 pm

Sorry meant to say format command (not function command).
oracle3001
 
Posts: 851
Joined: Fri Jan 25, 2008 4:12 am

Re: Convert stat into a scale of 1-10 based upon user define

Postby kraada » Sun Sep 16, 2012 9:11 am

The extra time taken as a result of this kind of thing should be fairly trivial.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Convert stat into a scale of 1-10 based upon user define

Postby oracle3001 » Sun Sep 16, 2012 12:24 pm

Thanks. This seems to work very nicely.

It seems it is fairly easy to create / convert a stat into a very easy to see set of say dot or dashes.

I playing around with creating some "indicator" stats that give me some info on say a player tendency, which are likely to really make sense in terms of a %. But a scale of 1-5 dots or dashes might work very well.
oracle3001
 
Posts: 851
Joined: Fri Jan 25, 2008 4:12 am


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 0 guests