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

ChatSetAttr plus TokenMod Macro Help?

1562217289

Edited 1562227826
Hi all, hoping to get some help here. I've got this global macro set up for setting conditions/buffs on both sheet attributes and token status icons. The !setattr commands have stopped working, except when I use the Clear All option to only set attributes to 0 (same behaviour with multiple tokens selected). I've also noticed the following error repeated in the API console: "Error: No attribute or sheet field found for character_id -LYUYvOgKhGmHI6PWdvH named character_sheet" Is there a way I can adjust the syntax of this macro to get both commands to work? (I can do the adjustments myself since it's such a dense macro, but an example would be appreciated :) ) ?{Status|<snip>Disabled,!token-mod --set statusmarkers#+interdiction !setattr --sel --condition_disabled#1|Unconscious,!token-mod --set statusmarkers#+pummeled#+archery-target --off light_hassight !setattr --sel --condition_unconscious#1 --condition_helpless#1|Stable,!token-mod --set statusmarkers#+angel-outfit#-death-zone !setattr --sel --condition_stable#1 --condition_dying#0|Dying,!token-mod --set statusmarkers#+death-zone#+pummeled#+archery-target --off light_hassight !setattr --sel --condition_dying#1 --condition_unconscious#1 --condition_helpless#1|Dead,!token-mod --set statusmarkers#+dead<snip>|Clear All,!token-mod --set statusmarkers#-stopwatch#-sleepy#-drink-me#-interdiction#-pummeled#-angel-outfit#-death-zone#-broken-heart#-half-heart#-green#-radioactive#-cobweb#-three-leaves#-white-tower#-chained-heart#-black-flag#-flying-flag#-screaming#-broken-skull#-red#-bleeding-eye#-chemical-bolt#-bolt-shield#-aura#-yellow#-edge-crack#-skull#-fishing-net#-half-haze#-tread#-grab#-archery-target#-padlock#-frozen-orb#-arrowed#-back-pain#-snail#-broken-shield#-fist#-fluffy-wing#-lightning-helix#-blue#-ninja-mask#-overdrive --on light_hassight !setattr --sel --condition_bleed#0 --condition_blinded#0 --condition_confused#0 --condition_cowering#0 --condition_dazed#0 --condition_dazzled#0 --condition_deafened#0 --condition_disabled#0 --condition_dying#0 --condition_energy_drained#0 --condition_entangled#0 --condition_exhausted#0 --condition_fascinated#0 --condition_fatigued#0 --condition_flat-footed#0 --condition_frightened#0 --condition_grappled#0 --condition_helpless#0 --condition_nauseated#0 --condition_panicked#0 --condition_paralyzed#0 --condition_petrified#0 --condition_pinned#0 --condition_prone#0 --condition_shaken#0 --condition_sickened#0 --condition_stable#0 --condition_staggered#0 --condition_stunned#0 --condition_unconscious#0 --condition_incorporeal#0 --condition_invisible#0}
I'm not sure but maybe try closing the !setattr part with !!! before the |
Hmm this sort of worked the first time I tested the command, except the !!! was added into the attribute. After that, the commands stopped working again.
I would just create separate macros for each query result, the. Have the query call up those macros
This doesn't seem to work either... can two different commands just not exist in the same chat output? I've tried reversing the order, putting them in the same line, in separate lines. No matter what, the command that is put first is the only one that goes through, whether it's for TokenMod or ChatSetAttr; except for the last one in the example macro above.
1562340967
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Try using a chat menu . The syntax is much simpler.
1562345041

Edited 1562345183
keithcurtis said: Try using a chat menu . The syntax is much simpler. I was thinking of doing that. Probably still will, but I don't think it'll fix the issue. I tried out a macro with a single !token-mod command and a single !setattr command, and it still only runs whichever command is written first. Even tried splitting each command into a different macro, then calling both macros at once; same result. The API console still prints that same error message as above, too, but I'm unsure what it means.
So I think I've managed to make it work? I have to make one macro for the !setattr and one for the !token-mod, then one that calls both of those macros. For some reason this only works if they are in that order, and then I added a space and !!! after the !setattr macro, so it ends up looking like: %{macro|paralyzed-attr} %{macro|paralyzed-mod} !!!
Does anyone know if a way to simplify this before I go through with making 3 macros for each condition?