Gauss said: Tuo said: My expertise ends where scripts start, and I have no way to test this myself - but couldn't you just use the same query for both ChatSetAttr and the attack? Something like... !setattr {{
--name charactername
--nocreate
--silent
--repeating_acmod_$0_global_ac_val|?{Defender setting?|3,0|2,1|1,2|0,3}
}}
@{repeating_attack_$0_attack} And then have }} {{r1=[[d20}cs>20 + @{strength_mod}[STR] + @{pb}[PROF] + [[3-?{Defender setting?|3,0|2,1|1,2|0,3}]][DEFENDER]]]}} @{rtype}cs>20 + @{strength_mod}[STR] + @{pb}[PROF] + [[3-?{Defender setting?|3,0|2,1|1,2|0,3}]][DEFENDER] ]]}} {{dmg1=[[@{repeating_attack_$0_dmgbase} + @{strength_mod}[STR] + [[3-?{Defender setting?|3,0|2,1|1,2|0,3}]][DEFENDER]]]}} {{mod=[[@{pb} + @{strength_mod} + [[3-?{Defender setting?|3,0|2,1|1,2|0,3}]] ]] in the attack description (if you want to roll damage separately, that can be done without re-querying, but it requires a few extra steps to set up) - queries match through line breaks, so using the same query for both shouldn't be an issue. Like I said, I have no way to test this myself, though. Yes, but you still cannot set up the damage that way. Although, I guess you could set up the damage via ChatSetAttr while using the attack in the template. I can play with that and test it later. Edit: also I just realized a problem that Tuo fixed regarding my query, nice catch. I'm glad it works I found the issue, I missed a @{ in the r1 row. The damage is already included in case the attack and damage are rolled at once, but if they're rolled separately, what can be done is to have }} {{r1=[[@{d20}cs>20 + @{strength_mod}[STR] + @{pb}[PROF] + [[3-?{Defender setting?|3,0|2,1|1,2|0,3}]][DEFENDER]]]}} @{rtype}cs>20 + @{strength_mod}[STR] + @{pb}[PROF] + [[3-?{Defender setting?|3,0|2,1|1,2|0,3}]][DEFENDER] ]]}} {{dmg1=[[@{repeating_attack_$0_dmgbase} + @{strength_mod}[STR] + [[3-?{Defender setting?|3,0|2,1|1,2|0,3}]][DEFENDER]]]}} {{mod=[[@{pb} + @{strength_mod} + [[3-?{Defender setting?|3,0|2,1|1,2|0,3}]] ]]}} {{rname=[@{repeating_attack_$0_atkname}](` %{@{character_name}|defender-damage} {{dmg1=[[@{repeating_attack_$0_dmgbase} + @{strength_mod}[STR] + [[3-?{Defender setting?|3,0|2,1|1,2|0,3}]][DEFENDER]]]}}"style=" display:inline-block; border: 1px solid black; border-radius: 5px; background-color; #e8e8e8; color: black; text-align: center; font-weight: bold; padding: 2px; margin-bottom: 3px)}} {{rnamec=[@{repeating_attack_$0_atkname}](` %{@{character_name}|defender-damage} {{dmg1=[[@{repeating_attack_$0_dmgbase} + @{strength_mod}[STR] + [[3-?{Defender setting?|3,0|2,1|1,2|0,3}]][DEFENDER]]]}} {{crit=1}}"style=" display:inline-block; border: 1px solid black; border-radius: 5px; background-color; #e8e8e8; color: black; text-align: center; font-weight: bold; padding: 2px; margin-bottom: 3px) as the attack description, and then have an ability called defender-damage, consisting of &{template:dmg} {{damage=1}} {{dmg1flag=1}} {{dmg1type=@{repeating_attack_$0_dmgtype}}} {{crit1=[[@{repeating_attack_$0_dmgbase}]]}} {{desc=}} This way, you don't get queried again for the defender mode, as the selection is baked into the damage button and the description isn't added again. EDIT2 - set up like this, the query works both with auto-rolling damage and without, and should by all reason work with ChatSetAttr.