Feature Request: Flexibility in Lookup Table Roll attribute

When using a lookup table, I'd like to be able to call another table (ie: Roll:[@blah]), or use conditionals/expressions (ie: Roll:[when]{$prompt1}=blah[do]1d100[else]1d6[end] or {if({$prompt1}=blah,'1d100','1d6')}

I have tried all of these, and the closest I can get is to pass a variable with the >> with filter, which gets me Roll:{$1}. This is useful, but those additional functions would be extra useful.

Keep up the great work, this is an amazing tool!


  • Rolls like 1d100 or 1d6 are very flexible. For example, here's putting a user prompt as a conditional to select which die to roll. Instead of specifying a die to roll, there is a conditional; if met, roll a d100; if false, roll a die corresponding to the user prompt input. It obviously errors if the user input is not a positive integer number.

    ; TestDieRoll.ipt
    ; created 2/21/2019 4:33:57 PM
    Prompt: Enter die sides {} 100
    Table: Main
  • edited February 2019

    Here's another quick idea. In this example, I've weighted table [@blah] so that the first choice show up 200x more frequent than the others, meaning it rolls 1d10+20, or 21 to 30. It should always come up "dagger", and it does. Change up that first choice in table [@blah] to "10" or "10+10" and see it come up only sword or only spear. Of course now you could make Blah a lookup or dictionary table and send a more complex call for it to choose dice. Also, you should be able to replace the "1" in 1d with an expression or table call which returns how many dice will be rolled.

    ; TestDieRoll.ipt
    ; created 2/21/2019 4:33:57 PM
    Table: Main
    [#{1d[@blah]} Weapon]
    Table: Weapon
    Type: Lookup
    1-10: sword
    11-20: spear
    21-30: dagger
    Table: blah

    And another little fun one that makes a bit more practical sense:

    ; TestDieRoll.ipt
    ; created 2/21/2019 4:33:57 PM
    Prompt: Enter Class {Cleric|Fighter|Mage} Mage
    Prompt: Enter Level {}1
    Table: Main
    HP's is {{$prompt2}d[#{$prompt1} Class]}\nHit Dice is {$prompt2}d[#{$prompt1} Class]
    Table: Class
    Type: Dictionary
  • I get what you're saying, but that unfortunately is overlooking my mention of a Lookup-type table. I would like to modify the roll of a Lookup table on each separate access of that table. Your suggestion does not facilitate that, although it works just fine on a Weighted table, which is what you show for example.

  • edited February 2019

    Okay, your second post is more amenable for what I was needing. Basically, you're creating a table that defines the roll, and then simply passes that roll to the Lookup table without needing the Lookup table to have it's own Roll attribute. That will definitely work for my purposes.

    As for the feature request, I would like to leave it standing until weighed-in by devs, as I believe that would be a simple way to add programmatic flexibility to the Lookup table type.

Leave a Comment