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.
-
That Oyajicon
- Regular
- Posts: 33
- Joined: Sun May 29, 2016 7:31 pm
- Location: The Pillars of Nosgoth
-
Contact:
#1
Post
by That Oyajicon » Sun Dec 23, 2018 10:30 am
One of the big mechanical gimmicks in my current project are unlockable bonus scenes.
At certain points during a character's route, a flag will be activated that will unlock a bonus scene accessible from the game's main menu.
The thing is, I'm really not sure how to implement this. None of the tutorials I've come across cover adding custom menus/submenus, and I'm also not 100% sure how to create flags that're persistent across a player's "game" (ie. no matter what route you're currently playing, if you've gotten these flags, they don't deactivate).
Can someone please point me in the right direction? I feel so lost.
-
Per K Grok
- Miko-Class Veteran
- Posts: 882
- Joined: Fri May 18, 2018 1:02 am
- Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
- itch: per-k-grok
- Location: Sverige
-
Contact:
#2
Post
by Per K Grok » Sun Dec 23, 2018 6:41 pm
That Oyajicon wrote: ↑Sun Dec 23, 2018 10:30 am
---
The thing is, I'm really not sure how to implement this. None of the tutorials I've come across cover adding custom menus/submenus, and I'm also not 100% sure how to create flags that're persistent across a player's "game" (ie. no matter what route you're currently playing, if you've gotten these flags, they don't deactivate).
Can someone please point me in the right direction? I feel so lost.
Check this thread for making a submenu
viewtopic.php?f=8&t=52799&p=500299&hilit=trophy#p500299
-
That Oyajicon
- Regular
- Posts: 33
- Joined: Sun May 29, 2016 7:31 pm
- Location: The Pillars of Nosgoth
-
Contact:
#3
Post
by That Oyajicon » Sat Jan 05, 2019 5:45 pm
That worked amazingly well, thank you!
My next question is, is there a way to combine submenus/unlockable menus with imagemaps?
I see some tutorials on YouTube for persistent data, but all the ones I've found have the default "arial on a greyed-out sidebar" style. Are there any tutorials out there that can show me how to use persistent data to have new graphics/buttons appear on the main menu?
Also, is there a way of preventing the player from accessing certain submenus at certain times? Like, if I wanted a submenu to only be viewable from the Main Menu, and not while they're playing through the game.
-
Per K Grok
- Miko-Class Veteran
- Posts: 882
- Joined: Fri May 18, 2018 1:02 am
- Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
- itch: per-k-grok
- Location: Sverige
-
Contact:
#4
Post
by Per K Grok » Sun Jan 06, 2019 4:05 am
That Oyajicon wrote: ↑Sat Jan 05, 2019 5:45 pm
is there a way of preventing the player from accessing certain submenus at certain times? Like, if I wanted a submenu to only be viewable from the Main Menu, and not while they're playing through the game.
Code: Select all
if main_menu:
textbutton _("Trophy") action ShowMenu("trophy")
The option 'Trophy' will now not show up in any of the menus when the the player are playing through the game.
That Oyajicon wrote: ↑Sat Jan 05, 2019 5:45 pm
I see some tutorials on YouTube for persistent data, but all the ones I've found have the default "arial on a greyed-out sidebar" style. Are there any tutorials out there that can show me how to use persistent data to have new graphics/buttons appear on the main menu?
Before label start in script.rpy add
Code: Select all
if not persistent.openSub:
$ persistent.openSub = 0
$ renpy.save_persistent()
Change the textbutton 'Trophy' line i navigation to:
Code: Select all
if main_menu and persistent.openSub==1:
textbutton _("Trophy") action ShowMenu("trophy")
To activate the option do:
Code: Select all
$ persistent.openSub = 1
$ renpy.save_persistent()
That Oyajicon wrote: ↑Sat Jan 05, 2019 5:45 pm
is there a way to combine submenus/unlockable menus with imagemaps?
The 'submenu' is a screen. So yes you can use an imagemap
https://www.renpy.org/doc/html/screens. ... statements
Users browsing this forum: No registered users