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

Multiply Repeating with ChatSetAttr

1618694934

Edited 1618695018
Is there a way to add multiple attacks with ChatSetAttr/ anytime I use the following it only adds the last one in the repeating sections.  !setattr {{ --sel --mute --replace --repeating_npctrait_-CREATE_name|Trait 1 --repeating_npctrait_-CREATE_description|This is a Test of Trait 1 --repeating_npctrait_-CREATE_name|Trait 2 --repeating_npctrait_-CREATE_description|This is a Test of Trait 2 --repeating_npctrait_-CREATE_name|Trait 3 --repeating_npctrait_-CREATE_description|This is a Test of Trait 3 --repeating_npcaction_-CREATE_name|Action 1 --repeating_npcaction_-CREATE_attack_flag|on --repeating_npcaction_-CREATE_attack_type|Ragend --repeating_npcaction_-CREATE_attack_range|590 --repeating_npcaction_-CREATE_attack_tohit|562 --repeating_npcaction_-CREATE_attack_target|one target --repeating_npcaction_-CREATE_attack_damage|1d00 --repeating_npcaction_-CREATE_attack_damagetype|slashing --repeating_npcaction_-CREATE_attack_damage2|5 --repeating_npcaction_-CREATE_attack_damagetype2|fire --repeating_npcaction_-CREATE_description|This is an test of Action 1 --repeating_npcaction_-CREATE_name|Action 2 --repeating_npcaction_-CREATE_attack_flag| --repeating_npcaction_-CREATE_attack_type|melee --repeating_npcaction_-CREATE_attack_range|534 --repeating_npcaction_-CREATE_attack_tohit|506 --repeating_npcaction_-CREATE_attack_target|one target --repeating_npcaction_-CREATE_attack_damage|1d01 --repeating_npcaction_-CREATE_attack_damagetype|slashing --repeating_npcaction_-CREATE_attack_damage2|6 --repeating_npcaction_-CREATE_attack_damagetype2|fire --repeating_npcaction_-CREATE_description|This is an test of Action 2 }}
1618741240
Oosh
Sheet Author
API Scripter
The thing with repeating rows is that all the attributes on that row need the same row ID. ChatSetAttr needs to generate a rowID, then replace all those -CREATE strings with the generated ID. Trouble is, with multiple commands like that, CSA has no idea which ones are supposed to go in which row. Presumably it only generates a single rowID per command, so you're getting every single attribute there created with the same rowID (rather than every single attribute generated as its own row). I'd say your best bet is to split those into one Repeating Row per command, unless CSA has some argument you can pass it to tell it where to generate new row IDs.