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.