Modifying game items with minimal conflicts
Published: July 23 2024 by Zhincore Last documented update: July 23 2024 by Zhincore
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.