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

5.00 star(s) 6 Votes

lydcreations

Member
Game Developer
May 6, 2019
304
405
I like the look of the transparent text box. However it shrinks the font size of the choice menu:
choice menu1.png

When I remove the y_outline.rpy the choice menu font goes back to the larger size. How can I adjust the font size of the choice menu so that I can use the transparent text box? Thanks.
 

I'm Not Thea Lundgren!

AKA: TotesNotThea
Donor
Jun 21, 2017
6,599
19,002
I like the look of the transparent text box. However it shrinks the font size of the choice menu:
View attachment 410092

When I remove the y_outline.rpy the choice menu font goes back to the larger size. How can I adjust the font size of the choice menu so that I can use the transparent text box? Thanks.
I fixed this by changing the size setting under:
Code:
## choice button text style
    style choice_button_text:
from
Code:
size style.say_dialogue.size
to
Code:
size 48
(I like my text bigger)
 
  • Like
Reactions: lydcreations

lydcreations

Member
Game Developer
May 6, 2019
304
405
I fixed this by changing the size setting under:
Code:
## choice button text style
    style choice_button_text:
from
Code:
size style.say_dialogue.size
to
Code:
size 48
(I like my text bigger)
Thank you for the reply & adjustment. I ended up deleting the line you reference from the original code. This allowed the menu text to go back to the original size. Good to see how I would need to code it if I wanted to adjust the size.
 

abhi1180

Active Member
Sep 12, 2018
525
419
I used it with deviant discoveries the textbox became transparent but the quick menu was not there what to do please help....
 

UncleVT

Låt den rätta komma in
Moderator
Jul 2, 2017
9,438
101,917
I used it with deviant discoveries the textbox became transparent but the quick menu was not there what to do please help....
Did you tried this?
  1. In case quick menu is hidden in some games and after applying transparency patch v2.5 or newer it won't appear when you hit (repeatedly) Alt+Shift+M, you may have to set
    $ suppress_overlay = False
    $ quick_menu = True
    manually via console. Starting a new game sometimes also works.
 
  • Like
Reactions: Penfold Mole

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,099
7,539
which file i have to edit the gui file...
You don't have to edit any files, it won't help. You have to open Ren'Py console and type it in there while playing the game. In case it works, make a new save at that point. You can load the game from it again, should you accidentaly rollback to a point where the menu was still off.

Shift+o should open the console, unless it's disabled by the game dev. The easiest way to enable it is UnRen: https://f95zone.to/threads/3083

UncleVT, thanks for helping out while I was AFK!
 
  • Like
Reactions: UncleVT

abhi1180

Active Member
Sep 12, 2018
525
419
You don't have to edit any files, it won't help. You have to open Ren'Py console and type it in there while playing the game. In case it works, make a new save at that point. You can load the game from it again, should you accidentaly rollback to a point where the menu was still off.

Shift+o should open the console, unless it's disabled by the game dev. The easiest way to enable it is UnRen: https://f95zone.to/threads/3083

UncleVT, thanks for helping out while I was AFK!
Actually i got a much better solution for all those games in which quick menu was either hidden or was completely removed by the dev and that renpy restoration patch v2.0 with which you can toggle the quick menu in nearly all the renpy games even if the dev has not added it and play the game hands free....
 

TessSadist

Well-Known Member
Donor
Game Developer
Aug 4, 2019
1,298
5,558
This is such a great mod, is there an easy way for a developer to implement this when create a game? I am a not a tech person, so curious if there is a basic way to do it or learn somehow, thank you!
 
  • Like
Reactions: Namco15

Walter Victor

Conversation Conqueror
Dec 27, 2017
6,007
20,447
This is such a great mod, is there an easy way for a developer to implement this when create a game? I am a not a tech person, so curious if there is a basic way to do it or learn somehow, thank you!
All they need to do is to drop it into the game folder of their release. I've seen it done, some with minor modifications.
 
  • Like
Reactions: Namco15

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,099
7,539
Well, most of the code there is actually to overwrite character definitions in many games where dialog box background, text color or style has been set via what_ parameters for every character separately - a feature of Ren'Py that should never-ever be used, unless you really-really want to assign different backgrounds, colors and styles to your characters.
Unfortunately, what I keep seeing in many games where the dev has made an attempt to change the default style of the dialog box, that this has been done by repeating exactly the same collection of what_ and who_ parameters for every single character :eek:, while it should have been done by simply changing the style of the dialog box itself ('style say_dialogue' and 'style window').
For me this is a kind of nightmare, because this kind of use of character styles has the highest priority in Ren'Py (otherwise it wouldn't work) and the only way to disable it (that I know of) is to overwrite every one of those characters without those parameters.

I wish I had a way to disable this feature of Ren'Py, so that it would ignore all the what_ and who_ parameters in all the character definitions... :unsure: I've been digging through the Ren'Py code time and time again, but with my non-existent Python skills it's not easy to find which of the Ren'Py core files are responsible for reading these parameters and injecting them into the dialog box and how to change those files to stop them from doing just that and without breaking anything else. I guess I should ask some help with this.


Any dev can easily remove dialog box background, add the same kind of outlines to text and change text color to white by just adding these lines somewhere before the start label:

Python:
init:

    style say_dialogue:
        color "#FFFFFF"
        outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]

    style say_label:
        outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]

    style window:
        background None
And that's it. There is no need for the whole patch.

If you want the same kind of quick menu, it's a bit different and more code, but also much less than there is in the patch right now.

___________________________________
A little addition:

In case you want to add outlines to input prompt and input text also, then you can add these lines to the previous ones (still under the init section):

Python:
    style input_prompt:
        color "#FFFFFF"
        outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]

    style input:
        color "#FFFFFF"
        outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]
To add outlines to all text without exceptions you don't have to change styles individually, you could change default style instead:

Python:
    style default:
        color "#FFFFFF"
        outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]
If you want outlines to be scaled up and down with the game window and text inside it, you should drop absolute() and use plain numbers. Absolute means that the size is always 2 pixels, no matter how large the game window itself is at the moment. Without it the size is relative to the window size on your screen.

Python:
    style default:
        color "#FFFFFF"
        outlines [ (2, "#000", 1, 1) ]
 
Last edited:

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,099
7,539
Added new v2.6 of the patch to the OP.

There are (almost) no changes to specific game overrides in this version.
Main changes are all about the customized quick menu, including a working solution to the one major problem that in some games quick menu is either deactivated, hidden or completely missing - this is the main reason for marking this version as the first of the new 6th subversion of the patch v2.


v2.6 Changelog:
- Added tooltips to the quick menu
- Added temporary remapping to "start" and "after_load" labels to always activate quick menu before the game code is executed. Menu can still be hidden by Alt+m, but it will remain active while hidden.
Since this remapping is removed right after added commands and the actual after_load gets called or game jumped to the real start label, added code should not interfere with the game itself.
This also resolves quick menu problems in games like EstateDominate where quick menu is missing from the dialog box screen.
- Added removal of custom gui.quick_button parameters to keep the looks of my minimalistic quick menu style. This resolves a little problem with the v0.3.5 version of the Summer Scent game and possibly some other games where these parameters have been set.
- Some other minor changes
 
Last edited:
5.00 star(s) 6 Votes