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.
-
Kinmoku
- Miko-Class Veteran
- Posts: 560
- Joined: Mon Aug 11, 2014 9:39 am
- Completed: One Night Stand
- Projects: Love IRL, Memories
- Tumblr: gamesbykinmoku
- itch: kinmoku
- Location: Germany
-
Contact:
#1
Post
by Kinmoku » Mon May 18, 2020 9:34 am
Hi all,
I use choice menus in my project from both NVL and ADV modes. However, when I'm in ADV, the NVL menu shows up, with the NVL frame too. My code is below:
Code: Select all
screen choice(items):
style_prefix "choice"
vbox:
for i in items:
textbutton i.caption action i.action
screen nvl(dialogue, items=None):
frame:
pos (540, 30)
side "c":
area (0, 0, 844, 780)
viewport id "vp":
yadjustment ui.adjustment (value=9999, range=9999)
vbox:
spacing gui.nvl_spacing
use nvl_dialogue(dialogue)
## Displays the menu, if given. The menu may be displayed incorrectly if
## config.narrator_menu is set to True, as it is above.
vbox:
pos(0, 850)
for i in items:
textbutton i.caption:
action i.action
style "nvl_button"
Does anyone know why this is happening? I'd like to use both menus in both situations.
Last edited by
Kinmoku on Mon May 25, 2020 9:19 am, edited 1 time in total.
-
gas
- Miko-Class Veteran
- Posts: 838
- Joined: Mon Jan 26, 2009 7:21 pm
-
Contact:
#2
Post
by gas » Wed May 20, 2020 5:52 am
I'm not totally sure, but probably you can leave the normal menu behaviour as default, and use the menu argument to determine when a menu is a NVL one or a normal one.
Code: Select all
# this one should be seen as NVL mode...
menu (nvl = True):
"Gas is a genius":
jump no_way
"Gas is stupid":
jump more_probably
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.
10 ? "RENPY"
20 GOTO 10
RUN
-
Kinmoku
- Miko-Class Veteran
- Posts: 560
- Joined: Mon Aug 11, 2014 9:39 am
- Completed: One Night Stand
- Projects: Love IRL, Memories
- Tumblr: gamesbykinmoku
- itch: kinmoku
- Location: Germany
-
Contact:
#3
Post
by Kinmoku » Fri May 22, 2020 11:24 am
gas wrote: ↑Wed May 20, 2020 5:52 am
I'm not totally sure, but probably you can leave the normal menu behaviour as default, and use the menu argument to determine when a menu is a NVL one or a normal one.
Code: Select all
# this one should be seen as NVL mode...
menu (nvl = True):
"Gas is a genius":
jump no_way
"Gas is stupid":
jump more_probably
Weirdly, I use this for the NVL menu (which appears later in the game) but both menus still look the same. Is "menu (nvl = False):" what I should be using?
-
gas
- Miko-Class Veteran
- Posts: 838
- Joined: Mon Jan 26, 2009 7:21 pm
-
Contact:
#4
Post
by gas » Fri May 22, 2020 2:31 pm
According to documentation if you set (nvl = True) as a menu argument, that menu should be seen in nvl type.
While others should look as ADV.
So, why this doesn't work is out of my knowledge.
Another approach can be to assign the menu variable.
Code: Select all
default adv_menu = menu # create a copy of the standard menu
From now onward you can do:
to set a normal menu
to have instead the menu look as a nvl menu
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.
10 ? "RENPY"
20 GOTO 10
RUN
-
MaydohMaydoh
- Regular
- Posts: 165
- Joined: Mon Jul 09, 2018 5:49 am
- Projects: Fuwa Fuwa Panic
- Tumblr: maydohmaydoh
- Location: The Satellite of Love
-
Contact:
#5
Post
by MaydohMaydoh » Fri May 22, 2020 5:54 pm
I would think what Gas first said is right. Check to make sure you don't have "define menu = nvl_menu" somewhere in your code.
-
Kinmoku
- Miko-Class Veteran
- Posts: 560
- Joined: Mon Aug 11, 2014 9:39 am
- Completed: One Night Stand
- Projects: Love IRL, Memories
- Tumblr: gamesbykinmoku
- itch: kinmoku
- Location: Germany
-
Contact:
#6
Post
by Kinmoku » Mon May 25, 2020 9:17 am
Thanks both. I think that's what was happening.
I now have:
Code: Select all
define adv_menu = menu
define menu = nvl_menu
And then use:
Code: Select all
$ menu = adv_menu
menu:
"Choice 1":
"Choice 1"
"Choice 2":
"Choice 2"
# for adv menu, and...
$ menu = nvl_menu
menu:
"Choice 1":
"Choice 1"
"Choice 2":
"Choice 2"
# for nvl menu. Seems to be working :D
Users browsing this forum: Bing [Bot], Google [Bot], _ticlock_