I have a patch that adds a perk to a bunch of NPCs, nothing else. And I discovered that some of these NPCs lost their names, which means that I can't interact with them in-game (for example, to loot their corpses). After debugging I found that in some cases Mutagen fails to pick up localizations from .strings files, with Name of the source NPC getter having a non-null StringKey but null String, which Patch.Npcs.GetOrAddAsOverride(sourceNpc) then turns into a null Name in the result record. And all these cases (about 150) come mostly from vanilla DLCs - Dawnguard and Dragonborn, with a few NPCs that are altered by vanilla Update.esm. It's ONLY 150 probably because all the rest DLC/Update NPCs are changed by 1700-something mods further down the stream in the mod list.
I decided to try and extract the strings/dawnguard_...strings and strings/dragonborn_...strings files from Skyrim - Interface.bsa as loose files. And it helped, Mutagen instantly found them, no more nullified Names in the patch. So it does look like Mutagen just doesn't see the DLC strings in Skyrim - Interface.bsa.
An example of an NPC that gets its Name nullified if patched with Mutagen: 020029A1 (DLC1EncChaurusHunterFledgling, Dawnguard.esm).
NOTE: I'm running Mutagen on a complex "Mod Organizer without Mod Organizer" environment, on a mod list that isn't my own, so it could be fault on my side. But still, it would be nice if GetOrAddAsOverride (or mod.WriteToBinary) would leave a "missing" TranslatedString intact or complain about it (exception?) instead of silently nullifying.
I have a patch that adds a perk to a bunch of NPCs, nothing else. And I discovered that some of these NPCs lost their names, which means that I can't interact with them in-game (for example, to loot their corpses). After debugging I found that in some cases Mutagen fails to pick up localizations from
.stringsfiles, withNameof the source NPC getter having a non-nullStringKeybut nullString, whichPatch.Npcs.GetOrAddAsOverride(sourceNpc)then turns into a nullNamein the result record. And all these cases (about 150) come mostly from vanilla DLCs - Dawnguard and Dragonborn, with a few NPCs that are altered by vanillaUpdate.esm. It's ONLY 150 probably because all the rest DLC/Update NPCs are changed by 1700-something mods further down the stream in the mod list.I decided to try and extract the
strings/dawnguard_...stringsandstrings/dragonborn_...stringsfiles fromSkyrim - Interface.bsaas loose files. And it helped, Mutagen instantly found them, no more nullified Names in the patch. So it does look like Mutagen just doesn't see the DLCstringsinSkyrim - Interface.bsa.An example of an NPC that gets its
Namenullified if patched with Mutagen: 020029A1 (DLC1EncChaurusHunterFledgling, Dawnguard.esm).NOTE: I'm running Mutagen on a complex "Mod Organizer without Mod Organizer" environment, on a mod list that isn't my own, so it could be fault on my side. But still, it would be nice if
GetOrAddAsOverride(ormod.WriteToBinary) would leave a "missing" TranslatedString intact or complain about it (exception?) instead of silently nullifying.