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

Formatting the text in a roll query

1556806631

Edited 1556806769
Hi all! I've borrowed (thank you google and roll20) a magus macro and it has served me oh so well. However I've come to the conundrum of other people occasionally having to use my macro and they simply dont know as much as I do about my magus. So I was hoping to modify the macro to more clearly give the information - in this case it's determining the attack modifier that would be added via various buffs or penalties (Spell Combat / Flanking / Shocking Grasp bonus, etc.). What I'm having trouble with is the formatting of the actual words in the roll query. From what I can tell, there's only really 2 parts to a roll query, the label and the result. Result is fine, it'll be a simple text box to add the number into (query ends in |+0}). But I was hoping to present the options in a list-like format as opposed to just a continuous line of text. Something along the lines of: {Attack Modifier: (list here of various pluses and minuses). I've tried to format the box in any way and have come up short - I dont think it's possible but I figured I'd ask. Likewise, similarly, since the text in the box is also the label, it makes recalling the results in later uses (such as actually adding the modifier to the attack roll) pretty silly, as you can't @{This super long text line with multiple entries: Such as this one / or this one / and maybe this one too}. Are there any tips in better ways to handle this? Or is the best answer to simply do as the original macro does, and simply do a  whole bunch of roll queries? For reference, the macro currently used: @{PC-whisper} &{template:pf_attack} ?{Spell Combat|+0|-2} ?{Enhancement Bonus|+0|+1} ?{Flanking|No,+0|Yes,+2} ?{Keen|No,0|Yes,2} ?{Shocking Grasp Bonus|+0|+3} ... {{attack=[[ 1d20cs>[[@{crit-target} - ?{Keen}]] + @{attack_macro} + [[ ?{Spell Combat} ?{Enhancement Bonus} ?{Flanking} ?{Shocking Grasp Bonus} ]] ... It would be significantly cleaner to have something like: @{PC-whisper} &{template:pf_attack} ?{attack modifier | +0} .... {{attack =[[ 1d20cs>[[@{crit-target} - ?{Keen}]] +@{attack_macro} + ?{attack modifier} - but with the attack modifier query also giving out the specific bonuses from me, and a line about any potential other bonuses
1556813904

Edited 1556814037
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I think what you are asking for is essentially a roll query that works as checkboxes (select multiple options). This isn't possible. If you don't have too many permutations you could put all the permutations in a single roll query, but this quickly gets out of hand since it expands at an exponential rate (or maybe geometric; regardless it expands really fast). EDIT: Of course, this works only if everything is going to be in the same place. Your keen wouldn't work for this.
1556824803
Ziechael
Forum Champion
Sheet Author
API Scripter
Like Scott says, there are options to reduce clutter and improve readability but it all depends on how far you want to take it. Regardless, posting your full macro as it is now would help those not familiar with the template being used to suggest options for you :)
1556830800

Edited 1556831438
Sure! Here's the macro I've borrowed and slightly edited, it's an attack macro for Magus to pick what buffs or debuffs are being used: @{PC-whisper} &{template:pf_attack} ?{Spell Combat|+0|-2} ?{Enhancement Bonus|+0|+1} ?{Flanking|No,+0|Yes,+2} ?{Keen|No,0|Yes,2} ?{Shocking Grasp Bonus|+0|+3} @{toggle_attack_accessible} @{toggle_rounded_flag} {{color=@{rolltemplate_color}}} {{character_name=@{character_name}}} {{character_id=@{character_id}}} {{subtitle}} {{name=@{name}}} {{attack=[[ 1d20cs>[[@{crit-target} - ?{Keen}]] + @{attack_macro} + [[ ?{Spell Combat} ?{Enhancement Bonus} ?{Flanking} ?{Shocking Grasp Bonus} ]] ]]}} {{damage=[[@{damage-dice-num}d@{damage-die} + @{damage_macro}]] }} {{crit_confirm=[[ 1d20 + [[ @{attack_macro} ]] + [[ ?{Spell Combat} ?{Enhancement Bonus} ?{Flanking} ?{Shocking Grasp Bonus} ]] ]]}} {{crit_damage=[[ [[ @{damage-dice-num} * (@{crit-multiplier} - 1) ]]d@{damage-die} + ((@{damage_macro}) * [[ @{crit-multiplier} - 1 ]]) ]] }} {{type=@{type}}} {{weapon_notes=@{notes}}} @{iterative_attacks} @{macro_options} {{vs=@{vs}}} {{vs@{vs}=@{vs}}} {{precision_dmg1=@{precision_dmg_macro}}} {{precision_dmg1_type=@{precision_dmg_type}}} {{precision_dmg2=@{global_precision_dmg_macro}}} {{precision_dmg2_type=@{global_precision_dmg_type}}} {{critical_dmg1=@{critical_dmg_macro}}} {{critical_dmg1_type=@{critical_dmg_type}}} {{critical_dmg2=@{global_critical_dmg_macro}}} {{critical_dmg2_type=@{global_critical_dmg_type}}} The problem: Random attribute bonuses from other people, such as a bard's inspiration or Bless, make this whole macro off. The easiest thing to do would be to simply create a fill-in for Attack, and Damage (and Keen for crit range but meh, that's on it's own and is already there). This is easy to accomplish for me, as I know my values. If anyone else plays my character, however, or if I manage to forget that I spell combatted shocking grasp while flanking with bane on me and I enchanted my blade with a pool point - then the value is wrong. So I was hoping to display a list of potential values and a reminder to consider non-character buffs. For me, the answer is simple: @{PC-whisper} &{template:pf_attack} ?{Attack Bonus?|+0} ?{Damage Bonus?|+0} ?{Keen|No,0|Yes,2} @{toggle_attack_accessible} @{toggle_rounded_flag} {{color=@{rolltemplate_color}}} {{character_name=@{character_name}}} {{character_id=@{character_id}}} {{subtitle}} {{name=@{name}}} {{attack=[[ 1d20cs>[[@{crit-target} - ?{Keen}]] + @{attack_macro} + ?{Attack Bonus} ]]}} {{damage=[[@{damage-dice-num}d@{damage-die} + @{damage_macro} + ?{Damage Bonus}]] }} {{crit_confirm=[[ 1d20 + [[ @{attack_macro} ]] + ?{Attack Bonus} ]]}} {{crit_damage=[[ [[ @{damage-dice-num} * (@{crit-multiplier} - 1) ]]d@{damage-die} + ((@{damage_macro}) * [[ @{crit-multiplier} - 1 ]]) ]] }} {{type=@{type}}} {{weapon_notes=@{notes}}} @{iterative_attacks} @{macro_options} {{vs=@{vs}}} {{vs@{vs}=@{vs}}} {{precision_dmg1=@{precision_dmg_macro}}} {{precision_dmg1_type=@{precision_dmg_type}}} {{precision_dmg2=@{global_precision_dmg_macro}}} {{precision_dmg2_type=@{global_precision_dmg_type}}} {{critical_dmg1=@{critical_dmg_macro}}} {{critical_dmg1_type=@{critical_dmg_type}}} {{critical_dmg2=@{global_critical_dmg_macro}}} {{critical_dmg2_type=@{global_critical_dmg_type}}} For the others? Probably a bit confusing. Ultimately though that's what I'm going to change it to. (EDIT: I also just realized the old macro wasn't likely adding the damage from the pool point ._., sigh. I'll just have to add that little bit so I actually do my 1 damage more lol)