Hey! First of all, thanks so so much for this code and for everything you do for this community. Seriously, you're a Ren'py hero.
Secondly, is there a consistent way to unlock images that doesn't rely on "scene" or "show"? My CGs appear in a "comic style" meaning they're multiple images to create one image together when shown in game. I can have Ren'py show all of these images together by defining an image and showing that in the gallery, but that means I can't show anything with the script of the sex scene itself that correlates because trying to work off the first image of the sequence gives me an error of "maximum recursion depth exceeded" which I suspect has something to do with having a file named the same as an image definition? (I hope that makes sense.)
Here's a pic of my code so far:
So, my question is, how would I get this gallery to unlock such an image? Or, if it's not possible, how would I change this code to just run off "if" statements instead?
I'm working on solutions myself but thought I would ask, since it's somethings quicker just to be help.
Great code for the gallery.Easy to understand instructions.I use the replay gallery in my game and am very happy with it. Thanks a lot! I would def donate money if I weren't broke.
Awesome, thank you, I'm glad you find it useful. I will have an update out next year(hopefully), making it even easier to use and 2 option for the screen (the original) and a new look incorporated into the menu system
Second issue, sorry for bothering you! As you see in the screenshots the descriptions of the various replay are not fine, even if I change colour, I want to try maybe an outline but I don't know how to do it, can you help me?
In the game I have all the writes outlined with this in the main script:
whoops, I don't have the gallery.rpy. I have only replay and replay_setup because I need only replay. So I need to put everything inside even if I only use replay?
for i in range(start, end + 1): if renpy.seen_label(Replay_items[i].replay): hbox: spacing maxthumbx - 20 xalign 0.5 yalign 0.1 text Replay_items[i].name # make the same changes as before but to this line add the colon and the outline command below it
Sorry, I have another question. In my game the user define the roles at the beginning of the game, while in replay they're always the default one like "landlady". Is it possible to (easy) toggle something to remember the user defined roles?
for i in range(start, end + 1): if renpy.seen_label(Replay_items[i].replay): imagebutton idle Replay_items[i].thumbs: style "gallery_button" action Replay(Replay_items[i].replay) # make changes to this line only!!!
little question, replays are closed when the label ends? What about parts of game where, due to a menu with choices, I have multiple labels I want to include in a single replay?
Thank you so much for this asset!! I have a question though. Is there a way to check which gallery image is shown on the close up screen? i want to set up a background selector with the gallery images..
in testing I reduced the size of the gallery thumbnails to 288x162 and put a frame around the thumbnails and buttons to shrink it I tested with a 1280x720 gui so you may have to adjust the size of the grid and the thumbnails / lock image to find a good fit for your gui size
Thanks, I also solved it a few hours ago by putting both sections, text and thumbnails in frames, but now I would like to know if I can title the page screens separately, Ex: page 1/Chapter 1 and page 2/Chapter 2
you could set up an if statement to check the variable gallery_page and display text base off of that, or if each page is for a specific chapter i.e. page 1 is chapter 1, page 2 is chapter 2; then
$ chap = gallery_page + 1 label "Chapter [chap]"
keep in mind gallery_page is 0 through (however many pages you have) and you must have 6 images only for the chapter .
if you have already edited your gallery_setup.rpy be sure to copy over the changes you have made to this one before overwriting yours.
I chose a separate folder for the individual lock images, but you can combine them with the thumbnails (or anywhere really) just be sure to point to them correctly in the gallery_setup.rpy file
Dude, thanks so much for sharing this code! I was already going crazy. This saved my life hahaha. I have a question, would it be very complicated to be able to play videos in this gallery?
Oh I mean more like, adding a text box under the full image once you click it. I have some fanart for my game's gallery and I want to include something below it that says the artist's name
in it there are two --> grid maxnumx maxnumy: <-- the first is for the images, the second is for the text adjust the --> yalign 0.1 <-- (IN THE SECOND one only) to a larger number to move it down 0.5 will be in the middle of the image and 1.0 would be the bottom
Really appreciate this - I had a gallery working on a previous version of a VN and the new Python setup totally screwed it over, and very little I looked up managed to fix it. One snag I'm running into is that the images I had were locked by a persistent variable (if you got a certain game ending) which had previously been marked as "condition." There's 20 of these images, so I'm banging my head against a blanket check for all of them. Any insights would be highly appreciated!
My gallery uses the renpy seen to unlock an image.
if you downloaded the files, there is a short tutorial in there as the VN. Use your renpy launcher and give it a read. It will show you how to unlock the images without the user seeing them in game
This is asking if you know a way to tweak your gallery function to unlock via persistent variables vs. seen. My old gallery has a lot of very arcane code in it that doesn't seem to translate easily, and I was wondering if you had more familiarity with those kind of unlockable parameters. :)
I'm sure it could be done that way, but if you're using my gallery just do a
show galleryimage
hide galleryimage
instead of setting a persistent.variable the image is not displayed and it gets unlocked in my gallery, you can do this multiple time to unlock more than one image at a time.
I think is great of you to share your vast knowledge with other Devs! I know this isn't your first time doing this! Anytime Devs collaborate, us Users benefit!
Can I use this template to show video scenes? Is there much extra code for that?
Edit:
Figured it out. I just used the replay gallery and created new labels that only played the videos sequentially, instead of having it jump to the label in the game where the videos for the scene appears. This way I avoided the dialog, and making the user continually click through each video that makes up the scene.
I guess I was looking for a video replay gallery more than a "play this part of the game over again" thingy.
Anyways, thanks for posting this, not to mention all the help you provide on Reddit.
Really appreciate how -- if you run this in Ren'Py -- you've created a tutorial on how to use this gallery as part of a Ren'py project. Many of us pick up Ren'py to tell stories, and don't have formal training in programming. Having someone who knows what they're doing (you) explain how to use this asset properly really helps. Thanks!
Hey there! I'm developing my own VN right now and have it Published too. I have downloaded your Phone assets and now this. I would like to use it in my next Chapter of my Game, when I jump from Tyrano to Renpy. I would like to Credit you if that's ok. I know you uploaded it as creative common, but its the least I can do.
Not actively yet, but I'm working on scripting outlines based on some ideas I've had in my head for a long time, and if the script outline works out to be something I think would work as a serious format AVN (not one of those 30 minute eroges, but several hours of story combined with some NSFW fun) I will try my hand at it! I've picked up 3D rendering as a hobby recently, so I'll keep on practising on that in my spare free time, so I can hopefully make renders similar to your quality one of these days!
And I thought you deserved some cash for that effort!
Given the number of unfinished games on here, I have come to the conclusion that it is better to pay once a game is finished... But this is something that is useful and usable as it is, so...
← Return to asset pack
Comments
Log in with itch.io to leave a comment.
Hey! First of all, thanks so so much for this code and for everything you do for this community. Seriously, you're a Ren'py hero.
Secondly, is there a consistent way to unlock images that doesn't rely on "scene" or "show"? My CGs appear in a "comic style" meaning they're multiple images to create one image together when shown in game. I can have Ren'py show all of these images together by defining an image and showing that in the gallery, but that means I can't show anything with the script of the sex scene itself that correlates because trying to work off the first image of the sequence gives me an error of "maximum recursion depth exceeded" which I suspect has something to do with having a file named the same as an image definition? (I hope that makes sense.)
Here's a pic of my code so far:
So, my question is, how would I get this gallery to unlock such an image? Or, if it's not possible, how would I change this code to just run off "if" statements instead?
I'm working on solutions myself but thought I would ask, since it's somethings quicker just to be help.
Thanks a ton!
your ATL image; the repeating 3 images will give you an error without a pause between the images
image enokkyscenegallery1"
"enokkysexscene1"
pause 0.25
"enokkysexscene2"
for the image itself, you do not need to redefine itpause 0.25
just add it in
gallery_items.append(GalleryItem("Image 5", ["enokkyscenegallery1"] ))
as a side note the project that you downloaded for this is the tutorial for it (dump its contents in your project folder and launch it)
but basically to unlock an image that is not used in the script, just do a quick show and hide of it like this
show enokkyscenegallery1
hide enokkyscenegallery1
that will NOT even flash the image or show the image at all, but it will unlock it for the gallery
Bless you for your effort! Thank you mate, this saved me a lot of nerves and allowed to concentrate on content itself!
I have a little question though: is it possible to put a few images into one container?
Tried something like
gallery_items.append(GalleryItem("Image 1", ["img1", "img2", "img3"] )), but with no effect. Thank you in advance!
No it can not, it's just a simple gallery one item one image
sorry
Thank you for your answer!
This really great.
Is there a way for me to sort the replay gallery into different sections. I want every character's scenes to be separate.
you could create a different gallery for each character and create a screen with buttons to open the individual's gallery
Great code for the gallery. Easy to understand instructions. I use the replay gallery in my game and am very happy with it.
Thanks a lot!
I would def donate money if I weren't broke.
Awesome, thank you, I'm glad you find it useful. I will have an update out next year(hopefully), making it even easier to use and 2 option for the screen (the original) and a new look incorporated into the menu system
Yeah I know how that goes.
Hi! How do you make the image gallery background transparent? I want it to look something like the menu screen! Thanks a lot for making this.
something like this a screnshot
I'm currently working on an update to do this, but as you can see it's not quite ready... yet
give me a little while, it takes time (my family, my job and my VN kind of come first)
but I am working on it
Of course! It already looks really good, lemme know when it's done. :)
And happy holidays btw.
Where can i relock all images?
use the renpy launchers Delete Persistent action to re-lock the images (and reset everything about the project)
Thank you!
you're welcome
good luck with your project
This is very usefull for me, thanks!
you're welcome
good luck with your project
Second issue, sorry for bothering you! As you see in the screenshots the descriptions of the various replay are not fine, even if I change colour, I want to try maybe an outline but I don't know how to do it, can you help me?
In the game I have all the writes outlined with this in the main script:
define gui.dialogue_text_outlines = [ (1.5, "#000000a8", 0, 0) ]
define gui.name_text_outlines = [ (1.5, "#000000a8", 0, 0) ]
But with the description of these replays I dunno how to do it.
edit the gallery.rpy file and find this section
for i in range(start, end + 1):
hbox:
spacing maxthumbx - 20
xalign 0.5
yalign 0.1
text gallery_items[i].name # we will be editing this line
and make this change
text gallery_items[i].name # we will be editing this line: # add a colon
outlines [ (1, "#e9ec09", 0, 0) ] # adjust the outlines as required
whoops, I don't have the gallery.rpy. I have only replay and replay_setup because I need only replay. So I need to put everything inside even if I only use replay?
sorry I thought that was the gallery
in the replay.rpy file find this section
for i in range(start, end + 1):
if renpy.seen_label(Replay_items[i].replay):
hbox:
spacing maxthumbx - 20
xalign 0.5
yalign 0.1
text Replay_items[i].name # make the same changes as before but to this line add the colon and the outline command below it
Ok found it, works like a charm! Now I have the only issue with roles
Sorry, I have another question. In my game the user define the roles at the beginning of the game, while in replay they're always the default one like "landlady". Is it possible to (easy) toggle something to remember the user defined roles?
after you call the screens to get the name add this
$ persistent.nome_protagonista = nome_protagonista
$ persistent.nome_landlady = nome_landlady
$ persistent.nome_ruolo = nome_ruolo
now for the fun part
in the replay.rpy file find this section
for i in range(start, end + 1):
if renpy.seen_label(Replay_items[i].replay):
imagebutton idle Replay_items[i].thumbs:
style "gallery_button"
action Replay(Replay_items[i].replay) # make changes to this line only!!!
and make this change
action [SetVariable("nome_protagonista", "[persistent.nome_protagonista]"), SetVariable("nome_landlady", "[persistent.nome_landlady]"), SetVariable("nome_ruolo", "[persistent.nome_ruolo]"), Replay(Replay_items[i].replay)]
I made these changes as you say;
Main script after call screen:
And in replay.rpy this change:
But doesnt work ç_ç
did you start a new game and enter some names?
Yes, even deleted persistent and started again from scratch but nothing. Maybe has something to do with that "3" above like there is an error?
Here is the code if you can put an eye on it:
those lines are because you haven't used default of define for those variables, but you don't have to do that with persistent variables
Thanks a lot! I will use this in my game!
you're welcome
good luck with your project
little question, replays are closed when the label ends? What about parts of game where, due to a menu with choices, I have multiple labels I want to include in a single replay?
replays are ended with $ renpy.end_replay() and can span multiple labels
you can have multiple end points for a replay as it will stop when every it hits one of them
just be careful that they don't interfere with other replay areas
HTH
Thanks! So they ends with $ renpy.end_replay(), but starts with the simple label name, am I correct?
yes that is correct
also the player has to have played past the label to unlock it in the replay gallery
Thank you so much for this asset!! I have a question though. Is there a way to check which gallery image is shown on the close up screen? i want to set up a background selector with the gallery images..
screen gallery_closeup(images)
the image link is in the variable images that is being passed to the gallery_closeup
you could add another button to pass that to a variable that you could use for your background
Thanks you for your help!
is there a way to circumvent an issue like in the following-
label sc1:
show image1
"look at this"
$ renpy.end_replay()
label sc2:
(needs to keep showing image1 during this replay)
"looking at it"
$ renpy.end_replay()
-without having to manually show image1 again, in case there's a scenario you won't be able to?
you could just show the image again there, it won't affect anything or check in they are in a replay and show the image again like this
if _in_replay:
show image1
thank you!
you're welcome
good luck with your project
Thank you. How can I reduce the size and centralize the gallery thumbnails?
I want to add decoration to the edges of the screen :s
take a look at this modified gallery.rpy file.
https://drive.google.com/file/d/16N1JB6ZAuR5J_HJ6h3Ciahr51tk7eWuG/view?usp=shari...
in testing I reduced the size of the gallery thumbnails to 288x162 and put a frame around the thumbnails and buttons to shrink it
I tested with a 1280x720 gui so you may have to adjust the size of the grid and the thumbnails / lock image to find a good fit for your gui size
Thanks, I also solved it a few hours ago by putting both sections, text and thumbnails in frames, but now I would like to know if I can title the page screens separately, Ex: page 1/Chapter 1 and page 2/Chapter 2
you could set up an if statement to check the variable gallery_page and display text base off of that, or if each page is for a specific chapter i.e. page 1 is chapter 1, page 2 is chapter 2; then
$ chap = gallery_page + 1
label "Chapter [chap]"
keep in mind gallery_page is 0 through (however many pages you have) and you must have 6 images only for the chapter .
So. Is it possible to change the background on each page? It would be best to include the chapter title there.
And thanks for responding. I swear this is my last question. I love your gallery.
yes it is possible and should be quite easy
you're welcome
good luck with your project
Is there any way to have a different locked thumbnail for each unlockable image?
yes it can quite easily. grab this copy of the gallery_setup.rpy and use it
https://drive.google.com/file/d/16xcCir-QJYiJ8L99DSYtJxIspA0e1-M7/view?usp=shari...
if you have already edited your gallery_setup.rpy be sure to copy over the changes you have made to this one before overwriting yours.
I chose a separate folder for the individual lock images, but you can combine them with the thumbnails (or anywhere really) just be sure to point to them correctly in the gallery_setup.rpy file
thank you so much!!!
Dude, thanks so much for sharing this code! I was already going crazy. This saved my life hahaha. I have a question, would it be very complicated to be able to play videos in this gallery?
you're welcome
yes, define your gallery image like this example:
image img1 = (Movie(channel="movie_dp", play = "images/movies/chapter1-1.webm"))
good luck with your project
Thank you very much, it worked perfectly! If you don't mind, I could share your itch.io page in my game credits as a thank you.
you can if you want to, i don't mind.
My game fails whenever I use the replay gallery as it doesn't remember my mcname, here is my code
$ mcname = renpy.input("What is your name?", default="Daniel")
$ mcname == mcname.strip()
if mcname == "":
$mcname = "Daniel"
Do you know how to fix this?
I'm going to assume this code is in your script for entering the character's name during the game...
first try it like this
$ mcname = renpy.input("What is your name?", default="Daniel").strip() or "Daniel"
$ persistent.name = mcname
then in your code at the labels for the replay do this
label replayLabelHowOriginal:
if _in_replay:
show screen Replayexit #the optional exit provided with the gallery
$ mcname = persistent.name #see what I did there...
that should fix your problem
You are the GOAT of renpy <3
I am just a well practiced idiot...
Hi! This gallery was so helpful! Thank you! I was wondering if there's a way to add a "credits" section to the Full CG when you open it up?
Full CG??
I do have a scrolling credits screen that you can use..
Oh I mean more like, adding a text box under the full image once you click it. I have some fanart for my game's gallery and I want to include something below it that says the artist's name
there is already the description that is shown on top of the image when it is unlocked, you can use that ??
Is there a way to move it lower so it's not at the top of the image?
yes there is, edit the gallery.rpy file
in it there are two --> grid maxnumx maxnumy: <-- the first is for the images, the second is for the text adjust the --> yalign 0.1 <-- (IN THE SECOND one only) to a larger number to move it down 0.5 will be in the middle of the image and 1.0 would be the bottom
thank you very much for the code
quick question, how would u make it so that each gallery page is viewed with a dissolve transition instead of it being instant?
you're welcome
no, there is only one page that gets changed when you go to another page
ah, so a transition can't be implemented huh
Sadly no it can not be done
you could do the initial showing of the first 6 when the gallery is first shown, but that would be all after that instant again
This gallery is really good, however I can't figure out how to add more pages. Could you please explain?
as you add more images, it will add more pages automatically and a next and previous button to change to them
Thank, figured it out <3
you're welcome
good luck with your project
Really appreciate this - I had a gallery working on a previous version of a VN and the new Python setup totally screwed it over, and very little I looked up managed to fix it. One snag I'm running into is that the images I had were locked by a persistent variable (if you got a certain game ending) which had previously been marked as "condition." There's 20 of these images, so I'm banging my head against a blanket check for all of them. Any insights would be highly appreciated!
is this for my gallery or your old gallery?
My gallery uses the renpy seen to unlock an image.
if you downloaded the files, there is a short tutorial in there as the VN. Use your renpy launcher and give it a read. It will show you how to unlock the images without the user seeing them in game
This is asking if you know a way to tweak your gallery function to unlock via persistent variables vs. seen. My old gallery has a lot of very arcane code in it that doesn't seem to translate easily, and I was wondering if you had more familiarity with those kind of unlockable parameters. :)
I'm sure it could be done that way, but if you're using my gallery just do a
show galleryimage
hide galleryimage
instead of setting a persistent.variable the image is not displayed and it gets unlocked in my gallery, you can do this multiple time to unlock more than one image at a time.
show galleryimage1
hide galleryimage1
show galleryimage2
hide galleryimage2
I think is great of you to share your vast knowledge with other Devs! I know this isn't your first time doing this! Anytime Devs collaborate, us Users benefit!
I don't know about vast...
But I do share the things I think others might be able to use in their projects
I've been figuring out how to add gallery to my adult VN. I'll give this a go, if that's OK by you.
That's why I put it up here so people can use it in their VN
Can I use this template to show video scenes? Is there much extra code for that?
Edit:
Figured it out. I just used the replay gallery and created new labels that only played the videos sequentially, instead of having it jump to the label in the game where the videos for the scene appears. This way I avoided the dialog, and making the user continually click through each video that makes up the scene.
I guess I was looking for a video replay gallery more than a "play this part of the game over again" thingy.
Anyways, thanks for posting this, not to mention all the help you provide on Reddit.
Really appreciate how -- if you run this in Ren'Py -- you've created a tutorial on how to use this gallery as part of a Ren'py project. Many of us pick up Ren'py to tell stories, and don't have formal training in programming. Having someone who knows what they're doing (you) explain how to use this asset properly really helps. Thanks!
I'm just glad you could find a use for it in your project.
When I finally finish this thing -- it's going to be at least a year yet -- I will try to get a free copy to you. Thanks again!
Thank you
Hey there! I'm developing my own VN right now and have it Published too. I have downloaded your Phone assets and now this. I would like to use it in my next Chapter of my Game, when I jump from Tyrano to Renpy. I would like to Credit you if that's ok. I know you uploaded it as creative common, but its the least I can do.
Yeah, sure, that's cool!!
Awesome :) Thank you, for all these assets. Its very helpful especially for someone who is still very beginner :) Thank you.
Thanks so much for sharing this!
You're welcome!!
This looks good will give it a go
Sweet! This might come in handy one day! :)
are you working on a VN?
Not actively yet, but I'm working on scripting outlines based on some ideas I've had in my head for a long time, and if the script outline works out to be something I think would work as a serious format AVN (not one of those 30 minute eroges, but several hours of story combined with some NSFW fun) I will try my hand at it!
I've picked up 3D rendering as a hobby recently, so I'll keep on practising on that in my spare free time, so I can hopefully make renders similar to your quality one of these days!
And I thought you deserved some cash for that effort!
Given the number of unfinished games on here, I have come to the conclusion that it is better to pay once a game is finished... But this is something that is useful and usable as it is, so...
Thank you.
I have a few other things on here for Renpy (they're free as well) !!
https://badmustard.itch.io/
Yeah, I saw those before, but at this time I don't see a use for those two yet...
Thanks for pointing them out though!
Awesome. Good luck with it !!!