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

Why am I losing the last line of this template? (UGLY CODE ALERT)

 I'm messing around with some QOL macros for Infinity RPG.  This is a WIP, but I am very close to having a satisfying attack roll button that allows a choice between weapons (so far only Melee and 1 Ranged, but in theory I can have multiple weapon choices as long as I standardize the placement of weapons.)  For some reason, once I put it in a drop-down weapon select mode, my template no longer prints the "Qualities" section for either choice, while printing the rest perfectly.  What am I missing? Sorry it's so gross to look at.  I'm very new to this and had to use a lot of the Advanced Nested Query stuff to get what I wanted here. ?{Attack type?|MELEE, **@{selected|character_name}** attacks with *@{selected|repeating_Weapons_$0_weapon_name_rep}* at **@{target|Aiming for...|character_name}** (Vigour of **@{target|Aiming for...|MaxVigor}**) &{template:default} {{name=@{selected|character_name}: @{selected|repeating_Weapons_$0_weapon_name_rep}}} {{TARGET=[[@{selected|Agility}+@{selected|Close_Combat_Expertise}]]}}{{ATTACK= [[?{Dice|2}d20sacs<@{selected|Close_Combat_Focus}cf20<[[@{selected|Agility}+@{selected|Close_Combat_Expertise}]]]] Success(es) for Close Combat skill.}} {{LOCATION= [[1t[Hit-Location]]]}}{{DAMAGE=  [[(?{Modifier to Damage Dice|0}+@{selected|repeating_Weapons_$0_weapon_Damage_rep}+@{selected|repeating_Weapons_$0_weapon_Attribute_rep})t[Combat-Dice]]] +@{selected|repeating_Weapons_$0_weapon_Damagebonus_rep} - @{target|Aiming for...|Torso_Soak}}} {{QUALITIES=@{selected|repeating_Weapons_$0_weapon_Qualities_rep}}}|RANGED, **@{selected|character_name}** attacks with *@{selected|repeating_Weapons_$1_weapon_name_rep}* at **@{target|Aiming for...|character_name}** (Vigour of **@{target|Aiming for...|MaxVigor}**) &{template:default} {{name=@{selected|character_name}: @{selected|repeating_Weapons_$1_weapon_name_rep}}} {{TARGET=[[@{selected|Coordination}+@{selected|Ballistics_Expertise}]]}}{{ATTACK= [[?{Dice|2}d20sacs<@{selected|Ballistics_Focus}cf20<[[@{selected|Coordination}+@{selected|Ballistics_Expertise}]]]] Success(es) for Ballistics skill.}} {{LOCATION= [[1t[Hit-Location]]]}}{{DAMAGE=  [[(?{Modifier to Damage Dice|0}+@{selected|repeating_Weapons_$1_weapon_Damage_rep}+@{selected|repeating_Weapons_$1_weapon_Attribute_rep})t[Combat-Dice]]] +@{selected|repeating_Weapons_$1_weapon_Damagebonus_rep} - @{target|Aiming for...|Torso_Soak}}} {{QUALITIES=@{selected|repeating_Weapons_$1_weapon_Qualities_rep}}}} (Ooh, and if anyone has a minute for another thing... Infinity has different Armor values for different parts of the body.  Is there a way to have my Ability button fetch the proper Armor value based on the rolled hit location?  Is that a Custom Template thing, or a scripting thing, or both, or neither?  Thanks!)
1557325107

Edited 1557327587
GiGs
Pro
Sheet Author
API Scripter
My guess is the extra end bracket in dropdown is causing the macro to terminate, and the rest of the macro is being ignored. You likely need to add an extra nesting of html entities, which gets complicated. There's been a shift on the forums from using that kind of macro to Chat Menus , because they are MUCH easier to code for. Standard macros with all the html entities are just too complicated when wanting to offer multiple complex choices. Chat Menus are also often quicker to use in play. It's true they can clutter up the chat history, but you can whisper the menu to yourself so it doesnt clutter up the chat for anyone else. Edit: &nbsp;see also this post by Ziechael showing how to do it:&nbsp;<a href="https://app.roll20.net/forum/permalink/7430524/" rel="nofollow">https://app.roll20.net/forum/permalink/7430524/</a>
1557325399
GiGs
Pro
Sheet Author
API Scripter
Ryan B. said: (Ooh, and if anyone has a minute for another thing... Infinity has different Armor values for different parts of the body.&nbsp; Is there a way to have my Ability button fetch the proper Armor value based on the rolled hit location?&nbsp; Is that a Custom Template thing, or a scripting thing, or both, or neither?&nbsp; Thanks!) This depends on what you want to do with the armour. You can have a query with something like ?{Choose Location|head,@{target|head}|body,@{target|body}|arm,@{target|arm}|leg,@{target|leg}} That'll give you the armour value in that location, and you can use it however you want it. If on the other hand you want to roll for the location, and then get the armour that matches that location from the character sheet, there's no way to do that AFAIK, without using an API Script. You are a Pro user so you can do that (and the Power Cards API perhaps in conjunction with RecursiveTables script might be able to do exactly what you need).