Can't get Layered Images 'Variant Picker' to work
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
- Geckos
- Veteran
- Posts: 471
- Joined: Fri Aug 17, 2012 8:33 am
- Completed: Brilliant Shadows, Perceptions of the Dead, The Phantom Icecream Truck
- Projects: Embers of Magic, Pale Spectrum, Perceptions of the Dead
- Organization: Ithaqua Labs
- Tumblr: geckosart
- Deviantart: sitaart
- Contact:
Can't get Layered Images 'Variant Picker' to work
Didn't end up getting it working~ got more errors and abandoned the pursuit! May return to at a later date
Last edited by Geckos on Sun Sep 02, 2018 6:08 am, edited 6 times in total.
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: Can't get Layered Images 'Variant Picker' to work
It doesn't seem like you need a picker at all.
I use a picker because I want one keyword to pick multiple things. The Patreon article used a picker because it wanted to randomize which arms were shown. It looks like you just want to show some arms, not randomly, not as part of a multi-part conglomerate. You just want to show a variety of arms...which...you don't need a picker for.
Do you actually have variants? Because I'm not seeing any from the files you've provided. Assuming the files you showed are all the files we have, I'd get rid of the "1"s in your file name. And then I'd create your layered image like so:
I use a picker because I want one keyword to pick multiple things. The Patreon article used a picker because it wanted to randomize which arms were shown. It looks like you just want to show some arms, not randomly, not as part of a multi-part conglomerate. You just want to show a variety of arms...which...you don't need a picker for.
Do you actually have variants? Because I'm not seeing any from the files you've provided. Assuming the files you showed are all the files we have, I'd get rid of the "1"s in your file name. And then I'd create your layered image like so:
Code: Select all
layeredimage owen:
always "owen_base"
group collar auto prefix "collar":
attribute flat default
group face auto:
attribute neut default
group arms auto prefix "arms":
attribute down default
label start:
show owen at left
"This will show Owen."
show owen collar_up
"Now the collar is up."
show owen -collar_up
"Now the collar goes back to default, down."
show owen creepy arms_up
"Now Owen has a creepy face and also has his arms up."
"etc"
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
- Geckos
- Veteran
- Posts: 471
- Joined: Fri Aug 17, 2012 8:33 am
- Completed: Brilliant Shadows, Perceptions of the Dead, The Phantom Icecream Truck
- Projects: Embers of Magic, Pale Spectrum, Perceptions of the Dead
- Organization: Ithaqua Labs
- Tumblr: geckosart
- Deviantart: sitaart
- Contact:
Re: Can't get Layered Images 'Variant Picker' to work
Ya, it is set up pretty well that I can dictate arm positions easily. I just wanted certain expressions to pull from certain arm poses: i.e. Thoughtful only has arms_up, grumpy only has arms_cross, and for neut to random between the 3. It would take away a bit of my workload and pave the way for future, more complicated, sprites.trooper6 wrote: ↑Tue Aug 28, 2018 1:30 am It doesn't seem like you need a picker at all.
I use a picker because I want one keyword to pick multiple things. The Patreon article used a picker because it wanted to randomize which arms were shown. It looks like you just want to show some arms, not randomly, not as part of a multi-part conglomerate. You just want to show a variety of arms...which...you don't need a picker for.
Do you actually have variants? Because I'm not seeing any from the files you've provided. Assuming the files you showed are all the files we have, I'd get rid of the "1"s in your file name. And then I'd create your layered image like so:
Code: Select all
layeredimage owen: always "owen_base" group collar auto prefix "collar": attribute flat default group face auto: attribute neut default group arms auto prefix "arms": attribute down default label start: show owen at left "This will show Owen." show owen collar_up "Now the collar is up." show owen -collar_up "Now the collar goes back to default, down." show owen creepy arms_up "Now Owen has a creepy face and also has his arms up." "etc"
Last edited by Geckos on Tue Aug 28, 2018 9:21 am, edited 2 times in total.
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: Can't get Layered Images 'Variant Picker' to work
If what you want is random arm choices, then you should just exactly copy the code in the Patreon article. The Picker code you posted above, for example, doesn't match the Picker Code on the Patreon article.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
- Geckos
- Veteran
- Posts: 471
- Joined: Fri Aug 17, 2012 8:33 am
- Completed: Brilliant Shadows, Perceptions of the Dead, The Phantom Icecream Truck
- Projects: Embers of Magic, Pale Spectrum, Perceptions of the Dead
- Organization: Ithaqua Labs
- Tumblr: geckosart
- Deviantart: sitaart
- Contact:
Re: Can't get Layered Images 'Variant Picker' to work
Tried putting the additional line from the Patreon code, as well as few other variants I found while troubleshooting in the lemmasoft forums and still no dice. I suppose it's time I go and rename everything to match the swimsuit nonsense so I can at least see if the base code workstrooper6 wrote: ↑Tue Aug 28, 2018 1:30 am It doesn't seem like you need a picker at all.
I use a picker because I want one keyword to pick multiple things. The Patreon article used a picker because it wanted to randomize which arms were shown. It looks like you just want to show some arms, not randomly, not as part of a multi-part conglomerate. You just want to show a variety of arms...which...you don't need a picker for.
Do you actually have variants? Because I'm not seeing any from the files you've provided. Assuming the files you showed are all the files we have, I'd get rid of the "1"s in your file name. And then I'd create your layered image like so:
Code: Select all
layeredimage owen: always "owen_base" group collar auto prefix "collar": attribute flat default group face auto: attribute neut default group arms auto prefix "arms": attribute down default label start: show owen at left "This will show Owen." show owen collar_up "Now the collar is up." show owen -collar_up "Now the collar goes back to default, down." show owen creepy arms_up "Now Owen has a creepy face and also has his arms up." "etc"
*EDIT*
Sigh, so, I know building the sprite from the ground up let me understand more about what was going on, but a tiny piece of me is still like 'I can't believe that worked'
So I got the random arms working with this code:
Code: Select all
layeredimage owen:
attribute_function Picker([
"neut leftarm_hip",
"neut leftarm_back",
"neut leftarm_slack",
])
group body:
attribute swimsuit "owen_base_0"
attribute apron default "owen_base_1"
attribute shirt "owen_base_2"
group leftarm:
if_any "swimsuit"
attribute leftarm_slack "owen_leftarm_slack_0"
attribute leftarm_hip "owen_leftarm_hip_0"
attribute leftarm_back "owen_leftarm_back_0"
group leftarm:
if_not "swimsuit"
attribute leftarm_slack "owen_leftarm_slack_1"
attribute leftarm_hip "owen_leftarm_hip_1"
attribute leftarm_back "owen_leftarm_back_1"
group face:
attribute neut default
Thanks for helping me figure it out XD OTL <3
Who is online
Users browsing this forum: Andredron