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

Surprise Macro

1595325740

Edited 1595325873
Morning! So my group always want to try and get surprise rounds in, and since I am still somewhat new to DMing/trying to deal with players there is always debate on what is counted as surprise. Now I have a macro that rolls everyone's passive perception to me: /w GM &{template:default} {{name=Party Passive Perception}} {{Samalyn=[[@{Samalyn|passive_wisdom}]]}} {{Scarlet=[[@{Scarlet|passive_wisdom}]]}} {{Zee=[[@{Zee|passive_wisdom} ]]}} {{Gharl=[[@{Gharl Ruldegost|passive_wisdom} ]]}} {{Mad Kairon=[[@{Mad Kairon|passive_wisdom} ]]}} {{Nanleen=[[@{Nanaleen Dale|passive_wisdom} ]]}} {{Vasile=[[@{Vasile Dinescu|passive_wisdom} ]]}}  {{Sçad=[[@{Sçad|passive_wisdom} ]]}} And I have a token macro for Initiative: /r [[1d20+@{selected|Initiative_bonus} &{tracker}] I am wondering if I can combine the two to do the following: 1) Select all tokens in combat 2) Roll the Party's/Mob's Stealth against the Party's/Mob's Passive Perception (With option for selecting advantage) 3) Result to give me each individual roll and showcase who is surprised or not.
1595329431

Edited 1595329526
Oosh
Sheet Author
API Scripter
I'm assuming this is 5e... do you also need advantage/disadvantage for each individual player's passive perception (e.g. -5 in dim light). That's going to be quite a few Queries. Also, if you want a {passive_wisdom}>{stealth_bonus} success check, you're going to have 0's and 1's... you can't have it output a string like "not surprised". Is that what you're after? And it will have to be hard-coded with the PC names... if anyone's not there it'll output their line regardless.
Oosh said: I'm assuming this is 5e... do you also need advantage/disadvantage for each individual player's passive perception (e.g. -5 in dim light). That's going to be quite a few Queries. Also, if you want a {passive_wisdom}>{stealth_bonus} success check, you're going to have 0's and 1's... you can't have it output a string like "not surprised". Is that what you're after? And it will have to be hard-coded with the PC names... if anyone's not there it'll output their line regardless. To answer your questions: 1) Yes 5e 2) Adv/Dis and for passive perceptions would be good. 3) 1's and 0's are fine so long as I can make a note of what they are 4) No issues with that, whatsoever
1595333166

Edited 1595334409
Oosh
Sheet Author
API Scripter
Ah, something I was forgetting - you can't reuse the NPC's stealth roll for multiple checks. The two options are: Don't use the success evaluation, just output the creature's roll vs each player's PP and eyeball it. That would look like this: &{template:default}{{name=@{selected|character_name} Stealth Check}} [[?{Advantage on NPC stealth?|No,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1}+@{selected|npc_stealth}]] {{Samalyn=[[@{Samalyn|passive_wisdom}?{Samalyn PP advantage?|No,+0|Advantage,+5|Disadvantage,-5}[Adv]]] vs $[[0]] stealth}} {{Scarlet=[[@{Scarlet|passive_wisdom}?{Scarlet PP advantage?|No,+0|Advantage,+5|Disadvantage,-5}[Adv]]] vs $[[0]] stealth}} {{Zee=[[@{Zee|passive_wisdom}?{Zee PP advantage?|No,+0|Advantage,+5|Disadvantage,-5}[Adv]]] vs $[[0]] stealth}} Alternatively, roll the NPC's stealth first, then run this macro and enter it into a Query. For the players, a green box is a pass, red box is fail: &{template:default}{{name=@{selected|character_name} Stealth Check}} ?{NPC Stealth Roll?|10} {{Samalyn=[[ 1d[[floor([[@{Samalyn|passive_wisdom}?{Samalyn PP advantage?|No,+0|Advantage,+5|Disadvantage,-5}]]/?{NPC Stealth Roll?})]]cs>1cf0 ]]  -  ([[@{Samalyn|passive_wisdom}?{Samalyn PP advantage?}]]vs[[?{NPC Stealth Roll?}]])}} {{Scarlet=[[ 1d[[floor([[@{Scarlet|passive_wisdom}?{Scarlet PP advantage?|No,+0|Advantage,+5|Disadvantage,-5}]]/?{NPC Stealth Roll?})]]cs>1cf0 ]]  -  ([[@{Scarlet|passive_wisdom}?{Scarlet PP advantage?}]]vs[[?{NPC Stealth Roll?}]])}} {{Zee=[[ 1d[[floor([[@{Zee|passive_wisdom}?{Zee PP advantage?|No,+0|Advantage,+5|Disadvantage,-5}]]/?{NPC Stealth Roll?})]]cs>1cf0 ]]  -  ([[@{Zee|passive_wisdom}?{Zee PP advantage?}]]vs[[?{NPC Stealth Roll?}]])}} Do either of these look useful? Kinda running into the limitation of not being able to reuse rolls. The API could handle this though. A macro can't really handle an unknown number of rolls & calculations, so you won't be able to get this to run for a whole bunch of NPCs at once, you'd have to select them one by one and run it for each enemy type that is trying to stealth. The player version of the macro would be a bit different. Are you rolling stealth for them, or do they roll? Or are you using group stealth? Edit - whoops, modified the second macro... copied the wrong one in there!
Oosh said: Alternatively, roll the NPC's stealth first, then run this macro and enter it into a Query. For the players, a green box is a pass, red box is fail: &{template:default}{{name=@{selected|character_name} Stealth Check}} ?{NPC Stealth Roll?|10} {{Samalyn=[[ 1d[[floor([[@{Samalyn|passive_wisdom}?{Samalyn PP advantage?|No,+0|Advantage,+5|Disadvantage,-5}]]/?{NPC Stealth Roll?})]]cs>1cf0 ]]  -  ([[@{Samalyn|passive_wisdom}?{Samalyn PP advantage?}]]vs[[?{NPC Stealth Roll?}]])}} {{Scarlet=[[ 1d[[floor([[@{Scarlet|passive_wisdom}?{Scarlet PP advantage?|No,+0|Advantage,+5|Disadvantage,-5}]]/?{NPC Stealth Roll?})]]cs>1cf0 ]]  -  ([[@{Scarlet|passive_wisdom}?{Scarlet PP advantage?}]]vs[[?{NPC Stealth Roll?}]])}} {{Zee=[[ 1d[[floor([[@{Zee|passive_wisdom}?{Zee PP advantage?|No,+0|Advantage,+5|Disadvantage,-5}]]/?{NPC Stealth Roll?})]]cs>1cf0 ]]  -  ([[@{Zee|passive_wisdom}?{Zee PP advantage?}]]vs[[?{NPC Stealth Roll?}]])}} Do either of these look useful? Kinda running into the limitation of not being able to reuse rolls. The API could handle this though. A macro can't really handle an unknown number of rolls & calculations, so you won't be able to get this to run for a whole bunch of NPCs at once, you'd have to select them one by one and run it for each enemy type that is trying to stealth. The player version of the macro would be a bit different. Are you rolling stealth for them, or do they roll? Or are you using group stealth? Edit - whoops, modified the second macro... copied the wrong one in there! So the second one is definitely much more useful for me. It is a shame that I cannot roll multiple npc's at once but I am limited as not having access to API. In regards to the player aspect, they usually roll stealth individually (when alone) I am toying with Group stealth, for some reason the party seem to think that this is a fairer than everyone rolling indivudally and the risk of having some people be suprised and others not. My group is weird at times.