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

APILogic Query Popping up when IF isn't met

1696973216
Essen
Pro
Marketplace Creator
Just what it says. The IF should be resolving well before it gets to the pop-up query, but it still pops up. How do I set it to only prompt the user when that specific IF comes up?
1696976349
Andrew R.
Pro
Sheet Author
Do you mean a Roll Query? They are processed by Roll20 before any Mod like APILogic sees anything.
1696976771
Essen
Pro
Marketplace Creator
So it just isn't possible to get it to stop popping up when it's not relevant?
1696980427
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
This is true. there are 12 steps in the order of operations for passing a message in chat . API calls happen last. Meta scripts like API logic do a tiny leap to the top of 12, processing first in the API stack, but all the roll parsing and queries happen first. If you post the entirety of your macro, some of the clever folks on the forum might be able to suggest a workaround. It is entirely possible that something like ScriptCards might be able to handle your use case, for instance.
1696983445
Essen
Pro
Marketplace Creator
Maybe, I'll give it a shot. It's a lot though. What I'm trying to accomplish is a modular weapon for a character without the player having to worry about any of the details. This would have one button to set the parts to attributes, and one button to read the attributes and pick the right roll. Since I also can't nail down IF ELSE nesting, I've had to parse it out to each individual combination.  Basically, ?{Strikeface} pops up regardless of the set attributes. Maul Set !setattr --name Takentoll Onyx-Chipped --maul_head|?{Head|Scourge Press,Scourge|Silver Bells,Bells|Thunderhead,Thunder} --silent !setattr --name Takentoll Onyx-Chipped --maul_handle|?{Handle|Tethered Ash,Tether|Meteor Chain,Meteor} --silent Maul Use !{& if "@{Takentoll Onyx-Chipped|maul_head}" = "Scourge" && "@{Takentoll Onyx-Chipped|maul_handle}" = "Tether"}@{Takentoll Onyx-Chipped|wtype}&{template:atkdmg} {{mod=+[[@{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{rname=Tether Maul of Scourge}} {{r1=[[@{Takentoll Onyx-Chipped|d20}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} @{Takentoll Onyx-Chipped|rtype}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[2d6 + @{Takentoll Onyx-Chipped|strength_mod} + 2[MOD]]]}} {{dmg1type=bludgeoning}} 0 {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[2d6[CRIT]]]}} {{crit2=[[0[CRIT]]]}} 0 {{desc=Maul (Martial). 2d6 bludgeoning damage, Bludgeon, Heavy, Momentum (2d12), Two-Handed, Socketed (2: Royal Garnet, Rage-Fueled Onyx), Scourge 2.}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Takentoll Onyx-Chipped|global_attack_mod}}} {{globaldamage=[[2[Rage Damage]]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Takentoll Onyx-Chipped|global_damage_mod_type}}} ammo= @{Takentoll Onyx-Chipped|charname_output} {& elseif "@{Takentoll Onyx-Chipped|maul_head}" = "Scourge" && "@{Takentoll Onyx-Chipped|maul_handle}" = "Meteor"} @{Takentoll Onyx-Chipped|wtype}&{template:atkdmg} {{mod=+[[@{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{rname=Meteor Hammer of Scourge}} {{r1=[[@{Takentoll Onyx-Chipped|d20}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} @{Takentoll Onyx-Chipped|rtype}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + 0]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[2d6 + @{Takentoll Onyx-Chipped|strength_mod} + 2[MOD]]]}} {{dmg1type=bludgeoning}} {{damage=1}} 0 {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[2d4[CRIT]]]}} {{crit2=[[0[CRIT]]]}} 0 {{desc=Meteor Hammer (Advanced). 1d6 bludgeoning damage, Double (1d6), Two-Handed, Special, Socketed (1: Royal Garnet), Scourge 2.}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Takentoll Onyx-Chipped|global_attack_mod}}} {{globaldamage=[[2[Rage Damage]]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Takentoll Onyx-Chipped|global_damage_mod_type}}} ammo= @{Takentoll Onyx-Chipped|charname_output} {& elseif "@{Takentoll Onyx-Chipped|maul_head}" = "Bells" && "@{Takentoll Onyx-Chipped|maul_handle}" = "Tether"} @{Takentoll Onyx-Chipped|wtype}&{template:atkdmg} {{mod=+[[@{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{rname=Tether Maul of Silver Bells}} {{r1=[[@{Takentoll Onyx-Chipped|d20}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} @{Takentoll Onyx-Chipped|rtype}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[2d4 + @{Takentoll Onyx-Chipped|strength_mod} + 0[MOD]]]}} {{dmg1type=bludgeoning}} {{damage=1}} 0 {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[2d4[CRIT]]]}} {{crit2=[[0[CRIT]]]}} {{save=1}} {{saveattr=Wisdom}} {{savedesc=}} {{savedc=[[[[(@{Takentoll Onyx-Chipped|charisma_mod}+8+@{Takentoll Onyx-Chipped|spell_dc_mod}+@{Takentoll Onyx-Chipped|pb})]][SAVE]]]}} {{desc=Maul (Martial). 2d4 bludgeoning damage, Bludgeon, Heavy, Momentum (2d10), Two-Handed, Socketed (1:Rage-Fueled Onyx), Delicate, Silver Bells.}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Takentoll Onyx-Chipped|global_attack_mod}}} {{globaldamage=[[2[Rage Damage]]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Takentoll Onyx-Chipped|global_damage_mod_type}}} ammo= @{Takentoll Onyx-Chipped|charname_output} {& elseif "@{Takentoll Onyx-Chipped|maul_head}" = "Bells" && "@{Takentoll Onyx-Chipped|maul_handle}" = "Meteor"} @{Takentoll Onyx-Chipped|wtype}&{template:atkdmg} {{mod=+[[@{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{rname=Meteor Hammer of Silver Bells}} {{r1=[[@{Takentoll Onyx-Chipped|d20}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} @{Takentoll Onyx-Chipped|rtype}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + 0]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[2d4 + @{Takentoll Onyx-Chipped|strength_mod} + 0[MOD]]]}} {{dmg1type=bludgeoning}} {{damage=1}} {{dmg2flag=1}} 0 {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[2d4[CRIT]]]}} {{crit2=[[0[CRIT]]]}} {{save=1}} {{saveattr=Wisdom}} {{savedesc=}} {{savedc=[[[[(@{Takentoll Onyx-Chipped|charisma_mod}+8+@{Takentoll Onyx-Chipped|spell_dc_mod}+@{Takentoll Onyx-Chipped|pb})]][SAVE]]]}} {{desc=Meteor Hammer (Advanced). 1d4 bludgeoning damage, Double (1d4), Two-Handed, Special, Delicate, Silver Bells.}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Takentoll Onyx-Chipped|global_attack_mod}}} {{globaldamage=[[2[Rage Damage]]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Takentoll Onyx-Chipped|global_damage_mod_type}}} ammo= @{Takentoll Onyx-Chipped|charname_output} {& elseif "@{Takentoll Onyx-Chipped|maul_head}" = "Thunder" && "@{Takentoll Onyx-Chipped|maul_handle}" = "Tether" && @{Takentoll Onyx-Chipped|thunder_count} = 3 && "?{Strikeface|Hammer Face,Face|Discharge Plunger,Plunger,|Top Spikes,Spikes}" = "Plunger"} @{Takentoll Onyx-Chipped|wtype}&{template:atkdmg} {{mod=+[[@{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{rname=Charged Thether Maul  of Thunderhead (Plunger)}} {{r1=[[@{Takentoll Onyx-Chipped|d20}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} @{Takentoll Onyx-Chipped|rtype}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[3d4 + @{Takentoll Onyx-Chipped|strength_mod} + 0[MOD]]]}} {{dmg1type=lightning AOE}} {{damage=1}} {{dmg2flag=1}} {{dmg2=[[1d6]]}} {{dmg2type=bludgeoning}} {{crit1=[[3d4[CRIT]]]}} {{crit2=[[1d6[CRIT]]]}} {{save=1}} {{saveattr=Dexterity}} {{savedesc=half damage}} {{savedc=[[[[(@{Takentoll Onyx-Chipped|strength_mod}+8+@{Takentoll Onyx-Chipped|spell_dc_mod}+@{Takentoll Onyx-Chipped|pb})]][SAVE]]]}} {{desc=Maul (Martial). 2d6 bludgeoning damage, Bludgeon, Heavy, Momentum (2d12), Two-Handed, Tethered, Socketed (1: Rage-Fueled Onyx), Discharging, Blowback.}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Takentoll Onyx-Chipped|global_attack_mod}}} {{globaldamage=[[2[Rage Damage]]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Takentoll Onyx-Chipped|global_damage_mod_type}}} ammo= @{Takentoll Onyx-Chipped|charname_output} {& elseif "@{Takentoll Onyx-Chipped|maul_head}" = "Thunder" && "@{Takentoll Onyx-Chipped|maul_handle}" = "Tether" && @{Takentoll Onyx-Chipped|thunder_count} = 3 && "?{Strikeface}" = "Spikes"} @{Takentoll Onyx-Chipped|wtype}&{template:atkdmg} {{mod=+[[@{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{rname=Charged Thethered Maul of Thunderhead (Spike)}} {{r1=[[@{Takentoll Onyx-Chipped|d20}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} @{Takentoll Onyx-Chipped|rtype}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[3 + @{Takentoll Onyx-Chipped|strength_mod} + 0[MOD]]]}} {{dmg1type=piercing}} {{damage=1}} {{dmg2flag=1}} {{dmg2=[[1d4]]}} {{dmg2type=lightning AOE}} {{crit1=[[3[CRIT]]]}} {{crit2=[[1d4[CRIT]]]}} 0 {{desc=Maul (Martial). 2d6 bludgeoning damage, Bludgeon, Heavy, Momentum (2d12), Two-Handed, Tethered, Socketed (1: Rage-Fueled Onyx), Discharging, Blowback.}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Takentoll Onyx-Chipped|global_attack_mod}}} {{globaldamage=[[2[Rage Damage]]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Takentoll Onyx-Chipped|global_damage_mod_type}}} ammo= @{Takentoll Onyx-Chipped|charname_output} {& elseif "@{Takentoll Onyx-Chipped|maul_head}" = "Thunder" && "@{Takentoll Onyx-Chipped|maul_handle}" = "Tether" && @{Takentoll Onyx-Chipped|thunder_count} = 3 && "?{Strikeface}" = "Face"} @{Takentoll Onyx-Chipped|wtype}&{template:atkdmg} {{mod=+[[@{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{rname=Charged Thethered Maul of Thunderhead (Face)}} {{r1=[[@{Takentoll Onyx-Chipped|d20}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} @{Takentoll Onyx-Chipped|rtype}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[2d6 + @{Takentoll Onyx-Chipped|strength_mod} + 0[MOD]]]}} {{dmg1type=bludgeoning}} {{damage=1}} {{dmg2flag=1}} {{dmg2=[[1d4]]}} {{dmg2type=lightning AOE}} {{crit1=[[2d6[CRIT]]]}} {{crit2=[[1d4[CRIT]]]}} 0 {{desc=Maul (Martial). 2d6 bludgeoning damage, Bludgeon, Heavy, Momentum (2d12), Two-Handed, Tethered, Socketed (1: Rage-Fueled Onyx), Discharging, Blowback.}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Takentoll Onyx-Chipped|global_attack_mod}}} {{globaldamage=[[2[Rage Damage]]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Takentoll Onyx-Chipped|global_damage_mod_type}}} ammo= @{Takentoll Onyx-Chipped|charname_output} {& elseif "@{Takentoll Onyx-Chipped|maul_head}" = "Thunder" && "@{Takentoll Onyx-Chipped|maul_handle}" = "Meteor" && @{Takentoll Onyx-Chipped|thunder_count} = 3  && "?{Strikeface}" = "Plunger"} @{Takentoll Onyx-Chipped|wtype}&{template:atkdmg} {{mod=+[[@{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{rname=Charged Meteor Hammer of Thunderhead (Plunger)}} {{r1=[[@{Takentoll Onyx-Chipped|d20}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + 0]]}} @{Takentoll Onyx-Chipped|rtype}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[3d4 + @{Takentoll Onyx-Chipped|strength_mod} + 0[MOD]]]}} {{dmg1type=lightning AOE}} {{damage=1}} {{dmg2flag=1}} {{dmg2=[[1d6]]}} {{dmg2type=bludgeoning}} {{crit1=[[3d4[CRIT]]]}} {{crit2=[[1d6[CRIT]]]}} {{save=1}} {{saveattr=Dexterity}} {{savedesc=half damage}} {{savedc=[[[[(@{Takentoll Onyx-Chipped|strength_mod}+8+@{Takentoll Onyx-Chipped|spell_dc_mod}+@{Takentoll Onyx-Chipped|pb})]][SAVE]]]}} {{desc=Meteor Hammer (Advanced). 1d6 bludgeoning damage, Double (1d6), Special, Discharging, Blowback.}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Takentoll Onyx-Chipped|global_attack_mod}}} {{globaldamage=[[2[Rage Damage]]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Takentoll Onyx-Chipped|global_damage_mod_type}}} ammo= @{Takentoll Onyx-Chipped|charname_output} {& elseif "@{Takentoll Onyx-Chipped|maul_head}" = "Thunder" && "@{Takentoll Onyx-Chipped|maul_handle}" = "Meteor" && @{Takentoll Onyx-Chipped|thunder_count} = 3  && "?{Strikeface}" = "Spikes"} @{Takentoll Onyx-Chipped|wtype}&{template:atkdmg} {{mod=+[[@{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{rname=Charged Meteor Hammer of Thunderhead (Spike)}} {{r1=[[@{Takentoll Onyx-Chipped|d20}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + 0}]]}} @{Takentoll Onyx-Chipped|rtype}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[3 + @{Takentoll Onyx-Chipped|strength_mod} + 0[MOD]]]}} {{dmg1type=piercing}} {{damage=1}} {{dmg2flag=1}} {{dmg2=[[1d4]]}} {{dmg2type=lightning AOE}} {{crit1=[[3[CRIT]]]}} {{crit2=[[1d4[CRIT]]]}} 0 {{desc=Meteor Hammer (Advanced). 1d6 bludgeoning damage, Double (1d6), Special, Discharging, Blowback.}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Takentoll Onyx-Chipped|global_attack_mod}}} {{globaldamage=[[2[Rage Damage]]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Takentoll Onyx-Chipped|global_damage_mod_type}}} ammo= @{Takentoll Onyx-Chipped|charname_output} {& elseif "@{Takentoll Onyx-Chipped|maul_head}" = "Thunder" && "@{Takentoll Onyx-Chipped|maul_handle}" = "Meteor" && @{Takentoll Onyx-Chipped|thunder_count} = 3  && "?{Strikeface}" = "Face"} @{Takentoll Onyx-Chipped|wtype}&{template:atkdmg} {{mod=+[[@{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{rname=Charged Meteor Hammer of Thunderhead (Face)}} {{r1=[[@{Takentoll Onyx-Chipped|d20}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + 0]]}} @{Takentoll Onyx-Chipped|rtype}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d6 + @{Takentoll Onyx-Chipped|strength_mod} + 0[MOD]]]}} {{dmg1type=bludgeoning}} {{damage=1}} {{dmg2flag=1}} {{dmg2=[[1d4]]}} {{dmg2type=lightning AOE}} {{crit1=[[1d6[CRIT]]]}} {{crit2=[[1d4[CRIT]]]}} 0 {{desc=Meteor Hammer (Advanced). 1d6 bludgeoning damage, Double (1d6), Special, Discharging, Blowback.}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Takentoll Onyx-Chipped|global_attack_mod}}} {{globaldamage=[[2[Rage Damage]]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Takentoll Onyx-Chipped|global_damage_mod_type}}} ammo= @{Takentoll Onyx-Chipped|charname_output} {& elseif "@{Takentoll Onyx-Chipped|maul_head}" = "Thunder" && "@{Takentoll Onyx-Chipped|maul_handle}" = "Tether" && @{Takentoll Onyx-Chipped|thunder_count} != 3 && "?{Strikeface}" = "Plunger"} @{Takentoll Onyx-Chipped|wtype}&{template:atkdmg} {{mod=+[[@{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{rname=Thethered Maul of Thunderhead (Plunger)}} {{r1=[[@{Takentoll Onyx-Chipped|d20}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} @{Takentoll Onyx-Chipped|rtype}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[0]]}} {{dmg1type=lightning}} 0 {{damage=1}} {{dmg2flag=1}} {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[0[CRIT]]]}} {{crit2=[[0[CRIT]]]}} 0 {{desc=Maul (Martial). 2d6 bludgeoning damage, Bludgeon, Heavy, Momentum (2d12), Two-Handed, Tethered, Socketed (1: Rage-Fueled Onyx), Discharging, Blowback.}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Takentoll Onyx-Chipped|global_attack_mod}}} {{globaldamage=[[2[Rage Damage]]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Takentoll Onyx-Chipped|global_damage_mod_type}}} ammo= @{Takentoll Onyx-Chipped|charname_output} {& elseif "@{Takentoll Onyx-Chipped|maul_head}" = "Thunder" && "@{Takentoll Onyx-Chipped|maul_handle}" = "Tether" && @{Takentoll Onyx-Chipped|thunder_count} != 3 && "?{Strikeface}" = "Spikes"} @{Takentoll Onyx-Chipped|wtype}&{template:atkdmg} {{mod=+[[@{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{rname=Thethered Maul of Thunderhead (Spike)}} {{r1=[[@{Takentoll Onyx-Chipped|d20}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} @{Takentoll Onyx-Chipped|rtype}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[3 + @{Takentoll Onyx-Chipped|strength_mod} + 0[MOD]]]}} {{dmg1type=piercing}} 0 {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[3[CRIT]]]}} {{crit2=[[0[CRIT]]]}} 0 {{desc=Maul (Martial). 2d6 bludgeoning damage, Bludgeon, Heavy, Momentum (2d12), Two-Handed, Tethered, Socketed (1: Rage-Fueled Onyx), Discharging, Blowback.}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Takentoll Onyx-Chipped|global_attack_mod}}} {{globaldamage=[[2[Rage Damage]]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Takentoll Onyx-Chipped|global_damage_mod_type}}} ammo= @{Takentoll Onyx-Chipped|charname_output} {& elseif "@{Takentoll Onyx-Chipped|maul_head}" = "Thunder" && "@{Takentoll Onyx-Chipped|maul_handle}" = "Tether" && @{Takentoll Onyx-Chipped|thunder_count} != 3 && "?{Strikeface}" = "Face"} @{Takentoll Onyx-Chipped|wtype}&{template:atkdmg} {{mod=+[[@{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{rname=Thethered Maul of Thunderhead (Face)}} {{r1=[[@{Takentoll Onyx-Chipped|d20}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} @{Takentoll Onyx-Chipped|rtype}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[2d6 + @{Takentoll Onyx-Chipped|strength_mod} + 0[MOD]]]}} {{dmg1type=bludgeoning}} 0 {{damage=1}} {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[2d6[CRIT]]]}} {{crit2=[[0[CRIT]]]}} 0 {{desc=Maul (Martial). 2d6 bludgeoning damage, Bludgeon, Heavy, Momentum (2d12), Two-Handed, Tethered, Socketed (1: Rage-Fueled Onyx), Discharging, Blowback.}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Takentoll Onyx-Chipped|global_attack_mod}}} {{globaldamage=[[2[Rage Damage]]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Takentoll Onyx-Chipped|global_damage_mod_type}}} ammo= @{Takentoll Onyx-Chipped|charname_output} {& elseif "@{Takentoll Onyx-Chipped|maul_head}" = "Thunder" && "@{Takentoll Onyx-Chipped|maul_handle}" = "Meteor" && @{Takentoll Onyx-Chipped|thunder_count} != 3 && "?{Strikeface}" = "Plunger"} @{Takentoll Onyx-Chipped|wtype}&{template:atkdmg} {{mod=+[[@{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{rname=Meteor Hammer of Thunderhead (Plunger)}} {{r1=[[@{Takentoll Onyx-Chipped|d20}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + 0}]]}} @{Takentoll Onyx-Chipped|rtype}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[0]]}} {{dmg1type=lightning}} 0 {{damage=1}} {{dmg2flag=1}} {{dmg2=[[1d6]]}} {{dmg2type=bludgeoning}} {{crit1=[[3d4[CRIT]]]}} {{crit2=[[1d6[CRIT]]]}} {{save=1}} {{saveattr=Dexterity}} {{savedesc=half damage}} {{savedc=[[[[(@{Takentoll Onyx-Chipped|strength_mod}+8+@{Takentoll Onyx-Chipped|spell_dc_mod}+@{Takentoll Onyx-Chipped|pb})]][SAVE]]]}} {{desc=Meteor Hammer (Advanced). 1d6 bludgeoning damage, Double (1d6), Special, Discharging, Blowback.}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Takentoll Onyx-Chipped|global_attack_mod}}} {{globaldamage=[[2[Rage Damage]]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Takentoll Onyx-Chipped|global_damage_mod_type}}} ammo= @{Takentoll Onyx-Chipped|charname_output} {& elseif "@{Takentoll Onyx-Chipped|maul_head}" = "Thunder" && "@{Takentoll Onyx-Chipped|maul_handle}" = "Meteor" && @{Takentoll Onyx-Chipped|thunder_count} != 3 && "?{Strikeface}" = "Spikes"} @{Takentoll Onyx-Chipped|wtype}&{template:atkdmg} {{mod=+[[@{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{rname=Meteor Hammer of Thunderhead}} {{r1=[[@{Takentoll Onyx-Chipped|d20}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + 0}]]}} @{Takentoll Onyx-Chipped|rtype}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[3 + @{Takentoll Onyx-Chipped|strength_mod} + 0[MOD]]]}} {{dmg1type=piercing}} 0 {{dmg2=[[0]]}} {{dmg2type=lightning AOE}} {{crit1=[[3[CRIT]]]}} {{crit2=[[1d4[CRIT]]]}} 0 {{desc=Meteor Hammer (Advanced). 1d6 bludgeoning damage, Double (1d6), Special, Discharging, Blowback.}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Takentoll Onyx-Chipped|global_attack_mod}}} {{globaldamage=[[2[Rage Damage]]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Takentoll Onyx-Chipped|global_damage_mod_type}}} ammo= @{Takentoll Onyx-Chipped|charname_output} {& elseif "@{Takentoll Onyx-Chipped|maul_head}" = "Thunder" && "@{Takentoll Onyx-Chipped|maul_handle}" = "Meteor" && @{Takentoll Onyx-Chipped|thunder_count} != 3 && "?{Strikeface}" = "Face"} @{Takentoll Onyx-Chipped|wtype}&{template:atkdmg} {{mod=+[[@{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{rname=Meteor Hammer of Thunderhead (Face)}} {{r1=[[@{Takentoll Onyx-Chipped|d20}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + 0}]]}} @{Takentoll Onyx-Chipped|rtype}cs>20 + @{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d6 + @{Takentoll Onyx-Chipped|strength_mod} + 0[MOD]]]}} {{dmg1type=bludgeoning}} 0 {{damage=1}} {{dmg2flag=1}} {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[1d6[CRIT]]]}} {{crit2=[[0[CRIT]]]}} 0 {{desc=Meteor Hammer (Advanced). 1d6 bludgeoning damage, Double (1d6), Special, Discharging, Blowback.}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Takentoll Onyx-Chipped|global_attack_mod}}} {{globaldamage=[[2[Rage Damage]]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Takentoll Onyx-Chipped|global_damage_mod_type}}} ammo= @{Takentoll Onyx-Chipped|charname_output} {& else}  {&end} {&simple} !{& if "@{Takentoll Onyx-Chipped|maul_head}" = "Thunder" && @{Takentoll Onyx-Chipped|thunder_count} = 3 && "?{Strikeface}" = "Plunger"}setattr --name Takentoll Onyx-Chipped --thunder_count|0 --silent {& elseif "@{Takentoll Onyx-Chipped|maul_head}" = "Thunder" && @{Takentoll Onyx-Chipped|thunder_count} != 3 && "?{Strikeface}" != "Plunger"}setattr --name Takentoll Onyx-Chipped --mod --thunder_count|1 --silent {&else} {&end}
1696986079

Edited 1696986163
Andrew R.
Pro
Sheet Author
<Low Whistle> I can't help thinking it would be easier or more readable in ScriptCards. But that's just me. ;) ScriptCards also has the --I command that asks for input while obeying program flow.
1696987164
Essen
Pro
Marketplace Creator
Welp. I guess I’m gonna learn what ScriptCards are.
1696993487
timmaugh
Pro
API Scripter
This is a pretty complex command which may be better suited in a chat menu or a ScriptCards script. One of the key things ScriptCards can do is the stopping-the-processing-to-pose-a-query. Basically every time you (as a player) start a message, there is the opportunity for queries... so ScriptCards leverages that fact if you have queries you want to pose later (and want to pose only if certain conditions are met). It's worth noting that metascripts will still work with ScriptCards, shaping the command line before ScriptCards gets a chance to look at it... so if you go that way, metascripts are still available to you. Now, if I were to try to do this with metascripts, I might use Muler to organize all of my different template parts into variables that could be retrieved. That would simplify my command line considerably. For instance, the rname template part is different for every combination of options. You could have a mule ability for Scourge, another for Bells, and another for Thunder, and they could each have a number of variables representing the various rname values for it: SCOURGE Tether.rname=Tether Maul of Scourge Meteor.rname=Meteor Hammer of Scourge Then  you could return those values in your command line, and you'd only have to have one instance of the template syntax in your macro. !@{Takentoll Onyx-Chipped|wtype}&{template:atkdmg} {{mod=+[[@{Takentoll Onyx-Chipped|strength_mod} + @{Takentoll Onyx-Chipped|pb}]]}} {{rname=get.Takentoll Onyx-Chipped.@{Takentoll Onyx-Chipped|maul_handle}/get}} ... {&simple} If you want a fuller example, I can provide one.
1697057723

Edited 1697063644
Essen
Pro
Marketplace Creator
Okay, so. I spent some free time at work on a ScriptCard and I have most of it worked out. Roll20 is blocked, so I made all this in Notepad without being able to test it. I can get the Query to run, but it's not setting the attributes when I call ChatSetAttr. !scriptcard {{ --iSet Head?;Yes|q;MaulHead;Set Weapon Head|Scourge Press|Silver Bells|Thunderhead --iSet Handle?;Yes|q;MaulHandle;Set Weapon Handle|Tether Ash|Meteor Chain -->MaulHeads| --=HeadSocket|@{selected|head_socket} -->MaulHandles| --=HandleSocket|@{selected|handle_socket} -->Gems| --#title|Set Modular Maul --+Head Set|[$MaulHead] --+Handle Set|[$MaulHandle] --X| --:MaulHeads| --?[$MaulHead] -eq "Scourge Press"|ScourgePress --?[$MaulHead] -eq "Silver Bells"|SilverBells --?[$MaulHead] -eq "Thunderhead"|Thunder --:ScourgePress --@setattr|_sel _maul_head|scourge _silent --@setattr|_sel _head_socket|1 _silent --<| --:SilverBells| --@setattr|_sel _maul_head|bells _silent --@setattr|_sel _head_socket|0 _silent --<| --:Thunder| --@setattr|_sel _maul_head|thunder _silent --@setattr|_sel _head_socket|0 _silent --<| --:MaulHandles| --?[$MaulHandle] -eq "Tether Ash"|Tether --?[$MaulHandle] -eq "Meteor Chain"|Meteor --:Tether| --@setattr|_sel _maul_handle|tether _silent --@setattr|_sel _handle_socket|1 _silent --<| --:Meteor| --@setattr|_sel _maul_handle|meteor _silent --@setattr|_sel _handle_socket|0 _silent --<| --:Gems| --@setattr|_sel _head_gem| _silent --@setattr|_sel _handle_gem| _silent --@setattr|_sel _gem_atk|0 _silent --@setattr|_sel _gem_dmg|0 _silent --@setattr|_sel _gem_rf|0 _silent --?[$HeadSocket] -gt 0|GemCheckHead --:GemCheckHead| --iSet Head Gem?;Yes|q;HeadGem;Set Weapon Head Gem|Royal Garnet|Rage-Fueled Onyx|None| --?[$HeadGem] -eq "Royal Garnet"|RoyalGarnet --?[$HeadGem] -eq "Rage-Fueled Onyx"|RageFuel --?[$HeadGem] -eq "None"|None --?[$HandleSocket] -gt 0|GemCheckHandle --:GemCheckHandle| --iSet Handle Gem?;Yes|q;HandleGem;Set Weapon Handle Gem|Royal Garnet|Rage-Fueled Onyx|None| --?[$HandleGem] -eq "Royal Garnet"|RoyalGarnet --?[$HandleGem] -eq "Rage-Fueled Onyx"|RageFuel --?[$HandleGem] -eq "None"|None --<| --:RoyalGarnet --@setattr|_sel _mod _gem_dmg|2 _silent --?[$HeadGem] -eg "Royal Garnet"|--@setattr|_sel _head_gem|Royal Garnet _silent --?[$HandleGem] -eg "Royal Garnet"|--@setattr|_sel _handle_gem|Royal Garnet _silent --<| --:RageFuel --@setattr --sel --gem_rf|1 --silent --?[$HeadGem] -eg "Rage-Fueled Onyx"|--@setattr|_sel _head_gem|Rage-Fueled Onyx _silent --?[$HandleGem] -eg "Rage-Fueled Onyx"|--@setattr|_sel _handle_gem|Rage-Fueled Onyx _silent --<| --:None --?[$HeadGem] -eg "None"|--@setattr|_sel _head_gem|Empty _silent --?[$HandleGem] -eg "None"|--@setattr|_sel _handle_gem|Empty _silent --<| }} What am I missing?
1697067740
Essen
Pro
Marketplace Creator
If it matters, here’s what I have installed;
So ScriptCards has multiple variable types.  Roll variables, which are set with = and called with $, where you are setting String variables which are set with & and called with &. So most of your variables appear to be strings so you'd want to use [&HeadGem] instead of [$HeadGem].  Also I see some issues in the lower branches of your ScriptCard. In the following: --:RoyalGarnet --@setattr|_sel _mod _gem_dmg|2 _silent --?[$HeadGem] -eg "Royal Garnet"|--@setattr|_sel _head_gem|Royal Garnet _silent --?[$HandleGem] -eg "Royal Garnet"|--@setattr|_sel _handle_gem|Royal Garnet _silent --<| --:RageFuel --@setattr --sel --gem_rf|1 --silent --?[$HeadGem] -eg "Rage-Fueled Onyx"|--@setattr|_sel _head_gem|Rage-Fueled Onyx _silent --?[$HandleGem] -eg "Rage-Fueled Onyx"|--@setattr|_sel _handle_gem|Rage-Fueled Onyx _silent --<| --:None --?[$HeadGem] -eg "None"|--@setattr|_sel _head_gem|Empty _silent --?[$HandleGem] -eg "None"|--@setattr|_sel _handle_gem|Empty _silent --<| So ScriptCards conditionals  cannot be used to call API scripts/mods like that directly inline. You would need to use block syntax to do that like this: --?"[&HeadGem]" -eq "None"|[ --@setattr|_silent _sel _head_gem|Empty --]| Also I changed a bit in addition to the variable types and code blocks since with String variables in conditions you almost always want to put quotes around the variable itself so like "[&HeadGem]". Also you have some -eg in your lower conditionals when you probably mean to use -eq. There are some other tweaks that probably could be made but those are the ones that stand out to me at first glance. I suspect the majority of your issues are with the variable type mismatch and changing the variables other than HandleSocket and HeadSocket to String variables with the & instead of the $, you'll get better results.
1697083231
Andrew R.
Pro
Sheet Author
You’ll catch a lot of these coding errors if you keep the Mod Console open in another tab and check it for error messages from ScriptCards. 
1697105403
Essen
Pro
Marketplace Creator
Thank you! I didn’t realize that about the strings. In one version I did store variable with & but wasn’t calling them with it, and the blank results threw me off. 
1697166727
Essen
Pro
Marketplace Creator
Arighty, I figured it out! One Token Action Button to set the parts, one to make the attack with the assembled weapon. Thank y'all for the help! If anyone wants a copy of the final code, let me know.