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

Invisible to players, Token initiative

1500593065

Edited 1500593168
Hi, I am looking for a script which does the following:  Takes the rolled initiative of a token, which is on the Token layer, puts it in the Turn Order, in such a way that it's initiative is invisible to the players. Similarly how it looks like when the initiative is rolled for the same token but when it is on the GM layer:  Why do i want this: I want my players to be able to see the enemies that they are fighting against on the map, but not to know which enemies turn it is. If their are other solutions on how to do this with out a script,  i would love to hear them, thank you
1500595580
The Aaron
Pro
API Scripter
This would be pretty easy with an API script, but would be pretty tedious without it.
1500605477

Edited 1500605502
Andrew C
Marketplace Creator
You dump a copy of the monster on the GM layer, have it roll Initiative. You can use a real monster or just a token of anything with the same name as a group of them. If they couldn't see the token, they don't see its initiative.
1500605971
The Aaron
Pro
API Scripter
Yeah.. You'd have to name the tokens the same and make sure players can't see the names, etc...
1500615293

Edited 1500615385
With scripts, I would say that the  Bump script would be a good option, since the token slave it creates has almost exactly the same token configuration as the original token (represents its original token's character sheet, etc.), follows the original token, and stays in the GM layer if the original is in the Token Layer (and vice versa). Still possible without, but as mentioned already, it's pretty tedious. 
1500620568
Ambitosis
Marketplace Creator
+1 for the suggestion of using Bump, it's great.
1500641796
The Aaron
Pro
API Scripter
Bump is a good idea, but it might require some modification for this use case. I'll have to verify the conditions, but it has logic that swaps the bump images in the turn order for the real token, which would need to be disabled to work like the OP wants. (This was actually the "easy" I was thinking of for an API solution!) 
Thanks for the advise! Yeah i will try BUMP, see if it works, but yeah what i was looking for was Script (I GM for my DM who has the pro but hates the tech stuff). What modifications would you suggest to the BUMP? Again thank you for being on top of things.  
1500660369

Edited 1500660386
The Aaron
Pro
API Scripter
This code causes the invisible token, if found in the turn order, to be swapped for the visible token:     handleTurnOrderChange = function() {          Campaign().set({             turnorder: JSON.stringify(                 _.map(JSON.parse( Campaign().get('turnorder') || '[]'), function(turn){                     _.find(state.Bump.mirrored,function(slaveid,masterid){                         if( slaveid === turn.id) {                             turn.id = masterid ;                             return true;                         }                         return false;                     });                     return turn;                 })             )         });     }, swapping slaveid and masterid will cause any token which is BumpSlaved to have it's slave token in the turn order automatically:     handleTurnOrderChange = function() {          Campaign().set({             turnorder: JSON.stringify(                 _.map(JSON.parse( Campaign().get('turnorder') || '[]'), function(turn){                     _.find(state.Bump.mirrored,function(slaveid,masterid){                         if( masterid === turn.id) {                             turn.id = slaveid ;                             return true;                         }                         return false;                     });                     return turn;                 })             )         });     }, That's on line 555 of the source, should pretty much do what you want, with the caveat that if you've bumped the token to the GM Layer, hiding it from the players, then the turn order will show the slave token, and hovering it will reveal the location.   If you want to take advantage of Bump AND have your turn order always for the token on the GM layer, it's a bit more complicated but still possible.  Let me know.