Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Modifying game items with minimal conflicts
Published: July 23 2024 by Last documented update: July 23 2024 by
This guide will teach you how to use ArchiveXL's Resource Patching feature to add/modify appearances of existing items without conflicting too much with other mods or even game's updates!
Concepts discussed here can be applied to many other areas in the game. See the general guide for more info: ArchiveXL: Resource patching
ArchiveXL >= 1.14 — this will not work with older versions
WolvenKit project with new or modified appearance(s) in .ent/.mesh/.app file(s)
If you don't, you should check out Adding decals, Changing materials, colors and texturesor other guide for your case.
For resource patching you only ship what you've made. Open your .ent/.mesh/.app files and delete appearances and materials that were there from vanilla. Keep your custom ones, make sure your appearances have a unique name!
When deleting materials, the names might get messy. That's because mats get names from the materialEntries
array, try to remember what materials are yours and don't forget to delete vanilla entries too. Also update the index of materialEntries if needed! (counting begins from 0)
You mostly can and probably should delete any other fields that you don't want to change. For example, in .mesh
files, if you don't change the mesh itself, you should right-click renderResourceBlob
and choose "Reset Object", same with lodLevelInfo
. That way the files only contain your changes and the rest is taken from vanilla game.
You should make a special folder for your mod, outside of the vanilla structures. Common pattern is your_name\mod_name\
(e.g. zhincore\new_gun_appearance
).
Move all your patch files to your folder, but remember where you took them!
For finding the old paths easier, feel free to just copy your files to their new place for now and delete the old ones after step 3.
Create an .archive.xl
file in your resources
folder if you haven't already (reuse it if you have one). It should be named your_mod_name.archive.xl
(best if you match it with your project name so the normal .archive is named the same).
Open the file in your favorite text editor and add the following lines:
Replace <source_file_path>
with the relative path to your patch file, e.g. modder\mod_name\gun_appearance.app
.
And replace <target_file_path>
with the relative path to the original file, e.g. base\weapons\firearms\rifle_assault\militech_ajax\w_rifle_assault__militech_ajax.app
.
In WolvenKit's Project Explorer you can right-click a file and choose "Copy relative path" and just paste in into your .xl
file. You don't have to write the paths manually!
You can repeat these lines for all the files you want to patch (just don't duplicate the first two lines).
And you should be good to go! Install your mod and test it.
How to make it iconic
Published: Jan 29 2024 by Last documented update: May 04 2024 by
This guide will show you an example for adding a modifier to an existing game item; in this case, making David's jacket iconic.
It will point you towards further reading material in case you want to dig deeper.
Find The Cyberpunk 2077 Game Directory. Then, create the following text document (you can name it what you want):
Paste the following contents into the text document and save it:
That's it. When you start the game now, the item's quality will be iconic.
You created a tweak edit.
If you want to safely delete a record property, set its value to None. For example:
You might not want to actually do it.
To add attachment slots to an item, you would need to change its blueprint property by either using other blueprints or create a new one using this guide
How to use a PBR material in Cyberpunk
Published: Jun 29 2022 by Last documented edit: Jun 29 by
This guide will teach you how to use a textured (also called PBR
, which is a subtype of textured and will work) material in Cyberpunk. It is a part of Changing materials, colors and textures — if you are missing information, check the parent page.
You have a CMaterialInstance
that can use your textured material.
If you don't have one yet, follow the steps under Changing materials, colors and textures, or skip to #finding-example-material-configurations and copy the entire material.
The default textured material in Cyberpunk can be found under
By setting it as the baseMaterial
, you're telling your item to load anything you configure under the values
array.
metal_base
's full properties are documented under Textured (PBR) material properties.
For a full list with explanations, see Material properties
Some of the most common properties for metal_base are:
Name | Type | Description |
---|---|---|
Tough luck, this is the only textured shader we have. Time to get converting :)
Search for metal_base in your asset browser:
Right-click on the entry, and select "find files using this". That will get you every base item with a textured material.
With what you now know, you can dig through their material instances and find example parameters.
How to add decals to existing items
Published: Jan 21 2024 by Last documented update: Mar 21 2024 by
This guide will teach you how to add decals to existing items.
You can find a #video at the end of the guide (courtesy of Island Dancer).
Any links in the guide will lead to extra information and are not required to complete it.
It will walk you through the following:
#step-1-cutting-the-decal-mesh
Adding it to the mesh entity
Setting up the material
To add new items to the game, check Adding new items
To learn about materials, check the Shaders section or follow the links from there.
This guide assumes that you have an existing Wolvenkit project with your item and just want to add the decal mesh. If you don't have one, you can grab the template project from ItemAdditions: Dynamic Appearances.
Inside your Wolvenkit project, you need an .xbm texture for your decal, and its .png export that we'll use for Blender. If you don't have a texture yet, you can
add any .xbm to your project (and put it in a custom path)
Replace this png with your decal
import the png again (premultiplyAlpha
must be checked)
For this guide, I will be using a sock mesh.
Start by exporting your mesh from Wolvenkit and importing it into Blender. You should see something like this:
In the viewport, click on the submesh that you want to have the decal.
If you want it to span multiple submeshes, you should merge them into one submesh to cut from. Shift-click to select them all, then duplicate them (Hotkey: Shift-D
) and join them together (Hotkey: Ctrl+J
).
Switch to Edit Mode (shortcut: Tab
)
Turn the viewport to the side (shortcut: Numpad 3
)
Turn on X-Ray mode (shortcut: Alt+Z
). This lets you select right through the mesh, in my example, on both sides of the leg.
Use the selection tool (shortcut: W
, it should be active) to select your decal mesh. It should look something like the left side of the screenshot below.
We will refine this later — select generously, too much is a lot better than too little!
Duplicate these vertices (Shortcut: Shift+D
)
Split them into a new submesh or new submeshes (Shortcut: P
-> Selection)
You should now have something like the right half of the screenshot.
This guide will add a new chunk to an already-existing mesh.
For more advanced cases (such as use with dynamic variants), you can split off the decal into its own file, or you can use an extra appearance that will hide all other submeshes.
If this is your first rodeo, do not do any of that.
If you take a look at the outliner, you will notice a new submesh in the scene collection. This is your decal mesh. We need to change its name to register it as a new chunk.
Switch back to Object Mode (Hotkey: Tab
)
In the Outliner, click on your meshes until your decal mesh lights up
Change the name: it needs to be the submesh with the highest number (see the red box in the screenshot below). Double-click the name, then change it to (in this example)submesh_04_LOD_1
.
Depending on your mesh, you will end up with a different number than 4!
With your new submesh selected, it's now time to clean up.
Switch back to Edit Mode (Hotkey: Tab
)
Cut away all vertices that you don't need. (Hotkey: X
)
As the decal shader supports transparency, you can be generous here as well. Having too much is better than having too little!
After cutting away everything that you don't want/need as part of your decal, select the rest (Hotkey: A
)
The decal should be one piece, so let's make sure to merge by distance now (hotkey: M
).
Now, let's make sure that our decal is above the surface of the original mesh by using the Shrinkwrap Modifier
.
I'll show you how to do this in a way that preserves potential garment support. If you run into issues with your decal mesh (being invisible or crooked), you can always delete it later.
Switch back to Object Mode (Hotkey: Tab
)
Duplicate your mesh (Hotkey: Shift+D
)
Select just one of the two meshes, and switch to the Data tab
Delete all shapekeys (starting at the bottom).
If your mesh doesn't have any, you can skip step 13 and delete your extra duplicate.
Now, switch to the Modifiers
tab. Leave the Armature modifier alone.
Add a Shrinkwrap
Modifier (Deform -> Shrinkwrap).
Configure it. Try the standard parameters below — if you have clipping, you can play around with the modifier after.
target
: The mesh you originally cut from (you can use the eyedropper symbol)
Wrap Method
: Select Nearest Vertex
Offset
: 0.0005 m
(sometimes it's necessary to increase it to something like 0.002 m
)
Your decal should be floating directly on the surface of your mesh, with just enough offset that it's not clipping. When you're satisfied, apply the shrinkwrap modifier:
Now let's merge it with the original submesh with the garment support. Select the duplicate that you made in Step 6.
Switch to Edit Mode (Hotkey: Tab
)
Select all vertices (Hotkey: A
)
Delete them (Hotkey: X)
Switch back to Object Mode (Hotkey: Tab
)
First, select your decal mesh (with the offsets) by clicking on it in the Outliner
Second, select your empty mesh (with the shapekeys) by shift-clicking on it in the Outliner
Now, join them together (Hotkey: Ctrl+J
)
You now have a decal mesh with an offset and garment support shapekeys. Awesome! Let's take care of the material now.
With your new submesh selected in Object Mode, switch to the Shading perspective. Delete the existing material assignment and create a new material:
Click the X above the node browser to delete the existing material assignment
Create a new material
In the node browser, add a new image texture (Hotkey: Shift+A, Texture -> Image Texture)
Click on "open" in the orange node and point the path to your decal png
Drag-and-drop the "Color" dot on the orange box to the "Base Color" dot on the green one
If your mesh's surface hasn't changed yet, you need to assign the material:
Open the Material tab
Switch to Edit mode (Hotkey: Tab
)
Select all vertices (Hotkey: A
)
Assign them to your new material
For more information on this, check UV Mapping: texturing a 3d object (but the page will only send you back here).
Our decal is now showing our new material. Make sure that it has exactly one UV map by checking the Data
tab:
Time to change to the UV Editing
perspective. You should be in Edit Mode (Hotkey: Tab
if not) and have all pixels of your decal mesh selected (Hotkey: A
if not).
You will see something like this (to learn more about UV maps, look up our theory page):
We will now unwrap our decal. I'll do both UV islands at once - if you have only one (because your decal is on a jacket or something), then your life will be easier.
You should be unwrapping a roughly rectangular 2d surface that has undergone merge by distance
. If you haven't done that yet, refer to Step 3, item 4 — or read up on UV seams.
With everything selected in the UV Editor
on the left, select UV -> Unwrap -> Unwrap (Hotkey: Ctrl+U
)
This will unwrap the mesh. Hopefully, you get nice and clean UV islands. If not, you may have to play puzzle
I'll show you a simple example of doing it by hand. If you want anything more complex, you should hit up Google, as there are plenty of best practices and even Blender add-ons.
At the end, we want a nice and straight grid over the full width and height of the decal, with the correct orientation. Let's start by fixing up the UV islands.
Select a row or column. From the right-click menu, select one of the following:
Straighten
: Will put them all in a line
Align Auto
, which does one of the following:
Align Horizontally
: Will put them all on the same Y-axis
Align Vertically:
Will put them all on the same X-axis
Keep doing that until you have a nice grid.
While straightening out your UV layout, keep an eye on your decal in the viewport on the right. Sometimes, vertices need to be crooked, or your mapping will look like shit.
If you can't get a grip on your OCD, you can shift vertices over the mesh's surface by clicking on them, then pressing G
twice and sliding them along the edges.
If you have multiple UV islands, you can move them on top of each other.
Make sure to keep a little offset between the vertices, because Blender's glb export does not play nice with shared UV coordinates — it will split your mesh into a million individual triangles.
If you need an exact identical layout, know that the UV mapping tiles infinitely, so you can simply select one of the islands and move it by a full tile in any direction (G -> X -> 1)
Check the individual decals in your viewport and fix up any that are flipped/rotated:
Click on a vertex in the viewport
Select linked (Hotkey: Ctrl+L
)
Fix the UV mapping (Right-click: Flip horizontal/vertical, or rotate)
When you are done, export your mesh from Blender to glb. Include all submeshes.
Now it's time to head back to Wolvenkit and activate our new decal chunk.
This guide will add a new chunk to an already-existing mesh.
For more advanced cases (such as use with dynamic variants), you can split off the decal into its own file, or you can use an extra appearance that will hide all other submeshes.
If this is your first rodeo, do not do any of that.
After successfully importing your new submesh into Wolvenkit and open it.
First, we need to add your new chunk to each of your appearances. For this example, we will use the material decal
.
Find the appearances
array at the top of the file and expand it.
Under each appearance, find the chunkMaterials
array and expand it.
If you already have an entry for your new submesh, change its value to decal
. If you don't, right-click on the last entry to duplciate it. You should now have something like this:
If you save your mesh now, file validation will complain that the decal
material doesn't exist. It's right; we haven't added a material definition yet. Let's do that.
Find the materialEntries
array inside your mesh and duplicate the last entry
Change its name
to decal
Make sure that isLocalInstance
is checked
Increment its index
by one (e.g. 29 -> 30)
Now that our chunk knows which material it's supposed to look up, we need to provide the actual material.
Find the array localMaterialBuffer
Find the array materials
(directly underneath)
If it's empty, go back up and find preloadMaterialBuffer
instead
Duplicate the last entry. This is your new decal material. Now we need to make sure it behaves like a decal, too.
Change its baseMaterial to base\materials\mesh_decal.mt
.
This will tell the game which shader to use, and mesh_decal is for exactly this.
As of now, your decal will be completely transparent. Let's change that.
Now we need to get the right material properties. The easiest way is to find another material that uses mesh_decal and steal them from there:
Sort the results by file type by clicking on the column, then find and open a .mi
or .mesh
Switch back to your own mesh and copy these values into your mesh_decal material's values
array (the one from step 3.3)
If you don't have one, go back to #prerequisites -> #the-rest
The other properties should be numbers only. If you don't know what they do, you can delete them for now.
Consider converting your mod to use ArchiveXL: Patching appearancesfor much better compatibility and smaller mod size!
See Textures: Importing, editing, exporting -> #troubleshooting
See Troubleshooting your mesh edits
See Materials: troubleshooting
Put your item in place of a default game item. Supports variants.
Created & Published: November 05 2022 by @manavortex Last documented edit: Feb 28 2024 by @manavortex
This tutorial will teach you how to switch a player mesh for an NPC garment and map its variants to the existing colours.
Other relevant know-how for this process (you don't need to read them if you already know which item you want to replace):
For a guide how to import meshes into Cyberpunk, check .
Make sure that you replace an item that you can actually spawn — not all items in V's folder are actually spawn-able =>
Perquisite: You need a Wolvenkit project.
Find the mesh that you want to use ("the old mesh") and replace it with the one that you want to switch in ("the new mesh").
Example: Replacing the short-sleeved poser jacket with the monk shirt with the tied-back sleeves. For the male variant, replace _pwa_
with _pma
_ and _wa_
with _ma_
.
Find both files in the Asset Browser and add them to your project.
Move the replacement mesh to the original mesh's folder.
Rename the old mesh (e.g. "t2_084_pwa__short_sleeves.mesh
" -> "original.mesh
").
Rename the new mesh to replace the old mesh (e.g. "t2_135_wa_jacket__monk_shirt.mesh
" -> "t2_084_pwa__short_sleeves.mesh
")
Open both meshes in WolvenKit by double-clicking them in the Project Explorer — we will now transfer the appearance names to enable variants.
The game looks up appearances in a mesh file by name. If none can be found, then game meshes will fall back to the default
appearance, which is how the early replacers worked — every variant (base_01, old_01, rich_01) would simply spawn the default appearance.
We can simply transfer the names from the old mesh to the new mesh by renaming the entries in the appearances array.
Now that we have done that, we can start recolouring.
Each appearance in the appearances array has a list of chunkMask entries (one per submesh), which are assigned a material by name.
You can now save your mesh, then install your mod by clicking on the green arrow in Wolvenkit's toolbar. Once you have started up the game, the old item will now look like your new mesh — including its variants.
Enjoy!
Changing how an item looks in-game
Published: November 05 2022 by Last documented edit: Jun 29 by
This guide will teach you how to edit an item's material, changing its appearance.
For a step-by-step walkthrough for a recolour of the Netrunner suit, check
If you want to edit emissive (glowing) material, check ->
For an overview of base materials and example files, you can check .
If you want to learn how mesh material assignment works in general, you can check the .
For details on changing materials, check .
If you just want to use a textured material, check
You can find a video guide on (It's also embedded below)
Wolvenkit's most recent version ( | — guide has been written with 8.11)
A
Most likely >= 1.6.7 (get the )
If you are editing a basegame material, you need to install from Nexus.
For a complete noob, including setup of the tool(s): ~1h Once you know what you're doing: <5 minutes and as much time for fine tuning as you want
This guide will take you through the following steps:
Please keep in mind that video guides might be outdated, as they are much more difficult to update than a wiki page. Refer to the written guide below if you run into any troubles!
Estimated time: ~5 minutes for total noobs, unless you get side-tracked badly
Make sure to follow it so you're editing the correct material!
One per body gender (m/w), this is shared by all appearances (basic_01
, basic_02
, rich_01
, rich_02
). For the female vest, it's
base\characters\garment\player_equipment\torso\t2_002_vest__puffy\t2_002_pwa_vest__puffy.mesh
This picks the appearance from the mesh file, which you'll need for the next step. Here's how they connect:
Again, you can look these up in the .app file!
Add it to your Wolvenkit Project (double-click or right-click -> Add to Project)
Open your mesh file in Wolvenkit by double-clicking it.
Find the array appearances
at the very top, and expand it.
Find the appearance by the name that you found in Step 0 (example: bwstripes
), and expand it
Find the chunk material names. These define the material:
Starting with Wolvenkit 8.15, you can right-click on a chunk and click on "Select Material" from the context menu. For earlier versions, you have to find the material yourself - proceed to the next step.
Depending on your mesh, the material instance will be in one of two places: either under localMaterialBuffer.materials
, or under preloadLocalMaterialInstances
.
(If you don't see preloadLocalMaterialInstances, that means it's empty and has been hidden.)
Inside the array, find your material by name:
Most materials in Cyberpunk use multilayered.mt
as base material — this is how everything looks so good without 100 GB of extra textures. It's slightly more complex than editing textures because you need an extra tool, but you will love it once you're over the worst shock.
You will (hopefully) see a material with three entries in values
(order doesn't matter):
First, add the .mlsetup to your project. You can either expand the CKeyValuePair
and click the yellow button, or copy the depot path and use the Asset Browser.
Export the file, overwriting the original .mlsetup.json
Switch back to Wolvenkit
This is already working. You can pack the project and see it in action!
Congratulations! You modded an item! If that's all you wanted, you can now go and do whatever you want. You can even delete the mesh from your mod and pack only the .mlsetup
!
Of course you have only changed an in-game texture, which may cause side effects — especially if other mods do the same. To change that, keep reading!
Instead of changing an in-game file, you can also replace it with your own.
Rename your file to something nobody else will touch, e.g. manavortex\mlsetups\my_custom_vest_appearance.mlsetup
Copy the new relative path (right-click), and update your mesh:
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. That is, unless your mods are in REDmod format, which will be loaded even later and in order of their folder names.
Understood? No? That's fine. Just keep it unique. :D
You can rename a material by changing the "name" property inside the CMeshMaterialEntry
in the materials
array:
As of Wolvenkit 8.15, chunkmaterials will not auto-update, but you can use Search and Replace from the Context Menu to rename everything at once.
To add a new material to a mesh, you can simply right-click on the materials
array:
Replace your clothes with an NPC's that requires blender editing.
This tutorial will teach you how to swap player's clothing items with NPC's that requires blender editing.
This tutorial will not cover changing materials and appearances from an NPC's mesh to player's. For that, visit the tutorial . To add an item rather than replacing one, see .
Without mesh editing, some NPC meshes will clip quite badly, because they don't have as many poses and animations as V. Some are even worse, since they'll be flying around rather than following V's movements.
In this guide, we'll fix up a coat by transferring weights from a different item. Prerequisites: - - - Wolvenkit
Prerequisite: you have the mesh that you want to fix already in your project. For this tutorial, we'll want Maman Brigitte's jacket: t2_001_wa_jacket__maman_brigitte.mesh
Use the to find a player mesh of roughly the same size/length/cut. For this tutorial, we'll use River's coat:
t2_087_pwa_jacket__river_short
For female body gender, search for _pwa_
For male body gender, search for _pma_
Add it to
both meshes
Open Blender
delete the standard objects from the scene (Shortcut: A -> X)
Import the player mesh (File -> Import -> Cyberpunk GLTF)
Import the NPC mesh
Delete or hide the NPC item's armature
Delete the NPC item's armature modifier (or make sure that it points at the player item's armature)
Repeat the process for each submesh.
If you don't have the same number of submeshes, you can simply use the "biggest" mesh you have (e.g. the coat's base mesh rather than the seams)
Select the player item's mesh
Select the NPC item's mesh
Switch to Weight Paint mode in the dropdown on the top left of your viewport
Select "Transfer Weights". Use the settings from the second screenshot.
Make sure that the NPC mesh's armature modifier is targeting the player armature:
Make sure that you select Object Mode while adding modifiers.
Select all submeshes under the NPC's armature
Use the Wolvenkit Blender plugin to export them over the player item's mesh (overwrite it)
Switch to Wolvenkit
Import the player item's mesh via Import Tool
Optional: copy the NPC's appearances, materials and material definitions to the player mesh
Optional: rename the appearances to match those in the original player item
Sometimes you will need to do a bit more of editing but that is not a topic for this tutorial.
Now you have functional clothing attached to the player and not flying arround.
Irons, threads and everything else
This section contains guides how to alter or overwrite already existing items (please see the page tree in the navigation menu on the left).
This section collects the guides about changing an item's visuals. For changing an item's properties, check
If you want to look up , find the corresponding page in .
Tool/Software | Version |
---|---|
Unless your previous material was already using mesh_decal, right-click on the values
array and
Open the and search for base\materials\mesh_decal.mt
Right-click on the file and select
Find the decal material inside the other file, and
Adjust the properties. Find the one that says DiffuseTexture
and point its DepotPath
to your decal's .xbm
(right-click it and select )
. If you have done everything right, then your mesh should now have a decal!
If there are more entries than variants available, or if you're just curious which spawn code corresponds to which appearance, go for a guide how to find out.
For a full guide on , follow the link (you don't have to).
For a more detailed explanation, you can check , but all we care about right now is this lookup chain:
For a guide on how to edit an .mlsetup file (or to change an item's appearance in general), see .
This process is detailed under -> .
Find the file from mesh.DepotPath in your .
To learn how appearances and materials connect, you can read . This is not necessary for this guide.
Go back to and look it up in the .app file
If you see multilayered.mt
as the baseMaterial
, you have to edit this with . Fortunately, it's not very difficult.
If you'd rather use a textured material, see the sub-page.
Key | Value (DepotPath) |
---|
For a detailed explanation of those properties, see
If you want an explanation of the Multilayered shader, check .
To learn more about MultilayerMasks (or how to make your own), check
For more intel on normal maps, check
In the project explorer under Wolvenkit's archive
folder, right-click on the mlsetup
file
This folder will only be visible in the "source" or "archive" tab of your
Select ""
If you don't have MLSetupBuilder installed, you need to . If you don't know how to use it, please check
Optional: If you don't see an mlsetup.json
in your project, switch the to source
or raw
.
Right-click on the file and .
For a documentation of multilayer properties, see . For a list of reference images, check
and .
Right-click on the .mlsetup.json
and
If it doesn't work, you need to install from Nexus.
Consider converting your mod to use for much better compatibility and smaller mod size!
and test it!
If you don't know how to import meshes, visit this
For adding appearances and materials, visit this
If you have any questions about modding join server and we will help you out.
>= 8.12 for Cyberpunk 2.1
>= 4.0
the most recent one, but at least 1.5.2.2
basic_01 | default |
basic_02 | bbstripes |
rich_01 | gbstripes |
rich_02 | pwstripes |
the old mesh |
|
the new mesh |
|
BaseColor
Texture
The base texture of your item
BaseColorScale
Vector4 / Color
If you re-select it after setting the name, Wolvenkit will show you a colour editor. This tint will be applied over your BaseColor for easy creation of variants!
Metalness
Texture
How metallic/shiny your material is
Roughness
Texture
How shiny/rough your material is
Normal
Texture
Path to your normal (bump) map texture
AlphaThreshold
Scalar (number)
Transparency threshold. Only works if the material IsMasked
Emissive
Texture
Texture for glow (with transparency andIsMasked
or black/white, you can control which parts of the item glow)
EmissiveEV
Scalar (number)
Brightness of the glow. 3 is a good neon lamp, 6 might cause loss of vision, 12 will kill vampires immediately
EmissiveColor
Color
What it says. This defaults to white.
LayerTile
Scalar (number)
Seamless tiling factor
|
|
|