Guide:Replacing strings

This tutorial will walk you through the steps of using Sly String Toolkit to make mods that replace strings in Sly 2.

Setup
First, download Sly String Toolkit from github here. If you have git, you can also clone the latest version directly from the repo.

Example project
The string toolkit comes with an example project in the  directory to test the script. The directory contains a file called. It contains two strings that replace the text on the title screen, "Press START button for New Game" and "Press SELECT button for Menu".

To generate the  file, open a command prompt, cd to the main directory, run this command:

python main.py -i exmaple/string.csv

Then copy  from the   folder to your   folder, enable cheats, and start Sly 2. You should see the new text on the title screen.

Adding custom strings
Now that you know the script is working, you can start making your own custom string mods. You will need to make a csv file (a spreadsheet) with all the custom strings you want. Each row should have the following format:


 * is the ID of the string you want to replace
 * is the string to replace it with
 * is the address to write the string to. If not specified, it will be written with the rest of the strings in a block at the address specified by the  option.

Everything after the third column is ignored by the script, so you can use them for notes if you want. You can use the csv file from the example project as a base or make the file in Excel or Google Sheets, then export it as a CSV.

String IDs
Every string in the game has a unique ID. You will need to know the ID of any string you want to replace. Fortunately the game stores all these strings in a large table, which we have compiled into this spreadsheet. However, the sheet is incomplete and will be expanded in the future.

Find the string in the string table you want to replace, and in your spreadsheet put that ID in the first column. In the second column, put the string you want to replace it with.

For example, if you want to replace the string "WE'LL BE RIGHT BACK!" on the pause menu (which has ID 309) with "SLY MODDING IS FUN", your csv should look like this:

309,SLY MODDING IS FUN

Generating the mod pnach
Once you are ready to test the mod, run the script with the following command:

python main.py -i 

If you aren't familiar with the command line and don't know how to input the path to your csv file, just name it  and put it in the same folder as   script. Then simply run the script with:

python main.py

This will generate a file called  in the   folder. Place the pnach file in your  folder and enable cheats, and your custom strings should appear in game.

Setting the output directory
For a faster workflow, you can use the  option to set your output directory to your   folder so you don't have to copy the file over every time you run the script. Run the script as follows:

python main.py -i  -o 

Your PCSX2 folder directory probably looks something like this: C:\Users\Yourname\My Documents\PCSX2 1.6.0\cheats. So, you can run the script as follows (with quotation marks around the directory):

python main.py -i  -o "C:\Users\Yourname\My Documents\PCSX2 1.6.0\cheats"

Conclusion
That's everything you need to know to make string replacement mods for Sly 2. If you have any questions, feel free to ask in the #mod-help channel on the Discord server.