Moving and renaming in existing projects
How to avoid changing every single depotPath in your mod by hand
TL;DR:
Check the following steps:
Exporting the files to JSON
In Wolvenkit, save all your open tabs and close them. You don't want any files to be open in Wolvenkit for what comes next.
Move and rename your files and folders, e.g.
tutorial\myshirt
toyour_modder_name\my_tshirt
. (If Wolvenkit doesn't let you, you can use the Windows Explorer.)
Make sure that you stick to lower case letters and use _ instead of spaces!
Good: your_modder_name\my_tshirt
Bad: yourModderName\myShirt
Horrible: your modder name\My Shirt
In Wolvenkit, right-click on the top level folder under archive and select "Convert to JSON"
Changing the file paths
We will use Notepad++ to adjust the file paths in all files in your project. For that, we need to find and replace the following entries. If you aren't sure about that, see the next section.
What kind of file: | Find What (your old path) | Replace with (your new path) |
---|---|---|
Inside the .archive (with double slashes) |
|
|
in resource files (e.g. .xl) |
|
|
in script files (e.g. reds) |
|
|
If you already know what to do, you can skip forward to Importing Back.
Preparation: what do I replace again?
Switch Wolvenkit's project browser to
raw
, then open one of the created.json
files in Notepad++.Use "Search: Find in Files..." (
Ctrl+Shift+F
)In
Find What
, enter the name of your old folder (e.g.tutorial
)Click
Find All
- that will give you all the entries you have to replace.
Make sure that you are using the same kind of slashes. If the old path has double backslashes, the new path must have them as well.
![](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%252FC4gXlMa4Pkhunttfze5C%252Fsearch_and_replace_find_in_files.png%3Falt%3Dmedia%26token%3D6a2803c3-758f-4f20-bdcd-8d3b7cfce027&width=768&dpr=4&quality=100&sign=e8f272b2&sv=1)
We goin' in
You know what to replace now. For every type of entry, do the following:
Use "Search: Find in Files..." (
Ctrl+Shift+F
)Check the
Follow Current Doc.
checkbox.Click into the
Directory
field. It now has the path to the file you've just openedCut off the subdirectories: you'll want to search and replace directly under
source
For
Find what
put the name of your old folder that you copied in step 6For
Replace with
put the name of your new folder. Make sure that you have double backslashes!Click on
Replace in Files
![](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%252FImgDyVDpQTxK9gCG2F2N%252Fsearch_and_replace_in_files.png%3Falt%3Dmedia%26token%3Df8832f1b-ce3e-418e-a57c-636ec3577ff0&width=768&dpr=4&quality=100&sign=bb4f85f7&sv=1)
Importing back
Now that we have changed the paths, we need to get those changes back into our Wolvenkit project. In the project's raw
view, right-click on the toplevel folder and select "Convert from JSON" (however it is named, there's just one item that will let you import your json files)
Deleting leftover files
If you have packed any tutorial projects before renaming files or folders, make sure to delete leftover files from your Cyberpunk 2077 directory. It's easiest to search the root folder for tutorial
and delete everything that looks like your old stuff — if it's from your project, the next install will put it back.
That's it! Have fun!
Last updated