Tool Ren'Py Abandoned Menu Choices Method [0.41] [ZLZK]

ZLZK

Member
Modder
Jul 2, 2017
274
568
Overview:
Edit text of any Menu Choice from any Ren'Py game.
Method for modders who makes walkthrough mods.
Updated: 2022-07-29
Released: 2022-02-23
Modder: ZLZK
Method Version: 0.41
Ren'Py Version: 6.14 or newer / 6.99.11 or newer

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

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

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

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

Download: Menu Choices Method [0.41] [ZLZK].zip

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

I'll try to fix any upcoming issues related to this method.
And I'm open for suggestions.
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,130
14,809
I'll try to fix any upcoming issues related to this method.
Before this, you should probably provide a working version:
ZLZK.MenuChoices.rpyAllMenus()
TypeError: sequence items 3: except string or Unicode, NoneType found
Then, the use config.basedir for the file creation would be a good idea ; yes, it change a little something, an important little something.

Then you can discover that menu can have their own label. Just in case someone feel adventurous and decide to build the structure by itself.

I also fail to see why the question embedded in the menu is proceeded and presented as if it was a choice.


After, yeah, it works.
But it's ~200 lines that use a relatively abstract syntax, and rely on internal behavior that have no guaranty of constancy ; I would have tried it with the 8.0.0, but I don't feel like porting it to Python 3.x first. Therefore I wonder what it really add to the good old 4 lines method relying on native features and used (not by everyone, I agree) since years:
Python:
init python:
    # <------ The equivalent to your near to 200 lines of code
    toChange = {}

    def smtf( text ):
        return toChange[text] if text in toChange else text

    config.say_menu_text_filter = smtf
    # ------>

    # <------ The equivalent to your abstract syntax
    config.label_overrides["whatever"] = "whateverPATCHED"
    config.label_overrides["whateverORIGINAL"] = "whatever"

label whateverPATCHED:
    if walkthroughEnabled:
        $ toChange = { "Whatever menu choice": _( "Whatever changed menu choice" ),
                              "Another menu choice": _( "Another changed menu choice" ) }
    jump whateverORIGINAL
    # ------>
It's totally transparent, guaranty to works with any version of Ren'Py since the 6.15 at least, as well as any future versions, easy to maintain, translation compliant, it don't need external code, and it's near to cost free when used that way.
 

ZLZK

Member
Modder
Jul 2, 2017
274
568
Before this, you should probably provide a working version:
I have done handling of empty argument, I just forgot to change variable name later in the code.

Then, the use config.basedir for the file creation would be a good idea ; yes, it change a little something, an important little something.
I have no idea where I should save the file, so I didn't specify any path.

Then you can discover that menu can have their own label. Just in case someone feel adventurous and decide to build the structure by itself.
Then there are alternatives you mentioned.

I also fail to see why the question embedded in the menu is proceeded and presented as if it was a choice.
Because Ren'Py has it in that way.
I had no idea about this.
I mean the games I have used this on didn't had questions in menus.
But this isn't an issue it's even feature when you can change even questions.

But it's ~200 lines that use a relatively abstract syntax, and rely on internal behavior that have no guaranty of constancy ; I would have tried it with the 8.0.0, but I don't feel like porting it to Python 3.x first. Therefore I wonder what it really add to the good old 4 lines method relying on native features and used (not by everyone, I agree) since years:
Because you can use numbers instead of texts.
And numbers have the less chance of being changed in later updates.
config.say_menu_text_filter works for all menus.
I mean it fails when text is same in other menus.
When my tool modify specified menu.

It's totally transparent, guaranty to works with any version of Ren'Py since the 6.15 at least, as well as any future versions, easy to maintain, translation compliant, it don't need external code, and it's near to cost free when used that way.
I have started working on WT Mod for the game Photo Hunt with a use of this method.
If you think you can do this better than me then try it on View attachment photo_hunt_wt.zip .
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,130
14,809
I had no idea about this.
Wait, you wrote a whole tool dealing with menus without knowing about what is their oldest feature ?


Because you can use numbers instead of texts.
And numbers have the less chance of being changed in later updates.
Beeeeep ! After five years on the scene, I can affirm without real doubt that they both present the same risks of change.


config.say_menu_text_filter works for all menus.
I mean it fails when text is same in other menus.
That's why config.label_overrides is used.


If you think you can do this better than me [...]
I don't know, and I care even less...

You said that you're open to suggestion, I gave you some. In another thread, you said that you were curious to know how others deal with this issue, now you know.
After, if you want to start a dick contest, feel free to do it. Just know that you'll win it because, except you, no one here will attend it.
 

ZLZK

Member
Modder
Jul 2, 2017
274
568
Beeeeep ! After five years on the scene, I can affirm without real doubt that they both present the same risks of change.
Actually my method have more risks probably, but it comes with other benefits.

You said that you're open to suggestion, I gave you some. In another thread, you said that you were curious to know how others deal with this issue, now you know.
After, if you want to start a dick contest, feel free to do it. Just know that you'll win it because, except you, no one here will attend it.
I didn't meant it in that way, and I appreciate your input.
I just think the way I have done things are just more convenient or at least to me.
So I don't want to try doing it in inconvenient ways for me.
That's why I asked you to do it.
Or you can link me some examples—that does what my mod does—that are using your suggestions.
I'm amateur in programming so I have troubles in making something I know nothing about from scratch.
And I'm demotivated to change my working code for unknown.