MV Is there a more efficient way to handle character gender selection?

Previously I mentioned that I'm planning to implement a psych test like system to toggle player gender, pronouns, personality type, and whether or not the love interests are male or female.

I managed to implement player gender and pronouns, but I'm having trouble implementing the rest of the love interest (personality type is another post on its own because I realize its better utilized in interrogation/battle segments than in story)

The love interests are 9 in total, 5 of them has different face portraits depending on what gender the player chooses, while 4 of them has gender-neutral portraits so player choice doesn't matter, plus a pair of different gender twins that depending on player choice will have the player follow the male twin or female twin route. But because of the sheer variety I've run into a problem on how to efficiently write down the conditions without it looking like a wall of text

I tried using the 0 to 1 variable thingies (I'm basically illiterate at coding so apologies if I butcher coding names 🙁 ), to make it so that 0 = male while 1 = female but it doesn't show the changed portrait (I would assume my problem also extends to how other characters refer the love interests pronouns but I still do not know because I'm still focusing on how to make the portraits change)

I can manually put if statements, but again writing down at least 16 and more different variations for character alone is exhausting, and I want to know a more streamlined way to change character gender

I would absolutely be happy with plugins (at the meantime I could only use free ones that can also be used for commercial projects), but if I have to do it manually I can do it, hopefully

Here's a video of the character gender selector I implemented not working properly
I didn't check all the screenshots, but can't you do it like this (looking at the screenshots I assume the love interests are actors):

Ask the player gender choice -> on selection switch ON/OFF (or variable 0/1)

Ask the player pronouns choice -> on selection store the selection in a variable (same variable in all choices)

Ask player love interest gender choice -> if men: do nothing (use faces already set in database), if women: change the faces of the 5 necessary

If there's something more complicated than that, I'm not sure you're giving all the information in your post. Like why do you have to write 16 conditionals?
I didn't check all the screenshots, but can't you do it like this (looking at the screenshots I assume the love interests are actors):

Ask the player gender choice -> on selection switch ON/OFF (or variable 0/1)

Ask the player pronouns choice -> on selection store the selection in a variable (same variable in all choices)

Ask player love interest gender choice -> if men: do nothing (use faces already set in database), if women: change the faces of the 5 necessary

If there's something more complicated than that, I'm not sure you're giving all the information in your post. Like why do you have to write 16 conditionals?
Oh! I think I can give this a try!

PS. the 16 conditionals are basically the total variety of love interest present, by meaning their portraits (with different portraits, 5 male, 5 female + with same portraits 4 characters + a pair of twins)
I looked at all of your screenshots and I must say that I'm very confused at what you are doing. Partially because you are using placeholder (?) text that you understand, but no one else does.

But one thing you could research more is using arrays. You could assign each love interest a number 1-16. Then, as part of your initial set up, you identify which love interest is applicable to the player and add those applicable numbers to a love interest array.

Then, at the appropriate points where you might need to check, you can just compare the number associated with the current NPC (potential love interest) that the player is dealing with against the numbers contained in the love interest array. That is pretty easy using the concept of .includes.

Depending on how you are designing your interactions, that could make things easier and require less conditional checks.

If the array includes that number of that NPC, then you go down one path, else you go down an alternate path.

Learning to use some simple Javascript code in the Script options in the Event Commands isn't terribly difficult. Some of my tutorials cover doing different things with arrays, but you can find all kinds of helpful information on using Javascript arrays just by searching for that subject.

It might take you a little bit to learn about arrays and experiment with how to use them. But once you do, they can unlock a lot of cool possibilities.

Anyway, just a thought and something you might want to look into.

Good luck on your project and remember to enjoy what you do!
I looked at all of your screenshots and I must say that I'm very confused at what you are doing. Partially because you are using placeholder (?) text that you understand, but no one else does.

But one thing you could research more is using arrays. You could assign each love interest a number 1-16. Then, as part of your initial set up, you identify which love interest is applicable to the player and add those applicable numbers to a love interest array.

Then, at the appropriate points where you might need to check, you can just compare the number associated with the current NPC (potential love interest) that the player is dealing with against the numbers contained in the love interest array. That is pretty easy using the concept of .includes.

Depending on how you are designing your interactions, that could make things easier and require less conditional checks.

If the array includes that number of that NPC, then you go down one path, else you go down an alternate path.

Learning to use some simple Javascript code in the Script options in the Event Commands isn't terribly difficult. Some of my tutorials cover doing different things with arrays, but you can find all kinds of helpful information on using Javascript arrays just by searching for that subject.

It might take you a little bit to learn about arrays and experiment with how to use them. But once you do, they can unlock a lot of cool possibilities.

Anyway, just a thought and something you might want to look into.

Good luck on your project and remember to enjoy what you do!
Yeah, I'm horrible at gaming logic so I did what I could

I've figured out how to assign love interests gender now, I just need to put pronouns in and I'd know if it works for the long run or not

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-more-efficient-way-to-handle-character-gender-selection.181024/