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

SetAttr as a part of inline roll

1619032456
Paul V.
Pro
Sheet Author
Compendium Curator
Ok I'm having issues getting ChatSetAttr ( <a href="https://wiki.roll20.net/Script:ChatSetAttr" rel="nofollow">https://wiki.roll20.net/Script:ChatSetAttr</a> ) working as a part of an inline roll. this all one line in code, i split it up to help readability - the bit I'm having a problem with is the line in the middle - it just isn't working or setting any of the attributes..&nbsp; can anyone give me any pointers? &amp;{template:skill} !?{Target Number|10|9|8|7|6|5|4|11|12|13|14|15|16|17|18} ?{Success Dice Modifier|0|-1|-2|-3|-4|-5|-6|-7|-8|-9|1|2|3|4|5|6|7|8|9} ?{Skill Dice Modifier|0|-1|-2|-3|-4|-5|-6|-7|-8|-9|1|2|3|4|5|6|7|8|9} {{name=acrobatics}} !setattr --name @{character_name} --rollname|acrobatics --successmod|?{Success Dice Modifier} --skillmod|?{Skill Dice Modifier} --skilltotal|@{acrobatics_total} --skilldice|@{acrobatics} --skilltarget|?{Target Number} {{success=[[{1d10+@{acrobatics_total}+?{Success Dice Modifier}}&gt;?{Target Number}]]}} {{skill=[[{[[@{acrobatics}+1]]d10+@{acrobatics_total}+?{Skill Dice Modifier}}&gt;?{Target Number}]]}} {{successreroll=[Reroll Success](~@{character_id}|successreroll)}} {{skillreroll=[Reroll Skill](~@{character_id}|skillreroll)}} {{reroll=[Reroll](~@{character_id}|reroll)}}
1619036108

Edited 1619036270
Andreas J.
Forum Champion
Sheet Author
Translator
You haven't added the !!! to indicate the inline chatsetattr command is finished, maybe that makes a difference? Like from this example : &amp;{template:stargate} {{color=green}} {{title=Short Rest}} @{show_name} !modbattr --silent --name @{character_name} --hp|{{Roll=[[@{hd}]]}}!!! Also try make it work step by step, not with all your variable and things you try to make happen at the same time.
1619086318

Edited 1619088259
Paul V.
Pro
Sheet Author
Compendium Curator
Thank you for the heads up re: !!! But i've been doing more testing on the !setattr and I'm just not getting it to work. I've tried a number of times ... i have a character called Eddie !setattr --name Eddie --rollname|help me&nbsp; even this is not working -&nbsp; !setattr --all --rollname|help me more
1619091047

Edited 1619091369
Andreas J.
Forum Champion
Sheet Author
Translator
Weird, I can't seem to make any of the non-linline examples or method to work, or even call !setattr-config in a game I just added the APi to, but the inline examples works fine on my old game, and !setattr-config launches the config page correctly. Try type !setattr-config in the chat, and if nothing happens, there is a problem with the API itself not working, and not with the macro. The examples embedded into the Stargate sheets still works normally in my old game. (I just successfully did a short rest where the character's HP was increase with what they rolled)
1619102950
Paul V.
Pro
Sheet Author
Compendium Curator
When I type&nbsp; !setattr-config in the chat nothing happens..&nbsp; So i have to enable the API?
1619104953
Kraynic
Pro
Sheet Author
You might want to open the api settings page for that game in another tab/window and restart the api sandbox.&nbsp; And see if any error messages crop up...
1619109139
Paul V.
Pro
Sheet Author
Compendium Curator
Ok rookie error - you need to add the API script to the game to use it.. sorry my first api script&nbsp; thank you Kraynic for the pointer.. and thanks Andreas for the initial help