Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
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 |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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 |
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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).
|
#3 |
Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
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 |
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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. |
#5 |
Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
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. |
#6 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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. |
#7 |
|
|