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 .
×

Defender Macro

Hey, I have been attempting to make a macro for one of my players but I am pretty bad at this sort of thing (Furthest I got was trying to makeshift one by changing a Divine Smite macro and placing it in the magic bonus area to no avail) who has a Defender - as he always seems to forget to declare the # of AC he is giving himself or vice versa how much Magic bonus hes getting for his attacks. Is there a way to create a macro asking him to make that decision and possibly change his AC and attack/damage rolls accordingly?
1565429424
Ziechael
Forum Champion
Sheet Author
API Scripter
You'd need the API (pro level perk on the game creators part) to actually change  attributes with a macro but you could certainly represent the change visually in a chat output with a standard macro: [[ @{De Fender the Defender|armorclass} + ?{Additional AC|0} ]] That basic example would output the new AC (note that the attribute name likely isn't correct as I'm not familiar with the sheet in question... I'm assuming D&D 4e by the context?). If you have an example of the current macro for their attacks I'd be happy to show you how to incorporate a damage increase into that too... it's much the same concept ( + ?{Damage bonus|0} )... if the ability being used affects both things simultaneously we can limit the number of queries to answer too but a bit more info and a current macro example would be a huge help :)
I'm using D&D 5e actually, we put ?{Divine Smite Level|Level 1, 2d8|Level 2, 3d8 |Level 3, 4d8|Level 4, 5d8|Level 5, 6d8} into the global damage modifiers so it can be turned off and on.When I said I makeshift one by changing the divine smite I changed it to something like this: ?{Defender AC|3 AC, 0 |2 AC, 1 |1 AC, 2 |0 AC, 3} and attempted to put it into a magic bonus section. How would I be able to implement the API in a D&D 5e Character sheet as I am not familiar with it?
1565514172
Ziechael
Forum Champion
Sheet Author
API Scripter
Ah I see, 'Defender' the item type, not the class... my bad :) I expected the following to work: Putting [[?{AC Boost|0,3|1,2|2,1|3,0}]] In the attack/damage modifier or just the magic bonus on the item itself and AC boosted by [[ 3 - ?{AC Boost|0,3|1,2|2,1|3,0}]] until the start of the next turn. In the attack description to give a non-API visual representation of the boost (the API would require that the creator of the game has a Pro subscription). However, it doesn't work... the sheet simply doesn't see queries in those areas for some bizarre reason lol... the description bit works at least :/ I then thought of putting the main query as a bespoke attribute and calling that as part of the attack/damage bonus to see if it would resolve it that way, no dice... literally... it just ignored it, stupid sheet! Finally, I'd suggest something nice and simple that requires a little bit of manual mathematics, put this into the attack description: Attack/Damage boosted by [[ ?{AC Boost|0,3|1,2|2,1|3,0} ]] and AC boosted by [[ 3 - ?{AC Boost|0,3|1,2|2,1|3,0} ]] until the start of the next turn.
1565515483
Ziechael
Forum Champion
Sheet Author
API Scripter
Meh, it's a hack but if you have the reduced version of the final suggestion above as part of the weapon attack description and the following as global attack/damage modifiers (with auto roll damage enabled) you'll only have one query to answer and enough information to streamline battle:
1565537291
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
That's pretty clever. I knew roll query results are repeated in a macro, but it's never occurred to me to record them like that on the sheet.