World Editing: deleting objects
How to remove items from the world with ArchiveXL
Last updated
How to remove items from the world with ArchiveXL
Last updated
Created by @manavortex Published in October 2023 Last (documented) update: December 2023
This guide will show you how to remove items from the world via ArchiveXL.
Difficulty: You know how to read. Everything else will hopefully become clear !
ArchiveXL >= 1.8.0
If you want to do it in Blender: Wolvenkit Blender IO Suite >= 1.5.0
Otherwise: RedHotTools >= 0.5.2
This section will walk you through the process of creating an .xl file to remove objects from the game world.
This guide will feature the manual process, which can get tedious if you want to remove at scale. There are two ways to automate the process:
Wheeze's Removal Editor (Link on GitHub, also has documentation there)
Generating the .xl file via Blender (see Blender and ArchiveXL
Although you can also work directly in your archive/pc/mod
directory, you should , so that you can easily pack your mod for Nexus deployment.
Visual learners, celebrate: OUiJIXOU and Proxima Dust made video guides for this!
Find the node information in the Inspect tab of RedHotTools (see Finding Locationsfor a detailed guide)
Create an .xl
file in your Wolvenkit Project's resources
folder and name it after your world deletion (e.g. delete_pacifica_fast_travel_terminal.xl
).
You can edit this file in Wolvenkit or in a text editor like Notepad++
We'll fill in the information in Step 3, this is how it will look:
Paste the following code into your .xl file:
Adjust the .xl file. Mind the leading spaces!
for path
, put the full path to your world sector as seen in RedHotTools (1., yellow on screenshot - base\worlds\03_night_city_compiled\default\exterior_-35_-35_0_0.streamingsector
)
for expectedNodes
, put the number of nodes in this sector (2., pink, 503 in the screenshot)
For each node that you want to delete, add an entry under nodeDeletions
:
- index
(the - is important): the node index (3., violet in the screenshot)
type
: the type of the node (4., turquoise in the screenshot)
Optional, but recommended: Run your XL file through yamllint
Save the .xl file
If everything worked, your object should now be gone.
Otherwise, check the Troubleshooting section.
If you have been working directly in your archive/pc/mod
directory, do not right-click on your .xl file and pack it. You have to create the following folder structure and then pack the archive
folder:
If you don't do that, you will drown in comments from confused users who don't know how to install your mod.
Hit up Editing locations in Blender and follow the instructions to import your sectors into Blender.
Optiona, but recommended: Save the blend file. There's no real way to undo stuff right now other than deleting them from the list by hand, and re-importing is tedious. If you save the file, you can use File -> Revert to undo all your changes.
Select and delete the objects that you want to get rid of.
Now it's time to get exporting.
This step will be made obsolete in a future update of the Wolvenkit Blender IO Suite (currently 1.5.0). The guide will tell you at which point you can skip ahead if that's the case.
In the Scene Collection (usually at the top right of your Blender viewport), select a sector collection.
Below the viewport in the right side panel, switch to the Collections
tab and expand the Custom Properties
header. You need a property with the name of expectedNodes
(green box).
If you have one, you can proceed to Generating an .xl file.
If you don't have one, keep reading.
First, you need to find out the number of nodes in your sector. We will do that in Wolvenkit.
Find the correct sector file and open it in Wolvenkit. (You can copy the name from the filepath
field in Custom Properties — the file should be in your project from your earlier export.)
In the CR2W editor, find the nodes
property and look at the count. That number needs to go into your new property in Blender.
Click New
to add a new property. It will be called prop and have a value of 1.000
.
Click the gear and add the property's properties:
Type
should be Integer
Property Name
shoudld be expectedNodes
Default Value
, Min
, and Max
should be the number of nodes from your sector file.
After you have made those changes, click OK.\
The value of your new property will probably still be 1 until you click in the field - then it will be updated with the only value possible.
Repeat this step for every sector file.
Switch to Blender's Scripting
perspective and create a new file.
Open this link (mana's github) and copy the contents into Blender's editor.
Edit the value of output_filename
— it has to be a valid path (and can even be your Cyberpunk mod directory).
Running the script will overwrite existing files. That's not a problem, but you need to take care of backups yourself.
When you're done, click the ▶ button in the toolbar to run the script.
You now have an .xl file. If you put it into archive/pc/mod
, the game should load it. Otherwise, check the Troubleshooting section of this guide.
This step is optional, but recommended, as the script might add nodes to the deletion list that you want to keep.
This is also how you can edit other people's sector presets. Want to keep your candles? Search for "candle" and remove them from the deletion list!
Open the generated .xl file in a text editor such as Notepad++.
Search for worldEntityNode
Keyboard shortcuts to find all in document in Notepad++: Ctrl+F
- Alt+D
Check the comment on top of a block to find out what it is.
If you want to keep something, remove the entire block from the .xl file (see screenshot).
Put the .xl file into archive/pc/mod
and start the game. (Don't put your Wolvenkit project, you don't need all that sector garbage!)
That's it! You changed the world - literally! Happy modding, choomba!
Do not pack the Wolvenkit project you used for Blender import - you don't need an .archive file
To add the .xl file to a Wolvenkit project, simply put it into the source/resources
folder and pack. Your mod will include only text files and be really tiny - ArchiveXL does all the heavy lifting.
If your zip for Nexus contains an .archive file, you've done something wrong here!
You can convert node removal scripts from ArchiveXL 1.8 format to 1.9 format by running this Python script on the file.
You need:
a Wolvenkit project with the sectors exported to .json
an .xl file
Change the following lines in the script:
While you can write directly to your output file, you really should not.
After running the conversion script, search your new .xl file for INVALID_NODE
to filter out any entries that could not be resolved.
Check the ArchiveXL log (you can find it in Cyberpunk 2077\red4ext\plugins\ArchiveXL\ArchiveXL.log
). For every block in your .xl file, you should see an entry like this:
Make sure that your file
has the extension .xl
is located in archive/pc/mod
or loaded as part of a REDmod (why are you doing this to yourself? You're testing. Put it in archive/pc/mod
!)
Check if the syntax is valid by running it through yamllint
Make sure that ArchiveXL is up-to-date and working
Check the expectedNodes
entry inside your .xl
file against the sector files inside Wolvenkit as per Adjust the sector collections' properties.
and launch the game.
If you have been a good bean and stuck to the instructions, you only need to and can skip the rest of this section.