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

Error with initiative and turn tracker

In the system I use the initiative is determined as follows: by the fixed Reflex value, in case of a tie, by the fixed value of Intuition and in case of a new tie by the roll of 1d6. I thought of creating a query where the player chooses one of the 3 options and sends the result to the turn tracker. Since & {tracker} does not seem to work with fixed numbers for fixed values I use 1d0 + {selectedIname_attribute (reflex or intuition}. I thought the syntax should be this, but I don't get a satisfactory result, can anyone help? & {template: default} {{name = @ {selected | token_name} tested initiative}} {{Initiative =? {Initiative-- | Reflex ([[1d0 + @ {selected | reflex} & {tracker}]]) | Intuition ([[1d0 + @ {selected | intuition} & {tracker}]]) | Scrolling [[1d6 +} & {tracker}]])}}}
1567311316
The Aaron
Roll20 Production Team
API Scripter
I don't think it will work with spaces between the @ and { or the & and { I use &{tracker} for fixed numbers all the time (that's my most common use case for it, really). You must have a token selected for it to work. Try taking those spaces out and selecting a token and see if that works for you. 
1567312110

Edited 1567312191
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Also, the space between template:  and default . And, won't cause a failure, but probably is going to cause unwanted formatting; remove the space between {{name  and =
Thank you, I managed to solve with your help, the code was like this: &{template:default}{{name=@{selected|token_name} testou iniciativa}}{{Iniciativa=?{Iniciativa--|Reflexo,([[@{selected|reflexo}&{tracker}]])|Intuição,([[@{selected|intuicao}&{tracker}]])|Rolagem,([[1d6&{tracker}]])}}}
1567531827
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Great to hear Thiago, You could actually remove the need for the html encoded problem characters as well: &{template:default}{{name=@{selected|token_name} testou iniciativa}}{{Iniciativa=([[?{Iniciativa--|Reflexo,@{selected|reflexo}|Intuição,@{selected|intuicao}|Rolagem,1d6}&{tracker}]])}} It's generally a good idea to pull anything that is in every option out of the query, and doubly so when that repeated text has html encoding.
16/5000 I will follow the tip
I will follow the tip