Recoloring items
Last updated
Last updated
Changing how an item looks in-game
Created by @manavortex Published November 05 2022This guide will teach you how to change an item's appearance by editing its MultilayerSetup (*.mlsetup file), how to rename materials, and how add your own mlsetups (custompathing).It uses the following versions:
WolvenKit: (but anything > 8.7 will do)
: (older versions won't be compatible with WKit 8.7 and game version 1.6)
In general, an item's appearance is determined by a file containing several material layers.Which of these layers affects which part of your mesh will be determined in the corresponding file.
Before you can edit an item's appearance, you need to find the correct game file. To do this, you can consult the lists under "", or browse through the game's files.This tutorial will use the female variant of the puffy vest (as I've already ):base\characters\garment\player_equipment\torso\t2_002_vest__puffy\t2_002_pwa_vest__puffy.meshAdd the item to your project and open it in WolvenKit.
For a guide of how to trace your item's spawn code to the appearance, check .You will find the list with appearances at the very top of your mesh. We'll start by editing bwstripes
, since we know that it is used by one of the variants :
It's ml_t2_002_ma_vest__puffy_bwstripesMost meshes have their materials under localMaterialBuffer/materials
. However, some of them (especially those with physics) use preloadLocalMaterialInstances
instead.You will (hopefully) see a material with three entries in values
(order doesn't matter):
Key
Value (DepotPath)
MultilayerSetup
base\characters\garment\citizen_casual\torso\t2_002_vest__puffy\textures\ml_t2_002_ma_vest__puffy_bwstripes.mlsetup
MultilayerMask
base\characters\garment\citizen_casual\torso\t2_002_vest__puffy\textures\ml_t2_002_ma_vest__puffy_default.mlmask
GlobalNormal
base\characters\garment\citizen_casual\torso\t2_002_vest__puffy\textures\t2_002_ma_vest__puffy_n01.xbm
We change the appearance by editing the MultilayerSetup:
1.Find the file and add it to your project.
2.Right-click the file and select "Convert to JSON".
If you have set configured MLSB, you can make use of MlSetupBuilder's export feature, rather than doing it via WolvenKit:Move your new json file in the same folder as the multilayer setup.
The json file will be named ml_t2_002_ma_vest__puffy_bwstripes.mlsetup.json
(originalFileName.originalExtension.json
)
Open up MlSetupBuilder and load your .mlsetup.json file.If you select WolvenKit's "Open in File Explorer" option, you can copy the path from the explorer's address bar and paste it into the MlSetupBuilder's address bar.
If you want to see which layers correspond to which part of the mesh, you can load it from the library:
If you have configured MLSB and had both files in the same folders, you will see a notification when the MlSetupBuilder has overwritten your original *.mlsetup
. This takes a few seconds.Otherwise, you need to right-click on the json file under "raw" and select "import from JSON".This is already working. You can pack the project and see it work!
Since you haven't changed anything in the mesh itself, you can (and should) delete it from your mod. Only keep it if you want to do the steps below.
If you want to put up your own .mlsetup, rather than overwriting the original one, you can do that. All you have to do is changing the DepotPaths to the relative path of your mlsetup.
Keep your folder and file names unique! If you have two mods adding a file at the same location, the second one will be unable to overwrite it and will use the first mod's file.
You can rename a material by changing the "name" property inside the CMeshMaterialEntry in the materials
array:
Don't forget to look through all the appearances and change the chunkMaterial
names!
find material bwstripes and remember the name of the chunkMaterialchunkMaterials
corresponds to the chunkMasks
(submeshes).default is the fallback appearance that'll be used if anything can't be resolved by name or index. This is the reason why most item swap mods give you only a single appearance - people didn't set up the .This vest has only one chunkMask, so there's only one material. Remember its name and find it here:
Optional: Find your mesh in the libraryThis step requires the tool to be , which is not part of this guide. Fortunately, it's also optional.Change the colours and materials to whatever you want.TBD: Create/link to material descriptionSave the file and overwrite the original .mlsetup.json
: