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 .
×
May your rolls be chill this holiday season!
Create a free account

Life Transference Macro?

So I'm new to the macro side of Roll20, I was wondering if there's a way to write a macro for the spell life transference. If you're not familiar with the spell it's a 3rd level spell, and basically I (the caster) take 4d8 necrotic damage, and choose someone within 30 feet of me to heal twice the damage I take. The scaling increases the damage taken by 1d8 per spell slot above 3rd level. It's kind of like Vampiric Touch, but it's a melee spell attack that does 3d6 necrotic damage to an enemy, and then it heals me half the amount of damage. increasing a 1d6 for every level above 3rd. In either instance, it would be a nice feature to have a drop down box to select what level it's being cast at to add the additional dice too. Basically, is there a way to take the damage output and use that in an equation to either double or half? I did see a command for rounding down when halving I'm pretty sure.
1588061310
Ziechael
Forum Champion
Sheet Author
API Scripter
You can't reuse rolls natively without the API (required a pro subscription on the game creators account and the installation of an appropriate API script). However if you are happy to do some basic math yourself: /em transfers some life energy to another, @{target|token_name} heals for [[ [[ 4 + ?{Spell Level|3,0|4,1|5,2|6,3|7,4|8,5|9,6} ]]d8 *2 ]] while @{selected|token_name} takes half that amount as damage. /em attacks with a hand sheathed in dark energy for [[ 1d20 + @{selected|spell_attack_bonus} ]] vs AC. If they hit they deal [[ [[ 3 + ?{Spell Level|3,0|4,1|5,2|6,3|7,4|8,5|9,6} ]]d6 ]] necrotic damage, healing half that amount themselves. Macros also can't change attribute values without the API for reference.
Thanks for the help, I like how that works. So is the DM (creator of the game) the only one that has to have an API script installed to be able to use the rolls natively?
1588063197
Ziechael
Forum Champion
Sheet Author
API Scripter
To access the API for a game the creator of that game needs to be a Pro subscriber yes, they can then install a relevant script that allows the reuse of rolls (Power Cards is the only one that springs to mind but there may be others out there). The API can do many many many other things to simplify the gaming experience too but for most things it is a luxury if not down right overkill lol.
Ok, thanks so much for your help.