Author Topic: Insert calculated starting BBs  (Read 111 times)

Blind Joe

  • Newbie
  • *
  • Posts: 32
    • View Profile
Insert calculated starting BBs
« on: December 28, 2021, 01:53:25 PM »
This is something I assumed was possible until I started trying to implement it, and it seems it isn't, or I'm missing something.

What I want to do is have a cell display the number of big blinds that a starting stack comprises, eg. the starting stack is 20,000 and the first big blind is 100 so the starting stack is 200BB.

At first I used (<buyinChips>/bigBlind round="1">) but this just displays that text string (which I realised is the obvious expected behaviour.

Next I tried making a token with the same string but this doesn't work either.

Is there a way to do this? I could do it manually if course but I'd quite like it to calculate automatically.

Cheers

Joe

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6019
    • View Profile
Re: Insert calculated starting BBs
« Reply #1 on: December 28, 2021, 04:01:57 PM »
You can do this, to a certain degree, using the <expression> layout token.  For example:

<expression text="defaultBuyinChips / bigBlind" format="number" precision="2">

However, the bigBlind variable refers to the current big blind.  There's no way to specify the big blind for a particular round (you noted the first big blind).

Blind Joe

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: Insert calculated starting BBs
« Reply #2 on: December 29, 2021, 01:44:18 AM »
Thanks Corey, I've implemented this now and it works. Having the calculation update with each round isn't what I originally had in mind but it works out OK as it informs players of what a rebuy stack will be worth in terms of blinds.