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

I'm trying again to learn Macros but need help with a Home Brew Rule Macro for AD&D 2E.

1678097334

Edited 1678097437
Hi I have tried learning how to use Macros several times now, and tried to learn the various coding systems but my brain is just too old to hold the information... thankfully almost everything I've needed has already existed or I have been able to make basic changes to existing simple macros to get what I need. I am able to create simple attack macros for characters' pets and so on. But... it's been a good six months since I've needed to do that and what information I had managed to store is now a fleeting memory. I'm now trying to make what is probably a relatively simple macro (for someone who understands how to write them) for a home made rule I'm using in my heavily bastardised AD&D game. Spell Casters are allowed to try and cast certain spells without losing them from their memory by rolling a 1d20. The target is 13 + the spells level (1-9) The caster may have a roll bonus for high Int/Wis (depending on type of spell), lets say... +1 per point above 15.  The caster may also gain a bonus of +1 at 4th level, + 2 at 7th And there may be situational modifiers.  I believe that best the way to do this is to keep the target unmodified, and put all the +/- variable modifiers on the actual roll, and I kind of understand the various means of entering the data, but I just simply cannot get my head round the order stuff needs to go in, or how to add and subtract the various modifiers. Any help in how to do this would be great. Edit to add. I'm using the basic 2E characters sheet... if that makes a difference?
1678114871

Edited 1678115061
GiGs
Pro
Sheet Author
API Scripter
I don't know the sheet or the output format you want. But each modifier is doable. Also, you'd need to include the names of the attributes. Stat bonus: +{@{selected|STAT}-15,0}kh1 This can be INT or WIS, and I don't know the attribute name for each, so you might need a query to select them or it might be set by the spell. Caster Level Bonus: +{ [[{0,floor((@{selected|level}-1)/3)}kh1]] ,2}dh1 That last uses keep highest and keep lowest to ensure the modifier stays with 0 and 2. Both examples above use imaginary stats, since I don't know the sheet. The caster spell level needs an attribute name which could be of any of 1-9 stats, possibly doubled for arcane or divine spells, and I don't know of them. But calculating the modifier is easy enough: 13 + @{selected|whatever the spell level is} Aain you might use a query to choose the spell level. A 'basic' roll would then look something like /roll {1d20+ {[[{0,floor((@{selected|level}-1)/3)}kh1]],2}dh1 + {@{selected|STAT}-15,0}kh1,1d0}>[[13+@{selected|SPELL LEVEL ATTRIBUTE}]] You might put that monstrosity in a rolltemplate possibly with each separate item given its own row. Also, you'd need to define how attributes are being selected - does the player answer queries for them or do they have separate entries for each spell with them built in?
1678114994
GiGs
Pro
Sheet Author
API Scripter
PS: it's not surprising you struggled with that macro. There are probably other ways to do it than I suggested, but none of them are going to be simple.
1678115058
Gauss
Forum Champion
This should be doable. But, yes, we need to know which character sheet. Different character sheets have different names for attributes so we need to know specifically which sheet you are using. There are two 2nd edition sheets, please screenshot your sheet so we can identify which one you are using. 
1678117103

Edited 1678117944
Thanks guys. Yeah... sorry, its what I thought was the basic 2E, it's called "Advanced Second Edition (Simple Sheet)" Sorry, I didn't realise it would be this messy... Output format can simply be the 2Edefault template, a nd it doesn't need to be clever enough to announce "Success" or "Failure" The output can simply be "selected character attempts to cast a XX level spell: Target = YY, Roll = ZZ" It is a lot more about speed and convenience than it is about looking pretty. The stat bonus can be input manually by the user. Because it's not a standard modifier on the sheet, (+1 per stat above 15 INT for Wizard, WIS for Priest, but that would include more variables asking for type of spell and I don;t want to make it any more complex than it needs to be) And a "Condition/Situational" modifier would be manual. The escalating bonus at incremental levels is probably the thing that scares me most! Thanks for the help.