Defining speed and size of character text

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
User avatar
kalechips
Newbie
Posts: 7
Joined: Thu Nov 01, 2018 10:09 pm
Completed: Midnight on the Milky Way, Melting of the Winter Gears, and a bunch more :))
Projects: something with a ghost innit
Organization: Masked Circle
itch: kalechips
Location: Moonside
Contact:

Defining speed and size of character text

#1 Post by kalechips »

Hiya guys! I'm sure there's somethng around here that's just what I need, but I haven't found it yet. Basically, I'm trying to make it so when each character speaks there is a different styling of text. For example, if I want Kuzu to speak, I want his text slow and small, but if I want Dojima to speak, his text is super fast and big. I could just use the {size=+10}Bigger{/size} tags and all, but that would be ridiculous to do.
Originally I thought it would be like

Code: Select all

define k = Character("KOWARETA SHITA", size == 15, cps = 10)
or so, but it didn't work out. I thought it would be similar to the color thing, so perhaps I have the wrong labels?
I'm like 100% there's already a thing out there for this, so if it exist, couldya help me find it? Thank you very much.
Image A ghostly game dev who forgot how to sleep.Image

User avatar
IrinaLazareva
Veteran
Posts: 399
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy
Organization: SunShI
Location: St.Petersburg, Russia
Contact:

Re: Defining speed and size of character text

#2 Post by IrinaLazareva »

I don't know about the speed of the text, but the size and other style elements are set with who_, what_ and window_ arguments:

Code: Select all

define k = Character("KOWARETA SHITA", what_size = 15)
https://renpy.org/doc/html/dialogue.htm ... #Character

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: Defining speed and size of character text

#3 Post by isobellesophia »

kalechips wrote: Thu Sep 12, 2019 3:23 pm Hiya guys! I'm sure there's somethng around here that's just what I need, but I haven't found it yet. Basically, I'm trying to make it so when each character speaks there is a different styling of text. For example, if I want Kuzu to speak, I want his text slow and small, but if I want Dojima to speak, his text is super fast and big. I could just use the {size=+10}Bigger{/size} tags and all, but that would be ridiculous to do.
Originally I thought it would be like

Code: Select all

define k = Character("KOWARETA SHITA", size == 15, cps = 10)
or so, but it didn't work out. I thought it would be similar to the color thing, so perhaps I have the wrong labels?
I'm like 100% there's already a thing out there for this, so if it exist, couldya help me find it? Thank you very much.

Might as well looking for this?
(got from another post.)

viewtopic.php?t=42854#p446063
I am a friendly user, please respect and have a good day.


Image

Image


User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: Defining speed and size of character text

#4 Post by namastaii »

slow_cps - int or True
If a number, shows text at the rate of that many characters per second. If True, shows text at the speed taken from the "Text Speed" preference.

slow_cps_multiplier - float
The speed of the text is multiplied by this number. This can be used to have a character that speaks at a faster-than-normal rate of speed.

Code: Select all

define k = Character("KOWARETA SHITA", what_size=15, what_slow_cps=10)
Also note, you have == in there which is only used to check if something is equal to that value. Use only one = to assign the value.

User avatar
kalechips
Newbie
Posts: 7
Joined: Thu Nov 01, 2018 10:09 pm
Completed: Midnight on the Milky Way, Melting of the Winter Gears, and a bunch more :))
Projects: something with a ghost innit
Organization: Masked Circle
itch: kalechips
Location: Moonside
Contact:

Re: Defining speed and size of character text

#5 Post by kalechips »

Thank you very much! This is all very helpful. I'll keep in mind about == stuff as well.
Image A ghostly game dev who forgot how to sleep.Image

Post Reply

Who is online

Users browsing this forum: No registered users