Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
wolfang237
Member
 
Join Date: Dec 2012
Posts: 40

Old September 27th, 2016, 01:00 PM
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.
wolfang237 is offline   #11 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old September 28th, 2016, 12:45 PM
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.
ShadowChemosh is offline   #12 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 05:50 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.