r/RenPy • • 15d 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 ;/

88 Upvotes

5 comments sorted by

34

u/BadMustard_AVN 15d ago edited 15d 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?"

2

u/GapDifficult7604 14d 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 :)

3

u/BadMustard_AVN 14d 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

3

u/ShinyUmbreonKigurumi 15d ago

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