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

5.00 star(s) 6 Votes

FranceToast

Active Member
Donor
Jul 31, 2018
562
896
This may be an odd question-but is it possible to have different transparency boxes depending on who is speaking?
 
  • Thinking Face
Reactions: Twistty

Twistty

The Happy Beaver
Donor
Respected User
Former Staff
Sep 9, 2016
4,389
39,267
This may be an odd question-but is it possible to have different transparency boxes depending on who is speaking?
Usually there is just one defined - textbox.png for example - but it possible - but quite a bit of work.
You would have to add new text-boxes numbered textbox1.png, textbox2.png, etc and edit the games code.
 

FranceToast

Active Member
Donor
Jul 31, 2018
562
896
Usually there is just one defined - textbox.png for example - but it possible - but quite a bit of work.
You would have to add new text-boxes numbered textbox1.png, textbox2.png, etc and edit the games code.
Ah, what I am thinking about is a translucent text box for the MC, and a completely transparent text box for other characters-which I guess would be no text box at all. Not sure if that is easier or also complicated, lol.
 

The Krypt Angel

Engaged Member
Feb 17, 2019
3,365
9,479
Penfold Mole using the mod with Lust Awakens triggers the following error on start up:

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/y_outline.rpy", line 63: u'tooltip' is not a keyword argument or valid child for the textbutton statement.
textbutton _("◀-|") action Rollback() xpos -40 tooltip "Back"
^

Ren'Py Version: Ren'Py 6.99.13.2919
 
  • Like
Reactions: Penfold Mole

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,099
7,541
Yes, older versions of Ren'Py don't seem to support tooltips.
I was hoping that there aren't that many games still using old versions of Ren'Py, but even some quite new ones seem to do that for unknown reasons. Ren'Py is free after all, it's not like an upgrade will cost anything. I get that older projects may be reluctant to upgrade because of various compatibility problems, but why the hell do new games use old Ren'Py is a mystery to me.
I mean, v6.99.13 was released on October 29, 2017 (!) - more than 2 years ago, this game less than half a year ago. Tooltips were added to v6.99.14
The newest Ren'Py is v7.3.5 from October last year. Still free for everyone, of course.
Yet I've seen other much newer games using ancient Ren'Py versions.

Anyway, it seems that it would be better to remove this feature from my patch than fight compatibility problems. Quite disappointing, really. :(

So, here's the new version without tooltips:

_________________
v2.6.1
- Fixed the code of Quick Menu buttons that should not be translated to other languages (thanks to Anne O'nymous for the tip!)
- Disabled (commented out) tooltips due to compatibility problems with older versions of Ren'Py
 
Last edited:

Dylan741

Forum Fanatic
Nov 18, 2019
4,692
9,177
Hello Penfold Mole
Just tried your patch and it's fantastic!
Thank you so much now the game (Sisterly Lust in my case, but I will try on the others too) with your patch and Lain's mod is simply perfect, you guys rock! ^_^
 

SkyLord2018

Member
Apr 29, 2018
187
92
Your mod works just fine with "A Mother's Love" but I wanted to ask you if there is a way to reduce the height of the text box. Currently it takes about 1/4 of the screen from the bottom . It seems to me that the top of the text box is a lot higher compared to all the other games I'm playing. If it only involvs code change on the Y-axes, I could change the code if I knew what to change it to. I'm not currently a programmer for Ren'Py, but I have taken a lot of programming courses when I was younger. About 40 yrs younger. I have to learn Ren'Py construct and I will be OK. But for now from time to time I need a little help. "A Mother's Love" is a pretty good game that really makes you think about your choices but has development issues which I am changing. Like example text that is placed in the center of sex scenes. Who does that. Text blocking everthing. Another big issues is grammar structure and spelling due to not being the authors primary language.

It has been a great improvement using your mod and I thank you for creating it. I stumbled upon it by chance while looking for "how to make textbox's transparent and reduce the height of it. SO at least I'm 1/2 way there. Thanks again for your mod. I'm going to try it on another 20 or so games I'm playing and will let you know which ones it works on. At 72 there's little else to do but play games to pass the time. Any suggestions on the textbox height will be greatly appreciated.
Thank You
 
Last edited:

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,099
7,541
Yes, you can change the vertical position of the box. In the current version of my patch I have not tried to change that because games and their dialog boxes are different - what looks good in one game may become really bad for another one. It's possible that I have done it for some specific games and I just don't remember about it right now.

Should I completely dismiss customized dialog boxes in all games and make a box for my patch that stays the same in all games, I could make the position and size adjustable. In fact, I've been fiddling with that and testing a version with a resizable box for some time, but it's not good enough yet to share.

If you want to change it in the current version of the patch, you should open the file (y_outline.rpy) and search for this part of the code:

Python:
    #########
    ## text box text outline (black) and color (white)
    style say_dialogue:
        color "#FFFFFF"
        outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]
You can change the position (i.e. the top left corner) of the box by adding ypos and/or xpos parameters there. You could start from "0" to see where it is and try "100" next, then add as much as you see fit. For example:

Python:
    #########
    ## text box text outline (black) and color (white)
    style say_dialogue:
        ypos 200
        color "#FFFFFF"
        outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]
An important tip:
Start the game before you change the code, then Ren'Py will automatically compile the file and reload the game every time you save it. In case it won't, you can hit Shift+r to force it.
Also, Ren'Py hates TAB characters. Use spaces for indentation. Indentation in Ren'Py is as important as it is in Python, not like in some other languages where code blocks are defined by other means.

You can also reduce the height of the box, but remember - the height "begins" from the top, so in this case it's somewhat irrelevant.
 
Last edited:
  • Like
Reactions: johnelros

SkyLord2018

Member
Apr 29, 2018
187
92
Yes, you can change the vertical position of the box. In the current version of my patch I have not tried to change that because games and their dialog boxes are different - what looks good in one game may become really bad for another one. It's possible that I have done it for some specific games and I just don't remember about it right now.

Should I completely dismiss customized dialog boxes in all games and make a box for my patch that stays the same in all games, I could make the position and size adjustable. In fact, I've been fiddling with that and testing a version with a resizable box for some time, but it's not good enough yet to share.

If you want to change it in the current version of the patch, you should open the file (y_outline.rpy) and search for this part of the code:

Python:
    #########
    ## text box text outline (black) and color (white)
    style say_dialogue:
        color "#FFFFFF"
        outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]
You can change the position (i.e. the top left corner) of the box by adding ypos and/or xpos parameters there. You could start from "0" to see where it is and try "100" next, then add as much as you see fit. For example:

Python:
    #########
    ## text box text outline (black) and color (white)
    style say_dialogue:
        ypos 200
        color "#FFFFFF"
        outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]
An important tip:
Start the game before you change the code, then Ren'Py will automatically compile the file and reload the game every time you save it. In case it won't, you can hit Shift+r to force it.
Also, Ren'Py hates TAB characters. Use spaces for indentation. Indentation in Ren'Py is as important as it is in Python, not like in some other languages where code blocks are defined by other means.

You can also reduce the height of the box, but remember - the height "begins" from the top, so in this case it's somewhat irrelevant.

Thank you for your response
Yes, you can change the vertical position of the box. In the current version of my patch I have not tried to change that because games and their dialog boxes are different - what looks good in one game may become really bad for another one. It's possible that I have done it for some specific games and I just don't remember about it right now.

Should I completely dismiss customized dialog boxes in all games and make a box for my patch that stays the same in all games, I could make the position and size adjustable. In fact, I've been fiddling with that and testing a version with a resizable box for some time, but it's not good enough yet to share.

If you want to change it in the current version of the patch, you should open the file (y_outline.rpy) and search for this part of the code:

Python:
    #########
    ## text box text outline (black) and color (white)
    style say_dialogue:
        color "#FFFFFF"
        outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]
You can change the position (i.e. the top left corner) of the box by adding ypos and/or xpos parameters there. You could start from "0" to see where it is and try "100" next, then add as much as you see fit. For example:

Python:
    #########
    ## text box text outline (black) and color (white)
    style say_dialogue:
        ypos 200
        color "#FFFFFF"
        outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]
An important tip:
Start the game before you change the code, then Ren'Py will automatically compile the file and reload the game every time you save it. In case it won't, you can hit Shift+r to force it.
Also, Ren'Py hates TAB characters. Use spaces for indentation. Indentation in Ren'Py is as important as it is in Python, not like in some other languages where code blocks are defined by other means.

You can also reduce the height of the box, but remember - the height "begins" from the top, so in this case it's somewhat irrelevant.

It's working like a charm thanks to you. Had to drop textbox name as well, but that wasn't a problem. Thanks.

I wouldn't change the way you have your mod right now. I'm just pickey. Like things just a certain way. A thought I had and you very well might already be thinking on it is perhaps a slider bar in preferences and one for title boxes.

I'm using Atom and am having problems with it. Doesn't save unless using Ctrl + S and will not compile the code on save even using Shift +R. Maybe I'm doing something wrong or using the wrong editor. Once again thank you for your help.
 
  • Like
Reactions: Namco15

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,099
7,541
SkyLord2018,
Did you press Shift+r in Atom or in the game? Because it's a Ren'Py thing, Atom has nothing to do with it.
In case it doesn't work in the game, developer tools may be disabled in there. Use UnRen to enable them.

Can't help you much with Atom, since I've been using Notepad++ with a little customization for Ren'Py code. I'm just used to Notepad++, Atom may be better for Ren'Py, actually.

Hi, in the game Milky Touch the mod doesn't work.
I'll take a look at it when I can, will add it to the next release. Thanks for telling me about it!
It's great that you managed to make it work for yourself until then. (y)
 
  • Like
Reactions: Namco15 and UncleVT

Peserval

Member
Compressor
May 3, 2017
137
559
man this is great wish I discovered it sooner, btw if I add this to android version of game will it work fine?
 
  • Like
Reactions: Namco15

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,099
7,541
Android games can not be patched that way.
To add a file to an Android apk, you'd have to extract the apk, add the file to it, add it's filename and hash (wasn't the hash also Base64 encoded?) to the list of files in the apk, then compress and sign the apk. Or something like that. I don't remember specifics ATM.

Or you could add it to a Windows version and then port it to Android, i.e. use Ren'Py SDK to build an Android version yourself.

I don't know which is easier. Probably the second option.
In any case, there is nothing I can do about it.

Some of the custom Android versions of some games here have used my patch file in them. Can't point out any though.

____________________________________

Peserval
Apparently my information about patching Ren'Py games in Android is outdated for about a year and since Ren'Py SDK v7.2.2 was realeased on March 30th 2019, this is no longer an issue.
The one time I tried to patch an Android version of a Ren'Py game was way before that, so that is my only excuse.

Apparently, in case the Android version of a Ren'Py game has been built on Ren'Py SDK v7.2.2 or later, the game creates its own folder structure with the main folder and 'game' subfolder inside it on the external storage (real or emulated) for its save folder and files. When you add rpy files into that folder, just like in Windows and Linux, Ren'Py will compile and use them the same way it does on a PC.

I have not tried it myself, but you may want to try to find that main folder of this game on your external storage and extract the 7z archive of this patch into that folder. Apps like 7Zipper and 7Zipper 2.0 by PolarBear soft can open, extract and create 7Zip archives.

____________________________

Thanks to the66 for the info about Ren'Py Android builds.
 
Last edited:

Peserval

Member
Compressor
May 3, 2017
137
559
Android games can not be patched that way.
To add a file to an Android apk, you'd have to extract the apk, add the file to it, add it's filename and hash (wasn't the hash also Base64 encoded?) to the list of files in the apk, then compress and sign the apk. Or something like that. I don't remember specifics ATM.

Or you could add it to a Windows version and then port it to Android, i.e. use Ren'Py SDK to build an Android version yourself.

I don't know which is easier. Probably the second option.
In any case, there is nothing I can do about it.

Some of the custom Android versions of some games here have used my patch file in them. Can't point out any though.

____________________________________

Peserval
Apparently my information about patching Ren'Py games in Android is outdated for about a year and since Ren'Py SDK v7.2.2 was realeased on March 30th 2019, this is no longer an issue.
The one time I tried to patch an Android version of a Ren'Py game was way before that, so that is my only excuse.

Apparently, in case the Android version of a Ren'Py game has been built on Ren'Py SDK v7.2.2 or later, the game creates its own folder structure with the main folder and 'game' subfolder inside it on the external storage (real or emulated) for its save folder and files. When you add rpy files into that folder, just like in Windows and Linux, Ren'Py will compile and use them the same way it does on a PC.

I have not tried it myself, but you may want to try to find that main folder of this game on your external storage and extract the 7z archive of this patch into that folder. Apps like 7Zipper and 7Zipper 2.0 by PolarBear soft can open, extract and create 7Zip archives.

____________________________

Thanks to the66 for the info about Ren'Py Android builds.
Thanks :)
It worked though I had to use location in internal memory rather than external and create game folder in files folder, it went like this internal memory>android>data>"general game's folder">files>game>"patch here" and it's working
 
  • Like
Reactions: cashcreate
5.00 star(s) 6 Votes