Update patch for played game?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
scorlight
Regular
Posts: 67
Joined: Fri Sep 13, 2013 7:02 am
Contact:

Update patch for played game?

#1 Post by scorlight »

Hello, this mightttt be a stupid question, but I'd like to know if players can update a game through downloading patch instead of downloading the whole game or automatically web update?
I found this page: https://www.renpy.org/doc/html/updater.html#
but it is for web update. It requires a server and other complicate stuffs while I only want to update my game by letting the players download a patch, copy and paste the patch to their game folders. Players can have new route in the old story, they can also keep their save files.
Is that possible with renpy?
Thank you, love you all~
Artist for rent, see my art here: http://scorlight.deviantart.com/gallery/

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Update patch for played game?

#2 Post by Imperf3kt »

This is just guesswork, but I think it may be possible to use the web updater method, and supply an expected local folder instead of a web address. Maybe include an "update" folder in your game.

Get your players to put the files in said folder, and then run the game and the update function.
You might want to include a way to delete the files after so they don't accumulate / take up unnecessary space.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Karl_C
Veteran
Posts: 232
Joined: Sun Mar 31, 2013 6:18 am
Contact:

Re: Update patch for played game?

#3 Post by Karl_C »


User avatar
scorlight
Regular
Posts: 67
Joined: Fri Sep 13, 2013 7:02 am
Contact:

Re: Update patch for played game?

#4 Post by scorlight »

Imperf3kt wrote: Mon Dec 31, 2018 6:06 am This is just guesswork, but I think it may be possible to use the web updater method, and supply an expected local folder instead of a web address. Maybe include an "update" folder in your game.

Get your players to put the files in said folder, and then run the game and the update function.
You might want to include a way to delete the files after so they don't accumulate / take up unnecessary space.
Karl_C wrote: Mon Dec 31, 2018 7:08 am Maybe this will help?

Ren'Py Cookbook: [Tutorial] Making a Separate Content Patch
Well, Karl's reply is closer to what I'm looking for but not exactly. In that post, it's more like the patched content is already available in the main script, you just need the patch file as the "key" to unlock those content. I wonder if we can make a patch that add NEW content to the main game instead of unlocking hidden content. I saw discussion in that post says:
Belgerum wrote: Sun Dec 17, 2017 1:20 pm A developer that wants to patch updates or fixes to a single base game would best find a solution that's simpler and more direct, like replacing the script or archive file(s) in the game directory with a newer version, or just uploading a new build entirely.

I can't predict what situations every developer might face, but in this case, I'm assuming that the developer has control over the base game build, whether it be by patching updates, or because the game is still in development and unreleased.

Either way, that's a problem that would be very situational.
so does method like making players download a new script.rpy work? We just write a new script.rpy file with new content and players replace theirs with the new one. Does that also restart the saves and persistent?
Artist for rent, see my art here: http://scorlight.deviantart.com/gallery/

User avatar
Karl_C
Veteran
Posts: 232
Joined: Sun Mar 31, 2013 6:18 am
Contact:

Re: Update patch for played game?

#5 Post by Karl_C »

scorlight wrote: Mon Dec 31, 2018 8:00 amDoes that also restart the saves and persistent?
For this you may have to look into Multi-Game Persistence

User avatar
Karl_C
Veteran
Posts: 232
Joined: Sun Mar 31, 2013 6:18 am
Contact:

Re: Update patch for played game?

#6 Post by Karl_C »

scorlight wrote: Mon Dec 31, 2018 8:00 am In that post, it's more like the patched content is already available in the main script, you just need the patch file as the "key" to unlock those content. I wonder if we can make a patch that add NEW content to the main game instead of unlocking hidden content.
In Belgerum's cookbook recipe, he or she actually does add new content (eileen_kiss.png, lucy_happy.png, lucy_mad.png, punch.wav, track2.ogg, patch script.rpy, patch script.rpyc)? Just check the source file in that thread:
patch.jpeg
As far as i understand, it's not possible to change or replace existing files (that may corrupt saves and persistent data).

User avatar
scorlight
Regular
Posts: 67
Joined: Fri Sep 13, 2013 7:02 am
Contact:

Re: Update patch for played game?

#7 Post by scorlight »

Karl_C wrote: Mon Dec 31, 2018 11:14 am In Belgerum's cookbook recipe, he or she actually does add new content (eileen_kiss.png, lucy_happy.png, lucy_mad.png, punch.wav, track2.ogg, patch script.rpy, patch script.rpyc)? Just check the source file in that thread:
Yeah, there are new contents, but "planned ahead" new content. In Belgerum's case, the game maker already plans ahead the patch content n lets it hide in the main script file using 'if' code, like this:

Code: Select all

 #this is the main script file
    if persistent.patch_enabled:
        "I vaguely recall meeting somone here, but my memory is fuzzy."
        "The only thing I remember is that Eileen used it as an example somehow."

    "It was hardly ever used, even in the tutorial, which meant that nobody would disturb us here."
    p "Eileen..."
    show eileen shy
    e "We're here... So now, let's..."
    "Eileeen leans close to me, puckering her lips..."
    show eileen kiss
    
    if persistent.patch_enabled:
        jump patch_scene    #this label is in the patch script

    p "h-huh?!"
    e "What?"
    "Y-you're suddenly all pixellated!"
    show eileen surprised
when the patch is pasted into the game folder, the 'if' will be unlocked and open new route. The patch is made from adding patch folder (with additional images and contents) to the game folder while making the first version of the game, the new contents are planned from the beginning. So you can't use this method unless you are obvious about the update content, but I don't even know what I will update in my game ( T_T)
Karl_C wrote: Mon Dec 31, 2018 8:21 am For this you may have to look into Multi-Game Persistence
This might be good :D but as far as I found, people usually use this to add a sequel of a game like chapters in a book. I dunno if this can help with adding brand new content to an existing game O-o

Btw, happy New Year!!! :D :D :D
Artist for rent, see my art here: http://scorlight.deviantart.com/gallery/

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot]