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

Activating/Deactivating a Shield on D&D 5E by Roll20 character sheet by macro REQUEST

Is there a macro to activate/deactivate an inventory item like the title says? Thank you, Barry
1720918494
Andrew R.
Pro
Sheet Author
Yes, it’s a Mod, of course. CharSetAttr or ScriptCards will do that. 
Andrew, would you show me where to find the CharSetAttr script for something like that?
Scriptcards would be preferrable actually
Here is one way to do it with ScriptCards !script {{ --&ItemName|Shield --#whisper|self --#title|[&ItemName] equip/unequip --#sourceToken|@{selected|token_id} --Rfind|[*S:character_id];[&ItemName];repeating_inventory;itemname --?"[*R:itemname]" -eq "NoRepeatingAttributeLoaded"|>LogMessage;Item Not Found;FATAL;Could not find an item named [&ItemName] on [*S:character_name] --?[*R:equipped] -eq 1|&newState;0|&newState;1 --+|[?[&newState] -eq 1|Equipping|Unequipping] [&ItemName] --!a:[*S:character_id]|[*R>equipped]:[&newState] --:Done| --X| --:LogMessage|EmoteText;MessageLevel;MessageText --#emoteText|[%1%] --+[%2%]|[%3%] --?"[%2%]" -eq "FATAL"|Done --<| }} That will toggle the item in the ItemName variable at the top of the scriptcard. Lots of ways you could go about enhancing that but it's one way to do what you asked.
Thank you for your help Joshua N! :))
As a Pro sub, do you use Kurt's Token Action Menu?  We use it at our table and we have a character that frequently switches between bow and melee, so the ability to swap out the shield easily AND see when it was on/off was required.  What I did was add a shield to the inventory but amend it to give no bonus to AC, so it just gave encumbrance (you could also unequip it of course).  Then added a global AC mod called Shield with +2 mod.  This then shows green when the player clicks the button to have it to hand, click it again to put it away.  Player can do it, DM can do it if needed, but easy, comes from same menu we use for combat actions and visually obvious.  Just another solution
Thank you Simon G