- Mar 18, 2017
- 38
- 93
Description
I made a small python script that builds update patches for Ren'Py games. The goal is to easily make update patches so you don't have to re-download a game every update.
You specify a patch folder, old game folder, and new game folder. The script will find all the newly added files and changed files in the "[game name]\game" folder. It then copies these files to the "[patch folder]\game" folder, which can then be compressed and distributed. This patch can then be downloaded and then the games folder can be copied into old version of the game and it will be updated to the new version. The patch will include all new and edited scripts, images, videos, and audio from the new game version.
I'll probably make some update patches for games I play.
Limitations
The patch will ignore Ren'Py archives (.rpa), since they defeat the purpose of these patches. Because of this, if the game includes archives they will have to be extracted using one of the RPA extractors or they'll have to be manually added to the patch. It also does not copy any of the cached bytecode from any cache folder or any saves. These can be added to the patch folder manually if you wanted to. I haven't tested it yet, but I believe the patches built with this tool should work across platforms (unless the game specific scripts use something that isn't cross platform).
Usage
Batch Script Versions
Copy the batch script into the folder with the newer version of the game, the folder with the exe in it, and run it. Copy the location for created patch and the old version when prompted. The rest should run automatically.
Python Versions
"path/to/old/game/version" and "path/to/new/game/version" should point to the base game folder with the game executable in it, not the"[game name]\game" folder.
Requires
I tested it on python 3.7.1, but it should work on any of the python 3.x versions. If you use a different python 3 version and it doesn't work, let me know and I'll try to fix it.
This script doesn't require any 3rd party libraries.
Drop it into the folder and follow the above instructions
Here is the python 3 version.
I've made a version that should work with the python shipped in Ren'Py. The usage is the same.
I made a small python script that builds update patches for Ren'Py games. The goal is to easily make update patches so you don't have to re-download a game every update.
You specify a patch folder, old game folder, and new game folder. The script will find all the newly added files and changed files in the "[game name]\game" folder. It then copies these files to the "[patch folder]\game" folder, which can then be compressed and distributed. This patch can then be downloaded and then the games folder can be copied into old version of the game and it will be updated to the new version. The patch will include all new and edited scripts, images, videos, and audio from the new game version.
I'll probably make some update patches for games I play.
Limitations
The patch will ignore Ren'Py archives (.rpa), since they defeat the purpose of these patches. Because of this, if the game includes archives they will have to be extracted using one of the RPA extractors or they'll have to be manually added to the patch. It also does not copy any of the cached bytecode from any cache folder or any saves. These can be added to the patch folder manually if you wanted to. I haven't tested it yet, but I believe the patches built with this tool should work across platforms (unless the game specific scripts use something that isn't cross platform).
Usage
Batch Script Versions
Copy the batch script into the folder with the newer version of the game, the folder with the exe in it, and run it. Copy the location for created patch and the old version when prompted. The rest should run automatically.
Python Versions
python renpy_patch_builder.py "path/to/patch/folder" "path/to/old/game/version" "path/to/new/game/version"
"path/to/old/game/version" and "path/to/new/game/version" should point to the base game folder with the game executable in it, not the"[game name]\game" folder.
Requires
I tested it on python 3.7.1, but it should work on any of the python 3.x versions. If you use a different python 3 version and it doesn't work, let me know and I'll try to fix it.
This script doesn't require any 3rd party libraries.
You must be registered to see the links
Drop it into the folder and follow the above instructions
You must be registered to see the links
Here is the python 3 version.
You must be registered to see the links
I've made a version that should work with the python shipped in Ren'Py. The usage is the same.
Last edited: