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

Macro 5e 2024 Initiative

Hello, I want to make a macro for initiative. I want that macro is a stand alone macro without selected a token and with initiative added to turn order. I try this : &{template:simple} {{charname=BOB}} {{rname=Initiative}} {{r1=[[1d20 + @{BOB|initiative_bonus} &{tracker}]]}} But this macro need to select a token. I try these both : &{template:simple} {{charname=BOB}} {{rname=Initiative}} {{r1=[[1d20 + @{BOB|initiative_bonus} &{ BOB|tracker }]]}} => fail &{template:simple} {{charname=BOB}} {{rname=Initiative}} {{r1=[[1d20 + @{BOB|initiative_bonus} &{ tracker|BOB }]]}} => fail Do you have some ideas ? Thank you in advance.
Nobody have insight on this point ?
1747144954
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Ombres! You need to have some way of indicating a token. Tracker Initiative is token based, not character based. Some character sheet initiative buttons have the intelligence to find an associated token on the board, though this doesn't always work if there happens to be a number of tokens representing that sheet on the VTT.
1747150397

Edited 1747150420
For my example, I have only one token named BOB. And the result dont go to the tracker. May be I miss something. 
1747153540

Edited 1747153563
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
OK, unpacking the macro, there are some issues or misconceptions. Neither &{BOB|tracker} nor &{tracker|BOB} is a valid construction. There is the construction: @{tracker|Bob} This is a lookup, which returns the initiative value for "BOB" if it is a turn in the turn order., ex: "15" &{tracker} is just a command to "put this roll value on the turn tracker, using the selected token". It can receive a :+ or a :- to increment or decrement a value on the tracker for that token. example: [[1d0 + 5  &{tracker:+}]] will add 5 to the initiative value for a selected token that has a tracker entry. [[1d20 + @{selected|initiative_bonus} &{tracker}]] will roll a simple initiative for the selected character token.   @{selected|wtype}&{template:simple} {{rname=^{init-u}}} {{mod=@{selected |initiative_bonus}}} {{r1=[[@{selected |initiative_style}+@{Kurtak|initiative_bonus}@{selected |pbd_safe}[INIT] &{tracker}]]}} {{normal=1}} @{selected |charname_output} Will roll a more robust initiative, taking into account more options. The character sheet has special built in code that looks for an associated token on the board and rolls initiative for that token. The base VTT has no such mechanism. There are reasons for this. Ex. If there are two goblin tokens on the board, but they both refer to the same character sheet, the tracker needs to have an entry for each token (assuming the GM isn't doing one initiative for all goblins). The turn tracker doesn't know anything about character sheets. It only knows tokens. TL;DR: Without a Mod script, and without rolling from the character sheet button, you need to physically select the token you want to send to the tracker.
1747153645

Edited 1747407735
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Here is a link to the documentation on the wiki page .
1747419934
timmaugh
Forum Champion
API Scripter
If scripts are available, you can do what you want with the trick found in this post . For your command, it would look like: !&{template:simple} {{charname=BOB}} {{rname=Initiative}} {{r1={&r}1d20 + @{BOB|initiative_bonus} {&tracker} {&/r} }}  {&simple} {&select BOB} You could, with further metascript tricks, get a more character-agnostic version... maybe where you pick the character from a query so you could roll initiative for any of a set of characters. That's a bit beyond the scope of what you asked for, here, so I won't get into it. But if scripts are available in your game (creator/owner of the game must be Pro) and you want to pursue this, post back and I'll help.