How do I set character name sideways?

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
renboo
Newbie
Posts: 4
Joined: Thu Aug 10, 2017 5:00 pm
Contact:

How do I set character name sideways?

#1 Post by renboo »

Sorry if this is a silly question. Recently I've been trying to recreate the UI of Danganronpa 2. Here is a link to the example:

http://media.diehardgamefan.com/wp-cont ... R2sc02.jpg

As you can see, the characters name is off to the side sideways, while the chat remains horizontal at the bottom. I looked up the guides and I know there is a horiz and vert style option, but I can't find where I would put that in the script files. I thought maybe it would go in the GUI script, but I don't know the right location for it.

So my question is, how do I change the characters name to go sideways?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3799
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: How do I set character name sideways?

#2 Post by Imperf3kt »

In all honesty, you are probably better off making it an image and showing that image on the front-most layer or make it part of the say window than trying to rotate text.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

renboo
Newbie
Posts: 4
Joined: Thu Aug 10, 2017 5:00 pm
Contact:

Re: How do I set character name sideways?

#3 Post by renboo »

Imperf3kt wrote: Thu Aug 10, 2017 5:37 pm In all honesty, you are probably better off making it an image and showing that image on the front-most layer or make it part of the say window than trying to rotate text.
Thank you for that! Luckily for me I found a sprite sheet with the character names all lined up sideways, so it's win win!

How exactly can I remove the character name entirely now? When my character has text, their name appears at the top in a large font still. How exactly do I remove that?

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: How do I set character name sideways?

#4 Post by Remix »

Screens.rpy
Find screen say( and tweak away...

remove the if who is not None block (or comment out), or try rotate on the actual text

Code: Select all

transform sideways:
    rotate 270

screen say(who, what):
    style_prefix "say"

    window:
        id "window"

        if who is not None:

            window:
                style "namebox"
                text who id "who" at sideways

        text what id "what"
Frameworks & Scriptlets:

renboo
Newbie
Posts: 4
Joined: Thu Aug 10, 2017 5:00 pm
Contact:

Re: How do I set character name sideways?

#5 Post by renboo »

Remix wrote: Thu Aug 10, 2017 6:43 pm Screens.rpy
Find screen say( and tweak away...

remove the if who is not None block (or comment out), or try rotate on the actual text

Code: Select all

transform sideways:
    rotate 270

screen say(who, what):
    style_prefix "say"

    window:
        id "window"

        if who is not None:

            window:
                style "namebox"
                text who id "who" at sideways

        text what id "what"
Thank you! This is exactly what I was looking for :)

Out of curiosity, if I did want to have it so that an image of the characters name appeared each time each character talked, would that be reasonably possible, or would it require showing and hiding the image manually each time a new person talked?

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: How do I set character name sideways?

#6 Post by Remix »

As the say statement includes a 'who' part of it and both are passed to the screen say(), you could reasonably easily swap in an image based on the characters .name... something like

Code: Select all

screen say(who, what):
    style_prefix "say"

    window:
        id "window"

        # this is where we show the 'who' part of the say statement
        if who is not None:
            window:
                # something like this... untested though
                # renpy should see [who] and convert it to the name, so e.g. images/Eileen.png
                add image "images/[who].png"

        # this is the actual spoken text
        text what id "what"
Frameworks & Scriptlets:

Post Reply

Who is online

Users browsing this forum: Stampaw