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

Text as used in Queries under multiple calls.

1599590125

Edited 1599590158
Okay, excuses for the wonky title.  Basically my issue is this: I've just discovered how versatile queries actually are. I've seen if you call the same Query multiple times within the same macro, it'll only ask the user once. That's pretty impressive. I've also seen unfortunately, no matter what, it'll use the same output on all of them. So even if you use ?{Message|1,2|2,3} in one part, and ?{Message|1,1|2,2} in another part of the same Macro, it'll use the outputs defined in the original call on both, even though the second call of it will describe different outputs. That's fine, I understand that's probably due to how roll20 reads macros.  I've also noticed that Text, when used in a multiplication, is treated as 1.  So, to use my issue as an example.... For DnD 5e GWM/SS Macros, you can use these for the Query: ?{GWM?|Yes, (GWM)|No, 0}. Therefor, you can put that Query in the name of the attack, and it'll add (GWM) to the end of the attack, indicating the attack is GWM, while still being able to be called in maths like -[[5*?{GWM?|Yes, (GWM)|No, 0}]] for the attack modifier and +[[10*?{GWM?|Yes, (GWM)|No, 0}]] for the damage. if you've been following along, you probably see where I'm going with this, I cant find a stand in to replace the 0, that still acts as a 0 for maths purposes, but doesn't post as text. Idk if there's a HTML character that represents "false" or something like that. See what I mean below:  If you are interested in seeing the code, incase that helps, here it is:  @{Praakog Jiga|wtype}&{template:atkdmg} {{mod=+[[5-[[5*?{Great Weapon Master?|Yes, (GWM)|No, 0}]]]]}} {{rname=Greatsword?{Great Weapon Master?|Yes, (GWM)|No,0}}}{{r1=[[@{Praakog Jiga|d20}cs>20 + 3[STR] + 2[PROF] - [[5*?{Great Weapon Master?|Yes, (GWM)|No,0}]][GWM] ]]}} @{Praakog Jiga|rtype}cs>20 + 3[STR] + 2[PROF]]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[2d6 + 3[STR] + [[10*?{Great Weapon Master?|Yes,|No,}]][GWM]]]}} {{dmg1type=Slashing}} 0 {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[2d6[CRIT]]]}} {{crit2=[[0[CRIT]]]}} 0 {{desc=}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Praakog Jiga|global_attack_mod}}} {{globaldamage=[[0]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Praakog Jiga|global_damage_mod_type}}} ammo= @{Praakog Jiga|charname_output}
1599591005
David M.
Pro
API Scripter
Can't think of anything to specifically answer your question. However, the way I would handle this is to make separate subordinate abilities for Greatsword & Greatsword_GWM (not exposed to the user interface), then a master ability that contains the query and directs to the appropriate Greatsword ability. This master ability is the only one exposed to the UI.  The master ability could alternatively create a chat menu rather than using a query, described here .
Thanks David.  It's something I've done before. It's just I wanted to see if i could do it a bit more elegantly. This way it's all contained in one place, y'know?  But yeah, Thanks anyway man :)
1599598458
David M.
Pro
API Scripter
I hear you. Maybe someone else can come up with something. On a positive note, I wasn't aware of the "text acting like 1" for multiplication thing. That may come in handy for me some day, so thanks for pointing that out!
1599605723
Ziechael
Forum Champion
Sheet Author
API Scripter
Interesting... I don't think text 'acts as a 1' though, it just doesn't break calculations: [[ [[1d20]] + ?{Test|Text,Yes|No Text,} ]] $[[0]] The above never reported a total of anything other than the d20 roll... just like this one: [[ [[1d20]] * ?{Test|Text,Yes|No Text,} ]] $[[0]] ...gonna have a play and see if I can come up with something that would be a 0 proxy that wouldn't ruin a text print out though, my interest is piqued to say the least.
1599606951
Ziechael
Forum Champion
Sheet Author
API Scripter
Hoped this trick might have allowed us to fake it by turning the 0 white (or whatever colour) but alas, no, it doesn't read the label for the fake link as anything :( [[ [[1d20]] * ?{Test|Text,Yes|No Text,[0](#" style="color:white)} ]] $[[0]] ?{Test} Failure never stopped me before however... onto the next crackpot scheme!
1599609416

Edited 1599639014
Ziechael
Forum Champion
Sheet Author
API Scripter
Here is my best solution for a MEGA-HACK: @{Praakog Jiga|wtype}&{template:atkdmg} {{mod=+[[5-[[5*?{Great Weapon Master?|Yes,ORD (GWM)|No,0RD}]]]]}} {{rname=GREATSW?{Great Weapon Master?}}}{{r1=[[@{Praakog Jiga|d20}cs>20 + 3[STR] + 2[PROF] - [[5*?{Great Weapon Master?}]][GWM] ]]}} @{Praakog Jiga|rtype}cs>20 + 3[STR] + 2[PROF] - [[5*?{Great Weapon Master?}]][GWM] ]] }} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[2d6 + 3[STR] + [[10*?{Great Weapon Master?}]][GWM]]]}} {{dmg1type=Slashing}} 0 {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[2d6[CRIT]]]}} {{crit2=[[0[CRIT]]]}} 0 {{desc=}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Praakog Jiga|global_attack_mod}}} {{globaldamage=[[0]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Praakog Jiga|global_damage_mod_type}}} ammo= @{Praakog Jiga|charname_output} And if anyone ever asks why your weapon name is in caps or why sometimes there is a 0 masquerading as an O just tell them to shut up and try to write really complex macros themselves before judging ;) edit: just noticed that your adv/disadv roll wasn't going to be affected by your GWM setting, so added that in now
1599611694
David M.
Pro
API Scripter
haha, that's awesome!
That is pretty funny, i like that alot.