View Single Post
wdmartin
Senior Member
 
Join Date: May 2013
Posts: 240

Old January 22nd, 2019, 07:28 PM
The soloist PC in my seven-year-long campaign just hit level 20 by killing Treerazer. Her reward is a super-badass custom artifact-level sword personally forged for her by the empyreal lord Bharnarol.

Its stats, per her specification:
  • +5 enhancement bonus
  • +1 keen
  • +2 negating
  • +1 mimetic
  • +1 demon bane
  • wild weapon -- enhancement and weapon abilities transfer to unarmed strike and wild shape natural attacks
  • curse of forgetfulness -- DC 17 will save when struck or be cursed to roll nat 1s on all Intelligence-based skill and ability checks

Most of that was pretty straightforward to code up, but I've run into issues copying the weapon abilities from the sword onto her melee and natural attacks. I defined an Item Power called Wild, with the following two eval scripts:

Code:
~ First/400/1
doneif (container.parent.field[gIsEquip].value = 0)

perform container.parent.assign[Helper.PolyOK]
Code:
~ Pre-levels/10000/2
doneif (container.parent.field[gIsEquip].value = 0)

~ Get the enhancement bonus of the weapon.
var WeaponBonus as number
WeaponBonus = container.parent.field[BonEnhance].value

perform container.parent.pulltags[Ability.?]

foreach pick in hero from BaseWep where "component.BaseNatWep | wCategory.Unarmed"
~ Copy over the enhancement bonus
#enhancementbonus[eachpick, WeaponBonus]

~ Copy over the weapon abilities.
perform eachpick.pushtags[Ability.?]
nexteach
The enhancement bonus works; whenever the sword is equipped, unarmed strike and natural weapons gain a +5. And I can see in the debug tags window that the Ability tags are getting copied over fine, but the abilities don't appear to have been added -- e.g. the crit range is still the same, the bane damage doesn't show up, etc.

Clearly there is more to it than copying some tags over. I spent some time puzzling through the code for a custom Amulet of Mighty Fists, but I failed to grok it. I think it works by assigning a weapon type to the gizmo that powers the item power selection? Maybe? Anyway, I didn't get it. I'm pretty tired right now, which doesn't help.

How should I be going about this?
wdmartin is offline   #1 Reply With Quote