I am a newbie to all this. I barely know python language and i'm barely advancing with my project little by little. I am trying to set up a gallery for a project but no tutorial, video, or script works for me. I get errors such as "cannot find image.png" or "not displayable" or something. I have my own test cgs (stick figures in colored backgrounds in 1920x1080). The best i have is this:
what this does is that it displays the first image in full screen. At least the return button works.
I try to look up tutorials but they all use code that looks nothing like each other. If i try to copy paste other codes for thumbnails i just get errors, even after renaming the files with my pictures.
Visiting the renpy library doesnt help either
What i want to do is have a gallery for characters scenes. Like a screen with "characters a b or c" that takes you to their gallery for their scenes.
I am really starting to lose hope since a gallery is basically mandatory for a visual novel.
Code:
# defining sample images
init:
image cg1 = "ch1_cg1.png"
image cg2 = "ch1_cg1.png"
image cg3 = "ch1_cg3.png"
image cg4 = "ch2_cg1.png"
image cg5 = "ch2_cg2.png"
image cg6 = "ch2_cg3.png"
image cg7 = "ch3_cg1.png"
image cg8 = "ch3_cg2.png"
image cg9 = "ch3_cg3.png"
image cg10 = "extracg1.png"
image cg11 = "extracg2.png"
image cg12 = "extracg3.png"
# defining gallery
init python:
g = Gallery()
g.button("cg1")
g.unlock_image("ch1_cg1")
g.button("cg2")
g.unlock_image("ch1_cg2")
g.button("cg3")
g.unlock_image("cgh!_cg3")
g.transition = dissolve
screen gallery():
default gallery_page = 1
tag menu
add "gui/gallery_bg.jpg"
$ gallery_char_column_max = 3
$ gallery_char_row_max = 2
$ gallery_max_chars_per_page = gallery_char_column_max * gallery_char_row_max
vbox:
# ("cg number, file name without png/jpg extension)
add g.make_button("cg1", "ch1_cg1", xalign=0.5, yalign=0.5 )
add g.make_button("cg2", "ch1_cg2", xalign=0.5, yalign=0.5 )
add g.make_button("cg3", "ch1_cg2", xalign=0.5, yalign=0.5 )
textbutton "Return" action Return() xalign 0.5 yalign 0.9
I try to look up tutorials but they all use code that looks nothing like each other. If i try to copy paste other codes for thumbnails i just get errors, even after renaming the files with my pictures.
Visiting the renpy library doesnt help either
What i want to do is have a gallery for characters scenes. Like a screen with "characters a b or c" that takes you to their gallery for their scenes.
I am really starting to lose hope since a gallery is basically mandatory for a visual novel.