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
mbran01
Senior Member
 
Join Date: Jan 2011
Location: Flint, MI
Posts: 100

Old August 9th, 2013, 09:24 PM
I am trying to script the above feat. What I have doesn't throw any errors at me but it also does not work. It should replace the str mod with the dex mod for damage on the chosen weapon.

post attributes/10000

Code:
      field[abValue].value += maximum(#attrmod[aDEX] - #attrmod[aSTR], 0)
      if (field[usrChosen1].ischosen <> 0) then
       perform field[usrChosen1].chosen.setfocus
       focus.field[wDamBonus].value += field[abValue].value
      endif
any insights would be appreciated.
mbran01 is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old August 10th, 2013, 08:33 AM
I'd put in some debugs to track what's happening:
Code:
debug "Dex: " & #attrmod[aDEX]
debug "Str: " & #attrmod[aSTR]
      field[abValue].value += maximum(#attrmod[aDEX] - #attrmod[aSTR], 0)
debug "abValue: " & field[abValue].value
      if (field[usrChosen1].ischosen <> 0) then
debug "Something was chosen"
       perform field[usrChosen1].chosen.setfocus
       focus.field[wDamBonus].value += field[abValue].value
      endif
Mathias is online now   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old August 10th, 2013, 08:36 AM
You view the debugs in the Develop menu...Floating Info Windows...Show Debug Output (You'll need to turn on Develop menu...Enable Data File Debugging before you can access the rest of the Develop menu, if you haven't done so already).
Mathias is online now   #3 Reply With Quote
mbran01
Senior Member
 
Join Date: Jan 2011
Location: Flint, MI
Posts: 100

Old August 10th, 2013, 04:54 PM
Well now I am really confused. Before it was not doing anything. Now when I try to choose a weapon it is throwing this at me:

Attempt to access pick information or behaviors for read-only thing 'wUnarmed'
- - -
Attempt to access 'focus' pick from script when no focus exists
- - -
Attempt to access non-existent field 'wDamBonus' from script with no ability to do so
- - -
Attempt to access 'focus' pick from script when no focus exists
- - -
Attempt to access non-existent field 'wDamBonus' from script with no ability to do so

the debug came back with this:


********** Start Evaluation Cycle **********

Dex: 2
Str: 0
abValue: 2
Something was chosen
mbran01 is offline   #4 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old August 10th, 2013, 05:06 PM
Check your settings on the editor tab itself - what is"Restrict First List To..." set to?

Looking at your script, what you're looking for is "All Picks on Hero".

You want to manipulate the weapons that have been added to the character. If you leave that at the default, you're looking at a read-only list of all possible weapons.

Or if this feat is supposed to pick a general weapon type, and then apply a bonus to all examples of that weapon on this character, change "Restrict First List To" to "All Things", and you'll need to re-write your script in a way that it can select from all possible weapons, and then goes to the character, and finds each example of that weapon on this character, and modifies it. For an example of something like that, look at the script on the Dazzling Display feat.

Last edited by Mathias; August 10th, 2013 at 05:17 PM.
Mathias is online now   #5 Reply With Quote
mbran01
Senior Member
 
Join Date: Jan 2011
Location: Flint, MI
Posts: 100

Old August 10th, 2013, 05:48 PM
Thanks that is what the problem was, it looks like. It's frustrating when I can't figure things out...it's even worse when it's something so simple. Oh well, can't know everything (but that hasn't stopped me from trying).

Anyway thanks for your help.
mbran01 is offline   #6 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old August 11th, 2013, 08:54 AM
The feat "Improved Weapon Finesse" to give Dex to damage is available for free download at HL Community Repository.

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   #7 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 04:26 PM.


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