I'm trying to create a feat that requires you select an energy type, and then adds 10 to it IF you already have it otherwise do nothing.
I have a feat (fSSInuredE) with a custome Item Selection Custom Expression:
thingid.xDamRsAcid|thingid.xDamRsCold|thingid.xDamRsFire|thingid.xDamRsElec
I have a script at First Priority 10000:
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
doneif (hero.tagis[SpecSource.fSSUnuredE] <> 0)
~#applyresist[xDamRsCold, hero.child[thingid.xDamRs] + 10]
foreach pick in hero where "SpecType.Resist"
#applyresist[xDamRsSonic, hero.child[thingid.xDamRsSonic] + 10]
#applyresist[xDamRs, 10]
nexteach
~foreach pick in hero from BaseWep where "IsWeapon.wPcDwaDor"
~ perform eachpick.tagreplace[wClass.TwoHanded,wClass.OneHanded]
~ nexteach
I can't figure out how to use the selected type, to then run through all the energy resistance, exclude the ones from the feat (fSSInuredE) and if you find one of the same type, add 10.
I've worked many hours trying to fix this one feat, can anyone help?
The script above is totally not working, for example I was just trying to twiddle with Sonic to see a change. I guess I simply don't understand a lot of the low level mechanics (despite reading all I can from the tutorial and examples.)
I have a feat (fSSInuredE) with a custome Item Selection Custom Expression:
thingid.xDamRsAcid|thingid.xDamRsCold|thingid.xDamRsFire|thingid.xDamRsElec
I have a script at First Priority 10000:
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
doneif (hero.tagis[SpecSource.fSSUnuredE] <> 0)
~#applyresist[xDamRsCold, hero.child[thingid.xDamRs] + 10]
foreach pick in hero where "SpecType.Resist"
#applyresist[xDamRsSonic, hero.child[thingid.xDamRsSonic] + 10]
#applyresist[xDamRs, 10]
nexteach
~foreach pick in hero from BaseWep where "IsWeapon.wPcDwaDor"
~ perform eachpick.tagreplace[wClass.TwoHanded,wClass.OneHanded]
~ nexteach
I can't figure out how to use the selected type, to then run through all the energy resistance, exclude the ones from the feat (fSSInuredE) and if you find one of the same type, add 10.
I've worked many hours trying to fix this one feat, can anyone help?
The script above is totally not working, for example I was just trying to twiddle with Sonic to see a change. I guess I simply don't understand a lot of the low level mechanics (despite reading all I can from the tutorial and examples.)
Last edited: