On Ren'Py what is the code to print the version of the game and to move to the main menu and the menu to save?
How do I add the language choice in the settings?
How do I add the language choice in the settings?
On Ren'Py what is the code to print the version of the game
label whatever:
$ print config.version
and to move to the main menu
label whatever:
$ renpy.full_restart()
At what moment ? Oh, and save what anyway ?and the menu to save?
By doing as said onHow do I add the language choice in the settings?
in this case:But something tell me that, in fact, what you want is not to print the version of the game.
So, what do you mean by "print", and when do you want it to appear ?
label temporary_end_story:
"This is the temporary end (current version:config.version). You'll have to wait new update."
return
I have also used this method, but I think that on android it gives problems.It's one way to move to the main menu. But do you really wanted it to restart the game, I can't say. So, perhaps that telling us from where you want to move to the main menu, and to do what, will lead to a more accurate answer.
Can be used at different moment even after a "call"At what moment ? Oh, and save what anyway ?
By doing as said onYou must be registered to see the links.
frame:
style_prefix "pref"
has vbox
label _("Language")
textbutton "English" action Language(None)
textbutton "......." action Language("......")
You have to generate a language in the renpy menu first.I tried it, but it doesn't appear in the settings
I know I have to put it on screens, but I don't know when.
if you mean when ren'py creates the folders with the translations in "tl": yes I did, but it doesn't automatically add the possibility to combine language in the settings.You have to generate a language in the renpy menu first.
Well, you do like for any other variables :in this case:
Code:label temporary_end_story: "This is the temporary end (current version:config.version). You'll have to wait new update." return
label temporary_end_story:
"This is the temporary end (current version: [config.version]). You'll have to wait new update."
return
config.version
to be accurate.It's not impossible, but I doubt.I have also used this method, but I think that on android it gives problems.
Which still don't explain why you want to go back to the main menu ; or what you're trying to achieve by doing this. Is it to end the play at the end of the update (after you've "print the version" above), is it to offer the possibility to save at a given moment ? Is it for something else ?Can be used at different moment even after a "call"
Same than above. It don't explain what you want to save, nor why you want to do it.Can be used at different moment even after a "call"
it's perfect, thanksEdit game\screens.rpy and add the language box, as explained in Havenest's guide (it's near the end of SPOILER: 3. Optimization). Or create a custom screen.
to move to the main menu and the menu to save
Same than above. It don't explain what you want to save, nor why you want to do it.
$ renpy.run(MainMenu(confirm=False))
$ MainMenu(confirm=False)()
$ renpy.run(ShowMenu('save'))
$ ShowMenu('save')()
# Temporary end of the story (then play other stories)
label temporary_end_story:
"This is the temporary end (current version: [config.version]). You'll have to wait new update."
return
# Temporary end of the game
label temporary_end_game:
#TODO: immagine To be continue
call temporary_end_story
$ old_version = config.version
"Save the game now and not later."
$ ShowMenu('save')()
if (old_version == config.version):
"Pressing ENTER will return to the Main Menu."
$ renpy.run(MainMenu(confirm=False))
return