CREATE YOUR AI CUM SLUT ON CANDY.AI TRY FOR FREE
x

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

5.00 star(s) 6 Votes

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,125
7,639
There seems to be a compatibility problem of my patch with older versions of Ren'Py.
If the Ren'Py SDK that the game was made with is older than v6.99.14, the game will crash with the transparency patch v2.4.7 and newer.

Currently there is one game that I'm aware of, that is being actively developed, but apparently is made using an old and incompatible Ren'Py SDK:

Ren'Py games that have already been completed or abandoned before January 2018 are more likely incompatible, too.

What is the solution to the problem?
In case after adding my patch to the game the game will crash with an error message:
File "game/y_outline.rpy", line 157: u'pagekeys' is not a keyword argument or valid child for the viewport statement.
Then you can use the old transparency patch v2.4.6 attached below.

File hash:
MD5: 36300E8655115A5B94D8A0CA6AD4E01F
SHA-1: D8CB9C85F6C6CDBD30D183AF58E1F1BD75E0B13F
SHA-256: 6D2C7EB800C9E31D75D09B022EAF9AB8DC1E264487B942B8C1144A1523899D35
SHA-384: 747FC710BFCAE8CEA8F70AFE4CB9A3CFCDB093E2B9F52FDEA6383CB5C62BE135ADF719E0F4F09CE6FF8EFB493EDB99EC
 
  • Heart
Reactions: Neko-Chan Pacifica

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,007
16,293
If the Ren'Py SDK that the game was made with is older than v6.99.14, the game will crash with the transparency patch v2.4.7 and newer.
[Not tested further than 6.99.12.4 yet, but there's no reason for renpy.version() to have changed in an incompatible way.]
Code:
init python:
    def checkVersion( *aVersion ):
        rVersion = renpy.version( True )[:-1]

        for i in range(0, len( aVersion ) ):
            if len( rVersion ) -1 < i: return False
            if aVersion[i] > rVersion[i]: return False
            if aVersion[i] < rVersion[i]: return True

        return True

label exampleOfUse:
    if checkVersion( 6, 99, 14 ) is True:
        "It's at least the 6.99.14 version."
    else:
        "Oop's, your version is too old."
Use it to condition the addition of pagekeys. It will remove the feature from the mod while still letting it works with lower versions.
 

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,125
7,639
Thanks a lot again!
I was just searching the other night a command or variable to get the version number of Ren'Py, I just didn't had enough time or patience to get that far myself yet. This is exactly what I needed.
 

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,125
7,639
Use it to condition the addition of pagekeys. It will remove the feature from the mod while still letting it works with lower versions.
I'm a bit stuck with this...

I mean, I already had conditions in my mod file that checked the game name and the section with the pagekeys part was already excluded from being run in other games but one specific game that is using pagekeys.
Adding one more condition that is checking the version wouldn't change anything about it. It's why I was only thinking about checking Ren'Py version and searched for it for a bit, but then dropped it when I realized that it wouldn't change a thing.

The problem is that Ren'Py isn't crashing while running the script. It's crashing while parsing the file, before even trying to run it.
The part of the code with pagekeys has to be excluded from being parsed to stop Ren'Py from throwing that error when the version is too old to have pagekeys implemented.

This is the part where I'm stuck. Is it even possible? To skip a part of the code from being parsed?

I attached the old version of my patch file without version checking and new with the added version checking, so you could take a look at it if you want to and maybe try to run it in an older version of Ren'Py.
(checkVersion defined at line 9, used on line 350, pagekeys used on line 372)

One simple solution would be to disable pagekeys, remove the line from the code, so the choice menu viewport of the Seraphim Academy game won't be scrollable by page keys, dragging and scrolling with the mouse would still work. So far it's the only game that has been trying to implement the use of pagekeys and where I tried to change the appearance of the viewport where it's being used.
Maybe the loss of that function wouldn't be that bad?... I guess we'll see in the future versions of that game.
I'll do that for now and see what happens in the future.
 

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,125
7,639
v2.4.10
- Changed input prompt style (what the game tells you to input) and input text style (text that you type in) to match the style of dialog text that I've been using.
- Changed a few other things that you may or may not notice...
It is just a modification of the default Ren'Py style the way Ren'Py is configured by default. It may be overrided by some games that may be using other options to change that style.
- Disabled pagekeys (Page Up and Page Down keys in the choice viewport) for the "Seraphim Academy" until I can find a better solution to keep older versions of the Ren'Py parser from crashing on it.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,007
16,293
This is the part where I'm stuck. Is it even possible? To skip a part of the code from being parsed?
It's always possible ; which don't mean that it's always achievable.

Ren'py language and, here, screen language, are just an interface between humans and a bunch of Python code. So, if you need to condition something that is parsed, you need to write it in Python and not Ren'py.
I don't really have time to test it, but it should be something like :
Code:
init python:

    def screen_choice( items ):

        yAdj = ui.adjustment() if choice_screen_show_scrollbar else None

        ui.fixed( style="choice_fixed" )

        ui.viewport( style="choice_viewport",
            yinitial = 0,
            mousewheel = True, draggable = True, side_yfill = True,
            pagekeys = True,
            yadjustment = yAdj )

        ui.vbox( style="choice_vbox" )
        for i in items:
            ui.textbutton( i.caption,
                style="choice_textbutton", text_style="choice_textbutton_text",
                action = [ SetVariable("choice_screen_show_scrollbar", False), i.action ] )

        ui.close() # vbox
        if choice_screen_show_scrollbar:
            ui.bar( adjustment=yAdj, style="choice_vscrollbar" )

        ui.close() # fixed

    if checkVersion( 6, 99, 14 ):
        renpy.define_screen( "screen_choice", screen_choice )
Warning, using viewport in the old Python way is tricky. I used my own code to write this, so it should works. But it's the first time, in almost a week, that the thermometer drop bellow 30°C/86°F (even in the middle of the night), so I don't guaranty that my brain works correctly.
 

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,125
7,639
Big thanks again, I'll try that when I can find some time.

pagekeys will stay disabled until then.

_________________________________

And another update - to do something about the black menu button text in the Wife And Mother:

v2.4.11
- The problem with black insensitive button text in "A Wife And Mother" [Lust & Passion](v0.055) addressed the only way that doesn't require the game script to be modified:
Since the text of every choice button in the game is colored separately to black, it is impossible to override it without modifying every line with choice button text in the game script itself. So this is an attempt to be "clever" and create active bright outlines to this black text. Seems to be working :p
 

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,125
7,639
You're welcome!
______________________

The new update is mostly about removing all new text box backgrounds in the Freeloading Family. They may look nice, but they're nowhere as nice as the pictures they're covering.

v2.4.12
- Changed default name label text color from black to white and changed the colors and outlines of the choice menu button text in the "Babysitter" [T4bbo]
- Removing fancy text box backgrounds and changing colored outlines of the name labels to patch default in the "Freeloading Family" [FFCreation] v0.10
- Some other minor adjustments
 
  • Like
Reactions: Namco15

depechedNode

Well-Known Member
Oct 10, 2017
1,798
3,745
Why didn't I see this thread much much more earlier? Damn good mod, my eyes are filled with joy. :) Thanks a lot for the mod.
 
  • Like
Reactions: Namco15

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,125
7,639
This update is a bit different than all the v2.4 subversions have been...

I've been fiddling with the quick menu to change its default design and assign a toggle key to it. I tested this version in about 4 different games and it seems to be working. For now...
In case you have trouble with it, let me please know about it and try to use the last v2.4.x patch that is also still available in the OP of this thread.

v2.5
- Redesigned default quick menu for all games to be less obtrusive and more functional than the default (thanks to T4bbo for the general idea from his Babysitter game). Now you can also toggle the quick menu itself by hitting Alt+Shift+M on the keyboard (may not work at all in some games or just with old saves)
- Removed the quick menu version of the Babysitter game since the one I made looks similar and is more functional.
- Removed static character side images that are just covering up large part of the screen in Life with Mary [LikesBlondes] v0.27
 
  • Like
Reactions: Namco15 and UncleVT

Charolastra

Member
Modder
May 27, 2017
374
7,883
whats wrong with the textbox in life with mary? i made the gui for that game and replaced the default big black box for that almost totally transparent little pink box that does not really hide almost anything?
you would prefer that there be nothing more than the letters?
 

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,125
7,639
whats wrong with the textbox in life with mary? i made the gui for that game and replaced the default big black box for that almost totally transparent little pink box that does not really hide almost anything?
you would prefer that there be nothing more than the letters?
There is nothing wrong with the text box that you made if the text box is what you want to look at in the game. Probably there are some people who do. And the box you made looks very nice.
Yes, I just prefer nothing but text covering the image that I actually want to look at instead of a box, however nice the box may look. I mean, I've seen the box already and I want to see the image behind it. Text only covers a fraction of it, the box is much larger and more intrusive.

The idea for my patch is from TV subtitles that in most cases is just white outlined text with a small shadow. Minimal intrusion, minimal coverage, but still well readable. No boxes covering the image. And this is the way most people prefer it, apparently. Just like I do.

Life With Mary just happened to be the sample that I used to show how a Ren'Py game may look without any boxes covering the image. I picked it because I like the game, not because I hate its UI. It's one of the best looking and least intrusive ones, actually. :)
 

Charolastra

Member
Modder
May 27, 2017
374
7,883
got it, just the text without background was my first idea but at the moment of play i got the feeling that something was missing that was why i decided to create that little image trying to make it less intrusive as i can but i understand your point, good job doing people play as they prefer :)
 
  • Like
Reactions: Namco15

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,125
7,639
v2.5.2
- "Where The "Heart Is" [CheekyGimp] overrides updated to match EP7
- "Family Matters" [Perv2k] overrides updated to match v0.4
- Changed dialog box font, font size and color in the "Pandora's box" v0.1. Couldn't remove text transparency though, because I couldn't find the place where it was set.
- Changed dialog box font to default and removed useless static extra large character images from the left corner in "Haley's story" [Viitgames] v0.01
- Changed dialog box font to default in the "Dreams of Desire - The Lost Memories" [LewdLab] Ch. 2
 

depechedNode

Well-Known Member
Oct 10, 2017
1,798
3,745
I'm again late to the party for the new version. Now added the thread to watched threads and problem solved. :)

Thanks for the new version.
 
  • Like
Reactions: Namco15

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,125
7,639
v2.5.3
- Changed dialog box font to Ren'Py default, making it easier to read in "Thinking About You" [Noir Desir] - the latest version tested: v0.2
- "Freeloading Family" [FFCreation] overrides updated to match v0.12
 

Walter Victor

Conversation Conqueror
Dec 27, 2017
6,075
20,519
The patch still doesn't work for Our Fate. I've tried v2.5.2, v2.4.6 and v2.5.3. Any suggestions or is that game a lost cause?
 
  • Like
Reactions: Penfold Mole

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,125
7,639
The patch still doesn't work for Our Fate. I've tried v2.5.2, v2.4.6 and v2.5.3. Any suggestions or is that game a lost cause?
Thanks for reporting!
At first I didn't understand what you were talking about, since it has been working for me since the first published version of this game and it still is. Kind of...
You don't have permission to view the spoiler content. Log in or register now.

Now I started to look into it and tested the new version of the game without my patch. And I discovered that there is now a button named "Overlay" added to the original quick menu of this game that can toggle the background:

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

And when dialog box background is switched on from there (as it probably is by default in a newly started game):
You don't have permission to view the spoiler content. Log in or register now.

then my patch is unable to hide it. Also the outline of the text differs from the kind set in my patch. I didn't even notice it myself before!
So it looks like my patch really isn't working for this game any more. Well, most of it, the main functionality.

I can probably make it work again, should I look into it and create individual settings for this game. There was no need for it in the first version(s) of OurFate. This is why the background is still off in my old saves.
I probably will do that some time, just not right away. Especially because the game itself now has an option to hide the background and an outline is added to the text by default.

Until then just remove my patch (delete y_outline.rpy and y_outline.rpyc files from the "game" sub-folder) and switch the background off from the original quick menu button.

Or, in case you would like to use the split kind of less visible quick menu or toggle it via shortcut keys in-game, then you can add my patch after you have switched off the background from the original quick menu.
My patch unfortunately is unable to do that right now for you, since the toggle system created in this game doesn't seem to be using Ren'Py's default style settings for the background that my patch modifies. It most likely could have been used, but the dev chose to create his own custom settings for it. This is something I can not predict, I can only create individual settings for the game after they have been created and I have been able to figure out what and where they are in there*.

Only the quick menu part of my patch seems to be working right now in this game.

Thanks for bringing this problem into my attention, I was totally unaware of it!

_____________________________
*
You don't have permission to view the spoiler content. Log in or register now.
 
  • Like
Reactions: Walter Victor
5.00 star(s) 6 Votes