RECORDING PAST ACTIONS

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Re: RECORDING PAST ACTIONS

Postby kraada » Mon Nov 30, 2015 5:43 pm

Sorry, I thought you wanted something more abstract.

If you want to assign a color to a stat based on that stat's value you want to use the Color Ranges section in the Hud Editor as explained in this guide.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: RECORDING PAST ACTIONS

Postby tommyborstal » Mon Nov 30, 2015 6:28 pm

yah i do need something more abstract lol

as my outputs are non-numerical the colour range in HUD profile editor is not available.

i would have to put code into the colours tab in configure>statistics>colours

it is this i am struggling with
Attachments
sss.png
tommyborstal
 
Posts: 49
Joined: Wed May 21, 2014 4:34 pm

Re: RECORDING PAST ACTIONS

Postby WhiteRider » Tue Dec 01, 2015 3:43 am

Note that if you play at PokerStars or Full Tilt stats are only allowed to be coloured based on the stat's own value, so colour-defined stats are blocked for those sites.

If you play at another site and want to set up colours in your stat then you'll need to replace "L" with the name of the column you want to colour by in the expression. Don't use "L=50" exactly, use "your-column-name=50" or whatever.
WhiteRider
Moderator
 
Posts: 53961
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: RECORDING PAST ACTIONS

Postby potamito » Fri Sep 29, 2017 11:25 am

I got this to work but it display the info in a single line seperated by comas, what if i want to extract a single past action or create 10 custom columns each to extract one individual past action? Someone told me that perhaps using a function in the format type tab in the stat i can achive that? Anybody?
potamito
 
Posts: 802
Joined: Wed Apr 21, 2010 4:20 pm

Re: RECORDING PAST ACTIONS

Postby WhiteRider » Sat Sep 30, 2017 4:47 am

Can you paste the expression(s) you're using please? I don't see any complete expressions in this thread, so I'm not sure exactly what you're doing.
WhiteRider
Moderator
 
Posts: 53961
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: RECORDING PAST ACTIONS

Postby potamito » Sat Sep 30, 2017 3:51 pm

Code: Select all
(substr(string_agg(CASE
                   WHEN
tourney_hand_player_statistics.position = 8
                                            THEN (
                            CASE   
                               WHEN tourney_hand_player_statistics.flg_p_3bet AND NOT tourney_hand_player_statistics.enum_allin='P'
                                  THEN '3B'
                               WHEN tourney_hand_player_statistics.flg_p_3bet AND tourney_hand_player_statistics.enum_allin='P'                           
                                  THEN '3BS'                                   
 WHEN tourney_hand_player_statistics.position = 8
and lookup_actions_p.action = 'X'
                                  THEN 'X'
WHEN tourney_hand_player_statistics.flg_p_first_raise  AND NOT tourney_hand_player_statistics.flg_p_open_opp                 
                                 THEN 'ISO'
                               WHEN tourney_hand_player_statistics.flg_p_fold
                                  THEN 'F'                     
     WHEN tourney_hand_player_statistics.position=8 AND tourney_hand_player_statistics.flg_blind_def_opp AND lookup_actions_p.action='C' AND tourney_hand_player_statistics.val_p_raise_aggressor_pos=9
                                  THEN 'C'               
                                                     
                               ELSE '0'
                               END
                            )
                   ELSE NULL
                   END, ',' ORDER BY tourney_hand_player_statistics.date_played DESC), 01, 20))
potamito
 
Posts: 802
Joined: Wed Apr 21, 2010 4:20 pm

Re: RECORDING PAST ACTIONS

Postby BillGatesIII » Sat Sep 30, 2017 4:36 pm

*Disclaimer: The following answer is by heart :)

The ,01 ,20) in your code means it returns the first twenty characters of the recorded actions. But because for instance ISO has three characters and X has one, you don't know how many actions there will be in the string.

If you make the individual actions the same length, for example one character, the string will something look like this.

F,X,I,C,0,0,F,F,F,0,

So it wil return the last ten actions.

To get the one but last action (X in my example) change ,01, 20) to 03, 01).

More information:
https://www.postgresql.org/docs/current/static/functions-aggregate.html
https://www.postgresql.org/docs/9.6/static/functions-string.html
BillGatesIII
 
Posts: 740
Joined: Fri Dec 16, 2011 6:50 pm

Re: RECORDING PAST ACTIONS

Postby potamito » Sat Sep 30, 2017 7:18 pm

BillGatesIII wrote:*Disclaimer: The following answer is by heart :)

The ,01 ,20) in your code means it returns the first twenty characters of the recorded actions. But because for instance ISO has three characters and X has one, you don't know how many actions there will be in the string.

If you make the individual actions the same length, for example one character, the string will something look like this.

F,X,I,C,0,0,F,F,F,0,

So it wil return the last ten actions.

To get the one but last action (X in my example) change ,01, 20) to 03, 01).

More information:
https://www.postgresql.org/docs/current/static/functions-aggregate.html
https://www.postgresql.org/docs/9.6/static/functions-string.html

The last action on your example is "0," and i dont know as i think i covered all the possible actions so i dont expect to get that result as an action but either way and continuing with your explanation you mention "01, 20)" returns the first twenty characters of the recorded actions so the interpretation for "03, 01)" is that it will return the last 3 characters of a string meaning it would be " ,0" (counting the space between the last and the second last comma) is this correct?
Secondly, how can i not add the "," to the result? And lastly, how to add the second last? Thanks in advanced.
potamito
 
Posts: 802
Joined: Wed Apr 21, 2010 4:20 pm

Re: RECORDING PAST ACTIONS

Postby WhiteRider » Sun Oct 01, 2017 4:14 am

potamito wrote:so the interpretation for "03, 01)" is that it will return the last 3 characters of a string

3,1 will return 1 character from the 3rd position - as BillGatesIII points out that's the X is the example string.

potamito wrote:Secondly, how can i not add the "," to the result?

It looks to me as if the comma is being added by the:
','
..part of the last line:
END, ',' ORDER BY tourney_hand_player_statistics.date_played DESC), 01, 20))

potamito wrote:And lastly, how to add the second last?

I'm not sure what you mean by this?
WhiteRider
Moderator
 
Posts: 53961
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: RECORDING PAST ACTIONS

Postby BillGatesIII » Sun Oct 01, 2017 5:54 am

    Everything WhiteRider said plus this

    Code: Select all
    ORDER BY tourney_hand_player_statistics.date_played DESC)

    means the last action is at the most left position of the string, so second to last is the one next to it.
    BillGatesIII
     
    Posts: 740
    Joined: Fri Dec 16, 2011 6:50 pm

    PreviousNext

    Return to Custom Stats, Reports and HUD Profiles

    Who is online

    Users browsing this forum: Google [Bot] and 17 guests

    cron
    highfalutin