OK so I figured out how to do a custom MAT file, this can be applied to most things.
Big thanks to Maxie for the program, it's now on nexus!
Material Extractor
Github: Material Extractor
It also now has a GUI so just follow the instructions there!
Getting Started
Download the MaterialExtractor from either link above.
Extracting Materials
Drag and drop the Materials.ba2 where it asks for the material file.
Drag and drop the Meshes02.ba2 onto the large window and click the Export button.
Editing the MAT file
Open the .mat in Visual Code, the reason to use this program is because it has validation so if you mess up it will tell you, all MAT files are in JSON format.
Where the file begins at the top:
"Data": {
"Name": "<mat_name>"
Change this to a suitable name for your custom material.
Now scroll down and you should see references to texture dds files, not all mats have textures though!
Replace the referenced texture(s) with your own texture file and save it.
Back to the Starfield Material Extractor folder drag and drop your custom mat over to the Material ID .mat box and it will give you:
- <Path> <Number>
The Number is the MaterialID, we will need these in NifSkope so keep the window open.
Adding the new Custom Mat to your object
Open NifSkope and load your object NIF.
Expand the tree until you get to BSGeometry.
There should be two parts:
BSLightingShaderProperty
NiIntegerExtraData
Under the BSLightingShaderProperty, right-click the Name field and put the path of your custom mat.
Under the NiIntegerExtraData double-click the Integer Data field and put the number that was at the end of the Path in the GetCRC.exe window (I hope you still had it open!)
Once you've done that save the NIF and create a skin for your object.
Testing the Custom MAT
Go in-game and it should briefly show the compiling shaders window.
If you get stuck on loading a save quit out and try again.
Go to Jemison and The Lodge as that has all the workbenches we need.
Open the crafting interface for what your item is and click Skins, there is usually one called Default Skin, select that.
If it looks metal or wonky then something's not right, go back and make sure your material is set up correctly.
If on the other hand it matches your textures then it's working correctly.
Congratulations!
2 comments
Obviously it's a bit of a hacky way at the moment without access to the CK but I'm glad it's been useful :)