This was written by user19990313 on the starfield nexus discord.
Starfield CK does not allow direct editing of .esm, and you cannot set them as active files. All editing must be stored in an active .esp file.
Before we start, here is a quick recap of the file formats and changes to them in Starfield:
.esm: Master file. The final released version of the plugin must be in this format.
.esp: Contrary to the common practices in previous Bethesda titles, this format is strictly for development. Loading .esp in game is possible but not an intended feature, as it will cause various weird bugs like invisible models. You should set an .esp as active file in CK, make changes, save then convert it to master. You should keep this .esp for future development, but should not include it in the release.
.esl: It's officially deprecated in SF, the extension, not the concept of "light plugin".
"Full Master": The default type of .esm files. It is the equivalent of an .esp/.esm without esl flags in FO4. The FormID space is xx000001~xxFFFFFF, where xx will be the load order, so you can have 253 full masters in a load order (00~FC)
"Small Master": This is the "esl"/"espfe"/"light plugin" from before. It has the esl flag and .esm extension. The FormID space is FExxx001~FExxxFFF, so 4095 records for each small masters and 4096 small masters max in a load order.
"Medium Master"/ESH: This is a new type introduced since game update 1.11. It has the medium master flag and .esm extension. The FormID space is FDxx0001~FDxxFFFF, so 65535 records for each medium masters and 256 small masters max in a load order. Since it's a middle ground between full and small masters, it's also called "half master/ESH(alf)".
All esm plugins made using xEdit before CK should have Full Master flag enforced, and should not have esl flag. If you later found out it has esl flag, or it has .esp extension, it's unsafe and should be remade in CK instead of converted.
You'll need a Hex editor. Here's the one I'm using: https://www.x-ways.net/winhex/
And of course the esm plugin you want to convert.
Load the plugin in the hex editor. Look for the block at offset 08. A block consists of 2 hexdecimal digits, so in this case it's 81
.
00
=No flags (esp)
01
=ESM
80
=localization (no ESM flags)
81
=ESM+localization
Fill in the block with new data: if it says 01
then fill in 00
, if it says 81
then fill in 80
.
After editing block 08 and saving the file, rename the plugin from MyMod.esm
to MyMod.esp
because .esm extension infers Master flag in CK and in game.
This is not necessary for most mods, unless it contains:
Sounds/soundbank
Preview icons for outpost build menu/recipes
FaceGen data (I'm not sure about this, I can't recall the structure)
These assets all have the plugin file name as part of their asset path, so it may be necessary to change the archive if you want to use relevant features in CK after conversion.
Open CK, check all the masters of this plugin, then set the new .esp as active file. From now on, all changes goes into this esp, and you need to regenerate a full/medium/small master from it to test in game/publish.
The plugin masters list saves plugin name with extension, so you cannot load other plugins using the old .esm as masters. One plugins at a time,
CK will make all loaded plugins as the master of the active file even if you didn't touch any records from them so be aware not to load any SFBGSxxxx.esm or ESH/ESL when you intent to make the plugin full master. This extends to DLC masters when it eventually comes out.