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

Token action "first weapon"

Hello, I want to create a token macro which refers to the first weapon in the character sheet. I have read elsewhere that this is the correct command @{selected|MeleeAttack1}  but does not work :( what am I doing wrong?
i asked a similar (but broader) question recently.  Keith’s answer is amazing.  It’s a different solution to your request but may still give you what you’re after.  Check it out  here
thanks, I've read that too, but the solution seems to work only for PRO users. for NPC's I have already found a solution. but not for PC's %{selected|repeating_npcaction_$0_npc_action}
1583334479

Edited 1583334713
Kraynic
Pro
Sheet Author
Your "MeleeAttack1" is incorrect, and will be different depending on what sheet you are using.  That part of your macro call will have 3 parts separated by an underscore: 1) repeating section label 2) row id 3) roll button name The easiest way to see how this looks on your sheet is to enable the quick macro bar in settings.  Drag an attack to that bar below where player names display.  Click on that attack in the bar so that it gets run in chat.  Now, put your cursor in the chat box and hit the up arrow to show the last command sent. For example, on one of the sheets I use, the code for the first repeating attack would look like this: %{Talon|repeating_meleeattacks_-Luk2Z77ypd73k50JelD_meleeattack} Now, instead of using the code row id that is that middle jumble, that can be simplified.  There is an alternative way to designate the row, and it starts counting at zero: %{Talon|repeating_meleeattacks_$0_meleeattack} You can change the "$0" bit to "$1" to run the second attack in the repeating section (and so on for how ever many attacks there are).  Then, to make this a universal macro and not have it target a specific character sheet, the name would change to selected as you have in your example. %{selected|repeating_meleeattacks_$0_meleeattack}
1583335363

Edited 1583335401
Thanks a lot, actually the solution with the melee weapon did not work. I guess the sheet does not recognize the longsword as a melee weapon oO but what worked was the following command %{selected|repeating_attack_$0_attack} but now I have understood the principle and can make some macros :)
1583335790
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The likely reason it didn't work was what Kraynic mentioned at the beginning of their post: The actual terminology is entirely dependent on the character sheet being used. Since you didn't specify which sheet you were using, Kraynic used an example from a different sheet. It looks like you are using the D&D 5th Edition by Roll20 sheet? Be aware that actions (NPCs) and attacks (PCs) use different repeating attributes. Just in case you were setting up something intended to be universal.
Right, I should have mentioned that. Yeah, I use D&D5. Thanks again for the advice. I now know how to extrapolate the right command from the MacroQuickbar. So far everything works for PC's and NPC's