Guide:Replacing strings: Difference between revisions

Added images, misc tweaks
(Added string replacement tutorial)
 
(Added images, misc tweaks)
Line 1:
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 ==
Line 7 ⟶ 9:
=== Example project ===
 
The string toolkit comes with ana examplesample project in the <code>example</code> directory. toThere testyou the script. The directorywill containsfind 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:
Line 16 ⟶ 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.
 
[[File:String Toolkit screenshot.png]]
 
== Adding custom strings ==
 
NowTo that you know the script is working, you can start makingmake your own custom string replacement mods., Youyou 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>
Line 30 ⟶ 34:
=== 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.
 
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:
 
<pre>
309,SLY MODDING IS FUN!
</pre>