Tool Ren'Py Ren'Py Transparent Text Box Mod v2.6.4

5.00 star(s) 6 Votes

Waste_of_Time

Newbie
Jan 2, 2021
15
15
Weird. Seems like the built-in label overriding system isn't functioning in that game the way it has been doing since I started using it in my patch.

Maybe it's old? The engine itself. What's the Ren'Py version of this game? In the main folder there should be a text file named log.txt, Ren'Py version should be on the third line.

You could just try the old v2.4.12 patch in the meantime. It has no label overrides defined in it.
Thanks Penfold. Yeah I did try the previous 2.4 version and it worked just fine. I don't think it was your mod...I think game dev had some glitches or there were some patches that conflicted...whatever. All good. Thanks for the help! :)
 
Apr 5, 2021
36
82
I've noticed that some games have things like textbox1 or textboxX or textbox_thoughts etc. This is why they still show up in game.
Yes, some devs are using character definitions to assign text box background images to some or all characters. In that case my patch currently is unable to deal with them.
That seems like a good explenation.
Is it possible to change the mod somehow to fix these cases, or is that more or less impossible cos different games name them differently or something?
 

Chrisdarock19

Well-Known Member
Oct 15, 2018
1,140
1,636
That seems like a good explenation.
Is it possible to change the mod somehow to fix these cases, or is that more or less impossible cos different games name them differently or something?
Penfold was kind enough to help me out with such a situation with the
You don't have permission to view the spoiler content. Log in or register now.
contained in the attached patch. I have been checking the gui folder of games and updating the list as time goes on.
 

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,094
7,513
Penfold was kind enough to help me out with such a situation with the
You don't have permission to view the spoiler content. Log in or register now.
contained in the attached patch. I have been checking the gui folder of games and updating the list as time goes on.
Just a warning - this patch was made for one specific game where the main character's thoughts are defined as a separate character who is represented in the game as a character variable named mcth, with a name that is represented by a string variable named player_name.

I doubt that there are any other games where those two conditions are met.

The main problem with this kind of approach is that every game needs a specific custom made override. This is what I have been adding to the patch and this kind of overrides are the main content of the patch so far.
However, with the increasing number of problematic games this kind of approach is not viable.

There is another, more universal kind of solution to override character definition based attributes, but I haven't had time to implement it in a nice way into my patch, so it could be switched on and off, maybe.

Attached new additional patch should be more universal at overriding character-based attributes. It will remove textbox background and set text outlines for all characters in case some other kind of outlines or a background has been added to some or all characters via character definition arguments. I just made and tested it and it seems to work.
You don't have permission to view the spoiler content. Log in or register now.
It should be used together with the current transparent textbox patch.

You have to extract or copy say_arguments_override.rpy file from the attached zip archive into the 'game' subfolder inside the main game folder
<game_name>\game <- the file goes in here
 
Last edited:
Apr 5, 2021
36
82
Just a warning - this patch was made for one specific game where the main character's thoughts are defined as a separate character who is represented in the game as a character variable named mcth, with a name that is represented by a string variable named player_name.

I doubt that there are any other games where those two conditions are met.

The main problem with this kind of approach is that every game needs a specific custom made override. This is what I have been adding to the patch and this kind of overrides are the main content of the patch so far.
However, with the increasing number of problematic games this kind of approach is not viable.

There is another, more universal kind of solution to override character definition based attributes, but I haven't had time to implement it in a nice way into my patch, so it could be switched on and off, maybe.

Attached new additional patch should be more universal at overriding character-based attributes. It will remove textbox background and set text outlines for all characters in case some other kind of outlines or a background has been added to some or all characters via character definition arguments. I just made and tested it and it seems to work.
You don't have permission to view the spoiler content. Log in or register now.
It should be used together with the current transparent textbox patch.

You have to extract or copy say_arguments_override.rpy file from the attached zip archive into the 'game' subfolder inside the main game folder
<game_name>\game <- the file goes in here
Thanks a lot man! I use your patches on every single game i play!
 
  • Like
Reactions: Penfold Mole

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,094
7,513
Can you please make smaller text mod?
You mean, a patch that would change text box text size smaller than it originally is?
The problem is that different games are using different fonts, a size that looks right for Ren'Py default font (DejaVuSans) may be too small or too large for some other font.

You can try my experimental beta patch that I've been using myself. It may work with lesser number of games or work partially with some, screw up the looks of the dialog box, possibly making it unreadable and so on. Even crash some games.
Before you patch a game with it, always try it without the patch before you do.
So in case it screws up the game, you won't start to blame the game dev.
The patch replaces dialog box (screen say) of the game with the Ren'Py default, so some games with custom made UI's may not work or be unplayable, some may be missing parts of UI, like status bars that were attached to the screen say in its code.

In case the patch doesn't work, just use the current stable version of the patch or remove the patch completely by deleting y_outline.rpy and y_outline.rpyc files from the 'game' subfolder.

Extract the contents of the zip or copy the 'game' folder from the zip into the the main game folder, overwriting original 'game' subfolder or copy y_outline.rpy from the zip into the 'game' subfolder in the main game folder.
In any case:
<game_name>\game <- y_outline.rpy file goes in here.

Restart the game and click on the "?" button in the quick menu or use Alt+F1 for additional info.

________________________
v3.1beta
- fixed accidentally out commented start label override removal after the patches special start has already run, creating an infinite loop when starting a new game. Sorry about this!
 
Last edited:

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,094
7,513
What about for Android versions?
If the Android build of a Ren'Py game is patchable, then the same patch works, there is no need for a separate version for Android. Ren'Py and Python code used in the patch is the same for all platforms.
If the Android build of a game is not patchable, then it has to be pre-patched before building an apk.
And I'm not making patched versions nor Android builds of games.

If you are talking about adding Android touch controls or any other Android-specific features to the patch, then I have no plans about it.
 

8464856348

Member
Jan 2, 2021
112
81
If the Android build of a Ren'Py game is patchable, then the same patch works, there is no need for a separate version for Android. Ren'Py and Python code used in the patch is the same for all platforms.
If the Android build of a game is not patchable, then it has to be pre-patched before building an apk.
And I'm not making patched versions nor Android builds of games.

If you are talking about adding Android touch controls or any other Android-specific features to the patch, then I have no plans about it.
I just mean transparent for apk games?
 

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,094
7,513
I just mean transparent for apk games?
You can try to put y_outline.rpy from the patch zip or a pre-compiled y_outline.rpyc attached to the linked post into the 'game' subfolder in the main game folder on your internal or external memory card, where the game has created its folder structure:

https://f95zone.to/threads/renpy-transparent-text-box-mod-v2-6-3.11925/post-4232911

Apparently it worked at least once.

If the game hasn't created a folder structure on your memory card, then the Ren'Py version may be too old (older than v7.2.2) or the feature switched off while building an Android version by the dev. In that case I can't help you, since it requires the game apk itself to be rebuilt.
 

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,094
7,513
found any fix?, still doesnt work
Box transparency in this game can be changed from preferences, as frozenfeet found and already posted. You probably shouldn't need the patch.
A custom made dialog box with customizable transparency is also the reason why my patch isn't working there.

Or you can try the experimental patch posted above. It replaces the text box entirely.
 

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,094
7,513
i dont have any option like that in the game
Right. They were talking about different games. I didn't remember that.

Depends, what exactly makes my patch not able to work there.

You can try an above that overrides some of the text box settings set via say arguments in character definitions.

If that doesn't work, then the experimental patch I suggested before, might work. No guarantees.
 
Apr 23, 2021
43
48
Hi, in the game Lessons in Love the MC's name is in so dark color that when this mod is used it gets almost invisible against dark background.
I ugly-hacked around this by decrypting the games rpyc files, and in the file definitions change the line
define s = Character("Sensei", color="#141414")
to
define s = Character("Sensei", color="#0066CC") (blueish)

I can see in your mods files that there already are commands for several named games, but I know too little to add the same changes to your mod, which would be preferable since loading the gamewith decrypted rpyc-files is pretty damn slow... ;)
So, if you would add some commands for Lessons in Love I would be much obliged!
 

neman

Member
Jan 5, 2020
247
247
I just got Sylphine game. And before i could even get into the story , one thing annoyed me greatly. All text and character images are positioned in center of the screen, covering a lot..so made this.

Code:
    ######### Sylphine
    ## Overriding chat text and image positioning , moving from center of screen to the left side
    if config.name == "Sylphine":
        ## The height of the textbox containing dialogue.
        define gui.textbox_height = 278

        ## The placement of the textbox vertically on the screen. 0.0 is the top, 0.5 is
        ## center, and 1.0 is the bottom.
        define gui.textbox_yalign = 1.0


        ## The placement of the speaking character's name, relative to the textbox.
        ## These can be a whole number of pixels from the left or top, or 0.5 to center.
        define gui.name_xpos = 360
        define gui.name_ypos = 0

        ## The horizontal alignment of the character's name. This can be 0.0 for left-
        ## aligned, 0.5 for centered, and 1.0 for right-aligned.
        define gui.name_xalign = 0.0

        ## The width, height, and borders of the box containing the character's name, or
        ## None to automatically size it.
        define gui.namebox_width = None
        define gui.namebox_height = None

        ## The borders of the box containing the character's name, in left, top, right,
        ## bottom order.
        define gui.namebox_borders = Borders(5, 5, 5, 5)

        ## If True, the background of the namebox will be tiled, if False, the
        ## background if the namebox will be scaled.
        define gui.namebox_tile = False

        ## The placement of dialogue relative to the textbox. These can be a whole
        ## number of pixels relative to the left or top side of the textbox, or 0.5 to
        ## center.
        define gui.dialogue_xpos = 402
        define gui.dialogue_ypos = 75

        ## The maximum width of dialogue text, in pixels.
        define gui.dialogue_width = 1116

        ## The horizontal alignment of the dialogue text. This can be 0.0 for left-
        ## aligned, 0.5 for centered, and 1.0 for right-aligned.
        define gui.dialogue_text_xalign = 0.0

        # Ren'Py default dialog screen    
        screen say(who, what):
            style_prefix "say"
            window:
                id "window"
                if who is not None:
                    window:
                        id "namebox"
                        style "namebox"
                        text who id "who"
                text what id "what"
            if not renpy.variant("small"):
                add SideImage() xalign 0.0 yalign 1.0
Thanks Penfold Mole for amazing script
 

Walter Victor

Conversation Conqueror
Dec 27, 2017
6,000
20,420
WHOOPIE! I tried your Experimental Beta patch on Price of Power, and it works perfectly. Finally, I can play that game without that $%*(U! text box taking up a quarter of the screen! Thank you! Thank you! Thank you!
 

arroganz

Member
Sep 6, 2020
135
168
WHOOPIE! I tried your Experimental Beta patch on Price of Power, and it works perfectly. Finally, I can play that game without that $%*(U! text box taking up a quarter of the screen! Thank you! Thank you! Thank you!
You know that you can change that ingame?
As far as I love this patch, and use it quite often, you don't need in Price of Power.
 
5.00 star(s) 6 Votes