Jump to content

Spell V1.0 Update


Recommended Posts

The Wizard Exclusion School variable at SPL offset 0x001E is more than it seems.


(Note: the bits only function when set to 1.)


Priest Alignment Bits


For BG2:SoA, BG2:ToB (BG2 from now on,) and HoW, if the spell type at 0x001C is set to 2 (Priest/Cleric), the following bits become meaningful for the Exclusion School flags at 0x001E.


Bit 0 = 0x0001 (1) = exclude Chaotic priests
Bit 1 = 0x0002 (2) = exclude Evil priests
Bit 2 = 0x0004 (4) = exclude Good priests
Bit 3 = 0x0008 (8) = exclude GENeutral priests
Bit 4 = 0x0010 (16) = exclude Lawful priests
Bit 5 = 0x0020 (32) = exclude LCNeutral priests

All other bits are ignored, and these bits have no meaning if the spell type is not 2 (Priest/Cleric). The bits are additive so you can set varying restrictions on what alignment(s) of priests can use each spell. If no bits are set, the spell can be learned and used by any alignment of priest. If all bits are set, no priest can use the spell.


In BG1, BG1:TSC (BG1 from now on) and IWD these bits mean nothing.



Mage Exclusion Bits


When the spell type at 0x001C is set to 1 (Wizard), the bits used for priest alignment restrictions are ignored and most of the remaining bits of 0x001E become meaningful. BG1, BG2, IWD and HoW use these values, and they are combinable, or additive.


Bit 6 = 0x0040 (64) = exclude Abjurers
Bit 7 = 0x0080 (128) = exclude Conjurers
Bit 8 = 0x0100 (256) = exclude Diviners
Bit 9 = 0x0200 (512) = exclude Enchanters
Bit 10 = 0x0400 (1024) = exclude Illusionists
Bit 11 = 0x0800 (2048) = exclude Invokers
Bit 12 = 0x1000 (4096) = exclude Necromancers
Bit 13 = 0x2000 (8192) = exclude Transmuters

BG2 adds another bit:


Bit 14 = 0x4000 (16384) = Wild Magic (exclude Generalists)

If no bits are set then the spell can be learned and used by any mage.


Bit 14 was added to support Wild Magic spells in BG2. All Wild Magic spells set this bit and all other mage exclusion bits to limit availability and usage of these spells to Wild Magi. If this bit is set alone, only generalist magi will be prevented access to the spell; specialists could still learn and use it.


Bit 15 appears to be unused in pre-IWD2 games. (IWD2 is untested in this regard.)





Here's a list that shows the known meanings of all bits of SPL 1.0 offset 0x001E:


Bit 0 = 0x0001 (1)     = exclude Chaotic priests (BG2 & HoW)
Bit 1 = 0x0002 (2)     = exclude Evil priests (BG2 & HoW)
Bit 2 = 0x0004 (4)     = exclude Good priests (BG2 & HoW)
Bit 3 = 0x0008 (8)     = exclude GENeutral priests (BG2 & HoW)
Bit 4 = 0x0010 (16)    = exclude Lawful priests (BG2 & HoW)
Bit 5 = 0x0020 (32)    = exclude LCNeutral priests (BG2 & HoW)
Bit 6 = 0x0040 (64)    = exclude Abjurers
Bit 7 = 0x0080 (128)   = exclude Conjurers
Bit 8 = 0x0100 (256)   = exclude Diviners
Bit 9 = 0x0200 (512)   = exclude Enchanters
Bit 10 = 0x0400 (1024)  = exclude Illusionists
Bit 11 = 0x0800 (2048)  = exclude Invokers
Bit 12 = 0x1000 (4096)  = exclude Necromancers
Bit 13 = 0x2000 (8192)  = exclude Transmuters
Bit 14 = 0x4000 (16384) = Wild Magic (exclude generalists) (BG2)
Bit 15 = 0x8000 (32768) = Unknown/Unused

- IWD's functionality is identical to that of BG1.

- HoW's functionality is identical to that of BG2, except the Wild Magic bit is undefined and unused. Since TotLM is based on the HoW version of the engine, its functionality is identical to HoW.

- Bits 0 through 5 are undefined in BG1. Bits 14 and 15 are undefined in BG1 and HoW. Bit 15 is undefined in BG2.

- The Alignment Exclusion bits cannot be combined with the Mage Exclusion School bits.

- "Generalist" includes magi, bards, and sorcerers.

- In IWD2 (SPL 2.0), this variable seems to have been replaced with 2DA files.


A side point, regarding the Primary Type at SPL 0x0025 and the Secondary Type at SPL 0x0027, is that the BG2 files MSCHOOL and MSECTYPE are 2DA files, not IDS files.

Link to comment

Updated the information.


Something about the bits for BG1 was bugging me and keeping me from getting my sleep, so I got up and ran another test. Turns out that BG1 also combined schools on a few of the spells, in a partial implementation of PHB guidelines.


And yes, I'm working to make the spells more in line with the PHB. Of course, it's a learn as I go process, since I'm no expert on the rules, and sometimes overlook details while reading. *ahem*


Edited: removed claimed bug reference that wasn't a bug after all.

Link to comment

So you intend to change those spells so that only one specialist cannot choose them rather than two? For some reason I thought you were trying to change things back to P&P standard but I am not sure what I picked up that idea.


Anyway, BioWare made the specialist mage penalties less severe compared to P&P and I dug into the manual to see how they went about it. On p. 140 there is a table covering them and here is what I found:


Transmuter - Opposition school: Abjuration, Necromancy

Invoker - Opposition school: Enchantment/Charm, Conjuration/Summoning


What you just discovered is in fact intentional on BioWare's part. I am still glad you found out that spells can have several opposition schools so I finally can correct the specialists mages, however. :blush:



Link to comment

I'd forgotten about the manual's table. Interestingly, BG2's manual (SoA pg.161) shows only one school with two oppositions, the Invoker. However, all of the wizard spells except five specify just one school. So why did BG2 change to single opposition schools for everyone? Is BG1 right or is BG2 right? Hehe.


For now, I suppose, I'll just leave it alone. It's not like I'm going to be playing those specialists anytime soon.


Edit: could you provide me with the pnp lists of schools and their opposition schools? It appears my 2E PHB/DMG aren't the 2nd printings or whatever, as they don't seem to provide that information. It doesn't help that they are in DOC/RTF format either. Heh.


Edit2: Doh, the PHB doc has the info on page ~42 or so according to Word. Bah, I was looking in chapter 7 under magic, where I thought it would make sense to look. I still prefer actual books to document files. Thanks for the info anyway Echon, it matches the table I found. With the reminder fresh in my mind to :cry: I think I'll go :blush:

Link to comment

Neither BG nor BG2 is correct. Player's Handbook p. 45:


Specialist - Opposition School


Abjurer - Alteration & Illusion

Conjurer - Greater Divination* & Invocation

Diviner - Conjuration/Summoning

Enchanter - Invocation/Evocation & Necromancy

Illusionist - Necromancy, Invocation/Evocation & Abjuration

Invoker - Enchantment/Charm & Conuration/Summoning

Necromancer - Illusion & Enchantment/Charm

Transmuter - Abjuration & Necromancy



Link to comment
Bit 2 (2) = This is a Good-aligned spell, so only Good- or Neutral-aligned priests can gain this spell.

Bit 4 (4) = This is an Evil-aligned spell, so only Evil-aligned priests can gain this spell.

Your naming convention doesn't help a lot.

Could you please clarify the value of these bits?


Either bit 2 (2)/bit 4 (8) or bit 2(2)/ bit 3 (4) or some other.


Actually there is a sectype.ids and school.ids table too.

mschool.2da and msectype.2da contain strrefs which are used when the spell of the appropriate classification was removed.


On the other hand, that list helps a lot. Have you tried the remaining unknown bits? Maybe they are covering other alignments. It would be fun if we could restrict spells based on chaotic/lawful.

Link to comment

I meant bit 2 (4). It was a typo. I had a lot on my mind when I typed it up and I was tired, so even after 10 edits I still missed something.


IESDP refers to MSCHOOL.IDS and MSECTYPE.IDS as coming from BG2. Both those files are 2DA files in my install. I can't find the files you refer to. Are you sure they aren't from IWD or something? They don't exist in unmodded BG1 or 2. (I only have Baldurdash fixes and my own fixes installed at this time.)


Edit/Update: thanks to insomnia, I was able to test and confirm all but one other bit (oversight at 4am hehe). At least sleeplessness proved to be good for something tonight. *sigh* I also reformatted the data a bit. I hope it's easier to read.

Link to comment

I think I'm finished researching this for BG1 and 2. I couldn't get the uppermost bit to do anything, so I labeled it "Undefined". If anyone else wants to test for the other IE games, go for it; I'm going to be busy for a day or two. It seems reasonable to conclude that, for the Exclusion School variable, IWD will at least have BG1's functionality, and I know from a quick scan that IWD2 has at least BG2's functionality, though the bit assignments seem to differ somewhat.

Link to comment
You keep saying BG1...regular BG1 or BG1: TotSC?



I don't play BG1 without having TSC installed too. I see them as one game.


That said, my testing was done with TSC installed, but there's no reason to assume these bits don't work the same without TSC.


The first post is updated to show which games I refer to.

Link to comment
That said, my testing was done with TSC installed, but there's no reason to assume these bits don't work the same without TSC.


Never say that: the games can be quite different...I'll do some testing with PST, and see if that will do anything with this this weekend.

Link to comment
Never say that: the games can be quite different...I'll do some testing with PST, and see if that will do anything with this this weekend.

I said it in this case because the TSC expansion wasn't nearly as big an update/change to BG1 as the HoW expansion was to IWD or the ToB expansion was to BG2. While a few spells were added to BG1 by TSC, the functions of these bits were not changed, and the new spells don't do anything differently.


I added an update for IWD. It's the got the same functionality as TSC. The only two games/expansions I have left to check on my computer are HoW and IWD2. (I installed IWD and checked it out before I installed HoW.)


Anyway, thanks for offering to check with PS:T. That's the one non-console IE game I don't have.


Update: HoW checks out to be identical to BG2 except that it doesn't use the Wild Mage bit. First post is updated with the new info. All that remains now are PS:T and IWD2. IWD2, of course, uses SPL 2.0 and this thread focuses on SPL 1.0. It appears that IWD2 also uses priest bits, but 14 of them instead of just 6, and of course wizard bits, although they may be rearranged.

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...