A WIP riivolution patcher for ISO/WBFS files (it is not guaranteed to work!)

Isaac f964584e8a more stuff 1 månad sedan
ram_dumps 8b7572618e first commit 1 månad sedan
tools 8b7572618e first commit 1 månad sedan
.gitignore 8b7572618e first commit 1 månad sedan
MyRiivolution.xsd 8b7572618e first commit 1 månad sedan
README f964584e8a more stuff 1 månad sedan
XMLSchema.xsd f964584e8a more stuff 1 månad sedan
bin_tool.py 8b7572618e first commit 1 månad sedan
file_ops.py f964584e8a more stuff 1 månad sedan
main.py f964584e8a more stuff 1 månad sedan
riiv.py f964584e8a more stuff 1 månad sedan
xml.py f964584e8a more stuff 1 månad sedan

README

It is required to use Python 3.8

Python modules required:
- lxml (to read XMLs)
- PyQt5 (GeckoLoader)
- chardet (GeckoLoader)
- bs4 (GeckoLoader)

Usage:
Windows:
py -3.8 main.py "path/to/iso/wbfs/file" "path/to/riiv/xml" "path/to/mod/files/folder"
Linux:
python3.8 main.py "path/to/iso/wbfs/file" "path/to/riiv/xml" "path/to/mod/files/folder"

For games that have "original" memory patches conditions you have to download a ram dump of your game (region specific) and put it in the "ram_dumps" folder.

This riivolution patcher is supposed to work with SMG1/2 mods but it might work with other games. The only thing is that "ocarina", "offset", and similar condition patches are not supported and custom savefiles will need to be manually handled (will depend on the mod, you may use SaveGame Manager GX for that).

For SMG1/2 here is a link of the ram dumps I could find:
https://archive.org/download/SMG_1-2_All-Regions

Name them exactly as the game id of your game.

Examples:
- SMG1 USA --> Game ID: RMGE01 --> Ram dump name: RMGE01.bin
- SMG2 EUR --> Game ID: SB4P01 --> Ram dump name: SB4P01.bin

After the end of the patching process, a "result.wbfs" file will be created with the mod applied to it. You can test the file with the USB Loader of your choice >:] (hope it works lol)

This tool will enforce that the Riivolution XML is correct before applying a mod. So if a XML file isn't formatted right in the slightest the tool will complain about it (i.e. it will be usual that the tool won't accept an XML lol). If you have trouble finding out which is the XML issue (if you have any), open an issue and let me know.

TODO:
- see if I can implement the other weird riivolution features.

Thanks to:
- Wiimm for his epik WIT tool
- JoshuaMKW for his GeckoLoader tool
Without those tools this tool would not be possible at all