Changing speech bubble properties for a specific line of dialog

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
kaleidoscopic_kelvin
Newbie
Posts: 7
Joined: Wed Jan 31, 2024 11:26 pm

Changing speech bubble properties for a specific line of dialog

#1 Post by kaleidoscopic_kelvin »

I have the following character definition

Code: Select all

define hyd_s = Character(
    None
    , image="hyd"
    , kind=bubble
    , what_color="#80b847"
    , what_font = gui.hyd_font
    , what_bold = True
    , what_outlines = [ (absolute(0), "#000", absolute(2), absolute(2)) ]
    , window_xpos = 0.5
    , window_xanchor = 0.5
    , window_ypos = 0.66
    , window_yanchor = 0.5
    )
And my bubble.properties are

Code: Select all

define bubble.properties = {
    "default" : {
        "what_size" : 34
    }
    , "loud" : {
        "what_size" : 49
    }
    , "shout" : {
        "what_size" : 61
    }
}
So my question is, what do I pass to the bubble screen for it to change from "default" to "loud"?

Code: Select all

hyd_s "Everything ready?" (<what do I need to pass in here?>)
I know how to change it manually by accessing the Shift+B bubble editor, but I want to know if there was any way to specify it through the code itself?

Thanks in advance!

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2407
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Changing speech bubble properties for a specific line of dialog

#2 Post by Ocelot »

Properties are chosen within bubble editor (shift+B) and not from a script. They are stored within bubble database (bubble.json by default), so, if you want to edit something manually, you can go there.
< < insert Rick Cook quote here > >

kaleidoscopic_kelvin
Newbie
Posts: 7
Joined: Wed Jan 31, 2024 11:26 pm

Re: Changing speech bubble properties for a specific line of dialog

#3 Post by kaleidoscopic_kelvin »

I wanted to know if there was any way of not having to do it manually. Like maybe even pass some sort of flag to the bubble screen. I do have a workaround where I define a style in scripts.rpy and then pass the what_style directly.

Code: Select all

 hyd_s "Everything ready?" (what_style = "shout_voice")
But I was hoping to place these styles/properties within the bubble code and instead just have some way to inform the bubble screen to change them

Post Reply

Who is online

Users browsing this forum: No registered users