Making and using 'own stat' stats?

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

Making and using 'own stat' stats?

Postby Starman » Mon Apr 26, 2010 12:10 pm

a) I like to colour my opponents' HUD stats relative to my own. I do this presently by using condition expressions based on the numerical values of each of my stats, but I'd like to automate it to accommodate potential changes in my play. To do this, I think I'd need to make new stats that would retrieve only my figures (for example, 'My VP$IP'). How would I do this?

b) Assuming a) is possible, would the following format then work as a condition expression for a player whose VP$IP was, say, +/- 2.5% of my own:
(#My VP$IP# * 0.975) <= #VP$IP# < (#My VP$IP# * 1.025)?

Or perhaps there's an easier way?

Thanks
Starman
 
Posts: 40
Joined: Thu Aug 06, 2009 4:09 am

Re: Making and using 'own stat' stats?

Postby WhiteRider » Mon Apr 26, 2010 3:54 pm

You can't do (a) - at least I can't think of a way to do it. Stats are always calculated for the current player, not someone else.

(b) should be fine, though. You should be able to create a fixed value Variable with the value of your VP$IP - it wouldn't be the calculated value, but you could set it in one place so that if it changes you would only have to update this one place.
Create a Variable called my_vpip (or whatever) and give it a fixed value, then use that in your colour conditions.
e.g. (my_vpip * 0.975) <= #VP$IP# AND #VP$IP# <= (my_vpip * 1.025)
Does that make sense?
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Making and using 'own stat' stats?

Postby Starman » Mon Apr 26, 2010 6:43 pm

It makes sense in that I'd only need to change one thing per stat rather than all the individual conditions, so thanks. :)
Starman
 
Posts: 40
Joined: Thu Aug 06, 2009 4:09 am


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

Who is online

Users browsing this forum: No registered users and 0 guests