Displaying a bespoke screen within the story

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
thirstyoctopus
Regular
Posts: 72
Joined: Mon Aug 27, 2018 12:04 pm
Projects: Romance Visual Novel story
Organization: Thirsty Octopus
Contact:

Displaying a bespoke screen within the story

#1 Post by thirstyoctopus »

I've done some research on this but I cannot find anything conclusive, as it seems that screens are somewhat limited, but I may be wrong.

There's a point in my story where I want a modal to pop up displaying some information that the main character has learned through making a specific choice previously. In this case, he's chosen to research information about coffee and then before the scene ends I'd like a screen to show saying something along the lines of "Here's what you learned..." etc. I tried creating a screen like so:

Code: Select all

screen coffee_info():
    modal True

    text "You learned some stuff about coffee!"
(Obviously this is just testing text) but I don't know how to activate it in-game. I don't think 'show screen coffee_info()' is a thing. Also, this is the last action before the scene ends, so I'd need the screen to appear and pause the gameplay until the user clicks it to go away and then the scene can move on.

Is there already a screen built in for displaying bespoke info, or is there a way I can make my own screen appear in-game?

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Displaying a bespoke screen within the story

#2 Post by trooper6 »

All screens can display bespoke info...that is what they do. Just put the info you want on the screen you made as in your example above...except you'll want to also include a button that closes the screen when clicked.

As for your desire to have a screen come up and pause the game until the user clicks on your close screen button that is also easy.
You don't need "modal True"
Rather than show screen coffee_info() --which is totally a thing, just use
call screen coffee_info()

Have you looked into the documentation on screen language?
https://www.renpy.org/doc/html/screens.html
https://www.renpy.org/doc/html/screen_actions.html
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
thirstyoctopus
Regular
Posts: 72
Joined: Mon Aug 27, 2018 12:04 pm
Projects: Romance Visual Novel story
Organization: Thirsty Octopus
Contact:

Re: Displaying a bespoke screen within the story

#3 Post by thirstyoctopus »

Thank you for the help - yes I'd seen the screen docs but not the screen actions which has helped a lot more!

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Displaying a bespoke screen within the story

#4 Post by trooper6 »

My pleasure!
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

Post Reply

Who is online

Users browsing this forum: No registered users