How to make a "character name" bold?

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
TheOtherNewGuy
Regular
Posts: 26
Joined: Wed Nov 16, 2016 2:53 am
Contact:

How to make a "character name" bold?

#1 Post by TheOtherNewGuy » Wed Nov 16, 2016 3:01 am

Sry if this has been asked many times, i'm in the middle of reading the renpy documentation from start to finish but i figured i ask.

I just recently updated renpy from 6.99.4 to 6.99.11. I started a new project and it seems that the names of characters above text is no longer bold. Also i think the way outlines and shadows are applied to text have changed as well. Anyone have this problem?

mard
Regular
Posts: 50
Joined: Thu Nov 03, 2016 3:38 am
Location: Standing right behind you.
Contact:

Re: How to make a "character name" bold?

#2 Post by mard » Wed Nov 16, 2016 3:31 am

This, https://www.renpy.org/doc/html/dialogue ... er-objects

and this, https://www.renpy.org/doc/html/style_pr ... properties

will give you your answer.

Heres an example of what it would look like

Code: Select all

define e = Character("Eileen", who_bold=False, who_italic=True, what_font="GenR102.ttf", what_prefix='"', what_suffix='"')
And heres the result

http://i.imgur.com/HgmkF3y.png

Image is too big to post so you'll have to open it in a seperate tab.

I set bold to False, if you set it to True it'll show up as bold.
Tend to be a bit quiet, but will help where I can.

Enjoy the drinks folks.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1919
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: How to make a "character name" bold?

#3 Post by Donmai » Wed Nov 16, 2016 12:33 pm

If you want all the characters names to be in bold letters, you can try:

Code: Select all

style say_label:
    bold True
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

TheOtherNewGuy
Regular
Posts: 26
Joined: Wed Nov 16, 2016 2:53 am
Contact:

Re: How to make a "character name" bold?

#4 Post by TheOtherNewGuy » Thu Nov 17, 2016 9:49 pm

@mard

thanks for the links. but it's amazing how I don't get a lot of code explanations, pretty much with every language I've tried to get into. I wish everything was more like. If you want to make a character name bold then type this. I'll keep looking this over and hope something clicks. do you need to have all those arguments filled for the effect to work? I tried define e = Character("Eileen", who_bold=True) but that threw me an error.

@donmai

thanks that seemed to work. If you feel like answering, is there a similar way to create outlines and shadows? (still in the middle of reading through the documentation.)

mard
Regular
Posts: 50
Joined: Thu Nov 03, 2016 3:38 am
Location: Standing right behind you.
Contact:

Re: How to make a "character name" bold?

#5 Post by mard » Thu Nov 17, 2016 10:17 pm

It's a lot to take in. When it comes to reading the documentation, read through what you're focusing on once, then step back and look over a few scripts. After that, come back after a day or two and read it again. Basically you want to let the information sink in, then look at it again. Doing it this way will save you a lot of stress.

At any rate, this

Code: Select all

define e = Character("Eileen", who_bold=True)
shouldn't return any errors. Just remember to put it in script.rpy, within an init block.

If you put it in screens.rpy, options.rpy, or gui.rpy it'll return an error.
Tend to be a bit quiet, but will help where I can.

Enjoy the drinks folks.

TheOtherNewGuy
Regular
Posts: 26
Joined: Wed Nov 16, 2016 2:53 am
Contact:

Re: How to make a "character name" bold?

#6 Post by TheOtherNewGuy » Fri Nov 18, 2016 12:48 am

mard wrote:It's a lot to take in. When it comes to reading the documentation, read through what you're focusing on once, then step back and look over a few scripts. After that, come back after a day or two and read it again. Basically you want to let the information sink in, then look at it again. Doing it this way will save you a lot of stress.

At any rate, this

Code: Select all

define e = Character("Eileen", who_bold=True)
shouldn't return any errors. Just remember to put it in script.rpy, within an init block.

If you put it in screens.rpy, options.rpy, or gui.rpy it'll return an error.
k ill be sure to do that. thanks for the reply. I'm also using renpy 6.99.11 if that matters.

Edit: tried it again. looks like that code works as well. maybe i made a typo before. Gonna look through the documentation for shadows and outlines now.

mard
Regular
Posts: 50
Joined: Thu Nov 03, 2016 3:38 am
Location: Standing right behind you.
Contact:

Re: How to make a "character name" bold?

#7 Post by mard » Fri Nov 18, 2016 2:44 am

For shadows and outlines, you'll want to look here. https://www.renpy.org/doc/html/style_pr ... y-outlines
Tend to be a bit quiet, but will help where I can.

Enjoy the drinks folks.

TheOtherNewGuy
Regular
Posts: 26
Joined: Wed Nov 16, 2016 2:53 am
Contact:

Re: How to make a "character name" bold?

#8 Post by TheOtherNewGuy » Fri Nov 18, 2016 3:56 am

mard wrote:For shadows and outlines, you'll want to look here. https://www.renpy.org/doc/html/style_pr ... y-outlines
Awesome. K the outline was pretty straight forward... phew. thanks for pointing me in the right direction.

If you wanted both an outline and a shadow, how would one write the code. I tried experimenting, but.... yeah.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1919
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: How to make a "character name" bold?

#9 Post by Donmai » Fri Nov 18, 2016 10:23 am

Something like

Code: Select all

define e = Character("Eileen", who_bold=True, who_outlines=[(1, "#000", 1, 1), (1, "#000", 0, 0)])
That will give you black outlines and a black shadow.
If you prefer to use style, which will affect all characters names in your game, then you would only add more style properties to the style block:

Code: Select all

style say_label:
    bold True
    outlines [(1, "#000", 0, 0)]
    drop_shadow (1, 1)
    drop_shadow_color '#424242' # that will give you a gray drop shadow
You can read about styles here: https://www.renpy.org/doc/html/style.html#styles You will find a list of text style properties here: https://www.renpy.org/doc/html/style_pr ... properties
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

TheOtherNewGuy
Regular
Posts: 26
Joined: Wed Nov 16, 2016 2:53 am
Contact:

Re: How to make a "character name" bold?

#10 Post by TheOtherNewGuy » Mon Nov 21, 2016 7:41 pm

Donmai wrote:Something like

Code: Select all

define e = Character("Eileen", who_bold=True, who_outlines=[(1, "#000", 1, 1), (1, "#000", 0, 0)])
That will give you black outlines and a black shadow.
If you prefer to use style, which will affect all characters names in your game, then you would only add more style properties to the style block:

Code: Select all

style say_label:
    bold True
    outlines [(1, "#000", 0, 0)]
    drop_shadow (1, 1)
    drop_shadow_color '#424242' # that will give you a gray drop shadow
You can read about styles here: https://www.renpy.org/doc/html/style.html#styles You will find a list of text style properties here: https://www.renpy.org/doc/html/style_pr ... properties
Awesome. thank you.

Thank you for the links, but I don't know. Still reading the documentation and nothing is clicking, as usual with me and coding.

Where did you even find out that there was a "drop_shadow" command? I didnt even see that in the styles section of the documentation.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1919
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: How to make a "character name" bold?

#11 Post by Donmai » Mon Nov 21, 2016 10:12 pm

TheOtherNewGuy wrote:Where did you even find out that there was a "drop_shadow" command?
Good question, and the answer is "I don't know exactly" :) .
I don't even know if the "drop_shadow" style property is documented or not, but I know it's been around for some time. I just seen people using it. I learn a lot seeing other people's programming examples. Look here, for example: viewtopic.php?p=225925#p225925
Notice that the script is using the old style syntax, but the drop_shadow and the drop_shadow_color properties are there.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Post Reply

Who is online

Users browsing this forum: _ticlock_