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

Need Help making warlock macro

1574948783

Edited 1574948865
Greetings! I'm not even sure if this is possible to do, I'm super stupid with macros. The idea is to have a cascading option choice for attacking with a hexblade pact weapon. (Longsword) --> ask 1h or 2h--> roll to hit using  {{query=1}} ?{Advantage?|Normal Roll,&#123&#123normal=1&#125&#125 &#123&#123r2=[[0d20|Advantage,&#123&#123advantage=1&#125&#125 &#123&#123r2=[[1d20|Elven Accuracy,&#123&#123advantage=1&#125&#125 &#123&#123r2=[[2d20k1|Disadvantage,&#123&#123disadvantage=1&#125&#125 &#123&#123r2=[[1d20}   (THANK YOU MOHKAN! ) --> damage is rolled and then--> ask for Green Flame Blade? / Eldritch smite? / Staggering Smite?---> click one or all to work in tandem with previous roll. Thank you for your big brains and time, again, not sure if it's even possible.  I'll keep poking at it, in the meantime.
1574985759
GiGs
Pro
Sheet Author
API Scripter
You'll have to explain the game effects of those three powers, we dont all play the same games. Do they add to attack roll, or damage roll, or both, and how much? That said, this part is a problem ask for Green Flame Blade? / Eldritch smite? / Staggering Smite?---> click one or all to work in tandem with previous roll. There's no way to a do dropdown in roll20 which gives multiple options, where you can pick more than one. So this would require 3 separate queries, one for each option. In addition to the advantage query, you'd then be having to make 4 selections every time you attack. 
1575017167
Ziechael
Forum Champion
Sheet Author
API Scripter
There is also the consideration of which sheet, if any, you are using. Some of them have resources that can be drawn upon to stream line these kind of things. With some serious nesting and branching logic you could get something down to 2 queries (3 including the 1-2H damage) that would then expand to 3-4+ depending on your answers... I won't lie to you, it'll get ugly REAL quick and would be complex to update later on. It's all doable though... and default values would make a standard attack be a few enter clicks away and wouldn't necessarily slow down play. I'm happy to help guide you through but would need to know the sheet, also single class versus multiclass?
1575096152

Edited 1575104572
Thank you for getting back to me, and apologies for the delayed response. I asked my DM what sheet we're using, to be extra sure, and it's the "D&D 5E by Roll20". At the end of the day I realized the only thing I've been trying to secure out of this, is to tidy up a colossal page worth of damage numbers from various sifting key clicks through a quagmire of attack options, into a neat "here it all is in one go" button. If there is a way to simply get the 1h?/2h? up and running, I will happily settle for that as it will cut all of the shenanigans in half. That being said, I will call shotgun for anyone who wants to take a crack at it, so here's the beef: I am swinging away with a level 9 Hexblade warlock with 20 charisma(+5) from 5e Xanathar's, with improved pact weapon (longsword....at the moment?!?), giving it a base +1 to Attack/Damage rolls. If Hex is up that's another +4(Proficiency) to dmg. Base weapon damage is 1d8+5+1 damage crit on 20 or 1d10+5+1 2handed (These go to 5e.tools) Green flame blade , +1d8 Fire to main target, 1d8+5 Fire to another target within 5 feet Eldritch Smite , +6d8 Force damage, no saves & Staggering Smite , +4d6 Psychic, triggers wisdom save With the Hex in play, the previous +4(Proficiency)  to damage is added once, but the crit range is now brought down to 19-20   Happy with the previously stated drop down macro for Disadvantage/Attack/Advantage/Elven Accuracy as that already cuts out an extra roll to match numbers to. I had thought that something like a stacked macro would be possible, but as I said before, I'm out of my depth here. My bad if I missed something, will get back asap to remedy that if needed.  May the speed of the God(s) of your choice be with you.
That macro looks super clunky, try this instead  (?{Roll Type?|Normal, 1d20cs>20|Advantage, 2d20d1cs>20|Disadvantage, 2d20KL1cs>20})
1575105105

Edited 1575105227
Unless I'm not supposed to place that in rtype, it just broke my in game display roll to appear as the top 3mm of the number window, and changed the roll to a normal disadvantage/roll/advantage with no 3rd D20 in there.  Making it an Ability simply rolls out  ( 2d20d1cs>20) in chat
1575141983
Ziechael
Forum Champion
Sheet Author
API Scripter
The Roll20 5e OGL sheet should do a lot of that work for you. You can set the adv. rules on your sheet settings to be queried rather than always on or off, that will reduce some of your macro woes in one fell swoop... the rest should be pretty easy to accomplish with a query or two (or three or four depending on the outcome of query 1 or 2). Will take a crack it as/when I get chance and see what I can come up with with as much automation for progression as possible... watch this space (well don't, it might take me a couple of days to get around to it and I hate for you to starve!)
1575187514

Edited 1575188404
Ziechael
Forum Champion
Sheet Author
API Scripter
Ok, you are in luck... the kids woke me up stupidly early this morning and my brain couldn't stop supplying me with solutions to your various needs, so here you are. As promised it isn't pretty but it is fully functional and only requires that you answer 4 queries, rapid enter pressing will result in a default attack with no advantage, no hexblade curse, 1H damage and no spells active (1H/2H can be easily swapped around if your default is 2H, that section is highlighted in bold): @{Warlock|wtype}&{template:atkdmg} {{mod=+[[@{Warlock|charisma_mod}[CHA] + @{Warlock|pb}[PROF]]]}} {{rname=Longsword (Pact)}} {{r1=[[@{Warlock|d20}cs>[[20-?{Hexblade Curse|No,0|Yes,1}]] + @{Warlock|charisma_mod}[CHA] + @{Warlock|pb}[PROF]]]}} @{Warlock|rtype}cs>20 + @{Warlock|charisma_mod}[CHA] + @{Warlock|pb}[PROF]]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d ?{2H|No,8|Yes,10} + @{Warlock|charisma_mod}[CHA] + [[?{Hexblade Curse}*@{Warlock|pb}]][HEXBLADE] ]]}} {{dmg1type=Slashing}} ?{Attack Spell|None,0 {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[1d?{2H}[CRIT]]]}} {{crit2=[[0[CRIT]]]}} 0 {{desc=}} {{spelllevel=}} {{innate=}} |Green Flame Blade,{{damage=1}} {{dmg2flag=1}} {{dmg2=[[ [[ floor((@{Warlock|level}+1)/6) ]]d8 ]]}} {{dmg2type=Fire}} {{crit1=[[1d?{2H}[CRIT]]]}} {{crit2=[[ [[ floor((@{Warlock|level}+1)/6) ]]d8[CRIT] ]]}} 0 {{desc=+[[ [[ floor((@{Warlock|level}+1)/6) ]]d8+@{Warlock|charisma_mod} ]] fire damage to target within 5 feet}} {{spelllevel=}} {{innate=}} |Eldritch Smite,{{damage=1}} {{dmg2flag=1}} {{dmg2=[[6d8]]}} {{dmg2type=Force}} {{crit1=[[1d?{2H}[CRIT]]]}} {{crit2=[[6d8[CRIT]]]}} 0 {{desc=}} {{spelllevel=}} {{innate=}} |Staggering Smite,{{damage=1}} {{dmg2flag=1}} {{dmg2=[[4d6]]}} {{dmg2type=Psychic}} {{crit1=[[1d?{2H}[CRIT]]]}} {{crit2=[[4d6[CRIT]]]}} {{save=1}} {{saveattr=Wisdom}} {{savedesc=Fail = Disadvantage on attack/ability rolls and can't take reactions until the end of its next turn}} {{savedc=[[[[(@{Warlock|spell_save_dc})]][SAVE]]]}} {{desc=}} {{spelllevel=}} {{innate=}} } {{globalattack=@{Warlock|global_attack_mod}}} {{globaldamage=[[0]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Warlock|global_damage_mod_type}}} ammo= @{Warlock|charname_output} And for visibility: @{Warlock|wtype}&{template:atkdmg} {{mod=+[[@{Warlock|charisma_mod}[CHA] + @{Warlock|pb}[PROF]]]}} {{rname=Longsword (Pact)}} {{r1=[[@{Warlock|d20}cs>[[20-?{Hexblade Curse|No,0|Yes,1}]] + @{Warlock|charisma_mod}[CHA] + @{Warlock|pb}[PROF]]]}} @{Warlock|rtype}cs>20 + @{Warlock|charisma_mod}[CHA] + @{Warlock|pb}[PROF]]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d ?{2H|No,8|Yes,10} + @{Warlock|charisma_mod}[CHA] + [[?{Hexblade Curse}*@{Warlock|pb}]][HEXBLADE] ]]}} {{dmg1type=Slashing}} ?{Attack Spell|None,0 {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[1d?{2H}[CRIT]]]}} {{crit2=[[0[CRIT]]]}} 0 {{desc=}} {{spelllevel=}} {{innate=}} |Green Flame Blade,{{damage=1}} {{dmg2flag=1}} {{dmg2=[[ [[ floor((@{Warlock|level}+1)/6) ]]d8 ]]}} {{dmg2type=Fire}} {{crit1=[[1d?{2H}[CRIT]]]}} {{crit2=[[ [[ floor((@{Warlock|level}+1)/6) ]]d8[CRIT] ]]}} 0 {{desc=+[[ [[ floor((@{Warlock|level}+1)/6) ]]d8+@{Warlock|charisma_mod} ]] fire damage to target within 5 feet}} {{spelllevel=}} {{innate=}} |Eldritch Smite,{{damage=1}} {{dmg2flag=1}} {{dmg2=[[6d8]]}} {{dmg2type=Force}} {{crit1=[[1d?{2H}[CRIT]]]}} {{crit2=[[6d8[CRIT]]]}} 0 {{desc=}} {{spelllevel=}} {{innate=}} |Staggering Smite,{{damage=1}} {{dmg2flag=1}} {{dmg2=[[4d6]]}} {{dmg2type=Psychic}} {{crit1=[[1d?{2H}[CRIT]]]}} {{crit2=[[4d6[CRIT]]]}} {{save=1}} {{saveattr=Wisdom}} {{savedesc=Fail = Disadvantage on attack/ability rolls and can't take reactions until the end of its next turn}} {{savedc=[[[[(@{Warlock|spell_save_dc})]][SAVE]]]}} {{desc=}} {{spelllevel=}} {{innate=}} } {{globalattack=@{Warlock|global_attack_mod}}} {{globaldamage=[[0]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Warlock|global_damage_mod_type}}} ammo= @{Warlock|charname_output} Caveats: You need to enable the following options on your character sheet - Set roll queries to 'Never Roll Advantage' Set core die roll to ?{Advantage|No,1d20|Yes,3d20kh1|Disadvantage,2d20kl1} This will affect all attack rolls, but I would assume you are OP enough to never use an attack that doesn't benefit from Elven Accuracy? It should scale as you level since Eldritch Smite is maxed out but if, by some crazy rule, you gain higher level spell slots it could be upgraded to account for that Happy to answer any and all questions.
I feel like the guy who sits down to listen to the Maxell tape. That is insane! Thank you!  The only question I can think of at the moment would be what/where do I change/place, to represent a magical +1/2/3 weapon, potentially?  
1575277350
Ziechael
Forum Champion
Sheet Author
API Scripter
Happy to help, was a fun exercise (well, my idea of fun anyway!). To add magic weapon bonus (Which I totally forgot to consider!) you can update the first section (ie. the bit before the query kicks in) to the following: @{Warlock|wtype}&{template:atkdmg} {{mod=+[[@{Warlock|charisma_mod}[CHA] + @{Warlock|pb}[PROF]]]}} {{rname=Longsword (Pact)}} {{r1=[[@{Warlock|d20}cs>[[20-?{Hexblade Curse|No,0|Yes,1}]] + @{Warlock|charisma_mod}[CHA] + @{Warlock|pb}[PROF]]]}} @{Warlock|rtype}cs>20 + @{Warlock|charisma_mod}[CHA] + @{Warlock|pb}[PROF]  + 1[MAGIC]  ]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d?{2H|No,8|Yes,10} + @{Warlock|charisma_mod}[CHA] + 1[MAGIC] + [[?{Hexblade Curse}*@{Warlock|pb}]][HEXBLADE] ]]}} {{dmg1type=Slashing}} You'll need to update that each time your weapon improves but I'm guessing that doesn't happen often. Alternatively, you could replace the 1 with something like @{Warlock|magicweaponbonus} and add a manual attribute to your sheet called magicweaponbonus. Then you would just need to update that attribute and the macro would take care of the rest. Did forget to mention (but assume you don't need telling anyway, but always pays to be sure) that you need to replace 'Warlock' with your character name OR you can remove all of the Warlock| (<-- thats a pipe '|') calls completely if you are housing the macro as an ability of the sheet itself.
Perfect! Again, thank you very much! And my group and I thank you for saving the chat space. This is awesome! Can't state that enough!
1575360270
Ziechael
Forum Champion
Sheet Author
API Scripter
You are most welcome, hopefully a lot of the 'lessons' here are clear enough to help your understanding of the eldritch nature of query nesting but if you ever want some of the nuances explained I'm always happy to help. Chat menus are the go to these days for space saving chat output but you can't beat a good ol' fashion nested query for those niche 'quality of life' moments :) More than anything, however, this has given me the push I needed to make my next character a Warlock lol.