Ren'Py Help with update only patch

Uncle Loco

Engaged Member
Game Developer
Apr 28, 2020
3,381
10,679
Ok, I need some help with coding in Renpy. My VN is getting close to that cap and I was trying to figure out how to do an update only patch as well as a full update. Now I am sure someone is going to come in here and say do this and that and you're good to go, but I need this to be explained like I am an idiot (because with coding I am). While my VN is a simple coded game I still struggle with the coding part, so please if you know how to do this explain things simply and with images if possible. I appreciate the help in advance.
 

GetOutOfMyLab

Forum Fanatic
Modder
Aug 13, 2021
5,973
15,974
First, I'll make you aware of these that are probably too advanced since you need to setup your own website, among other considerations.




One method that others use is the Ren'Py archive feature.

Since images are what typically take up the most space, organize them into folders by release within the images folder. You could go by version number, chapter number, episode... however you feel like:
1716506407071.png

So here, I have game/images/ep3 and game/images/ep4.

In your options.rpy, you typically see something like this:

Python:
    ## Classify files as None to exclude them from the built distributions.

    build.classify('**~', None)
    build.classify('**.bak', None)
    build.classify('**/.**', None)
    build.classify('**/#**', None)
    build.classify('**/thumbs.db', None)

    ## To archive files, classify them as 'archive'.
    build.classify('game/**.png', 'archive')
    build.classify('game/**.jpg', 'archive')
You can create your own archives that are specifically for your update. You can build an archive for each episode/chapter/version. To do so, we can modify the above like so:

Python:
    ## Classify files as None to exclude them from the built distributions.

    build.classify('**~', None)
    build.classify('**.bak', None)
    build.classify('**/.**', None)
    build.classify('**/#**', None)
    build.classify('**/thumbs.db', None)

    build.archive("ep3", "all")
    build.archive("ep4", "all")
    build.archive("scripts", "all")
    build.archive("images", "all")

    ## To archive files, classify them as 'archive'.
    build.classify('game/images/ep3/**.**', 'ep3')
    build.classify('game/images/ep4/**.**', 'ep4')
    build.classify('game/**.webp', 'images')
    build.classify('game/**.webm', 'images')
    build.classify('game/**.png', 'images')
    build.classify('game/**.jpg', 'images')
    build.classify("game/**.rpy", "scripts")
    build.classify("game/**.rpyc", "scripts")
Now, when you build your project, you'll notice you have these archives instead of script files and image files:
1716506940159.png

Assuming the next update is ep4, for example, you could grab scripts.rpa and ep4.rpa and put them in a new zip file for distribution to players.

This assumes nothing changed with your gui or other files. If you changed those things, you could also copy them (should be in images.rpa, but that contains all other images in the game not in ep3.rpa or ep4.rpa) into the update only zip.