I've seen a lot of clamor for if/then capability in roll20 (outside of API and custom Roll Template things), and there is a workaround for certain situations you would want if/then functionality in your code using rollable tables that I don't often see discussed (probably because it is so situationally useful) and I figured I would post about in case it fit what someone needed. This workaround comes from roll20's order of operations , namely the fact that rollable tables are considered "rolls" and are therefore evaluated after Roll Queries! 1. What is the workaround? So here's the gist of it: you embed a roll query inside the name of a roll template that you are rolling, then have a series of rollable tables with the values you want made in your rollable tables tab. Here's what that would look like: /me checks the value of an item of Level ?{Level|1}: [[ 1t[ItemLvl?{Level|1}] ]] gp. You would then have a series of rollable tables made up with single entries. For instance in 4e, ItemLvl1 would be a table with an entry of 360, ItemLvl2 would be a table with an entry of 520, ItemLvl3 would be a table with an entry of 680, and so on. Thus, in this sort of sense, you use a Roll query as an "If" to find the right table, which then contains an entry that is your "then." Because the Roll Query is evaluated before the table is rolled, you don't get the usual problem like you would if you tried to make an attribute @{ItemLvl1}, as it would look for an attribute named "@{ItemLvl?{Level", attempting to evaluate the attribute before the roll query makes the attribute meaningful (see order of ops link above). 2. What is it useful for? It is primarily useful for numeric things that are non-linear, such as a loot generator. For one of my 4e campaigns, I have a loot generator that looks like the following: /desc The party divides up the loot! /w gm Gold for Level ?{Level|1}: [[floor(((?{Experience|0}/(1t[ExpL?{Level|1}]))*(0.75+0.1*(4d5/4)))*1t[ItemL?{Level|1}]) ]] gp. In this macro, Experience gained for each PC and the Level of each PC is asked for using a Roll Query and then the resulting input is used to determine 1. How much experience they gained relative to how much they need to reach the next level (found in the tables ExpL1 through ExpL30) and 2. How much gold an item of the player's level is worth (found in ItemL1 through ItemL30) so that their reward is properly scaled to them. Because item values in 4e increase geometrically/multiplicatively rather than arithmatically, and the Experience from level to level also jumps around (and roll20 does not have exponent support), using rollable tables (even ones that only have one entry) as if/then statements allows proper scaling to be implemented. You could also add randomization into your loot generator by having several entries in the rollable table, e.g. instead of just having "1000" in ItemL5, you could add in entries for 900 or 1100 as well. (You may notice that I don't do that above, instead using die rolls to add "luck" to the loot). Note: While it is open to more than just Mentor/Pro subscribers (unlike
API and custom roll templates), it does require you to be a GM in the
campaign in order to make and edit the rollable tables. 3. What can it NOT do? The short answer is " LOTS. " This little workaround is really only good for things that have numeric outputs, as words in rollable table outputs are done as Strings which cannot be evaluated. (To see what I mean, try making a rollable table called "test" that has "d20" as one of the entries, then try to do [[ [[ 1t[test] ]] ]]. It will not evaluate the d20, but rather show "d20" as the output text, then turn that into a "0"). I also cannot see a way for this to be used to instantly show crit damage when nat 20s are rolled (as roll templates can). Nor will it determine if an attack roll is higher than a defense and instantly subtract HP. All it really can do as far as I can tell is output the correct number(s) in response to your inputs. I would welcome thoughts on other ways this could be useful, but I hope it is helpful in its own limited way to some other folks on roll20. Cheers!