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 not displaying all components and corresponding values

I feel like I am missing it and maybe it is obvious... The macro works as intended except when you select the any option for complexity from the list, it only displays in the chat the components for Basic and Standard and their rolled value. I made this as a crafting macro instead of having a macro for each complexity, I am using the query to select and then insert the corresponding value to the d20 that is rolled and then identifies the total number of successes which becomes the value of that type of component needed. I don't use APIs and I was thinking I had to create separate global macros for each complexity then a separate macro to reference inline the other macros which could be queried by the player. But When I tried to do that it gave me the options but wouldn't run the corresponding macro. So I went back to messing with the below because I got the desired result to partially work. I feel like I just didn't close something correctly and that is why it isnt displaying correctly in the chat with all the component types and values.  &{template:default} {{name=Crafting}} {{name=@{selected|token_name} attempts to craft @{target|token_name}!}} {{They use the following number of **Basic Components**=[[ [[?{Crafting Difficulty|Simple, @{selected|accomplish} + @{selected|profession} + @{selected|specialty}|Moderate, @{selected|accomplish} + @{selected|profession}|Complex, @{selected|accomplish}|Intricate, 0|Elaborate, 0}]]d20>5]]}} {{They use the following number of **Standard Components**=[[ [[?{Crafting Difficulty|Simple, @{selected|accomplish} + @{selected|profession}|Moderate, @{selected|accomplish} + @{selected|profession} + @{selected|specialty}|Complex, @{selected|accomplish} + @{selected|profession}|Intricate, @{selected|accomplish}|Elaborate, 0}]]d20>10]]}} {{They use the following number of **Specialized Components**=[[ [[?{Crafting Difficulty|Simple, 0|Moderate, @{selected|accomplish}|Complex, @{selected|accomplish} + @{selected|profession}|Intricate, @{selected|accomplish} + @{selected|profession} + @{selected|specialty}|Elaborate, @{selected|accomplish} + @{selected|profession}]]d20>15]]}} {{They use the following number of **Precision Components**=[[ [[?{Crafting Difficulty|Simple, 0|Moderate, 0|Complex, @{selected|accomplish}|Intricate, @{selected|accomplish} + @{selected|profession}|Elaborate, @{selected|accomplish} + @{selected|profession} + @{selected|specialty}]]d20>16]]}} {{They use the following number of **High Tech Components**=[[ [[?{Crafting Difficulty|Simple, 0|Moderate, 0|Complex, 0|Intricate, @{selected|accomplish}|Elaborate, @{selected|accomplish} + @{selected|profession} + @{selected|specialty}]]d20>18]]}} Please and Thank You.
Is there a chance any of those attributes are empty/blank?  That could possibly cause the entire thing to fail. Try adding a 0 in front of each attribute call  to see if that fixes it.  If it does, then the issue is a missing value. I also always suggest removing unnecessary spaces within queries, and never include spaces directly after a comma.  It will make Macro calls and some other things fail. For example, the first part would look like this: **Basic Components**=[[ [[?{Crafting Difficulty|Simple,0@{selected|accomplish} + 0@{selected|profession} + 0@{selected|specialty}| I might have time later to take a closer look.
1709584350

Edited 1709584429
You did have a couple of missing closing braces, but that's not the issue. The issue is you are reusing a query and trying to get different outputs. Breaking it apart for visibility (in actual use it all needs to be on a single line): /w gm &{template:default} {{name=Crafting}}{{name=@{selected|token_name} attempts to craft STUFF!}}  {{They use the following number of **Basic Components**=[[ [[?{Crafting Difficulty|Simple,@{selected|accomplish} + @{selected|profession} + @{selected|specialty}|Moderate,@{selected|accomplish} + @{selected|profession}|Complex,@{selected|accomplish}|Intricate,0|Elaborate,0}]]d20>5]]}}  {{They use the following number of **Standard Components**=[[ [[?{Crafting Difficulty|Simple,@{selected|accomplish} + @{selected|profession}|Moderate,@{selected|accomplish} + @{selected|profession} + @{selected|specialty}|Complex,@{selected|accomplish} + @{selected|profession}|Intricate,@{selected|accomplish}|Elaborate,0}]]d20>10]]}}  {{They use the following number of **Specialized Components**=[[ [[?{Crafting Difficulty|Simple,0|Moderate,@{selected|accomplish}|Complex,@{selected|accomplish} + @{selected|profession}|Intricate,@{selected|accomplish} + @{selected|profession} + @{selected|specialty}|Elaborate,@{selected|accomplish} + @{selected|profession} }]]d20>15]]}}  {{They use the following number of **Precision Components**=[[ [[?{Crafting Difficulty|Simple,0|Moderate,0|Complex,@{selected|accomplish}|Intricate,@{selected|accomplish} + @{selected|profession}|Elaborate,@{selected|accomplish} + @{selected|profession} + @{selected|specialty} }]]d20>16]]}}  {{They use the following number of **High Tech Components**=[[ [[?{Crafting Difficulty|Simple,0|Moderate,0|Complex,0|Intricate,@{selected|accomplish}|Elaborate,@{selected|accomplish} + @{selected|profession} + @{selected|specialty} }]]d20>18]]}} As an example for **Basic Components** you have  ?{Crafting Difficulty|Simple,@{selected|accomplish} + @{selected|profession} + @{selected|specialty}|Moderate,@{selected|accomplish} + @{selected|profession}|Complex,@{selected|accomplish}|Intricate,0|Elaborate,0} But for **High Tech Components** you have ?{Crafting Difficulty|Simple,0|Moderate,0|Complex,0|Intricate,@{selected|accomplish}|Elaborate,@{selected|accomplish} + @{selected|profession} + @{selected|specialty} } Whenever you reuse a query, whatever inputs and outputs you have from the first time it is called will be used for all subsequent calls .  So your macro effectively becomes this (even though it's not what you intended): /w gm &{template:default} {{name=Crafting}}{{name=@{selected|token_name} attempts to craft STUFF!}}  {{They use the following number of **Basic Components**=[[ [[?{Crafting Difficulty|Simple,@{selected|accomplish} + @{selected|profession} + @{selected|specialty}|Moderate,@{selected|accomplish} + @{selected|profession}|Complex,@{selected|accomplish}|Intricate,0|Elaborate,0}]]d20>5]]}}  {{They use the following number of **Standard Components**=[[ [[?{Crafting Difficulty}]]d20>10]]}}  {{They use the following number of **Specialized Components**=[[ [[?{Crafting Difficulty}]]d20>15]]}}  {{They use the following number of **Precision Components**=[[ [[?{Crafting Difficulty}]]d20>16]]}}  {{They use the following number of **High Tech Components**=[[ [[?{Crafting Difficulty}]]d20>18]]}}
Is this the matrix/breakdown correct for component & difficulty? Basic / Simple          = @{selected|accomplish} + @{selected|profession} + @{selected|specialty} Basic / Moderate        = @{selected|accomplish} + @{selected|profession} Basic / Complex         = @{selected|accomplish} Basic / Intricate       = 0 Basic / Elaborate       = 0 d20>5 Standard / Simple       = @{selected|accomplish} + @{selected|profession} Standard / Moderate     = @{selected|accomplish} + @{selected|profession} + @{selected|specialty} Standard / Complex      = @{selected|accomplish} + @{selected|profession} Standard / Intricate    = @{selected|accomplish} Standard / Elaborate    = 0 d20>10 Specialized / Simple = 0 Specialized / Moderate = @{selected|accomplish} Specialized / Complex = @{selected|accomplish} + @{selected|profession} Specialized / Intricate = @{selected|accomplish} + @{selected|profession} + @{selected|specialty} Specialized / Elaborate = @{selected|accomplish} + @{selected|profession} d20>15 Precision / Simple = 0 Precision / Moderate = 0 Precision / Complex = @{selected|accomplish} Precision / Intricate = @{selected|accomplish} + @{selected|profession} Precision / Elaborate = @{selected|accomplish} + @{selected|profession} + @{selected|specialty} d20>16 High Tech / Simple = 0 High Tech / Moderate = 0 High Tech / Complex = 0 High Tech / Intricate = @{selected|accomplish} High Tech / Elaborate = @{selected|accomplish} + @{selected|profession} + @{selected|specialty} d20>18
Yes, the breakdown is correct for component and difficulty.