Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Heya! Love this template so much <333

I had a question about the image gallery - mainly the locking/unlocking of images, and how to control that? For example, I'd like to allow access to images slowly as the game progresses.

I've been staring at the.rpy files for the gallery and I think I'm just too much of a novice to intuit how it's working, so I hope it's not too much trouble to ask here haha! apologies if it turns out to be obvious ^^;

Hello! In each gallery script, at the top where you define the buttons/add the images you'll notice a line that looks like

g.condition("persistent.pg1_1")

This basically ties the 'availability' to a variable. If that variable is true, the image is unlocked, if false, locked. Now, variables usually reset when a new playthrough is started, that's why 'persistent.' is added, so it becomes a persistent variable and once the image is unlocked, it stays unlocked no matter.

So, to unlock an image in the script, the first on the first page in this case, you'd write:

$ persistent.pg1_1 = True

I recommend reading through the Gallery and Persistent Data part of the documentation as well as maybe Visual Novel Design's general Ren'py quickstart video (variables are in the chapter 'Some Math is Involved')

I SEE I figured some variable situation was happening but didn't put it together all the way aaa

You are a lifesaver truly, thank you so much!!!!!!!