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

Add possible customized feature to Turn tracker?

1495918302

Edited 1495918491
Hello!  Roll20 noob here, TLDR: Would it be possible to write a custom code for the turn tracker to: make a button that the players can interact with to subtract a point from the overall turn score, and automatically readjust them in the correct order from most to least points?     Reasoning behind the madness: I am trying to work out the kinks in my initiative Roll system.  In the system the player chooses 2-3 player skills to represent the action he wants to make,  ( I.E Weaponry 3, Acrobatics 2) and roll that many d10s (with exploding die on 10).  For each 10 you roll, you get 1 action point.  Actions points are used for all kinds of things like abilities, sprinting, and certain attack types take more than one point, And even the amount of tries to convince a NPC in a RP moment.  Whomever has the most points goes first. Whoever is in the lead of points can decide to keep making turns, or like DnD5e's legendary actions, choose to take his turn when he pleases. Tracking these has becoming a little difficult with the turn tracker.  of constantly going in and manually subtracting and re-ordering the players in the turn tracker.    So it is possible to customize the turn tracker? edit: easier words!
1495920144
Lithl
Pro
Sheet Author
API Scripter
You can't modify the tracker's UI, but you can create macros that will modify the initiative values in the tracker. When you add &{tracker} to the end of a roll, the result of that roll is set to the selected token's initiative entry in the turn tracker (and adds the selected token if it isn't already in the turn order). Similarly, &{tracker:+} will increment the initiative value by the result, and &{tracker:-} will decrement the initiative. You can use this with math-only "rolls", resulting in a macro such as [[?{Increment|0} &{tracker:+}]] which will ask you for how much to add to the selected token's initiative, and then applying the modification.
Oh thank you!  This is works out amazingly!   To take is one step further is there a way to execute this exact code [[?{Increment|0} &{tracker:+}]]  without having to hit the submit button? and just have 2 buttons that automatically minuses or adds 1?   Also is it possible to add the tokens/players name into the macro so that he/she doesn't have to have the token selected for the token to work? and finally, is there a resource page where I can learn all this stuff?  xD  
Brian T. said: 2 buttons that automatically minuses or adds 1?&nbsp; Try these Command Buttons out: [+](!/&amp;#91;[ 1 &amp;amp;{tracker:+} ]&amp;#93;) / [−](!/&amp;#91;[ 1 &amp;amp;{tracker:-} ]&amp;#93;) Brian T. said: is there a resource page where I can learn all this stuff? &nbsp;xD&nbsp;&nbsp; Yup; the Roll20 Wiki ! The relevant documentation can be found here: <a href="https://wiki.roll20.net/Turn_Tracker#Adding_Values" rel="nofollow">https://wiki.roll20.net/Turn_Tracker#Adding_Values</a> To learn more about macros in general, I recommend reading through some of the pages listed on the Roll20 Wiki's Main Page , including: Macros & Text Chat Sheet Roll Buttons & Command Buttons Dice Reference & Rollable Tables Journal Attributes Abilities Roll Templates Tokens & Token Actions
1496166244
Lithl
Pro
Sheet Author
API Scripter
Brian T. said: Also is it possible to add the tokens/players name into the macro so that he/she doesn't have to have the token selected for the token to work? No. The &{tracker} syntax depends on having a token selected. The turn order window operates on a token level, not on a character level. It is, after all, possible to have multiple different tokens representing the same character. =)
Wow. 0.o &nbsp;actual documentation! &nbsp; &nbsp;&nbsp; @ Brian Sweet!!! &nbsp;Makes sense. &nbsp;So I went and tried to do some macro homework for myself. However I am totally lost on how this macro works:&nbsp; [[?{Increment|0} &{tracker:+}]] How do I get that macro to work without the drop down menu, aka, "submit" button? and just have it subtract 1 from the remaining number in the tracker. &nbsp; I &nbsp;must have missed where the "increment" code was explained. &nbsp;What function do you use to tell the code to take the number in the tracker, and just subtract from, or add too that number? i can subtract 10 from everything in the tracker, or reset the number. &nbsp;but i have no idea how to tell it to take the existing number and just alter it by 1 (or any number). &nbsp; @ Silvyre Duuuuuude! those buttons! &nbsp;oh man, you just opened up an entire new mechanic to think about. &nbsp; &nbsp;thank you for the references! Thanks so much guys!
1496287780
Lithl
Pro
Sheet Author
API Scripter
Brian T. said: How do I get that macro to work without the drop down menu, aka, "submit" button? and just have it subtract 1 from the remaining number in the tracker. &nbsp; I &nbsp;must have missed where the "increment" code was explained. &nbsp;What function do you use to tell the code to take the number in the tracker, and just subtract from, or add too that number? Both [[-1 &{tracker:+}]] and [[1 &{tracker:-}]] should work.
Brian T. said: I &nbsp;must have missed where the "increment" code was explained. ?{Increment|0} is a Roll Query .
@Brian &nbsp; &nbsp; Brian said: Brian T. said: How do I get that macro to work without the drop down menu, aka, "submit" button? and just have it subtract 1 from the remaining number in the tracker. &nbsp; I &nbsp;must have missed where the "increment" code was explained. &nbsp;What function do you use to tell the code to take the number in the tracker, and just subtract from, or add too that number? Both [[-1 &{tracker:+}]] and [[1 &{tracker:-}]] should work. Ooooooooooooo my goodness. lol i didn't have the double brackets. i was like "what!? i tried that!!" looks in code... didn't double bracket it. &nbsp;Thanks Brian! &nbsp;&nbsp; Silvyre said: Brian T. said: I &nbsp;must have missed where the "increment" code was explained. ?{Increment|0} is a Roll Query . Aaah! So increment is just a variable word he used? &nbsp;you could easily have just written down anything? and as long as it was in that format, it would work? &nbsp;
1496360762

Edited 1496360815
Brian T. said: Aaah! So increment is just a variable word he used? you could easily have just written down anything? and as long as it was in that format, it would work? Yup.