#########
# To show quick menu throughout the game, even when window (dialog box + name label) is hidden     
label pfstart:
    $ suppress_overlay = False
    $ quick_menu = True
    show screen quick_menu
    # removing start label override from dictionary
    python:
        config.label_overrides.pop("start")
    jump start
    
#########    
# To show quick menu after loading old saves
label pf_after_load:
    $ suppress_overlay = False
    $ quick_menu = True
    show screen quick_menu
    
    ######### Some games are defining their characters after the start label, often in random places inside the scripts.
    ## These characters can only be redefined by using after_load label and will get activated after saving and loading
    ## the game at least once

    ######### AMNESIA [Super Alex] - the latest version tested: v0.2a
    ## Beginning from part 2 new charaters have been added into the running script intself, not into the defines.rpy file
    ## where characters originally were defined
    if config.name == "AMNESIA":    
        $ doctor_no_name = Character("Doc", image="doctor_image", color="#8DFAE2")
        $ doctor = Character("Doctor Freeman", image="doctor_image", color="#8DFAE2")
        $ iris = Character("Iris", image="iris_image", color="#BE8CFA")
        $ grace = Character("Grace", image="grace_image", color="#FA5C31")
        $ joan_hospital_no_ava_name = Character("???", color="#FDF5F4")
        $ joan_hospital_no_name = Character("???", image="joan_hospital_image", color="#FDF5F4")
        $ joan_hospital = Character("Joan", image="joan_hospital_image", color="#FDF5F4")
        $ elena_devil = Character("Elena", image = "elena_devil_image", color="#FAD7B3")
        $ kate_angel = Character("Kate", image = "kate_angel_image", color="#FD5151")
        $ postman = Character("Postman", image="imagePostman", color="#A1A1A1")
        $ postman_unknown=Character("Postman", image="imagePostmanUnknown", color="#A1A1A1")
        $ lori = Character("Lori", image="lori_image", color="#EF9246")
        $ sebastian = Character("Sebastian", image="Sebastian", color="#FA8DF1")
        $ grace_no_name = Character("Reception girl", image="grace_image", color="#FA5C31")
    
    ######### Unleashed v0.4 by CarbonBlue
    ## Removing background from characters
    if config.name == "unleashed":
        $ s = Character("Shannon", color="#06DE10")
        $ a = Character("Angel", color="#A165F1")
        $ o = Character("Olivia", color="#e0f037")
        $ m = Character("Maeve", color="#f542ef")
        $ z = Character("Zita", color="#CD4BF6")
        $ prof = Character("Professor Nakamura", color="#DFF64B")
        
    ######### My Pleasure v0.5 by Tasty Pics
    ## Removing background from characters        
    if config.name == "My Pleasure":
        $ aaa = Character("", color="#ffffff")
        if LanEng:
            $ mc = Character("[mcname]", color="#831b1b")
            $ m = Character("Cassandra", color="#ae84ae") ### Cassandra
            $ mrl = Character("Father's Girlfriend", color="#ae84ae") ###
            $ rad = Character("Radio", color="#7e7c7e")
            $ f = Character("Christian")
            $ fr = Character("father")
            $ jul = Character("Julia", color="#da5120")
            $ arl = Character("uncle's girlfriend", color="#da5120")
            $ cor = Character("Cornell", color="#334311")
            $ ur = Character("uncle", color="#334311")
            $ jim = Character("Jim", color="#237891")
            $ lor = Character("Lori", color="#ddbedd")
            $ crl = Character("Julia's daughter", color="#ddbedd")
            $ barb = Character("Barbara", color="#ce791e")
            $ barb2 = Character("Babs", color="#ce791e")
            $ neig = Character("Daphne", color="#e61b59")
            $ g1 = Character("Girl 1", color="#ddbedd")
            $ g2 = Character("Girl 2", color="#ce791e")
            $ he = Character("Headphone", color="#7e7c7e")
            $ nat = Character("Natasha", color="#e61b59")
            $ wom = Character("?", color="#e61b59")
            $ porn = Character("Porn Movie", color="#ae84ae")
            $ lf = Character("Russell")
            $ som = Character("Someone", color="#ae84ae")
            $ hal = Character("Haley", color="#88CC00")
            $ dg1 = Character("Girl", color="#88CC00")
            $ dg2 = Character("Girl", color="#ae84ae")
            $ dg3 = Character("Girl", color="#da5120")
            $ dg4 = Character("Girl", color="#ddbedd")
            $ bart = Character("Bartender", color="#6a81a6")
            $ hea = Character("Heather", color="#fcba03")
            $ bil = Character("Billy", color="#32a852")
            
        elif LanRus:
            $ mc = Character("[mcname]", color="#831b1b")
            $ m = Character("Кассандра", color="#ae84ae") ### Кассандра
            $ mrl = Character("Папина подруга", color="#ae84ae")
            $ rad = Character("Радио", color="#7e7c7e")
            $ f = Character("Кристиан")
            $ fr = Character("отец")
            $ jul = Character("Джулия", color="#da5120")
            $ arl = Character("Дядина подруга", color="#da5120")
            $ cor = Character("Корнелл", color="#334311")
            $ ur = Character("дядя", color="#334311")
            $ jim = Character("Джим", color="#237891")
            $ lor = Character("Лори", color="#ddbedd")
            $ crl = Character("дочь Джулии", color="#ddbedd")
            $ barb = Character("Барбара", color="#ce791e")
            $ barb2 = Character("Барб", color="#ce791e")
            $ neig = Character("Дафна", color="#e61b59")
            $ g1 = Character("Девушка 1", color="#ddbedd")
            $ g2 = Character("Девушка 2", color="#ce791e")
            $ he = Character("Наушники", color="#7e7c7e")
            $ nat = Character("Наташа", color="#e61b59")
            $ wom = Character("?", color="#e61b59")
            $ porn = Character("Порнофильм", color="#ae84ae")
            $ corhou = "Дом Корнелла" ### Дом Корнелла
            $ aup = "Джулия" ### Джулия
            $ aujp = "Джулия" ### Джулия
            $ mop = "Кассандра" ### Кассандра
            $ corjul = "своего дядю Корнелла? Младшего брата твоего отца." ### "своего дядю Корнелла? Младшего брата твоего отца."
            $ corjul2 = "Тот, который живёт с твоей подругой?" ### "Тот, который живёт с твоей подругой?"
            $ nep = "племянник Корнелла" ### племянник Корнелла
            $ ynep = "племянник Корнелла" ### племянник Корнелла
            $ yocoup = "племянник Корнелла" ### племянник Корнелла
            $ mycoup = "племянник Корнелла" ### племянник Корнелла
            $ loricor = "КОРНЕЛЛ" ### КОРНЕЛЛ
            $ fgf = "со своей подружкой" ### со своей подружкой
            $ mydea = "дорогая Джулия" ### дорогая Джулия
            $ wfam = "вы семья" ### вы семья
            $ mm = "Кассандра"
            $ hea = Character("Хизер", color="#fcba03")
            $ bil = Character("Билли", color="#32a852")
            $ som = Character("Человек", color="#ae84ae")
            $ hal = Character("Хейли", color="#88CC00")
            $ dg1 = Character("Девушка", color="#88CC00")
            $ dg2 = Character("Девушка", color="#ae84ae")
            $ dg3 = Character("Девушка", color="#da5120")
            $ dg4 = Character("Девушка", color="#ddbedd")
            $ bart = Character("Бармен", color="#6a81a6")
            
        elif LanBra:
            $ mc = Character("[mcname]", color="#831b1b")
            $ m = Character("Cassandra", color="#ae84ae")
            $ mrl = Character("Namorada do pai", color="#ae84ae")
            $ rad = Character("Rádio", color="#7e7c7e")
            $ f = Character("Christian")
            $ fr = Character("pai")
            $ jul = Character("Julia", color="#da5120")
            $ arl = Character("namorada do tio", color="#da5120")
            $ cor = Character("Cornell", color="#334311")
            $ ur = Character("tio", color="#334311")
            $ jim = Character("Jim", color="#237891")
            $ lor = Character("Lori", color="#ddbedd")
            $ crl = Character("filha da Julia", color="#ddbedd")
            $ barb = Character("Barbara", color="#ce791e")
            $ barb2 = Character("Babs", color="#ce791e")
            $ neig = Character("Daphne", color="#e61b59")
            $ g1 = Character("Garota 1", color="#ddbedd")
            $ g2 = Character("Garota 2", color="#ce791e")
            $ he = Character("Fone de ouvido", color="#7e7c7e")
            $ nat = Character("Natasha", color="#e61b59")
            $ wom = Character("?", color="#e61b59")
            $ porn = Character("Filme Pornô", color="#ae84ae")
            $ hea = Character("Heather", color="#fcba03")
            $ bil = Character("Billy", color="#32a852")
            $ som = Character("Alguém", color="#ae84ae")
            $ hal = Character("Haley", color="#88CC00")
            $ dg1 = Character("Garota", color="#88CC00")
            $ dg2 = Character("Garota", color="#ae84ae")
            $ dg3 = Character("Garota", color="#da5120")
            $ dg4 = Character("Garota", color="#ddbedd")
            $ bart = Character("Bartender", color="#6a81a6")
        
    # removing after_load label override from dictionary
    python:
        config.label_overrides.pop("after_load")
    if renpy.has_label("after_load"):
        call after_load
    return
    
#########
# Ren'Py will automatically call this label if the player clicks history button,
# but the game has no history (a menu item named history is missing).
label history_screen:
    show screen game_has_no_history
    $ renpy.pause(2)
    hide screen game_has_no_history
    return
# This is the message 
screen game_has_no_history():
    vbox:
        style "choice_vbox"
                  
        text "This game has no history screen, sorry!":
            style "say_dialogue"
            xpos 0
            ypos 0
            text_align 0.5
            

# Ren'Py init section
init 999:
       
    #########
    ## quick menu redesign
    
    screen quick_menu():
    
        # Bind Alt+Shift+M to toggle Quick Menu, set suppress_overlay to False no matter what
        
        key "alt_K_m" action [ If(suppress_overlay, SetVariable('quick_menu', True ), If(quick_menu, SetVariable('quick_menu', False ), SetVariable('quick_menu', True ))), SetVariable('suppress_overlay', False ) ]
        
        zorder 100
        if quick_menu:
            hbox:
                style_prefix "quick"
                xalign 1.0
                yalign pf_qmenu_yalign
                textbutton "◀-|" action Rollback() xpos -40 # tooltip _("Back")
                textbutton "▶▶" action Skip() alternate Skip(fast=True, confirm=True) xpos -30 # tooltip _("Skip")
                if _preferences.afm_enable:
                    # display stop button when enabled, that has a red hover color
                    textbutton "a ■":
                        text_hover_color "#F00"
                        xpos -20
                        # tooltip _("Auto disable")
                        action Preference("auto-forward", "disable")
                else :
                    textbutton "a ▶" action Preference("auto-forward", "enable") xpos -20 # tooltip _("Auto enable") # display play button when disabled
                textbutton "▼" action If(renpy.get_screen("say"), HideInterface(), None) xoffset -10 # tooltip _("Hide interface")
            hbox:
                style_prefix "quick"
                xalign 0.0025
                yalign pf_qmenu_yalign
                textbutton _("Hist") action ShowMenu('history') # tooltip _("History")
                textbutton _("Save") action ShowMenu('save') # tooltip _("Save")
                textbutton _("Load") action ShowMenu('load') # tooltip _("Load")
                textbutton _("Q.S") action QuickSave() # tooltip _("Quick Save")
                textbutton _("Q.L") action QuickLoad() # tooltip _("Quick Load")
                textbutton _("Prefs") action ShowMenu('preferences') # tooltip _("Preferences")
            
            #$ tooltip = GetTooltip()
            #if tooltip:
            #    if _preferences.afm_enable:
            #        $ ttcolor = "#FF0000"
            #    else:
            #        $ ttcolor = "#00FF00"
            #    text "[tooltip]" yalign 1.0 xalign 0.5 color ttcolor outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ] size int(config.screen_height / 60)

    #########
    ## text box text outline (black) and color (white)
    style say_dialogue:
        color "#FFFFFF"
        outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]
        
    #########
    ## name box text outline
    style say_label:
        outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]
    
    #########
    ## input prompt text style
    style input_prompt is default:
        color "#FFFFFF"
        outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]
    
    #########
    ## input text style
    style input:
        color "#FFFFFF"
        outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]
        
    #########
    ## choice button text style
    style choice_button_text:
        #font "DejaVuSans.ttf"
        idle_color "#FFF"
        hover_color "#00FF00"
        insensitive_color "#808080FF"
        idle_outlines [ (absolute(5), "#FFF0", absolute(1), absolute(1)), (absolute(2), "#000", absolute(1), absolute(1)) ]
        hover_outlines [ (absolute(5), "#0F08", absolute(1), absolute(1)), (absolute(2), "#000", absolute(1), absolute(1)) ]
        insensitive_outlines [ (absolute(5), "#808080C0", absolute(1), absolute(1)), (absolute(2), "#000", absolute(1), absolute(1)) ]
        
    #########
    ## quick menu button text style
    style quick_button_text:
        background None                       
        font "DejaVuSans.ttf"
        size int(config.screen_height / 60)
        idle_color "#8885"
        hover_color "#0F0F"
        insensitive_color "#4445"
        outlines [ (absolute(1), "#000A", absolute(0), absolute(0)) ]
        hover_outlines [ (absolute(1), "#000F", absolute(0), absolute(0)) ]

    #########
    ## quick menu button style        
    style quick_button is default:
        background None
        xpadding 5
        
    #########
    ## text box background
    style window:
        background None

    #########
    ## name box background
    style namebox:
        color "#FFFFFF"
        background None
        
    #########
    ## choice button background
    style choice_button:
        background None

    #########
    ## enable quick menu
    $ quick_menu = True
    $ suppress_overlay = False
        
    #########
    ## Game-specific overrides

    ######### View of Family - the latest version tested: v0.1.1
    ## Overriding MC's character text color and outline defined via what_color and what_outline in script.rpy
    ## Removing background from the choice menu window
    if config.name == "View of family":
        define y = DynamicCharacter("povname", color="#000080")
        screen choice(items):
            style_prefix "choice"
            vbox:
                for i in items:
                    textbutton i.caption action i.action
        
    ######### Dual Family [Gumdrop Games] - the latest version tested: v0.98ce
    ## Removing all of the what_color and what_outline settings
    if config.name == "Dual Family":
        define ps = DynamicCharacter("ps_name", color="#faff70")
        define m = DynamicCharacter("m_name", color="#c579fc") 
        define x = DynamicCharacter("x_name", color="#ffbcbc")  
        define f = DynamicCharacter("f_name", color="#5998ff")  
        define pf = DynamicCharacter("pf_name", color="#5998ff")  
        define d = DynamicCharacter("d_name", color="#ffaddb")
        define w = DynamicCharacter("w_name", color="#c579fc")
        define s = DynamicCharacter("s_name", color="#faff70")
        define a = DynamicCharacter ("a_name", color="#4fe57a")
        define l = DynamicCharacter ("l_name", color="#4fe57a")
        define n = DynamicCharacter ("n_name", color="#d13cb8")
        define q = DynamicCharacter ("q_name", color="#d13cb8")
        define mu = Character("", color="#c579fc")
        define fu = Character("", color="#5998ff")
        define w2 = DynamicCharacter("w_name", color="#c579fc")
        define m1 = Character("", color="#c579fc")
        define du = Character("", color="#ffaddb")
        define sk = Character("Skeleton", color="#fff")
        define k = Character ("Karen", color="#d13cb8")
        define k2 = Character ("", color="#d13cb8")
        define g1 = Character ("Ghoulish Girl", color="#bcddff")
        define g2 = Character ("Jawsome Girl", color="#d1a22e")
        define r = Character ("Redhead Girl", color="#ff6d6d")
        define o = Character ("Sultry Girl", color="#5e37cc")
        define h = Character ("Hoodie Girl", color="#5cd6b3")
        define i = Character ("Isaac", color="#a00000")
        define c = Character ("Cashier", color="#a00000")
        define b = Character ("Ben", color="#ffb459")
        define b2 = Character ("", color="#ffb459")
        define l2 = Character ("", color="#4fe57a")
        define h2 = Character ("", color="#5cd6b3")
        define r2 = Character ("", color="#ff6d6d")
        define ha = Character ("Mara", color="#5cd6b3")
        define ra = Character ("Maddy", color="#ff6d6d")
        define ho = Character ("Hostess", color="#700024")
        
    ######### Au-pair Innocence SE [Alex] - the latest version tested: v0.9
    ## Removing all of the what_color and what_outline settings
    ## If you prefer to keep these colors, just change the value that config.name variable is compared to
    ## on the next line from "Au-pair innocence SE" to "Au-pair innocence SEabcdefg" for example. Save this file, reload game.
    if config.name == "Au-pair innocence SE":
        define t = Character('Tasha', color="#ff5353", image = 'tasha')
        define a = Character('Alex', color="#f0ff00", image = 'alex')
        define f = Character('David', color="#fcc863", image ='david')
        define ala = Character("Ala", color="#c354f7", image ='ala')
        define k = Character("Kevin", color="#9ccd3d", image ='kevin')
        define ta = Character("Tanya", color="#48d877", image ='tanya')
        define o = Character("Oliver", color="#28d9ff", image ='oliver')
        define c = Character('Charlotte', color="#ebf239", image ='charlotte')
        define co = Character('Conor', color="#99c7ff", image ='conor') 
        define ma = Character('Mark', color="#59c7ff", image ='mark')
        define j = Character('Jake', color="#75c700", image ='jake')
    
    ######### Life [Fasder] - the latest version tested: v0.06.03
    ######### Thinking About You [Noir Desir] - the latest version tested: v0.2
    ## Making the the text easier to read in the dialog box by changing the font to Ren'Py default DejaVu Sans.
    if config.name == "Life" or config.name == "Thinking About You":
        style say_dialogue:
            font "DejaVuSans.ttf"
    
    ######### Life With Pleasure [] - the latest version tested: v0.3
    ## Overriding dialogue text with Ren'Py default (DejaVu Sans)
    ## Since the game font was smaller than default, the size was also enlarged
    if build.name == "LifeWithPlesuare" or build.name == "LifeWithPleasure":
        style say_dialogue:
            font "DejaVuSans.ttf"
        define gui.text_size = 30
            
    ######### Where The Heart Is [CheekyGimp] - the latest version tested: EP9
    ## Removing all the partially transparent character text boxes. Like I said, I don't like boxes
    ## covering the picture, even when they're partially transparent. The loss of a static character portrait
    ## with it isn't much of a loss anyway. 
    if config.name == "Where The Heart Is":
        define A = Character('Angel', color="#c8ffc8")
        define B = Character('Bella', color="#a22a10")
        define C = Character('Jolina', color="#927e74")
        define CH = Character('Chad', color="#fda948")
        define D = Character('Debbie', color="#b5287f")
        define E = Character('Elaine', color="#c8ffc8")
        define G = Character('Greg', color="#939941")
        define F = Character('Francois', color="#939941")
        define FI = Character('Fiona', color="#e12421")
        define I = Character("[player_name]", color="#ffffff")
        define J = Character('Jenna', color="#fda948")
        define K = Character('Katie', color="#9f8fcc")
        define L = Character('Lily', color="#588ebd")
        define M = Character('Monica', color="#e12421")
        define N = Character('Natasha', color="#a22a10")
        define R = Character('Roger', color="#fda948")
        define S = Character('Sammy', color="#588ebd")
        define W = Character('Wanda', color="#b5287f")
        define X = Character ('????', color="#c8ffc8")
        define Z = Character('Zarah', color="#939941")
        
    ######### Family Matters [Perv2k16] - latest version tested: v1.0
    ## Narrator's name label text color from black to white
    if config.name == "Family Matters":
        define perv = Character('Perv2k16', color="#ffffff")
        define cashier = Character("Cashier", color="#ffffff")
        
    ######### Deeper [Thundorn Games] - latest version tested: v0.0.531
    ## Added outline for the choice button text
    if config.name == "Deeper":
        style choice_button_text:
            outlines [ (absolute(1.5), "#000", absolute(1), absolute(1)) ]
            
    ######### Seraphim Academy [Trinity Games] - latest version tested: Chapter 1
    ## Added outline for the choice button text
    ## Pagekeys disabled in the choice viewport until I can find a better solution to keep older versions of the Ren'Py parser
    ## from crashing on it
    if config.name == "Seraphim Academy":
        style choice_button_text:
            outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]
            
        style window:
            background None
    # The next section of code belongs to Trinity Games, it's copied from the game and modified to remove background        
        screen choice(items):
            style_prefix "choice"

            fixed:
                viewport:
                    yinitial 0
                    if choice_screen_show_scrollbar:
                        scrollbars "vertical"
                    mousewheel True
                    draggable True
                    #pagekeys True

                    side_yfill True

                    vbox:
                        for i in items:
                            textbutton i.caption action [SetVariable("choice_screen_show_scrollbar", False), i.action]
                            
    ######### A New Home [Envixer] - the latest version tested: v0.7
    ## Making the the text easier to read in the dialog box by changing the font to Ren'Py default DejaVu Sans.
    if config.name == "A New Home" or config.name == "A New Home v0.7":
        define gui.text_font = "DejaVuSans.ttf"
        define gui.choice_button_text_font = gui.text_font
        
    ######### Babysitter [T4bbo] - the latest version tested: v0.1.4
    ## Replacing large stats button with a small quickmenu-style text button. Replacing thick grey and kinda fuzzy outlines in the dialog box
    ## and name box with my sharp high contrast outlines and making text a bit smaller. Changing default name label color from black to white.
    ## Changing choice menu button outlines to black and insensitive, idle color to white, hover color to green
    if config.name == "Babysitter":
        screen control():
            hbox:
                style_group "quick"
                textbutton ("stats") xpos 0 ypos 0 action If(renpy.get_screen("stat_box"), Hide("stat_box"), Show("stat_box"))
        
        # following code is mostly copied from T4bbo's game and modified
        screen say(who, what, side_image=None, two_window=True):

            # Decide if we want to use the one-window or two-window variant.
            if not two_window:

                # The one window variant.
                window:
                    id "window"

                    has vbox:
                        style "say_vbox"

                    if who:
                        text who id "who"

                    text what id "what"

            else:

                # The two window variant.
                vbox xpos 240:
                    style "say_two_window_vbox"

                    if who:
                        window:
                            style "say_who_window"
                            #xpos -240
                            ypos 155

                            text who:
                                size 20
                                outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]
                                xalign 0.5
                                italic True
                                id "who"

                    window:
                        id "window"

                        has vbox:
                            style "say_vbox"

                        text what id "what":
                            outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]
                            color "#FFFFFF"
                            size 20

            # If there's a side image, display it above the text.
            if side_image:
                add side_image
            else:
                add SideImage() xalign 0.0 yalign 1.0

            # Use the quick menu.
            use quick_menu
                    
        style quick_button_text:
            is default
            size 14
            
        style say_label:
            color "#FFFFFF"
            
        style menu_choice:
            is default
            color "#FFFFFF"
            idle_color "#FFFFFF"
            hover_color "#00FF00"
            insensitive_color "#808080"
            outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]
            
    ######### A Wife And Mother [Lust & Passion] - the latest version tested: v0.055
    ## Since the text of every freakin' choice button in the game is colored s-e-p-a-r-a-t-e-l-y to black, it is impossible to override it.
    ## To change that color, the whole script of the game would have to be modified and color tags removed from there. D'oh...
    ## So this is an attempt to be clever and create "active" bright outlines to it. Seems to be working :-P
    if build.name == "A_Wife_And_Mother":
        style choice_button_text:
            idle_outlines [ (absolute(2), "#FFF", absolute(1), absolute(1)) ]
            hover_outlines [ (absolute(2), "#0F0", absolute(1), absolute(1)) ]
            insensitive_outlines [ (absolute(2), "#F00", absolute(1), absolute(1)) ]
            
    ######### Freeloading Family [FFCreation] - the latest version tested: v0.26
    ## Removing fancy text box backgrounds and changing colored outlines of the name labels to patch default
    if config.name == "Freeloading Family":
        define alarm = Character('Alarm' )
        define s = DynamicCharacter("sis_name", image="sister", window_left_margin=0, who_color="#e8004d" )
        define m = Character('You' )
        define mel = Character('Melody', image="melody", window_left_margin=0, who_color="#bd01bd" )
        define dev = Character('Developer', image="dev", window_left_margin=0 )
        define q = Character('???', image="unknown", window_left_margin=0 )
        define l = Character('Leah', image="leah", window_left_margin=0, who_color="#00abd9" )
        define t = Character('Susan', image="susan", window_left_margin=0, who_color="#4e4e4e" )
        define k = Character('Karina', image="karina", window_left_margin=0, who_color="c9c94c"  )
        define gen = Character('The Gentleman', who_color="#8b4513" )
        define h = Character('Hailey', image="hailey", window_left_margin=0, who_color="ec008c" )
        define ev = Character('Everyone' )
        define f = Character('Dad', image="dad")
        define b = Character('Brit', image="brit")
        define c = Character('Customer')
        define v = Character('Voice')
        define tv = Character('TV Show')
        define d = Character('Dean')
        define r = Character('Clerk')
        define u = Character('???')
        define st = Character("", image="sister", what_italic=True, window_left_margin=0, who_color="#e8004d")
        define led = Character("Leah's Dad")
        define lem = Character("Leah's Mom")
        define cop = Character("Cop")
        
    ######### Life with Mary [LikesBlondes] - the latest version tested: v0.27
    ## Removing completely static character side images that are just covering up large part of the screen,
    ## adding nothing to the game. Name label already says who's talking, the image is redundant.
    if config.name == "Life with Mary":
        define p = Character('[player_name]', color="#ff6666")
        define mi = Character('Mike', color="#206be5")
        define m = Character('Mary', color="#f2170c")
        define cl = Character('Clerk', color="#42f4d4")
        define cli = Character('Client', color="#1c3bb5")
        define s = Character('Simone', color="#a7f977")
        define v = Character('Vanessa', color="#53f442")
        define mus = Character('Museum employee', color="#9842f4")
        define ice = Character('Ice rink employee', color="#1d7575")
        define barista = Character('Barista', color="#751d62")
        define andi = Character('Andy', color="#ea0b73")
        define j = Character('John', color="#1c3bb5")
        define carl = Character('Carl', color="#ff6e51")
        define james = Character('James', color="#1c3bb5")
        define gf = Character('[ex_name]', color="#a7f977")
        define w1 = Character('Woman', color="#ff1aff")
        define w2 = Character('Woman', color="#c6538c")

    ######### Pandora's Box [] - the latest version tested: v0.1
    if config.name == "Pandora's Box":
        style say_dialogue:
            font "DejaVuSans.ttf"
            size 32
            color "#FFFFFFFF"
        define gui.text_color = '#FFFFFFFF'
        define gui.interface_text_color = '#FFFFFFFF'

    ######### Haley's story [Viitgames] - the latest version tested: v0.01
    if config.name == "Haleys story":
        style say_dialogue:
            font "DejaVuSans.ttf"
        define p = Character('[player_name]', color="#ff6666")
        define a = Character('Adriana', color="#520575")
        define v = Character('Victor', color="#000b4c")
        define h = Character('Haley', color="#f71b73")
        define d = Character('Diane', color="#f9b300")
        define s = Character('Sandra', color="#f93500")
        define al = Character('Alana', color="#2d9900")
        define hank = Character('Hank', color="#007a99")
        define jim = Character('Jim', color="#7451b5")
        
    ######### [LewdLab] 'Dreams of Desire - The Lost Memories' and 'Midnight Paradise'
    ## Replacing the extra bulky font with Ren'Py's default
    if config.name == "Dreams of Desire - The Lost Memories" or config.name == "Midnight Paradise":
        screen say(who, what):
            style_prefix "say"
            window:
                id "window"
                yoffset 12
                if who is not None:
                    window:
                        id "namebox"
                        style "namebox"
                        text who.upper() id "who" font "DejaVuSans.ttf" size 60 xalign 0.5 yalign 0.5
                text what id "what" font "DejaVuSans.ttf"
                
    ######### The Awakening [SLim Games] - the latest version tested: 0.1
    ## Removing "hardcoded" text box backgrounds and static character side images by redefining characters
    if build.name == "TheAwakening":
        define y = Character("[y1]")
        define m = Character("[m1]")
        define u = Character("???")
        define s = Character("[s1]")
        define l = Character("Linda")
        define f = Character("[f1]")
        define k = Character("Klara B.")
        define p = Character("Mail girl")
        define ma = Character("Margaret")
        define w = Character("Will")
        define c = Character("Cashier")
    
    ######### Big City's Pleasures [Porcus] - the latest version tested: 0.2.2b
    ## Removing "hardcoded" grey color and italic style from the dialog text (italic dialog text
    ## plus quotes around it plus italic character name was marking the thoughts of characters,
    ## this only removes italic from the text, italic names and quotes will remain as they are.
    if config.name == "Big City's Pleasures":
        style say_dialogue:
            size 32
        define t = Character("Tony",color="#0174DF")
        define tt = Character("[t]",color="#0174DF", italic=True, what_italic=True)
        define g = Character("Gina",color="#FE2E64")
        define gg = Character("Gina",color="#FE2E64", italic=True, what_italic=True)
        define j = Character("Jessy",color="#FE642E")
        define jj = Character("Jessy",color="#FE642E", italic=True, what_italic=True)
        define jk = Character("Jacklyn",color="#7F8C8D")
        define jkjk = Character("Jacklyn",color="#7F8C8D", italic=True, what_italic=True)
        define k = Character("Katia",color="#7DCEA0")
        define kk = Character("Katia",color="#7DCEA0", italic=True, what_italic=True)
        define m = Character("Maylin",color="#0E6655")
        define mm = Character("Maylin",color="#0E6655", italic=True, what_italic=True)
        define l = Character("Lian",color="#21618C")
        define ll = Character("Lian",color="#21618C", italic=True, what_italic=True)
        define a = Character("Alexia",color="#D4AC0D")
        define aa = Character("Alexia",color="#D4AC0D", italic=True, what_italic=True)
        define ch = Character("Charlene",color="#D5F5E3")
        define chch = Character("Charlene",color="#D5F5E3", italic=True, what_italic=True)
        define J = Character("Judy",color="#F5CBA7")
        define JJ = Character("Judy",color="#F5CBA7", italic=True, what_italic=True)
        define c = Character("Cassandra",color="#A569BD")
        define cc = Character("Cassandra",color="#A569BD", italic=True, what_italic=True)
        define C = Character("Cassie",color="#A569BD")
        define CC = Character("Cassie",color="#A569BD", italic=True, what_italic=True)
        define w = Character(_("Camarera"),color="#A569BD")
        define ww = Character(_("Camarera"),color="#A569BD", italic=True, what_italic=True)
        define us = Character(_("Secretaria"),color="#A569BD")
        define unkm = Character("...",color="#1E90FF")
        define unkf = Character("...",color="#FF1493")
        define o = Character("Olivia",color="#FFAFA8")
        define oo = Character("Olivia",color="#FFAFA8", italic=True, what_italic=True)
        define r = Character("Rachel",color="#B7950B")
        define rr = Character("Rachel",color="#B7950B", italic=True, what_italic=True)
        define b = Character("Becky",color="#F9EBEA")
        define bb = Character("Becky",color="#F9EBEA", italic=True, what_italic=True)
        define s = Character("Scott",color="#0000b3")
        define ss = Character("Scott",color="#0000b3", italic=True, what_italic=True)
        define S = Character("Sam",color="#CF8942")
        define SS = Character("Sam",color="#CF8942", italic=True, what_italic=True)
        define sab = Character("Sabrina",color="#8A122F")
        define SAB = Character("Sabrina",color="#8A122F", italic=True, what_italic=True)
        define ac = Character(_("Srta. Cooper"),color="#B12D4D") #Addison Cooper
        define acac = Character(_("Srta. Cooper"),color="#B12D4D", italic=True, what_italic=True)
        define doc1 = Character(_("Doctora"),color="#CC0099")
    
    ######### The Personal Assistant [JLCreation] - the latest version tested: v1.0
    ## Character name color from grey to white, removed "Story Teller" character name.
    if build.name == "The_Personal_Assistant":
        style say_label:
            color "#FFF"
        define t = Character("")
    
    ######### Heavy Five [Nottravis] - the latest version tested: Ch 1
    ## Character name color from grey to white, removed "Story Teller" character name.
    if config.name == "Heavy Five":
        $ gui.name_ypos = 20
        $ gui.textbox_height = 200
        $ gui.name_xpos = 20
        $ gui.text_xpos = 100
        $ gui.text_width = 1650
        $ player_fname = "Bob"
        $ player_lname = "Miststück"
        $ b = Character("Becca")
        $ bs = Character("Jane")
        $ mc = Character("You,\n[player_fname]\n[player_lname]")
        $ c = Character("Chris")
        $ s = Character("Sarah")
        $ a = Character("Annie")
        $ k = Character("Kelly")
        $ am = Character("Amanda")
        $ m = Character("Mike")
        $ j = Character("John")
        $ act = Character("Actual")
        $ van = Character("Vanguard")
        $ t = Character("Trish")

    ######### Earth's Sexiest Heroes [Kappuru Games] - the latest version tested: 0.3
    ## Removing character dialog backgrounds
    if config.name == "Earth's Sexiest Heroes":   
        define bw_t = Character("Black Widow Thinking", image="black_widow")
        define ca_t = Character("Captain America Thinking", image="captain_america")
        define nf_t = Character("Nick Fury Thinking", image="nick_fury")
        define mh_t = Character("Maria Hill Thinking", image="maria_hill")
        define fr_mmc = Character("[mmc_default_name]", image="mmc")
        define fr_mmc_t = Character("[mmc_default_name] Thinking", image="mmc")
        define fr_fmc = Character("[name_choice]", image="fmc")
        define fr_fmc_t = Character("[name_choice] Thinking", image="fmc")
        define mr_fmc = Character("[fmc_default_name]", image="fmc")
        define mr_fmc_t = Character("[fmc_default_name] Thinking", image="fmc")
        define mr_mmc = Character("[name_choice]", image="mmc")
        define mr_mmc_t = Character("[name_choice] Thinking", image="mmc")

    ######### Echoes Of Lust [Inceton] - the latest version tested: Ep 3
    ## Narrator font set to Ren'Py default
    if config.name == "EchoesOfLust":
        define n = Character("",what_color="#efd300")
        
    ######### Bad Memories [recreation] - the latest version tested: v0.5.2
    ## Redefine characters to remove huge fancy name label font, fix name label size and position
    if config.name == "Bad Memories":
        style say_label:
            font "DejaVuSans.ttf"
            size 33
            bold True
            color "#FFF"
        define gui.name_ypos = 50
        define gui.dialogue_xpos = 400
        define gui.name_xpos = 150
        define gui.namebox_width = 200
        define n = Character(None)
        define q = Character(None)
        define name_only = Character(None)
        define pc = Character("[pc_name]", who_color="#2b68b2")
        define pcsure = Character("[pc_sure]")
        define pcgender = "[pcgender]"
        define pcthink = Character("[pcthink_name]", who_color="#2b68b2", what_prefix="(", what_suffix=")")
        define e = Character("Ellie", who_color="#8201ac")
        define m = Character("[name_m]", who_color="#1e8510")
        define j = Character("Jada", who_color="#b07000")
        define t = Character("Katherine", who_color="#c30000")
        define ts = Character("Katie", who_color="#c30000")
        define h = Character("Hanna", who_color="#dcdf00")
        define st = Character("Steph", who_color="#005a02")
        define boss = Character("C.J.") #Colin-James Olafsson
        define oc_ = Character("Old cop", who_color="#8b4a0b")
        define oc = Character("Johnson", who_color="#8b4a0b")
        
    ######### Kindread: The Redburns [Inkalicious] - the latest version tested: ch3
    ## Thinking style
    if config.name == "Kindread: The Redburns":
        style thinking:
            color "#ffffff"
            outlines [ (absolute(2), "#00a", absolute(1), absolute(1)) ]
            size style.say_dialogue_text.size
            
    ######### Babysitters [T4bbo] - the latest version tested: v0.0.1
    ## Replacing large stats button with a small quickmenu-style text button and making dialog text a bit smaller.
    ## Changing default name label and dialog text color from black to white. Removing what_outlines from name labels.
    if config.name == "Babysitters":
        define mik = DynamicCharacter("player_name", color="#1e90ff")
        define ton = Character("Tony", color = "#ffddff")
        define eri = Character('Erica', color="#ff69b4")
        define jes = Character('Jessica', color="#FF0000")
        define lar = Character('Lara', color="#8b0000")
        define jon = Character('John', color="#bc8f8f")
        define wic = Character('Dr. Wick', color = "#fff")
        define sas = Character('Sasha', color="#9370db")
        define jan = Character('Jane', color = "f1f442")
        define mir = Character('Miranda', color = "2a075b")
        define ang = Character('Angelica', color = "#5b3007")
        define xxx = Character('Uknown person', color = "#fff")
        # say dialogue
        screen say(who, what):
            vbox:
                yalign 0.999
                if who:
                    frame:
                        ypos 94
                        ymaximum 88
                        yminimum 88                        
                        xminimum 380
                        xmaximum 380
                        xpos 8
                        background None
                        text who id "who" xalign 0.5 color "#FFFFFF"
                frame:    
                    ysize 150
                    xanchor -0.25
                    xmaximum 1520
                    xminimum 1520  
                    xpadding 125
                    background None
                    text what id "what" xpos -25 yalign 0.45 xmaximum 2150 color "#FFFFFF" size 29
            # Use the quick menu.
            use quick_menu
                    
        style window:
            xalign 0.5
            xfill True
            yalign gui.textbox_yalign
            ysize gui.textbox_height
            variant "small"

        style namebox:
            xpos gui.name_xpos
            xanchor gui.name_xalign
            xsize gui.namebox_width
            ypos 23
            ysize gui.namebox_height
            padding gui.namebox_borders.padding
            
        style quick_button_text:
            is default
            size 14
            
        screen control():
            vbox:
                style_prefix "quick"
                textbutton _("Stats") xpos 0 ypos 0 action If(renpy.get_screen("stat_box"), Hide("stat_box"), Show("stat_box"))

    ######### The Way [Zee95] - v0.23a
    ## Removing character dialog styles to apply the style of this patch
    if config.name == "The Way":
        define z = DynamicCharacter("p_name", image = "mc", screen = "say" )
        define s = Character("", screen = "say" )
        define jan = Character("Janet", image = "jan", screen = "say" )
        define ade = Character("Adele", image = "ade", screen = "say")
        define tyr = Character("Tyron", image = "tyr", screen = "say")
        define ang = Character("Angelina", image = "ang", screen = "say")
        define msj = Character("Mrs.Jonas", image = "msj", screen = "say")
        define mse = Character("Miss Estevez", image = "mse", screen = "say")
        define pao = Character("Paola", image = "paola", screen = "say")
        define fran = Character("Frank", image = "fran", screen = "say")
        define ram = Character("Ramon", image = "ram", screen = "say")
        define hen = Character("Henry", image = "hen", screen = "say")
        define carlos = Character("Carlos", image = "carlos", screen = "say")
        define sonya = Character("Sonya", image = "sonya", screen = "say")
        define melis = Character("Melissa", image = "melis", screen = "say")
        define alisha = Character("Alisha", image = "alisha", screen = "say")
        define moniq = Character("Monique", image = "moniq", screen = "say")
        define strn = Character("Stranger", image = "strn", screen = "say")
        define anna = Character("Anna", image = "anna", screen = "say")
        define deb = Character("Debby", image = "deb", screen = "say")
        define est = Character("Estelle", image = "est", screen = "say")
        define girl = Character("Girl", image = "strn", screen = "say")
        define man = Character("Man", image = "strn", screen = "say")
        define mat = Character("Matt", image = "mat", screen = "say")
        define alis = Character("Alice", image = "alis", screen = "say")
        define sec = Character("Security guard", image = "strn", screen = "say")
        define cop = Character("Cop", image = "strn", screen = "say")
        define wom = Character("Women", image = "strn", screen = "say")
        define john = Character("John The Maniac", image = "strn", screen = "say")
        define jm = Character("John's mom", image = "strn", screen = "say")
        define girl = Character("Girl", image = "strn", screen = "say")
        define raf = Character("Rafiq", image = "raf", screen = "say")
        define jol = Character("Joulia", image = "jol", screen = "say")
        define seb = Character("Sebastian", image = "seb", screen = "say")
        define lis = Character("Lisa", image = "lis", screen = "say")
        define vic = Character("Victoria", image = "vic", screen = "say")
        define nurs = Character("Nurse", image = "strn", screen = "say")
        define pat = Character("Patrick", image = "pat", screen = "say")
        define bat = Character("Batty", image = "bat", screen = "say")
        define dag = Character("Doug", image = "dag", screen = "say")
        define mar = Character("Maria", image = "mar", screen = "say")
        define wai = Character("Waiter", image = "strn", screen = "say")
        define vinc = Character("Vincent", image = "vinc", screen = "say")
        define osc = Character("Oscar", image = "osc", screen = "say")

    ######### Forgotten Paradise [Void Star] - v0.12
    ## Removing character dialog styles to apply the style of this patch
    if config.name == "Forgotten Paradise":
        define mc = Character("[player_name]", color = "#85B200",  image = "mc") 
        define ad = Character("[alien_daughter]", color = "#F1DDF7",  image = "ad")
        define eli = Character("Elisande", color = "#B78E7B", image = "eli")
        define voidstar = Character("Void Star", color = "#FFFFFF", image = "voidstar") 
        define alex = Character("Alex", color = "#FFFFFF", image = "alex") 
        define qm = Character("???", color = "#FFFFFF", image = "qm")
        define walter = Character("Walter", color = "#E1A588", image = "walter")
        define ivy = Character("Ivy", color = "#822100", image = "ivy") 
        define ingrid = Character("Ingrid", color = "#624720", image = "ingrid") 
        define mira = Character("Mira", color = "#55332B", image = "mira") 
        define luna = Character("Luna", color = "#CACAD9", image = "luna") 
        define dany = Character("Dany", color = "#F5E483", image = "dany") 
        define ramsay = Character("Ramsay", color = "#C2C2BA", image = "ramsay") 
        define r = Character("Ruby", color = "#FF9999", image = "ruby") 
        define z = Character("Zoey", color = "#DFBFFF", image = "zoey") 
        define jack = Character("Jack", color = "#999999", image="jack") 
        define e = Character("Elyse", color = "#4DFFA6", image = "elyse") 
        define j = Character("Jane", color = "#007095", image = "jane") 
        define a = Character("Andre", color = "#FFFF00", image = "andre") 
        define edis = Character("Edis", color = "#F34E52", image = "edis") 
        define amir = Character("Amir", color = "#B25900", image = "amir") 
        define d = Character("Dahlia", color = "#FF2626", image = "dahlia") 
        define shp = Character("Karin", color = "#8C0000", image = "karin") 
        define aur = Character("Aurora", color = "#486DA2", image = "aurora") 
        define l = Character("Lexa", color = "#008C00", image = "lexa") 
        define chloe = Character("Chloe", color = "#006DD9", image = "chloe") 
        define m = Character("Melisa", color = "#FFC926", image = "melisa") 
        define v = Character("Victor", color = "#BFFFDF", image = "victor") 
        define cass = Character("Cassandra", color = "#A64DFF", image="cass")

    ######### Primal Instinct [SilkandMilkProductions] - v0.03 
    ## Removing character dialog styles to apply the style of this patch
    if build.name == "PrimalInstinct":        
        define mc = Character("[mc]")
        define s = Character('Sandra')
        define a = Character("Alex")
        define b = Character("Blake")
        define m = Character("Meghan")
        define u = Character("???")
        define me = Character("Mei" )
        define lw = Character("Lawan")
        define n = Character("Mr. Novak")
        define mi = Character("Misha")

    ######### Estate: Dominate [Henissart] - v0.17 R2
    ## Removing dark grey colors from character labels
    if config.name == "Estate : Dominate":
        define vic = Character(("Victor"))
        define driver = Character(("Driver"))
        define uvoice = Character(("Voice"))

    ######### Gates Motel [P_S_Y_C_H_O] - v0.3b
    ## Removing colors from character dialog text
    if config.name == "Gates Motel":
        define dev = Character("PSYCHO", who_color= "#4e4c4b")
        define unknown = Character("?????", who_color="#c5c6c4")
        define m = Character("[mc]", who_color="#FFFFFF")
        define n = Character("[no]", who_color="#0099ff")
        define g = Character("[gr]", who_color="#a4fd00")
        define a = Character("[al]", who_color="#fe8aff")
        define r = Character("[ro]", who_color="#7f0004")
        define savage = Character("Savage", who_color="#c98929")
        define s = Character("[sa]", who_color="#c98929")

    ######### Taboo Stories
    ## Removing background from characters
    if build.name == "TabooStories":
        define narrator = Character(what_italic=True)
        define y1 = Character("You")
        define unk = Character("???")
        define e = Character("Elli", color="#ffa0ef")
        define mia = Character("Mia", color="#ffa0ef")
        define jo = Character("Joppie")

    ######### Indecent Desires - the latest version tested: v010 alpha
    ## Removing "hardcoded" colors from character definitions, they still remain into the game script
    ## where they exist there though.
    ## [ Code replacement proposed by nevermoreXX @F95zone, I optimized further the code he provided ]
    if config.name == "Indecent Desires":
        style say_dialogue:
            size 32
            font "DejaVuSans.ttf"
            color "#FFF"
        style say_label:
            color "#98279c"
        define s = Character('Sarah', image="sarah")
        define k = Character('Kate', image="kate")
        define m = Character('Monique', image="monique")
        define h = Character('[player_name]', image="hero")
        define j = Character('Jessica', image="jessica")
        define je = Character('Jessica', image="jessica1")
        define a = Character('Aiko', image="aiko")
        define t = Character('Trevor', image="trevor")
        define al = Character('Alexander', image="alexander")
        define kr = Character('Karina', image="karina")
        define l = Character('Lysa', image="lysa")
        define la = Character('Larissa', image="larissa")
        define el = Character('Elizabeth', image="elizabeth1")
        define gia = Character('Gia', image="gia")
        define kel = Character('Kelly', image="kelly")
        define lei = Character('Leila', image="leila")
        define ava = Character('Ava', image="ava")
        define jack = Character('Jack', image="jack")
        define chan = Character('Chan', image="chan")
        define ch = Character('Chloe', image="chloe")
        define yoon = Character('Yoon', image="yoon")
        define ai = Character('Aiko', image="aiko")
        define ivy = Character('Ivy', image="ivy")
        define mindy = Character('Mindy', image="mindy")
        define fred = Character('Fred', image="fred")
        define ja = Character('Jane', image="jane")

    ######### AMNESIA [Super Alex] - the latest version tested: v0.2a
    ## Removing "hardcoded" styling attributes from character definitions
    if config.name == "AMNESIA":
        define alexandra = Character("Alexandra", image="alexandra", color="#FEEA44")
        define kate_empty_ava = Character("Kate", color="#FD5151")
        define n = Character(color="#FFFFFF", what_italic = True)
        define mc = Character("[mcname!u]", image = "mc", color="#5E97FF")
        define mct = Character("[mcname!u]", image = "mc", color="#5E97FF", what_italic = True)
        define nurse = Character("[nursename]", image = "nurse", color="#BE8CFA")
        define alex = Character("[momname]", image = "alex", color="#FEEA44")
        define kate = Character("[katename]", image = "kate", color="#FD5151")
        define eva = Character("[evaname]", image = "eva", color="#FFCED6")
        define elena = Character("[elenaname]", image = "elena", color="#FAD7B3")
        define tester = Character("[TEST]", image = "testingfunc", color="#FDa321")

    ######### Intertwined [Nyx] - the latest version tested: v0.3a
    ## Removing "hardcoded" styling attributes from character definitions
    if config.name == "Intertwined":
        define mc = DynamicCharacter("name", color="#016363")
        define a = Character("Alexis", color="#FF0000")
        define m = Character("Mom (Emily)", color="#FFCCCC")
        define d = Character("Dad (Andres)", color="#615f54")
        define er = Character("Erynn", color="#79008b")
        define me = Character("Melissa", color="#e76d14")
        define la = Character("Layla", color="#17d5c5")
        define el = Character("Elena", color="#d5b817")
        define ni = Character("Nikki", color="#7214e7")
        define c = Character("Cara", color="#e71446")
        define ha = Character("Haley", color="#1ca919")
        define z = Character("Zach", color="#1423e7")
        define na = Character("Nathan", color="#1423e7")
        define to = Character("Tori", color="#FFFFFF")
        define da = Character("Darryl", color="#FFFFFF")
        define et = Character("Ethan", color="#FFFFFF")
        define nt = Character("Natasha", color="#FFFFFF")
        define si = Character("Sienna", color="#FFFFFF")
        define td = Character("Mrs Davis (Naomi)", color="#FFFFFF")
        define tc = Character("Mr. Coleman", color="#FFFFFF")
        define tr = Character("Mrs Ramirez (Gabi)", color="#FFFFFF")
        define tm = Character("Coach (Mike)", color="#FFFFFF")
        define bd = Character("Barkeeper (Dylan)", color="#FFFFFF")
        define bt = Character("Bartender", color="#FFFFFF")
        define ra = Character("Rachel", color="#FFFFFF")
        define em = Character("Emanuel", color="#FFFFFF")
        define ju = Character("Julia", color="#FFFFFF")
        define ai = Character("Aiden", color="#FFFFFF")
        define t = Character("Teacher", color="#FFFFFF")
        define pt = Character("Personal Trainer", color="#FFFFFF")
        define x = Character("???", color="#FFFFFF")
        define n = Character("", color="#FFFFFF")
        define pi = Character("Pilot", color="#FFFFFF")
        define fa = Character("Flight Attendant", color="#FFFFFF")
        define re = Character("Receptionist", color="#FFFFFF")

    ######### Just Another Bubble [SuperWriter] - the latest version tested: CH1
    ## Replacing customized dialog and input screens with default ones, so quick menu 
    ## wouldn't throw an error also replacing dialog box font with Ren'Py default.
    if config.name == "Just Another Bubble":
        style say_dialogue:
            font "DejaVuSans.ttf"
        screen input(prompt):
            style_prefix "input"

            window:

                vbox:
                    xalign gui.dialogue_text_xalign
                    #xpos gui.dialogue_xpos
                    xsize gui.dialogue_width
                    ypos gui.dialogue_ypos

                    text prompt style "input_prompt"
                    input id "input"
                
        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"

    ######### Secret Summer [SuperWriter] - the latest version tested: v0.4
    ## Something is causing vertical misalignment of the quick menu , setting a custom
    ## yalign of 1.02 to it
    ## Setting default text speed to infinity (= zero value)
    ## Setting default text style to my default outlined white from the game default brown
    ## that is almost invisible as narrator text and not much better in the main menu.
    ## Setting up missing dialog, name box and input prompt styles.
    ## Replacing customized dialog screen with hardcoded properties with the Ren'Py default.
    if config.name == "Secret Summer":
        default pf_qmenu_yalign = 1.02
        default preferences.text_cps = 0
        style default:
            color "#FFFFFF"            
            outlines [ (absolute(2), "#000", absolute(1), absolute(1)) ]
        style say_dialogue is default
        style say_dialogue:
            xsize 1200
            background None
            size int(config.screen_height / 42.5)
            xpos 350
            xalign 0.0
        style window:
            ysize 250
            yalign 1.0
            background None
        style say_label:
            size 35
        style namebox:
            xpos 300
            ycenter 45
            background None
        style input_prompt is default
        style input is default
        # 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


# Python init section
init 999 python:
    
    # Quick menu defaults to be redefined for specific games
    pf_qmenu_yalign = 1.0
        
    #########
    ## Clean up possible gui overrides set by game dev
    attribts=["quick_button_borders", "quick_button_text_size", "quick_button_text_idle_color", "quick_button_text_idle_color", "quick_button_text_selected_color", "quick_button_width", "quick_button_text_font"]
    
    for attribt in attribts:
        try:
            getattr(gui, attribt)
        except:
            pass
        else:
            delattr(gui, attribt)

    #########
    ## remapping start label to show quick menu by adding it to the config.label_overrides dictionary
    config.label_overrides["start"] = "pfstart"
    config.label_overrides["after_load"] = "pf_after_load"    
    
    ## Restore remapped keys to Ren'Py defaults unless the game is in the exclusion list
    if config.name not in []:
        config.keymap.update(    
            rollback = [ 'K_PAGEUP', 'repeat_K_PAGEUP', 'K_AC_BACK', 'mousedown_4' ],
            screenshot = [ 's', 'alt_K_s', 'alt_shift_K_s' ],
            toggle_afm = [ ],
            toggle_fullscreen = [ 'f', 'alt_K_RETURN', 'alt_K_KP_ENTER', 'K_F11' ],
            game_menu = [ 'K_ESCAPE', 'K_MENU', 'mouseup_3' ],
            hide_windows = [ 'mouseup_2', 'h' ],
            launch_editor = [ 'E' ],
            dump_styles = [ ],
            reload_game = [ 'R', 'alt_shift_K_r' ],
            inspector = [ 'I' ],
            full_inspector = [ 'alt_shift_K_i' ],
            developer = [ 'D', 'alt_shift_K_d' ],
            quit = [ ],
            iconify = [ ],
            help = [ 'K_F1', 'meta_shift_/' ],
            choose_renderer = [ 'G', 'alt_shift_K_g' ],
            progress_screen = [ 'alt_shift_K_p', 'meta_shift_K_p', 'K_F2' ],
            accessibility = [ "K_a" ],
            self_voicing = [ 'v', 'V', 'alt_K_v'  ],
            clipboard_voicing = [ 'C', 'alt_shift_K_c' ],
            debug_voicing = [ 'alt_shift_K_v', 'meta_shift_K_v' ],
            rollforward = [ 'mousedown_5', 'K_PAGEDOWN', 'repeat_K_PAGEDOWN' ],
            dismiss = [ 'mouseup_1', 'K_RETURN', 'K_SPACE', 'K_KP_ENTER', 'K_SELECT' ],
            dismiss_unfocused = [ ],
            dismiss_hard_pause = [ ],
            focus_left = [ 'K_LEFT', 'repeat_K_LEFT' ],
            focus_right = [ 'K_RIGHT', 'repeat_K_RIGHT' ],
            focus_up = [ 'K_UP', 'repeat_K_UP' ],
            focus_down = [ 'K_DOWN', 'repeat_K_DOWN' ],
            button_ignore = [ 'mousedown_1' ],
            button_select = [ 'mouseup_1', 'K_RETURN', 'K_KP_ENTER', 'K_SELECT' ],
            button_alternate = [ 'mouseup_3' ],
            button_alternate_ignore = [ 'mousedown_3' ],
            input_backspace = [ 'K_BACKSPACE', 'repeat_K_BACKSPACE' ],
            input_enter = [ 'K_RETURN', 'K_KP_ENTER' ],
            input_left = [ 'K_LEFT', 'repeat_K_LEFT' ],
            input_right = [ 'K_RIGHT', 'repeat_K_RIGHT' ],
            input_up = [ 'K_UP', 'repeat_K_UP' ],
            input_down = [ 'K_DOWN', 'repeat_K_DOWN' ],
            input_delete = [ 'K_DELETE', 'repeat_K_DELETE' ],
            input_home = [ 'K_HOME' ],
            input_end = [ 'K_END' ],
            input_copy = [ 'ctrl_K_INSERT', 'ctrl_K_c' ],
            input_paste = [ 'shift_K_INSERT', 'ctrl_K_v' ],
            viewport_leftarrow = [ 'K_LEFT', 'repeat_K_LEFT' ],
            viewport_rightarrow = [ 'K_RIGHT', 'repeat_K_RIGHT' ],
            viewport_uparrow = [ 'K_UP', 'repeat_K_UP' ],
            viewport_downarrow = [ 'K_DOWN', 'repeat_K_DOWN' ],
            viewport_wheelup = [ 'mousedown_4' ],
            viewport_wheeldown = [ 'mousedown_5' ],
            viewport_drag_start = [ 'mousedown_1' ],
            viewport_drag_end = [ 'mouseup_1' ],
            viewport_pageup = [  'K_PAGEUP', 'repeat_K_PAGEUP' ],
            viewport_pagedown = [  'K_PAGEDOWN', 'repeat_K_PAGEDOWN' ],
            skip = [ 'K_LCTRL', 'K_RCTRL' ],
            stop_skipping = [ ],
            toggle_skip = [ 'K_TAB' ],
            fast_skip = [ '>' ],
            bar_activate = [ 'mousedown_1', 'K_RETURN', 'K_KP_ENTER', 'K_SELECT' ],
            bar_deactivate = [ 'mouseup_1', 'K_RETURN', 'K_KP_ENTER', 'K_SELECT' ],
            bar_left = [ 'K_LEFT', 'repeat_K_LEFT' ],
            bar_right = [ 'K_RIGHT', 'repeat_K_RIGHT' ],
            bar_up = [ 'K_UP', 'repeat_K_UP' ],
            bar_down = [ 'K_DOWN', 'repeat_K_DOWN' ],
            save_delete = [ 'K_DELETE' ],
            drag_activate = [ 'mousedown_1' ],
            drag_deactivate = [ 'mouseup_1' ],
            console = [ 'shift_O', 'alt_shift_K_o' ],
            console_older = [ 'K_UP', 'repeat_K_UP' ],
            console_newer = [ 'K_DOWN', 'repeat_K_DOWN'],
            director = [ 'd' ],
            toggle_music = [ 'm' ],
            viewport_up = [ 'mousedown_4' ],
            viewport_down = [ 'mousedown_5' ],
            performance = [ 'K_F3' ],
            image_load_log = [ 'K_F4' ],
            profile_once = [ 'K_F8' ],
            memory_profile = [ 'K_F7' ],
            )
    
    # code inspired by bossapplesauce
    if config.name == "Indecent Desires":
        hardcoded = {}

        def rm_bold(text):
            def text_repl(t):
                if t.group(0).startswith("\{b\}"): return ""
                elif t.group(0).startswith("\{\/b\}"): return ""
            return hardcoded[text] if text in hardcoded else renpy.re.sub( r'(?:\{b\}|\{\/b\})', text_repl, text )

        config.say_menu_text_filter = rm_bold
    
    ######### Parental Love [Luxee] - the latest version tested: v0.6
    ## Overriding outline settings forced via init python and not by redefining styles
    if config.name == "Parental Love":
        renpy.register_style_preference("text", "decorated", style.say_dialogue, "outlines", [ (2, "#000", 1, 1) ])
        renpy.register_style_preference("text", "decorated", style.say_label, "outlines", [ (2, "#000", 1, 1) ])

    ######### Babysitter [T4bbo] - the latest version tested: v0.1.4
    ## Removing text box and menu button backgrounds, making custom "thought" tag color brighter
    if config.name == "Babysitter" or config.name == "Babysitters":
        style.say_who_window.background = None
        style.menu_choice_button.background = None
        style.menu_choice_button.hover_background = None
        # following code is copied from T4bbo's game and modified
        def my_tag(tag, argument, contents):
            return [
                (renpy.TEXT_TAG, u"i"),
                (renpy.TEXT_TAG, u"color=#a2b6ff"), #1a4aff
            ] + contents + [
                (renpy.TEXT_TAG, u"/color"),
                (renpy.TEXT_TAG, u"/i"),
            ]
        config.custom_text_tags["t"] = my_tag
        