So, one of my mods that drastically changes the weapon proficiency system, drops all joinable NPCs to 1st level and assigns only 1st-level proficiencies, allowing the player to level up and choose any higher-level proficiencies. I saw a way to identify and patch only joinable NPCs, by checking whether there is any value assigned to the "biography" field at 0x1cc of the .CRE file. I got this form one of the older, established mods - I don't remember which one, but it was maybe SR or RR or BG2Tweaks or aTweaks or something. Basically it's something that's been played for 10+ years with BGT, so I thought it was a tried-and-true method.
Well, I thought wrong. There is at least one false negative: GARRIC4 in BGEE doesn't have a biography, though he should... and there are several false positives: various non-joinable NPCs in the Dark Horizons mod have biographies (for what reason, I have no idea, as you will never see them). The latter is quite problematic - dropping a .CRE to level 1 and 8-12 hit points when it's an enemy and supposed to be a good challenging fight, is a really bad bug.
So... any thoughts on a more reliable method to distinguish joinable .CRE files from enemy .CRE files? Is there another part of the .CRE file that would clearly be different? I just opened up NI and I'm eyeing the "leader" sound that NPCs make when you move them to the first slot... but I don't have a mega-mod install handy to check whether there isn't some creature from some (old, abandoned) mod that has something in that offset for no good reason.
Would it make sense/be feasible to do it the hard way - check every .DLG and/or .BCS for FILE_CONTAINS_EVALUATED ~JoinParty~ and then check every .CRE to see which ones use any of the resulting .DLGs/BCS's?