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

Initiative Macro

1681482292

Edited 1681482331
Hello. I was hoping someone could show me a macro for Initiative.  Ideally, a macro that allows you to: > Click on your Character Token  > Click an Initiative Button   > Enter a modifier into a pop-up dialogue box     > Click Submit/Enter (which rolls the die and sends the result to the Initiative Tracker.  I've been looking at this for hours but can't get it right.  Thanks all. 
1681483195

Edited 1681483205
timmaugh
Pro
API Scripter
Sure... For a flat die roll + free form entry modifier: [[1d20+?{Modifier|0} &{tracker}]] For a flat die roll + fixed options for modifier: [[1d20+?{Modifier|-5|-4|-3|-2|-1|0|1|2|3|4|5} &{tracker}]] For adding an attribute to a die roll + free form modifier: [[1d20 + @{selected|initiativeAttribute} + ?{Modifier|0} &{tracker}]] For an attribute that already has the die roll in it + free form modifier: [[@{selected|initiativeAttribute} + ?{Modifier|0} &{tracker}]]
And depending on which character sheet you are using, there may be a built-in command to roll from the sheet with appropriate modifiers.  E.g. for the ‘D&D 5E by Roll20’ sheet you can select a token and use this command:  %{selected|npc_init} You can put that command on the character sheet Attributes & Abilities tab as a token action, or as a global Collections Macro token action so you can select the token and click a single button to roll initiative. 
That's brilliant! Thanks both The first two are perfect for my requirements.  The last two tell me ' No character was found for 'selected' And they don't apply any modifiers
What game are you playing? What character sheet (if any) are you using? We can give you better advice if you provide more information, and what exactly you're hoping to have as an output.
Of course, sorry. It's the Basic Fantasy Rpg and there are two character sheets (in Roll20) and I'm using the first. 
For that sheet, the initiative roll is: %{selected|Initiative} If you're curious about other rolls on the sheet, you can use the 'inspect' feature in Chrome or Firefox, which would look like this: Then the Roll20 chat command to activate a roll from a sheet is %{CHARACTERNAMEorID|COMMANDNAME} - in this case you're using 'selected' to use the selected token (you could also use 'target' or the name of the character, or the character id, and 'Initiative' is the command from the sheet. 
timmaugh said: For adding an attribute to a die roll + free form modifier: [[1d20 + @{selected|initiativeAttribute} + ?{Modifier|0} &{tracker}]] For an attribute that already has the die roll in it + free form modifier: [[@{selected|initiativeAttribute} + ?{Modifier|0} &{tracker}]] Mark said: The last two tell me ' No character was found for 'selected' And they don't apply any modifiers The reason they don't work is because Timmaugh was just using a generic 'InitiativeAttribute' title, because he didn't know which character sheet you are using, and thus what the name of modifier (attribute) would be. For the Basic Fantasy RPG it would look like this: [[1d20 + @{selected|initiative} + ?{Modifier|0} &{tracker}]] But it looks like that sheet pulls from what is put into the character stats, so you have the Initiative Type ('Initiativedice' - default is 1d6), Dexterity Modifier (' dexterity_mod') , and Initiative Bonus ('initiative') (which is the bonus). When you click on the 'Roll' button for initiative from the sheet, or use  %{selected|Initiative} , those numbers are automatically rolled.
1681544358

Edited 1681544376
Thanks for the info Jarren. I was thinking of going Pro so I could create my own character sheet but to be honest, what you posted above is beyond me.