View Single Post
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,144

Old December 5th, 2017, 05:38 AM
Quote:
Originally Posted by Dami View Post
This error appears to be in the Favored Soul class (Complete Divine). It's not related to what deity you choose. I tried different deities and weapons. The Weapon Focus is being correctly assigned, but while the Weapon Spec feat is listed, there's no damage bonus.
So the error(?) actually occurs with the feat itself, and it's interesting.

I took a look at both Weapon Focus and Weapon Specialization to see how both were functioning (since one was and one wasn't in this case). I examined the fields, and it turns out when you assign the tag Target.? to these feats, it assigns the weapon, but the fChosen field is not filled. As far as the feats are concerned, the user has not chosen anything. This *might* be a bug with core in how the Target.? tag is handled.

Now, as to why Weapon Specialization wasn't working, it's because there is a piece of code that says "if we haven't chosen anything, stop here". This is normal practice for feats that require the user to choose something, and helps prevents errors in certain cases. In this case, it's actually preventing Weapon Spec from working when the Target tag is applied.

Weapon Focus *does* work because it doesn't have this piece of code (which may also be a "bug").

As it turns out, someone created a Weapon Specialization replacement feat in the community set in order to account for other classes qualifying for the feat. That makes this easier to fix. The quick and dirty fix is to simply comment out this particular code, but I'll work on updating the script to account for this oddity.

Update:

For a more complete fix (and code update), replace the entire current script with the following:

Code:
~ If we're disabled, do nothing
  doneif (tagis[Helper.FtDisable] <> 0)

~ If we haven't chosen anything, get out now
  if (field[fChosen].ischosen = 0) then
    if (tagis[Target.?] = 0) then
      done
    endif
  endif

~ Assign the appropriate tag to all weapons that meet the criteria
  var id as string
  id = field[fChosen].chosen.idstring
  foreach pick in hero where "IsWeapon.?" & id
    perform eachpick.assign[Broadcast.WepSpec]
  nexteach

~ Set our 'short name'
  if (field[fChosen].ischosen <> 0) then
    field[fShortName].text = "Spec: " & field[fChosen].chosen.field[name].text
        
~ Forward the weapon specialization tag for the weapon to the hero
    perform field[fChosen].chosen.forward[WepSpec.?]
  endif
Note: The replacement feat can be found in Custom - Core Book Mods

Last edited by Sendric; December 5th, 2017 at 05:44 AM.
Sendric is offline   #719 Reply With Quote