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

Accessing Repeating Action Properties

Is there a way to access the textual components of a repeating item in a macro? When I try to call the item it doesn't work. I also don't see the repeating items in the attributes section of the character sheet. I've tried messing with the call to the repeating action like below, but can't seem to get anything other than printing what I've written @{selected|@{character_name}|repeating_npcaction_$0_npc_action|name} I just keep getting things similar to this No attribute was found for @{selected|repeating_npcaction_-KnAzvcVAdOSVztdqazZ_npc_action}
1532272943
The Aaron
Pro
API Scripter
The name would be a separate attribute: @{selected|@{character_name}|repeating_npcaction_$0_name} The full list should be: @{selected|@{character_name}|repeating_npcaction_$0_npc_options-flag} @{selected|@{character_name}|repeating_npcaction_$0_name} @{selected|@{character_name}|repeating_npcaction_$0_attack_flag} @{selected|@{character_name}|repeating_npcaction_$0_attack_flag} @{selected|@{character_name}|repeating_npcaction_$0_attack_type} @{selected|@{character_name}|repeating_npcaction_$0_attack_range} @{selected|@{character_name}|repeating_npcaction_$0_attack_tohit} @{selected|@{character_name}|repeating_npcaction_$0_attack_target} @{selected|@{character_name}|repeating_npcaction_$0_damage_flag} @{selected|@{character_name}|repeating_npcaction_$0_attack_damage} @{selected|@{character_name}|repeating_npcaction_$0_attack_damagetype} @{selected|@{character_name}|repeating_npcaction_$0_attack_crit} @{selected|@{character_name}|repeating_npcaction_$0_attack_damage2} @{selected|@{character_name}|repeating_npcaction_$0_attack_damagetype2} @{selected|@{character_name}|repeating_npcaction_$0_attack_crit2} @{selected|@{character_name}|repeating_npcaction_$0_show_desc} @{selected|@{character_name}|repeating_npcaction_$0_description} @{selected|@{character_name}|repeating_npcaction_$0_name} @{selected|@{character_name}|repeating_npcaction_$0_attack_flag} @{selected|@{character_name}|repeating_npcaction_$0_attack_tohitrange} @{selected|@{character_name}|repeating_npcaction_$0_attack_onhit} @{selected|@{character_name}|repeating_npcaction_$0_description} @{selected|@{character_name}|repeating_npcaction_$0_rollbase}
Awesome, thank you! Works perfect!
Is there a place where the documentation for this is? I'm working on traits now, and don't want to be a hassle asking for them. I got @{selected|@{character_name}|repeating_npctrait_$0_name} to work, but @{selected|@{character_name}|repeating_npctrait_$0_description} or text doesn't work.
the value I was looking for desc. For now I'm just trying to comb through the html on git to find these. I should put in a request for the documentation to reflect the shaped sheet documentation.
1532300296
The Aaron
Pro
API Scripter
That's how I did it, though I used a text editor that made it easier.  If you have a character open and want to know what a particular input is named, you can right click it and select Inspect from the menu, then look for the name="XXX" in the <input >.  If you know it's in a repeating section, you just need to go up the source to the first <fieldset > you see, and get the class="XXX" name.
Do you know off hand if there's a way to get the number of items in a repeating section without the API? I'm assuming I can do a count or a foreach in the API, but I'm wondering if I can do what I would like with Macros first.
1532303657
The Aaron
Pro
API Scripter
There isn't a way outside the API.