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

Champions (Hero 6th edition) Initiative Macro

Is there a way to build a macro which will pull selected character's DEX or EGO and put them in the turn order?
1599600940
David M.
Pro
API Scripter
To add to turn tracker you need to add &{tracker} to your roll. E.g. /roll 1d20 + 5 &{tracker} ...or  [[1d20 + 5  &{tracker}]] To get the correct attribute (instead of the hardcoded "5" in the above example), you would replace the hardcoded value with syntax like: @{CharName|AttributeName} ...in a collections macro, or just  @{AttributeName} ...if used in a character ability. You will have to go to the attributes & abilities tab of your sheet to find the correct AttributeName for your macro. You can of course put this into whatever template you want to pretty it up if desired.
I tried this: @{Selected|EGO}&{tracker} But it just posted the words selected|ego There is no roll since Hero systems uses the characters dex (or in this case) ego for initiative. I changed it to @{Feedback|EGO}&{tracker}, and it pulled the correct stat without putting it into the tracker.
1599602099
David M.
Pro
API Scripter
Sorry, not familiar with Hero systems. Try putting it into an inline roll? If what you posted is pulling the right attribute, try: [[@{Feedback|EGO} &{tracker}]]
1599609475
Kraynic
Pro
Sheet Author
Keep in mind that it doesn't matter if EGO is how the label is on the sheet.  What attribute holds the value?  It could be EGO, or character_ego, or... something else.  You need to know what the attribute name specified in the html of the sheet is that holds that value to plug it into the formulas David M is giving you.  If nothing else, you can right click on the value on the sheet, inspect element, and see what the attribute is called that way.  The html will have something like name="attr_somenamehere" You can drop the attr_, you just need the somenamehere bit:  @{selected|somenamehere}.
It's pulling the right number/stat. It's just not putting it into the tracker.
1599611545
David M.
Pro
API Scripter
So putting it into the inline roll brackets [[...]] didn't work? That works for me on a D&D 5e sheet ability (with a different attribute, of course).
Nope. Both methods provide the correct result, but neither put the number in the turn tracker. It's really odd.
1599613411
Oosh
Sheet Author
API Scripter
You have a token selected when rolling? You should really be using @{selected| for the Attribute call, to make sure the macro fails if you have nothing selected.
1599613442

Edited 1599613696
David M.
Pro
API Scripter
Just double checking: do you have the turn tracker open to verify it's not there? The turn tracker doesn't automatically open itself when values are entered in this manner. EDIT - Oosh, when I run the ability above (not a collections macro) without a token selected, I get an orange warning chat message basically saying I need to select a token. 
1599616851
Oosh
Sheet Author
API Scripter
Oh, I meant it still does the calculation and publicly posts it after the error, which annoys me: [[@{selected|ego} &{tracker}]] puts nothing in chat and throws a warning [[@{bob|ego} &{tracker}]] throws a warning and throws a useless inline roll to public chat, annoying the GM who is trying to get everyone on the tracker.
1599627896
GiGs
Pro
Sheet Author
API Scripter
Christopher W. said: I tried this: @{Selected|EGO}&{tracker} But it just posted the words selected|ego There is no roll since Hero systems uses the characters dex (or in this case) ego for initiative. I changed it to @{Feedback|EGO}&{tracker}, and it pulled the correct stat without putting it into the tracker. You need to have a token selected, that has its Represents dropdown set to a character. @{Feedback|EGO}&{tracker} wont work, unless you are also selecting a token that Represents the character Feedback. The &{tracker} command only works with tokens, not characters, so you must  have a token selected when you run it, and that token must Represent a character if you want to use a stat value from the character.