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

Pulling attribute value from character sheet specified by a value in other attribute

Is there any way I can pull a specific attribute from a different character sheet by nesting an attribute within the call? I need to do something like this:  /r @{ @{weapon_name} | damage} I want to have a character sheet for each weapon, each with a different damage value, and then specify which weapon is being used by writing the name of the character sheet I want to pull from, in the  @{weapon_name}.
1712408726
timmaugh
Forum Champion
API Scripter
I think what you're describing is that a character is wielding a weapon. The weapon being wielded is named in the character's "weapon_name" attribute, and is the same name as a character sheet for the weapon. On the weapon character sheet is a "damage" attribute that you want to eventually pull. The way to do this without scripts is to have an attribute that represents the opening characters of an attribute construction: NAME | CURRENT VALUE ==========|================= attropen | @{ Then you can build a command line like: /r @{attropen}@{weapon_name}|damage} The Roll20 Order of Operations allows for expanding attribute calls up to 99 times, so after the first pass your command line might look like: /r @{Spotted Trout|damage} ...and after the second pass that attribute is retrieved. Just be careful with the spaces in the command to make sure the subsequent attribute can be recognized.
Thank you, works perfectly.