• 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

Luck Bonus to all Attacks/Damage

AWizardInDallas

Well-known member
What am I doing wrong?

~+2 to all Attack
#applybonus[BonLuck, hero.child[Attack], 2]

~+2 to all Damage
#applybonus[BonLuck, hero.child[Damage], 2]

I'm trying to apply a luck bonus to all attacks from a magic item.
 
Phase? Priority?

Doesn't work on any User phase with Priority set to 10000. I've tried each one. I also receive this error message.

Attempt to access field 'BonLuck' that does not exist for thing 'Damage'.
---
Attempt to access field 'BonLuck' that does not exist for thing 'Damage'.

Here's the full eval script; everything works except for the latter two items:

~ If we're not equipped, get out
if (field[gIsEquip].value = 0) then
done
endif

#applybonus[BonLuck, hero.child[vFort], 2]
#applybonus[BonLuck, hero.child[vRef], 2]
#applybonus[BonLuck, hero.child[vWill], 2]

~+2 to Armor Class
#applybonus[BonLuck, hero.child[ArmorClass], 2]

~+2 to all Attack
#applybonus[BonLuck, hero.child[Attack], 2]

~+2 to all Damage
#applybonus[BonLuck, hero.child[Damage], 2]
 
I know, at least for the d20 system, that there are no typed bonus fields for Damage. I've since asked that such be added, and hopefully in the future they will be. I can't say if Pathfinder has these fields or not, but from the error you have, it would seem that you are suffering from the same exclusion of fields that the d20 system does.

There is a workaround, that is not ideal. There is a BonLuck field on weapons, which applies BOTH the bonus to the attack value and the damage value. This would make the Attack thing's bonus you have listed stack with a weapon thing's bonus, even though they are the same (because they come from different sources). So, you would have to also either not apply the BonLuck to Attack, or you would have to subtract one from the weapon's attack. As I said, not ideal. Anyways, that's my guess on what's happening with your script, hopefully a Pathfinder expert can step in and give a more definitive answer.
 
~+2 to all Damage
#applybonus[BonLuck, hero.child[Damage], 2]
Correct as Kendall-DM says there is no BonLuck field on the Damage Thing.

You can see what fields are on a Thing. We now have a Video that goes over this actually. See THIS video about 4 minutes in it goes over how to see the different Fields/Value on Things which is VERY helpful in finding answers.

Hope that helps.
 
There is a workaround, that is not ideal. There is a BonLuck field on weapons, which applies BOTH the bonus to the attack value and the damage value. This would make the Attack thing's bonus you have listed stack with a weapon thing's bonus, even though they are the same (because they come from different sources). So, you would have to also either not apply the BonLuck to Attack, or you would have to subtract one from the weapon's attack. As I said, not ideal. Anyways, that's my guess on what's happening with your script, hopefully a Pathfinder expert can step in and give a more definitive answer.

If I understand you right, that means I *could* loop through the weapon collection and add a luck bonus to each? Since I want to add a luck bonus to both Attack and Damage, would I still need to subtract anything? Sorry for my thickheadedness, man. I'm not sure I understand why I'd need to subtract anything. I found a similar thread (with script) where someone was trying to do pretty much the same thing, but with a Morale bonus instead and he had the same troubles.
 
If I understand you right, that means I *could* loop through the weapon collection and add a luck bonus to each? Since I want to add a luck bonus to both Attack and Damage, would I still need to subtract anything? Sorry for my thickheadedness, man. I'm not sure I understand why I'd need to subtract anything. I found a similar thread (with script) where someone was trying to do pretty much the same thing, but with a Morale bonus instead and he had the same troubles.
You should not have to subtract anything. If you apply a Luck Bonus to a weapon it will apply that to both HIT and DAMAGE. Which sounds like what you want to do.

Also see THIS post about the videos and as it shows which one to watch 1st, 2nd, 3rd, and finally 4th. It will make more sense that way. ;)
 
Last edited:
If I understand you right, that means I *could* loop through the weapon collection and add a luck bonus to each? Since I want to add a luck bonus to both Attack and Damage, would I still need to subtract anything? Sorry for my thickheadedness, man. I'm not sure I understand why I'd need to subtract anything. I found a similar thread (with script) where someone was trying to do pretty much the same thing, but with a Morale bonus instead and he had the same troubles.

You would only have to subtract from the weapon attack is you wanted to use the Attack thing instead for the Luck bonus, and also use the Luck bonus on the weapon, something I do as I expect at some point this oversiht will get fixed (hopefully). As Shadow says, you can just apply it to the weapon, and it will be fine. If it is an effect that can affect natural weapons, you'll need to iterate through those as well.
 
You should not have to subtract anything. If you apply a Luck Bonus to a weapon it will apply that to both HIT and DAMAGE. Which sounds like what you want to do.

Also see THIS post about the videos and as it shows which one to watch 1st, 2nd, 3rd, and finally 4th. It will make more sense that way. ;)

I was thinking of making a few videos myself when I had the time, but seems you've beat me to the punch. :)
 
I was thinking of making a few videos myself when I had the time, but seems you've beat me to the punch. :)
Don't let that stop you. Someone else explaining the same thing can often be very good. :)

See the Video Demos thread in the User Projects forum for info. Or do one on another area of HL. There is allot of stuff to cover actually.
 
Back
Top