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

attribute within attribute for macro call

Hi all, I've been checking the wiki and google'd for quite a bit but have had no luck with finding an answer to my problem. I am trying to create some macros for MERP movement maneuvers which use a different modifier depending on armor type the character is wearing and have these attributes defined: armor_type = CE MM_CE = 15 MM_SA = 40 Depending on the current armor, they should use one or the other MM_?? value, so I wanted to keep usage simple for the players and use the same macro by only changing the armor_type attibute value from SA to CE and viceversa. As far as I understand, this would be the call for it: [[1d100!>96 + @{selected|MM_@{selected|armor_type}}]] But the attribute within the attribute part does not resolve correctly, it either returns an error of no attribute was found, or if checked separately, does not return the final numerical value, returning instead a text string where the second attribute is replaced by the armor_type string. @{selected|MM_@{selected|armor_type}} >>>>> selected|MM_CE I am thinking of forgoing this option and hardcoding the armor_type attribute value directly, but would like to know if the thing I want to do is possible before opting for the other approach. Any help would be appreciated, thanks and regards,
1484002503

Edited 1484003974
This actually can be made to work. First, you'll need to add what I'll term a "prefix" Attribute to the Character of choice. In this case, the Attribute should have a Current value of "@{selected|" (without quotation marks). Let's name this Attribute "sel_prefix", so it can be called via @{selected|sel_prefix}. @{selected|MM_@{selected|armor_type}} I'll term the above code an (unfinished) "extended Attribute call". Next, within your extended Attribute call, replace the first instance of "@{selected|" with your "prefix" Attribute call (e.g. @{selected|sel_prefix}). Now finished, your extended Attribute call should function as you'd like it to. @{selected|sel_prefix}MM_@{selected|armor_type}} (In case you're interested, I wrote up a related application of extended Attribute and Ability calls .)
Nice! I've invested quite a bit of time trying to find a way for this one and it is great to know that there is a way to work it out ^_^ I'll check both the post you linked and the solution you propose tomorrow (gotta sleep now XD) Thanks a bunch! :D
You're very welcome! Happy rolling!
Works great, thanks for the help ^_^