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

open Turn Order macro command?

May 20 (1 year ago)
Mark
Pro

The long story is that I have GroupInitiative and TurnMarker1 scripts installed and their interaction always causes an issue with the round number at the beginning of each combat being wrong.  There is no bug. Im just experiencing an inconvenience (plaguing me for months) due to the order in which I need to click on things.  But rather than giving a long explanation of all that, I'll start with a hopefully easy solution.

Question: 

Is there a Macro command that will open the Turn Order box?  Preferably if that command has an option that would open Turn Order "if" the box is not already open.

The script GroupInitiative *does* have something that toggles the box open or closed ( !group-init --toggle-turnorder ), which I could add into a macro.  However, if I use this it continuously toggles each time I use it, and that wont work. As far as I know, it only flips back and forth, the command does not include an option to *only open* the Turn Order box or to *only close* the Turn Order box.  

So here is one possible way to open the turn order tracker using ScriptCards.

!script {{
  --#hidecard|1
  --?[*C:initiativepage] -ne "false"|Done
  --!campaign:root|initiativepage:true

  --:Done|
}}

It will open the tracker if not already open. That's from a portion of a larger ScriptCard I use to start battle that I use without all the other things that aren't specific to just opening the tracker.

May 20 (1 year ago)
Mark
Pro

Ok thanks, I added ScriptCards and that does work!  I'll have that as a backup option if there isn't anything else available.  I'm always afraid to add more API scripts because im already having to restart the sandbox quite alot (perhaps I have too many character sheets or something).  But hopefully ScriptCards will be ok to keep around.

I’m pretty sure that GroupInitiative has a setting to automatically open the turn order when it is used, if the turn order is not already open. 

I think you can use !group-init --help to access the settings. 

May 20 (1 year ago)

Edited May 20 (1 year ago)
Mark
Pro

I tried that it only flips on and off.  The command is !group-init --toggle-turnorder 

I even tested some ideas to see if they had some secret unlisted command options, but none that I tried worked.

The command is a little buried in the help text:

!group-init-config --toggle-auto-open-init


May 20 (1 year ago)

Edited May 20 (1 year ago)
Mark
Pro

I do have that enabled already, and it's actually part of the problem.  If I start combat by rolling a monster's initiative, the round number will be incorrect.  But the explanation for why is gonna get long and complicated (it's all connected to the way TurnMarker1 script interacts with a fully cleared combat Turn Order box, causing the round# to vary by +/- 1 for a new combat). 

However, you have given me a new idea.  If I *disable* this option, it might be an alternate way to fix the problem, by forcing me to open the Turn Order box via a different method before rolling any monster initiatives.

EDIT: That option also causes the command !group-init --clear  to no longer automatically *close* the Turn Order box anymore.  *Facepalm*  So that isn't ideal.

May 21 (1 year ago)
Mark
Pro

Another question about the GroupInitiative mod

The command !group-init will roll initiative for the selected token(s).  If no token is selected, it instead displays the entire -help text..  Is there an option to disable automatically whispering the help text if nothing is selected?  Does the GroupInitiative mod have an alternate command besides !group-init that will also roll initiatives for the selected tokens.  Perhaps a dummy command option where that option has no function, but at least doesn't whisper that wall of text to me and wipe all previous contents of the chat box up off the screen. 

This would enable me to use !group-init within another macro that won't necessarily have any tokens selected when its being called.

May 21 (1 year ago)
timmaugh
Forum Champion
API Scripter


Mark said:

Another question about the GroupInitiative mod

The command !group-init will roll initiative for the selected token(s).  If no token is selected, it instead displays the entire -help text..  Is there an option to disable automatically whispering the help text if nothing is selected?  Does the GroupInitiative mod have an alternate command besides !group-init that will also roll initiatives for the selected tokens.  Perhaps a dummy command option where that option has no function, but at least doesn't whisper that wall of text to me and wipe all previous contents of the chat box up off the screen. 

This would enable me to use !group-init within another macro that won't necessarily have any tokens selected when its being called.

I know you've already said you're no looking to install a bunch of other scripts... but the number of times you have to restart your sandbox might be related to *which* scripts you have installed. There are some that are more stable than others... If you share a screenshot of your script deck (with what scripts you have installed), we might be able to direct you to more stable alternates.

So, knowing you already said you didn't necessarily want more scripts, I'll still offer that even if GroupInit doesn't offer a native option to do what you're asking (only run if you have a selected token), you can do it with a metascript.

If you install the MetascriptToolbox (don't balk at the number of supporting scripts that comes with it -- these are all pretty rock solid scripts), you can "conditionally" run the GroupInit command. That would look like this:

!{&if @(selected.id[0]) != 0}group-init{&end}

What is happening is you're using a Fetch construction to go out and get the ID of the first token currently selected. If no token is selected, that retrieval fails and instead returns its default value, which we've declared to be "0". Then APILogic conditionally tests whether the result of that Fetch operation results in "0", and only if it does NOT equal "0" does it run the Group-Init command. Otherwise, it sends an empty command line.



May 21 (1 year ago)
Mark
Pro

Sounds helpful.  So, I started to add MetaScriptToolbox, and it gave me a warning "MetaScriptToolbox or it's dependencies read or write fields that are used by other scripts you currently have installed." So I didn't add for now.

Currently I have:

TurnMarker1, Aura/Tint HealthColors, Token Action Maker, TokenLock, GroupInitiative, TokenMod, and just recently UDLPasswall, and today ScriptCards.  

I used to have more, but in the hopes of cutting down random errors that kept popping up I've narrowed it down to only the most useful.

UDLPasswall no longer works, since Roll20 Walls and Windows were introduced. That may be a source of errors. 

Aura/Tint Healthcolors is a great script but it’s definitely prone to causing some issues, more from doing a lot of things to tokens but not always being explicit that those changes are happening. I wouldn’t be surprised if it has some negative interactions with other scripts that are adjusting tokens. It also hasn’t been updated in a long time. 

Token lock should still work just fine, but you can do all of its functionality natively through TokenMod controlling the actual lock settings of tokens instead of simply preventing their movement by resetting them when they are moved. 

TokenMod, TokenActionMaker, and Scriptcards are solidly written and kept very up to date by their authors. TurnMarker1 and GroupInitiative were written by TheAaron so I’d be surprised if they’re the cause of any sandbox issues. But they may have weird interactions with other scripts (such as Aura/Tint Healthcolors) fighting to adjust tokens which could potentially crash the sandbox. 

May 21 (1 year ago)

Edited May 21 (1 year ago)
Mark
Pro

That makes sense. 

Aura/Tint Healthcolors seems to work flawlessly during gaming sessions, but it does tend to stop working sometimes during the week while I'm setting up new tokens and so forth.  My players really appreciate this mod, it saves having people repeatedly ask, "how injured does it look now?" So it would be very unfortunate to lose. 

TokenLock is great because while keeping everything locked it also automatically allows the token at the top of the Turn Order box to move.  If I could duplicate that functionality through TokenMod, then that would allow me to take out another script.  That's another thing I'll research.

UDLPasswall isn't really important, just an added perk I wanted to try out.  I planned to use it in places like a curtain, or a waterfall; objects the players could not see through but didn't prevent movement.  Also planned to try it as a way to create areas of darkness (walls around each square to stop vision but not stop movement).   It has worked fine on the 2 map pages that I used it on.   But , no need to take chances, so I will remove that script!

Thanks for the analysis!

May 21 (1 year ago)
timmaugh
Forum Champion
API Scripter

Also, the message you got when you installed the Toolbox (about writing fields that other scripts also write)... that's something you can ignore. The Roll20 ecosystem is not so robustly demanding of its documentation standards that every script has to announce what it modifies in the game, so it is fairly meaningless.

The message is basically informing you that the Toolbox might (let's say) update a token property... while another script is also notifying the Script Moderator that it modifies that same property. That's something that might be helpful to know if it was required of every script to disclose (and to be thorough in that documentation)... then you might be able to use those disclosures to track down the sort of interactions Jarren mentioned involving A/T Healthcolors.

But what you're left with is that some scripts will work on the same game information... which you always knew. So you can just click through those messages when they pop up.

May 21 (1 year ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

To add to timmaugh's excellent explanation, when script writers submit scripts, they fill out a json file that has data like author, version, etc. There is a field for what things the script alters. For the reason's timmaugh outlines above, not everyone rigorously fills that field out. Hence some scripts will give you the notification and some won't.

May 21 (1 year ago)

Edited May 21 (1 year ago)
Mark
Pro

Ok on that note, I added MetascriptToolbox.  I used timmaugh's suggestion to add a conditional, and that works perfectly!  I'm also using JoshuaN's "only if" idea with ScriptCards.  So in conclusion, I now have all of the minor issues sorted out.  Thanks guys! As long as I remember not to click on the Toolbar to open the Turn Order box when starting a new combat (which will still cause the starting round number to be off by 1), everything is now perfect.  

P.S. I am a tad bit nervous that I went from having 6 core scripts to now having over 20 (since metatoolbox installs a bunch of other stuff that I haven't yet even researched what are used for), but I'll take yer guys word for it and keep my fingers crossed! Haha.