Need to roll several times on a table with different results

I know what I want to do but I cant work out how to use the code
I have a table that rolls d100 but the results go from 1 to 140
roll on the table d100 but one of the results is roll again but add 40.
every time I define Set: Roll ={1d100} it uses the same number - I want it to roll d100 each time it is called.
Any help would be appreciated.


  • edited May 2020

    First, drop the Set:Roll variable definition. It's not needed when you want a new die roll each time you enter the table.

    Try something like this:

    ; Test-Roll140.ipt
    ; created 5/26/2020 10:50:15 AM
    Table: Main
    [#{1d100} Title]
    Table: Title
    Type: Lookup
    ;1 - 50: Knight
    1 - 50:[#{{d100}+40} Title]
    51 - 62: Baronnet
    63 - 86: Baron
    87: Archbaron 
    88: Viscount
    89 - 98: Count
    99: Marquis
    100:[#{{d100}+40} Title]
    101 - 130: Duke
    131: Grand Duke
    132: Archduke
    133 - 138: Prince
    139: Crown Prince
    140: King

    Now, I made the d100+40 call on a roll of 1 to 50 here, just so we can see it works on test runs (I get a lot barons, counts, and dukes... duke is a roll over 100, so it works). Once you're convinced it works, you can make 1 - 50 a knight again, and it will only reroll d100+40 if the initial roll is a 100. This makes a major noble/royal a 1% chance (even less than 1%, since the reroll can be 41-140, which is still a 60% chance of a minor noble).

    Make sense how you can call that reroll within the lookup table itself, but have the +40 modifier. Could even make the reroll 1d140 if you wanted an equally weighted 1 - 140 resulting roll. Or, make it [#{{d40}+100} Title] if you wanted an initial roll of 100 to always result in a major noble/royal with the reroll result being 101-140 (or, in this case, just have a separate table for royals, and have the lookup be 100: [#{d40} Royal]).

  • Thank you so much for your help - now that I see it it makes sense.

Leave a Comment