Skip to main content

Gallery

Open kit_options.rpy and locate the following line:

define gallery.enabled = False

Replace False with True. It should now look like this:

define gallery.enabled = True

Locate the following line:

define gallery.items = []

Add your image names inside the list surrounded by double-quotes, seperated by commas. For example, this is how you would add the images school, outside, and classroom to the gallery:

define gallery.items = ["school", "outside", "classroom"]

Images with variations

Sometimes, you want one button in the gallery to contain multiple images. To do so, wrap the image names in another list. For example, if you had the variations outsideDay, outsideNoon, and outsideNight, it would look like this:

define gallery.items = ["school", ["outsideDay", "outsideNoon", "outsideNight"], "classroom"]

If you have images with variations in the gallery, there is another option, strict_multiple that can be customized. By default, this is True, which means the button will only unlock if all variations are seen. If it's set to False, the button will unlock even if all variations are not seen.

Variable Mode

Sometimes, you'll want to unlock CGs based on variables instead of whether the player has seen the CG yet or not. In order to do so, you can use variable mode.

Locate the following line in kit_options.rpy:

define gallery.variable_mode = False

Replace False with True. It should now look like this:

define gallery.variable_mode = True

Next, locate the following line:

define gallery.items = []

Add items to the list in the following format, seperated by commas:

{"image": "Image Name", "variable": "variable_name"}

If you would like multiple images in a single button, this is the format:

{ "image": ["Image 1", "Image 2", "Image 3"], "variable": "variable_name"}
note

Make sure to use peristent variables to ensure the images are actually unlocked. Learn about persistent variables in the Official RenPy Documentation

Here, Image Name should be replaced with the name of the image, and variable_name should be replaced with the name of the variable. An example of a list of CGs in variable mode would be like this:

define gallery.items = [
{ "image": "pool", "variable": "persistent.finished"},
{ "image": "park", "variable": "persistent.finished"},
{ "image": "school", "variable": "persistent.finished"},
{ "image": ["outside", "outside_night", "outside_light"], "variable": "persistent.finished"}
]