Guide:Replacing strings: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(Added string replacement tutorial)
 
(Added images, misc tweaks)
Line 1: Line 1:
This tutorial will walk you through the steps of using [[Sly String Toolkit]] to make mods that replace strings in Sly 2.
This tutorial will walk you through the steps of using [[Sly String Toolkit]] to make mods that replace strings in Sly 2.

'''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.


== Setup ==
== Setup ==
Line 7: Line 9:
=== Example project ===
=== Example project ===


The string toolkit comes with an example project in the <code>example</code> directory to test the script. The directory contains 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 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".


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, cd to the main directory, run this command:
Line 16: Line 18:


Then copy <code>07652DD9.mod.pnach</code> from the <code>out</code> folder to your <code>pcsx2/cheats</code> folder, enable cheats, and start Sly 2. You should see the new text on the title screen.
Then copy <code>07652DD9.mod.pnach</code> from the <code>out</code> folder to your <code>pcsx2/cheats</code> folder, enable cheats, and start Sly 2. You should see the new text on the title screen.

[[File:String Toolkit screenshot.png]]


== Adding custom strings ==
== 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:
To make your own string replacement 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:


<code><string id>,<string>,<optional target address></code>
<code><string id>,<string>,<optional target address></code>
Line 30: Line 34:
=== String IDs ===
=== 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 [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.
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.
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:
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:


<pre>
<pre>
309,SLY MODDING IS FUN
309,SLY MODDING IS FUN!
</pre>
</pre>