Main > Help Me

Automatic prizes - complex formula?

(1/1)

CHJarzza:
I need help with automatic prizes. I would like to make code that makes number of players in automatic prizes to be [number of buy-ins+(number of re-entries/2)]. How?

-J

Corey Cooper:
You'll have to edit the file "autoPrizes.xml" yourself, using Notepad or any other text editor.  In it you'll see a section like this:

  <levelSelection method="predefined">
    <predefined countBuyins="true" countRebuys="false" countAddOns="false" />
    <formula text="buyins + (totaladdons * 2)" />
  </levelSelection>


Replace the formula text with your own:

  <levelSelection method="predefined">
    <predefined countBuyins="true" countRebuys="false" countAddOns="false" />
    <formula text="buyins + (totalrebuys / 2)" />
  </levelSelection>


Note that the TD app doesn't support re-entries at this time, so I've replaced it with rebuys.

To find the file, go to the Preferences tab and press the "Config Files" button.  Select "Prizes Files" and then press the Browse button under "Automatic Prizes Configuration".  That will open the folder to the autoPrizes file.  You can right-click the file and select "Edit".

CHJarzza:
Where is the error?

Corey Cooper:
It's missing the <prizeConfig> line at the top:

<?xml version="1.0" encoding="UTF-8"?>
<!--
  The Tournament Director
  Copyright (c) 2004 - 2010 Corey Cooper
  -->
<prizeConfig>
<prizeLevels>
  <prizeLevel minPlayers="1" maxPlayers="14">

Also (unrelated to the error) the "method" attribute needs to be changed:

<levelSelection method="formula">
    <predefined countBuyins="true" countRebuys="false" countAddOns="false" />
    <formula text="buyins + (totalrebuys / 2)" />
  </levelSelection>

CHJarzza:
Thank you!

Navigation

[0] Message Index

Go to full version