Using Quotation marks

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
sculpteur
Veteran
Posts: 312
Joined: Fri Nov 17, 2017 6:40 pm
Completed: Apocalypse Lovers
Projects: Apocalypse Lovers
Organization: Awake_Production
Location: France
Discord: https://discord.gg/apocalypse-lovers
Contact:

Using Quotation marks

#1 Post by sculpteur »

Hi,

My problem is really simple and really stupid but i don't find any solutions here : https://www.renpy.org/doc/html/text.html

When I make one of my character speak, I just want to use the following symbole : "
I want it to be displayed in the say window

But Renpy already use it for displaying the dialogue text in the say window.

Of course I could use that one instead : « » or that one : “ ” but i'am not sure if it's all right in english to use it in a dialog.
Image

“He asked me to calm down, close my eyes and be quiet. He explained to me that if I was afraid, the shadow that ran barefoot in the street would feel it. I got scared seeing Jumanji on TV, so let me tell you, we didn't stay hidden for long and had to start running again.”
Jessica's Diary.

User avatar
Draziya
Regular
Posts: 70
Joined: Sun Nov 26, 2017 8:50 am
Completed: this was for you. [NaNoRenO 19], Acetylene [AceJam19], Ah!! My Roommate is a Succubus Hellbent on World [MonJam 18], I Don't Have A Clue [QRMJam 18], Cautionary Tale [NaNoRenO 18], OP Dodge Cross [GGJ 18], Acetone [AceJam 18]
Projects: I'm a love interest in my childhood friend's reverse harem!!
Organization: Watercress
itch: Drazillion
Contact:

Re: Using Quotation marks

#2 Post by Draziya »

If you want text to be displayed with quotation marks around them, you have to do something like the following:

Code: Select all

define e = Character("Eileen", what_prefix='"', what_suffix='"')
The above example was taken from the dialogue documentation page here: https://www.renpy.org/doc/html/dialogue ... characters
Image

sculpteur
Veteran
Posts: 312
Joined: Fri Nov 17, 2017 6:40 pm
Completed: Apocalypse Lovers
Projects: Apocalypse Lovers
Organization: Awake_Production
Location: France
Discord: https://discord.gg/apocalypse-lovers
Contact:

Re: Using Quotation marks

#3 Post by sculpteur »

Yep, thank for answering me so fast.

But i already know I can do this. It wasnt my problem.

I wanted to use quotation mark inside is for describing emotion.

Like this :

e " How are you ? she asks kindly. "

And I want this :

e " “ How are you ? ” she asks kindly. "


But i resolve it, by using this :
\" (backslash-doublequote)
Includes a doublequote in a double-quoted string.

in order to avoid renpy considering the quotation symbol in the code.

But now I have an other probleme :

I'am looking for a way to generalize the process without having to change my 4000+ lines of dialog.

for example, something which allow me to do this :

define e = Character ("Eileen", what_prefix=' “ ', what_suffix=' ” ')

e "How are you ?" "she asks kindly."

And the result will display :
Ellein
“ How are you ? ” she asks kindly.
Image

“He asked me to calm down, close my eyes and be quiet. He explained to me that if I was afraid, the shadow that ran barefoot in the street would feel it. I got scared seeing Jumanji on TV, so let me tell you, we didn't stay hidden for long and had to start running again.”
Jessica's Diary.

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

Re: Using Quotation marks

#4 Post by Imperf3kt »

There's two ways:

Code: Select all

    e "\"This is one way to do it,\" Says Eileen."
    e '"And this is another way to do it," says Eileen'
Essentially ' and " can both be used in place of each other, but not for each other. " won't close with ' and ' won't close with ", so you can use them between each other interchangeably.
\ is an escape character, the next thing directly after it, will be ignored and displayed as text instead of translated into part of the game code.

To make short work of it, use the find/replace function of your text editor.
Last edited by Imperf3kt on Sat Feb 17, 2018 6:42 am, edited 3 times in total.
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

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2400
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Using Quotation marks

#5 Post by Ocelot »

You technically can use creator-defined statements for that, but it will still require you to change your code.

By the way, did you know that you can use bot double and single quotes to denote a string? You won't need escaping for double quotes in single-quoted line and vice versa: e ' "How are you ?" she asks kindly. '
< < insert Rick Cook quote here > >

Post Reply

Who is online

Users browsing this forum: Bing [Bot], bonnie_641