It looks like you're new here. If you want to get involved, click one of these buttons!
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.
Comments
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:
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.