Releases: TheOnlyZac/sly-string-toolkit
Sly String Toolkit v1.4.0
Changes
- Use
--clps2cswitch to output CLPS2C source code instead of raw pnach.
Full Changelog: v1.3.0...v1.4.0
Usage
python stringtoolkit.py [-g 2/3] [-r ntsc/pal] <options> input_file.csv
These arguments are required:
-g <game>- Which game the mod supports.2for Sly 2 or3for Sly 3 (required).-r <region>- Which region the mod supports. Can bentscorpal(required).
These arguments are optional:
-l <lang>- The language the pnach should work for (PAL only). If not set, it will affect all languages.-n <mod_name>- The name of the mod. Shows in the PCSX2 GUI. The output file will be<crc>.<mod_name>.pnach(default is the same as the input file).-a <author>The author of the mod. Shows in the PCSX2 GUI (default is "Sly String Toolkit").-o <output_dir>- The output directory for the pnach file (default is./out/).- Can be
en,fr,it,de,es,nd,pt,da,fi,no, orsv. - Only one pnach can be used at a time, so if your mod supports multiple languages, you must post them as separate patches.
- Can be
-c <asm_codecave>- Change the address of the codecave where the mod's assembly code is injected.-s <strings_codecave>- Change the address of the codecave where the custom strings are injected.--live-edit- Enable live edit mode. This will allow you to edit the strings in the csv and the pnach will automatically update.--verbose- Enable verbose output.--clps2c- Output CLPS2C source code instead of raw pnach-h- Show help.
For detailed setup and usage instructions, see README.md.
Sly String Toolkit v1.3.0
Changes
- Added support for Sly 3 NTSC.
- Changed main script from
main.pytostringtoolkit.py - Updated commandline arguments
- Custom addresses no longer need to begin with a 2 (e.g.
0x201a2b3crather than0x1a2b3c)
Full Changelog: v1.2.0...v1.3.0
Usage
python stringtoolkit.py [-g 2/3] [-r ntsc/pal] <options> input_file.csv
These arguments are required:
-g <game>- Which game the mod supports.2for Sly 2 or3for Sly 3 (required).-r <region>- Which region the mod supports. Can bentscorpal(required).
These arguments are optional:
-l <lang>- The language the pnach should work for (PAL only). If not set, it will affect all languages.-n <mod_name>- The name of the mod. Shows in the PCSX2 GUI. The output file will be<crc>.<mod_name>.pnach(default is the same as the input file).-a <author>The author of the mod. Shows in the PCSX2 GUI (default is "Sly String Toolkit").-o <output_dir>- The output directory for the pnach file (default is./out/).- Can be
en,fr,it,de,es,nd,pt,da,fi,no, orsv. - Only one pnach can be used at a time, so if your mod supports multiple languages, you must post them as separate patches.
- Can be
-c <asm_codecave>- Change the address of the codecave where the mod's assembly code is injected.-s <strings_codecave- Change the address of the codecave where the custom strings are injected.--live-edit- Enable live edit mode. This will allow you to edit the strings in the csv and the pnach will automatically update.--verbose- Enable verbose output.-h- Show help.
For detailed setup and usage instructions, see README.md.
Sly String Toolkit v1.2.0
Setup
-
Install Python 3.8 or higher.
-
Install the dependencies with
pip install -r requirements.txt -
Run
python main.py <input_file>to generate the.pnachfile.- Use the
-oargument to specify the output directory if desired.
- Use the
-
Put the
.pnachfile in yourpcsx2/cheatsfolder, enable cheats, and start the game.
Usage
python main.py <input_csv> <options>
The script supports the following optional arguments:
-o <output_dir>- The output directory for the pnach file (default is./out/)-n <mod_name>- The name of the mod. The output file will be<crc>.<mod name>.pnach(default is the same as the input file)-r <region>- The region of the game. Can bentscorpal(default isntsc)-d <dialect>- The language the pnach should work for (PAL only). If not set, it will affect all languages.- Can be
en,fr,it,de,es,nd,pt,da,fi,no, orsv. - Only one language pnach file may be used at a time.
- Can be
-l- Enable live edit mode. This will allow you to edit the strings in the csv and the pnach will automatically update.-v- Enable verbose output-h- Show help
Changelog
- Fixed bugs related to script args by @TheOnlyZac in #4
- Implemented csv live edit mode by @TheOnlyZac in #5
- Updated util scripts by @TheOnlyZac in #6
- Added Assembler utility class by @TheOnlyZac in #11
- Multiple language support for PAL version by @TheOnlyZac in #7
- Cleaned up and annotated code by @TheOnlyZac in #12
Full Changelog: v1.1.0...v1.2.0
Sly String Toolkit v1.1.0
Changelog
- Added support for PAL version (run the script with
--region palor-r pal - Tweaked commandline arguments
- No longer need to specify
-ifor the input file, just pass it as the first argument -onow sets the output directory, not the outfile file name-n <name>sets the mod name, the output file will be<crc>.<mod name>.pnach
- No longer need to specify
- Tweaked the order of the pnach file (first is the hook, then custom asm, then strings)
Sly String Toolkit v1.0.0
Setup
-
Install Python 3.8 or later.
-
Install the dependencies with
pip install -r requirements.txt -
Run
python main.pyto generate the.pnachfile.- Use the
-iand-oarguments to specify the input and output files.
- Use the
-
Put the
.pnachfile in yourpcsx2/cheatsfolder and start the game.
Usage
python main.py <options>
The script supports the following optional arguments:
-i <inputfile>- The name of the input csv file (default is./strings.csv)-o <outputfile>- The name of the output pnach file (default isout/07652DD9.mod.pnach)-a <address>- The address to write the strings to (default is203C7980)-d- Outputout.asmandout.binfiles for debugging-v- Enable verbose output-h- Show help
Strings File Format
The input file should be a CSV where each row has the following format:
<string id>,<string>,<optional target address>
<string id>is the ID of the string you want to replace<string>is the string to replace it with<optional target address>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-aoption.
Everything after the third column is ignored by the script, so you can use them for notes if you want. You can make the file in Excel or Google Sheets and then export it as a CSV.