A little help with textboxes and imagemaps?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
madocallie
Regular
Posts: 44
Joined: Tue May 14, 2013 1:57 am
Completed: Bad Faith (DEMO), When We First Met, Party Favors
Projects: Bad Faith (Full Release)
itch: madocallie
Location: UK
Discord: madocallie#2937
Contact:

A little help with textboxes and imagemaps?

#1 Post by madocallie » Tue May 14, 2013 2:31 am

I've noticed a few problems whilst programming my visual novel. Is it possible that you could help me how to fix them?

1) The color of the text in my textboxes.

When I test my visual novel, the text for the narrator is the colour I want it to be (white).

However, when a defined character is speaking, the colour changes to grey, even in NVL mode.

2) Hitting imagemap buttons

When I click my imagemap's buttons, they do not make any sound, even though I stated in my script that whenever a button is hit, "choice2.wav" is played.

As well as this, the imagemap's buttons do not show their "hit" state when I click on them.

Is there a fault in any of my scripts? ono;

Script:

Code: Select all

init python:
    
    # This is set to the name of the character that is speaking, or
    # None if no character is currently speaking.
     speaking = None
  
    # This returns speaking if the character is speaking, and done if the
    # character is not.
     def while_speaking(name, speak_d, done_d, st, at):
        if speaking == name:
            return speak_d, .1
        else:
            return done_d, None
  
    # Curried form of the above.
     curried_while_speaking = renpy.curry(while_speaking)
  
    # Displays speaking when the named character is speaking, and done otherwise.
     def WhileSpeaking(name, speaking_d, done_d=Null()):
        return DynamicDisplayable(curried_while_speaking(name, speaking_d, done_d))
  
    # This callback maintains the speaking variable.
     def speaker_callback(name, event, **kwargs):
        global speaking
       
        if event == "show":
            speaking = name
        elif event == "slow_done":
            speaking = None
        elif event == "end":
            speaking = None
  
    # Curried form of the same.
     speaker = renpy.curry(speaker_callback)
    
    
init:
    
    # Create such a character.
    $ girl = Character("Roxy", show_two_window=True, callback=speaker("rolal"), color="#FFFFFF")
    $ duh = Character("desu", show_two_window=True)
    $ narrarator = Character(None, kind=nvl)
  
    # Composite things together to make a character with blinking eyes and
    # lip-flap.
    image girl = LiveComposite(
        (225, 550),
        (0, 0), "roxytest.png",
        (0, 0), Animation("open-eyes-test.png", 4.5, "closed-eyes-test.png", .30) ,
        (0, 0), WhileSpeaking("rolal", Animation("closed-mouth-test.png", .2,
        "open-mouth-test.png", .2), "closed-mouth-test.png"),
        )
    image desu = "uguchan.png"
    image wow = "club.jpg"
    
    $ esubtitle = Character(None,
                            what_size=28,
                            what_outlines=[(3, "#0008", 2, 2), (3, "#282", 0, 0)],
                            what_layout="subtitle",
                            what_xalign=0.5,
                            what_text_align=0.5,
                            window_background=None,
                            window_yminimum=0,
                            window_xfill=False,
                            window_xalign=0.5)
    
    # Outlined text.
    $ eoutline = Character(_("desu"),
                           color="#c8ffc8",
                           what_outlines=[ (1, "#282") ])
  
    
  
    


    $ config.adv_nvl_transition = fade
    $ config.nvl_adv_transition = fade
 # The game starts here.
label start:
  
$ move = MoveTransition(0.8)
  
scene wow
hide girl

"Madeline!"
    
show girl at right 
with easeinright
show desu at left
with easeinleft



girl "Hey mom."
    
hide window
  
girl "Hey...{w=2}Ellie?"
  
girl "You okay?"
    
girl "I love you. {w=2}You know that{w=0.5}, right?"
    
hide girl
with dissolve

return
Options:

Code: Select all

## This file contains some of the options that can be changed to customize
## your Ren'Py game. It only contains the most common options... there
## is quite a bit more customization you can do.
##
## Lines beginning with two '#' marks are comments, and you shouldn't
## uncomment them. Lines beginning with a single '#' mark are
## commented-out code, and you may want to uncomment them when
## appropriate.

init -1 python hide:

    ## Should we enable the use of developer tools? This should be
    ## set to False before the game is released, so the user can't
    ## cheat using developer tools.

    config.developer = True

    ## These control the width and height of the screen.

    config.screen_width = 800
    config.screen_height = 600

    ## This controls the title of the window, when Ren'Py is
    ## running in a window.

    config.window_title = u"A Love Story"

    # These control the name and version of the game, that are reported
    # with tracebacks and other debugging logs.
    config.name = "A Love Story"
    config.version = "0.0"

    #########################################
    # Themes
    
    ## We then want to call a theme function. themes.roundrect is
    ## a theme that features the use of rounded rectangles. It's
    ## the only theme we currently support.
    ##
    ## The theme function takes a number of parameters that can
    ## customize the color scheme.

    theme.a_white_tulip(
        ## Theme: A White Tulip
        ## Scheme Really Red
               
        ## The color of an idle widget face.
        widget = "#963232",

        ## The color of a focused widget face.
        widget_hover = "#c83232",

        ## The color of the text in a selected widget. (For
        ## example, the current value of a preference.)
        widget_selected = "#ffffc8",

        ## The color of a disabled widget face. 
        disabled = "#404040",

        ## The color of a frame containing widgets.
        frame = "#e17373",

        ## The background of the main menu. This can be a color
        ## beginning with '#', or an image filename. The latter
        ## should take up the full height and width of the screen.
        mm_root = "#ffd0d0",

        ## The background of the game menu. This can be a color
        ## beginning with '#', or an image filename. The latter
        ## should take up the full height and width of the screen.
        gm_root = "#ffd0d0",

        ## And we're done with the theme. The theme will customize
        ## various styles, so if we want to change them, we should
        ## do so below.            
        )


    #########################################
    ## These settings let you customize the window containing the
    ## dialogue and narration, by replacing it with an image.

    ## The background of the window. In a Frame, the two numbers
    ## are the size of the left/right and top/bottom borders,
    ## respectively.
    
    style.say_who_window.background = Frame("AInamebox.png", 0, 0)
    style.window.background = "AItextbox.png"
    
    ## Margin is space surrounding the window, where the background
    ## is not drawn.

    style.window.left_margin = 1
    style.window.right_margin = 1
    style.window.top_margin = 1
    style.window.bottom_margin = 1
    style.say_who_window.bottom_margin = 0

    ## Padding is space inside the window, where the background is
    ## drawn.

    style.window.left_padding = 146
    style.window.right_padding = 6
    style.window.top_padding = 6
    style.window.bottom_padding = 6
    style.say_who_window.left_padding = 62
    style.say_who_window.right_padding = 62
    style.say_who_window.top_padding = 9
    style.say_who_window.bottom_padding = 12

    ## This is the minimum height of the window, including the margins
    ## and padding.

    # style.window.yminimum = 250


    #########################################
    ## This lets you change the placement of the main menu.

    ## The way placement works is that we find an anchor point
    ## inside a displayable, and a position (pos) point on the
    ## screen. We then place the displayable so the two points are
    ## at the same place.

    ## An anchor/pos can be given as an integer or a floating point
    ## number. If an integer, the number is interpreted as a number
    ## of pixels from the upper-left corner. If a floating point,
    ## the number is interpreted as a fraction of the size of the
    ## displayable or screen.

    # style.mm_menu_frame.xpos = 0.5
    # style.mm_menu_frame.xanchor = 0.5
    # style.mm_menu_frame.ypos = 0.75
    # style.mm_menu_frame.yanchor = 0.5


    #########################################
    ## These let you customize the default font used for text in Ren'Py.

    ## The file containing the default font.

    style.default.font = "Comfortaa_Regular.ttf"
    style.say_who_window.font = "Comfortaa_Regular.ttf"

    ## The default size of text.

    style.default.size = 24
    

    ## Note that these only change the size of some of the text. Other
    ## buttons have their own styles.


    #########################################
    ## These settings let you change some of the sounds that are used by
    ## Ren'Py.

    ## Set this to False if the game does not have any sound effects.

    config.has_sound = True

    ## Set this to False if the game does not have any music.

    config.has_music = True

    ## Set this to False if the game does not have voicing.

    config.has_voice = True

    ## Sounds that are used when button and imagemaps are clicked.
    style.imagemap.activate_sound = "choice2.wav"
    style.button.activate_sound = "choice2.wav"
    
    

    ## Sounds that are used when entering and exiting the game menu.

    config.enter_sound = "click.wav"
    config.exit_sound = "click.wav"

    ## A sample sound that can be played to check the sound volume.

    # config.sample_sound = "click.wav"

    ## Music that is played while the user is at the main menu.

    #config.main_menu_music = "Space Prankster.mp3"


    #########################################
    ## Help.

    ## This lets you configure the help option on the Ren'Py menus.
    ## It may be:
    ## - A label in the script, in which case that label is called to
    ##   show help to the user.
    ## - A file name relative to the base directory, which is opened in a
    ##   web browser.
    ## - None, to disable help.   
    config.help = "README.html"


    #########################################
    ## Transitions.

    ## Used when entering the game menu from the game.
    config.enter_transition = fade

    ## Used when exiting the game menu to the game.
    config.exit_transition = dissolve

    ## Used between screens of the game menu.
    config.intra_transition = dissolve

    ## Used when entering the game menu from the main menu.
    config.main_game_transition = dissolve

    ## Used when returning to the main menu from the game.
    config.game_main_transition = dissolve

    ## Used when entering the main menu from the splashscreen.
    config.end_splash_transition = dissolve

    ## Used when entering the main menu after the game has ended.
    config.end_game_transition = dissolve

    ## Used when a game is loaded.
    config.after_load_transition = dissolve

    ## Used when the window is shown.
    config.window_show_transition = dissolve

    ## Used when the window is hidden.
    config.window_hide_transition = dissolve
    
    


    #########################################
    ## This is the name of the directory where the game's data is
    ## stored. (It needs to be set early, before any other init code
    ## is run, so the persisten information can be found by the init code.)
python early:
    config.save_directory = "derp-1309686063"

    #########################################
    ## Default values of Preferences.

    ## Note: These options are only evaluated the first time a
    ## game is run. To have them run a second time, delete
    ## game/saves/persistent

    ## Should we start in fullscreen mode?

    config.default_fullscreen = False

    ## The default text speed in characters per second. 0 is infinite.

    config.default_text_cps = 24

    #########################################
    ## More customizations can go here.
    
    
Screens:

Code: Select all

# This file is in the public domain. Feel free to modify it as a basis
# for your own screens.

##############################################################################
# Say
#
# Screen that's used to display adv-mode dialogue.
# http://www.renpy.org/doc/html/screen_special.html#say

screen say:

    # Defaults for side_image and two_window
    default side_image = None
    default two_window = True

    # Decide if we want to use the one-window or two-window varaint.
    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:
            style "say_two_window_vbox"

            if who:            
                window:
                    style "say_who_window"

                    text who:
                        id "who"
                        
            window:
                id "window"

                has vbox:
                    style "say_vbox"

                text what id "what"
              
    # 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


##############################################################################
# Choice
#
# Screen that's used to display in-game menus.
# http://www.renpy.org/doc/html/screen_special.html#choice

screen choice:

    window: 
        style "menu_window"        
        xalign 0.5
        yalign 0.5
        
        vbox:
            style "menu"
            spacing 2
            
            for caption, action, chosen in items:
                
                if action:  
                    
                    button:
                        action action
                        style "menu_choice_button"                        

                        text caption style "menu_choice"
                    
                else:
                    text caption style "menu_caption"

init -2 python:
    config.narrator_menu = True
    
    style.menu_window.set_parent(style.default)
    style.menu_choice.set_parent(style.button_text)
    style.menu_choice.clear()
    style.menu_choice_button.set_parent(style.button)
    style.menu_choice_button.xminimum = int(config.screen_width * 0.75)
    style.menu_choice_button.xmaximum = int(config.screen_width * 0.75)


##############################################################################
# Input
#
# Screen that's used to display renpy.input()
# http://www.renpy.org/doc/html/screen_special.html#input

screen input:

    window:
        has vbox

        text prompt
        input id "input"

        
##############################################################################
# Nvl
#
# Screen used for nvl-mode dialogue and menus.
# http://www.renpy.org/doc/html/screen_special.html#nvl

screen nvl:

    window:
        style "nvl_window"

        has vbox:
            style "nvl_vbox"

        # Display dialogue.
        for who, what, who_id, what_id, window_id in dialogue:
            window:
                id window_id

                has hbox:
                    spacing 10

                if who is not None:
                    text who id who_id

                text what id what_id

        # Display a menu, if given.
        if items:

            vbox:
                id "menu"

                for caption, action, chosen in items:

                    if action:

                        button:
                            style "nvl_menu_choice_button"
                            action action

                            text caption style "nvl_menu_choice"

                    else:

                        text caption style "nvl_dialogue"

    add SideImage() xalign 0.0 yalign 1.0
        
##############################################################################
# Main Menu 
#
# Screen that's used to display the main menu, when Ren'Py first starts
# http://www.renpy.org/doc/html/screen_special.html#main-menu

screen main_menu:

    # This ensures that any other menu screen is replaced.
    tag menu

    # The background of the main menu.
    window:
        style "mm_root"

    # The main menu buttons.
    imagemap:
        ground "imagemenuhit.png"
        hover "imagemenuhover.png"
        idle "imagemenuidle.png"
        selected_idle "imagemenuhit.png"
        selected_hover "imagemenuhit.png"
        
        hotspot (0,98,284,70) action Start()
        hotspot (0,182,312,65) action ShowMenu("load")
        hotspot (0,263,339,68) action ShowMenu("preferences")
        hotspot (0,344,366,66) action Start()
        hotspot (607,460,192,50) action Help()
        hotspot (578,524,221,51) action Quit(confirm=True)


init -2 python:

    # Make all the main menu buttons be the same size.
    style.mm_button.size_group = "mm"


##############################################################################
# Navigation
#
# Screen that's included in other screens to display the game menu
# navigation and background.
# http://www.renpy.org/doc/html/screen_special.html#navigation
screen navigation:

    # The background of the game menu.
    window:
        style "gm_root"

    # The various buttons.
    frame:
        style_group "gm_nav"
        xalign .98
        yalign .98
        
        has vbox

        textbutton _("Return") action Return()
      

init -2 python:
    style.gm_nav_button.size_group = "gm_nav"
    

##############################################################################
# Save, Load
#
# Screens that allow the user to save and load the game.
# http://www.renpy.org/doc/html/screen_special.html#save
# http://www.renpy.org/doc/html/screen_special.html#load

# Since saving and loading are so similar, we combine them into
# a single screen, file_picker. We then use the file_picker screen
# from simple load and save screens.
    
screen load_save_slot:
    $ file_text = "%2s. %s\n  %s" % (
                        FileSlotName(number, 2),
                        FileTime(number, empty=_("Empty")),
                        FileSaveName(number))

    add FileScreenshot(number) xpos 69 ypos 92
    text file_text xpos 82 ypos 42  size 24 color "#FFA8EE"
    
screen file_picker:
    key "w" action FileLoad(1, page="quick", confirm=True, newest=False)
    key "m" action MainMenu(confirm=True)
    key "p" action ShowMenu("preferences")
    key "mouseup_3" action ShowMenu("keys_map")
    key "K_ESCAPE" action Return()
    
    imagemap:
            ground "AIloadmenuhit.png"
            idle "AIloadmenuidle.png"
            hover "AIloadmenuhover.png"
            selected_idle "AIloadmenuhit.png"
            selected_hover "AIloadmenuhit.png"
            

            hotspot (84, 410, 11, 25) clicked FilePage(1)
            hotspot (156, 409, 21, 26) clicked FilePage(2)
            hotspot (246, 410, 19, 25) clicked FilePage(3)
            hotspot (336, 409, 18, 25) clicked FilePage(4)
            hotspot (425, 410, 19, 25) clicked FilePage(5)
            hotspot (515, 410, 17, 25) clicked FilePage(6)
            hotspot (595, 408, 21, 27) clicked FilePage(7)
            hotspot (684, 410, 19, 25) clicked FilePage(8)
            

            hotspot (41, 96, 330, 280) clicked FileAction(1):
                use load_save_slot(number=1)
            hotspot (425, 96, 330, 280) clicked FileAction(2):
                use load_save_slot(number=2)
           
                
            
            hotspot (655, 546, 122, 42) action Return()
    
screen save:
    key "s" action Return()
    # This ensures that any other menu screen is replaced.
    tag menu

    use file_picker
    add "savetitle.png"

screen load:
    key "l" action Return()
    # This ensures that any other menu screen is replaced.
    tag menu

    use file_picker
    add "loadtitle.png"

init -2 python:
    style.file_picker_frame = Style(style.menu_frame)

    style.file_picker_nav_button = Style(style.small_button)
    style.file_picker_nav_button_text = Style(style.small_button_text)
    

    style.file_picker_button = Style(style.large_button)
    style.file_picker_text = Style(style.large_button_text)
    config.thumbnail_width = 192
    config.thumbnail_height = 143
    

##############################################################################
# Preferences
#
# Screen that allows the user to change the preferences.
# http://www.renpy.org/doc/html/screen_special.html#prefereces
    
screen preferences:

    tag menu

    # Include the navigation.
    use navigation

    # Put the navigation columns in a three-wide grid.
    grid 3 1:
        style_group "prefs"
        xfill True

        # The left column.
        vbox:
            frame:
                style_group "pref"
                has vbox

                label _("Display")
                textbutton _("Window") action Preference("display", "window")
                textbutton _("Fullscreen") action Preference("display", "fullscreen")

            frame:
                style_group "pref"
                has vbox

                label _("Transitions")
                textbutton _("All") action Preference("transitions", "all")
                textbutton _("None") action Preference("transitions", "none")

            frame:
                style_group "pref"
                has vbox

                label _("Text Speed")
                bar value Preference("text speed")

            frame:
                style_group "pref"
                has vbox

                textbutton _("Joystick...") action ShowMenu("joystick_preferences")

        vbox:
            frame:
                style_group "pref"
                has vbox

                label _("Skip")
                textbutton _("Seen Messages") action Preference("skip", "seen")
                textbutton _("All Messages") action Preference("skip", "all")

            frame:
                style_group "pref"
                has vbox

                textbutton _("Begin Skipping") action Skip()

            frame:
                style_group "pref"
                has vbox

                label _("After Choices")
                textbutton _("Stop Skipping") action Preference("after choices", "stop")
                textbutton _("Keep Skipping") action Preference("after choices", "skip")

            frame:
                style_group "pref"
                has vbox

                label _("Auto-Forward Time")
                bar value Preference("auto-forward time")

        vbox:
            frame:
                style_group "pref"
                has vbox

                label _("Music Volume")
                bar value Preference("music volume")

            frame:
                style_group "pref"
                has vbox

                label _("Sound Volume")
                bar value Preference("sound volume")

                if config.sample_sound:
                    textbutton "Test":
                        action Play("sound", config.sample_sound)
                        style "soundtest_button"

            frame:
                style_group "pref"
                has vbox

                label _("Voice Volume")
                bar value Preference("voice volume")

                if config.sample_voice:
                    textbutton "Test":
                        action Play("voice", config.sample_voice)
                        style "soundtest_button"

init -2 python:
    
    style.pref_frame.xfill = True
    style.pref_frame.xmargin = 5
    style.pref_frame.top_margin = 5

    style.pref_vbox.xfill = True

    style.pref_button.size_group = "pref"
    style.pref_button.xalign = 1.0

    style.pref_slider.xmaximum = 192
    style.pref_slider.xalign = 1.0

    style.soundtest_button.xalign = 1.0


##############################################################################
# Yes/No Prompt
#
# Screen that asks the user a yes or no question.
# http://www.renpy.org/doc/html/screen_special.html#yesno-prompt
    
screen yesno_prompt:
# Yes/No Prompt
    
    modal True

    imagemap:
        ground 'AIyesnohit.png' # Background image
        idle 'AIyesnoidle.png' 
        hover 'AIyesnohover.png'
        selected_idle "AIyesnohit.png"
        selected_hover "AIyesnohit.png"
        
        hotspot (195, 200, 92, 49) action yes_action
        hotspot (528, 199, 92, 49) action no_action 

    #text _(message):
        #xalign 0.5
        #yalign 0.5

    if message == layout.ARE_YOU_SURE:
        add "areyousure.png"
        
    elif message == layout.DELETE_SAVE:
        add "areyousure.png"
        
    elif message == layout.OVERWRITE_SAVE:
        add "areyousure.png"
        
    elif message == layout.LOADING:
        add "areyousure.png"
        
    elif message == layout.QUIT:
        add "areyousure.png"
        
    elif message == layout.MAIN_MENU:
        add "areyousure.png" 

apricotorange
Veteran
Posts: 479
Joined: Tue Jun 05, 2012 2:01 am
Contact:

Re: A little help with textboxes and imagemaps?

#2 Post by apricotorange » Tue May 14, 2013 7:06 pm

For your first question, the default style for the narrator's text is "style.say_thought", and the default style for other characters' text is "style.say_dialogue". The theme you're using customizes one, but not the other, for reasons I don't understand. To make the text white, you can just write "style.say_dialogue.color='#FFF'" in your options.rpy.

For your second question, imagemaps don't have an "activate_sound" style property; hotspots do.

User avatar
madocallie
Regular
Posts: 44
Joined: Tue May 14, 2013 1:57 am
Completed: Bad Faith (DEMO), When We First Met, Party Favors
Projects: Bad Faith (Full Release)
itch: madocallie
Location: UK
Discord: madocallie#2937
Contact:

Re: A little help with textboxes and imagemaps?

#3 Post by madocallie » Wed May 15, 2013 1:55 am

Thank you! ^u^

The sound with imagemaps is working now. uvu

Although there's something bugging me with the text colour.

Whilst it turns white, as I wanted, the text looks a little odd.

Image

The kind of text I'm looking for in my game is this

Image

What do I need to do to change it to be this way? ono

apricotorange
Veteran
Posts: 479
Joined: Tue Jun 05, 2012 2:01 am
Contact:

Re: A little help with textboxes and imagemaps?

#4 Post by apricotorange » Wed May 15, 2013 1:59 am

Code: Select all

    style.say_dialogue.outlines = []

User avatar
madocallie
Regular
Posts: 44
Joined: Tue May 14, 2013 1:57 am
Completed: Bad Faith (DEMO), When We First Met, Party Favors
Projects: Bad Faith (Full Release)
itch: madocallie
Location: UK
Discord: madocallie#2937
Contact:

Re: A little help with textboxes and imagemaps?

#5 Post by madocallie » Wed May 15, 2013 2:14 am

Ah, I tried using that code, but this error appeared when I attempted to launch my game.

Code: Select all

I'm sorry, but an uncaught exception occurred.

After initialization, but before game start.
IndexError: string index out of range


apricotorange
Veteran
Posts: 479
Joined: Tue Jun 05, 2012 2:01 am
Contact:

Re: A little help with textboxes and imagemaps?

#6 Post by apricotorange » Wed May 15, 2013 3:02 pm

I think that error is unrelated. A quick search shows http://lemmasoft.renai.us/forums/viewto ... e+#p241159 ; if that isn't it, can you please include the complete text of the error message? (The traceback is important.)

User avatar
madocallie
Regular
Posts: 44
Joined: Tue May 14, 2013 1:57 am
Completed: Bad Faith (DEMO), When We First Met, Party Favors
Projects: Bad Faith (Full Release)
itch: madocallie
Location: UK
Discord: madocallie#2937
Contact:

Re: A little help with textboxes and imagemaps?

#7 Post by madocallie » Wed May 15, 2013 3:38 pm

Code: Select all

I'm sorry, but an uncaught exception occurred.

After initialization, but before game start.
IndexError: string index out of range

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "/Users/madocallie/Downloads/renpy-6.15.2-sdk 2/renpy/bootstrap.py", line 254, in bootstrap
    renpy.main.main()
  File "/Users/madocallie/Downloads/renpy-6.15.2-sdk 2/renpy/main.py", line 283, in main
    renpy.style.build_styles()
  File "/Users/madocallie/Downloads/renpy-6.15.2-sdk 2/renpy/style.py", line 661, in build_styles
    build_style(s)
  File "/Users/madocallie/Downloads/renpy-6.15.2-sdk 2/renpy/style.py", line 632, in build_style
    my_updates.extend(expand_properties(p))
  File "/Users/madocallie/Downloads/renpy-6.15.2-sdk 2/renpy/style.py", line 517, in expand_properties
    newval = func(val)
  File "/Users/madocallie/Downloads/renpy-6.15.2-sdk 2/renpy/style.py", line 93, in expand_outlines
    rv.append((i[0], renpy.easy.color(i[1]), i[2], i[3]))
IndexError: string index out of range

Darwin-10.7.0-i386-64bit
Ren'Py 6.15.2.281
AIstuck 0.0
Here's the code with the traceback!

apricotorange
Veteran
Posts: 479
Joined: Tue Jun 05, 2012 2:01 am
Contact:

Re: A little help with textboxes and imagemaps?

#8 Post by apricotorange » Thu May 16, 2013 12:26 am

That shouldn't be possible if you're using the code I gave you... can you copy-paste the exact line you're using to set the outlines?

User avatar
madocallie
Regular
Posts: 44
Joined: Tue May 14, 2013 1:57 am
Completed: Bad Faith (DEMO), When We First Met, Party Favors
Projects: Bad Faith (Full Release)
itch: madocallie
Location: UK
Discord: madocallie#2937
Contact:

Re: A little help with textboxes and imagemaps?

#9 Post by madocallie » Thu May 16, 2013 1:36 am

Code: Select all

  #########################################
    ## These let you customize the default font used for text in Ren'Py.

    ## The file containing the default font.
    style.say_dialogue.color = "#FFF"
    style.default.font = "Comfortaa_Regular.ttf"
    style.say_who_window.font = "Comfortaa_Regular.ttf"
    style.say_dialogue.outlines = "#FFF"
    
    

    ## The default size of text.

    style.default.size = 24
    

    ## Note that these only change the size of some of the text. Other
    ## buttons have their own styles.
    
Here you go. uvu
Image

apricotorange
Veteran
Posts: 479
Joined: Tue Jun 05, 2012 2:01 am
Contact:

Re: A little help with textboxes and imagemaps?

#10 Post by apricotorange » Thu May 16, 2013 1:57 am

Code: Select all

    style.say_dialogue.outlines = "#FFF"
This isn't valid syntax for the outlines property. Use the following, exactly as-is:

Code: Select all

    style.say_dialogue.outlines = []

User avatar
madocallie
Regular
Posts: 44
Joined: Tue May 14, 2013 1:57 am
Completed: Bad Faith (DEMO), When We First Met, Party Favors
Projects: Bad Faith (Full Release)
itch: madocallie
Location: UK
Discord: madocallie#2937
Contact:

Re: A little help with textboxes and imagemaps?

#11 Post by madocallie » Thu May 16, 2013 2:07 am

Oh, thank you so much! ^u^

It works perfectly!
Image

Post Reply

Who is online

Users browsing this forum: No registered users