Member
Join Date: Apr 2016
Posts: 30
|
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 |
#1 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Code:
if (hero.child[ArmorClass].field[BonEnhance].value >= 1) then hero.child[ArmorClass].field[tACTouch].value -= hero.child[ArmorClass].field[BonEnhance].value endif |
#2 |
Member
Join Date: Apr 2016
Posts: 30
|
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 by DreadKatak; April 27th, 2016 at 08:21 PM. |
#3 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
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.
|
#4 |
Member
Join Date: Apr 2016
Posts: 30
|
Quote:
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 by DreadKatak; April 27th, 2016 at 08:22 PM. |
|
#5 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Bugs should be reported here: http://www.wolflair.com/report-pathfinder-bug/
A mechanic is just an item in the editor that is always bootstrapped if it's source is enabled. You'd do it the same way as on your faction, you just don't have to worry about someone taking that faction for it to work, it just runs. |
#6 |
Member
Join Date: Apr 2016
Posts: 30
|
Alright, I reported it officially.
Thanks for the help! I'll go ahead and try out the mechanic method now. |
#7 |
|
|