Have a Consistently Present Side Image?
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.
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.
-
- Veteran
- Posts: 241
- Joined: Tue Feb 20, 2018 12:59 pm
- Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
- Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
- Organization: Astral Autumn Games
- Tumblr: astralautumngames
- Deviantart: ArizaLuca
- itch: astralautumngames
- Contact:
Have a Consistently Present Side Image?
So, I would like to have my protagonist consistently displayed alongside the text, regardless of if she is the one speaking. Is there any way that I can do this? (An example of this would be 'The Blind Griffin' by Asphodel Quartet and 'Valentine's Otome' by Synokoria.
Re: Have a Consistently Present Side Image?
Do you want the image to fade to black when you change scenes? Or will it be ok for the image to show even when everything else fades out?
If you don't mind it constantly being there even across scenes - create a new layer in config.layers: https://www.renpy.org/doc/html/config.h ... fig.layers
Here's a bit more about how the layers are used: https://www.renpy.org/doc/html/displayi ... html#layer
Depending on whether the image should be on top of everything else, you may want to create one right at the top (last in the list) and show the image on that layer.
If you want the image to fade with scenes, you'd need to show it with each scene statement you use, e.g.:
You could also create a label / function that takes the scene and transition and automatically show the image at the same time, so you can do it in one line of code.
If you don't mind it constantly being there even across scenes - create a new layer in config.layers: https://www.renpy.org/doc/html/config.h ... fig.layers
Here's a bit more about how the layers are used: https://www.renpy.org/doc/html/displayi ... html#layer
Depending on whether the image should be on top of everything else, you may want to create one right at the top (last in the list) and show the image on that layer.
If you want the image to fade with scenes, you'd need to show it with each scene statement you use, e.g.:
Code: Select all
scene bg room
show player at side_panel #you need to create the side_panel transform, something like xalign 1.0 for far right.
with dissolve
-
- Veteran
- Posts: 241
- Joined: Tue Feb 20, 2018 12:59 pm
- Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
- Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
- Organization: Astral Autumn Games
- Tumblr: astralautumngames
- Deviantart: ArizaLuca
- itch: astralautumngames
- Contact:
-
- Veteran
- Posts: 241
- Joined: Tue Feb 20, 2018 12:59 pm
- Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
- Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
- Organization: Astral Autumn Games
- Tumblr: astralautumngames
- Deviantart: ArizaLuca
- itch: astralautumngames
- Contact:
Re: Have a Consistently Present Side Image?
Have you played Valentine's Otome or The Blind Griffin? Those two games give a better idea of what I'm looking for...
Re: Have a Consistently Present Side Image?
I've not played those games, so perhaps you can post a screenshot? The more you share, the easier it is to help...
-
- Veteran
- Posts: 241
- Joined: Tue Feb 20, 2018 12:59 pm
- Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
- Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
- Organization: Astral Autumn Games
- Tumblr: astralautumngames
- Deviantart: ArizaLuca
- itch: astralautumngames
- Contact:
Re: Have a Consistently Present Side Image?
https://img.itch.zone/aW1hZ2UvMTkxNjE0L ... qlpkkg.png
https://img.itch.zone/aW1hZ2UvMTk4OTIvO ... PJQVb8.png
Those two are fairly good examples; if you need to you can head to their various websites (just look it up on itch.io) and they'll have some more.
https://img.itch.zone/aW1hZ2UvMTk4OTIvO ... PJQVb8.png
Those two are fairly good examples; if you need to you can head to their various websites (just look it up on itch.io) and they'll have some more.
Re: Have a Consistently Present Side Image?
So just to be clear: you want there to be side images for the dialogues, but for it to be the player's image instead of whoever's speaking?
This config variable seems to be what you need:
https://www.renpy.org/doc/html/side_ima ... _image_tag
This config variable seems to be what you need:
https://www.renpy.org/doc/html/side_ima ... _image_tag
-
- Veteran
- Posts: 241
- Joined: Tue Feb 20, 2018 12:59 pm
- Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
- Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
- Organization: Astral Autumn Games
- Tumblr: astralautumngames
- Deviantart: ArizaLuca
- itch: astralautumngames
- Contact:
Re: Have a Consistently Present Side Image?
That seems to have worked; thank you! What if you want to switch perspectives, thereby switching the player image to a different character? Do you know how this would work then?
Re: Have a Consistently Present Side Image?
The easiest thing to do is probably creating a specific image for the portraits, and use text interpolation:
Code: Select all
define config.side_image_tag = "portrait"
image portrait = "portraits/[portrait_image].png"
default portrait_image = "player"
...
$ portrait_image = "eileen"
-
- Veteran
- Posts: 241
- Joined: Tue Feb 20, 2018 12:59 pm
- Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
- Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
- Organization: Astral Autumn Games
- Tumblr: astralautumngames
- Deviantart: ArizaLuca
- itch: astralautumngames
- Contact:
Re: Have a Consistently Present Side Image?
Ah... that's helpful, but I'm not entirely sure I understand how that's supposed to work? Can you please explain a little further? (I'm so sorry about bugging you by the way; thank you so much for dealing with my being a total newb xD)
Re: Have a Consistently Present Side Image?
No problems.
So if I understand correctly (I haven't tried it myself), the config variable takes an image tag name, and will always display that image tag as side image for dialogues. So in my code, I've put in "portrait" so it should always use my portrait image. In practice you should be able create a series of images like portrait happy, portrait sad etc. but it doesn't make sense in this case.
So our image portrait is "portraits/[portrait_image].png" - well I'd suggest you put all these specific portraits in the same folder if you have dedicated portraits. Then portraits/player.png is the player portrait, portraits/eileen.png is the eileen portrait. You just need to have the ones that you want.
Alternatively if you want to use normal character portraits, you can do that too, so long as you can create an image path convention that you can substitute the portrait name - e.g. player, eileen, martha, etc.
The [portrait_image] part of the string gets interpolated by the Renpy engine when it displays the image, it knows that anything between [] brackets are variables, so it looks for the portrait_image variable and put whatever is in it as part of the image filename. So:
if portrait_image == "player" then image portrait = "portraits/player.png"
if portrait_image == "eileen" then image portrait = "portraits/eileen.png"
You just need to change the portrait_image variable, and it'll change the portrait image for you. So in the example above, portrait_image starts off with "player" so the game will always display portraits/player.png to start with, until it hits the line $ portrait_image = "eileen", then it'll start displaying portraits/eileen.png instead.
Hope I've explained that ok, if not, point out what bit doesn't and I'll try another way.
So if I understand correctly (I haven't tried it myself), the config variable takes an image tag name, and will always display that image tag as side image for dialogues. So in my code, I've put in "portrait" so it should always use my portrait image. In practice you should be able create a series of images like portrait happy, portrait sad etc. but it doesn't make sense in this case.
So our image portrait is "portraits/[portrait_image].png" - well I'd suggest you put all these specific portraits in the same folder if you have dedicated portraits. Then portraits/player.png is the player portrait, portraits/eileen.png is the eileen portrait. You just need to have the ones that you want.
Alternatively if you want to use normal character portraits, you can do that too, so long as you can create an image path convention that you can substitute the portrait name - e.g. player, eileen, martha, etc.
The [portrait_image] part of the string gets interpolated by the Renpy engine when it displays the image, it knows that anything between [] brackets are variables, so it looks for the portrait_image variable and put whatever is in it as part of the image filename. So:
if portrait_image == "player" then image portrait = "portraits/player.png"
if portrait_image == "eileen" then image portrait = "portraits/eileen.png"
You just need to change the portrait_image variable, and it'll change the portrait image for you. So in the example above, portrait_image starts off with "player" so the game will always display portraits/player.png to start with, until it hits the line $ portrait_image = "eileen", then it'll start displaying portraits/eileen.png instead.
Hope I've explained that ok, if not, point out what bit doesn't and I'll try another way.
-
- Veteran
- Posts: 241
- Joined: Tue Feb 20, 2018 12:59 pm
- Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
- Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
- Organization: Astral Autumn Games
- Tumblr: astralautumngames
- Deviantart: ArizaLuca
- itch: astralautumngames
- Contact:
Who is online
Users browsing this forum: Adabelitoo, Bing [Bot]