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

Roll dmg in a macro by click

Hello, everybody. I have a modified macro for npc, since I want to roll critical hits with 19-20 for that npc instead of the normal %{selected|repeating_npcaction_$0_npc_action}. Here is the macro : @{Cultist|wtype}&{template:npcatk} {{attack=1}} {{damage=1}} {{dmg1flag=1}} {{dmg2flag=1}}  @{Cultist|npc_name_flag} {{rname=[Scimitar](selected|repeating_npcaction_selected_npc_dmg)}} {{rnamec=[Scimitar](selected|repeating_npcaction_selected_npc_crit)}} {{type=[Attack](selected|repeating_npcaction_selected_npc_dmg)}} {{typec=[Attack](selected|repeating_npcaction_selected_npc_crit)}} {{r1=[[@{Cultist|d20}cs>19+(3)]]}} @{Cultist|rtype}cs>19+(3)]]}} @{Cultist|charname_output} The problems is when i click on the chat in SCIMITAR (name) dont roll the damage of the attack. How can i implement the damage by clicking?
1610670448

Edited 1610670565
Oosh
Sheet Author
API Scripter
You just need to fix up your button links. There are two ways of linking to an Ability - with %{character|ability}, or in an API button, which is what the 5e template uses here [Label](~character|ability). So those (links) need to start with a ~ to mark it as a character sheet Ability. The other problem is you've replaced the row ID with "selected" which won't work, as you can't select a row on a character sheet. You can use one of two things there, either the row index, which you've got as $0, or as the actual row ID, which looks like -MPlPJHQPXHxLRwoc6tT The row ID is messier, but better. It will always reference the same Ability in a repeating section, even if it's reordered. Since I don't know what it is, here's the row index version: @{selected|wtype}&{template:npcatk} {{attack=1}} {{damage=1}} {{dmg1flag=1}} {{dmg2flag=1}} @{selected|npc_name_flag} {{rname=[Scimitar](~selected|repeating_npcaction_$0_npc_dmg)}} {{rnamec=[Scimitar](~selected|repeating_npcaction_$0_npc_crit)}} {{type=[Attack](~selected|repeating_npcaction_$0_npc_dmg)}} {{typec=[Attack](~selected|repeating_npcaction_$0_npc_crit)}} {{r1=[[@{selected|d20}cs>19+(3)]]}} @{selected|rtype}cs>19+(3)]]}} @{selected|charname_output} On a dynamic sheet like a Player's, I'd recommend always using the actual row ID. Players are likely to delete weapons, add attacks or reorganise rows. On an NPC sheet you should be fine with $0 index references, unless you're planning on adding/deleting Abilities.
Couldn't be better, thanks bro
Now I am trying to make a macro for the drow gunslinger of waterdeep.... but the command %{selected|repeating_npcaction_$2_npc_action} does not work for me, because when i click form dmg doesn't appear the 2d10 poisonous damage :S How could I make a similar macro with 2 independent damage rolls by 1 click on the Poisonous Pistol (name)? With the %{selected|repeating_npcaction_$2_npc_action} only rolls 1d10+4 piercing.... in need and extra 2d10 poison in the same click Poisonous Pistol.   Ranged Weapon Attack:   +6  to hit, range 30/90 ft., one target.  Hit:  9 ( 1d10 + 4 ) piercing damage plus 11 ( 2d10 ) poison damage.
Rober M. said: Now I am trying to make a macro for the drow gunslinger of waterdeep.... but the command %{selected|repeating_npcaction_$2_npc_action} does not work for me, because when i click form dmg doesn't appear the 2d10 poisonous damage :S How could I make a similar macro with 2 independent damage rolls by 1 click on the Poisonous Pistol (name)? With the %{selected|repeating_npcaction_$2_npc_action} only rolls 1d10+4 piercing.... in need and extra 2d10 poison in the same click Poisonous Pistol.   Ranged Weapon Attack:   +6  to hit, range 30/90 ft., one target.  Hit:  9 ( 1d10 + 4 ) piercing damage plus 11 ( 2d10 ) poison damage. Can you show a screenshot of the Drow Gunslinger's character sheet page? (Showing the Traits, Actions, etc.) I have a couple ideas on what might be wrong.
Drow Gunslinger WDH Medium humanoid (elf), any alignment Armor Class  18 ( studded leather armor ,  shield ) Hit Points  84 ( 13d8 + 26 ) Speed  30 ft. STR DEX CON INT WIS CHA 13 (+1) 18 (+4) 14 (+2) 11 (+0) 13 (+1) 14 (+2) Saving Throws   Dex  +6 ,  Con  +4 ,  Wis  +3 Skills   Perception   +3 ,  Stealth   +8 Senses   darkvision  120 ft., passive Perception 13 Languages  Elvish, Undercommon Challenge  4 (1,100 XP)  Fey Ancestry.   The drow has advantage on saving throws against being  charmed , and magic can't put the drow to sleep. Gunslinger.   Being within 5 feet of a hostile creature or attacking at long range doesn't impose disadvantage on the drow's ranged attack rolls with a pistol. In addition, the drow ignores half cover and three-quarters cover when making ranged attacks with a pistol. Innate Spellcasting.   The drow's spellcasting ability is Charisma (spell save DC  12 ) It can innately cast the following spells, requiring no material components: At will:  dancing lights 1/day each:  darkness ,  faerie fire ,  levitate  (self only) Sunlight Sensitivity.   While in sunlight, the drow has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight. Actions Multiattack.   The drow makes two shortsword attacks. Shortsword.   Melee Weapon Attack:   +6  to hit, reach 5 ft., one target.  Hit:  7 ( 1d6 + 4 ) piercing damage. Poisonous Pistol.   Ranged Weapon Attack:   +6  to hit, range 30/90 ft., one target.  Hit:  9 ( 1d10 + 4 ) piercing damage plus 11 ( 2d10 ) poison damage. Source:  WDH , page 201 Encounter Builder   Use Proficiency Dice
I need a second dice roll (2d10 poison) when i click in the name of the weapon Poisonous Pistol.... in the repeating_npcaction_$2_npc_action
Maybe it may something as... but I would need some extra line for the 2d10 poison @{selected|wtype}&{template:npcatk} {{attack=1}} {{damage=1}} {{dmg1flag=1}} {{dmg2flag=1}} @{selected|npc_name_flag} {{rname=[Poisonous Pistol](~selected|repeating_npcaction_$2_npc_dmg)}} {{rnamec=[Poisonous Pistol](~selected|repeating_npcaction_$2_npc_crit)}} {{type=[Attack](~selected|repeating_npcaction_$2_npc_dmg)}} {{typec=[Attack](~selected|repeating_npcaction_$2_npc_crit)}} {{r1=[[@{selected|d20+(6)]]}} @{selected|rtype}+(6)]]}} @{selected|charname_output}
Ah that's a different character sheet than I thought.  On the D&D 5E by Roll20 sheet, there's a bug related to adding/deleting actions.  You might try to move the Poisonous Pistol to be the 2nd action, then close the sheet, reopen it and move it back to the 3rd action.  I don't think that's the issue here though but you might try it anyways.
I use the 5e OGL, so would it be to make 2 separate ones?   %{selected|repeating_npcaction_$2_npc_action}. (Pistol)  %{selected|repeating_npcaction_$3_npc_action}. (poison)
1610734266

Edited 1610734414
I had thought of doing it with an extra button Poison(pistol)``(!
#2d10-poison)   and the macro button is: &{template:simple} {{rname=Extra damage}} {{r1=[[2d10]]}} {{normal=1}} {{charname=Poison}} but it's a little rough
for some reason the :S button option does not work %{selected|repeating_npcaction_$2_npc_action} (!
#2d10-poison)    Macro for the button:  &{template:simple} {{rname=Extra damage}} {{r1=[[2d10]]}} {{normal=1}} {{charname=Poison}} I don't know if there is any way to roll 2 rolls with one click on the name attack (1 for 1d10 +4 piercing and other for 2d10 poison)
1610740356

Edited 1610740993
The only way I see to solve this is .....  %{selected|repeating_npcaction_$2_npc_action}    (for the attack) %{selected|repeating_npcaction_$2_npc_dmg}       (for the pistol damage) %{selected|repeating_npcaction_$3_npc_dmg}       (for the poison damage) But this macro has a problem, when i roll a critical hit, the piercing damage is not valid..... so the macro below is better %{selected|repeating_npcaction_$2_npc_action} %{selected|repeating_npcaction_$3_npc_dmg} (only for the poison 2d10) it auto-roll the damage.... I wanted to roll the 2 damages in one click when i launch the attack, but I can't find the right way or I don't know if it exists. 
Any other option to roll 2 separate damages by clicking on the attack name in the chat window? from an npc
1610902466
Jordan C.
Pro
API Scripter
Just to clarify, does the settings of the attack in the npc sheet look like the one below with the second damage field filled in with the poison damage?
Ohhh my god..... I never noticed putting that damage in the 2nd square (2º hit)..... hahahaha I'm very stupid .... thank you 100% solved
This even works for a npc rogue, put the sneak attack as secondary damage example: piercing (Sneak Attack). Great