Skip to content

Skyrim SE: nullified TranslatedString on GetOrAddAsOverride #678

Description

@gavrant

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions