Skip to content

Generalist Mage Flag

VreejackVreejack Member Posts: 60
edited May 2021 in General Modding
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?

Comments

  • AquadrizztAquadrizzt Member Posts: 1,065
    The Generalist flag actually is the TRUECLASS flag, which blocks any non-kitted characters (including multiclass characters) from using it.
  • jmerryjmerry Member Posts: 3,829
    Of course, there's a caveat. While the character creation process will always give you TRUECLASS if you don't pick a kit, the same is not true of the NPCS you can recruit, Some NPCs have that TRUECLASS kit, while others have NONE. Among the recruitable NPCS in BGEE:
    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.
  • VreejackVreejack Member Posts: 60
    edited May 2021
    So Trueclass or "baseclass" or "generalist" is the default kit for every player-created character that does not pick a kit. I suppose that the NPC's were built differently and might be missing that kit, since it hard to even notice unless you actually check. That actually was Ajantis, by the way; he is paladin, no kit. As far as I can tell, you cannot give a kit to a paladin. I set the longbow he had been using to unusable trueclass and he could no longer use it. And Safana is listed as thief, baseclass kit. So this is making sense, now. I suppose that armor that Safana could not wear was supposed to be for a kitted assassin, maybe, or else it was set up by accident.

    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.
    Post edited by Vreejack on
  • AquadrizztAquadrizzt Member Posts: 1,065
    What are you using the Generalist exclusion flag for? Is it an item that only non-Generalist mages should be able to use?
  • jmerryjmerry Member Posts: 3,829
    If you're talking about enchanted armor... was she wearing a ring/cloak/amulet of protection at the time?
  • VreejackVreejack Member Posts: 60
    Aquadrizzt wrote: »
    What are you using the Generalist exclusion flag for? Is it an item that only non-Generalist mages should be able to use?

    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.
  • jmerryjmerry Member Posts: 3,829
    Vreejack wrote: »
    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.
    Ajantis, like any other creature in the game, has a kit field. 32 bits, which in his case are all zeros.

    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 ...
  • AquadrizztAquadrizzt Member Posts: 1,065
    Vreejack wrote: »

    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.

    Is it imperative that it not be usable by unkitted thieves? There are solutions to this but they are... annoying to implement sometimes.
  • VreejackVreejack Member Posts: 60
    edited May 2021
    jmerry wrote: »
    Vreejack wrote: »
    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.
    Ajantis, like any other creature in the game, has a kit field. 32 bits, which in his case are all zeros.

    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.


  • jmerryjmerry Member Posts: 3,829
    Vreejack wrote: »
    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.
    The "Set Value" button will let you get around this. You just can't use the dropdown unless the character has a known kit.
    Vreejack wrote: »
    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.
Sign In or Register to comment.