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

Negative Ac and macro

So I am trying to automate some of the functions to leave more room for character role playing, and combat, while an integral part of the game, is really a way to bridge and instigate interaction, not the goal of the game. A large combat can take quite a while so I am trying to shorten things. Well, I made a macro that would calculate hits quickly. /em @{selected|token_name} нападение! @{target|token_name} if {[[1D20 + (?{Strength To Hit Adl|0} + ?{Magic Adj|0})]]} >={([[@{selected|bar3} - (@{target|bar2}]]))} Hit! /w gm [[1d100]] The problem, if the @{target|bar2} is less than zero , the macro locks up and gets stuck on the "click on a target" box. How do I make this work for AC below zero? This is crucial for anything over about 4th level in 2E.
1400513854
Pat S.
Forum Champion
Sheet Author
{([[@{selected|bar3} - (@{target|bar2}]]))} The dice roller doesn't like doubled expressions and such. You have it trying to subtract a negative aka - - #. Now if you could figure out how to add the negative number it would work aka + - # I wish I could help.
Yeah, I know that would work, but then I would need two macros and one of the joys is hearing the sound of fear when a player hits a character and is surprised to find an 18 doesn't hit that monster. -(-1) is +1 so there must be a way to do this other than "Hits AC:" & "target AC:", which is how I do it now.
1400550246

Edited 1400550351
Gold
Forum Champion
Converting 1E / 2E AC into Ascending AC is remarkably easy... have you considered flipping it? It makes higher AC the better AC, and makes hit calculations a bit more straight-forward. Tends to work better with macros, at least it makes the math quite simple addition, eliminating negative numbers (except as you need the negative AC's to convert). An OSR clone game that uses Ascending AC (and is based on old school D&D, but for this change) which explains how to calculate or convert it is, Castles & Crusades. Pathfinder and other post-2E games also tend to use Ascending. So, some 2E and earlier players have back-converted this more modern method and found it is 100% compatible with old-school 2E. I've played lots of 2E games on here that use Ascending AC and still consider the game system 2E. Basic explanation of the method: just take the difference between that PC's AC, and 10. Add that number to 10. It is their Ascending AC. Example, AC 5 in 2E, would be AC 15 in Ascending AC method. AC -2 in 2E, would be AC 22 in Ascending AC. Now the attacker just adds all their bonuses to their hit roll, and if their number exceeds the Ascending AC, it is a hit. If their AC is 22 (the very good AC formerly known as -2), then you will need a modified 22 or higher to hit. It's the same conclusion, same result, and almost the same math as THAC0 (2E), but without the Zero as the balance point that tips from positive to negative.
I think I came up with a workaround, I is not as pretty as I would like, but it does the job. /em @{selected|token_name} attacks @{target|token_name} hits AC: [[@{selected|bar3} - (1d20 + ?{Strength To Hit Adl|0} + ?{Magic Adj|0})]] /em @{target|token_name}'s AC: @{target|bar2} /w gm [[1D100]] As you know Gold some of my players are confused much of the time, this makes it a bit easier to manage and does not introduce any concepts to translate. By definition, people who have been playing D&D for almost forty years are around sixty and some people do not handle change very well...
I ran into this same issues when working with macros. I have since gone into using the API scripting to do these kind of things as the API doesn't care what the value of bar# is, it just sets it when and how told. The only way to really handle this is with conditional logic, which you just can't get in the macro space.
I haven't used Thac0 in a long time but isn't it easiest to just use Thac0 - d20 +modifiers = AC hit. So in roll20 terms something like, [[@{selected|Thac0} -1d20 +?{Attack Modifier|0}]] = AC hit That way the players don't know or have to select the targets AC.
1400740598

Edited 1400855918
[Edited out by Moderator] As for macro math, i got one from Phnord Prephect and it's worked well for me. [[-1*{1d20+modifier-THAC0}]] The number it gives you, is the AC you've hit. I haven't started trying to use targeted macros or any of that jazz, so i can't help you there. But the basic formula should plug in fairly easily to whatever macro you want to make. Just make sure your "d20+mod-thac0" is calculated before it's multiplied by -1 and you should have what you're looking for.
May I generally suggest that personal preference over game mechanics be left to different forums? The topic is a mathematical problem and suggestions for how to solve it; not which system is better. Please leave the choice of system to the GM and help with the question at hand. Thanks all :)
1400836003
Dylan G.
Pro
Marketplace Creator
Sheet Author
I run AD&D 2E and ran into this problem myself a while ago. The solution I came up with was as follows: For my own purposes, I wanted to make a macro that could go across all tokens and automatically give me success or failure on a hit roll, but I didn't want the players to be able to see opponent ACs (though I admit they can figure them out on their own after a few hits). To this end, I made sure each character has an AC attribute and a ThAC0 attribute. This requires that I make character sheets for all my different monster types and attach tokens to them, increasing setup time, but I archive them when I'm not using them and it is leading to my having a library of ready-made adversaries. (Also: when you want to create a random opponent on the fly for whatever reason, you can totally link the token with a sheet that has similar stats. If the party doesn't have the monster in their journal, the name won't pop up in the turn order so you don't have to worry about weird monster names showing up). Now, at this point, we run into the problem of negative AC. In AD&D 2E, you basically find your target number by subtracting the target's AC from your ThAC0. Logic says the macro for this should be something along the lines of /r 1d20>[[@{ThAC0}-@{AC} BUT, as we have established, negative ACs mess this up. However, you can ADD the AC to your roll, and it works out just fine. Imagine the following: The target's AC is -4, and your ThAC0 is 15. This means you have to roll a 19 or better to hit. Assuming you DO roll a 19, it should look something like this: -4+19>15. Since addition is magical and works in any order, this effectively means you are subtracting 4 from your roll, resulting in the 15 you need to beat your ThAC0. Normally, this would be 15-(-4)=19 for your TARGET, so it means the same thing. Just to double check, let's run this with a positive AC of 6. Normally you'd subtract this from ThAC0 to find your target (15-6=9), but instead you're adding it to your roll. Say you roll that 9 you would normally need to barely hit. This results in a total of 6+9=15. Holy smokes! It's your ThAC0! The macro I use goes like this: /gmroll {@{Target|AC}+1d20?{Modifier|+0}}>@{selected|ThAC0} The Player macro is actually much easier, since I didn't want to give them access to the opponent's AC anyway. That means I just need to see what AC they hit, so I can know if they beat the monster's AC or not. The resulting emote-based macro is pretty simple. /em hits an AC of [[@{selected|ThAC0}- {1d20?{Modifier|+0}} ]]! Really, these are both achieved by converting each variable into part of an algebraic equation. (Roll=ThAC0-AC) therefore (AC+Roll=ThAC0) and (Roll=ThAC0-AC) therefore (AC=ThAC0-Roll).
1400856083
Gid
Roll20 Team
I just went in and cleaned up a bunch of posts. Getting into winge battles over rule system preference is strictly against the Code of Conduct here. Keep it clean guys. This is your only warning.