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

ChatSetAttr question

I am looking to include character generation as a macro. Basically once the character is created in the journal and its token put on the vtt I want the player to be able to click a macro that will roll all of the stats for the character in one click. Now I have been using many of these APIs for over a year and thought I was getting quite competent in their use. But for some reason I can't get a roll value to work on chatsetattr. So if I were trying to set a character's weaponskill to 2d10+20 do do I code that in a macro using the chatsetattr API?
1616180263
Andreas J.
Forum Champion
Sheet Author
Translator
The inline roll should be a good example, along with the rest of the documentation: <a href="https://wiki.roll20.net/ChatSetAttr#Inline_roll_example" rel="nofollow">https://wiki.roll20.net/ChatSetAttr#Inline_roll_example</a> So maybe something like this: &amp;{template:default} {{name=Roll Character Stats}} !setattr --silent --charid @{target|character\_id} --weaponskill|-{{Weapon Skill set to =[[2d10+20]]}} --socialskill|{{Social=[[3d8+14]]}}!!!