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

Macro Challenge

This challenge comes from ideas brought up in Stupid Roll 20 Tricks (and some clever ones) ; can someone figure out this issue? I'd like to use the trick below (" Reusing Rolls ") to combine two concepts. This is for GURPS, where what one is seeking is a 3d6 roll that is under the effective skill used in combat. So, for this example, assume a character with skill 14 in axe, who is targeting an arm (-2 to skill) and is making his attack deceptive (by taking a -2 to skill, it is -1 for the defender to defend if the attack hits). The net result is an attack with an effective skill of 10 [14 -2 -2]. The macro below actually does a lot of the math (I realize there could be dropdown lists to automatically calculate the penalties for striking at specific body parts...let's ignore that for now).  /em swings his axe at ?{Hit Location} (?{Hit Location Penalty}) with Deceptive Attack ?{Deceptive Attack Level}, vs. Effective Skill=[[?{Base Skill}+?{Hit Location Penalty}+?{Deceptive Attack Level}*2]] &{template:default} [[ [[1d6]] + [[1d6]] + [[1d6]] ]] {{name=Axe Swing}} {{$[[0]] + $[[1]] + $[[2]]==$[[3]]}} This then produces a fairly nice output, as follows, albeit over two entries:   Two issues: (1) I'd like to do this all as one entry, and (2) I'd like to show the margin of success in the "Notes" field. No idea how to do the either, really. At one point yesterday I think I managed to do #1 (and now I can't find that macro...grrr), but the Effective Skill was just unreadable (see below).  It would be really cool if I could somehow put the description in the Purple box, and then the effective skill and the margin of difference in the "Notes" area part of the template. Even if I could just get the "Effective Skill" down in the notes, that would be an improvement (and not calculate the margin of success or failure, although I'd like that).   Also, for a long host of reasons, we don't want just the inline roll, where the it displays only the total and you have to hover over it to see the die rolls, which is why I'm trying to use this trick; the GM would rather see each individual die roll and a total. And while you can do that with a macro that just uses /r 3d6 and such, that takes several rows, doesn't look as good as the template, etc. So the trick is trying to get the total, which is $[[3]] in the macro above, and compare it against the calculated Effective Skill , to give us the margin...and do it in a way that is displayable.  Any thoughts on how to trick Roll20 into doing this? Any help would be GREATLY APPRECIATED. Scott C.  said: Reusing Rolls Disclaimer: This trick takes advantage of emergent behavior that may not be intended and may be patched I can't take credit for this trick.  Syneran discovered the capability . But, long story short, it is actually possible to reuse rolls with some small caveats. Here's a summary of the info discovered in the linked forum thread: The chat accepts the inline roll indexing used in the API (and apparently the roll parser itself), so you can do: [[ [[1d20]] + [[1d6]] + [[6]] ]] = $[[0]] + $[[1]] + $[[2]] And get an output that would read something like this: The limited part is you can't use those indexed rolls inside other rolls. So for instance, you can't reverse the above output like this: [[1d20]] + [[1d6]] + [[6]] = [[$[[0]] + $[[1]] + $[[2]] ]] Using the indexes appears to break any containing inline rolls, like so: Additionally, the indexing is line specific, so this also doesn't work: [[1d20]] + [[1d6]] + [[6]] [[$[[0]] + $[[1]] + $[[2]] ]] These are pretty big limitations if you're just typing rolls into chat, but we can circumvent it through good use of roll templates. For instance, we could hid the actual roll in between roll template fields, and then present them in whatever order we wanted: &{template:default} [[ [[1d20]] + [[1d6]] + [[6]] ]] {{name=My Attack}} {{$[[0]] + $[[1]] + $[[2]]==$[[3]]}} which would give us this output: For those with API access, the API sees this message with the proper indexes showing, so any API that handles rolls should react to these indexed rolls just like they were regular rolls. What's it allow us to do though? There's several new things this allows the community to do that were previously locked behind access to the API. Character Sheets When making custom character sheets (or sheets for the repo), one of the big hurdles has been accomodating systems that require you to know multiple things about a complex roll. Something like say the success of a roll in relation to a target number, as well as the value of the roll itself. Or if a given number on a die counts as 0 (or some other number). General Macro Creation Now we can create macros that do our math for us. Total the damage from a complicated attack (or one that hit several times), display the parts of a roll so that what went into that roll is visible without needing to hover over it. And I'm sure folks will come up with quite a few other ideas that I haven't even thought of.
1594262662
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Not in a position to try this out (and I don't have the code you used to produce the output), but I think that trying to display a roll in the title area (name field) will be a no-go. The field overrides the text color to white, and that won't be readable. However, with the default template, you can have as many "notes" fields as you want: &{template:default} [[ [[1d6]] + [[1d6]] + [[1d6]] ]] {{name=Axe Swing}} {{$[[0]] + $[[1]] + $[[2]]==$[[3]]}}{{field 2=whatever you want}}{{field 3=whatever you want}}{{field 4=whatever you want}}... So you can put the other display text (the stuff you wanted in the purple header) in its own field. If you don't want anything to display on the left hand column of any field, just leave it empty: {{=whatever you want without a field name}}
1594263654
GiGs
Pro
Sheet Author
API Scripter
First, addressing the topic of splitting somethign across multiple rows. You do this by adding a title to each row, followed by an equals sign. The titke for each row must be unique.  So just by way of example, this &{template:default} [[ [[1d6]] + [[1d6]] + [[1d6]] ]] {{name=Axe Swing}} {{{{individual dice=$[[0]] + $[[1]] + $[[2]]}} {{total= $[[3]]}} would give you Here's a way to do your macro: &{template:default} [[ [[?{Base Skill}+[?{Hit Location}](?{Hit Location Penalty})+(?{Deceptive Attack Level})*2]] - [[[[1d6]] + [[1d6]] + [[1d6]]]] ]] {{name=@{selected|character_name} swings his axe with Deceptive Attack (?{Deceptive Attack Level|0})}} {{Location=?{Hit Location} (?{Hit Location Penalty|0}) }} {{Skill=[[?{Base Skill}+(?{Hit Location Penalty})+(?{Deceptive Attack Level})*2]]}} {{Rolls=$[[1]] + $[[2]] + $[[3]] = $[[4]]}} {{Success=$[[5]]}} Its very messy. You might want to change up the row titles, or rearrange things, but this is what it looks like
That is very cool, thanks so much to both of you. I'll try experimenting some more. @keithcurtis, using yours, I got this to work: &{template:default} [[ [[1d6]] + [[1d6]] + [[1d6]] ]] {{name=Axe Swing}} {{$[[0]] + $[[1]] + $[[2]]==$[[3]]}}{{Hit Location=?{Hit Location} (?{Hit Location Penalty}) }}{{Deceptive Attack=?{Deceptive Attack Level}}}{{Effective Skill=[[?{Base Skill}+?{Hit Location Penalty}+?{Deceptive Attack Level}*2]]}} And it produced this, which is nice.  Now I'm going to tryout what @GigS has recommended also. One of the challenges here will also be having multiple attacks; not sure that can be done with the "Reusing Rolls" feature (but I'm going to experiment). 
1594264724

Edited 1594264745
GiGs
Pro
Sheet Author
API Scripter
If you have multiple attacks with different rolls, its easily enough - you just repeat the same technique, but have to carefully count the roll numbers. Here's my version reorganised to look like your last one: &{template:default} [[ [[?{Base Skill}+[?{Hit Location}](?{Hit Location Penalty})+(?{Deceptive Attack Level})*2]] - [[[[1d6]] + [[1d6]] + [[1d6]]]] ]] {{name=Axe Swing}} {{Location=?{Hit Location} (?{Hit Location Penalty|0}) }} {{Deceptive Attack=?{Deceptive Attack Level}}} {{Effective Skill=[[?{Base Skill}+(?{Hit Location Penalty})+(?{Deceptive Attack Level})*2]]}} {{Rolls=$[[1]] + $[[2]] + $[[3]] = $[[4]]}} {{Success=$[[5]]}}
I tried that, but it goofed (I think I must not know what exactly to do here). So, I tried this: &{template:default} [[ [[1d6]] + [[1d6]] + [[1d6]] + [[1d6]] + [[1d6]] + [[1d6]] + [[1d6]] + [[1d6]] + [[1d6]] ]] {{name=@{selected|character_name} swings his axe with Deceptive Attack (?{Deceptive Attack Level|0})}} {{Location=?{Hit Location} (?{Hit Location Penalty|0}) }} {{Effective Skill=[[?{Base Skill}+(?{Hit Location Penalty})+(?{Deceptive Attack Level})*2]]}} {{Attack 1=$[[1]] + $[[2]] + $[[3]] = $[[10]]}} {{Attack 2=$[[4]] + $[[5]] + $[[6]] = $[[11]]}} {{Attack 3=$[[7]] + $[[8]] + $[[9]] = $[[12]]}} Which clearly did not work with this output:   So then I tried this after a few experiments with other combinations (probably about ten or so): &{template:default} [[ [[1d6]] + [[1d6]] + [[1d6]] ]] [[ [[1d6]] + [[1d6]] + [[1d6]] ]] [[ [[1d6]] + [[1d6]] + [[1d6]] ]] {{name=@{selected|character_name} swings his axe with Deceptive Attack (?{Deceptive Attack Level|0})}} {{Location=?{Hit Location} (?{Hit Location Penalty|0}) }} {{Effective Skill=[[?{Base Skill}+(?{Hit Location Penalty})+(?{Deceptive Attack Level})*2]]}} {{Attack 1=$[[0]] + $[[1]] + $[[2]] = $[[3]]}} {{Attack 2= $[[4]] + $[[5]] + $[[6]] = $[[8]] }} {{Attack 3= $[[7]] + $[[9]] + $[[10]] = $[[12]] }} That worked! (See below) but I have no idea how. The weird thing is that $[[11]] seems to refer back to the Effective Skill calculation, and I have no understanding of why $[[8]] was the total of $[[4]] + $[[5]] + $[[6]], whereas $[[12]] was the total of  $[[7]] + $[[9]] + $[[10]].  I'd love to know why  that worked...I think I could figure it out then. Thanks! GiGs said: If you have multiple attacks with different rolls, its easily enough - you just repeat the same technique, but have to carefully count the roll numbers.
Also, if you have any insight into this issue...I was monkeying around (for a long time now, embarrassingly) and made this macro for a character who can feint and then attack three times (Dual Weapon attack + Extra Attack 2) in one round.  &{template:default} [[ [[1d6]] + [[1d6]] + [[1d6]] ]] [[ [[1d6]] + [[1d6]] + [[1d6]] ]] [[ [[1d6]] + [[1d6]] + [[1d6]] ]] [[ [[1d6]] + [[1d6]] + [[1d6]] ]] {{name=@{selected|character_name} feints, then swings his sword three times (DWA/Extra Attack 2)}} {{Location=?{Hit Location} (?{Hit Location Penalty|0})}} {{Deceptive=?{Deceptive Attack Level}}} {{Base Skill=?{Base Skill}}} {{Feint=$[[0]] + $[[1]] + $[[2]] = $[[3]]}} {{Margin=?{Base Skill}-$[[3]] = }} {{Net Skill=[[?{Base Skill}+(?{Hit Location Penalty})+(?{Deceptive Attack Level})*2]]}}  {{# 1=$[[4]] + $[[5]] + $[[6]] = $[[8]]}} {{# 2=$[[7]] + $[[9]] + $[[10]] = $[[13]]}} {{# 3=$[[11]] + $[[12]] + $[[14]] = $[[16]]}}  I am quite close to getting it right through trial and error, but I cannot seem to get the calculation of the margin between the base skill (22) and the Feint roll (the first one). This is what I end up with: Also, I have no understanding of why Attack #1 is comprised of rolls 4+5+6, but the total is roll "8"; Attack #2 = rolls 7, 9 and 10, with the total as "13"; and Attack #3 = rolls 11, 12 and 14, with the total as "16." Net Skill seems to correspond with roll "15," it seems. 
1594278275

Edited 1594278329
GiGs
Pro
Sheet Author
API Scripter
It looks like you've exposed a problem with this technique. The more inline rolls you have, the ordering gets messed up.  It does look like it gets messed up in a repeatable ways. I tested with this &{template:default} [[ [[1d6]] + [[1d6]] + [[1d6]] ]] [[ [[1d6]] + [[1d6]] + [[1d6]] ]] [[ [[1d6]] + [[1d6]] + [[1d6]] ]] [[ [[1d6]] + [[1d6]] + [[1d6]] ]]  [[ [[1d6]] + [[1d6]] + [[1d6]] ]]  {{#1= $[[0]] $[[1]] $[[2]] = $[[3]] }} {{#2=$[[4]] + $[[5]] + $[[6]] = $[[7]]}} {{#3=$[[8]] + $[[9]] + $[[10]] = $[[11]] }} {{#4=$[[12]] + $[[13]] + $[[14]] = $[[15]] }} {{#5=$[[16]] + $[[17]] + $[[18]] = $[[19]] }} {{all 1= $[[0]] $[[1]] $[[2]] $[[3]] $[[4]] $[[5]]  $[[6]] $[[7]] $[[8]]  $[[9]]}} {{all2= $[[10]] $[[11]] $[[12]] $[[13]] $[[14]] $[[15]] $[[16]] $[[17]] $[[18]] $[[19]] }}  Which gives this result: Numbers #1-5 show each set of 3 individual dice and the one that should be its total. All 1 and all2 show the inline rolls all in order from 0-19 (and was just there as another way for me to look at the ordering). Set #1  is 0 + 1 + 2 = 3. Set #2 is 4+5 + 6 = 8. Its total should be 7, so its jumped 1 space.  Set #3 is 7 + 9 + 10 = 13. Its total should be #11, so its moved 2 spaces.  Set #4 is 11 + 12 + 14 = 18. Its total should be 15, so its moved 3 spaces. Set #5 is 15 + 16 +17 = 19. Its total hasnt moved - where could it go? So the ordering is wrong, but it's wrong in a constant and reproducible way.  I did another quick test with multiple levels of nested inline rolls, and it got very out of wack. I did suggest when this method was discovered that it's likely a bug, not an undocumented feature, and we shouldnt rely on it too heavily because it might get fixed at some point. This reinforces my opinion on that.  It does look like if you have a complex set of inline rolls, you cant assume the ordering will be as it should be, and you'll need to study the output to get the actual ordering you need. But once you find it for that particular roll, it should be stable. The ordering isnt jumping around randomly.
This is awesome , thanks! That was a great idea to list out all the numbers so you can see what corresponds with what. Really, really appreciated.  I probably approached this the wrong way in a sense--I should have been first outlining the goal before trying to come up with a solution and then trying to squeeze additional things into it. So, the goals here were to create a macro that people can use that: (1) shows the individual die rolls; (2) shows them in a clean format (like inline rolls) because the standard "/r 3d6" output leaves a lot to be desired; and (3) tries to get that all in one. The goals then increased to include: (4) get it to do multiple attacks; and (5) show the margin of success. Given those goals, and some exploration of the forums, I figured the "Reusing Rolls" trick would accomplish it. There may be a better way, but I'm not that familiar with Roll20's macro and template processes. If anyone else reading this thread has any other ideas, I'd love to see them. (And since this is likely a bug and not a feature, as you and others have noted, I probably should explore that). On a related note, is there a "manual" of sorts about Macros and Roll Templates, and what each function does (e.g., brackets, curly braces, etc.)? I am familiar with the Macros help page (although I should read it more in depth), as well as the Dice Reference and How to Make Roll Templates pages, but I feel like they could benefit from a more step-by-step approach (kind of like Nick Olivio's videos on YouTube ). That's not meant as a criticism of whoever authored those pages, but they serve more as a reference than a tutorial (and they do not necessarily hold themselves out to be tutorials).  GiGs said: It looks like you've exposed a problem with this technique. The more inline rolls you have, the ordering gets messed up.  It does look like it gets messed up in a repeatable ways. I tested with this &{template:default} [[ [[1d6]] + [[1d6]] + [[1d6]] ]] [[ [[1d6]] + [[1d6]] + [[1d6]] ]] [[ [[1d6]] + [[1d6]] + [[1d6]] ]] [[ [[1d6]] + [[1d6]] + [[1d6]] ]]  [[ [[1d6]] + [[1d6]] + [[1d6]] ]]  {{#1= $[[0]] $[[1]] $[[2]] = $[[3]] }} {{#2=$[[4]] + $[[5]] + $[[6]] = $[[7]]}} {{#3=$[[8]] + $[[9]] + $[[10]] = $[[11]] }} {{#4=$[[12]] + $[[13]] + $[[14]] = $[[15]] }} {{#5=$[[16]] + $[[17]] + $[[18]] = $[[19]] }} {{all 1= $[[0]] $[[1]] $[[2]] $[[3]] $[[4]] $[[5]]  $[[6]] $[[7]] $[[8]]  $[[9]]}} {{all2= $[[10]] $[[11]] $[[12]] $[[13]] $[[14]] $[[15]] $[[16]] $[[17]] $[[18]] $[[19]] }}  Which gives this result: Numbers #1-5 show each set of 3 individual dice and the one that should be its total. All 1 and all2 show the inline rolls all in order from 0-19 (and was just there as another way for me to look at the ordering). Set #1  is 0 + 1 + 2 = 3. Set #2 is 4+5 + 6 = 8. Its total should be 7, so its jumped 1 space.  Set #3 is 7 + 9 + 10 = 13. Its total should be #11, so its moved 2 spaces.  Set #4 is 11 + 12 + 14 = 18. Its total should be 15, so its moved 3 spaces. Set #5 is 15 + 16 +17 = 19. Its total hasnt moved - where could it go? So the ordering is wrong, but it's wrong in a constant and reproducible way.  I did another quick test with multiple levels of nested inline rolls, and it got very out of wack. I did suggest when this method was discovered that it's likely a bug, not an undocumented feature, and we shouldnt rely on it too heavily because it might get fixed at some point. This reinforces my opinion on that.  It does look like if you have a complex set of inline rolls, you cant assume the ordering will be as it should be, and you'll need to study the output to get the actual ordering you need. But once you find it for that particular roll, it should be stable. The ordering isnt jumping around randomly.
What I seem to be stuck on now (and I think that at this point, I'm like 99% of the way there) is that I cannot seem to create a formula where it will subtract the result of the total of the rolls--in this case, $[[3]]--from the number queried for base skill. So, for example, this macro: &{template:default} [[ [[1d6]] + [[1d6]] + [[1d6]] ]] ]] {{name=Feint}}  {{Feint=$[[0]] + $[[1]] + $[[2]] = $[[3]]}} {{Base Skill=?{Base Skill}}} {{ Made by=[[ ?{Base Skill}-$[[3]] ]] }} I thought  would display the "made by" as a calculation, but what I got was this: Perhaps one of the limitations of the "Reusing Rolls" trick is that you can't use them in an equation? Or am I just writing the equation incorrectly?  This is particularly useful not only for Feints in GURPS, but also Quick Contests, Spells (where the margin matters/affects the opponent's resistance roll), and the like. 
1594340120
Oosh
Sheet Author
API Scripter
You are correct: you cannot operate on $[[0]] calls in any way, only display them. So you need to include everything you want in the initial calculation: &{template:default} [[?{Base Skill} - [[ [[1d6]] + [[1d6]] + [[1d6]] ]] ]] ]] {{name=Feint}} {{Feint=$[[0]] + $[[1]] + $[[2]] = $[[3]]}} {{Base Skill=?{Base Skill}}} {{ Made by=$[[4]] }}
1594354711

Edited 1594377818
GiGs
Pro
Sheet Author
API Scripter
Here's a script that might do what you need. It's not very robust, so be careful how you supply data to it, but here are some sample outputs: You give it macro text like (for example) !gurps-roll&nbsp;--title:&nbsp;Feint&nbsp;--score:&nbsp;@{selected|Sword}&nbsp;--location:&nbsp;Arm&nbsp;--deceptive&nbsp;attack:&nbsp;-2&nbsp; !gurps-roll&nbsp;--title:&nbsp;Pistol&nbsp;--score:&nbsp;@{selected|guncombat}&nbsp;--rolls:&nbsp;3&nbsp; Basically you give it things in the form: &nbsp; &nbsp; --label: value The labels can be: -- title: what appears on the title bar --score: the skill value used to roll against The two above are required. The ones below are optional: -- name: &nbsp;if you want the roll to have a personalised name. I used Sword for the two examples above. --location: give a GURPS hit location, like Torso, Face, Arm, Right Arm, Vitals . As long as your hit location is spelled properly the proper value will be applied. --character:&nbsp; if you supply a character_id , the roll will use the character's portrait in the sender icon; otherwise it uses the player. You can get the id using @{selected|character_id} or @{Bobus|character_id} --rolls: &nbsp;if you want to make multiple rolls, just supply, say --rolls: 3 --description: &nbsp;if you want to add some short descriptive text, you can add this here. --recoil: &nbsp;whatever number is here will be subtracted on the 2nd attack, doubled on the 3rd attack, tripled on the 4th attack, and so on. It has no effect if there is only one attack. It can be used for any cumulative penalty, it doesnt have to be for guns. Any label not included above will be assumed to be a modifier, and must be in the format: --label: modifier For example: --deceptive&nbsp;attack:&nbsp;-2 --autofire:&nbsp;+2 You can include any number of modifiers. Find the script here:&nbsp; <a href="https://gist.github.com/G-G-G/79ec20dd0e64cff62bb8d957d140d92b" rel="nofollow">https://gist.github.com/G-G-G/79ec20dd0e64cff62bb8d957d140d92b</a> As noted at the start, it has no real error-checking, so be careful you build the roll strings properly. I am not responsible for any crashing sandboxes!
1594371221

Edited 1594375880
GiGs
Pro
Sheet Author
API Scripter
I made a tweak to the way margin of success is displayed: So, the first 3 are the dice rolls, following by the total of the dice, and then the margin of success. A negative margin is how much you failed by. The total is green if the dice roll is a success, and grey if its a failure. The margin of success is white normally, but if its a critical hit it's gold, and a fumble is red. Critical Chances use the extended skill rule from GURPS Compendium II, as described here:&nbsp;&nbsp; <a href="https://gurps.fandom.com/wiki/Success_roll#Critical_Success" rel="nofollow">https://gurps.fandom.com/wiki/Success_roll#Critical_Success</a>
1594378396
David M.
Pro
API Scripter
Advanced warning that I'll be stealing some of this code for another application, GiGs ;)
1594379139
GiGs
Pro
Sheet Author
API Scripter
Hehe, that's a great compliment. (The best bits of the code come from Aaron anyway!)
Just want to thank everyone again--GiGs, Oosh, keithcurtis, etc. These solutions will, I think, be really helpful. I'm not sure I will end up using the script, GiGs, but it looks pretty great.&nbsp;
Anyone know how to simplify this one to eliminate a duplicative query? The issue is that in the former macro I made, the user had to input the hit location, and then the associated hit location penalty. I could use a Roll Query that uses different labels, but the issue is that I need to report the First Value on the output, while using the second value for the calculation. Is there a way to do that ? Here's the macro and the output. &amp;{template:default} [[ [[1d6]] + [[1d6]] + [[1d6]] ]] {{name=Sunbolt Throw}} {{Attack:=$[[0]] + $[[1]] + $[[2]]=$[[3]]}}&nbsp; {?{Hit Location|Torso|Skull|Face|Eyes|Neck|Left Arm|Left Leg|Left Hand|Left Foot|Right Arm|Right Leg|Right Hand|Right Foot|Vitals|Groin} {?{Hit Location Penalty|Torso, 0|Skull, -7|Face, -5|Eyes, -9|Neck, -5|Arm, -2|Leg, -2|Hand, -4|Foot, -4|Vitals, -3|Groin, -3}}} {{Location=?{Hit Location}, ?{Hit Location Penalty}}}&nbsp; {{Predictive:=?{Predictive Attack Level|0}}} {{Range:=?{Range Penalty|0}}} {{Other:=?{Other Mods|0}}} {{Base Skill:=21}} {{Net Skill:=[[21+(?{Hit Location Penalty})+(?{Range Penalty})+(?{Other Mods})+(?{Predictive Attack Level})*2]]}} &nbsp; &nbsp;What I would love to do is to have the something like this, where VALUE 1 and VALUE 2 can both be obtained from the one prompt (if that makes sense). &amp;{template:default} [[ [[1d6]] + [[1d6]] + [[1d6]] ]] {{name=Sunbolt Throw}} {{Attack:=$[[0]] + $[[1]] + $[[2]]=$[[3]]}}&nbsp;&nbsp; {?{Hit Location|Torso, 0|Skull, -7|Face, -5|Eyes, -9|Neck, -5|Left Arm, -2|Left Leg, -2|Left Hand, -4|Left Foot, -4|Right Arm, -2|Right Leg, -2|Right Hand, -4|Right Foot, -4|Vitals, -3|Groin, -3} {{Location=?{Hit Location VALUE 1 }, ?{Hit Location VALUE 2 }}}&nbsp; {{Predictive:=?{Predictive Attack Level|0}}} {{Range:=?{Range Penalty|0}}} {{Other:=?{Other Mods|0}}} {{Base Skill:=21}} {{Net Skill:=[[21+(?{Hit Location VALUE 2 })+(?{Range Penalty})+(?{Other Mods})+(?{Predictive Attack Level})*2]]}} Is there a way to do this that perhaps I missed? Any help would be great. Thanks!
1594500283
GiGs
Pro
Sheet Author
API Scripter
The only way to do that is to duplicate everything you need to for every hit location. This likely leads to the madness of html entity substitution. The basic structure would looke something like &amp;{template:default} [[ [[1d6]] + [[1d6]] + [[1d6]] ]] {{name=Sunbolt Throw}} {{Attack=$[[0]] + $[[1]] + $[[2]]=$[[3]]}}&nbsp; {{Predictive=?{Predictive Attack Level|0}}} {{Range=?{Range Penalty|0}}} {{Other=?{Other Mods|0}}} {{Base Skill=21}} {{Location={?{Hit Location| Torso,Torso (0) }} {{Net Skill=[[21+(?{Hit Location VALUE 2})+(?{Range Penalty})+(?{Other Mods})+(?{Predictive Attack Level})*2]]| Skull,Skull (-7) }} {{Net Skill=[[21-7+(?{Range Penalty})+(?{Other Mods})+(?{Predictive Attack Level})*2]]| Face, -5| Eyes, -9| Neck, -5| Left Arm, -2| Left Leg, -2| Left Hand, -4| Left Foot, -4| Right Arm, -2| Right Leg, -2| Right Hand, -4| Right Foot, -4| Vitals, -3| Groin, -3} }} Look at the Torso and Skull lines. You basically have to copy that into every row of the location table, and then replace certain characters - each comma, curly close bracket (}), or pipe (|) - with their html entities as described here:&nbsp; <a href="https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries" rel="nofollow">https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries</a> I reordered the layout so that fewer things would need to be inside the hit location query, so fewer substitutions needed.