Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC, and wiki.
Activation problem? Email [email protected]
It is currently Fri May 24, 2013 7:07 am

All times are UTC - 5 hours [ DST ]


Forum rules


Ask questions about one topic per thread, and use a descriptive subject. "NotImplemented error in script.rpy" is a good subject, "Tom's problems" is not. Remember to include all of traceback.txt or error.txt when reporting a problem, as well as the relevant lines of script. Use the [code] tag to format scripts.



Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Tue Jul 31, 2012 5:32 pm 
Newbie
User avatar

Joined: Tue Jul 31, 2012 5:28 pm
Posts: 5
Projects: Dreamcloud
So I was wondering if there was any way I could code a working textbox that comes up in different locations on the screen, rather than just at the bottom. I wanted it to move around and act like a comic book dialogue bubble, but I'm a newbie, so I have no idea how to do this. Anybody got any ideas, or know how to do this efficiently?


Top
 Profile Send private message  
 
PostPosted: Tue Jul 31, 2012 5:48 pm 
Regular
User avatar

Joined: Mon Jul 30, 2012 6:02 pm
Posts: 67
http://www.renpy.org/doc/html/style.html

Style properties are probably what you are looking for. It may seem a bit daunting at first, but don't get discouraged.


Top
 Profile Send private message  
 
PostPosted: Tue Jul 31, 2012 5:53 pm 
Eileen-Class Veteran
User avatar

Joined: Thu Oct 14, 2010 3:53 am
Posts: 1070
Location: NC, USA
Completed: Torrey & the Vampire, Faery Tale, Madaline's Missing Miscellany, Alchemical Ink, Yaoi Story, The Visitor, Erotic Story Generator, What Kind of Fiction Should YOU Write? (Quiz Game), Falling
Organization: Erotic Visions - VNs
Horrorroll wrote:
So I was wondering if there was any way I could code a working textbox that comes up in different locations on the screen, rather than just at the bottom. I wanted it to move around and act like a comic book dialogue bubble, but I'm a newbie, so I have no idea how to do this. Anybody got any ideas, or know how to do this efficiently?

Try this TextBox tutorial. It may point you in the direction you're looking for.
viewtopic.php?f=51&t=9233

_________________
Ookami Kasumi ~ Purveyor of fine Smut.
Erotic Visions ~ Visual Novels

"No amount of great animation will save a bad story." -- John Lasseter of Pixar


Top
 Profile Send private message  
 
PostPosted: Tue Jul 31, 2012 9:04 pm 
Newbie
User avatar

Joined: Tue Jul 31, 2012 5:28 pm
Posts: 5
Projects: Dreamcloud
Thanks, I've been over the text box tutorial's before, I guess I'll try messing around with the x and y anchors, see if I can get it to move.


Top
 Profile Send private message  
 
PostPosted: Tue Jul 31, 2012 10:12 pm 
Eileen-Class Veteran
User avatar

Joined: Thu Oct 14, 2010 3:53 am
Posts: 1070
Location: NC, USA
Completed: Torrey & the Vampire, Faery Tale, Madaline's Missing Miscellany, Alchemical Ink, Yaoi Story, The Visitor, Erotic Story Generator, What Kind of Fiction Should YOU Write? (Quiz Game), Falling
Organization: Erotic Visions - VNs
Horrorroll wrote:
Thanks, I've been over the text box tutorial's before, I guess I'll try messing around with the x and y anchors, see if I can get it to move.

Another thing you can do is simply put the textbox where you want it by making it into a png the same size as your game, then merely adjust the padding for the text.

For example:
Attachment:
File comment: from Alchemical Ink
textbox2.png
textbox2.png [ 432.48 KiB | Viewed 296 times ]

The image is 1024x768, the size of my game, however the entire left side is transparent.

This is the code I used.

In Options:
Code:
    ## ------- Novel Mode ------------------------
init:
    style.nvl_window.background = Frame("textbox2.png", 0, 0)
    style.nvl_vbox.box_spacing = 10
    menu = nvl_menu

    config.window_hide_transition = dissolve
    config.window_show_transition = dissolve

In Script:
Code:
init:
    define narrator = Character(None,
                kind=nvl,
                window_left_margin = 520, #520 pixels to the Right
                window_right_margin = 5, #5 px to the Left
                ctc="ctc_blink", )


The results looks like this:
Attachment:
AI_07.jpg
AI_07.jpg [ 306.56 KiB | Viewed 295 times ]

By doing it this way, you can have a textbox literally anywhere you like, and even have different textboxes in different locations assigned to different characters.

_________________
Ookami Kasumi ~ Purveyor of fine Smut.
Erotic Visions ~ Visual Novels

"No amount of great animation will save a bad story." -- John Lasseter of Pixar


Top
 Profile Send private message  
 
PostPosted: Wed Aug 01, 2012 11:16 pm 
Newbie
User avatar

Joined: Tue Jul 31, 2012 5:28 pm
Posts: 5
Projects: Dreamcloud
Thanks! I'll give that a shot. I want to do it in adv though so the text box only takes up a box and not the whole side of the screen. I could just mess with the sizes though. Appreciate it.


Top
 Profile Send private message  
 
PostPosted: Thu Aug 02, 2012 3:33 pm 
Eileen-Class Veteran
User avatar

Joined: Thu Oct 14, 2010 3:53 am
Posts: 1070
Location: NC, USA
Completed: Torrey & the Vampire, Faery Tale, Madaline's Missing Miscellany, Alchemical Ink, Yaoi Story, The Visitor, Erotic Story Generator, What Kind of Fiction Should YOU Write? (Quiz Game), Falling
Organization: Erotic Visions - VNs
Horrorroll wrote:
Thanks! I'll give that a shot. I want to do it in adv though so the text box only takes up a box and not the whole side of the screen. I could just mess with the sizes though. Appreciate it.

By taking advantage of the versatility of nvl mode, you can put your box anywhere, or not even use a box. The trick is that you Must use "nvl clear" at the end of every dialogue line.
Attachment:
File comment: This is Novel Mode.
NvlOval.jpg
NvlOval.jpg [ 286.4 KiB | Viewed 253 times ]

The game is 1024x768
In Script:
Code:
define sh = Character('Shino',
    color="9966cc",
    kind=nvl,
    ctc="ctc_blink",)

in Options:
Code:
    style.nvl_window.background = "textbox3.png"
   
    style.nvl_window.left_padding = 315
    style.nvl_window.right_padding = 50
    style.nvl_window.top_padding = 100
    style.nvl_window.bottom_padding = 435
   
    style.nvl_window.left_margin = 0
    style.nvl_window.right_margin = 0
    style.nvl_window.top_margin = 0
    style.nvl_window.bottom_margin = 0

in script:
Code:
label start:
    scene bg_okinawa with fade
    show shino at left with dissolve
    sh "Hi, I'm Shino and I live in Okinawa. Like my textbox? I sure do! Amazing what Renpy can do, ne?"
    nvl clear
    sh "Sayonara!"
    nvl clear
   
    scene black with fade
    return

_________________
Ookami Kasumi ~ Purveyor of fine Smut.
Erotic Visions ~ Visual Novels

"No amount of great animation will save a bad story." -- John Lasseter of Pixar


Top
 Profile Send private message  
 
PostPosted: Fri Aug 03, 2012 8:53 am 
Ren'Py Creator
User avatar

Joined: Mon Feb 02, 2004 10:58 am
Posts: 10778
Location: Kings Park, NY
Completed: Moonlight Walks
Projects: Ren'Py
You could to the same thing with ADV mode - and probably easier.

_________________
Another Old-Fashioned Bishoujo Gamer
Supporting creators since 2004; Code > Drama
(When was the last time you backed up your game?)
"It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face in marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming" - Theodore Roosevelt


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Kessie


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group