Author Topic: VERY weird request.  (Read 1278 times)

Mesnik44

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
VERY weird request.
« on: September 02, 2015, 01:50:25 PM »
HI everyone,

I have a request and I am hoping someone out there knows how to make this.

I am using Clay Pharaoh's in my next tournament, but I am starting with fracs. So 1 round is 25¢ / 50¢. My 4th round is $1 / $2.

I do not want to see $1.00 / $2.00 for whole numbers. I want to see $1/$2 only.

Is this at all possible without messing up 25¢/50¢?

Thanks in advance.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: VERY weird request.
« Reply #1 on: September 03, 2015, 10:25:18 AM »
It is possible, but it's not very straightforward.  There are a couple of slightly different ways to do it.  Here's one, and I'll demonstrate for the Blinds.

The layout I'm working with has the Contents of the Blinds cell like this

<nobr>Blinds: <smallblind> - <bigblind></nobr>

Unfortunately there's no attribute roundOff on any of the blinds/limits/ante tokens, but we can resort to using the <expression> token:

<nobr>Blinds: <expression text="smallblind" format="money" roundOff="false" precision="2"> - <expression text="bigblind" format="money" roundOff="false" precision="2"></nobr>

That will work for the rounds where the blinds are less than $1.  For the rounds where blinds are $1 or more, you want to use:

<nobr>Blinds: <expression text="smallblind" format="money" roundOff="true"> - <expression text="bigblind" format="money" roundOff="true"></nobr>

To make this work, you need to set the Content of the Blinds cell for the Default property set to first version above.  Then you need to create a new property set, copy the Default property set, then change the Contents to the second version above.  Finally, on the new property set, edit the Conditions, select "Use advanced conditions", and set the Conditions to:

smallblind >= 1

Now the Blinds cell should use the $0.25 version when blinds are less than $1, and the rounded off version when blinds are $1 or greater.

* You may have noticed I used format="money" instead of format="chips".  It looks like the expression token ignores the precision and roundOff attributes when format is chips, and instead displays the results like it would other chip values.  If you don't want the currency symbol (which you get with the money format), change it to format="number".

* If you have a level where the small blind is less than $1 but the big blind is $1 or greater, you'll need a third property set, where the contents are a mix of the two versions above and the Conditions are "smallblind < 1 and bigblind >= 1".

Mesnik44

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: VERY weird request.
« Reply #2 on: September 03, 2015, 12:47:34 PM »
Thanks Corey!

I will try to implement this and let you know how it all works out.

As always, I really appreciate your assistance,

John.

Mesnik44

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: VERY weird request.
« Reply #3 on: September 03, 2015, 01:14:46 PM »
PERFECT SUPERMUNDO!

Thanks Corey!