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

How to select the attribute of the player using the macro inside of it?

This was the best title i was able to think of, it's really confusing, i know.

I'm using DW, but my game will have a strong focus on investigation, where all of the player will have to use their knowledge in herbology, story, religion, etc... to collect clues and solve misteries. So I would like for them to roll on Religion, Nature, Mecidine, Deception, etc... Like in D&D.

Each player has one and only one character shared with him in the journal.

Is there a way to create macros like Ability [[2d6 @{selected|dex}]] where, instead of "selected" that require the user to select his token first, it automatically select the only character in his journal?

I can do this with the abilities, i know, but it would be really unconfortable.

May 06 (5 years ago)
The Aaron
Roll20 Production Team
API Scripter

No, your only options are:

  • Individual macros with explicit references: @{Bob the Slayer|dex}
  • Character abilities: @{dex}
  • Use selected: @{selected|dex}
  • Use a roll query: ?{which character|Bob,@{Bob the Slayer|dex}|...}
May 06 (5 years ago)

Edited May 06 (5 years ago)

I think you can also use @{target|dex} which will prompt the player to select a target token to use, but it's probably best to train players to have their token selected when they need to do something.


Rabulias said:

I think you can also use @{target|dex} which will prompt the player to select a target token to use, but it's probably best to train players to have their token selected when they need to do something.


nice joke

I try. ;-)

May 06 (5 years ago)
The Aaron
Roll20 Production Team
API Scripter

Creating Token Actions is a nice way to get then in the habit of having their token selected.

May 06 (5 years ago)

I don't mean to thread jack, but I'm having the exact same problem, although in my case, I don't want the macro to target a specific person by itself, I just want it to use the stats of the person trying to use it. my macro is specifically for weapon attacks, and I just don't want to have to make duplicate macros for everyone's individual weapons.

Here's my code so far if it helps:
&{template:default} {{name=Heavy Mace}} {{Heavy Mace=[[1d20 @{bab}+@{epicattackbonus}+@{weapon1stat}+@{size}+@{weapon1enh}+@{weapon1focus}+?{Power Attack? (Put in penalty with negative sign ie -3)|0}+?{Additional Attack Bonus?(Don't add +)|0}]]}} {{Damge=[[1d8 + @{weapon1damagestat} +@{weapon1enh}+@{weapon1specialize} +?{Power Attack Bonus?|0}+?{Additional Damage Bonus?|0}]]}}

May 06 (5 years ago)
The Aaron
Roll20 Production Team
API Scripter

Same answer as above.  You either have to make individual macros, use @{selected|...} or @{target|...}, or put it in abilities as token actions.  The last at least means the text can all be identical.

Thanks for the replies, I'll make them roll INT and WIS like crazy than... It's a little sad, in my head this makes my whole game kinda flat (obviously i can reinforce the narration but in the end it's always the same "ok, you search around the room for clues, roll INT!" "ok, you try to recall what you studied to see if there's something that might help you, roll INT!"...

Followup question.

The characters in the journal are shared between me (the GM) and the specific player... I have my own macros already, if i create an ability for one of my player, inside their character, and i want the player to see it in his macros bar (selecting Show in macro bar) I see it as well! How can i avoid it?

May 06 (5 years ago)

Thank you!

For a followup question. Am I able to make the Damage Power Attack query check the To Hit Power Attack query so it can calculate the correct modifier? And if so, can I also make it check if the weapon used is two handed? Or is that a "no" because there isn't a field to say if a weapon is Two Handed or not?

May 06 (5 years ago)
The Aaron
Roll20 Production Team
API Scripter

The "show in macro bar" is a per user choice.  They have to add it to their Macro Bar themselves.  Token Actions are another story.  Macros or Abilities set as Token Actions will show up whenever anyone selects a token.  Abilities will show up if they are on the character the token represents, Macros will show up if the user has access to them.

May 06 (5 years ago)
The Aaron
Roll20 Production Team
API Scripter

Leslie, that sounds like a topic for a new thread.  If you make one, people will likely be able to answer that for you.