ArchiveXL: Patching appearances
Modifying game items with minimal conflicts
Summary
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
Prerequisites
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.
Step 1: Delete the work of others
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!
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FusxF79eIHTEwhchcUfmg%252Fimage.png%3Falt%3Dmedia%26token%3D6ef04d04-1da6-4a6f-887d-53dbaa2a527f&width=768&dpr=4&quality=100&sign=f83f07f1&sv=1)
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.
Step 2: Move your files out of the way
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
).
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252Fl3hpDq1PM44h6fYfM7Ui%252Fimage.png%3Falt%3Dmedia%26token%3D2279ab3e-2aa3-4faf-98b4-710033b906f7&width=768&dpr=4&quality=100&sign=b219704f&sv=1)
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.
Step 3: Configure ArchiveXL
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).
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FiWv2whOhsAgKBc5GaTm2%252Fimage.png%3Falt%3Dmedia%26token%3De0e06d85-f763-4123-af55-54b8b3d0e2dd&width=768&dpr=4&quality=100&sign=fa74602&sv=1)
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.
Last updated