Member
Join Date: Dec 2012
Posts: 40
|
I have some code here meant to buff Attack, Saves, and add a dodge bonus to armor class:
~ If we're disabled, do nothing doneif (tagis[Helper.SpcDisable] <> 0) doneif (field[abilActive].value = 0) ~ spell adjustment should not stack. doneif (hero.tagis[Hero.Hasted] <> 0) ~first we calculate the base tier if (#tiereffect[] = 1) then field[abValue].value += (#tiereffect[]) - 1 else field[abValue].value += (#tiereffect[]) - 2 endif ~then we calculate combat bonuses field[abValue4].value += .5 * field[abValue].value field[abValue5].value += round(field[abValue4].value,0,1) ~then we input the combat bonuses hero.child[Attack].field[Bonus].value += 1 + field[abValue5].value hero.child[ArmorClass].field[tACDodge].value += 1 + field[abValue5].value hero.child[svRef].field[Bonus].value += 1 + field[abValue5].value For some reason, the highlighted code isn't working. Even though the syntax is the same, the bonus isn't being applied to attack: only to Dodge and Reflex. #applybonus[tAtk, hero.child[Attack], field[abValue5].value] doesn't work, either. It's like nothing I do in this Eval Script will affect the Attack pick. It's slightly infuriating. Last edited by wolfang237; September 27th, 2016 at 01:09 PM. |
#11 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
You didnt list the timing of your script. you could be running to late to affect the attack values....
Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#12 |
|
|