Changing the dialog box

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.
Message
Author
Gouka
Regular
Posts: 66
Joined: Thu Feb 01, 2007 1:24 pm
Projects: Demon Wraith
Contact:

Changing the dialog box

#1 Post by Gouka » Sat Jul 28, 2007 2:15 pm

Can I change the dialog box that the game has for one that is custom made? If it possible which the height of the box?
Check the Chaos Lord development at http://atelieredgeproductions.wordpress.com

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

Re: Changing the dialog box

#2 Post by DaFool » Sat Jul 28, 2007 10:18 pm

After creating a new project, see the following in your options.rpy file

Code: Select all

        #########################################
        ## 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.window.background = Frame("frame.png", 12, 12)
When you have made your own frame.png, you can remove the comment-outs the of the relevant lines. It's suggested you make the frame.png slightly larger, so that you don't need to worry too much about exact sizing and let the frame stretch to fill in additional space. You can change the size through the other options in the file, or set them when you declare the character to use this textbox.

Gouka
Regular
Posts: 66
Joined: Thu Feb 01, 2007 1:24 pm
Projects: Demon Wraith
Contact:

Re: Changing the dialog box

#3 Post by Gouka » Sun Jul 29, 2007 1:50 am

What do you mean by declaring the character? I am really new to all this game developing business.
Check the Chaos Lord development at http://atelieredgeproductions.wordpress.com

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

Re: Changing the dialog box

#4 Post by DaFool » Sun Jul 29, 2007 7:55 am

Code: Select all

$ e = Character('Eileen', color="#c8ffc8", window_left_padding=20)
It's best to examine the script for a simple game such as The Question, and experiment from there.

Gouka
Regular
Posts: 66
Joined: Thu Feb 01, 2007 1:24 pm
Projects: Demon Wraith
Contact:

Re: Changing the dialog box

#5 Post by Gouka » Sun Jul 29, 2007 11:30 am

Now I have a question. Where do you place the image for the new dialog box?
Check the Chaos Lord development at http://atelieredgeproductions.wordpress.com

User avatar
PyTom
Ren'Py Creator
Posts: 15663
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Changing the dialog box

#6 Post by PyTom » Sun Jul 29, 2007 11:34 am

Like all images, in the game directory.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

Gouka
Regular
Posts: 66
Joined: Thu Feb 01, 2007 1:24 pm
Projects: Demon Wraith
Contact:

Re: Changing the dialog box

#7 Post by Gouka » Sun Jul 29, 2007 11:52 am

Then I must be doing something wrong since the dialog box I created doesn't appear.
Check the Chaos Lord development at http://atelieredgeproductions.wordpress.com

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

Re: Changing the dialog box

#8 Post by DaFool » Sun Jul 29, 2007 2:59 pm

Did you call it "frame.png" and remember to uncomment-out this line

Code: Select all

style.window.background = Frame("frame.png", 12, 12)

Gouka
Regular
Posts: 66
Joined: Thu Feb 01, 2007 1:24 pm
Projects: Demon Wraith
Contact:

Re: Changing the dialog box

#9 Post by Gouka » Sun Jul 29, 2007 5:36 pm

I did name it "Frame" and I also uncommented the command for the frame but the nothing appears yet. Can you tell me the
height in pixels that the dialog box should have?
Check the Chaos Lord development at http://atelieredgeproductions.wordpress.com

Gouka
Regular
Posts: 66
Joined: Thu Feb 01, 2007 1:24 pm
Projects: Demon Wraith
Contact:

Re: Changing the dialog box

#10 Post by Gouka » Sun Jul 29, 2007 9:20 pm

Finally I managed to change the dialog box but a different project. However, on the one that I am currently working on it doesn't work at all. Is this some sort of bug?
Check the Chaos Lord development at http://atelieredgeproductions.wordpress.com

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

Re: Changing the dialog box

#11 Post by DaFool » Sun Jul 29, 2007 10:31 pm

Gouka wrote:Is this some sort of bug?
Hmmm... the only thing I can think of is if there are multiple options.rpy files (or more rpy script files or rpyc files than are necessary). As for standard textbox height, I had the exact number at some point... have to fire up the demo and count the pixels, lol. In any case, your textbox should be able to stretch to fill in any empty space.

User avatar
Enerccio
Miko-Class Veteran
Posts: 616
Joined: Thu Oct 26, 2006 4:23 pm
Projects: My Teacher; Songs of Araiah; Something new; Possible Cross Bomber?
Location: Slovakia, Kosice
Contact:

Re: Changing the dialog box

#12 Post by Enerccio » Mon Jul 30, 2007 9:56 am

Gouka wrote:I did name it "Frame" and I also uncommented the command for the frame but the nothing appears yet. Can you tell me the
height in pixels that the dialog box should have?
uh oh, double check if you named it really

Code: Select all

frame
because renpy IS case sensitive, so

Code: Select all

Frame
is not the same as

Code: Select all

frame
Image
http://www.bishojo.tk is technically ONLINE!
Songs of Araiah promo: http://www.youtube.com/watch?v=CalchucuoDU

Hahastupidmonkey
Newbie
Posts: 8
Joined: Thu Aug 20, 2009 3:14 pm
Contact:

Re: Changing the dialog box

#13 Post by Hahastupidmonkey » Sun Aug 23, 2009 12:56 am

How exactly am i suposed to get my custom dialog box in.when i un comment the frame i get an error.what exactly am i supposed to do.

User avatar
JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Changing the dialog box

#14 Post by JQuartz » Sun Aug 23, 2009 8:53 am

Hahastupidmonkey wrote:what exactly am i supposed to do.
1. Rename Frame.png as frame.png.
2. Paste this at the very top of your script.rpy:

Code: Select all

init 99:
    $ style.window.background = Frame("frame.png", 12, 12)     
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Hahastupidmonkey
Newbie
Posts: 8
Joined: Thu Aug 20, 2009 3:14 pm
Contact:

Re: Changing the dialog box

#15 Post by Hahastupidmonkey » Sun Aug 23, 2009 10:27 pm

I was wondering how do i size out my text box so there is no white and the image is not squsshed. when i use this as a fram it gets smashed. i just want were the cupake begans to be the edge of the text box.
Attachments
DiologBox.jpg
my text box.

Post Reply

Who is online

Users browsing this forum: Jacksono