Guide:Replacing strings: Difference between revisions
Updated lead
TheOnlyZac (talk | contribs) (Fix typo) |
TheOnlyZac (talk | contribs) (Updated lead) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1:
{{Infobox guide
This tutorial will walk you through the steps of using [[Sly String Toolkit]] to make mods that replace strings in Sly 2.▼
| sly2 = y
| sly3 =
| difficulty = Easy
}}
▲This tutorial will walk you through the steps of using [[Sly String Toolkit]] to
'''Note:''' The toolkit currently only works with Sly 2 NTSC. It will be updated in the future to work with Sly 3, and possibly other regions.▼
▲'''Note:''' The toolkit currently only works with Sly 2 PS2 (NTSC and PAL). It will be updated in the future to work with Sly 3
{{To do|Add instructions for how to use Live Edit to update the strings in real time.}}
== Setup ==
=== Sly String Toolkit ===
First, download Sly String Toolkit from github [https://github.com/TheOnlyZac/sly-string-toolkit/releases here]. If you have git, you can also clone the latest version directly from the repo, but this guide is probably only accurate for the latest release version.
===
You will need to install Python 3.8 or higher from [https://www.python.org/downloads/ here] if you don't already have it. Then, open a command prompt and <code>cd</code> into the folder with the <code>main.py</code> script. Finally, run <code>pip install -r requirements.txt</code> to install the script dependencies. Now you're ready to generate a pnach file!
=== Build example PNACH ===
The string toolkit comes with a sample project in the <code>example</code> directory. There you will find a file called <code>strings.csv</code>. It contains two strings that replace the text on the title screen, "Press START button for New Game" and "Press SELECT button for Menu".▼
▲The string toolkit comes with
To generate the <code>.pnach</code> file, open a command prompt, cd to the main directory, run this command:▼
▲To generate the <code>.pnach</code> file, open a command prompt
<pre>
python main.py
</pre>
[[File:String Toolkit screenshot.png|480px]]
==
=== Making a CSV file ===
To make your own string replacement mods, you will need to make a
<code><string id>,<string>,<optional target address></code>
*
*
*
Everything after the third column is ignored by the script, so you can use them for notes if you want. You can use
==== 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
▲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 [https://docs.google.com/spreadsheets/d/1W-20RZ1hBz7ZtgRBKCNkH84MxkYsoqesDEBGv8l5BdA/edit?usp=sharing 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 "
<pre>
309,
</pre>
==
<pre>python main.py
The default region is NTSC. You can specify the region with the <code>-r</code> option like this:
<pre>python main.py <path_to_your_csv_file> -r pal</pre>
This will generate a file called <code>
===
For a faster workflow, you can use the <code>-o</code> option to set your output directory to your <code>pcsx2/cheats</code> folder so you don't have to copy the file over every time you run the script. Run the script as follows:
<pre>
python main.py
</pre>
Your PCSX2 folder
<pre>
python main.py
</pre>
{{Navbox guides}}
|