In an upcoming update I'm preparing to do some major changes to how the Patcher works in RCP, detailed below.
Patches are now .zip files
Currently game patches (.gp files) use a proprietary file format made specifically for these patches. Although this did allow the files to be more optimized, it also comes with the drawbacks of them not being usable by any other programs. Users can't easily inspect their contents, anti-malware can't easily scan it and making minor changes to patches, such as fixing a typo, becomes a hassle.
The proposal here is to change .gp files to .gpz files. These will internally be .zip files and can thus be opened in File Explorer by changing the extensions, or in a program such as 7-Zip through its context menu. Patches will require the manifest.jsonc file in the root directory to describe its contents.
The contents of a .gpz file
Removing the Patch Creator
With patches now being standardized .zip files it removes the need for a custom patch creator tool. The current creator tool is also a bit cumbersome to use and doesn't offer a good overview of the changes you've done. It's also prone to confusion with how archives are handled.
The proposal here is to remove the Patch Creator in RCP. Patches will instead by manually created by users. This will require documentation on how they work, which could be added to the GitHub wiki.
The option to create a patch will still be present in RCP, but will instead open up a window with info on how to create a patch and options such as these:
Create blank patch for the current game to use as a template
Convert legacy .gp patches to .gpz patches
Validate .gpz patch file
Generate delta file (see below)
Example of a patch manifest
Migration
One of the difficulties in changing the format is how to migrate to it. The proposal for patch files is this:
Legacy .gp patches can be converted to .gpz patches in RCP
Adding a .gp patch to a game in RCP will automatically convert it to a .gpz patch, thus still allowing things like one-click support through GameBanana
The patch library will also need to be migrated. This will most likely happen automatically as the user updates RCP, or with a button in the Patcher game panel.
The current structure of the patch library
Full GameBanana integration
Currently RCP offers some patches to be downloaded directly through the app. These are either made by me or other members of the community, but with the requirement that they should only be for fixing or improving the game. More subjective changes, such as custom skins, are thus not allowed.
The proposal is to change this so that RCP fetches a list of patches uploaded to GameBanana for the game and allows those to be downloaded. This allows any member in the community to create their own patches and have them show up in RCP, something which will hopefully incentivize more patches to be made. It also allows more fun patches, such as custom skins, to be available. The plan is this:
All currently downloadable patches in RCP will be moved over to GameBanana
Downloading a patch from GameBanana will show a warning of some form to notify the user that these are being downloaded from an external source
Delta patches
One of the main limitations with the patcher right now is that entire files have to be replaced. This makes patches that modify larger files, such as executables, less than ideal. For example, multiple executable patches can not be combined in the current stage as one would override the other. This makes it harder to combine common executable patches such as widescreen patches, no-cd patches etc.
The proposal is to support delta patches. These modify a part of a file rather than replacing the entire file. These will most likely be created through a tool in RCP where the user can upload the original and modified versions of a file, resulting in a delta file being output.
Versioning
Another limitation of the patcher is game versioning. Some examples of patches which are difficult to make:
Widescreen patches for different aspect ratios. Making a separate patch for different common aspect ratios is not ideal.
Executable patches for different releases. For example an executable patch for Rayman Legends which works on both the Steam and Uplay versions.
ROM patches. Data in ROMs will usually be in different locations for different regions.
The proposal is to allow a patch to be able to target multiple versions. I'm not yet sure how I want to structure it, but the idea is to have a list of "versions" in the json manifest. When you add the files they then get added in a folder such as files/{id}/... where the id is the version id. The version is then either automatically determined by a set of requirements (such as checking if a file exists, the file size or something similar) or perhaps it'd be easier to simply have a drop-down in the patcher window for the user to select the version themselves (would make more sense for things such as widescreen patches where the user then selects their aspect ratio).
In an upcoming update I'm preparing to do some major changes to how the Patcher works in RCP, detailed below.
Patches are now .zip files
Currently game patches (.gp files) use a proprietary file format made specifically for these patches. Although this did allow the files to be more optimized, it also comes with the drawbacks of them not being usable by any other programs. Users can't easily inspect their contents, anti-malware can't easily scan it and making minor changes to patches, such as fixing a typo, becomes a hassle.
The proposal here is to change .gp files to .gpz files. These will internally be .zip files and can thus be opened in File Explorer by changing the extensions, or in a program such as 7-Zip through its context menu. Patches will require the
manifest.jsonc
file in the root directory to describe its contents.The contents of a .gpz file
Removing the Patch Creator
With patches now being standardized .zip files it removes the need for a custom patch creator tool. The current creator tool is also a bit cumbersome to use and doesn't offer a good overview of the changes you've done. It's also prone to confusion with how archives are handled.
The proposal here is to remove the Patch Creator in RCP. Patches will instead by manually created by users. This will require documentation on how they work, which could be added to the GitHub wiki. The option to create a patch will still be present in RCP, but will instead open up a window with info on how to create a patch and options such as these:
Example of a patch manifest
Migration
One of the difficulties in changing the format is how to migrate to it. The proposal for patch files is this:
The patch library will also need to be migrated. This will most likely happen automatically as the user updates RCP, or with a button in the Patcher game panel.
The current structure of the patch library
Full GameBanana integration
Currently RCP offers some patches to be downloaded directly through the app. These are either made by me or other members of the community, but with the requirement that they should only be for fixing or improving the game. More subjective changes, such as custom skins, are thus not allowed.
The proposal is to change this so that RCP fetches a list of patches uploaded to GameBanana for the game and allows those to be downloaded. This allows any member in the community to create their own patches and have them show up in RCP, something which will hopefully incentivize more patches to be made. It also allows more fun patches, such as custom skins, to be available. The plan is this:
Delta patches
One of the main limitations with the patcher right now is that entire files have to be replaced. This makes patches that modify larger files, such as executables, less than ideal. For example, multiple executable patches can not be combined in the current stage as one would override the other. This makes it harder to combine common executable patches such as widescreen patches, no-cd patches etc.
The proposal is to support delta patches. These modify a part of a file rather than replacing the entire file. These will most likely be created through a tool in RCP where the user can upload the original and modified versions of a file, resulting in a delta file being output.
Versioning
Another limitation of the patcher is game versioning. Some examples of patches which are difficult to make:
The proposal is to allow a patch to be able to target multiple versions. I'm not yet sure how I want to structure it, but the idea is to have a list of "versions" in the json manifest. When you add the files they then get added in a folder such as
files/{id}/...
where the id is the version id. The version is then either automatically determined by a set of requirements (such as checking if a file exists, the file size or something similar) or perhaps it'd be easier to simply have a drop-down in the patcher window for the user to select the version themselves (would make more sense for things such as widescreen patches where the user then selects their aspect ratio).