temnix Posted March 31, 2020 Share Posted March 31, 2020 Neither HaveSpellRES nor HaveKnownSpellRES work, when a creature has a spell known or memorized under a wrong type. For example, sorcerers get to pick spells upon leveling up, and it looks like these spells get put into their files as either known or memorized under "Wizard (1)." This is automatic. If a spell has been made innate, it can't be cast. I could use a script to check for this spell and then remove it and give it again as innate, only triggers don't react to it. Or maybe the problem is not type mismatch but that wizard spells will be put in the CRE under different levels, 0-8, and innates must always be 0. Quote Link to comment
subtledoctor Posted April 2, 2020 Share Posted April 2, 2020 I confess I don't understand. Innate spells are type 4, and I think they are detectable with HaveSpell and/or HaveKnownSpell. Scripting isn't my area of expertise so maybe that's wrong, but if you look at a paladin or something in a .CRE file you can see the innate abilities in both known and memorized fields. OTOH if a creature has, say, Fireball known and memorized as a 3rd-level wizard spell, and you modify SPWI304.spl to be a1st-level innate ability, then yes I would expect some things to go wrong. The best solution I've come up with for such cases is to make a clone of the original spell, DELETE_EFFECT everything in the clone, change it to innate, and add a 146/148 effect casting the original spell. (The only weirdness there is that the effective range of such clones is "3" (whatever units spell range is measured in) less than the original spells... you therefore need to reduce the range of the clone. This can make one or two spells act screwy, like Burning Hands... but that's the only one I've seen with the precise combination of range and targeting parameters to cause problems. If I haven't wildly misunderstood your issue , some example code is here, at lines 523-560.) Quote Link to comment
temnix Posted April 2, 2020 Author Share Posted April 2, 2020 I guess this is another way to do it. I went with patching creatures to remove their memorized spells, one by one, then add the same spells as innate. Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.