World Editing: deleting objects
How to remove items from the world with ArchiveXL
Summary
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 !
Requirements
ArchiveXL >= 1.8.0
If you want to do it in Blender: Wolvenkit Blender IO Suite >= 1.5.0
Otherwise: RedHotTools >= 0.5.2
RedHotTools and ArchiveXL
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 create a Wolvenkit project, so that you can easily pack your mod for Nexus deployment.
Video guide
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'sresources
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:
![](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%252Fz6cB9PC8GcNew5WTuazX%252Fworld_sector_node_removal.png%3Falt%3Dmedia%26token%3D6da6711d-ba0b-4569-a869-91ee20604834&width=768&dpr=4&quality=100&sign=26034637&sv=1)
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)
Testing
Optional, but recommended: Run your XL file through yamllint
Save the .xl file
Install your project and launch the game.
If everything worked, your object should now be gone.
Otherwise, check the Troubleshooting section.
Packing your mod for Nexus
If you have been a good bean and stuck to the instructions, you only need to pack your Wolvenkit project and can skip the rest of this 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.
Blender and ArchiveXL
Prerequisites: Deleting the objects
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.
Adjust the sector collections' properties
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.
![](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%252FX8KQvEMJ5wgbextQhDpM%252Fediting_locations_selecting_sector.png%3Falt%3Dmedia%26token%3D69e2f4d0-3540-4408-b4d8-2aa936effd78&width=768&dpr=4&quality=100&sign=614619de&sv=1)
Below the viewport in the right side panel, switch to the
Collections
tab and expand theCustom Properties
header. You need a property with the name ofexpectedNodes
(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 of1.000
.Click the gear and add the property's properties:
Type
should beInteger
Property Name
shoudld beexpectedNodes
Default Value
,Min
, andMax
should be the number of nodes from your sector file. After you have made those changes, click OK.\
![](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%252FUsFv3LGKflzmRN9HuHIh%252Fediting_locations_edit_properties.png%3Falt%3Dmedia%26token%3D9ab68c47-1763-4503-95c5-ca5a6b027fb2&width=768&dpr=4&quality=100&sign=c24a966a&sv=1)
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.
Generating an .xl 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.
![](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%252Fhg82utVJ8me2O6KUMAmM%252Fediting_locations_blender_scripting.png%3Falt%3Dmedia%26token%3D948adc5d-296c-4644-9704-1ed83d034080&width=768&dpr=4&quality=100&sign=5264c9d4&sv=1)
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.
Removing potential false positives
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).
![](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%252FXHh3cHTmpgz21Y30Kr8g%252Fediting_locations_deleting_nodes_xl_file.png%3Falt%3Dmedia%26token%3D53c3744f-6fa3-4a04-8987-8b34ae0ac3b8&width=768&dpr=4&quality=100&sign=ba013e52&sv=1)
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!
Packing a Wolvenkit project
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!
Converting older node removals
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.
Troubleshooting
My edits aren't showing up!
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:
If you don't see those entries:
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 inarchive/pc/mod
!)
Check if the syntax is valid by running it through yamllint
Make sure that ArchiveXL is up-to-date and working
If you see "failed to patch" entries instead:
Check the expectedNodes
entry inside your .xl
file against the sector files inside Wolvenkit as per Adjust the sector collections' properties.
Last updated