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 .
×

Can Party Member attribute on the character sheet be used programmatically?

Is it possible to use the Party Member checkbox in the character in macros or APIs?
1778991419
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Joab! Yes, in a mod script. It is just a value stored in a character's tags property. "tags"  holds an array of labels attached to the object. Scripts can use them to quickly identify or group things. The value is: "_roll20_internal_party_tag_" Scripts can find them by looking for that tag. const getPartyCharacters = () =>     findObjs({ type: 'character' })         .filter(c => (c.get('tags') || []).includes('_roll20_internal_party_tag_')); I use this property in this script , as an example.