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

Help Please: Combining a ChatSetAttr and a Token Mod command in one macro.

I have tried automating the buffs from 5e by setting up macros. To do so I need to run both commands in ChatSetAttr and Token Mod. The chatsetattr always works, the token mod part works only part of the time.  Where am I going wrong. ?{Select Token Receiving Blessing Then Choose Matching Name From Dropdown Menu|Andre,!setattr --name Andre Shanairra --global_spell_attack_bonus#d4cs0cf0 --global_saving_throw_bonus#d4cs0cf0 --global_attack_bonus#d4cs0cf0 !token-mod --sel --set statusmarkers#+chained-heart|Falfnir,!setattr --name Falfnir --global_spell_attack_bonus#d4cs0cf0 --global_saving_throw_bonus#d4cs0cf0 --global_attack_bonus#d4cs0cf0 !token-mod --sel --set statusmarkers#+chained-heart|Jerick,!setattr --name Jerick Azathoth --global_spell_attack_bonus#d4cs0cf0 --global_saving_throw_bonus#d4cs0cf0 --global_attack_bonus#d4cs0cf0 !token-mod --sel --set statusmarkers#+chained-heart|Jean,!setattr --name Jean LeFlambeur --global_spell_attack_bonus#d4cs0cf0 --global_saving_throw_bonus#d4cs0cf0 --global_attack_bonus#d4cs0cf0 !token-mod --sel --set statusmarkers#+chained-heart|Phillip,!setattr --name Phillip --global_spell_attack_bonus#d4cs0cf0 --global_saving_throw_bonus#d4cs0cf0 --global_attack_bonus#d4cs0cf0 !token-mod --sel --set statusmarkers#+chained-heart|William,!setattr --name William Walker --global_spell_attack_bonus#d4cs0cf0 --global_saving_throw_bonus#d4cs0cf0 --global_attack_bonus#d4cs0cf0 !token-mod --sel --set statusmarkers#+chained-heart|Zoelle,!setattr --name Zoelle --global_spell_attack_bonus#d4cs0cf0 --global_saving_throw_bonus#d4cs0cf0 --global_attack_bonus#d4cs0cf0 !token-mod --sel --set statusmarkers#+chained-heart}
1491785874
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Do you always have a token selected when you are running this command? The token-mod commands require a selected token.
1491787229

Edited 1491787253
The Aaron
Pro
API Scripter
And I don't think --sel is an argument. You can pass token ids with --ids
1491794203
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
ah, was thinking --sel told it to take whatever was in msg.selected.
1491824069

Edited 1491824190
I do always have a token selected Scott. Aaron do I need to specify the character differently then? Will play with it a bit.  It would actually be preferable if I could find a way to click a token to run these macros. Have never found a way to make that work for ChatSetAttr. Maybe that was because my first buff required me specifying an I'd for a unique character reaping trait. 
1491825553
The Aaron
Pro
API Scripter
Try this for CharSetAttr: !setattr --name @{selected|character_name} --global_spell_attack_bonus#d4cs0cf0 --global_saving_throw_bonus#d4cs0cf0 --global_attack_bonus#d4cs0cf0 For TokenMod, just this should work on the selected token: !token-mod --set statusmarkers#+chained-heart the --sel would have been ignored, so this is pretty much what you're doing anyway.
1491830527
Jakob
Sheet Author
API Scripter
If you want to specify a ChatSetAttr target character by clicking on a token, try --charid @{target|character_id} for a target, or --sel to take all selected tokens.
Thanks folks- think I have reliable buff macros now for groups of selected token as well as individual tokens.