Skip to content

Removing Spells from the Priest Spellbook.

MordeusMordeus Member Posts: 460
edited January 2013 in General Modding
I'm working on a couple of Cleric and Druid kits that use completely their own spells. Where a series of new "School" values are created to make way for 2ed's Priest Sphere concept. So all current priest spells will be redone to be classified under the Spheres instead of the Wizard Schools.

I've created the new spells and I can add them to the priest spellbook but I need to be able to remove the Vanilla spells from the priest spellbook to avoid having duplicates.

I initially tried applying a .spl file to the kit's .2da file with the "Removal: Remove School [220]" effect. Where I tried to remove all schools (Necromancy, Abjuration, etc...) and therefore all of the Vanilla spells in one go since they are listed under that school. But that didn't work.

I then tried the effect "Spell: Remove Spell [172] where I would target specific priest spells to be removed from the Spellbook. But it wouldn't remove any spell I specified.

I then tried to find a copy of CLABMA02-CLABMA09 to see how BG1 restricted access to Schools. With the idea to copy whatever they did. But that is unavailable for extraction.

Either somehow the priest spellbook is untouchable or I'm doing this wrong. I tried other Priest Spellbook specific effects like "Spell: Disable Spell Casting Abilities [145]" where I tried disabling the entire Priest Spellbook but that didn't work. I tried doing the same to the Bard's spellbook but it didn't do anything either.

I have no trouble applying .spl files with non-spellbook related effects, but anything related to the spellbook is causing me troubles.

Quick Question... is it possible to remove spells from the priest spellbook?

If so, then I'll post screen captures of the .spl and .eff file setup as it appears in DLTC to get into the specifics of what I'm doing wrong.

Comments

  • WispWisp Member Posts: 1,102
    edited January 2013
    Upon levelling up, priests automatically gain access to all spells they can use, based on the exclusion flags in the SPL files.
    Priest spells that are removed with #172 are regained upon levelling up. (Opcode #222 #220 removes the effects of active spells from the affected creature, similar to what Breach does.)

    I'm pretty sure BG1 handles schools through the exclusion flags in the SPL, as well.

    How are you setting up the spell to disable the spellbook? Opcode #145 works for me.
    Post edited by Wisp on
  • MordeusMordeus Member Posts: 460
    edited January 2013
    @Wisp: I've attached screenshots of the .spl setup to this post.

    If Priest Spells are regained upon levelling up. Could I create multiple .spl files that suppress the spells for every level in the kit's .2da file? So even if the spells are regained, they will also be removed upon leveling?

    If so, could I use Effect #220 instead of #172 to do the same thing? Because I really just want to wipe the spellbook clean and start over with new versions, rather than target specific spells for removal.

    I tried doing the above with #220 but it really does seem to be a problem with how I've formatted the .spl in the first place. To be honest, the .spl I created is a combination of trial and error, whilst seeing what already works in pre-existing .spl files. So it's really estimation work on my part.

    For example, I wasn't so sure what it meant with the level categories. I think in General Properties, "Level" means what level it is in the spellbook, so I left it with 0. With Extended Effects, I guessed "Required level" is the level of the character. While with "Maximum Level" in the effects menu, I guessed it meant character level also. So for each spellbook suppression .spl file, I would increase the Level value to whatever the character level would be.
  • WispWisp Member Posts: 1,102
    Mordeus said:


    If Priest Spells are regained upon levelling up. Could I create multiple .spl files that suppress the spells for every level in the kit's .2da file? So even if the spells are regained, they will also be removed upon leveling?

    I suppose you could, but it probably wouldn't work too well. Frankly, there are a lot of moments in IE modding where the hands-down best thing to do is to go back to the drawing board (or simply forget about it). A lot of things that sound great on paper are either not possible or prohibitively ugly, unwieldy, bug-prone or labour-intensive to implement. But whether to persevere is of course a choice only you can make. If you do, you might want to have a look at Divine Remix, which accomplishes a sphere system (how well it works, I don't know) and is supposed to be designed to allow for third-party kit mods to plug into it.
    Mordeus said:


    If so, could I use Effect #220 instead of #172 to do the same thing? Because I really just want to wipe the spellbook clean and start over with new versions, rather than target specific spells for removal.

    Apologies, when I wrote 222, I meant 220. If you wanted to create a Breach-like spell that, say, stripped the target of all active abjuration spells, you would use opcode #220. It is not comparable to #172.
    Mordeus said:


    While with "Maximum Level" in the effects menu, I guessed it meant character level also.

    All the fields on the effect page are specific to the effect and have different use and significance depending on the particular effect. In this case, "maximum level" is the parameter1 field, which controls the maximum spell level this effect would affect (e.g., spells up to level 6).
  • MordeusMordeus Member Posts: 460
    @Wisp: Thankyou for pointing me in the direction of the Divine Remix mod, the way they've tackled spell exclusion and the spheres is exactly what I've been trying to emulate.

    Using opcode #172 to cancel out individual spells and applying it to every level in the .2da file really seems like the way to go. You've saved me a lot of trouble, thankyou.
  • RequiemRequiem Member Posts: 187
    @mordeus I just did this exact thing yesterday and I found the best way was to have opcode 172 remove all spells every level (I found 172 only worked if I put it under casting effects rather than an extended header). Then use a different spell to add the new spellbook spells to the character using the give innate ability opcode (I think it's 171, you only need to do this once). If you use an sppr file rather than an spin file it will add it to the spellbook rather than the innate ability button.

    Hope that's useful
  • MordeusMordeus Member Posts: 460
    @Requiem: I thought I had this solved until a minute ago. I had the 172 opcode in the Extended Header, but I just realized that the spells did come back upon leveling up. But I'll try putting them in casting effects instead.

    If that doesn't work, there is a really foolproof solution.... make copies of every spell and then change the Priest Type to something unreadable like PST Mage, copy them to the override folder and it will cancel out the fixed spells. Then make another set of identical spells that can be added manually. This will screw up every other kit besides the manually edited ones but it's going to be my last resort :S
  • MordeusMordeus Member Posts: 460
    @Requiem: Ah it really did work! You saved me a whole lot of trouble. It would have been embarrassing having to neuter the entire spellbook system just to get this to work.
  • RequiemRequiem Member Posts: 187
    @mordeus glad to be of assistance, looking forward to seeing what you do with it
  • CuChoinneachCuChoinneach Member Posts: 105
    Requiem said:

    @mordeus I just did this exact thing yesterday and I found the best way was to have opcode 172 remove all spells every level (I found 172 only worked if I put it under casting effects rather than an extended header). Then use a different spell to add the new spellbook spells to the character using the give innate ability opcode (I think it's 171, you only need to do this once). If you use an sppr file rather than an spin file it will add it to the spellbook rather than the innate ability button.

    Hope that's useful

    So, you have to remove all the spells from the spell book and then you can add the ones you want back?

    Working on an NPC kit for DSotSC and need to do this. :)

  • NifftNifft Member Posts: 1,065
    I too am interested in the best way to do this.

    Good info in the thread. Thanks!
Sign In or Register to comment.