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

Variable insertion not working.

Hello everyone. I'm trying to hack the Mythras character sheet in a way where I can easily use a skill list macro. Part of the roll is from the sheet, part of it is me adapting it. I've posted it below. As you can see I'm trying to simply change a piece of the original roll with the variable that will point to the correct attribute. I've done things like this in the past and they have worked. I'd just like a fresh set of eyes to take a peek and maybe catch something. Note: In the main part of the macro, everything works when you take out the variable. I did not write that part and is simply rolled from the sheet. The only thing I've done is added the ?{Skill} into the areas I need to replace to make the variable replacement work. If anyone has any ideas, I'd love to hear it. Thanks! ?{Skill|Athletics,athletics|Boating,boating|Brawn,brawn|Conceal,conceal|Customs,custom|Dance,dance|Deceit,deceit|Drive,drive|Endurance,endurance|Evade,evade|First Aid,first_aid|Influence,influence|Insight,insight|Locale,locale|Native Tongue,native_tongue|Perception,perception|Ride,ride|Sing,sing|Stealth,stealth|Swim,swim|Unarmed,unarmed|Willpower,willpower}   @{Selected|roll_display}&{template:skill} {{show_reduced=[[@{Selected|show_reduced}]]}}{{name=^{?{Skill}-u}}} @{Selected|name_display} {{very_easy=[[@{Selected|?{Skill}_very_easy}]]}} {{very_easy_crit=[[ceil(@{Selected|?{Skill}_very_easy}*.1)]]}}  {{easy=[[@{Selected|?{Skill}_easy}]]}} {{easy_crit=[[ceil(@{Selected|?{Skill}_easy}*.1)]]}}  {{standard=[[@{Selected|?{Skill}} ]]}} {{standard_crit=[[ceil(@{Selected|?{Skill}}*.1)]]}}  {{hard=[[@{Selected|?{Skill}_hard}]]}} {{hard_crit=[[ceil(@{Selected|?{Skill}_hard}*.1)]]}}  {{formidable=[[@{Selected|?{Skill}_formidable}]]}} {{formidable_crit=[[ceil(@{Selected|?{Skill}_formidable}*.1)]]}}  {{herculean=[[@{Selected|?{Skill}_herculean}]]}} {{herculean_crit=[[ceil(@{Selected|?{Skill}_herculean}*.1)]]}}  {{rolled=[[1d100]]}}  {{encumbered=[[1+@{Selected|?{Skill}_encumbered}]]}} {{encumbrance_skills=[[@{Selected|encumbrance_skills}]]}} {{fatigue_skills=[[@{Selected|fatigue_skills}]]}} {{notes=@{Selected|?{Skill}_notes}}}
1587703116

Edited 1587703208
GiGs
Pro
Sheet Author
API Scripter
You cant do this @{Selected|?{Skill}} Attribute calls must always be complete, and cannot include queries inside them.
Ok. Can I invert this and do it this way? Ignored the list after the first option. I have done similar things before in a sheet I've built. ?{Skill|Athletics, @{Selected|roll_display}&{template:skill} {{show_reduced=[[@{Selected|show_reduced}]]}}{{name=^{athletics-u}}} @{Selected|name_display} {{very_easy=[[@{Selected|athletics_very_easy}]]}} {{very_easy_crit=[[ceil(@{Selected|athletics_very_easy}*.1)]]}}  {{easy=[[@{Selected|athletics_easy}]]}} {{easy_crit=[[ceil(@{Selected|athletics_easy}*.1)]]}}  {{standard=[[@{Selected|athletics} ]]}} {{standard_crit=[[ceil(@{Selected|athletics}*.1)]]}}  {{hard=[[@{Selected|athletics_hard}]]}} {{hard_crit=[[ceil(@{Selected|athletics_hard}*.1)]]}}  {{formidable=[[@{Selected|athletics_formidable}]]}} {{formidable_crit=[[ceil(@{Selected|athletics_formidable}*.1)]]}}  {{herculean=[[@{Selected|athletics_herculean}]]}} {{herculean_crit=[[ceil(@{Selected|athletics_herculean}*.1)]]}}  {{rolled=[[1d100]]}}  {{encumbered=[[1+@{Selected|athletics_encumbered}]]}} {{encumbrance_skills=[[@{Selected|encumbrance_skills}]]}} {{fatigue_skills=[[@{Selected|fatigue_skills}]]}} {{notes=@{Selected|athletics_notes}}} |Boating,boating|Brawn,brawn|Conceal,conceal|Customs,custom|Dance,dance|Deceit,deceit|Drive,drive|Endurance,endurance|Evade,evade|First Aid,first_aid|Influence,influence|Insight,insight|Locale,locale|Native Tongue,native_tongue|Perception,perception|Ride,ride|Sing,sing|Stealth,stealth|Swim,swim|Unarmed,unarmed|Willpower,willpower}
1587705853

Edited 1587705998
GiGs
Pro
Sheet Author
API Scripter
Yes, you can do that, but you'll have to use html entities (as described here ) to handle the many many characters that will break the query. An alternative is to use a chat menu  (which will require setting up each skill roll as an individual macro, then having a macro to print a list of buttons to chat). Or you could create the individual macros and set them as token actions. If this is going into a sheet, the token action idea's a bad one, but chat menu works with abilities - and if you have the skill rolls attached to buttons on the sheet already, you can use those for the chat menu, making it much simpler to write). Though if it is for a sheet, I'm wondering why you are creating a single macro for multiple skills: why not just give each skill a button?
I've done chat menu stuff as well, and have considered that. But the amount of buttons required will make it a bit overwhelming.  The reason I wouldn't do a button per skill is there are 30-40 skills. Doing something like this just spams someone's screen when they click on a token. For people with smaller displays it would be unusable. This is not to mention other token actions that might be needed.
1587738367
Kraynic
Pro
Sheet Author
You could break your skills up into categories.  Knowledge/Lore, Investigative/Social, Sneaky, etc., or whatever categories make sense for your game.  That might make things a bit easier to manage. 
Yeah. Or alphabetize. Even still, not finding it to work. For simplicity, I broke it down for just the single option in the list. When I launch this, I get the Skill: Input Box and the following prepopulated: Athletics, {{show_reduced=[[1]]} }{{name=^{athletics-u It seems as though it isn't recognizing it as a list. Code is below. ?{Skill|Athletics , {{show_reduced=[[@{Selected|show_reduced}]] } }{{name=^{athletics-u} } } @{Selected|name_display} {{very_easy=[[@{Selected|athletics_very_easy}]] } } {{very_easy_crit=[[ceil(@{Selected|athletics_very_easy}*.1)]] } }  {{easy=[[@{Selected|athletics_easy}]] } } {{easy_crit=[[ceil(@{Selected|athletics_easy}*.1)]] } }  {{standard=[[@{Selected|athletics} ]] } } {{standard_crit=[[ceil(@{Selected|athletics}*.1)]] } }  {{hard=[[@{Selected|athletics_hard}]] } } {{hard_crit=[[ceil(@{Selected|athletics_hard}*.1)]] } }  {{formidable=[[@{Selected|athletics_formidable}]] } } {{formidable_crit=[[ceil(@{Selected|athletics_formidable}*.1)]] } }  {{herculean=[[@{Selected|athletics_herculean}]] } } {{herculean_crit=[[ceil(@{Selected|athletics_herculean}*.1)]] } }  {{rolled=[[1d100]] } }  {{encumbered=[[1+@{Selected|athletics_encumbered}]] } } {{encumbrance_skills=[[@{Selected|encumbrance_skills}]] } } {{fatigue_skills=[[@{Selected|fatigue_skills}]] } } {{notes=@{Selected|athletics_notes} } } }
1587745149
Kraynic
Pro
Sheet Author
I meant for the chat menu option.  I decided a while back that (for me) chat menus are a lot nicer to deal with than drop down lists.  Especially for larger lists, because there is no scrolling in a chat menu like the drop down list.  If you get to scrolling on a chat menu, it is a true monster, and I have only encountered that when doing an entire class spell list (which I ended up breaking up into 3 spell level tiers).  The chat menu also removes any hassle of the whole html replacement juggling. Good luck with your query.
Yeah. You might be right.  For some reason I have players that don't like the chat menus. I'm not sure why.
1587747155
GiGs
Pro
Sheet Author
API Scripter
I can understand not liking chat menus cluttering up the chat window, but the alternative is pretty horrible, so I would point out to them they can create nested menus of their own if they dont want to use chat menus. They'll quickly change their tune once they see how hard it is.