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

Rangers of Shadow Deep attacks

In Rangers of Shadow Deep, combat is simultaneous: we both roll 1d20 plus our Fight bonus. The loser's die is discarded; the winner's die is compared to the loser's armour. So if I roll 15+3=18 and the zombie rolls 6+1=7, I hit with an 18 and the zombie takes 18 points of damage minus his armour of 12, so it takes 6 points of damage. Can this be created in a macro? I get as far as comparing the two, but even that isn't great as it doesn't say who won. /r {(d20cs20+@{selected|Shoot}), (d20+@{target|Fight})}kh1
1638288031
.Hell
Sheet Author
You could put out the results if each would hit and manually decide who won the battle.
I can do that with this, but I'm hoping someone can help automate it. &{template:default} {{name=@{selected|name} shoots:}} {{Shoot=[[d20cs20cf0+@{selected|Shoot}]]}} {{Defense=[[d20cs21cf0+@{target|Fight}]]}} {{Target Armor=@{target|armortotal}}}
1638290901
timmaugh
Pro
API Scripter
If scripts are available it's easy. There is no if/then logic to the chat or die roller without a script, and you can't use the re-using rolls trick if you wrap them in a keep-high/keep-low (which you'd have to do to apply a value comparison, instead).
timmaugh said: If scripts are available it's easy.  I think you're saying it's only possible with a Pro subscription and API scripts, right?
1638298094
timmaugh
Pro
API Scripter
I hesitate to say that it's impossible without the API... because, honestly, that's like saying "RainbowEncoder" or "Oosh" in the mirror three times. Then they materialize with a mighty, "Foolish mortals!"... and an elegant solution. =D But I *am* saying that I could do it easily with a couple of metascripts.
timmaugh said: I hesitate to say that it's impossible without the API... because, honestly, that's like saying "RainbowEncoder" or "Oosh" in the mirror three times. Then they materialize with a mighty, "Foolish mortals!"... and an elegant solution. =D *hurls macros from the mirror universe* &{template:default} {{name=@{selected|name} shoots:}} {{Shoot}} {{Defense}} [[@{target|armortotal}]] {{Target[1](" hidden)=**Missed!**}} {{Target[0](" hidden)}} {{Target[[[{[[ [[ [[d20cf0+@{selected|Shoot}]]-@{target|armortotal}]]+@{target|armortotal}]],0}>[[d20cs21cf0+@{target|Fight}]] ]]](" hidden)=**Hit** for $[[3]] damage!}} {{Target[0](" hidden)=**Armor** $[[0]]}} {{Shoot=$[[1]]}} {{Defense=$[[2]]}} I wouldn't necessarily call it elegant, but it looks like this:- Notice that it can show negative damage values if the Shoot roll is lower than the Target Armour. So I also wrote an alternative &{template:default} {{name=@{selected|name} shoots:}} {{Shoot}} {{Defense}} [[@{target|armortotal}]] {{Target[1](" hidden)=**Missed!** or weak shot}} {{Target[0](" hidden)}} {{Target[[[floor({[[d20cs21cf0+@{target|Fight}]],@{target|armortotal}+1}<[[ [[ [[d20cf0+@{selected|Shoot}]]-@{target|armortotal}]]+@{target|armortotal}]]/2) ]]](" hidden)=**Hit** for $[[3]] damage!}} {{Target[0](" hidden)=**Armor** $[[0]]}} {{Shoot=$[[2]]}} {{Defense=$[[1]]}} The hit message looks the same but on misses, or if shoot roll - armour is 0 or less it looks like:- So feel free to choose whichever one is more appropriate
1638312255
David M.
Pro
API Scripter
That's some next level voodoo
Unbelievable! We tested it and it worked.
Thank you for this, RainbowEncoder. It works for Shooting attacks, where the shooter can't take damage. It doesn't seem to work for Fight attacks, as either side could win and damage the other.
Would that be 1d20+@{selected|Fight} vs 1d20+@{target|Fight}? What is your current macro for that, or is it the same one?
Yes, we're doing the math manually. &{template:default} {{name=@{selected|name} fights:}} {{@{selected|name} Fight=[[d20cs20cf0+@{selected|Fight}]]}} {{@{target|name} Fight=[[d20cs21cf0+@{target|Fight}]]}} {{@{target|name} Armor=@{target|armortotal}}} In the first example, the zombie wins the first fight (7 v 5) but doesn't do enough damage to break armour (7 v 14). In the second, Rook wins (18 v8) and deals 6 damage to the zombie (18 v 12).
What happens in a tie? I see a few possibilities. Although the same trick won't work twice I could still show both potential damage values and list Win vs Lose separately.
In ties, they both damage each other.
&{template:default} {{name=@{selected|name} fights:}} {{@{selected|name} Fight}} {{@{target|name} Fight }} {{@{selected|name} Armor=[[@{selected|armortotal}]]}} {{@{target|name} Armor =[[@{target|armortotal}]]}} {{Fight[0](" hidden)=**A decisive fight!**}} {{Fight[-1](" hidden)=The defending **@{target|name}** takes damage!}} {{Fight[1](" hidden)=The attacking **@{selected|name}** takes damage!}} {{Fight[[[{@{target|armortotal}+([[ [[d20cf0+@{selected|Fight}]]-@{target|armortotal}]])-([[ [[d20cs21cf0+@{target|Fight}]]-@{selected|armortotal}]])-@{selected|armortotal}+1,1}>2f<0]]](" hidden)=**@{selected|name}** vs **@{target|name}**}} {{@{selected|name} Fight=$[[2]] for potential $[[4]] damage vs @{target|name}!}} {{@{target|name} Fight =$[[3]] for potential $[[5]] damage vs @{selected|name}!}} Damage values can go negative on this one and both potential damage values are always shown but the Fight text will always say who gets damaged.
Thank you again for your help.