• To improve security, we will soon start forcing password resets for any account that uses a weak password on the next login. If you have a weak password or a defunct email, please update it now to prevent future disruption.

Ren'Py Problems with translating menu choices and name in custom screens.

Saint_RNG

Member
Apr 2, 2018
111
43
Hi everyone,

I'm currently translating my renpy project and I've come across 2 blocking points :

You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.

Thanks in advance for anyone who might know where my mistakes came from.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,202
14,938
However, despite the fact that my game is in French (verifiable thanks to the ui and the dialogues which are displayed in French), the choices continue to appear in English...
Hmm, this is strange. I tried the same menu choices than you, and the translation worked correctly.


I've tried "duplicating" the choices by adding if persistent.lang == "french" and if persistent.lang == None at the end :
What this persistent.lang is ?


But I've created a custom say screen for my menu (different from the basic one because my menu is located in the usual say screen location) so that it appears above my menu.
This one is easy to solve: You absolutely don't need a custom say screen for this...
Python:
menu:

        kT "What should I do ?"

        "Stay in cabin. (1next)":
            [...]

        "Take a walk around the ship. (2next)":
            [...]


Here's the screen :
Python:
screen say_screen_for_custom_choice_menu(who, what):
    hbox:
        align(.5, .55)
        text who.name + " : ":
            color "#99ccff"
            size 38
        text what:
            color "#fff"
            xsize gui.dialogue_width
            ypos .1
So if I call my screen with :
Python:
show screen say_screen_for_custom_choice_menu(kT, _("What should I do ?"))
This should display in French : Les pensées de Kaï : Que devrais je faire ?
But it displays instead: Kaï's thoughts : Que devrais je faire ?
So the "what" text is correctively translated because I added the _() around the str but it doesn't work if I add it to the kT (who.name) and in my opinion it shouldn't be necessary in any case, as I know that the translation works correlatively for the native say screen.

So does anyone have an explanation for this behavior ? I guess I did something wrong somewhere :confused:

[/SPOILER]

Thanks in advance for anyone who might know where my mistakes came from.
[/QUOTE]
 

Saint_RNG

Member
Apr 2, 2018
111
43
Hmm, this is strange. I tried the same menu choices than you, and the translation worked correctly.
I didn't think of it before but tonight I'll try to simply delete the existing translation from the translation file and then regenerate the file normally to see if it adds them back. If that's all it is, it's reassuring. If not, it may be something else...

What this persistent.lang is ?
The first time the player will launch the game, a language selection screen will appear :

You don't have permission to view the spoiler content. Log in or register now.

The way I see it is that the player chooses his language the very first time he launches the game, and it will remember his choice every time he relaunches it (saving him having to show the screen every time). Of course it's not set in stone, and the player can always change the language in the main menu or in the preferences menu.

This one is easy to solve: You absolutely don't need a custom say screen for this...
Python:
menu:

kT "What should I do ?"

"Stay in cabin. (1next)":
[...]

"Take a walk around the ship. (2next)":
[...]
I used to use this way before customizing the look of my menu, but now it's not really "practical" anymore.

You don't have permission to view the spoiler content. Log in or register now.
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,560
2,179
First, here's one of my menus :
Python:
        "Stay in cabin. (1next)":
            $ c1s1_shower = True
            hide screen say_screen_for_custom_choice_menu
            with Dissolve(.5)
            jump s1shower

Okay. I'm officially worried.

That hide screen say_screen_for_custom_choice_menu implies a show screen sometime before this. That you are doing show screen .../hide screen ... means there's more code you haven't included in this forum post.

Plus, that's not how work.

What I would expect to see would something more like:

Python:
    menu (screen="custom_choice_menu"):

        "Stay in cabin. (1next)":
            # ...

        "Take a walk around the ship. (2next)":
            # ...

Where custom_choice_menu is a copy of the standard from the screens.rpy file, but modified to work in a different way. Either by changing the copy directly, or using different style settings.

Honestly, my bigger worry is that the code you haven't included here on the forum post includes a somewhere. Though it's a pretty obscure command to be using if you're already having a problem with custom choice screens.


I've tried "duplicating" the choices by adding if persistent.lang == "french" and if persistent.lang == None at the end :

If you ever really need to do something like this, you might want to look into - which is the internal variable used by RenPy when someone changes to a different language using either or . See:


But I've created a custom say screen for my menu (different from the basic one because my menu is located in the usual say screen location) so that it appears above my menu.

Again, you probably want to be using the screen choice(): as the template for customized menu: screens, and not screen say():.

Here's the screen :
Python:
screen say_screen_for_custom_choice_menu(who, what):
    hbox:
        ...
        text who.name + " : ":
        ...

And I think that is where your problem lies.

You are referencing who.name - something which hasn't been run through the translation process.

Keep in mind that translation is done at runtime and by RenPy's translation code. Which is fine if you are using the normal RenPy functionality, but not so great when you try to bypass it.

Normally, when you write something like:

Python:
    menu:
        kT "What should I do ?"      # <<--- Wait... you know you can do this right?

        "Stay in cabin. (1next)":
            # ...

        "Take a walk around the ship. (2next)":
            # ...

The kT "What should I do ?" is handled by screen say(): screen and the actual choices ("Stay in cabin." and "Take a walk around the ship.") are processed as arguments within the screen choice(): screen (check the lines that read for i in items: / if i.action:). But the values are both translated before being passed to those screens (or as part of processing the text statements - I can never remember which).

Wait... you ARE aware you can add a dialogue line between the menu: and the first menu choice to display that line AND the list of menu choices? Yes?
I've a horrible feeling that this is what you were trying to
achieve with your custom say screen. RenPy already does it for you (see my example above).

I'd need to test it, but you might be better off with something like:

Python:
text "[who.name] : "

Difficult to know without seeing exactly how you are dealing with this. (Normally I'd test a bit, but I don't have access to RenPy at the moment).
 
Last edited:

Saint_RNG

Member
Apr 2, 2018
111
43
I didn't think of it before but tonight I'll try to simply delete the existing translation from the translation file and then regenerate the file normally to see if it adds them back. If that's all it is, it's reassuring. If not, it may be something else...
I couldn't wait and tried it :p But it doesn't work :/
I guess it could also come from the fact that I use a .replace in my screen choice() to remove the (1next) and (2next) (I use that to add a unique style depending on where the choice is in the choice wheel (see image in post above)

Here's an example inside my screen choice(items) :
Python:
if " (1next)" in caption:
                    $ caption = caption.replace(" (1next)", "")
                    imagebutton auto "wheel/wheel_choice1next_%s.png" focus_mask True xpos -6 ypos 594 action action
                    textbutton caption xpos 1025 ypos 675 action action style "Gold" text_style "Gold_button_text"
That might explain why it works for you and not for me, because that's the difference between the project you tested and mine.

That hide screen say_screen_for_custom_choice_menu implies a show screen sometime before this. That you are doing show screen .../hide screen ... means there's more code you haven't included in this forum post.
I didn't put the show because it's not part of the menu, but I call it just before the menu: (sometimes not, depending on the menu).

You don't have permission to view the spoiler content. Log in or register now.

Where custom_choice_menu is a copy of the standard from the screens.rpy file, but modified to work in a different way. Either by changing the copy directly, or using different style settings.
I guess my custom menu is the screen choice() because I've indeed made a few modifications for the visual aspect (management of a choice wheel like in Bioware games but in Renpy style) (see above).

I didn't really think about creating a custom screen choice() because I figured that the basic one wouldn't be of any use to me anyway so I replaced it :(

If you ever really need to do something like this, you might want to look into - which is the internal variable used by RenPy when someone changes to a different language using either or . See:
I used this in my Preferences() screen :

You don't have permission to view the spoiler content. Log in or register now.

So if I understand correctly, you mean SetVariable("persistent.lang", None) and Language(None) do basically the same thing ? Does Language() make the game "stay" on this language for the next time the user restarts the game ?

The kT "What should I do ?" is handled by screen say(): screen and the actual choices ("Stay in cabin." and "Take a walk around the ship.") are processed as arguments within the screen choice(): screen (check the lines that read for i in items: / if i.action:). But the values are both translated before being passed to those screens (or as part of processing the text statements - I can never remember which).
This is probably where my error came from, as I "replaced"/"modified" the basic screen choice, and the for now looks like this (with different if " ()" in caption for each type of choice in my choice wheel.)

You don't have permission to view the spoiler content. Log in or register now.

Wait... you ARE aware you can add a dialogue line between the menu: and the first menu choice to display that line AND the list of menu choices? Yes?
Hehe, yes (see my second post above yours), I was using this way before "customizing" my menu.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,202
14,938
The first time the player will launch the game, a language selection screen will appear :
Which, unlike the "Preferences" screen you shown later, do not set the language at Ren'Py level...
But anyway it do not change the fact that you shouldn't have the issue you have with menus. I only tried with the 7.5.3, but it works, and I know that it also worked perfectly with older versions, including in the 8.x branch.
So, could it be that you are facing a version specific bug ? What version of Ren'Py are you using ?


The way I see it is that the player chooses his language the very first time he launches the game, and it will remember his choice every time he relaunches it (saving him having to show the screen every time).
What is already the case by default when you change the language at Ren'Py level with the help of Language, _preferences.language or renpy.change_language(), mentioned by 79flavors. Ren'Py keep the memory of the selected language, and will use it last time the player will start the game.

Having a splashscreen to select the language is useless and confusing for the players. Even with your own persistent value, you'll not know if it's None because the player choose "English", or if it's because he haven't chosen yet. What mean that all players that will not want to use a translation will systematically have a screen they don't need to see.
At most, if really you want the selection to happen before the menu, use a pure flag as persistent value, to not present the screen once the player have made his selection. Keeping in mind that there's players who will not see the "splashscreen" part anyway.


Or is there a way that I don't know of to get the same result as me, still using the technique you showed ?
Well, yes, there is, and more than one. The most obvious being probably to use in order to know if you are in a menu or not:

Python:
screen say(who, what):
    style_prefix "say"

    if renpy.get_screen( "choice" ): # Or whatever name for screen
        [the version of the screen for when the menu is visible]
    else:
        [the regular version of the screen]


What I would expect to see would something more like:

Python:
    menu (screen="custom_choice_menu"):
Be noted that this is only needed if you use more than on screen for the menus. If all are expected to looks the same, editing directly the "choice" menu is a better way.


I'd need to test it, but you might be better off with something like:

Python:
text "[who.name] : "
Wait... This would works because the translation is done before the substitution.

But, since his current code is text who.name + " : ":, doesn't that meant that Ren'Py search for the translation of "Kaï's thoughts : ", and obviously do not find it ?
 

moskyx

Engaged Member
Jun 17, 2019
3,884
12,489
The translation substitution is done after applying all the weird things you came up with. So your string "Stay in cabin (1next)" is no longer "Stay in cabin (1next)" but simply "Stay in cabin", and that's the one you should add to your translation script as an 'old' line. You'll probably need to add those lines manually as Renpy SDK won't find them writen like that anywhere on your scripts.

About this screen:

Python:
screen say_screen_for_custom_choice_menu(who, what):
    hbox:
        ...
        text who.name + " : ":
        ...
it's a truncated string so you may want to try coding it like this, with a doble underscore wraping the variable text:

Python:
screen say_screen_for_custom_choice_menu(who, what):

    hbox:

        ...

        text who.name + __(" : "):

        ...
I haven't actually tried this but I guess it could work.
 

Saint_RNG

Member
Apr 2, 2018
111
43
Which, unlike the "Preferences" screen you shown later, do not set the language at Ren'Py level...
But anyway it do not change the fact that you shouldn't have the issue you have with menus. I only tried with the 7.5.3, but it works, and I know that it also worked perfectly with older versions, including in the 8.x branch.
So, could it be that you are facing a version specific bug ? What version of Ren'Py are you using ?
I'm currently using version 8.1.0.

What is already the case by default when you change the language at Ren'Py level with the help of Language, _preferences.language or renpy.change_language(), mentioned by 79flavors. Ren'Py keep the memory of the selected language, and will use it last time the player will start the game.

Having a splashscreen to select the language is useless and confusing for the players. Even with your own persistent value, you'll not know if it's None because the player choose "English", or if it's because he haven't chosen yet. What mean that all players that will not want to use a translation will systematically have a screen they don't need to see.
At most, if really you want the selection to happen before the menu, use a pure flag as persistent value, to not present the screen once the player have made his selection. Keeping in mind that there's players who will not see the "splashscreen" part anyway.
Maybe I should have shown this from the beginning:

You don't have permission to view the spoiler content. Log in or register now.

The purpose of persistent.chose_lang is to manage the fact that the language selection screen will only be displayed the very first time.

screen say(who, what): style_prefix "say" if renpy.get_screen( "choice" ): # Or whatever name for screen [the version of the screen for when the menu is visible] else: [the regular version of the screen]
Genius !

You don't have permission to view the spoiler content. Log in or register now.
 

Saint_RNG

Member
Apr 2, 2018
111
43
The translation substitution is done after applying all the weird things you came up with. So your string "Stay in cabin (1next)" is no longer "Stay in cabin (1next)" but simply "Stay in cabin", and that's the one you should add to your translation script as an 'old' line. You'll probably need to add those lines manually as Renpy SDK won't find them writen like that anywhere on your scripts.
Damn, another genius !
I've just tried it and it translates my text just the way I want it.
I wouldn't have bet on it being so simple and right in front of my nose...

Python:
screen say_screen_for_custom_choice_menu(who, what):
hbox:
...
text who.name + " : ":
...
it's a truncated string so you may want to try coding it like this, with a doble underscore wraping the variable text:

Python:
screen say_screen_for_custom_choice_menu(who, what):

hbox:

...

text who.name + __(" : "):

...
I haven't actually tried this but I guess it could work.
Thanks for the suggestion, but thanks to the help of anne O'nymous and Sir 79flavors I ended up getting rid of this ugly custom screen .

Thank you all for the quick and precise answers ! o7
 
  • Like
Reactions: moskyx

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,202
14,938
So your string "Stay in cabin (1next)" is no longer "Stay in cabin (1next)" but simply "Stay in cabin" [...]
It's late and the starts of the week have been heavy at work, so... Why the "(1next)" would be removed by Ren'Py ?
 

moskyx

Engaged Member
Jun 17, 2019
3,884
12,489
It's late and the starts of the week have been heavy at work, so... Why the "(1next)" would be removed by Ren'Py ?
It's removed by the replace function he used. Therefore, that text is never displayed, and the string that Renpy looks for translation is the new one without it.

Usually, the text replace function comes into play at the very last moment, even after the translation is executed, but in this case he put it in an if statement (if " (1next)" in caption: ) and that's actually checked before the translation block, in order to complete all the statements of that piece of code - and get it ready for translation. So when it comes the time for translation, the string to translate doesn't include "(1next)" anymore because the replace function removed it.
 
  • Like
Reactions: anne O'nymous

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,202
14,938
It's removed by the replace function he used. Therefore, that text is never displayed, and the string that Renpy looks for translation is the new one without it.
Oh yeah, now that you point to it, I totally see it.


So, I guess it's time to answer again...

Python:
if " (1next)" in caption:
                    $ caption = caption.replace(" (1next)", "")
                    imagebutton auto "wheel/wheel_choice1next_%s.png" focus_mask True xpos -6 ypos 594 action action
                    textbutton caption xpos 1025 ypos 675 action action style "Gold" text_style "Gold_button_text"
This too is totally useless.


menu can have , what would be way better. And not just due to the translation issue, it generally permit to simplify the "choice" screen.

In your case, it would make the screen looks more or less like that:
/!\ It's not less late than two hours ago, and I wrote it on the fly, so I do NOT guaranty that it's fully functional, but at least the idea will be there /!\
Python:
#  Each tuple correspond to the x, y value for the corresponding rank.
#  First entry is None since list index starts at 0.
# For the images.
define choiceImg = [ None, ( -6, 594 ), [...] ]
# For the texts.
define choiceTxt = [ None, ( 1025, 675 ), [...] ]


screen choice(items):

    for i in items:
        # The test is just a security.
        if i.kwargs and "rank" in i.kwargs:
            imagebutton:
                # Will select the image accordingly to "rank" value.
                auto "wheel/wheel_choice{}next_%s.png".format( i.kwargs["rank"] )
                focus_mask True 
                pos choiceImg[i.kwargs["rank"]]
                action i.action
            textbutton i.caption
                pos choiceTxt[i.kwargs["rank"]]
                action i.action
                style "Gold"
                # Why this ? Name the style "Gold_text" and Ren'Py will automatically use it.
                text_style "Gold_button_text"

label whatever:

    #  No need for the "screen" argument, unless there's also part of the game where
    # you use the original menu.
    menu:
        # Pass integer value, NOT text.
        "Stay in cabin." (rank=1):
            $ c1s1_shower = True
            jump s1shower
        "Take a walk around the ship." (rank=2):
            jump s1ship
Couple this with the tweaked "say" screen, and you don't need extra code in each menus for them to looks the way you want.


You are inventive, and it's not me that will reproach someone to be it. But in the time you passed to come up with your approach, you could have read the whole documentation page regarding menus, and understood how to write the code above.
And then you would have had one less issue with the translation (the ":" part would still have been there).

The first step face to a code problem is: Is it possible to do this natively ?
Therefore, always read the doc, at least the big lines, before you starts to find an alternate solution.
 

Saint_RNG

Member
Apr 2, 2018
111
43
I think I've understood more or less all your code.
But I'm still a little unsure whether it would work with my way of doing things.
If I understand correctly, you're assuming that my menu can only contain 6 choices of the same type (limited by the wheel visual).

But currently I have 4 types of choice:
  • Those who move the story forward -> with the pattern (*next) and the style Gold, they can only be on the right part of the wheel (so (1next), (2next) and (3next))
  • Those who are optional, don't advance the story (they're mainly for lore purposes) and ultimately bring you back to the menu in question -> with the pattern (*) and the style Regular, they can be on any part of the wheel (so (1), (2), and so on...)
  • Those that are the choices of corruption / pragmatism -> with pattern (*red) and the style Red, they can only be on the 5th part (mid left) OR the 6th part (top left) of the wheel (so (5red) or (6red)).
  • Those that are the pure / conciliating choices -> with pattern (*blue) and the style Blue, they can only be on the 2th part (mid right) OR the 4th part (bottom left) of the wheel (so (2blue) or (4blue).

* is the number associated with the position on the wheel (1 top right, 2 middle right, 3 bottom right, 4 bottom left, 5 middle left and 6 top left).

Of course, when I create my menu and there are different types of choices, I'm careful not to put, for example, (1) and (1next) in the same menu.

You don't have permission to view the spoiler content. Log in or register now.

Then there's the part with the images and the associated style.
For example :
  • (2next) will have "wheel/wheel_choice2next_%s.png" for the imagebutton and with Style Gold for the textbutton
  • (2) will have "wheel/wheel_choice2_%s.png" for the imagebutton and with Style Regular for the textbutton
  • (2blue) will have "wheel/wheel_choice2blue_%s.png" for the imagebutton and with Style Blue for the textbutton
  • ....
For the Style, I created this :
Python:
init python:
    style.Gold = Style(style.button_text)

    style.Gold_button_text.size = 35
    style.Gold_button_text.slow_cps = 55
    style.Gold_button_text.xmaximum = 600
    style.Gold_button_text.color = "#bebebe"
    style.Gold_button_text.hover_color = "#FFD688"
    style.Gold_button_text.outlines = [(2, "#000", 0, 0)]
with the equivalent for Regular, Blue and Red.

Now, would your (rank=*) system work for me ?
Maybe I should rename my images so that they all have the same pattern. And when it comes to rank, I could put rank=1 for (1), rank=2 for (2), and so on until rank=7 for (1next), rank=8 for (2next), [], rank=11 for (5red), rank=12 for (6red)....

This could get confusing fast, no ?

I'd already looked at the doc at the time I made this menu, but English not being my native language, I've always had trouble understanding when there's no concrete example to illustrate it.
This was the case with kwargs, I understood briefly but I couldn't make the link with the use I wanted to make of it.

I've never really had this problem with Java because there's quite a lot of documentation in French, and when it's a specific problem, there's often someone who's had it before me and who's been able to get help online.
Unfortunately, it's a bit harder when it comes to Ren'Py and the problem is about something a bit more complex than the basics. :(
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,202
14,938
[...] you're assuming that my menu can only contain 6 choices of the same type [...]
To whom are you talking ? Because there's clearly no limits in the code I wrote and it don't even need the menu to be like yours.
It's something purely universal that can apply to your wheel menu, as well as a menu that would spread the choices all over the screen, or any other idea that one could come with.


But currently I have 4 types of choice:
And 79flavors already addressed this, while I put a reminder in the comments of my code ("No need for the "screen" argument, unless [...]").

But even there the "screen" argument isn't necessary. While being here as a security, the test also explain how to deal with different kind of menus.
The most logical approach would be to rely on a second argument:
Python:
screen choice(items):

    for i in items:
        # The test is still just a security.
        if i.kwargs and "rank" in i.kwargs:
                imagebutton:
                    if "kind" in i.kwargs and i.kwargs["kind"] == "blue":
                        auto "wheel/wheel_choice{}blue_%s.png".format( i.kwargs["rank"] )
                    elif "kind" in i.kwargs and i.kwargs["kind"] == "red":
                        auto "wheel/wheel_choice{}red_%s.png".format( i.kwargs["rank"] )
                    elif "kind" in i.kwargs and i.kwargs["kind"] == "next":
                        auto "wheel/wheel_choice{}next_%s.png".format( i.kwargs["rank"] )
                    else:
                        auto "wheel/wheel_choice{}_%s.png".format( i.kwargs["rank"] )
                    focus_mask True 
                    pos choiceImg[i.kwargs["rank"]]
                    action i.action
                textbutton i.caption
                    pos choiceTxt[i.kwargs["rank"]]
                    action i.action
                    style "Gold"

label whatever:
    menu:
        "choice 1" (rank=1, kind="blue" ):
            [...]
        "choice 2" (rank=3, kind="next" ):
            [...]
        "choice 3" (rank=5, kind="red" ):
            [...]
        "choice 4" (rank=6 ):
            [...]
Side note: I know, there's no need for the second if structure, but it feel needed in this thread...

or it can even be something like that:
Python:
screen choice(items):

    for i in items:
        # The test is still just a security.
        if i.kwargs:
            if "rank" in i.kwargs:
                imagebutton:
                    auto "wheel/wheel_choice{}next_%s.png".format( i.kwargs["rank"] )
                    focus_mask True 
                    pos choiceImgRank[i.kwargs["rank"]]
                    action i.action
                textbutton i.caption
                    pos choiceTxtRank[i.kwargs["rank"]]
                    action i.action
                    style "Gold"
            elif "red" in i.kwargs:
                [whatever else you want]

For the Style, I created this :
Python:
init python:
    style.Gold = Style(style.button_text)

    style.Gold_button_text.size = 35
    style.Gold_button_text.slow_cps = 55
    style.Gold_button_text.xmaximum = 600
    style.Gold_button_text.color = "#bebebe"
    style.Gold_button_text.hover_color = "#FFD688"
    style.Gold_button_text.outlines = [(2, "#000", 0, 0)]

Python:
style Gold is button
style Glod_text is button_text:
    size 35
    slow_cps 55
    [...]

Now, would your (rank=*) system work for me ?
It's... I mean... zeeeeeennnn...


I'd already looked at the doc at the time I made this menu, but English not being my native language, I've always had trouble understanding when there's no concrete example to illustrate it.
It isn't mine either, and it's highly possible that you weren't born last time I attended an English course.


This was the case with kwargs, I understood briefly but I couldn't make the link with the use I wanted to make of it.
Links are there to be followed, even in a documentation:
" "
And if really you don't know what keyword arguments are, there's ...


I've never really had this problem with Java because there's quite a lot of documentation in French,
And like there's nothing regarding Ren'Py in French... oh, wait, sorry, ...
Many pages are outdated, but it's not like there's nothing. And, as outdated as they can be, they are still a starting point to understand the doc.
And, of course, all this also apply to , including .


and when it's a specific problem,
Sorry to deceive you, but so far you haven't addressed a specific problem. Customizing menus is something relatively basic. Around 20% of the games are doing it in a way or another. Some being way more complex than yours ; I even vaguely remember a game available here that also use Mass Effect-like menus.


[...] the problem is about something a bit more complex than the basics. :(
I know that I'm not in the best place to judge that, but your problem is nothing more than passing arguments to the choices, and placing elements on the screen. Therefore, it still fall really near to the basic scope when it come to Ren'Py.
The only difficulty is that (too) many devs still don't know that they can pass arguments to choices...
 

Saint_RNG

Member
Apr 2, 2018
111
43
I guess I bugged with your "rank integer" thing yesterday, but seeing your first example today it immediately makes more sense as to how I want to manage my menu.
I didn't think it was possible to put if tags under an imagebutton, or any other object. It seems counter-intuitive at first, but if it's possible, it opens up a lot of new possibilities for me.

The worst thing is that now I realise I'm already using kwargs for other classes I've created (for character stats, etc), I don't know why I didn't make the connection regarding the menu. I guess I thought "it works the way it is, so I'll leave it like this and maybe I'll come back to it one day to improve it".

I remember watching a series of French tutorials on youtube but it was really the basics and concerned a type of VN that I'm not aiming at (with a basic background and lots of sprite characters that appear/disappear, move and speak).
Then I watched some series of Game Developer Training (can't remember what the previous name of his channel was) but again, it was either too advanced or concerned an aspect (sandbox game, mini-games, etc.) that doesn't apply to my needs.

Our different experiences mean that we probably don't see the 'basic' level in the same way.

For my project, every "visual" is done inside the images, so it requires even less knowledge than a "classic" VN.
So until now, I've just had to use :
You don't have permission to view the spoiler content. Log in or register now.

Personalising my menu was one of the first times I'd actually 'created' something new inside my project, and in my point of view, it's starting to leave the basics to be the start of intermediary level.

As I can only work on my project for one or two hours a day, I've had to make sacrifices about which parts to prioritise for learning.
I decided to devote the little time I had to prioritising training on Daz, given that the basics of Ren'Py were fairly simple to understand and use. It was probably my fault for not spending more time learning Ren'Py, but we're still learning every day, and in the end I probably learned more in those 2 days than I have since I started using Ren'Py.