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

[Request] IniativeTracker changes for Shadowrun

1431386903

Edited 1431387011
The script <a href="https://wiki.roll20.net/Script:InitiativeTracker" rel="nofollow">https://wiki.roll20.net/Script:InitiativeTracker</a> is quite cool but for shadowrun it has 2 major problems. On the one hand, if i change the initiative manually or with the following macro /em [Unterbrechungshandlung] für [[?{Wieviel Initiative kostet dich diese Handlung?|5} &{tracker:-}]] Initiative then it stops tracking but this is a valid change of iniative in the shadowrun system and altough i have 4 entries in the turn tracker it only alternate sbetween 4 after having changed 2 iniative values. Example outputs showing this problem are: Start of Round 19 Start of Turn 19 for Elf 2 (13) Start of Turn 19 for Elf 3 (13) Start of Turn 19 for Vago (9) Start of Turn 19 for Elf 1 (3) GM (GM) [Unterbrechungshandlung] für 5Initiative Start of Round 20 Start of Turn 20 for Elf 2 (13) Start of Turn 20 for Elf 3 (8) Start of Round 21 One token has changed its initiative by -5 with the macro above and suddenly it only rotates through 2 tokens :( Second: Does anyone know how I would be able to substract 10 from all initiatives each time a round ends? (The -10 each time a token becomes active is very annoying in the shadowrun system and I really really would avoid it for several reason - one that the initiative value is important)
1431388520
The Aaron
Pro
API Scripter
Which version of Shadow Run are you playing?
I assume the next line of output after "Start of Round 21" was "Start of Turn 21 for Vago (9)"? If so, this is a limitation. The API for dealing with the tracker doesn't have a concept of rounds. Instead, each time something changes, an event fires saying "this is the current state of the tracker". To layer rounds on top of that, the InitiativeTracker script has the user configure whether initiative is supposed to flow from high to low or from low to high, and then considers any change in the opposite direction to be a new round. This trick is correct as long as the tracker is sorted the way the configuration says it's sorted. However, if anything in the tracker is out of place (e.g. the 8 in your example), it'll give you a false positive in the middle of a round. To avoid this, either resort the list or drag the offending entry into place whenever an entry's count changes in a way that leaves it out of order.
1431451151

Edited 1431451491
@Aaron, I am playing Shadowrun 5. @Manveti, I am not sure if i get you right, but to me it sounds as the tracker takes a snapshot on "!tracker start" and sorts it as set in the settings. Shouldn't it be easily possible to store this list of the state at "!tracker start" and sort the list only when we we use "!tracker fwd" on the last entry and therefore are sure we get a new round? I do not really get what you mean with the false positive. Why is this a problem? Why is it important for the tracker that the numbers are sorted at every state change? The new round. Woulnd't it be possible to snapshot the total count of tokens in the tracker on "!tracker start" and consider it a new round after X "!tracker fwd" instead of the initiative change? It feels like this would make more sense. Yes the next entries were Start of Turn 24 for Elf 2 (13) Start of Turn 24 for Elf 3 (8) Start of Round 25 Start of Turn 25 for Vago (9) Start of Turn 25 for Elf 1 (3) Start of Round 26 Start of Turn 26 for Elf 2 (13) Start of Turn 26 for Elf 3 (8) Start of Round 27 Start of Turn 27 for Vago (9) Start of Turn 27 for Elf 1 (3) Start of Round 28 Start of Turn 28 for Elf 2 (13) Start of Turn 28 for Elf 3 (8)