• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

AC Enhancement bonus applying to Touch AC in error

DreadKatak

Active member
I am using the Unchained Automatic Progression (no magic item) ruleset, but there is apparently an issue with Armor Attunement enhancement bonus applying to Touch AC.

This eval script works for my needs, but any suggestions on how to improve it?

I know the following is a hackish way around the current Enhancement bonus to AC applying to Touch AC bug, but here it is:

Post-levels, 11000

Code:
~ Don't do anything if Armor Attunements don't exist yet
  doneif (hero.childlives[ABPAttune] = 0) 


~ Add to our tACArmor  and tACFlat values only, and NOT tACTouch

If (hero.child[ArmorClass].field[BonEnhance].value >= 1) then

   if (hero.child[ArmorClass].field[BonEnhance].value = 1) then
      hero.child[ArmorClass].field[tACTouch].value -= 1
   elseif (hero.child[ArmorClass].field[BonEnhance].value = 2) then
      hero.child[ArmorClass].field[tACTouch].value -= 2
   elseif (hero.child[ArmorClass].field[BonEnhance].value = 3) then
      hero.child[ArmorClass].field[tACTouch].value -= 3
   elseif (hero.child[ArmorClass].field[BonEnhance].value = 4) then
      hero.child[ArmorClass].field[tACTouch].value -= 4
   elseif (hero.child[ArmorClass].field[BonEnhance].value = 5) then
      hero.child[ArmorClass].field[tACTouch].value -= 5
    endif

endif

I tried to use the #applypenalty macro, but it does not work properly for this.
 
Code:
if (hero.child[ArmorClass].field[BonEnhance].value >= 1) then
  hero.child[ArmorClass].field[tACTouch].value -= hero.child[ArmorClass].field[BonEnhance].value
  endif
 
Believe it or not, I had it that way originally, but I went off on a scripting tangent trying to fix something else in timing (turned out that it wasn't timing-- the thing I was strapped to was applying 6 times).

At this point I forgot why I wanted to use fixed values, so I suppose I'll use this suggestion to clean it up a bit.

I take it that this is pretty much the best way to do this?
Any suggestion on a good place to put this eval script?

Right now I have it slapped on a Faction that I am using for some House Rules.
 
Last edited:
I'd put it on a mechanic. Also if you think this is being caused by a bug in the rules, make sure you report it.
 
I'd put it on a mechanic. Also if you think this is being caused by a bug in the rules, make sure you report it.

Ok, I reported it here. Not sure if that is the correct place or not.

If it's not too much trouble, could you please provide an example of using this script in a mechanic?

I have yet to work on a mechanic and my brain is taxed just trying to get this little tweak fixed with my very limited Hero Lab knowledge.
 
Last edited:
Back
Top