View Single Post
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old January 25th, 2009, 06:58 PM
The relevant line in weapon focus is:
result = eachpick.assign[Broadcast.WepFocus]

What the script in weapon focus does is to find each weapon your character carries that matches the weapon type you have focus in, and assign it the Broadcast.WepFocus tag.

Later, when it comes time for the weapon to calculate its attack bonus, it performs its own calculations, looking up everything it needs; for example its enhancement bonus, the character's BAB, etc., and then it adds +1 to hit if the Broadcast.WepFocus tag is present.

There's currently a bug in "Test Now" - it won't load the script of the tested thing. You'll need to use ctrl-r "Reload All" to get the script loaded. Is that the reason your new script isn't working?

Timing is also important in scripts, but I checked, and the Improved Initiative script runs at Pre-Level 5000. The adjustment "Attack Bonus (Ranged)" runs at Pre-Level 10,000, so that shouldn't be a problem.

Last edited by Mathias; January 25th, 2009 at 07:03 PM. Reason: Re-phrasing
Mathias is offline   #8 Reply With Quote