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

Multi Target Attack, Need Help Polishing It Up

Multi attack Question So I have a multi-npc attack that hits up to 8 enemies, as a lazy player and I like to hit as little buttons as possible.  So I made this Macro using a multi-attacking macro made or shared by Gen Kitty . I then nested Other Attack macros I made for the attack. It works great except when it displays the names of the npc i am attacking, It's the same one for all of them Also The same ac. I don't want ask if it hits, and i dont want to to explain how much and what type of damage the enemy took, again I am lazy. And hopfully make my turn faster. How can I make it show different npc names? Is it even possible? The Pic is what is coming up in the chat, i want the name to change not just say the Priest Takes x damage. This is for my 1st game on roll 20, so these are some of the 1st macros i have made. I Also cant find a single topic on this on the forum. My Edited Multi enemy attack @{selected|token_name} May shoots at eight Arrow, At hostile creatures ?{Number of targets?|1} targets, description  @{target|target1|token_name}:#Faenya's-Gift ?{target2|!} @{target|target2|token_name}:#Faenya's-Gift ?{target3|!} @{target|target3|token_name}:#Faenya's-Gift ?{target4|!} @{target|target4|token_name}:#Faenya's-Gift ?{target5|!} @{target|target5|token_name}:#Faenya's-Gift ?{target6|!} @{target|target6|token_name}:#Faenya's-Gift ?{target7|!} @{target|target7|token_name}:#Faenya's-Gift ?{target8|!} @{target|target8|token_name}:#Faenya's-Gift My Nested Attack Macro. Faenya's-Gift /em @{selected|token_name} shoots at @{target|token_name} with a regular Arrow ! &{template:atkdmg} {{mod=[[@{selected|strength_mod}+@{selected|PB}+3]]}} {{rname=bow attack }} {{r1=[[@{“PC NAME”|d20}cs>20 + 3[STR] + 3[MOD] + 3[PROF]]]}} @{“PC NAME”|rtype}cs>20 + 3[STR] + 3[MOD] + 3[PROF]]]}} {{attack=1}} {{range=Target AC=@{target|npc_ac}}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d10 + 3[STR] + 3[MOD]]]}} {{dmg1type=Piercing}} {{damage=1}} {{dmg2flag=1}} {{dmg2=[[2d6 ]]}} {{dmg2type=Radiant}} {{crit1=[[1d8[CRIT]]]}} {{crit2=[[2d6[CRIT]]]}} {{save=}} {{savedesc=}} 0 {{desc= has radiant damage}}   {{spelllevel=}} {{innate=}} {{globalattack=@{“PC NAME”|global_attack_mod}}} {{globaldamage=@{target|token_name} Takes [[@{“PC NAME”|Precise_Strike_mod_roll}+@{“PC NAME”|Superiority_mod_roll}]]}} {{globaldamagecrit=[[@{“PC NAME”|Precise_Strike_mod_roll_Crit}]]}} {{globaldamagetype=@{“PC NAME”|global_damage_mod_type_abilitys}}} ammo= @{“PC NAME”|charname_output}
1761224672
timmaugh
Forum Champion
API Scripter
Welcome to the forums (and to Roll20), Angelic_Knight! I think the problem you're running into is that while each line is asking for a unique target (target1, target2, etc.), your nested macro constantly refers to the same target (@{target}). Examples: /em @{selected|token_name} shoots at @{target|token_name} ...and... {{range=Target AC= @{target|npc_ac} }} ...and... {{globaldamage= @{target|token_name} takes... Also, it seems like you've modified the macro from the command line you showed, because it references "PC NAME" as if it is waiting for customization, and because it seems you changed the desc field from " has radiant damage" to "I mean I am out of good arrows..." (BTW, it's strongly suggested to not have punctuation in the names of characters, macros, etc., like in the case of "Faenya's-Gift". In certain situations this can cause problems for the Roll20 parsers leading to unexpected results and/or failures.) In any case, here's something you can try: Step 1: *ADD* the range and desc fields to each line of your multi-enemy attack macro (and to change the globaldamage field in the F-G macro). The fields of a template are repeatable, with the "last listed" winning the contest of which will be enforced. Then, since you're adding the fields to each line, you can reference the correct target: @{target|target1|token_name}:#Faenya's-Gift  {{range=Target AC=@{target|target1|npc_ac}}} {{desc=Attacking: @{target|target1|token_name} }} ?{target2|!} @{target|target2|token_name}:#Faenya's-Gift  {{range=Target AC=@{target|target2|npc_ac}}} {{desc=Attacking: @{target|target2|token_name} }} ...etc... Since this verbiage comes *after* the inclusion of the F-G macro, these references will overwrite the {{range}} and {{desc}} fields. The resulting message in chat will use what you supply in the individual lines of your multi-attack command. I am co-opting your {{desc}} field to ALSO convey who is being attacked since the field where this info had been previously listed includes rolls... and that is a lot of verbiage to reintroduce into the multi-attack macro. Step 2: *REMOVE* the reference to "@{target|token_name} takes..." in the {{globaldamage}} field of the F-G macro. We're including the name in the {{desc}} field, now. In fact... Step 3: You might want to remove the F-G {{range}} field's reference to the @{target}, since this target reference will be superfluous to your multi-attack macro (every line of attack will have its own target, now). You don't want to get confused, thinking you've selected a target but not seeing it in the outputs. The outputs you see should reference your target1, target2, target3, etc. Your base @{target} reference will have no associated output. Similarly, you might have to lose the /em line from the F-G macro, since this also references the base @{target} reference. Even if this line outputs one time for each of the multiple enemies attacked, it will always report the same name (unless it, too, is moved into the multi-attack macro... which just introduces a lot of extra lines I think you're trying to avoid with the reference to #Feanya's-Gift. An alternative to removing the reference to the base @{target} reference in the F-G macro is to ALWAYS REMEMBER that when you're prompted to select the base target, you're not actually choosing an output target... you'll have to double up on targeting the same token as part of the target1, target2, etc., set of targeting statements. As an example of what you see, your base @{target} reference will generate this sort of targeting message: But your reference to @{target|target1} will generate this sort of targeting message: The latter references a target you're actually attacking. The former references vestigial targeting references in the F-G macro. If you choose to only target 2 enemies with your attack, you'll likely get 3 targeting prompts because @{target} is different from @{target|target1} and @{target|target2}. That's why I say that whatever token you select to satisfy the @{target} statement will ALSO have to be selected as a target1, target2, etc. if you want it to be included in the damage output panels. If you use the F-G macro separately from this multi-attack command (that is, you sometimes run the F-G macro directly instead of choosing multiple targets) and you DO NOT want to remove the @{target} references, then you can help yourself at least to recognize "the targeting statement that won't be included in multi-attack output" by including a name in the reference. That is, change every @{target} reference to be something like @{target|Native target}. That will make the targeting prompt presented to you more recognizable: ...reminding you that you have to double-up on this target in a multi-attack scenario. (Another option is just to duplicate the F-G macro and make your changes, there!)
Thank you very much I will go and try this out over the next couple of days. I will let you know what worked.