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

D&D 3.5 Attack Macro Help Needed

I created a rather long query macro that works really well, and now I want to improve it. I have a 6th level fighter who attacks using a two handed weapon (Greathammer). The macro asks questions; for example: Did you Charge?; Did you Power Attack?; Do you have Flank? etc. When the macro is finished, it displays: the final attack roll, damage roll, as well as a threat confirmation roll and added damage if there is a crit. This macro uses inline rolls to keep the display text neat. Currently, I have to mouse over my attack roll and verify if the d20 roll was a 19 or 20 (the threat range for that weapon), and if it is, inform the DM that there is additional damage to be added (which is already calculated and displayed). All of this works fine. Here is what I want to improve. I want the macro to remember the d20 roll and display it in the line above the displayed text in the macro for the threat range. I am being lazy and I don't want to mouse over the attack roll every time. I successfully created a query for the d20 roll and added it into the macro, but when I display it, it re-rolls a new value and does't remember the original roll. So, my question is this. Is there any way to create a variable that will remember the input roll and reuse it later on? P.S. have mercy on me when you reply because I suck at coding. I have very little experience with writing code, this is just a hobby for me. I am sure there is a way to do it using API, but again I suck at coding and I don't even know what API means or how to utilize it. Thank in advance for any assistance. Below is the original macro without the query for the d20 roll: /em shouts a battle cry as he smashes his foe with incredible force from his greathammer attack. Penalty to AC: [[(-2*?{Use Charge - Use 1 for Yes and 0 for No|0})+(-?{Use Heedless Charge (Min=5; Max=@{BASE ATTACK BONUS})|0})]] Greathammer Attack: Hit Roll: [[1d20+@{Base Attack Bonus} [Base Attack Bonus 1] +floor(@{Strength}/2-5) [Strength Modifier] +@{Greathammer Magic Bonus} [Magic Weapon Bonus] +@{Weapon Focus} [Weapon Focus] +@{Weapon Mastery} [Weapon Mastery] +(2*?{Flank? - Use 1 for Yes and 0 for No|0}) [Flank Bonus] +(2*?{Use Charge - Use 1 for Yes and 0 for No|0}) [Charge Bonus] +?{Miscellaneous Hit Bonus|0} [Miscellaneous Hit Bonus] -?{Power Attack (Min=0; Max=@{BASE ATTACK BONUS})|0} [Power Attack] +(?{Use Heedless Charge (Min=5; Max=@{BASE ATTACK BONUS})|0})] [Heedless Charge Deferment]]] Damage: [[1d12+floor(floor(@{Strength}/2-5)*1.5) [Strength Modifier] +@{Greathammer Magic Bonus} [Magic Weapon Bonus] +@{Weapon Specialization} [Weapon Specialization] +@{Weapon Mastery} [Weapon Mastery] +(?{Power Attack (Min=0; Max=@{BASE ATTACK BONUS})|0}*2) [Power Attack] +?{Miscellaneous Damage Bonus|0} [Miscellaneous Damage Bonus]]] HP Threat Range: 19-20 Critical Confirmation Roll: [[1d20+@{Base Attack Bonus} [Base Attack Bonus 1] +floor(@{Strength}/2-5) [Strength Modifier] +@{Greathammer Magic Bonus} [Magic Weapon Bonus] +@{Weapon Focus} [Weapon Focus] +@{Weapon Mastery} [Weapon Mastery] +(2*?{Flank? - Use 1 for Yes and 0 for No|0}) [Flank Bonus] +(2*?{Use Charge - Use 1 for Yes and 0 for No|0}) [Charge Bonus] +?{Miscellaneous Hit Bonus|0} [Miscellaneous Hit Bonus] -?{Power Attack (Min=0; Max=@{BASE ATTACK BONUS})|0} [Power Attack] +(?{Use Heedless Charge (Min=5; Max=@{BASE ATTACK BONUS})|0})] [Heedless Charge Deferment]]] Critical Multiplier: x4 Critical Damage in Addition to above Damage: [[3d12sd +(floor(floor(@{Strength}/2-5)*1.5) [Strength Modifier] +@{Greathammer Magic Bonus} [Magic Weapon Bonus] +@{Weapon Specialization} [Weapon Specialization] +@{Weapon Mastery} [Weapon Mastery] +(?{Power Attack (Min=0; Max=@{BASE ATTACK BONUS})|0}*2) [Power Attack] +?{Miscellaneous Damage Bonus|0} [Miscellaneous Damage Bonus])*3]] HP -------------------------------------
Nope. The Macro system is strickly one-shot use and read-only. You can't retain values or write that value somewhere to recall later. You would need the API to script that out; and at that point you would likely be able to re-do most of this macro However, what I see some folks do to illustrate crits is to write out what the final attack roll would need to be in order to Crit. Example: 1d20+5 is my roll and I would crit on an 18-20 [[ 1d20 + 5 ]] for [[1d8 + 4]] Dmg. Crit on [[18 + 5]]: Confirm? [[ 1d20 + 5]] For addt'l [[ (1d8+4)+ (1d8+4) ]] dmg
Alternatively, if you're feeling up to to it, you can create a Rollable table with custom images to represent the dice faces. In that sense making your own custom D20 with green-highlighted 19 and 20 images.
Making a rollable table is too much work. What exactly is API and what do I use to write code for roll20?
Bit hard to answer that simply :) Just check out <a href="https://wiki.roll20.net/API:Introduction" rel="nofollow">https://wiki.roll20.net/API:Introduction</a>
Thanks for your assistance. I'll check it out.
1407214301
The Aaron
Roll20 Production Team
API Scripter
Creating Rollable Tables with the API is pretty straight forward. I have a small script that does this which you might use as a jumping off point: <a href="https://app.roll20.net/forum/post/950142/script-we" rel="nofollow">https://app.roll20.net/forum/post/950142/script-we</a>...