Ren'Py Outlines with show text

Turning Tricks

Rendering Fantasies
Game Developer
Apr 9, 2022
992
2,094
That gave me an error. I suppose i missed something to add. Is this supposed to be just added?

Unless you have already made mods to the basic renpy files, then you need to just follow the commented sections.


This section goes in your options.rpy file, in the area where you have your extra variables stored. There is supposed to be a commented section for that in the original file. I put mine a couple of spoted below where your config.version is kept.

Python:
default persistent.textbox_transparency = 1.0 ## Whatever you want the default to be.
The next section goes in your screens.rpy file in the screen say(who, what): section. This will be right below the section saying In-game Screens... Look for this code...

Python:
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"
... then insert right below the id "window", this bit...

Python:
        background Transform(style.window.background, alpha = persistent.textbox_transparency, xalign=0.5)

it should like this... (remember Renpy is nuts about indenting being correct)

Python:
screen say(who, what):
    style_prefix "say"

    window:
        id "window"
        #######Textbox transparency
        background Transform(style.window.background, alpha = persistent.textbox_transparency, xalign=0.5)
        ######

        if who is not None:

            window:
                id "namebox"
                style "namebox"
                text who id "who"

        text what id "what"

The final section goes in your Preferences screen, further down in that screens.rpy file. Look for this section with the Text Speed and Auto forward ...

Python:
                vbox:

                    label _("Text Speed")

                    bar value Preference("text speed")

                    label _("Auto-Forward Time")

                    bar value Preference("auto-forward time")
add the slider code so it looks like this....


Python:
                vbox:

                    label _("Text Speed")

                    bar value Preference("text speed")

                ### Textbox transparency
                    label _("Textbox Transparency")

                    bar value FieldValue(persistent, "textbox_transparency", range=1.0, style="slider")
                ##########

                    label _("Auto-Forward Time")

                    bar value Preference("auto-forward time")

That's it. Those three little sections should add a textbox trnasparency slider on your preferences screen.
 
  • Like
Reactions: coffeeaddicted