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

Basic question about macros

Hello everyone, I'm new around here, and unfortunately I'm also horrible at handling scripts, macros etc. I'd like to create a macro to have and attack roll with both primary and secondary hand, including a "vs AC" check, damage roll and possibly also the critical hit roll, but I have absolutely no clue where to start with it (I've been looking into the wiki section, and still I couldn't see a solution) Could anyone give me some tips? Cheers!
1424347639

Edited 1424349256
May help if you post your game system ^.^ if it's one I am familiar with I'll see what I can do :D Edit: I should state I know 3.5 only, and will need any feats that will modifiy the attack, such as 2 weapon fighting, improved 2 weapon fighting, weapon finesse (for light weapons) and if you are set on using a specific set of weapons I'll need to know if they are both 1-handed, Light, or 1 of each. On your sheet you will need to make sure weapon 1 is your primary hand weapon and weapon 2 is your off-hand weapon, as these will be the ones targeted by the macro.
Take a look at some of the Pathfinder examples here: <a href="https://wiki.roll20.net/Macros_-_Pathfinder_Examples" rel="nofollow">https://wiki.roll20.net/Macros_-_Pathfinder_Examples</a>
1424350046
Gen Kitty
Forum Champion
To properly make a game-specific macro for you, as Benjamin F says, we'll need to know your game system. It would be helpful to know if you're using a character sheet or just the raw Attributes & Abilities tab.
1424350241
Ziechael
Forum Champion
Sheet Author
API Scripter
Dual wield can a bit tricky to macro since there are so many rules regarding it's bonuses (or whatever the opposite is: penalty i suppose but i prefer anti-bonus; more dramatic) etc. As with Benjamin my 'expertise' is limited to 3.5 but if you are planning to use the macro for an individual token and can therefore manually apply the penalties as/when they change as part of the macro then it is certainly possible. I currently use this one for one my players (a psychotic barbarian dwarf who doesn't even have the two-weapon fighting feat!): !power --emote|@{selected|token_name} launches a series of attacks with both hands! --name|Dual Wield Attack --Primary Weapon Attack:|@{selected|token_name} attacks @{target|token_name} with their @{selected|weapon1name} rolling [[1d20]] + [[d0+@{selected|BAB}[BAB] +@{selected|weapon1stat}[Ability] +@{selected|size}[size] +@{selected|weapon1enh}[Weapon1 Enh] +@{selected|weapon1focus}[Weapon1 Focus] + ?{Flank (1=yes)|0}*2[Flank] +?{Other Att Bonus?|0} -4 ]] --Primary Weapon Crit?|@{selected|weapon1critmult}x damage on [[ @{target|armorclass} ]] or better (Confirm Crit = [[1d20-4 +@{selected|BAB}[BAB] +@{selected|weapon1stat}[Ability] +@{selected|size}[size] +@{selected|weapon1enh}[Weapon1 Enh] +@{selected|weapon1focus}[Weapon1 Focus] + ?{Flank (1=yes)|0}*2[Flank] +?{Other Att Bonus?|0} ]]). --Primary Weapon Damage|@{selected|token_name} hits for [[1@{selected|weapon1damage} +@{selected|weapon1damagestat}[Weapon1DamageStat] +@{selected|weapon1enh}[Weapon1 Enh] +@{selected|weapon1specialize}[Weapon1 Specialization] +?{Other Damage Bonus?|0}[Other Damage Bonus]]] damage or [[(@{selected|weapon1critmult})@{selected|weapon1damage}]] + [[d0+(@{selected|weapon1damagestat}[Weapon1DamageStat] +@{selected|weapon1enh}[Weapon1 Enh] +@{selected|weapon1specialize}[Weapon1 Specialization])* @{selected|weapon1critmult}]] + [[d0+?{Other Damage Bonus?|0}[Other Damage Bonus]]] damage if critical! --Off-Hand Weapon Attack:|@{selected|token_name} attacks with their @{selected|weapon2name} rolling [[1d20]] + [[d0+@{selected|BAB}[BAB] +@{selected|weapon2stat}[Ability] +@{selected|size}[size] +@{selected|weapon2enh}[Weapon2 Enh] +@{selected|weapon2focus}[Weapon2 Focus] + ?{Flank (1=yes)|0}*2[Flank] +?{Other Att Bonus?|0} -8 ]] --Off-Hand Weapon Crit?|@{selected|weapon2critmult}x damage on [[@{target|armorclass}]] or better (Confirm Crit = [[1d20-4 +@{selected|BAB}[BAB] +@{selected|weapon2stat}[Ability] +@{selected|size}[size] +@{selected|weapon2enh}[Weapon2 Enh] +@{selected|weapon2focus}[Weapon2 Focus] + ?{Flank (1=yes)|0}*2[Flank] +?{Other Att Bonus?|0} ]]). --Off-Hand Weapon Damage|@{selected|token_name} hits for [[1@{selected|weapon2damage} +(floor@{selected|weapon2damagestat}/2)[Weapon2DamageStat] +@{selected|weapon2enh}[Weapon2 Enh] +@{selected|weapon2specialize}[Weapon2 Specialization] +?{Other Damage Bonus?|0}[Other Damage Bonus]]] damage or [[(@{selected|weapon2critmult})@{selected|weapon2damage}]] + [[d0+((floor@{selected|weapon2damagestat}/2)[Weapon2DamageStat] +@{selected|weapon2enh}[Weapon2 Enh] +@{selected|weapon2specialize}[Weapon2 Specialization])* @{selected|weapon2critmult}]] + [[d0+?{Other Damage Bonus?|0}[Other Damage Bonus]]] damage if critical! I've put some of it in bold for you, 1 bit showing that you can use a targets armourclass as part of your output and the others showing the only 2 bits of information that need to be updated in this macro should our dwarf take the appropriate feats or decide to use 2 heavy weapons instead of a light off hand one... after all he is nuts! (these 'manual' bits could even be handled by the macro if needed but i couldn't be bothered to be honest...) Seems terrifying but since i use Diana's awesome 3.5 sheet most of the above is just calling on the required information to accurately calculate the attack and damage bonuses and even has sections related to critical hits/damage should that be required. I will point out that this is a power card which is an API feature for mentors but if you are a player in a game with a GM who has mentor they could easily install this script for you on the campaign as it is copy/paste enabled, no fiddly set up time at all. If API isn't a option most of the above can be stripped down and turned into a couple of neat macros that would give you appropriate output... But as with Benjamin, we would need to know your game system for more accurate help ;)
Thanks for the replies, hope I can actually give you some useful informations about the gameplay (not entirely sure tho, I just got invited by some friends who didn't add too much besides "make a character ready for sunday night". We're gonna play 3.5, with character sheet. My character is gonna have as weapon1 the main hand weapon (heavy pick) and as weapon2 the off-hand weapon (light pick), with a -2 penalty (or anti-bonus :) ) on both hands (so the Master decided). Thanks again for the help!
1424354176
Gen Kitty
Forum Champion
Then I bow to Ziechael and Benjamin because they're going to be current. I last played 3.5 something like 5-7 years ago. ^_^
1424355616
Ziechael
Forum Champion
Sheet Author
API Scripter
Ok, that helps a lot, since you are playing 3.5 most of my power card can be of use to you... there are a couple of ways to handle it on your sheet that can help remove the need to manually do anything at all other than trigger the macro. Make sure to put your weapons in slots 1 (primary) and 2 (offhand) and you can use the following as an attack macro (i'll give 2 option, 1 requires having your token selected and the other requires you to select your 'speaking as' or have your player named after your character): @{selected|token_name} launches a series of attacks on @{target|token_name} with both hands! Striking with their @{selected|weapon1name}: [[1d20]] + [[d0+@{selected|BAB}[BAB] +@{selected|weapon1stat}[Ability] +@{selected|size}[size] +@{selected|weapon1enh}[Weapon1 Enh] +@{selected|weapon1focus}[Weapon1 Focus] + ?{Flank (1=yes)|0}*2[Flank] +?{Other Att Bonus?|0} -2 ]] vs AC[[@{target|armorclass}]]. Following up with their @{selected|weapon2name}: [[1d20]] + [[d0+@{selected|BAB}[BAB] +@{selected|weapon2stat}[Ability] +@{selected|size}[size] +@{selected|weapon2enh}[Weapon1 Enh] +@{selected|weapon2focus}[Weapon2 Focus] + ?{Flank (1=yes)|0}*2[Flank] +?{Other Att Bonus?|0} -2 ]] vs AC[[@{target|armorclass}]]. ( note that the bold bits are your penalties for dual wield, these can be removed and handled elsewhere if desired which i'll cover later) gives you: (sorry, ran this in my test environment which only has 1 active token lol) I purposefully separate out the 'clean' roll from the bonus/penalty to easily identify whether a threat has been achieved but you can easily combine these into one result if desired. Using /em you could do: /em launches a series of attacks on @{target|token_name} with both hands! Striking with their @{selected|weapon1name}: [[1d20]] + [[d0+@{selected|BAB}[BAB] +@{selected|weapon1stat}[Ability] +@{selected|size}[size] +@{selected|weapon1enh}[Weapon1 Enh] +@{selected|weapon1focus}[Weapon1 Focus] + ?{Flank (1=yes)|0}*2[Flank] +?{Other Att Bonus?|0} -2 ]] vs AC[[@{target|armorclass}]]. Following up with their @{selected|weapon2name}: [[1d20]] + [[d0+@{selected|BAB}[BAB] +@{selected|weapon2stat}[Ability] +@{selected|size}[size] +@{selected|weapon2enh}[Weapon1 Enh] +@{selected|weapon2focus}[Weapon2 Focus] + ?{Flank (1=yes)|0}*2[Flank] +?{Other Att Bonus?|0} -2 ]] vs AC[[@{target|armorclass}]]. Which gives you: (by having your player name (set in the settings tab) as your character name you get a better output) My particular macro style relies on you having your token selected prior to using the macro for reference! Having established if you have hit or not you can then run another macro for damage (you could do this as part of the first macro and only take the result if you actually hit but i find that gets upsetting sometimes when you would have done max damage... if only you'd hit!). For damage the easiest way is to delete the damage macro on the sheet and just put the damage die needed for the weapons as in this screenshot: (forgot to screen shot the damage on the 2nd weapon, D'OH) Then running the following macro will give you your damage: @{selected|token_name} hits for [[1@{selected|weapon1damage} +@{selected|weapon1damagestat}[Weapon1DamageStat] +@{selected|weapon1enh}[Weapon1 Enh] +@{selected|weapon1specialize}[Weapon1 Specialization] +?{Other Damage Bonus?|0}[Other Damage Bonus]]] with their @{selected|weapon1name}. It is up to you if you want separate damage macros or combine them all in one, the same macro with some tweaks can represent either weapon (change all instances of 'weapon1...' to 'weapon2...'). Going back to dealing with the penalties, you could just as easily delete the bold bits in the first macro example and put the -2 in the 'weapon enh' box on the character sheet... then if you got a +1 weapon you could just change it to -1 and so on and the macro would handle the maths for you. Sorry if any of this is confusing, a lot of my work is cobbled together from various sources and isn't the prettiest... but it works and thats enough for me. If you want any more help with 3.5 just give me a PM and i'll do what i can, also check out the wiki specific areas for more info: Dungeons and Dragons 3.5 &lt;-- i've heard the guy who wrote most of it is very handsome!
1424356353
Ziechael
Forum Champion
Sheet Author
API Scripter
GenKitty said: Then I bow to Ziechael and Benjamin because they're going to be current. I last played 3.5 something like 5-7 years ago. ^_^ Never been bowed to before, could get used to that! Just for reference, this is the power card in action: If your GM has mentor level subscription it is well worth asking them to 'install' the script... it is literally cut and paste!
Ziechael said Never been bowed to before, could get used to that! Well take another, that was a lot better than anything I would have come with xD
1424358049
Ziechael
Forum Champion
Sheet Author
API Scripter
Benjamin F. said: Ziechael said Never been bowed to before, could get used to that! Well take another, that was a lot better than anything I would have come with xD Thanks :) I currently have in the region of 250 macros in my campaign so i've had my fair share of 'WTF' moments with them! Thanks to the kindness of the people on this site and the author of the 3.5 sheet no less i now have a reasonable understanding of the mechanics... although i lean towards the universal macros and have only just started to apply them as abilities to individual tokens lol.
wtf is up with the padding on the inline rolls... they do not look that way on my screen. Guess I should test in different browsers... o_0
1424362204

Edited 1424362243
Ziechael
Forum Champion
Sheet Author
API Scripter
HoneyBadger said: wtf is up with the padding on the inline rolls... they do not look that way on my screen. Guess I should test in different browsers... o_0 It may be because i had stretched out the chat window to get neater screenies of the macro... dunno, didn't even notice anything wrong with em lol (chrome Version 40.0.2214.111 (64-bit) mac OSx) ps. thanks for the Power Cards... my players love having something special to show off their spells and special attacks with :D
As an alternative option; if you just want to keep it a simple self-contained macro that doesn't rely on the character sheet, API, or attributes... (Like you might use in a one-shot or until you get more complex Macros setup...) /me stabs with his Short Swords! 19-20x2)! [FullRound] MainHand:[[1d20 + 6[BAB + STR] -2[Two-Weapon-Fighting] ]] for [[1d6 + 3[STR] ]] Dmg ...Crit Confirm:[[ 1d20 + 6[BAB + STR] -2[Two-Weapon-Fighting] ]] Addt'l Dmg:[[ 1d6 + 3[STR] ]] OffHand:[[1d20 + 6[BAB + STR] -2[Two-Weapon-Fighting] ]] for [[1d6 + 1[STR] ]] Dmg ...Crit Confirm:[[ 1d20 + 6[BAB + STR] -2[Two-Weapon-Fighting] ]] Addt'l Dmg:[[ 1d6 + 1[STR] ]]
Thanks everyone! I'm testing all the scripts right now. I appreciate the help a lot!!