[Solved] What is the difference between (show / renpy.show) and (add)?

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
Chekhov
Regular
Posts: 113
Joined: Tue Jun 26, 2018 9:19 am
Projects: Pluton
Contact:

[Solved] What is the difference between (show / renpy.show) and (add)?

#1 Post by Chekhov »

When I read what "add" does it seems synonymous to what "show" does. Is there a difference and are they two different ways to show an image in renpy or are they the same way to show an image, only with different syntax?

Add documentation:
https://www.renpy.org/doc/html/screens.html#add

Show documentation:
https://www.renpy.org/doc/html/statemen ... renpy.show
Last edited by Chekhov on Thu Feb 14, 2019 1:55 am, edited 1 time in total.

philat
Eileen-Class Veteran
Posts: 1910
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: What is the difference between (show / renpy.show) and (add)?

#2 Post by philat »

One is screen language, the other is a renpy statement/python statement.

User avatar
Chekhov
Regular
Posts: 113
Joined: Tue Jun 26, 2018 9:19 am
Projects: Pluton
Contact:

Re: What is the difference between (show / renpy.show) and (add)?

#3 Post by Chekhov »

philat wrote: Thu Feb 14, 2019 12:54 am One is screen language, the other is a renpy statement/python statement.
Thank you, Philat.

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: [Solved] What is the difference between (show / renpy.show) and (add)?

#4 Post by xavimat »

Maybe some explanation can be useful.
Renpy includes several languages. "Screen language", "ATL", the one used in labels ("label language?"), and python.
They serve different purposes.
- Code in a label is executed one line after another. The "scene" or the "show" statements do not actually show the image, but tell renpy what image should be shown at the next interaction (an interaction occurs in a dialogue line, "menu", "pause" or "with"). For example:

Code: Select all

scene park
show eileen at right
show lucy at left
with dissolve
This code shows three images (park, eileen, lucy) at the same time.
Instead:

Code: Select all

scene park with dissolve
show eileen at right with dissolve
show lucy at left with dissolve
Shows every image dissolving one after another.

- Code in screens use the "screen language". "add" tells renpy to add a displayable to the screen, but it does nothing until that screen in show or called (well, it can be predicted under the hoods, but it won't be visible to the player until the screen is shown or called).

- The python equivalent to "show" is $ renpy.show()
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
Chekhov
Regular
Posts: 113
Joined: Tue Jun 26, 2018 9:19 am
Projects: Pluton
Contact:

Re: [Solved] What is the difference between (show / renpy.show) and (add)?

#5 Post by Chekhov »

xavimat wrote: Thu Feb 14, 2019 2:50 pm Maybe some explanation can be useful.
You're a gent and a scholar.

I was able to learn quite a bit from the tutorial; I hadn't grasped the significance of screen language being something seperate and it actually answered quite a few questions I had.

You ended up filling some more blanks here. If anyone reads this and is still confused, the tutorial is very much recommended to learn more about how to use screen language.

Post Reply

Who is online

Users browsing this forum: Google [Bot], Nozori_Games