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

Calling a PC trait

1603499836

Edited 1603586724
I'm new to Roll20 macro creation. After lots of searching through the forums, I was able to put together this little macro. It displays how much weight I'm carrying versus maximum weight allowed for a trait to be used, then outputs the trait.  You have to click the trait name in the pink box for the full description to appear. Carrying [[@{selected|weighttotal}]] of [[@{selected|strength}*15/2]] allowed for &{template:traits}{{rname=@{Selected|character_name}}}  {{name=Traits}} {{description= [@{selected|repeating_traits_$5_name}](~selected|repeating_traits_$5_output)}} I wanted to post this so others who are new to macros don't have to do the hours of forum research I had to do in order to find the correct syntax for this simple macro.  Most searches I did returned posts with help for NPC macros, not PC macros.
1603521746
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You can make it a little prettier by putting the first part inside the roll template: &{template:traits}{{rname=@{Selected|character_name}}}  {{name=Traits}} {{description= Carrying [[@{selected|weighttotal}]] of [[@{selected|strength}*15/2]] allowed for. [@{selected|repeating_traits_$5_name}](~selected|repeating_traits_$5_output)}}
1603585449

Edited 1603589472
That looks much better. Also, it there a way to run this macro so I don't have to click my own token, i.e. an explicit call/reference to my character sheet or character name? I tried using the  Prefix Trick mentioned here  as the rname variable, but was unsuccessful. ****Edit**** I figured it out.  I needed to change all of the calls for @{selected|xyz attribute} to @{My Name|xyz attribute} &{template:traits}{{rname=@{Foamy the Ranter|character_name}}}  {{name=Traits}} {{description= Carrying [[@{Foamy the Ranter|weighttotal}]] of [[@{Foamy the Ranter|strength}*15/2]] allowed for. [@{Foamy the Ranter|repeating_traits_$5_name}](~Foamy the Ranter|repeating_traits_$5_output)}} Also, thanks for your help.