noob problem with dialogue 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.
Post Reply
Message
Author
shahab96
Veteran
Posts: 228
Joined: Mon May 24, 2010 5:40 am
Location: Lahore, Pakistan
Contact:

noob problem with dialogue box

#1 Post by shahab96 »

The title explains the problem.

Code: Select all

$ M = Character('Mint',color="#6496c8",xpos=25, ypos=0, bold=False,window_left_padding=135,show_side_image=Image("images/InGame buttons/pabtn02.t32.png", xpos=4, ypos=4))
Theres my code and heres a screenshot
screenshot001
screenshot001
The text overlaps the right end of the dialogue box and continues out the window and the side image (that small upward pointing arrow at the top right of the screen) isn't supposed to be there since the coordinates are the ones from a screenshot of what the screen should look like in which the side image is inside that little rectangle thing next to the dialogue box.
The true measure of a man is what he does with his power.

Strum
Veteran
Posts: 215
Joined: Mon Sep 28, 2009 10:38 am
Contact:

Re: noob problem with dialogue box

#2 Post by Strum »

You didn't apply padding to your text box. The padding on the character definition tells renpy where to start from but nothing tells renpy when to start a new line.

On a side note, I already submitted a perfectly working textbox code for sabre's Galaxy Angel game. So why is he getting you to do it again?
Last edited by Strum on Tue Jun 29, 2010 10:57 am, edited 2 times in total.
Image

shahab96
Veteran
Posts: 228
Joined: Mon May 24, 2010 5:40 am
Location: Lahore, Pakistan
Contact:

Re: noob problem with dialogue box

#3 Post by shahab96 »

ok....so what code should I use and what about the side image?
Edit: forget it, I'll just take it from your code. Thanks :)
Last edited by shahab96 on Tue Jun 29, 2010 11:02 am, edited 1 time in total.
The true measure of a man is what he does with his power.

Strum
Veteran
Posts: 215
Joined: Mon Sep 28, 2009 10:38 am
Contact:

Re: noob problem with dialogue box

#4 Post by Strum »

You might want to read over my previous post on his project. It clearly explains how the code should be done and what values to change.
Image

shahab96
Veteran
Posts: 228
Joined: Mon May 24, 2010 5:40 am
Location: Lahore, Pakistan
Contact:

Re: noob problem with dialogue box

#5 Post by shahab96 »

uhh...dude, I copy pasted the code and then modyfied it.
The true measure of a man is what he does with his power.

User avatar
kuroi
Regular
Posts: 129
Joined: Fri Jun 29, 2007 10:50 am
Location: Albuquerque, New Mexico, USA
Contact:

Re: noob problem with dialogue box

#6 Post by kuroi »

Try something like this:

Code: Select all

init python:
    # Give us some space on the right side of the screen.
    style.window.right_padding = 20
President, Planner, and Programmer for Kuroi Games!

Strum
Veteran
Posts: 215
Joined: Mon Sep 28, 2009 10:38 am
Contact:

Re: noob problem with dialogue box

#7 Post by Strum »

.............this may sound insulting but it seems I need to spell it out to you what you need to do. And I wanted you to at least figure out the numbers by yourself after supplying you with the code.


init -1 python hide:
style.window.left_margin = 15
style.window.right_margin= 30
style.window.top_margin = 12

style.window.left_padding = 130
style.window.right_padding= 30
style.window.top_padding = 10


As for your question regarding side images...

init:
define M = Character('Mint',color="#ffffff",xpos=30, ypos=-5, bold=False, window_left_padding=130, show_side_image=Image("face.png", xpos=20, ypos=345), ctc = ctcicon, ctc_position = "fixed")


I trust this is easy enough to understand.
Last edited by Strum on Tue Jun 29, 2010 11:32 am, edited 1 time in total.
Image

User avatar
kuroi
Regular
Posts: 129
Joined: Fri Jun 29, 2007 10:50 am
Location: Albuquerque, New Mexico, USA
Contact:

Re: noob problem with dialogue box

#8 Post by kuroi »

Strum's answer is way better~ You should go with that instead~
President, Planner, and Programmer for Kuroi Games!

shahab96
Veteran
Posts: 228
Joined: Mon May 24, 2010 5:40 am
Location: Lahore, Pakistan
Contact:

Re: noob problem with dialogue box

#9 Post by shahab96 »

....lol....
The reason I'm asking is because it's not working.
I'm gonna upload the game and give you the link.

Edit: Oh yeah it's like 550 Mb so this'll take a while.
Nevermind, I was just doing something really stupid that I'm not going to talk about on account of being embarrassed by it's stupidity........
:oops:

EditEdit: Ok....it still doesn't work.....I'll give you the link to the game when it's done uploading (the short version)
The true measure of a man is what he does with his power.

Strum
Veteran
Posts: 215
Joined: Mon Sep 28, 2009 10:38 am
Contact:

Re: noob problem with dialogue box

#10 Post by Strum »

I've looked at your code and I can say with certainty, it does work. Your problem is you have your character saying something like "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk" as one word. Renpy doesn't break words up to fit inside the textbox. Try making you character say "She sells seashells on the seashore, she sells sea shells on the seashore." This time you'll see that the code has been working all along.

PS I loved the little remarks you left on your code, it gave me a good laugh. I'd like to point out I never used side images either, since the game I'm working on doesn't use any. The only game I'm working on is in my signature
Image

shahab96
Veteran
Posts: 228
Joined: Mon May 24, 2010 5:40 am
Location: Lahore, Pakistan
Contact:

Re: noob problem with dialogue box

#11 Post by shahab96 »

ok. Also, about the map, it's actually up to date....well it was until abut half an hour ago....now I have made a new and improved map system. (The one in the game I gave you was just to see if the buttons actually worked. It is the same for the new one since I have no idea which room is what so I have just tried to make everything as efficient and easily customisable as possible so that when SaberXJ tells me what to do I can just tweak it a little bit.) Also, I still can't access the site. Is it working for you?
The true measure of a man is what he does with his power.

Strum
Veteran
Posts: 215
Joined: Mon Sep 28, 2009 10:38 am
Contact:

Re: noob problem with dialogue box

#12 Post by Strum »

Just went on and the site works fine for me. The last entry in the chatbox was made over 12 hours ago so you've not missed anything. Anway, try making you character say a proper sentance instead of one long word that takes up all the textbox.
Image

shahab96
Veteran
Posts: 228
Joined: Mon May 24, 2010 5:40 am
Location: Lahore, Pakistan
Contact:

Re: noob problem with dialogue box

#13 Post by shahab96 »

Yeah...thanks. The textbox works fine with that, but the site still wont open for me. hmm i wonder what's wrong. I even cleared my cache and all but it still wont open.
The true measure of a man is what he does with his power.

Post Reply

Who is online

Users browsing this forum: Google [Bot]