heads up hud

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

heads up hud

Postby yaqh » Sat May 29, 2010 8:20 pm

hey guys,

im finally getting around to trying to customize my hud for husngs. basically, i'd like it exactly the same as the default tourney hud except instead of Total/Blinds/EP/MP/LP we obviously just need SB/BB.

is there any way to do this without making slightly modified versions of 80 different stats, and, if not, is there any way to make slightly modified versions of the 80 different stats and enter them in place in a duplicate of the default hud involving, say, copying and pasting, without having to do the same thing 80 time in that supertilting gui interface?

thanks
yaqh
 
Posts: 34
Joined: Sat Mar 01, 2008 5:17 am

Re: heads up hud

Postby kraada » Sun May 30, 2010 8:51 am

There is a way to do this but it requires a little SQL.

Click Start --> Programs --> PostgreSQL --> psql to 'postgres', enter the postgres password (default is 'dbpass' without the quotes) and hit enter (note: you won't see *s, just type and hit enter). At the prompt type \l to list the databases then \connect "Your Database Here" and hit enter to connect to your database - the prompt will change to let you know you've connected successfully.

Then paste this command exactly and hit enter:
UPDATE lookup_positions SET flg_lp = TRUE and flg_blinds = FALSE where cnt_players = 2 and position = 9;

You will need to do this for every database you use in the HUD. After that, go into PT3 and run a Cache Rebuild.

Then in your HUD you can use LP to refer to the button (who is the small blind) and Blinds to refer to the person who posts the BB and is out of position. Note that you'll probably want to set your Player Ranges to include a range that's just for heads up - if you have it as 2-3, this data would get mixed in as late position data when 3 handed.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: heads up hud

Postby yaqh » Sun May 30, 2010 11:02 am

Hey Kraada,

Thanks for the quick response. Your suggestion seems like exactly what I was hoping for. However, I can't seem to get it to work. Maybe if I tell you exactly what I did, you can spot any mistakes.

So, my database is actually on a Linux box. I ran:

Code: Select all
$ psql -U postgres
psql (8.4.3)
Type "help" for help.

postgres=# \l
                                       List of databases
         Name          |  Owner   | Encoding | Collation  |   Ctype    |   Access privileges   
-----------------------+----------+----------+------------+------------+-----------------------
 PT3_2009_05_02_111851 | postgres | UTF8     | en_US.utf8 | en_US.utf8 |
 postgres              | postgres | UTF8     | en_US.utf8 | en_US.utf8 |
 template0             | postgres | UTF8     | en_US.utf8 | en_US.utf8 | =c/postgres
                                                                       : postgres=CTc/postgres
 template1             | postgres | UTF8     | en_US.utf8 | en_US.utf8 | =c/postgres
                                                                       : postgres=CTc/postgres
(4 rows)

postgres=# \connect PT3_2009_05_02_111851
psql (8.4.3)
You are now connected to database "PT3_2009_05_02_111851".
PT3_2009_05_02_111851=# UPDATE lookup_positions SET flg_lp = TRUE and flg_blinds = FALSE where cnt_players = 2 and position = 9;
UPDATE 1
PT3_2009_05_02_111851=# \q


where PT3_2009_05_02_111851 is indeed my active (and only) database. I'm not sure why I never needed to enter a password.

I then went to Housekeeping in PT3 and Rebuilt the Cache. I did the other housekeeping things too while I was there (except Reindex).

Then, I looked at the default tournament HUD in the hand playback window for a husng. The default HUD of course has columns for Blinds, EP, MP, and LP, and I expected to see non-zero stats in both the Blinds and LP columns, but I still only have data in the Blinds column. This is just as before. I have also restarted PT3 to make sure the HUD was reset or whatever and no luck.

Any ideas?

Thanks
yaqh
 
Posts: 34
Joined: Sat Mar 01, 2008 5:17 am

Re: heads up hud

Postby kraada » Sun May 30, 2010 11:47 am

That's very strange.

Could you please start PT3 with logging enabled and play in a single heads up tournament and attach the PokerTracker.log file to a support ticket and in the ticket also include the results of this query against the PT3 database:

SELECT * from lookup_positions;

That will give us a lot more information with which to figure out what is going wrong here.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: heads up hud

Postby yaqh » Sun May 30, 2010 12:22 pm

Hey,

So, I made a PT3 log and I'll upload it if you want, but it seems like the problem is with the SQL. The UPDATE statement seems to not be working? Here's what I mean:

Code: Select all
postgres=# \l
                                       List of databases
         Name          |  Owner   | Encoding | Collation  |   Ctype    |   Access privileges   
-----------------------+----------+----------+------------+------------+-----------------------
 PT3_2009_05_02_111851 | postgres | UTF8     | en_US.utf8 | en_US.utf8 |
 postgres              | postgres | UTF8     | en_US.utf8 | en_US.utf8 |
 template0             | postgres | UTF8     | en_US.utf8 | en_US.utf8 | =c/postgres
                                                                       : postgres=CTc/postgres
 template1             | postgres | UTF8     | en_US.utf8 | en_US.utf8 | =c/postgres
                                                                       : postgres=CTc/postgres
(4 rows)

postgres=# \connect PT3_2009_05_02_111851
psql (8.4.3)
You are now connected to database "PT3_2009_05_02_111851".
PT3_2009_05_02_111851=# SELECT * from lookup_positions;
 cnt_players | position | description | flg_blinds | flg_ep | flg_mp | flg_lp
-------------+----------+-------------+------------+--------+--------+--------
           2 |        9 | SB          | t          | f      | f      | f
           2 |        8 | BB          | t          | f      | f      | f
           3 |        0 | BUTTON      | f          | f      | f      | t
           3 |        8 | BB          | t          | f      | f      | f
           3 |        9 | SB          | t          | f      | f      | f
           4 |        0 | BUTTON      | f          | f      | f      | t
           4 |        1 | UTG         | f          | t      | f      | f
           4 |        8 | BB          | t          | f      | f      | f
           4 |        9 | SB          | t          | f      | f      | f
           5 |        0 | BUTTON      | f          | f      | f      | t
           5 |        1 | CO          | f          | f      | f      | t
           5 |        2 | UTG         | f          | t      | f      | f
           5 |        8 | BB          | t          | f      | f      | f
           5 |        9 | SB          | t          | f      | f      | f
           6 |        0 | BUTTON      | f          | f      | f      | t
           6 |        1 | CO          | f          | f      | f      | t
           6 |        2 | MP          | f          | f      | t      | f
           6 |        3 | UTG         | f          | t      | f      | f
           6 |        8 | BB          | t          | f      | f      | f
           6 |        9 | SB          | t          | f      | f      | f
           7 |        0 | BUTTON      | f          | f      | f      | t
           7 |        1 | CO          | f          | f      | f      | t
           7 |        3 | MP          | f          | f      | t      | f
           7 |        4 | UTG+1       | f          | t      | f      | f
           7 |        5 | UTG         | f          | t      | f      | f
           7 |        8 | BB          | t          | f      | f      | f
           7 |        9 | SB          | t          | f      | f      | f
           8 |        0 | BUTTON      | f          | f      | f      | t
           8 |        1 | CO          | f          | f      | f      | t
           8 |        2 | MP+1        | f          | f      | t      | f
           8 |        3 | MP          | f          | f      | t      | f
           8 |        4 | UTG+1       | f          | t      | f      | f
           8 |        5 | UTG         | f          | t      | f      | f
           8 |        8 | BB          | t          | f      | f      | f
           8 |        9 | SB          | t          | f      | f      | f
           9 |        0 | BUTTON      | f          | f      | f      | t
           9 |        1 | CO          | f          | f      | f      | t
           9 |        2 | LP          | f          | f      | f      | t
           9 |        3 | MP+1        | f          | f      | t      | f
           9 |        4 | MP          | f          | f      | t      | f
           9 |        5 | UTG+1       | f          | t      | f      | f
           9 |        6 | UTG         | f          | t      | f      | f
           9 |        7 | UTG         | f          | t      | f      | f
           9 |        8 | BB          | t          | f      | f      | f
           9 |        9 | SB          | t          | f      | f      | f
          10 |        0 | BUTTON      | f          | f      | f      | t
          10 |        1 | CO          | f          | f      | f      | t
          10 |        2 | LP          | f          | f      | f      | t
          10 |        3 | MP+2        | f          | f      | t      | f
          10 |        4 | MP+1        | f          | f      | t      | f
          10 |        5 | MP          | f          | f      | t      | f
          10 |        6 | UTG+1       | f          | t      | f      | f
          10 |        7 | UTG         | f          | t      | f      | f
          10 |        8 | BB          | t          | f      | f      | f
          10 |        9 | SB          | t          | f      | f      | f
(55 rows)

PT3_2009_05_02_111851=# UPDATE lookup_positions SET flg_lp = TRUE and flg_blinds = FALSE where cnt_players = 2 and position = 9;
UPDATE 1
PT3_2009_05_02_111851=# SELECT * from lookup_positions;
 cnt_players | position | description | flg_blinds | flg_ep | flg_mp | flg_lp
-------------+----------+-------------+------------+--------+--------+--------
           2 |        9 | SB          | t          | f      | f      | f
           2 |        8 | BB          | t          | f      | f      | f
           3 |        0 | BUTTON      | f          | f      | f      | t
           3 |        8 | BB          | t          | f      | f      | f
           3 |        9 | SB          | t          | f      | f      | f
           4 |        0 | BUTTON      | f          | f      | f      | t
           4 |        1 | UTG         | f          | t      | f      | f
           4 |        8 | BB          | t          | f      | f      | f
           4 |        9 | SB          | t          | f      | f      | f
           5 |        0 | BUTTON      | f          | f      | f      | t
           5 |        1 | CO          | f          | f      | f      | t
           5 |        2 | UTG         | f          | t      | f      | f
           5 |        8 | BB          | t          | f      | f      | f
           5 |        9 | SB          | t          | f      | f      | f
           6 |        0 | BUTTON      | f          | f      | f      | t
           6 |        1 | CO          | f          | f      | f      | t
           6 |        2 | MP          | f          | f      | t      | f
           6 |        3 | UTG         | f          | t      | f      | f
           6 |        8 | BB          | t          | f      | f      | f
           6 |        9 | SB          | t          | f      | f      | f
           7 |        0 | BUTTON      | f          | f      | f      | t
           7 |        1 | CO          | f          | f      | f      | t
           7 |        3 | MP          | f          | f      | t      | f
           7 |        4 | UTG+1       | f          | t      | f      | f
           7 |        5 | UTG         | f          | t      | f      | f
           7 |        8 | BB          | t          | f      | f      | f
           7 |        9 | SB          | t          | f      | f      | f
           8 |        0 | BUTTON      | f          | f      | f      | t
           8 |        1 | CO          | f          | f      | f      | t
           8 |        2 | MP+1        | f          | f      | t      | f
           8 |        3 | MP          | f          | f      | t      | f
           8 |        4 | UTG+1       | f          | t      | f      | f
           8 |        5 | UTG         | f          | t      | f      | f
           8 |        8 | BB          | t          | f      | f      | f
           8 |        9 | SB          | t          | f      | f      | f
           9 |        0 | BUTTON      | f          | f      | f      | t
           9 |        1 | CO          | f          | f      | f      | t
           9 |        2 | LP          | f          | f      | f      | t
           9 |        3 | MP+1        | f          | f      | t      | f
           9 |        4 | MP          | f          | f      | t      | f
           9 |        5 | UTG+1       | f          | t      | f      | f
           9 |        6 | UTG         | f          | t      | f      | f
           9 |        7 | UTG         | f          | t      | f      | f
           9 |        8 | BB          | t          | f      | f      | f
           9 |        9 | SB          | t          | f      | f      | f
          10 |        0 | BUTTON      | f          | f      | f      | t
          10 |        1 | CO          | f          | f      | f      | t
          10 |        2 | LP          | f          | f      | f      | t
          10 |        3 | MP+2        | f          | f      | t      | f
          10 |        4 | MP+1        | f          | f      | t      | f
          10 |        5 | MP          | f          | f      | t      | f
          10 |        6 | UTG+1       | f          | t      | f      | f
          10 |        7 | UTG         | f          | t      | f      | f
          10 |        8 | BB          | t          | f      | f      | f
          10 |        9 | SB          | t          | f      | f      | f
(55 rows)

PT3_2009_05_02_111851=#


Any ideas? Should I still open that support ticket?

Thanks for your help.

edit: As I said, it never asked for a password. Maybe it's not actually making the changes since I'm not authenticated or something? You'd think it would give an error if that were the case.
yaqh
 
Posts: 34
Joined: Sat Mar 01, 2008 5:17 am

Re: heads up hud

Postby kraada » Sun May 30, 2010 12:40 pm

Hm, try splitting it up into two pieces:

UPDATE lookup_positions SET flg_lp = TRUE where cnt_players = 2 and position = 9;
UPDATE lookup_positions SET flg_blinds = FALSE where cnt_players = 2 and position = 9;

I just checked and that definitely changes the database values for me.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: heads up hud

Postby yaqh » Sun May 30, 2010 12:43 pm

Cool, that changed the DB values. Let me rebuild the cache and I'll let you know if it works now.

edit: Sweet, success. Thanks for your help.
yaqh
 
Posts: 34
Joined: Sat Mar 01, 2008 5:17 am

Re: heads up hud

Postby yaqh » Sun May 30, 2010 2:29 pm

out of curiosity, why isn't this the default setting?
yaqh
 
Posts: 34
Joined: Sat Mar 01, 2008 5:17 am

Re: heads up hud

Postby WhiteRider » Mon May 31, 2010 5:39 am

I'll pass on that suggestion to the development team.
I believe there are plans to make this system more configurable, but it could potentially cause problems as a default. As Kraada said, if you don't use Player Ranges correctly then heads up SB stats would get mixed up with other LP stats.
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: heads up hud

Postby marvin » Sat Jun 05, 2010 5:34 pm

may be we will have other problem. if we set flg_blinds false, a lot of default stat can be confused (i thin somethingg about steal defense or stats where conditions are about flg_blinds. there are stat that use the flg blinds in default?
the better way i think, is that in hud configuartion where we can chose All position, ep, mp and lp, it will be added sb and bb (it would be simple why exists flg_sb and flg_bb i think.
otherwise, we can do like you seggest (switching flg to LP from blinds if in position 9) but it would be necessary that the default stat will not use flg blinds In their condition, but are referred in their construction only to the position (8, 9).
at the moment the default stat are refered to flg_blinds or we can change it without problem (switching to the LP)?
marvin
 
Posts: 327
Joined: Tue Jul 08, 2008 10:17 am

Next

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

Who is online

Users browsing this forum: No registered users and 19 guests

cron