I want to add a customization scene in my game, so I investigated and got to leon's tutorial and to BáiYù's tutorial. I've also read the Renpy documentation and I think I have a better understanding, but still there are many things I'm strugging with:
For what I understood LiveComposite and Layeredimages are used for the same, but Layered is a newer version and allows for a shorter code. Either way, I don't know what I'm doing wrong, I tried first with LiveComposite (though, looking back now, I think I have an idea of what I did wrong) and now I tried with Layered,but I think I still don't know how it's done:
Code: Select all
init -1:
layeredimage PPf:
always:
"piel2f"
group piel:
attribute piel1f:
"piel1f"
attribute piel2f:
"piel2f"
attribute piel3f:
"piel3f"
attribute piel4f:
"piel4f"
On this topic, can I have a group inside another group? I have 3 different eye shapes, but I also have, for each of those shapes, 4 different colours, and the same goes for the hair and clothes, or do I have to leave it like this?:
Code: Select all
group ojos:
attribute ojos1mf default:
"ojos1mf"
attribute ojos1af:
"ojos1af"
attribute ojos1gf:
"ojos1gf"
attribute ojos1vf:
"ojos1vf"
attribute ojos2mf:
"ojos2mf"
And (I know these are too many questions, but I think they're too connected) finally, for the customization part, I adapted BaiYu's and Leon's example to show what I needed (instead of Agustina's glasses or outfit, my character's outfit, eyes, and everything else), but first, it wouldn't show up as "there was no label tu jump to/call" and now that I've written a label, it'll just ignore it completly and go straight to the menu I put to confirm that's the wanted customization:
Code: Select all
### Dress-Up Screen
# Adapted from leon's [tutorial] Dress up game thread
# https://lemmasoft.renai.us/forums/viewtopic.php?f=51&t=14559
init python:
piel, ropa, labios, ojos, pelo = 2, 1, 1, 1, 20 # default dressup items
piel_num, ropa_num, labios_num, ojos_num, pelo_num = 4, 13, 3, 12, 1 # number of styles for each dressup item
label dress_up:
screen dressup_example():
## Ensure this appears on top of other screens.
zorder 100
hbox:
xalign 0.5
yalign 0.15
spacing 400
textbutton _("<") action SetVariable('piel', max(piel-1,0))
textbutton _(">") action SetVariable('piel',min(piel+1,piel_num))
add "PPf" xalign 0.5
hbox:
xalign 0.5
yalign 0.15
spacing 400
textbutton _("<") action SetVariable('ropa', max(ropa-1,0))
textbutton _(">") action SetVariable('ropa',min(ropa+1,ropa_num))
hbox:
xalign 0.5
yalign 0.15
spacing 400
textbutton _("<") action SetVariable('labios', max(labios-1,0))
textbutton _(">") action SetVariable('labios',min(labios+1,labios_num))
hbox:
xalign 0.5
yalign 0.5
spacing 400
textbutton _("<") action SetVariable('ojos', max(ojos-1,0))
textbutton _(">") action SetVariable('ojos',min(ojos+1,ojos_num))
hbox:
xalign 0.5
yalign 0.5
spacing 400
textbutton _("<") action SetVariable('pelo', max(pelo-1,0))
textbutton _(">") action SetVariable('pelo',min(pelo+1,pelo_num))
textbutton _("Hecho") action Jump('dressup_game') xalign 0.99 yalign 1.0
label dressup_game:
show hr_neutralab with dissolve
hr "Have you finished?"
menu:
"Yes":
Thank you in advance