I found a couple of similar threads, but nothing quite what I was looking for.
Is there a way to make the ‘on hit’ property (either armor or weapon) work, but not every time? Say, every time, a sword hits, it has a >chance< of casting a spell or effect, but not every single time? It’s not in the built in property editor/wizard, so I assume it would have to be done with a script, but I’ve no idea how.
The item property On Hit Cast Spell can be used, either to execute a new spell which you’ve created, or the generic spell Unique Power (On Hit). The latter executes X2_S3_OnHitCast and enables tag-based scripting.
Your code can go in your new spell script, a copy of X2_S3_OnHitCast, or a tag-based script.
The new code could be as simple as using the Random() function to do nothing with a certain probability, otherwise execute whatever spell or custom effect you had in mind.
This seems like a really dumb question, but I don’t see X2_S3_OnHitCast in the list of scripts for my mod.
This seems like something I’ve run into before, and maybe it’s because it’s a 1.69 mod that hasn’t been ‘converted’ fully to EE yet?
Thanks again. I feel like I’m at least pointing in the right direction now.
X2_S3_OnHitCast is a Bioware script which is included in 1.69.
To modify it, in the script editor, click on the “Open An Existing File” button, then check “All Resources”. To save scrolling through the list of scripts, you can then paste X2_S3_OnHitCast in the script name box.
This will create a unique version of the script in your module. This can be deleted if you want to regress to the official version for any reason.