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

Adding homebrew weapon properties

I'm working on a campaign setting that features heavy use of firearms, rules for which I've lifted wholesale from various homebrewers around the Internet. One of these homebrew rules is giving certain weapons a 'scatter' property. 

Scatter: Firearms with the scatter property deal damage to more than one target. Whenever you hit a creature with such a weapon, creatures within 5 feet of the target take the scatter damage listed in the weapon's description if the attack would hit them. The original target does not take this scatter damage.

How would one implement something like this in Roll20? The whole process at the tabletop would work like this:

  1. Player wielding a blunderbuss attacks a target with ac 15. The blunderbuss deals 1d12 piercing damage to its primary target, and 1d6 scatter damage to secondary targets. The player rolls a 16 to hit after modifiers.
  2. Standing next to the target are two creatures: one with AC 16 and one with AC 20.
  3. The attack hits the primary target, and the ac 16 target. It misses the AC 20 target.
  4. The primary target takes 1d12 + modifiers damage, and the ac 16 target takes 1d6 scatter damage. 

Would the best way to do this just be to have any character using such a weapon have two attacks, one for the primary and one for the scatter? Is there some kind of API or macro trickery I could use to make this happen, like comparing the attack role to the AC of adjacent characters?

July 03 (5 years ago)

Edited July 03 (5 years ago)
Oosh
Sheet Author
API Scripter

This would be tricky with a macro, as it would require lots of clicking. To get it all in the one macro, you'd also have to know how many targets are being hit with the scatter so you know how many @{target} calls to make. A custom API script could select adjacent tokens, I'm pretty sure? Someone else would be able to answer that though. Without a script, the easiest way would be to eyeball it I would say. Something simple like this:

&{template:default}{{name=Blunderbuss}}{{Attack Roll=[[1d20+8[AMOD]]]}}{{Damage=[[1d12+5[DMOD]]] *piercing*}}{{Scatter damage=[[1d6]] *piercing* to adjacent targets with AC less than $[[0]]}}


Unless you have access to nicer roll templates?

Throwing @{target|AC} clicks in there for anything but the primary target will probably make it difficult for the player to use.

A token's position can certainly be grabbed with the API, so I see no reason why it wouldn't be possible to automatically select adjacents with some cleverness, but this is beyond my kennin'.

July 05 (5 years ago)
David M.
Pro
API Scripter

I've been searching for ways to select tokens via API scripts, but everything I'm reading on the forums says this is not possible. It can find all the selected tokens, but actually doing the selecting seems to be a different story. A script should be able to find adjacent tokens based on position relative to target (e.g. find distance between each token on page and the target, then return an array of token objects of those within 70px of the primary target outer boundaries), then do some operation on each. But now you're talking about doing the whole shebang within the script which could get pretty complicated.

Oosh's solution seems like a pretty good return on investment, effort-wise.  

Thanks Oosh, this'll probably be what I end up using. Appreciate it!