Few Questions

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
bookie
Veteran
Posts: 269
Joined: Fri Mar 25, 2005 10:17 pm
Contact:

Few Questions

#1 Post by bookie »

Actually, I /had/ a few questions but I can only remember one.

If you use the syntax

<character> "script"

is there anyway to prevent the quotes from showing up? I need my characters to be thinking out loud, so to speak, although the user can still tell which character is doing the thinking.

Is this something I can set up in a style, or do I have to get creative?

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#2 Post by PyTom »

The quotes will not show up in that case, unless you supply them using the what_prefix and what_suffix options to the Character object. But that's not the default behavior.

Example code:

Code: Select all

init:
    $ faith_thinking = Character("Faith")
    $ faith = Character("Faith", what_prefix='"', what_suffix='"')

faith_thinking "I think that guy is kinda cute."
faith "Are you from around here?"
Realize that the quotes in the script are there to delimit when one string begins and ends, and are not actually shown to the user.

Hope this helps.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

bookie
Veteran
Posts: 269
Joined: Fri Mar 25, 2005 10:17 pm
Contact:

#3 Post by bookie »

Okay, thanks. I have a very bad memory and just played a game where the quotes were included, so I got worried. :lol:

bookie
Veteran
Posts: 269
Joined: Fri Mar 25, 2005 10:17 pm
Contact:

#4 Post by bookie »

Another question.

In a transition from one scene to the next, I'm going from Scene 1, to Black, to Scene 2. Is there any way I can make the game pause at scene black for a moment or should I just use an ambiuous "..." to prompt a click?

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#5 Post by PyTom »

bookie wrote:Another question.

In a transition from one scene to the next, I'm going from Scene 1, to Black, to Scene 2. Is there any way I can make the game pause at scene black for a moment or should I just use an ambiuous "..." to prompt a click?
How about:

Code: Select all

scene black with dissolve

$ renpy.pause(1.0)

scene newscene with dissolve
?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

bookie
Veteran
Posts: 269
Joined: Fri Mar 25, 2005 10:17 pm
Contact:

#6 Post by bookie »

That's the function I was looking for, thanks.

And another question. * :oops: *

If there's a choice that's dependant on a boolian, is this how I'd go about making sure that choice won't appear unless the boolian is true?

Code: Select all

        menu:
            if (okLike = true):
                "I like you.":
                    jump i_like_you
            "I don't like you.":
                jump i_dont_like_you
            "...":
                jump dotdotdot_two

bookie
Veteran
Posts: 269
Joined: Fri Mar 25, 2005 10:17 pm
Contact:

#7 Post by bookie »

Nevermind, I found an example in your demo.

Code: Select all

        menu:
                "I like you." if okLike:
                    jump i_like_you 
like that, right?

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#8 Post by PyTom »

You answer comes in two parts. The first is that it is not "boolian", but "boolean". The name comes from the name of George Boole, a 19th century English mathematician/logician. His work underlies the internal workings of every modern digital computer.

Anyhow, what you want can be done by appending "if" and the condition to the end of the menu choice. For example:

Code: Select all

    menu:
            "I like you." if okLike:
                    jump i_like_you
            "I don't like you.":
                jump i_dont_like_you
            "...":
                jump dotdotdot_two
In Python (and therefore in Ren'Py), parenthesis are not required around a condition. It's also considered best to test directly for trueness, rather than equality to True.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

bookie
Veteran
Posts: 269
Joined: Fri Mar 25, 2005 10:17 pm
Contact:

#9 Post by bookie »

eheh, I could never keep my vowels straight.

Thanks PyTom, you're like 24/7 technical support. :o

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#10 Post by PyTom »

bookie wrote:Thanks PyTom, you're like 24/7 technical support. :o
More like 18/7, since I do like to sleep once in a while. That'll go down even more over the summer, as I will once again be working for the Navy.

Also, tech support may be spotty tomorrow (2005-06-04) and Sunday (2005-06-05), as I will be going on a trip to Mediaeval Times in New Jersey. Depends on if the hotel has working wifi or not.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Megaman Z
Miko-Class Veteran
Posts: 829
Joined: Sun Feb 20, 2005 8:45 pm
Projects: NaNoRenO 2016, Ren'Py tutorial series
Location: USA
Contact:

#11 Post by Megaman Z »

PyTom wrote:it is not "boolian", but "boolean"
bookie wrote:eheh, I could never keep my vowels straight.
get used to it if you're doing hard coding in notepad or some tool without spell checking. one character misplaced or wrong will screw it all up. (I learned that from compiling the WOLF3D source code... one letter was capitalized, and Borland 3.1 [one version revision since ID software used it. neat fun fact] wouldn't compile it.)

I will never make that particular misspelling because I'm used to seeing boolean spelled "boolean" and not "boolian". granted, I will end up making syntax errors more often than others... :oops:
PyTom wrote:Also, tech support may be spotty tomorrow (2005-06-04) and Sunday (2005-06-05), as I will be going on a trip to Mediaeval Times in New Jersey. Depends on if the hotel has working wifi or not.
a couple of things:

A) I could replace a few letters (four letters exactly) with asterisks in my quote box and make it look like you cursed. just saying...

B) mediaeval? something I haven't heard of? or a typo? I'm assuming the former...

C) I won't notice. I'll be AWOL starting saturday for a week.
~Kitsune Zeta

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#12 Post by PyTom »

Medieval Times, of course. It's a restaurant/attraction that offers food (but no forks, of course) while you can watch a jousting tournament.

That's the last time I have google spell-correct something, without checking to see exactly what it links to.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

bookie
Veteran
Posts: 269
Joined: Fri Mar 25, 2005 10:17 pm
Contact:

#13 Post by bookie »

I'm dreading compling my game because of all the typos and indiscrepancies I know I'll have to go back and fix. The hardest part about coding for me is staying consistant with variables and all that.

I hope you have fun at Midieval times PyTom. My class went there in fifth grade and it was a lot of fun. The food was good too.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#14 Post by PyTom »

bookie wrote:I'm dreading compling my game because of all the typos and indiscrepancies I know I'll have to go back and fix. The hardest part about coding for me is staying consistant with variables and all that.
My advice is to run early and run often. Ren'Py lets you run a fairly incomplete game... so it should be possible to preview your game.

It's best to fix mistakes early, when you've made them once, rather than later, when you've repeated them hundreds of times.
I hope you have fun at Midieval times PyTom. My class went there in fifth grade and it was a lot of fun. The food was good too.
Well, I'm off. Hopefully, it will still be fun to someone a few decades older than fifth grade.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
rioka
Royal Manga Tutor
Posts: 1255
Joined: Fri Jul 16, 2004 12:21 pm
Completed: Amgine Park, Garden Society: Kykuit, Metropolitan Blues (art)
Location: somewhere in NY
Contact:

#15 Post by rioka »

PyTom wrote:Well, I'm off. Hopefully, it will still be fun to someone a few decades older than fifth grade.
Oh yeah, it's still good even after X many years. Their chicken is still excellent, btw. :)

Post Reply

Who is online

Users browsing this forum: fufuffiero