Ren'Py Web Updater checking versions
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.
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.
Ren'Py Web Updater checking versions
Hello,
I am planing on implementing a Ren'Py Web Updater into my game. I have tested it and it works flawlessly but I have a question.
Is there a way for Ren'Py to only to check if the new version or update is available without updating the game itself, but instead to return some sort of True or False result that I could use to alert the player that there's a newer version available without having to manually check and update?
I have seen there is a function updater.UpdateVersion but I don't fully understand the difference between "updater.UpdateVersion" and "updater.update" function since it looks like both will update the game if newer version is available.
Any help would be appreciated.
I am planing on implementing a Ren'Py Web Updater into my game. I have tested it and it works flawlessly but I have a question.
Is there a way for Ren'Py to only to check if the new version or update is available without updating the game itself, but instead to return some sort of True or False result that I could use to alert the player that there's a newer version available without having to manually check and update?
I have seen there is a function updater.UpdateVersion but I don't fully understand the difference between "updater.UpdateVersion" and "updater.update" function since it looks like both will update the game if newer version is available.
Any help would be appreciated.
- xavimat
- Eileen-Class Veteran
- Posts: 1458
- Joined: Sat Feb 25, 2012 8:45 pm
- Completed: Yeshua, Jesus Life, Cops&Robbers
- Projects: Fear&Love, unknown
- Organization: Pilgrim Creations
- Github: xavi-mat
- itch: pilgrimcreations
- Location: Spain
- Contact:
Re: Ren'Py Web Updater checking versions
updater.UpdateVersion is a function, it should do what you want.
updater.update is a function and updater.Update is an action. Both update the game.
updater.update is a function and updater.Update is an action. Both update the game.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
Re: Ren'Py Web Updater checking versions
Thanks for the reply but I still don't understand how can I use this function to get what I want. My coding abilities are rather limited.
I've tried to find some sort of a cookbook or a tutorial on how to make this work but with no luck. Thank you anyway, I'll try to find a different solution.
I've tried to find some sort of a cookbook or a tutorial on how to make this work but with no luck. Thank you anyway, I'll try to find a different solution.
- PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Ren'Py Web Updater checking versions
updater.UpdateVersion is meant to be used inside screens. There's a lot of magic in that function, but basically what it does is to return the new version on the server, if na new version exists. It takes care of refreshing the screen if it finds that a new version exists. There is a lot of magic going on behind the scenes to make this reasonably simple to use.
So you could do, in a screen:
So you could do, in a screen:
Code: Select all
$ UPDATE_URL = https://www.mydomain.com/path/to/update.json"
$ new_version = updater.UpdateVersion(UPDATE_URL)
if new_version:
textbutton "Update to [new_version]" action update.Updater(UPDATE_URL)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom
Re: Ren'Py Web Updater checking versions
Omg, thank you Tom.
This is exactly what I was looking for. You've helped me immensely.
This is exactly what I was looking for. You've helped me immensely.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], span4ev