Can't get Layered Images 'Variant Picker' to work
Posted: Tue Aug 28, 2018 12:35 am
Didn't end up getting it working~ got more errors and abandoned the pursuit! May return to at a later date
Supporting creators of visual novels and story-based games since 2003.
https://lemmasoft.renai.us/forums/
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"
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"
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"
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