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

4e rolling against a dynamic number of targets

1429752647

Edited 1429752681
anyone know a good macro to roll against a dynamic number of targets for example a hunters rapid shot makes a basic ranged attack against each target with in the weapons range her is what i have so far for my power macrow and i dont have api scripting &{template:default} {{name= @{Playername} uses @{power-3-name} Type: [At-will ✦ Martial] Target: [One creature] Action: [standard ✦personal]}} {{attack:= Str vs @{power-3-def} ([[1d20+@{power-3-attack}]] vs [[@{target|target1|AC}]]) ([[1d20+@{power-3-attack}]] vs [[@{target|target2|AC}]]) ([[1d20+@{power-3-attack}]] vs [[@{target|target3|AC}]])}} {{Hit:= damage [[(1*@{power-3-weapon-num-dice})d@{power-3-weapon-dice} +@{power-3-damage}]] [[(1*@{power-3-weapon-num-dice})d@{power-3-weapon-dice} +@{power-3-damage}]] [[(1*@{power-3-weapon-num-dice})d@{power-3-weapon-dice} +@{power-3-damage}]]}} {{Effect:= You make a ranged basic attack with a weapon against each creature in or adjacent to a square within the attack's range. You take a -2 penalty to the attack rolls.}}
1429753082
Gen Kitty
Forum Champion
I have an example of the macro you need, let me see if I can find it....
1429753706
Gen Kitty
Forum Champion
Ok, found it. This is how I do variable-multitarget attacks when I can't use Powercards. This specific macro is from a Pathfinder game, but you can use the same logic for 4e macros. You need to have a to-hit&damage section for each possible target. You'll have to click on a number of targets equal to your maximum nmber of targets but you can use your own token to pad out the list. Then you're going to be prompted with a series of 'TargetX' rollqueries: For each target you want to hit, you delete the ! from the rollquery box-prompt. The remaining target numbers, leave the !. This is an API hack that doesn't require use of the API; each line that starts with a ! will attempt to call a script, see no script and discard the line. /me fires his dragon pistol, spraying a 15' cone of sticky pellets. // **Target(s)** **@{target|target1|token_name}:** AC [[1d20cf&lt;4r20 + @{Silva|Dragon}[NormalBonus] -2[Scatter] + ?{PointBlank?|1}[PB] +?{MiscToHitBonus?|0}[MiscHitBonus] ]] // ?{target2|!} **@{target|target2|token_name}:** AC [[1d20cf&lt;4r20 + @{Silva|Dragon}[NormalBonus] -2[Scatter] +?{PointBlank?|1}[PB] +?{MiscToHitBonus?|0}[MiscHitBonus] ]] // ?{target3|!} **@{target|target3|token_name}:** AC [[1d20cf&lt;4r20 + @{Silva|Dragon}[NormalBonus] -2[Scatter] +?{PointBlank?|1}[PB] +?{MiscToHitBonus?|0}[MiscHitBonus] ]] // ?{target4|!} **@{target|target4|token_name}:** AC [[1d20cf&lt;4r20 + @{Silva|Dragon}[NormalBonus] -2[Scatter] +?{PointBlank?|1}[PB] +?{MiscToHitBonus?|0}[MiscHitBonus] ]] // ?{target5|!} **@{target|target5|token_name}:** AC [[1d20cf&lt;4r20 + @{Silva|Dragon}[NormalBonus] -2[Scatter] +?{PointBlank?|1}[PB] +?{MiscToHitBonus?|0}[MiscHitBonus] ]] // ?{target6|!} **@{target|target6|token_name}:** AC [[1d20cf&lt;4r20 + @{Silva|Dragon}[NormalBonus] -2[Scatter] +?{PointBlank?|1}[PB] +?{MiscToHitBonus?|0}[MiscHitBonus] ]] // ?{target7|!} **@{target|target7|token_name}:** AC [[1d20cf&lt;4r20 + @{Silva|Dragon}[NormalBonus] -2[Scatter] +?{PointBlank?|1}[PB] +?{MiscToHitBonus?|0}[MiscHitBonus] ]] // **Damage:** [[floor((d6cf0cs100 + @{Silva|Dragon|max}[Damage Bonus] + ?{PointBlank?|1}[PB]+?{MiscBonusDamage|0}[MiscDamageBonus])/2 )]] B/P damage each, +[[floor(3d6cf0cs100 + (3*(@{Silva|Dragon|max} + ?{MiscBonusDamage}))/2 ) ]] on a crit **Reflex Save DC 15** to avoid being *[entangled](<a href="http://www.d20pfsrd.com/gamemastering/conditions#TOC-Entangled)*" rel="nofollow">http://www.d20pfsrd.com/gamemastering/conditions#TOC-Entangled)*</a> for [[2d4cf0cs100]] rounds. I don't know how to make this work with roll templates, alas.
1429758021

Edited 1429758050
thanks for the reply ok so here is how it is working now the targets that i don't need are still posting but have the ! in front of the name in sted of removing it from the output to chat box not sure if it is possible any suggestion on what the syntax could be ? Attack: Str vs AC // Target(s) Ja'heel Silvermoon: AC // Tegan: AC // Colvin: AC // Glanrak : AC // ! Vadiana: AC // ! Zarra: AC // ! D: AC
1429758587
Gen Kitty
Forum Champion
Maybe API and roll templates don't work together. I did say I didn't know how to make it work with roll templates :&gt; I don't use them at all, so....
1429766380
Falcon
Pro
Sheet Author
I have the same issue and really haven't found a way to deal with this. But what I have found that works for me is to create a token that isn't attached to anything and has no name. Then when you roll to hit - I chose the targets and when I am done I then click on the blank token for all other targets left over.
I know you sead that your not shure it would work GenKitty and i thank you to the reply's Black Falcon thans for the suggestion i might have to try that for the time being
1429788137
Gen Kitty
Forum Champion
Black Falcon's approach is the OTHER approach I used up until Powercards got dynamic variable multitargeting; made a token named 'NUL' and used that for padding out lists.
1429791333

Edited 1429801479
here is what i have so far you just have to delete the input a value for the targets you do need so it is blank to return nothing here is what the macro looks like so far still needs to do the damage rolls &{template:default} {{name= @{Playername} uses @{power-3-name} Type: [At-will ✦ Martial] Target: [One creature] Action: [standard ✦ personal]}} {{attack:= Str vs @{power-3-def} @{target|target1|token_name}: [[1d20+@{power-3-attack}]]v[[@{target|target1|AC}]] ?{target2|@{target|target2|token_name}:[[1d20+@{power-3-attack}]]v[[@{target|target2|AC}]]} ?{target3|@{target|target3|token_name}:[[1d20+@{power-3-attack}]]v[[@{target|target3|AC}]]} ?{target4|@{target|target4|token_name}:[[1d20+@{power-3-attack}]]v[[@{target|target4|AC}]]}}} {{Hit:= damage ?{hit1|[[(1*@{power-3-weapon-num-dice})d@{power-3-weapon-dice} +@{power-3-damage}]]} ?{hit2|[[(1*@{power-3-weapon-num-dice})d@{power-3-weapon-dice} +@{power-3-damage}]]} ?{hit3|[[(1*@{power-3-weapon-num-dice})d@{power-3-weapon-dice} +@{power-3-damage}]]} ?{hit4|[[(1*@{power-3-weapon-num-dice})d@{power-3-weapon-dice} +@{power-3-damage}]]}}} {{Effect= You make a ranged basic attack with a weapon against each creature in or adjacent to a square within the attack's range. You take a -2 penalty to the attack rolls.}}
1429839496
Wes
Pro
Sheet Author
@Justin W. As fate would have it, this exact thing was on my list of things to work on for the roll templates I'm building for the D&D4e Sheet. I just wanted to let you see what I had worked out so far, I'll try my best to finish this up as soon as I can, Multiple Attacks Output Picture
OK cool i don't have api but i got one working with the default template yours is looking nice
Since the attack is pretty much always going to be targeting a 9-square grid, you could also setup the rolls visually: &{template:default} {{name=Attack Rolls || Damage Rolls }} {{ [[ 1d20+10 ]]♦[[ 1d20+10 ]]♦[[ 1d20+10 ]]=[[ 1d8+4 ]]♦[[ 1d8+4 ]]♦[[ 1d8+4 ]] }} {{ [[ 1d20+10 ]]♦[[ 1d20+10 ]]♦[[ 1d20+10 ]]=[[ 1d8+4 ]]♦[[ 1d8+4 ]]♦[[ 1d8+4 ]] }} {{ [[ 1d20+10 ]]♦[[ 1d20+10 ]]♦[[ 1d20+10 ]]=[[ 1d8+4 ]]♦[[ 1d8+4 ]]♦[[ 1d8+4 ]] }} [ Note : The ♦ character is created by holding down the ALT key and tapping the 4 key on your numeric keypad and letting go of ALT ] The same things works for cone shapes too, you just have to be clever with the 'blank' characters . &{template:default}{{name=Attacks Roll || Damage Roll}} {{▒▒ ▒▒ [[1d20+10]]=▒▒ ▒▒ [[1d20+10]]}}{{▒▒ [[1d20+10]] [[1d20+10]]=▒▒ [[1d20+10]] [[1d20+10]]}} {{[[1d20+10]] [[1d20+10]] [[1d20+10]]=[[1d20+10]] [[1d20+10]] [[1d20+10]]}}{{▒▒ [[1d20+10]] [[1d20+10]]=▒▒ [[1d20+10]] [[1d20+10]]}}{{▒▒ ▒▒ [[1d20+10]]=▒▒ ▒▒ [[1d20+10]]}} These are admittedly a little messy; I'm just illustrating the idea without spending too much time cleaning it up.
1429860662
Sungrass
Plus
Sheet Author
If the GM is willing to tell you the number you're rolling against, something like {Nd20+X}&gt;DC, where N is the number of targets, X is your attack bonus, and DC is the number you're trying to beat. It will give you the number of targets that you hit, and you can use the individual dice rolls to see which target that actually is. It may not be the fanciest of solutions, but it is the simplest.
Mark G. said: Since the attack is pretty much always going to be targeting a 9-square grid, you could also setup the rolls visually: &{template:default} {{name=Attack Rolls || Damage Rolls }} {{ [[ 1d20+10 ]]♦[[ 1d20+10 ]]♦[[ 1d20+10 ]]=[[ 1d8+4 ]]♦[[ 1d8+4 ]]♦[[ 1d8+4 ]] }} {{ [[ 1d20+10 ]]♦[[ 1d20+10 ]]♦[[ 1d20+10 ]]=[[ 1d8+4 ]]♦[[ 1d8+4 ]]♦[[ 1d8+4 ]] }} {{ [[ 1d20+10 ]]♦[[ 1d20+10 ]]♦[[ 1d20+10 ]]=[[ 1d8+4 ]]♦[[ 1d8+4 ]]♦[[ 1d8+4 ]] }} [ Note : The ♦ character is created by holding down the ALT key and tapping the 4 key on your numeric keypad and letting go of ALT ] The same things works for cone shapes too, you just have to be clever with the 'blank' characters . &{template:default}{{name=Attacks Roll || Damage Roll}} {{▒▒ ▒▒ [[1d20+10]]=▒▒ ▒▒ [[1d20+10]]}}{{▒▒ [[1d20+10]] [[1d20+10]]=▒▒ [[1d20+10]] [[1d20+10]]}} {{[[1d20+10]] [[1d20+10]] [[1d20+10]]=[[1d20+10]] [[1d20+10]] [[1d20+10]]}}{{▒▒ [[1d20+10]] [[1d20+10]]=▒▒ [[1d20+10]] [[1d20+10]]}}{{▒▒ ▒▒ [[1d20+10]]=▒▒ ▒▒ [[1d20+10]]}} These are admittedly a little messy; I'm just illustrating the idea without spending too much time cleaning it up. thanks for the reply and i am not sure what you did for the 'blank' characters but they both look good To Calle A. this is our first at table to gaming so we are just trying to figure out how everything works i am trying to figure out some macros for all of use to use or for some specific caricatures.
Alt Code List: <a href="http://www.alt-codes.net/" rel="nofollow">http://www.alt-codes.net/</a>