Is there a function for chatsetattr to affect all tokens that are currently on the token layer without having to select them all?
If not. Could there be?
Is there a function for chatsetattr to affect all tokens that are currently on the token layer without having to select them all?
If not. Could there be?
ScriptCards as a function to get all of the tokens on a page, I believe, and then you could launch the ChatSetAttr call.
Alternately, if you knew all of the tokens ahead of time, you could add a {&select token1, token1, token3...} statement to the line (from SelectManager). That would select them virtually (just for the purposes of the message, nothing changing on the board).
I have a metascript in the works to make this work natively in any script, but as of now, those are the only ways I know of.
It looks like the only out-of-the-box option is all characters in the game, but is there a reason you can't use Ctrl-A before issuing the command?
Peacekeeper B said:
Does scriptcards work with Group Initiative?
"Work with" in what way? It can launch a GroupInit call...beyond that, I'm not super familiar with SC. Maybe you can post what you want to do, specifically, and a practitioner of the ScriptCard arts can chime in.
Actually, that's a good idea. Often someone posts a very specific thing they are trying to do, but if the goal were known, a better solution might exist.
Simply put, my Initiative and group initiative macros have setattr set in them to reset certain actions. I play Castles and Crusades, so things like charge, offensive focus, etc are good for one action. Instead of having a player constantly resetting these effects themselves they are toggled off by group initiative. I also have things like stun and spell durations worked into it (through generic attributes).
Yes I can ctrl A or otherwise select all but sometimes I forget. And I don't want to use all because it takes a while do everyone character in the game.
I don't use scriptcards (too invested in powercards, and stubborn).
Possibility: You could build some resetting macros and use the script On My Turn which runs them when a player reaches the top of the Turn Order.
Ok, then you might want to use a {&select...} statement, and just make sure you have the list of all the tokens you want to include. The good thing about that route is that you can use their names, and SelectManager will look on the page where you are, so you don't have to worry about a token with a different ID for the same character on a different map when you transition.
Post your macro if you go this route and have difficulty
I'd assume trying to use "all" parameter makes the macro affect every token, regardless of layer. Guess layer-specific "all" selection options for tokenmod could make sense.
Using --all affects every character in the game, even if they aren't on the board/layer at all. Every character sheet in your folders will be affected and that takes time. It would considerably slow down the game.
If there were a way to add --layer token to the parameter of options for chatsetattr that would be great.
Andreas J. said:
I'd assume trying to use "all" parameter makes the macro affect every token, regardless of layer. Guess layer-specific "all" selection options for tokenmod could make sense.
keithcurtis said:
Possibility: You could build some resetting macros and use the script On My Turn which runs them when a player reaches the top of the Turn Order.
I would have to add that to every character in the game. And then the player would have to activate the maneuvers at the start of their action and not the start of the round.
Peacekeeper B said:
If there were a way to add --layer token to the parameter of options for chatsetattr that would be great.
Jakob, the original API author isn't active here these days, so is unlikely to update it, it will have to be someone else.
ChatSetAttr related