Ren'Py help with this game script

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,566
7,384
I'm not following what you're trying to accomplish.

One way of enabling a lot more... features in a Ren'py game is to add an .rpy file to it that contains this:

Code:
init 999:
    config.developer = True
    config.console = True
With this in place, you can hover the mouse over a portion of the UI and press Shift-I (capital I) and it will tell you the .rpy file that generated that bit of content, along with the line number. That would theoretically allow you to go in and mod the game, if you wanted.

Of course, if the files are only in .rpyc format, or if they're bundled in a .rpa file, you may need to decompile portions of the game. (Hint - "unren")
 
  • Heart
Reactions: WankerDxD

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,611
2,258
I'm not following what you're trying to accomplish.

It's a continuation from another thread, so some of the context is missing.

Basically, they are a player who plays with self voicing switched on (SHIFT+V) - but because most devs don't even consider self voicing when creating their UI - the game has a tendency to voice stuff that realistically you don't want to hear repeated 30 times every minute (usually stuff that appears in status toolbars).

In the other thread, we talked about how you can code alt "" to bypass the self voicing for specific UI elements. Seems they've found some parts of Cure My Addition (Chapter 1) that they can't nail down where to edit the script.

Looking now.
 
Last edited:

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,611
2,258
Firstly, some of the scripts you have attached seem to come to an abrupt end - with most of the code missing. Not quite sure what happened there, so I looked at the original code for chapter 1 instead.

You've picked a terrible game to try to remove the self voicing from. The developer is clearly very clever, somewhat too clever and both organized and disorganized. Though I tend to end up with folder names that look like /saved/old/temp/temp2/march/keep/ too - so I am perhaps not one to criticize.

Anyway... for example... the date and time shown in the top left of the screen is actually coded in 3 places (and two separate screens).

Python:
# file /game/scripts/zz_oldgame/_gui.rpy

screen timeAndDay():

#blah, blah, lots of clever screen script

            hbox:
                xalign 0.0
                yoffset 5
                xoffset 10
                spacing 5
                if getGameLocation() == "yacht":
                    vbox:
                        text getFullDay() size 18 color "#eae8b0" font "Bangers-Regular.ttf" outlines [ (0, "#333333", 1, 1) ] text_align 0.5 alt ""
                        text getTime() size 40 color "#ffffff" font "Bangers-Regular.ttf" outlines [ (0, "#333333", 1, 1) ] text_align 0.5 alt ""
                        text "DAY " + getDay() size 16 color "#eae8b0" font "Bangers-Regular.ttf" outlines [ (0, "#333333", 1, 1) ] text_align 0.5 alt ""
                else:
                    vbox:
                        text getFullDay() size 18 color "#eae8b0" font "Bangers-Regular.ttf" outlines [ (2, "#333333", 1, 1) ] text_align 0.5 alt ""
                        text getTime() size 40 color "#ffffff" font "Bangers-Regular.ttf" outlines [ (2, "#333333", 1, 1) ] text_align 0.5 alt ""
                        text "DAY " + getDay() size 16 color "#eae8b0" font "Bangers-Regular.ttf" outlines [ (2, "#333333", 1, 1) ] text_align 0.5 alt ""

#blah, blah, more clever screen script

Python:
# file /game/scripts/!init/!old/_gui_screens.rpy

screen timeAndDay2():

#blah, blah, lots of clever screen script

            vbox:
                xalign 0.0
                yoffset 5
                xoffset 10
                spacing 10

                vbox:
                    text Time.getFull_day() alt "test" size 18 color "#eae8b0" font "Bangers-Regular.ttf" outlines [ (2, "#333333", 1, 1) ] text_align 0.5 alt ""
                    text Time.getHour() alt "test" size 40 color "#ffffff" font "Bangers-Regular.ttf" outlines [ (2, "#333333", 1, 1) ] text_align 0.5 alt ""
                    text "DAY " + Time.getDay() alt "test" size 16 color "#eae8b0" font "Bangers-Regular.ttf" outlines [ (2, "#333333", 1, 1) ] text_align 0.5 alt ""

#blah, blah, more clever screen script

That's 3 places that need updating, just to remove the voicing from just that one small piece of the UI.
(my test code above includes the alt "" tagged on to the end of each line that needs it).

In my case, to find these bits... I did a "Search Within All Files" within my editor of choice and searched for "DAY" in all files named *.rpy. I also told it to only search for matches where the case matched - so I only got code where it was all capital letters.

In both files, the UI elements that appear on screen near the Date/Time are also coded just above and below too. So just look for screen code that uses the text statement and you'll likely find the stuff you need to add alt "" to.

I don't envy your task. This code is a bit chaotic if you are not the original developer. But with patience and luck, it should be possible.

Attached is the script files I was playing with. It has removed the self voicing for most of the UI elements while on the yacht. Though I stopped at that point. It may serve as a good starting point for you though. I'm sure it will need continued work though.
 
  • Like
Reactions: anne O'nymous

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,566
7,384
It's a continuation from another thread, so some of the context is missing.

Basically, they are a player who plays with self voicing switched on (SHIFT+V) - but because most devs don't even consider self voicing when creating their UI - the game has a tendency to voice stuff that realistically you don't want to hear repeated 30 times every minute (usually stuff that appears in status toolbars).
Ah, OK. Now the question makes sense, given the context. :)

I've never tried any of the projects which I've developed with self-voicing turned on. Have to do that and see what happens.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,978
16,236
[...] because most devs don't even consider self voicing when creating their UI [...]
I've never tried any of the projects which I've developed with self-voicing turned on. Have to do that and see what happens.
I think it come from the confusing need of the self-voicing feature.
We tend to consider that someone who can't read the text is someone who don't see... and therefore wouldn't play a game that massively rely on images. But there's also those who just have difficulties to see too small text, or have a strong dyslexia (possibly aggravated by the fact that it's not their native language), and therefore would feel more at ease by hearing the text, while still being able to see the images.
 

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,566
7,384
I think it come from the confusing need of the self-voicing feature.
We tend to consider that someone who can't read the text is someone who don't see... and therefore wouldn't play a game that massively rely on images. But there's also those who just have difficulties to see too small text, or have a strong dyslexia (possibly aggravated by the fact that it's not their native language), and therefore would feel more at ease by hearing the text, while still being able to see the images.
Absolutely correct - that was why I figured I needed to look into it. We shouldn't forget those who have disabilities of any form, or who would just prefer to be read to.
 
  • Like
Reactions: anne O'nymous
Sep 3, 2020
4,501
31,272
Ah, OK. Now the question makes sense, given the context. :)

I've never tried any of the projects which I've developed with self-voicing turned on. Have to do that and see what happens.
me for example because I was poor and I couldn't use my legs I never got an education

so I cannot read at all without software to help me

and there have been many games I wanted to play but because they were too many stats on the screen I kept hearing 0000 or I hear Monday 5:00 and fifty dollars

before every single line of dialogue so I've been searching for a way to turn off the UI in games whenever I find one