Generalist Mage Flag
Vreejack
Member Posts: 60
Some experimenting has shown that unless I have hopelessly confused myself, setting the "Generalist" flag in the list of unusable mage kits will bar an item from thieves and bards, but not from paladins. This is especially frustrating when the item is described as being used by thieves, which are not specifically barred.
So, which is the bug? Is the Generalist flag supposed to apply to thieves and bards, but was mistakenly set on the item (and if you already have "Mage" set, you do not need to set mage kits), OR, is the Generalist flag mistakenly set to bar thieves, etc., in the engine?
So, which is the bug? Is the Generalist flag supposed to apply to thieves and bards, but was mistakenly set on the item (and if you already have "Mage" set, you do not need to set mage kits), OR, is the Generalist flag mistakenly set to bar thieves, etc., in the engine?
0
Comments
NONE: Ajantis, Alora, Coran, Imoen, Kivan, Shar-Teel.
TRUECLASS/MAGESCHOOL_GENERALIST: Baeloth, Eldoth, Faldorn, Garrick, Jaheira, Kagain, Khalid, Minsc, Montaron, Safana, Skie, Tiax, Viconia, Yeslick.
So that "not from paladins" effect you noticed was probably "not Ajantis". And it would block Montaron, but not Coran. Minsc, but not Kivan. Safana, but not Imoen. Kagain, but not Shar-Teel. Using that flag without also cleaning up the kits for recruitable characters is not advisable.
The difference between the two options does impact gameplay in one situation. If the character is capable of learning spells from arcane scrolls, a character with the null kit NONE is treated as a specialist mage. 15% penalty to learning spells from scrolls outside their specialty (all of them), bonuses to spells in their specialty (none of them, except maybe some HLAs). In game, this is most easily encountered by dual-classing Imoen to mage or having her join in BG2.
So if I want Safana to be able to wear that magic thief leather, I could either change her kit to swashbuckler, maybe, or delete it altogether.
Edit: I was wrong about Paladins; they can have kits, but Ajantis is weird and his data structure will not accept a kit. Also, I cannot delete the existing kit. It looks like the lack of a kit is interpreted as generalist/baseclass by the engine.
It's an item for kitted thieves, apparently. The Generalist exclusion prevents characters with a "basic" kit from wielding it, which is the kit that all characters should have if they don't have a kit. The flag is not specific to mages at all.
As for how the game interprets invalid kits ...
If a creature has a kit that matches something in the IDS table but not any kit of their own class, they get that kit's item restrictions. A Fighter with the Shapeshifter kit can't wear armor, for example. Some hardcoded abilities also work with off-class kits; a Ranger or Monk with the Shadowdancer kit can hide in plain sight. However, the bulk of the kit's abilities will be treated as if that creature is of the base class. That shadow ranger gets Charm Animal and stealth just like a standard ranger, but no backstab.
The kit.ids table has entries for both TRUECLASS and MAGESCHOOL_GENERALIST, defining those constants with the same value. That value is a valid kit for all classes. On the flip side, a zero doesn't match a valid kit for any class. And yet, in practice, the two possibilities are nearly indistinguishable in normal gameplay. So the designers got lazy ...
Is it imperative that it not be usable by unkitted thieves? There are solutions to this but they are... annoying to implement sometimes.
I've been using EE Keeper as a convenient way to examine save files, but it will not let me modify Ajantis' kit, perhaps because it interprets 0x0000 as invalid. Near Infinity shows the field, however. I can see that Alora also has zeroes.
NI makes it seem as if 0x0000 (NONE) is a perfectly valid kit, but does not show TRUECLASS... perhaps because that ID code was already taken by MAGE_GENERALIST. But I suppose from what you said earlier, NONE is indeed a perfectly valid kit, just not for any existing classes. Since it does not add any abilities, it doesn't matter.
This is not entirely true, mostly because mage kits are coded oddly. The mage specialist penalty of -15% to spell learning for off-kit spells applies not to the specific list of specialist mage kits, but instead to any kit that isn't MAGESCHOOL_GENERALIST. So then, characters as diverse as Imoen (in both games), Neera, and Haer'Dalis all suffer that penalty.
As far as I know, this is the only gameplay difference. NONE and TRUECLASS are indistinguishable for any character that can't learn arcane spells, except when dealing with items that block TRUECLASS characters from using them. I believe that there's only one such item in the standard game - one of the wild mage items in BG2EE.
In my own copy of the games, I've edited all joinable versions of Imoen to be TRUECLASS. I haven't done that for any of the other NPCs that are NONE.