Using Live2D on a character with two possible appearances

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
CephalonKet
Newbie
Posts: 7
Joined: Sun Apr 28, 2024 12:27 pm
Contact:

Using Live2D on a character with two possible appearances

#1 Post by CephalonKet »

Hello again everyone! I still haven't solved my previous issue regarding maps but I have another thing I'm working on and would love your assistance.

So the MC will have two possible appearances, masc and fem. I've made this work when it comes to the idle png.

Now I'm facing two issues:

One, how do I make this:

Code: Select all

label genderchoice:
    image mymc = ConditionSwitch(
    "gender=='masc'", "mc_masc.png",
    "gender=='fem'", "my_fem.png")
    "You are now [gender]"
Use my Live2D version? I know that I have to define the Live2D using a code like this:

Code: Select all

image mc_fem = Live2D("images/mc_fem", default_fade=0.0, loop=True)
But how do I successfully add this to the condition switch? Nothing I've tried so far has worked.

My second issue is, the expressions. Even with the png version of the mc, I don't know how to make it so the character switches to the masc or fem equivalent successfully. I tried to trick the system by making two folders in my images, one named masc and the other fem, and making the same named files for the expressions inside (ex. 'mymc happy.png' in both folders), but it's not working, it only seems to default to the fem version. How can I make this work?

Thank you for your time.

CephalonKet
Newbie
Posts: 7
Joined: Sun Apr 28, 2024 12:27 pm
Contact:

Re: Using Live2D on a character with two possible appearances

#2 Post by CephalonKet »

I figured it out for anybody that might have a similar issue.

you make 2 live2d folders, one for masc one for fem.

Then define them like so

Code: Select all

image mc_fem = Live2D("images/mc_fem", default_fade=0.0, loop=True)

##Then make Condition switches like these:

image mc idle = ConditionSwitch(
    "gender == 'masc'", "mc_masc idle",
    "True", "mc_fem idle"
) 

Post Reply

Who is online

Users browsing this forum: Google [Bot]