OnMonsterHit Poisons for PCs
Terrorble
Member Posts: 183
I'd like to use some of the poisons that seem to be only available as OnMonsterHit: Poison properties.
How do you add say Deathblade or Nightshade poisons to PC weapons using poison vials?
How do you add say Deathblade or Nightshade poisons to PC weapons using poison vials?
0
Comments
There are functions to create the poison effects and to apply them to objects.
As I understand it, applying the poison effect to an object makes that object inflict poison on-hit while applying the effect directly to a creature causes the ill-effects of the poison to that target (although I could be totally wrong).
(I didn't test to see what happens if you apply it to the CARMOR or ARMS slots since I just wanted it for coating weapons. So, maybe I missed out on something easier.)
I wrote a script that allowed my poison vial, with Cast Spell: Unique whatever, to apply the EffectPoison(POISON_NIGHTSHADE) to creatures or weapons. It works when used on a creature just like you'd expect. If they fail the DC listed in poison.2da, they get poisoned and suffer the effects. Using it on a weapon did nothing: you have to apply an ItemProperty.
The only item property functions for poison are OnHit or OnMonsterHit. The first only has options for the poisons that do basic 1d2 stat damage, and the second only works on creature weapons.
So the workaround is to apply OnHitCastSpell. I used the spell Poison. I edited its spell script so that if it's being cast from a weapon to apply EffectPoison(POISON_NIGHTSHADE) from within the spell script.
tl;dr
Applying EffectPoison(POISON_NIGHTSHADE) to a weapon doesn't do anything.
There are no item property functions that allow you to add any of the poisons in poison.2da to a player weapon.
But you can add the OnHitCastSpell item property to a weapon, then have the spell script apply EffectPoison(POISON_NIGHTSHADE) to the target.