Page 1 of 1

SOLVED: My main menu and game menu disappeared (because of splash screen mode)

Posted: Tue Nov 10, 2020 10:28 pm
by Watercolorheart
Here's my existing code:
init python:
config.overlay_screens.append("keymap_screen")
init:
#this changes skip to mousewheel
$ config.keymap['rollforward'].remove('mousedown_5')
$ config.keymap['rollback'].remove('mousedown_4')
$ config.keymap['dismiss'].append('mousedown_5')
$ config.keymap['rollforward'].append('K_q')
$ config.keymap['rollback'].append('K_w')
define config.game_menu_music = "gamemenu.ogg"
screen keymap_screen():
key "K_y" action ShowMenu('history')
# Declare characters used by this game. The color argument colorizes the name of the character.
define t = Character("Twilight Sparkle", color="#800080")
define a = Character(_("[povname]"), color="#228B22")
define z = Character(_("Zecora"), color="#696969")
define l = Character(_("Lyra"), color="#98ff98")
define s = Character(_("Spike"), color="#DA70D6")

default povname = "Anonymous"

# The game starts here.

#default a = 2
#label start:
# $ a = 3
# if a == 2:
# e "Do a thing"
# else:
# e "Do another thing"

label splashscreen:
python:
if not persistent.set_volumes:
persistent.set_volumes = True
_preferences.volumes['music'] *= .40

label start:

Here you can download a existing build with the problem: https://watercolorheart.itch.io/ponyvn

Re: My main menu and game menu for save/load disappeared! Help!

Posted: Tue Nov 10, 2020 10:29 pm
by Watercolorheart
How do I post code on the forums again?

Re: My main menu and game menu for save/load disappeared! Help!

Posted: Tue Nov 10, 2020 11:09 pm
by _ticlock_
To post a code you can type code in square brackets []. To close type /code in square brackets []. or Full editor mode and select from menu above textbox </>

Re: My main menu and game menu for save/load disappeared! Help!

Posted: Tue Nov 10, 2020 11:38 pm
by _ticlock_
Hi, Watercolorheart,

You run the game in "splashscreen mode":

Code: Select all

label splashscreen:
    python:
        if not persistent.set_volumes:
            persistent.set_volumes = True
            _preferences.volumes['music'] *= .40
Remove label splashscreen and move the python code to init python.
You can also add return in the splashscreen, although I don't really see why you need splashscreen.

Re: My main menu and game menu for save/load disappeared! Help!

Posted: Wed Nov 11, 2020 5:16 pm
by Watercolorheart
That worked, thank you! I have been pulling my hair out over that. It was some code I copied from the forums so that's why.

Re: SOLVED: My main menu and game menu disappeared (because of splash screen mode)

Posted: Tue Mar 15, 2022 4:35 pm
by 34rlgr3y
Hi! I have encountered the same issue (menus disappearing because of splash screen mode). I wanted to create a game that would crash, and when you opened it again it would load at a certain point. I followed this person's advice: https://www.reddit.com/r/RenPy/comments ... _starting/ but because of that, when the game loads up again it is perpetually in splash screen mode. Is there any way to retain the menus and accomplish my initial goal? Thank you! :D