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

Help with creating repeating powers with ChatSetAttr on the DnD 5E Roll20 Sheet

Hello, I am trying to create a new attack with ChatSetAttr that doesn't have a spell or weapon associated with it. I just want a clickable attack in the repeating section but I want to be able to do it programmatically. I am using the Roll20 5th edition sheet.  I think I have found the elements with looking at the HTML code in Chrome with F12 but when I input the following code nothing happens. No error or feedback. When I look in the console output I see an output that shows the command was run but nothing else.  Here is the code I currently am testing: !setattr{{ --sel --repeating_attack_$4_-create_attr_atkname|Attack Name --repeating_attack_$4_-create_attr_atkflag|1 --repeating_attack_$4_-create_attr_atkattr_base|CHA --repeating_attack_$4_-create_attr_atkmod|0 --repeating_attack_$4_-create_attr_atkprofflag|1 --repeating_attack_$4_-create_attr_atkrange|Attack Range --repeating_attack_$4_-create_attr_atkmagic|0 --repeating_attack_$4_-create_attr_atkcritrange|20 --repeating_attack_$4_-create_attr_dmgflag|1 --repeating_attack_$4_-create_attr_dmgbase|1d6 --repeating_attack_$4_-create_attr_dmgattr|- --repeating_attack_$4_-create_attr_dmgmod|0 --repeating_attack_$4_-create_attr_dmgtype|fire --repeating_attack_$4_-create_attr_dmgcustcrit|1d8 --repeating_attack_$4_-create_attr_saveflag|1 --repeating_attack_$4_-create_attr_saveattr|DEX --repeating_attack_$4_-create_attr_savedc|FLAT --repeating_attack_$4_-create_attr_saveflat|17 --repeating_attack_$4_-create_attr_saveeffect|half damage --repeating_attack_$4_-create_attr_atk_desc|Attack Desc }} Here is the output from the console: --sel<br/> --repeating_attack_$4_-create_attr_atkname|Attack Name<br/> --repeating_attack_$4_-create_attr_atkflag|1<br/> --repeating_attack_$4_-create_attr_atkattr_base|CHA<br/> --repeating_attack_$4_-create_attr_atkmod|0<br/> --repeating_attack_$4_-create_attr_atkprofflag|1<br/> --repeating_attack_$4_-create_attr_atkrange|Attack Range<br/> --repeating_attack_$4_-create_attr_atkmagic|0<br/> --repeating_attack_$4_-create_attr_atkcritrange|20<br/> --repeating_attack_$4_-create_attr_dmgflag|1<br/> --repeating_attack_$4_-create_attr_dmgbase|1d6<br/> --repeating_attack_$4_-create_attr_dmgattr|-<br/> --repeating_attack_$4_-create_attr_dmgmod|0<br/> --repeating_attack_$4_-create_attr_dmgtype|fire<br/> --repeating_attack_$4_-create_attr_dmgcustcrit|1d8<br/> --repeating_attack_$4_-create_attr_saveflag|1<br/> --repeating_attack_$4_-create_attr_saveattr|DEX<br/> --repeating_attack_$4_-create_attr_savedc|FLAT<br/> --repeating_attack_$4_-create_attr_saveflat|17<br/> --repeating_attack_$4_-create_attr_saveeffect|half damage<br/> --repeating_attack_$4_-create_attr_atk_desc|Attack Desc<br/> }}","playerid":"-NPBC04aWJwR5GDh6S2a","selected":[{"_id":"-NWsvGlz7rzN7G8xjslD","_type":"graphic"}],"type":"api","who":"Alik Modi (GM)"} It feels like I am just missing something in the create syntax or something. Any help would be greatly appreciated, thank you very much.
1685737796

Edited 1685737912
Gauss
Forum Champion
Hi Alik Modi, Until one of the Mod (API Script) gurus come along here is the wiki on it:&nbsp; <a href="https://wiki.roll20.net/Script:ChatSetAttr#Add_new_thing_to_Repeating_Section" rel="nofollow">https://wiki.roll20.net/Script:ChatSetAttr#Add_new_thing_to_Repeating_Section</a> And here is the wiki on the 5e by Roll20 repeating sections:&nbsp; <a href="https://wiki.roll20.net/D%26D_5E_by_Roll20#Custom_Skills_and_Stats" rel="nofollow">https://wiki.roll20.net/D%26D_5E_by_Roll20#Custom_Skills_and_Stats</a>
1685738161

Edited 1685738211
Nick O.
Forum Champion
Hi Alik!&nbsp; You're really close - remove the number and attr_ from each of your entries, you don't actually need that. E.g.,&nbsp; --repeating_attack_-create_atkname|Attack Name instead of &nbsp; --repeating_attack_$4_-create_attr_atkname|Attack Name Also, the selections from the drop down lists (like when you choose CHA or DEX for the attack modifier/damage) behave a bit differently, and as a result, the overall syntax of the command changes. I cover how to use ChatSetAttr to set up attacks in this video -&nbsp; <a href="https://youtu.be/EzvrQE7xD_U" rel="nofollow">https://youtu.be/EzvrQE7xD_U</a> Hope that helps!
Awesome! Thanks so much for the help. The video gave me exactly what I needed. Been watching your videos for a while and they are fantastic. Thank you so much for your contributions.&nbsp; Gauss, Thanks for the links I will file them under useful for the future.&nbsp;