Too much choices

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
Shiron
Newbie
Posts: 14
Joined: Fri Sep 28, 2018 8:10 am
Contact:

Too much choices

#1 Post by Shiron » Wed Nov 14, 2018 10:37 am

Hi, I'm sure someone must have noticed this already, so I don't know why it still isn't fixed, but the engine bugs when you apply too much choices with the "menu" command.

I just put there 31 choices thinking it shows just part of them, while the others will be available with scrolling, but it just shows the middle of it over the whole screen instead. Is this going to be fixed, or is there any other applicable way to give the players such option?

Thank you.

----

Edit:

I just realised that you can't use scrolling on a phone and on a computer it's already used for going backwards.

In that case I suggest to use some kind of triangle button showing "left/right". On a computer, you click it and the whole screen of choices are moved to one side, while new choices appear from the other. On a phone, you can also just move your finger to do so. Do you understand what I mean?

User avatar
Alex
Lemma-Class Veteran
Posts: 2417
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Too much choices

#2 Post by Alex » Wed Nov 14, 2018 12:57 pm

You need to modify choice screen, check this thread - viewtopic.php?f=8&t=52172

Shiron
Newbie
Posts: 14
Joined: Fri Sep 28, 2018 8:10 am
Contact:

Re: Too much choices

#3 Post by Shiron » Wed Nov 14, 2018 3:00 pm

OK, thank you, I'll try it. :)

However, it changes noting about that "bug" part. I'm gonna use the way around, but for the development sake, this should be solved in the engine, too

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 2836
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Too much choices

#4 Post by Imperf3kt » Wed Nov 14, 2018 3:59 pm

You'll have to explain better what the 'bug' you are experiencing is. If it's just that the default choice menu isn't accommodating to such an unreasonable amount if choices, that's not a bug, rather a design choice.

If the game crashes, that is a bug.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter

Shiron
Newbie
Posts: 14
Joined: Fri Sep 28, 2018 8:10 am
Contact:

Re: Too much choices

#5 Post by Shiron » Thu Nov 15, 2018 1:44 pm

Well, if you consider it a bug only when the game crashes, then this is definitely not a bug. :)

However, exchanging this default part of the screens.rpy file:

Code: Select all

screen choice(items):
    style_prefix "choice"

    vbox:
        for i in items:
            textbutton i.caption action i.action
with someting like this:

Code: Select all

screen choice(items):
    style_prefix "choice"

    side "c b r":

        align (0.5, 0.5)

        viewport id "vp":
            draggable True
            mousewheel "change"

            vbox:
                for i in items:
                    textbutton i.caption action i.action
would solve the problem for most people who encounter it. Not everyone would ask here – some could even reduces the amount of choices or drop the engine entirely.

But this code doesn't actually work.

Only absolute "style properties" seems to move the buttons. Relative ones does nothing, so if I replace "align (0.5, 0.5)" with "xpos 200", it moves, but else it remains on the top left corner.

Is this a "not crashing bug" (or how should I call it) or not? Am I doing something wrong?

User avatar
Alex
Lemma-Class Veteran
Posts: 2417
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Too much choices

#6 Post by Alex » Thu Nov 15, 2018 2:02 pm

Shiron wrote:
Thu Nov 15, 2018 1:44 pm
Well, if you consider it a bug only when the game crashes, then this is definitely not a bug. :) ...
Yes, it's not a bug, this is the default behaviour of choice screen. This feature is just not out of box, due to not so much people ask about it. You can post here - viewtopic.php?f=32&t=7858 and this might be (or not) the default feature in next releases.
Shiron wrote:
Thu Nov 15, 2018 1:44 pm
... Am I doing something wrong?
Looks like... Try to get rid of

Code: Select all

style_prefix "choice"
to stop it affect the "side" properties or customize the choice-style.
https://www.renpy.org/doc/html/index.ht ... ing-ren-py

Shiron
Newbie
Posts: 14
Joined: Fri Sep 28, 2018 8:10 am
Contact:

Re: Too much choices

#7 Post by Shiron » Thu Nov 15, 2018 2:47 pm

Hmm... Removing the style prefix causes a complete loss of button images and text aligns, while the whole frame stays stuck to the top left corner. It still doesn't react to relative settings while correctly follows the absolute. :/

Then to customize the choice-style... It should be somewhere in the guy.rpy, right?

Unlike other styles, there are only 11 variables and none of them is align. Image paths are missing, too, by the way. Does it mean I have to write the style from the scratch?

User avatar
Alex
Lemma-Class Veteran
Posts: 2417
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Too much choices

#8 Post by Alex » Thu Nov 15, 2018 3:22 pm

Well, in Ren'Py you can achieve the desireable result in number of ways (in most cases ). So, you can try to mess with styles (modify existent or create your own) or hardcode the properties in screens without using any special style - choose what suits best for you.

The modern gui system designed to let people just replace the default images with their own to make game look unique. But sometimes it's hard to struggle against gui when you customizing the screens...))

Check this guide (if haven't yet) - https://www.renpy.org/doc/html/gui.html

Shiron
Newbie
Posts: 14
Joined: Fri Sep 28, 2018 8:10 am
Contact:

Re: Too much choices

#9 Post by Shiron » Fri Nov 16, 2018 10:17 am

Sorry for the late reply.

As I can see, my problem wasn't fully solved yet, but I can see a path now, so I'll find my way out eventually. I'm sorry for thinking this was a bug, however, I still do think that if the engine just ignores my lines, even without crashing, it's still an issue.

Nevertheless, thank you for your help, I really appriciate it. :)

Shiron

Post Reply

Who is online

Users browsing this forum: No registered users