• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Improved Weapon Finesse Feat

mbran01

Well-known member
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.
 
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
 
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).
 
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
 
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:
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.
 
Back
Top