• 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

Custom feat works with mundane weapons but not MW or +1

baradakas

Member
(Sorry if this is a re-post. I thought I posted it earlier tonight, but I don't see the message on the forum.)

I created an Improved Weapon Finesse which applies Dex to dmg instead of Str on Finesse and Light melee weapons when they are wielded in one hand.

Code:
~ Find all finnesse and light weapons and let them use Dex instead of
~ strength for damage if they are not being wielded with two hands.
foreach pick in hero from BaseWep where "Helper.Finesse | wClass.Light & !(fieldval:gIsEquip <> 0 & fieldval:wIs2nd <> 0)"
  perform eachpick.assign[DamageOpt.aDEX]
  nexteach

This works fine with a mundane rapier, including the 2-handed check. It does not apply the Dex to dmg with a Masterwork or Magic (+1) rapier.

Could anyone guide me to finding my error?

Thanks!
 
Should be this...

Code:
     foreach pick in hero from BaseWep where "Helper.Finesse | wClass.Light"
        perform eachpick.assign[DamageOpt.aDEX]
        nexteach
 
You don't list your timing which is VERY important for scripts. In this case you need to be like Pre-Level/10000 or lower.

I would check out my example of Fencing Grace for info.

If its not the timing then my guess is the logic check for being equipped is causing issues. Either way making sure the weapon is equipped is not needed or recommended. What if the person as several weapons they switch between on their character and they use a printed character sheet? Shouldn't the correct values display even when not equipped? Does the official feat for Weapon Finesse require you to have the weapon equipped before showing the Dex to attack?

Also I have an example of a working Improved Weapon Finesse feat available for download on the d20pfsrd HL Repository site. HERE is the direct download of the file.
 
Setting the timing to Pre-levels/100 fixed the problem, thanks.

It displays the benefit whether or not the weapon is wielded, and disables the benefits when the weapon is being wielded in both hands.

The GM has specifically restricted the feat to not work if you are wielding the weapon with two hands, so it was necessary to add this to the feat. If there's a smarter way to implement that, I'd be happy to learn what you've got in mind.

I'm brand new to customizing things here, and just pieced together what I could from viewing some videos, looking at some other scripts, and copying and pasting without really knowing about other possible implications of the code. For example, I really didn't understand what the Phase drop-down was for until you mentioned timing and Pre-level. I was looking at the timing button and trying to figure out what you meant, then poked around and found Pre-level in the Phases.
 
Setting the timing to Pre-levels/100 fixed the problem, thanks.
No problem. Glad its working.

It displays the benefit whether or not the weapon is wielded, and disables the benefits when the weapon is being wielded in both hands.

The GM has specifically restricted the feat to not work if you are wielding the weapon with two hands, so it was necessary to add this to the feat. If there's a smarter way to implement that, I'd be happy to learn what you've got in mind.
Ahhh ok. I read the script really quick and missed the "&" between the two field values. So I was thinking it was either hand you where checking not both. In that case yes this is the correct way to handle it.

I'm brand new to customizing things here, and just pieced together what I could from viewing some videos, looking at some other scripts, and copying and pasting without really knowing about other possible implications of the code. For example, I really didn't understand what the Phase drop-down was for until you mentioned timing and Pre-level. I was looking at the timing button and trying to figure out what you meant, then poked around and found Pre-level in the Phases.
My bad I should have been more clear about the "timing" stuff as the editor does not actually use that wording. So the idea is that it sets up when the "script" fires or executes. So in this case we need to be early enough that HL knows to apply "Dex" instead of Str to the calculations.

So some general ideas is if you are adjusting a Attribute you want to be in Pre-Attributes phase. If you want to use an attribute in a calculation you want to be Post-Attribute as the modifier has been calculated at that point.

If you start doing stuff with Classes your scripts want to run like Post-Level/10000 so that you have the right level information for doing calculations.

Be sure to check out the Glossary of Terms. And FAQ#2 that has all the locations to learn about the editor including intro videos and Aarons GenCon class videos.

Oh and so far you seem to be doing really good with the editor. :D
 
Back
Top