new to renpy, how to do multiple styles of dialouge boxes

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
mrmcscuseme
Newbie
Posts: 3
Joined: Mon Nov 27, 2023 9:52 pm
Contact:

new to renpy, how to do multiple styles of dialouge boxes

#1 Post by mrmcscuseme »

so im working on a choices fan project, which is a visual novel mobile game for anyone not aware. because of this, i want to mirror the style of the game, which means i need to have multiple sizes of dialouge boxes, but also ways to reposition it depending on the scene and character. for instance, heres some examples.

for narration, its a box in the middle of the screen, for main characters, who youre playing as, it's on the left side, and npcs, its right side. my two problems are 1: i've looked how to set like, different styles but im so new to renpy that it looks all just like gibberish. 2: the pov of the character changes scene to scene, so i dont know what i need to do but i assume at the start of each scene i'd assign the characters as npc or mc? or just have a diff character every time depending on pov? i hope this makes sense
Attachments
Screenshot (121).png
(1.06 MiB) Not downloaded yet
Screenshot (119).png
(1.01 MiB) Not downloaded yet
Screenshot (109).png
(706.42 KiB) Not downloaded yet

User avatar
m_from_space
Miko-Class Veteran
Posts: 888
Joined: Sun Feb 21, 2021 3:36 am
Contact:

Re: new to renpy, how to do multiple styles of dialouge boxes

#2 Post by m_from_space »

mrmcscuseme wrote: Mon Nov 27, 2023 10:16 pmor just have a diff character every time depending on pov? i hope this makes sense
It sounds useful to make different character objects depending on point of view, as long as any character image or different styles are associated with it.

Here is how you create characters and narration: https://www.renpy.org/doc/html/dialogue.html

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: new to renpy, how to do multiple styles of dialouge boxes

#3 Post by ISAWHIM »

This is how I setup some generic dialogue structures... This would go in the "script.rpy" file, near the top, above any dialogue displays.

Code: Select all

#Dialogue backgrounds
define bgnarr = Image("gui/textboxnarr.png")
define bgtitle = Image("gui/textboxtitle.png", xanchor=0.5, xpos=0.5, yanchor=0.0, ypos=0)
define bgnote = Image("gui/textboxnote.png", xanchor=0.5, xpos=0.5, yanchor=0.0, ypos=350)

#Non-character, character formats (First is the default "narrator")
define narrator = Character(None,
    window_background=bgnarr)

define NARRATOR = Character(None,
    window_background=bgnarr)

define TITLE = Character(what_font="DejaVuSans.ttf", what_color="#FCF79D", what_size=50, what_xanchor=0.5, what_xpos=0.5,
    what_yanchor=0.0, what_ypos=6, what_textalign=0.5, window_yalign=0.0,
    window_background=bgtitle)

define NOTE = Character(what_font="DejaVuSans.ttf", what_color="#222222", what_xsize=800, what_size=34,
    what_xanchor=0.5, what_justify=True, what_xpos=0.5, what_ypos=380,
    window_background=bgnote)
NOTE: These values are specific to MY setup... The values and settings you need, found at the prior posts LINK, will help you define your style.

NOTE: "narrator" is a built-in character that is sort-of hidden... Any dialogue without a specific "character", is spoken by the "narrator", which includes the typical "menu" dialogue. I have a specific "NARRATOR", which is MINE, which I use for an actual narrator, in the story. In some stories, that NARRATOR has a unique "style", different from the non-character dialogue of "narrator".

Post Reply

Who is online

Users browsing this forum: Ocelot