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

Pulling the NPC action name? 5e OGL sheet

So im making a "catch all" NPC Macro using API Chat buttons and im curiuos if this can be done: From this  post I was able to pull spell names from a character sheet for the titles of a button using this code... [@{repeating_spell-1_$0_spellname}](~@{character_name}|repeating_spell-1_$0_spell) My question is, can I use something like @{repeating_npc_action_$0_actionname} to do the same for the titles of the attacks button? Is that a thing? If so How do I find the right code?
I believe it is @{repeating_npc_action_$0_action}.
sadly no Sky... its returning Goblin|repeating_npc_action_$0_action
I always do that... replace @ with %.
I think you are looking for repeating_npcaction_$0_name
That did It Mark... thanks alot!
I know you guys already answered the original post, I'm trying the following: /gr [[1d20 + %{Selected|repeating_attack_$0_attack}]] It only returns the dice roll, not the modifiers from the attack section. When I hover over the dice roll it shows the following: 1d20 + {{mod=+4}} {{rname=[Mace](~Kgy6LhrQ-RW7EI8xOVQ|repeating_attack_$0_attack_dmg)}}... I can write the whole thing out if needed, but I figured that would give you the idea. I've tried using different names at the end of my statement and tried referring to the names given in the roll output eg: /gr [[1d20 + %{Selected|repeating_attack_$0_attack_mod}]] But modifying just means it can't find the attribute at all. Any guidance would be greatly appreciated.
1492377038

Edited 1492377207
Your using the OGL sheet I assume? The %{Selected|repeating_attack_$0_attack} part of your macro is a command that rolls the creatures attack. the 1d20+ part wont work on that. your basicly telling it to roll a d20 and roll the attack. Are you just trying to make this a secret roll to the GM? If so use this: /w gm %{Selected|repeating_attack_$0_attack} Edit: just realized this is a PC only command, NPC's have a diff command
Hi Dustin, Yes I'm using 5e OGL (by r20). This command will be for NPCs, I wasn't aware that they use a diff command, could you tell me the command or point me in the direction of some documentation (in the case that I've been blind and missed it!) Cheers :)
for NPCs its  %{selected|repeating_npcaction_$0_npc_action} And here is the  Wiki for the OGL sheet , tons of great stuff in there :)
1492379061

Edited 1492381711
Sorry if I'm being a noob, I've tried implementing what you suggested and I'm having trouble, but I've learnt something already, I wasn't aware there was an NPC option for the character sheets! I am unsure of which parts of the statement you've suggested should be replaced with specifics and what they should be replaced with :S i.e. what should go in place of "npcaction", "npc" and "action" Thankyou in advance for your patience! *EDIT* I put in the text exactly as you suggested, however I get the same result as before (only outputting the d20 roll, while showing the statblock for the action as I typed in my previous response) *EDIT EDIT* The problem was mostly with me trying to over-engineer things, I was trying to add specific stats within the action to a d20, not sure that R20 supports this, but totally sure it was unnecessary. Fixed, thanks for your help. For anyone reading in the future: /w gm %{Selected|repeating_npcaction_$0_npc_action}  Is the correct code to use in your macro, if you want the damage roll to be hidden from players, just check the option in the NPC sheet to roll damage when attacking :) All credit to Dustin :D
the code I provided would pull the 1st attack option for the NPC Example: Goblin - First action slot is the Scimitar NOTE: all these repeating fields start at 0 not 1 so this command %{selected|repeating_npcaction_$0_npc_action} Will pull the 1st action of the selected NPC If that token is connected to this character sheet.
FYI in the above example if you changed the 0 to a 1 you would get the goblins Short bow attack
Hi Duston, that is truly a comprehensive guide, thank you so much! I actually solved the issue by removing the need to over-engineer things and listening to your advice in the first place!!!  The problem came when I was trying to add individual values from the action to a d20 roll, which is where R20 had a problem, mostly because that functionality doesn't exist and isn't really necessary either. You have been a great help and clearly are a credit to the community, thanks again!!!
lol, np Ash, happy Macroing :)
If you want an option to query each time you roll gm whisper or not... ?{Public Roll|Yes, |No,/w GM} %{Selected|repeating_npcaction_$0_npc_action}
That's good to know Sky, I can already think of some great uses for that!!