You will need:
CP77Tools
WolvenKit (Nightly required for 2.0 support as of Oct 2nd 2023)
Notepad++
Python (I personally have 3.7.9 but any version should do)

This is a brief guide for modders. I won't be going heavily into detail and you'll need to figure out how to install the various programs/tools yourself.

First we'll be using CP77Tools and here's how...

Example using CP77Tools with Command Prompt:
G:
cd "G:\Games\Cyberpunk 2077 mods\1 - tools\CP77 Tools 1.2"
CP77Tools.exe unbundle -p "G:\Game Install\Cyberpunk 2077\archive\pc\content\basegame_4_gamedata.archive" -o "G:\Games\Cyberpunk 2077 mods\1 - tools\Extracted\basegame_4_gamedata"

The reason there's a G: is because it starts on C and G is the drive my files are on. CD is the change directory command.

We then know the file we want is base/gameplay/gui/world/internet/templates/atlases/icons_atlas.inkatlas so navigate to that extracted directory.

If you google you may be misled into believing you can open the XBM file with XnView or InfranView. Normally you could. But CDPR does something fucky.

So you'll need to open WolvenKit and create a new project then open the resources folder and copy icons_atlas.inkatlas and icons_atlas.xbm into that project's resources folder.

You can then view the inkatlas for the names and see the image in the bottom left looking at the xbm.

Should you want to create your own:
https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators/files-and-what-they-do/game-icons-the-inkatlas-file
https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators/modding-guides/everything-else/adding-items-atelier-integration#generating-an-icon
https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators/modding-guides/custom-icons-and-ui/adding-items-preview-images
https://wiki.redmodding.org/wolvenkit/wolvenkit-app/usage/import-export/textures

Then use the Virtual Atelier generator: https://jovial-shockley-612ec8.netlify.app/

Only put your store ID, store name, the atlas resource you're using, and the texture part name and add two of your items with whatever price you want everything. We'll be copying that text at the top into our own *.reds file. You can create and edit it with Notepad++, make sure your Encoding is UTF-8.

If you have a list of the items you want to add, like for me I had 402 items you can use Notepad++ to find and replace to fix them up for you.

For instance you could find Items and replace it with "Items and , 1) with ", \r\n" (without the quotes) which is the carriage return and line feed which are standard line break characters in Windows. You should then have them all on one line separated by commas.

As for the prices and rarity, I have some python codes you could run. Just edit them as necessary.

prices.py:
# Create a list with 100 repeated 402 times
numbers = [100] * 402

# Convert the list to a string with the desired format
output = "[" + ", ".join(map(str, numbers)) + "],"

# Print or save the output as needed
print(output)

rarity.py:
# Create a list with "Legendary" repeated 402 times
items = ["Legendary"] * 402

# Convert the list to a string with the desired format
output = "[" + ", ".join(['"' + item + '"' for item in items]) + "]"

# Print or save the output as needed
print(output)

And as a bonus:

rarity.py if you want to have a quantity after:
# Create a list with "Legendary" repeated 402 times
items = ["Legendary"] * 402

# Convert the list to a string with the desired format
output = "[" + ", ".join(['"' + item + '"' for item in items]) + "],"

# Print or save the output as needed
print(output)


You'd save those those with their respective names, changing the 402 to however many you need and the [100] to whatever price you want to charge.

If you want to set prices individually, you go right ahead. But with a huge store I don't have it in me to do that.

You'd run that like so with Command Prompt:
G:
cd "G:\Games\Cyberpunk 2077 mods\0 - mine\testing"
rarity.py
prices.py


You highlight and copy the outputs to get what you need. Just drag with left click and press enter to copy in command prompt.

You can then delete the quantity row after the rarity because we won't be needing that. Unless you do. Then you can use what you've learned thus far to generate what you need.

If you do something wrong when you try to launch the game it'll tell you there's an error and to look up the log. Those are located in Cyberpunk 2077\r6\logs\redscript_rCURRENT.log

A good example is:
[ERROR - Mon, 2 Oct 2023 22:34:49 -0500] At G:\Game Install\Cyberpunk 2077\r6\scripts\PhantomLiberty2-atelier-store.reds:11:3: );
^
syntax error, expected one of "!", "(", "-", "[", "\"", "n", "r", "s\"", "t", "~", ['-'], ['0' ..= '9' | '.'], an identifier

Which indicates line 11 character 3 which would have been ); for me but the line above that I had ], which should've just been ] because I removed the quantity line - make sure you don't make the same mistake. I supplied an updated rarity.py without the trailing comma that should help prevent this mistake.

Article information

Added on

Edited on

Written by

XunAmarox

1 comment

  1. xvilho
    xvilho
    • supporter
    • 4 kudos
    Good guide. I edited the .py to merge both of those scripts into one. prompt when ran for  how many reps you need. and writes it to output.txt

    # Ask the user for the number of repetitions
    repetitions = int(input("Enter the number of repetitions: "))

    # Create a list with 100 repeated 'repetitions' times
    numbers = [100] * repetitions

    # Create a list with "Legendary" repeated 'repetitions' times
    items = ["Legendary"] * repetitions

    # Convert the 'numbers' list to a string with the desired format
    numbers_output = "[" + ", ".join(map(str, numbers)) + "],"

    # Convert the 'items' list to a string with the desired format
    items_output = "[" + ", ".join(['"' + item + '"' for item in items]) + "]"

    # Combine both outputs into one string
    combined_output = numbers_output + "\n" + items_output

    # Specify the filename
    filename = "output.txt"

    # Save the combined output to a text file
    with open(filename, 'w') as file:
        file.write(combined_output)

    print(f"Output has been saved to {filename}")