The materials file is either the "Starfield - Materials.ba2" or the "materialsbeta.cdb", it will be auto-detected if possible.
The materials file only contains precomputed path hashes and doesn't know what is inside of it. To export materials it needs to know the material paths. You can supply material paths by dragging in one of the following:
- .nif files - Will grab any material paths found on the nif
- "Starfield - Meshes01.bsa" - Will grab all materials used by all nifs
- .txt files - Will grab all materials listed in a text file
Once you have both the materials file and paths you can export your materials
When creating new materials you will need to update the material ID on the .nif file (Look at any nif for an example). You can drag in your newly created .mat file into the exporter to generate the new material ID for your .nif
.mat files are just .json files so you can edit them with any text editor. I would recommend any text editor with validation such as Visual Studio Code. https://code.visualstudio.com/ (I would not recommend notepad++). You can set up your file association in vscode by using the shortcut "ctrl + ," -> search association -> add an item with "*.mat" as the key and "json" as the value. This will give you red squigglies whenever you forget a comma (or have too many).
The easiest way to create new materials is to find something closest to what you want and redirecting the texture paths to your own. Once you have your new material you can drag it into the exporter to get the new material id for your .nif file
gibbed - Did the bulk of the initial reverse engineering work for the .cdb format and BSReflection dumps - https://github.com/gibbed/Gibbed.Starfield
fo76utils - The mat_names.txt was used to test a complete dump of the games materials - https://github.com/fo76utils/ce2utils
ousnius - Using nifly to extract material names from the .nif files - https://github.com/ousnius/nifly
Ryan-rsm-McKenzie - Using bsa to auto extract the materialsbeta.cdb - https://github.com/Ryan-rsm-McKenzie/bsa
straw - Testing, moral support, German humor - nexusmods.com/fallout4/users/943249
Github - https://github.com/maximusmaxy/SFME
TY!
Thank you to everyone who's been hanging out on discord while i scavenge Todd's secrets out of his dumpster
Discord
Ko-fi