• 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

Bootstrapped feat requirement

Matt Droz

Well-known member
I'm trying to add a magic item that grants the wearer the Two-Weapon Fighting feat. If he already has that, then they get the Improved Two-Weapon Fighting feat.

So, I'm able to assign TWF without any issue, but I'm running into issues assigning ImpTWF if they have TWF. Basically, I've got the code so that it checks if the TWF feat is already there, then assigns a Custom tag. Using the Custom tag as the requirement, it should work, but I run into a timing error [...occurs after earliest rule/script (First/2380)], which is when the actual feat is assigned (as opposed to the item's virtual feat).

Any suggestion? If I move the timing earlier than 2380 for the check, it doesn't see the feat, so it never assigns the Improved feat. But if it's later, the error comes up.
 
The feat isn't assigned until First/2400, so it can't detect it until then. But the bootstrap needs to run before First 2380.
 
Yea, I see the problem. Unfortunately, I don't see an obvious solution. I'll give it some thought and let you know if I manage to come up with anything.

Edit: If you don't need the feats to show up in the feat section, and just need the functionality of the feats, here is a possible solution:

Code:
if (#hasfeat[fTwoWep] = 0) then
  perform hero.assign[Hero.TwoWep]
elseif (#hasfeat[fImpTwoWep] = 0) then
  perform hero.assign[Hero.TwoWepImp]
endif
 
Last edited:
Back
Top