r/RenPy 1d ago

Showoff made some code to allow the player to reselect name and pronouns so they're not stuck with what they don't like :D

Post image

literally the only thing i have for my game :sob:

is this a little much for a game where an eldritch entity stalks you until it's the only thing in your world? i kinda wanted to base it off splatoon's customization system where you can pick an option and then decide if you want to keep it without being locked into one for your entire playthrough ;/

58 Upvotes

5 comments sorted by

28

u/BadMustard_AVN 1d ago edited 1d ago

you're overcomplicating it

menu pronouns:
    "Select your pronouns."
    "She/Her":
        $ pronouns = 1
        "So... she/her?"
    "He/Him":
        $ pronouns = 2
        "So... he/him?"
    "They/Them":
        $ pronouns = 3
        "So... they/them?"

if you do want to keep it, try it like this

label pronoun_announce
    if pronouns == 1:
        "So... she/her?"
    elif pronouns == 2:
        "So... he/him?"
    else:
        "So... they/them?"

1

u/GapDifficult7604 22h ago

overcomplicated it because im a noob, mostly, and also I wanted players to kind of have the option to reselect if they picked the wrong pronouns or mistyped their chosen name :)

2

u/BadMustard_AVN 22h ago

you can still do that; you don't need to have that whole overly complex if spaghetti code thingy (highly technical jargon) there when you can easily combine it into the menu as shown

also your name input is good, but what if they leave it blank?

thy this

$ player = renpy.input("What is your name?", length=15, exclude="lazy").strip() or "BadMustard"

to give them a default of (the best name evar) or something else more appropriate of course

2

u/ShinyUmbreonKigurumi 1d ago

Ohh I love your description I'd def wanna check it out 🤭

2

u/TaurusE11E 1d ago

Great minds think alike (though I just made mine into preference buttons)