Tutorial: Convert Cash Stat to Tournament

Frequently Asked Questions/Answers, Tutorials, and Common How To's

Moderator: Moderators

Tutorial: Convert Cash Stat to Tournament

Postby WhiteRider » Mon Mar 16, 2009 7:20 am

Converting a Statistic from Cash to Tournament

If you have a cash statistic that you want to use for tournaments too you need to recreate it in the appropriate tournament section.
This process works the same way to convert tournament statistics for use in the cash section.


As an example, let's say you've downloaded the "Preflop Limp Fold" stat from the repository.
This is a cash stat (in the 'Holdem Cash Player Statistics' section, so can be used in the HUD) but if you want to use it for tournaments you will need to recreate it in the 'Holdem Tournament Player Statistics' section.

1. Open the custom statistics window from the menu Configure -> Configure Statistics.

menu configure stats.png
(7.29 KiB) Downloaded 6325 times


2. First we need to see how the original Statistic is constructed and make a note of all the information so that we can recreate it.
The stat we're recreating is in the 'Holdem Cash Player Statistics' section, so select this on the Sections tab.

sections - hcps.png
(18.39 KiB) Downloaded 5369 times


3. Now select the Statistics tab and find the "Preflop Limp Fold" stat in the list on the left.

    Tip! If you don't have it, you can download it from the Repository or create it yourself using similar steps to what follows here.

statistics - preflop limp fold.png
(23.03 KiB) Downloaded 5304 times


4. Make a note of the information on this page - you'll need it soon. You should note the information on the Format and Categories tabs as well as Definition.

    Tip! I usually copy & paste this into notepad so that I have it to hand when creating then new stat and columns.

If you want to play along, I'll include it here:

    Definition
      Preflop Limp Fold
      Percentage of times the player limped, and then folded when raised (preflop)
      (cnt_p_limp_fold / cnt_p_limp_faceraise) * 100
    Format
      Limp-Fold
      50
      /%.1f
    Categories
      Actions
      Passiveness
      Street - Preflop

5. In particular you need to note which columns the statistic uses as we need to recreate these too.
In this case the stat uses cnt_p_limp_fold and cnt_p_limp_faceraise so select the Columns tab and find them in the list on the left.
Again, note the information about these columns.

columns - cnt_p_limp_fold.png
(24.62 KiB) Downloaded 5301 times

cnt_p_limp_fold =
sum( if[holdem_hand_player_statistics.flg_p_limp AND substring(lookup_actions_p.action from 2 for 1)='F', 1, 0] )
Number of times the player limped and then folded to any raise, preflop.

columns - cnt_p_limp_faceraise.png
(24.64 KiB) Downloaded 5337 times

cnt_p_limp_faceraise =
sum( if[holdem_hand_player_statistics.flg_p_limp AND holdem_hand_player_statistics.flg_p_face_raise = true, 1, 0] )
Number of times the player limped and faced a raise.

6. We now have all the information we need to recreate the stat in the tournament section, so go back to the Sections tab and select "Holdem Tournament Player Statistics".

sections - htps.png
(18.41 KiB) Downloaded 5352 times


7. We need to create the columns before we can create the statistic, so select the Columns tab.

7a. Create a new column by clicking the New button.

7b. Copy&Paste (or type) the Name of the new column: let's start with:
Code: Select all
cnt_p_limp_faceraise


    Note: You can use the same name as the original column in the cash section because each section is completely separate.
7c. Copy&Paste (or type) the Expression:
Code: Select all
sum( if[holdem_hand_player_statistics.flg_p_limp AND holdem_hand_player_statistics.flg_p_face_raise = true, 1, 0] )"

This uses cash database tables and fields so we now need to change it to use the tournament versions of the same fields.
You can just edit the text, but to make sure you make the change correctly the safest way to do this is to highlight one of the database fields (as in the following image).

htps - cnt_p_limp_faceraise1.png
(25.77 KiB) Downloaded 5323 times


7d. Click Insert to open the Choose What to Insert window.
Select "tourney_holdem_hand_player_statistics" (the tournament version of the "holdem_hand_player_statistics" table) on the left and then "flg_p_limp" on the right, and click OK.

htps - insert.png
(13.77 KiB) Downloaded 5289 times


The Expression will now look like this:

htps - cnt_p_limp_faceraise2.png
(2.59 KiB) Downloaded 6300 times


7e. You then need to do the same for the other database field that this column uses; "holdem_hand_player_statistics.flg_p_face_raise".
You can either select it and use the Insert link again to select the tournament version as you did for the other field, or you can just add "tourney_" to the front of the table name.

The Expression will now look like this and you can click the Validate link to check that everything is correct.

htps - validate.png
(30.63 KiB) Downloaded 5357 times


7f. Finally add the Description ("Number of times the player limped and faced a raise.") and the finished Column looks like this, and we can click Save:

htps - cnt_p_limp_faceraise3.png
(25.08 KiB) Downloaded 5347 times


8. Repeat this process to create the second new column "cnt_p_limp_fold".
The new column should look like this:

htps - cnt_p_limp_fold.png
(24.95 KiB) Downloaded 5291 times

Note: The database field lookup_actions_p.action used in this column does not need changing because the same lookup table is used for cash and tournament hands.

9. Now that we have both Columns we are ready to build the new Statistic so select the Statistics tab.
Enter (Copy&Paste or type) the Name, Description and Value Expression.
These can be exactly the same as the cash version of the stat as we gave the new Columns the same names.

9a.
Code: Select all
Preflop Limp Fold


9b.
Code: Select all
Percentage of times the player limped, and then folded when raised (preflop)


9c.
Code: Select all
(cnt_p_limp_fold / cnt_p_limp_faceraise) * 100


htps - Preflop Limp Fold 1.png
(23.36 KiB) Downloaded 5316 times


10. Repeat this for the Format and Categories tabs.

htps - Preflop Limp Fold 2.png
(5.52 KiB) Downloaded 6319 times

htps - Preflop Limp Fold 3.png
(7.92 KiB) Downloaded 6310 times

To add a Category select it in the list on the left and click the right arrow button.

The new Statistic is now complete, so click Save.
You need to click Apply to close this window and apply your changes.

The new Statistic is now available for use in reports and [after you stop the HUD, if it is running] can be added to your HUD.
Tutorial: Managing HUD Groups
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Return to FAQs, Tutorials, and How To's [Read Only]

Who is online

Users browsing this forum: No registered users and 0 guests