I'm trying to create a single macro to merge to separate macros I use for converting PC and NPC tokens. Both macros work on their own but the NPC macro doesn't work within the query structure. ?{Token Type
|PC,!token-mod {{
--set bar1_link# bar2_link# bar3_link# bar1# bar2# bar3# }}
!token-mod {{
--set bar1_link#hp
--set bar2_link#speed
--set bar3_link#passive_wisdom
--set name#@{selected|character_name}
--on showname
--on showplayers_name
--on showplayers_bar1
--on showplayers_bar2
--on showplayers_bar3
--on showplayers_aura1
--on showplayers_aura2
--on light_hassight
--on has_bright_light_vision
--set bar_location#overlap_top
--set defaulttoken }}
|NPC,!token-mod {{
--set bar1_link# bar2_link# bar3_link# bar1# bar2# bar3# }}
!token-mod {{
--set bar1_max#@{selected|hp|max}
--set bar1_value#@{selected|hp|max}
--set bar2_value#@{selected|npc_speed}
--set bar3_value#[[[[@{selected|npcd_wis_mod}*{1@{selected|npc_perception}0,0}=10+0@{selected|npc_perception}]]+10]]
--on showname
--on showplayers_bar1
--off showplayers_bar2
--off showplayers_bar3
--off showplayers_name
--on showplayers_aura1
--on showplayers_aura2
--off light_hassight
--off has_bright_light_vision
--set bar_location#overlap_top
--set defaulttoken}}}&{noerror}