I think APIL could manage a good part of it... I'm just not familiar enough with the mechanics of the game system to write it cold. If you post what the command might otherwise look like for a normal roll and what it might look like for a twinned roll, I could be more specific. I'm going to lay out what I think it needs to do in the hopes that it can combine with Oosh's understanding of where we need to end up. It looks like we're talking about a roll template that needs to be modified on the fly, right? What you have to be careful of is that the Roll20 parsers will eat that roll template before it reaches the scripts, so you have to defer the recognition of it with backslashes. !?\{template:...}.... {&simple} I think that a slash in that one position should be enough to delay the recognition. We start it with the exclamation mark to engage it as an API call. The SIMPLE tag tells APIL to release the message as a flat chat message (not an API call) at the very end of the process... which is what a normal roll template would be. It would be a single command for either the normal spell or the twinned version. You would need a trigger to know when to use the twinned version. That could be a query or some sheet item status. Here is the roll query version, wrapped around the end of the template: {& if ?{Use twinned?|yes|no} = yes } {{innate= }}{& end} That way, if you are twinning it, you append that portion to the command line (which will eventually be recognized as a roll template). As for the sorcery points, if there is a way to decrement the sorcery points in the roll template (like I said, I don't know the system well enough), I would use a definition, referencing the spell in question: {& define ([spelllvl] *|Thornbald the Wanderer|spells|[spell_name = "Fire Doom"]|spelllevel) } (Note that the defined term is uniquely spelled so that you don't overwrite instances of "spelllevel" later in the command line.) Obviously that has to be adjusted to match the character's name, repeating list name, sub-attributes names, and spell name. But once you have all of that, you now have the level of the spell. You can use that in an IF block, later, embedded in whatever language handles the deduction of SP. {& if spelllvl = cantrip }1{& elseif spelllvl > 0}spelllvl{& else}0{&end} If it's cantrip, leave a 1. If it is greater than 0, leave what it is. Otherwise, leave a 0. (If, instead of having a '0' there for a spell level of 0 or less, you wanted to have no deduction language at all, just include that language in the IF block. One caveat... if there isn't language in the roll template that deducts the points for the spell, then APIL would have to engage a plugin to handle that. Plugins are currently in beta, but this would be a good test case for one.