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
Siminic
Junior Member
 
Join Date: Apr 2011
Posts: 10

Old June 11th, 2011, 12:58 PM
Want to swap INT modifier for DEX modifier for a ranged attack weapon...

I have an eval script set to post-attributes, with the following:

Code:
wAttBonus.value = hero.child[Attack].field[tAtkRanged].value
 - hero.child[aDEX].field[aModBonus].value
 + hero.child[aINT].field[aModBonus].value
The part after the = is evaluating fine, but I have no examples that I can find in the tutorial, help, or in the forums for what the code in front of the = should look like.

Suggestions? Improvements to my thinking? I realize I could modify the overall range attack bonus, but want it specific to this weapon.
Siminic is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old June 11th, 2011, 02:57 PM
Quote:
Originally Posted by Siminic View Post
I realize I could modify the overall range attack bonus, but want it specific to this weapon.
So the above eval script is running on a specific weapon then. If that is the case you can just use something like field[wAttRange].value for before the equal sign. I am also thinking you will need to a much later phase/timing as your change could get overridden still.

I am only about 90% sure that is the correct field name. To double check you can add the weapon to a character and then Right click on the "?" to get a list of choices. Take the one called something like "View Field names". Sorry not near HL right now.

If you don't see that you have to go to the develop menu, make sure the first option, "Enable Data File Debugging" is checked. This way you can start seeing the name of the fields on Things and their values. Really helpful. Plus this lets you do a Ctrl-R which does a quick reload of the data set. Also very helpful when making changes.

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   #2 Reply With Quote
Siminic
Junior Member
 
Join Date: Apr 2011
Posts: 10

Old June 12th, 2011, 09:15 AM
Played around with it a bit more. Thanks for the suggestions.

In the end, I couldn't seem to force the wAttRanged field to get updated last, even running it with a 11111 priority in the render phase, so as a workaround, had it add as a attack bonus based on the difference:

Code:
field[wAttBonus].value = hero.child[aINT].field[aModBonus].value
 - hero.child[aDEX].field[aModBonus].value
Works for positive and negative values. The idea is actually based on a user weapon you created (TouchAttacks.user), so I can send you the code if you want.
Siminic is offline   #3 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 03:17 PM.


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