## How do I add an outline to text? (SOLVED)

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.
Message
Author
Cululush
Newbie
Posts: 5
Joined: Mon Dec 26, 2011 3:32 pm
Projects: A Tsundere Christmas Carol
Contact:

### How do I add an outline to text? (SOLVED)

Hello.
I'm new to this program, and I was planning on making a short VN.
I have gone through most of the tutorial and I know pretty much all I need at the moment, except for one thing.
I have made a transparent background so that it would'nt block the image(I want it to be all across the screen), but now I can't see the text, due to having similar colour with the images.
I want to make a black outline for white text, so that it's visible. I've searched around, and I've seen some explanations, but I didn't quite understand what I'm supposed to do.
I want the outline to be on ALL the text. I don't mind not having it on buttons, though.
So, what is the easiest way to do this?

Last edited by Cululush on Tue Dec 27, 2011 5:29 am, edited 1 time in total.

tuna_sushi
Veteran
Posts: 297
Joined: Thu Jul 07, 2011 9:33 am
Projects: BloomingBlossoms
Contact:

### Re: How do I add an outline to text?

If you want to outline the character's name, put

Code: Select all

who_outlines=[ (1, "#282") ]
if you want to outline the text as in.... the text (?) put

Code: Select all

what_outlines=[ (1, "#282") ]
Sorry for my bad english ^_^''
My VN Website~

Cululush
Newbie
Posts: 5
Joined: Mon Dec 26, 2011 3:32 pm
Projects: A Tsundere Christmas Carol
Contact:

### Re: How do I add an outline to text?

Errrr, I'm sorry, I'm gonna need more than that...
I need to know where to put it and how it works.
Sorry, kinda new to this...
And I need both.

tuna_sushi
Veteran
Posts: 297
Joined: Thu Jul 07, 2011 9:33 am
Projects: BloomingBlossoms
Contact:

### Re: How do I add an outline to text?

Sorry for not being clear...

You will have to put it like this:

Code: Select all

# Declare characters used by this game.
define a = Character("Alice", color="#ffffff", who_outlines=[ (1, "##FF00FF") ], what_outlines=[ (1, "##FF00FF") ])
it will look like this (don't mind the pics ^_^" )
Attachments
Sorry for my bad english ^_^''
My VN Website~

Cululush
Newbie
Posts: 5
Joined: Mon Dec 26, 2011 3:32 pm
Projects: A Tsundere Christmas Carol
Contact:

### Re: How do I add an outline to text?

Ugh...
Well, I did exactly as you said, I practically copied it and just changed the name.
The game works, but the moment it gets to a character with outline, it says the following:
I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/script.rpy", line 40, in script
anon "Hi, /a/. Here's something I've put together to brighten your day (hopefully)."
File "template/game/screens.rpy", line 26, in python
text who id "who"
Exception: Color string must be 3, 4, 6, or 8 hex digits long.

-- Full Traceback ------------------------------------------------------------

Full traceback:
File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\execution.py", line 261, in run File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\ast.py", line 396, in execute
File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\exports.py", line 696, in say File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\character.py", line 770, in __call__
File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\character.py", line 664, in do_display File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\character.py", line 450, in display_say
File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\character.py", line 648, in do_show File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\character.py", line 263, in show_display_say
File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\display\screen.py", line 562, in get_widget File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\display\screen.py", line 244, in update
File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\screenlang.py", line 1166, in __call__ File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\python.py", line 978, in py_exec_bytecode
File "template/game/screens.rpy", line 26, in <module>
File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\ui.py", line 435, in __call__ File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\text\text.py", line 1017, in __init__
File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\display\core.py", line 127, in __init__ File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\style.py", line 810, in __init__
File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\style.py", line 629, in build_style File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\style.py", line 514, in expand_properties
File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\style.py", line 91, in expand_outlines File "C:\Users\Asher\AppData\Local\Temp\Rar$EX76.42292\renpy-6.13.7\renpy\easy.py", line 65, in color
Exception: Color string must be 3, 4, 6, or 8 hex digits long.

Windows-post2008Server-6.1.7601-SP1
Ren'Py 6.13.7.1646
A Ren'Py Game 0.0
Also, the game is mostly based on narration, so, is it possible to outline that too(Meaning - Do I have to make a character for that too?)?
What I really need is ALL the text outlined(In a solid black colour for everything). Is it possible to make the entire text outlined, without having to define every character with it?

P.S. I don't mind the pic, everyone and their style, and I don't think I'd personally be able to come up with anything better XD
P.S.S. sorry for the hassle>_> Really newbin' around.

DragoonHP
Miko-Class Veteran
Posts: 734
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

### Re: How do I add an outline to text?

Remove a # from "##FF00FF"

Cululush
Newbie
Posts: 5
Joined: Mon Dec 26, 2011 3:32 pm
Projects: A Tsundere Christmas Carol
Contact:

### Re: How do I add an outline to text?

Hey, thanks! that worked.
Now just one last thing: How do I add an outline to text which isn't said by any character(as in narration)?
Is it possible?

TsukiShima
Miko-Class Veteran
Posts: 778
Joined: Fri Aug 05, 2011 4:47 am
Projects: Heartful Memory
Location: Malaysia
Contact:

### Re: How do I add an outline to text?

Cululush wrote:Hey, thanks! that worked.
Now just one last thing: How do I add an outline to text which isn't said by any character(as in narration)?
Is it possible?
It's like how tuna_sushi did, only if you want only the narrator to have it, you should declare the it as a character as well.

Code: Select all

# Declare characters used by this game.
define n = Character("", color="#ffffff", who_outlines=[ (1, "##FF00FF") ], what_outlines=[ (1, "##FF00FF") ])

Cululush
Newbie
Posts: 5
Joined: Mon Dec 26, 2011 3:32 pm
Projects: A Tsundere Christmas Carol
Contact:

### Re: How do I add an outline to text?

Thanks a lot!!! It works.
Thank you, everyone. That's all I needed.

Kieron80
Newbie
Posts: 1
Joined: Wed Mar 06, 2019 1:02 pm
Contact:

### Re: How do I add an outline to text? (SOLVED)

define gui.dialogue_text_outlines = [ (0, "#00000080", 2, 2) ]
define gui.charaters_text_outlines = [ (0, "#00000080", 2, 2) ]

bDunks
Newbie
Posts: 17
Joined: Tue Jan 08, 2019 3:07 pm
Contact:

### Re: How do I add an outline to text? (SOLVED)

Kieron80 wrote:
Wed Mar 06, 2019 1:05 pm

define gui.dialogue_text_outlines = [ (0, "#00000080", 2, 2) ]
define gui.charaters_text_outlines = [ (0, "#00000080", 2, 2) ]
It's actually
define gui.name_text_outlines = [ (0, "#00000080", 2, 2) ]
Not characters.
Thanks for the info. Helped me out.

For anybody new, like me, here is some additional info.

Value 1 - Stroke/Outline
Value 2 - Color
Value 3 - X
Value 4 - Y

3 & 4 are for creating a drop shadow effect.
If I am wrong on this, feel free to correct me.

### Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Majestic-12 [Bot], wolfofanarchy