Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Use "If" function in macro

1443558143

Edited 1443558273
Hi guys! I am totally new to Roll20, and have been setting up a game I'll play with some friends this weekend for some days now. I've chosen to make macros for all NPC and player attacks, to make combat more snappy, and less tiresome. My problem appears when I wish to use an already rolled number in a new calculation. So the idea is that I have a d100 system a-la Call of Cthulhu, where you have to roll for a successful attack, and then for damage. What I'm trying to do is to not make a roll, if the attack is not successful. It's mostly to make everything more pleasant to look at, not because it is completely needed. It also makes things easier when they have a critical success, since that in this system will allow them to do another skill-roll, to hit once more. So my macro looks like this, as of now (Censored since I am not aware of the guidelines on this forum yet): /me Throws a pile of s*** /gmroll {#S***}d20 Damage Where the macro S*** looks like this: /roll [[1d100<@{Tschiti Pu|Archery}!<1]] The idea is also that the players can see the other player's and NPC's rolls, without seeing their skilllevel. I wish to make the number of successes into the X in Xd20. How in the world can I do this? On top of that, I'm sorry if someone asked this before, but searching through the search engine did not give me anything. Kind regards Tobias Kosmos PS. I forgot the title before I posted, and forgot what my question really was in the writing of it. The "If" function I'm talking of is whether something like "If first roll is successful, /roll 1d20" is possible.
You can try /r [[ [[1d100<@{Tschiti Pu|Archery}!<1]] ]]  to hide the math from everyone (GM included)  Double [[ ]] to make it nested.
Jake M. said: You can try /r [[ [[1d100<@{Tschiti Pu|Archery}!<1]] ]]  to hide the math from everyone (GM included)  Double [[ ]] to make it nested. That just seems to roll the success check twice, and leave the d20, that signifies damage, all out of the equation. My problem is not the hiding, I've managed to make it nested already, my problem is using that "success" counter in a new roll. It's the "/gmroll {#S***}d20 Damage" I wish to make work, however possible.
I might be misunderstanding you (sorry), but something like this? /em throws shit for [[ [[1d100<@{Tschiti Pu|Archery}!<1]]d20 ]] damage!
Jake M. said: I might be misunderstanding you (sorry), but something like this? /em throws shit for [[ [[1d100<@{Tschiti Pu|Archery}!<1]]d20 ]] damage! Aha! So that's how it works! No worries with the misunderstanding, I am known to write some hardly understood, uneededly complicated sentences. But thank you so much for the help! You are truly a saint!
1443564423
Andrew R.
Pro
Sheet Author
I don't bother with my macros in my 13th Age campaign. All my attack macros use the default roll template, and I roll the attack and the damage and everything all in one macro. Then I just ignore the damage if the attack roll is a miss. For example: &{template:default} {{name= @{selected|token_name} Poison-Tipped Blow Dart}} {{attack= [[1d20 +@{Atk|max}]] vs PD}} {{hit= @{Dmg|max} damage, and rolls [[1d4]] for the effect of the flask’s contents}}
Andrew R. said: I don't bother with my macros in my 13th Age campaign. All my attack macros use the default roll template, and I roll the attack and the damage and everything all in one macro. Then I just ignore the damage if the attack roll is a miss. For example: &{template:default} {{name= @{selected|token_name} Poison-Tipped Blow Dart}} {{attack= [[1d20 +@{Atk|max}]] vs PD}} {{hit= @{Dmg|max} damage, and rolls [[1d4]] for the effect of the flask’s contents}} That would have been my option too, if not another solution was found. It's mostly because I play with completely new players, and am trying to make this as easy to understand as possible, so I'll leave out most GM rolls completely, from the chat. On top of that I know how draining a long combat can be for any player in the end, unless you're truly skilled roleplayers, who have somehow found a way to liven up the language in combat. But for new players, I'd like not to drag them through a million rolls in a combat, and turn down the time for a combat significantly.