Question on "!" in expressions

Hi all,

This is mostly for Ed, but anyone else who knows the answer is encouraged to educate me.

Ed - I noticed on your "Conan Bandits" table, you use the "!" in strange and new ways. I understand how to use "!" for deck picks, but can you explain how/why "!" is used for seemingly other purposes? For example, in variable assignment:
Set:str={!{1d6+7}+{$stroff}+{$statadj}}

or in situations when you're only rolling once on a table anyway:
Wealth: [#{!{1d6}+{$level}} coins]

This last one has me intrigued. It looks like you're making a deck pick roll on the "coins" table a number of times equal to 1d6+level, but the output seems like you're only actually rolling once.

Is there some deep secret to "!" that I don't know about?

Cheers,

Comments

  • Hi esmale,

    I was interested in looking at the odd "!" usage, but I can't find any "Conan Bandits" table anywhere. Where should I look?

    I give it a 50% chance that I'll feel really dumb after receiving your answer.
  • Ah - this is a table from Ed's personal campaign. He shared it to illustrate some syntax. I trust I'm not giving away too much, but it contains calls like this:
    Wealth: [#{!{1d6}+{$level}} coins] \n&
    <then, later on...>
    Table: Coins
    type:Lookup
    1:None
    2:{1d6} Silver
    3:{2d6} Silver
    4:{3d6} Silver
    5:{4d6} Silver
    6:{5d6} Silver
    7:{5d6} Silver, {1d6} Gold 
    8:{5d6} Silver, {2d6} Gold 
    9:{5d6} Silver, {3d6} Gold 
    10:{5d6} Silver, {4d6} Gold 
    11:{5d6} Silver, {5d6} Gold 
    12:{5d6} Silver, {5d6} Gold, {1d4} Gems worth {!{1d10}*10} gp each
    13:{5d6} Silver, {5d6} Gold, {1d4} Gems worth {!{1d10}*10} gp each, {1d4} Gems worth {!{1d10}*10} gp each
    

    Based on the "Wealth" line, let's say 1d6+level equals "4", and so you'd get this: ([#{!4} coins]}, which confuses me. Initially, it looks like it would roll 4 deck picks on the coins table (i.e., "!4"), but the "#" seems like it would force a single roll of "4" on the coins table.

    There's also some weirdness on entry 13 of the coins table (Gems worth {!{1d10}*10} gp each) - why not just say {1d10*10}?

    Cheers,
  • Thanks! I'll take a look, see if I can make sense of it.

    Added bonus: I don't feel dumb for not finding it.
  • Oh, OK. So I ran a simple comparison,
    table: test
    {!{1d1}*10}\n&
    {{1d1}*10}
    
    ...and saw no differences.

    To the documentation! After a search for "{!" in the PDF, there it was!
    {!math} (math expressions)
    This tag, while still supported for backwards compatibility, is no longer required. See Expressions
    for more information.

    My guess, then, is that it was either really old code, or Ed's used to using a the old style.
  • My guess, then, is that it was either really old code, or Ed's used to using a the old style.

    Ah...That must be it - good hunting.

    Added bonus: I feel dumb for not having seen that in the help file.

    On the plus side, I'm glad to know I wasn't missing out on some crucial syntax.

    Cheers,

Leave a Comment