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

Setting NPC to "Whisper to GM" and "always roll damage" with macro. Can it be done?

Hi! I've just begun delving into the wonderous world of macros. I have ALOT of homebrewed monsters in my games and have written them all in manually. I have now found out that there is a "Check Box" in the NPC setup that can set it so all attack rolls include the damage roll AND always whisperes to the GM. So my question is this. Is it possible to make a macro that if pressed changes these, so i can just press it when i drop my monster token onto the board? I already know that it is possible to set this up in "game settings" but this doesn't seem to change it for all the monsters i already have in my game.
1586789289

Edited 1586789298
Kraynic
Pro
Sheet Author
In general, your game settings will affect anything created after you made the changes.  Depending on the character sheet you are using (you didn't specify), there might be a setting inside the game to apply game settings to everything.  If that option doesn't exist for you, then you need to manually change any npcs that already exist and need those settings changed.
1586798849
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It can be done with the API script ChatSetAttr (available through One Click installation), but there is a caveat. When you choose "Always Whisper Rolls", this actually causes the sheet to flip the wtype attribute to '/w gm'. This is done maybe by sheetworkers, possibly because of... quantum. I dunno. But if you change the dropdown value with ChatSetAttr, nothing happens. If you use ChatSetAttr to actually set the final whisper type with ChatSetAttr, it works, but the dropdown doesn't change. So if you don't mind a dropdown that doesn't display the correct setting, these commands can flip the value: Whisper to GM !setattr --sel --silent --wtype|'/w gm ' Public !setattr --sel --silent --wtype|'' If you want to make these into chat buttons for putting into a  Chat Menu , then here is the code for that: [Whisper to GM](!setattr --sel --silent --wtype|'/w gm ') | [Public](!setattr --sel --silent --wtype|'')
Brilliant keithcurtis! This worked like a charm for setting them to whisper to gm. Is there also a way to do this for the "allways roll damage & crit" option on the character sheet?? (I'm using OGL D&D 5e character sheet format)
1586846890
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Apparently not. The Auto Roll works in exactly the opposite fashion. The attribute is "dtype", and the two possible values are "full" and "pick", which don't even have an apparent logic. "Full means "Auto Roll" and "pick" means "Don't Auto Roll"? I swear this sheet is a mystery. In any case, the behavior is opposite. Setting the value toggles the dropdown, toggles the value, but doesn't  toggle the behavior. The wtype prepends a whisper indicator before the whole output. The dtype decides which template is used. But that doesn't explain why you cannot programmatically set the dtype in any meaningful way.