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

Macro-friendly parsing of unfound Attributes and Abilities

Score + 24
1456270290

Edited 1456273788
Currently, if a Character does not contain an Attribute or Ability with a certain name (e.g. foo), attempting to call that Attribute or Ability from that Character (e.g. using @{keyword|foo} or %{keyword|foo}) will result in the text chat returning a "not found" error message alongside a broken call (e.g. keyword|foo). Having the text chat return the broken call on top of an error message is redundant. The broken call is also quite damaging to macro creation, notably disrupting [inline] rolls and Roll Queries. Hence, I propose that unfound Attributes and Abilities should parse as " " or "". Not too long ago, the &{noerror} flag was added to "suppress any errors (such as variable not found errors) in a roll." However, &{noerror} does not prevent unfound variables from destroying that roll. :) The implementation of this Suggestion would hence also be a step toward the completion of the goals of the &{noerror} flag. Keeping the recent improvements to (and newfound popularity of) repeating sections in mind, the implementation of this Suggestion would allow for macros to become more dynamic and accessible by allowing macro authors to write more expansive and "modular" macros, accounting for the possibility of missing sections.
1456273159
The Aaron
Pro
API Scripter
A syntax where you could specify a default would be cool: [[ {@{selected|Foo},@{selected|Bar},3}fd ]] fd = First Defined. :)
That would indeed be awesome!
1461615281
Phoxounet
Sheet Author
Translator
That would be awesome. Indeed, it is currently impossible to make macros based on repeating sections without knowing the number of rows. That makes repeating sections limited in a way. 
+1 I don't have votes to spare at the moment, but this seems to be coming up more for me now when working with repeating attributes specifically.
+1
+1 - or as many votes as I can get
+1. My use case is also to show a spell list where I don't know how many 1st level spells the character has in the general case.  Having buttons with empty text would reduce on the longwinded "Kar'esse|repeating_spell-1_$6_spellname"
+1, would love to see this feature
1603233356
mrianmerry
Pro
Sheet Author
This would be fantastic!
It aggravates me to no end that this isn't available. Repeating sections are so limited now due to these error messages, essentially making them a hassle more than a feature.
+1.  Another simple feature that would make things so much nicer.
+1. Something like this would be so beneficial for macros that have a generic target making them error robust. Please, please, please!