Like how to take this kind of code to apply it to all of the other characters simultaneously.
Code: Select all
if gender == "male":
$pgender_they = "he"
$pgender_them = "him"
$pgender_their = "his"
Code: Select all
if gender == "male":
$pgender_they = "he"
$pgender_them = "him"
$pgender_their = "his"
Code: Select all
default males = ["Bob", "Joe"]
default females = ["Eileen", "Lucy"]
python:
def getThey(name):
if name in males:
return "he"
elif name in females:
return "she"
else:
return "they"
def getThem(name):
if name in males:
return "him"
elif name in females:
return "her"
else:
return "them"
def getTheir(name):
if name in males:
return "his"
elif name in females:
return "hers"
else:
return "their"
hmmm, that's definitely useful but I'm not sure if it's exactly what I'm looking for. Basically-- from the get go every NPC character is ambiguous in gender so I figure all of their pronouns would be a defined term/variable (probably defaulted at they/them/theirs)Empish wrote: ↑Mon Jan 01, 2018 7:12 pm I think what most people do is only make the main character change pronouns based on the gender. The other ones are fixed and therefore just written into dialogue normally.
But if you want to have multiple characters that can be different genders, you can either define a set of pronouns for each, or do something like this:
Code: Select all
"I saw [pgender_them] get out of [pgender_their] car."
Oh damn, that's simple. Thanks a ton!Empish wrote: ↑Mon Jan 01, 2018 7:31 pm Oh, okay. That makes it much easier. Then you just have to define your three pronouns the way you did in your first post, and use interpolation to have the right one inserted into the dialogue.
Code: Select all
"I saw [pgender_them] get out of [pgender_their] car."
Thanks both of you. Yeah, I hadn't thought about that. I've mostly been concerned about making sure its functional and grammatically correct. I'll keep that in mind!
Code: Select all
label give_gender:
$ gender = renpy.input("What are your pronouns?")
$ gender = name.strip()
if gender == "he":
$ they = "he"
$ them = "him"
$ theirs = "his"
$ They = "He"
$ Them = "Him"
$ Theirs = "His"
if gender == "she":
$ they = "she"
$ them = "her"
$ theirs = "hers"
$ They = "She"
$ Them = "Her"
$ Theirs = "Hers"
if gender == "they":
$ they = "they"
$ them = "them"
$ theirs = "theirs"
$ They = "They"
$ Them = "Them"
$ Theirs = "Theirs"
return
Code: Select all
def they = Pronounthey("[they]")
def them = Pronounthem("[them]")
def theirs = Pronountheirs("[theirs]")
def They = PronountheyC("[They]")
def Them = PronounthemC("[Them]")
def Theirs = PronountheirsC("[Theirs]")
Code: Select all
label give_gender:
menu:
"What are your pronouns?"
"He":
$ gender = "he"
"She":
$ gender = "she"
"They":
$ gender = "they"
if gender == "he":
$ they = "he"
$ them = "him"
$ their = "his"
$ theirs = "his"
$ They = "He"
$ Them = "Him"
$ Theirs = "His"
$ were = "was"
$ s = "s"
$ es = "es"
$ selves = "self"
elif gender == "she":
$ they = "she"
$ them = "her"
$ their = "her"
$ theirs = "hers"
$ They = "She"
$ Them = "Her"
$ Theirs = "Hers"
$ were = "was"
$ s = "s"
$ es = "es"
$ selves = "self"
elif gender == "they":
$ they = "they"
$ them = "them"
$ their = "their"
$ theirs = "theirs"
$ They = "They"
$ Them = "Them"
$ Theirs = "Theirs"
$ were = "were"
$ s = ""
$ es = ""
$ selves = "selves"
return
label start:
call give_gender
"You overhear Lucie talking about you..."
"Lucie" "Can you believe it? I've seen [them] walking by the park with [their] dog... [They] [were] talking to [them][selves] as crazy people do! Creepy, isn't it?"
"Eileen" "Mmmm. Maybe [they] [were] simply talking on the phone with earphones..."
"Lucie" "No, no! I'm telling you. [They] talk[s] to [them][selves]!"
"Eileen is not convinced. [They] raise[s] an eyebrow..."
"Eileen" "Do[es] [they]?"
This worked perfectly! Thank you so much, It'll take a bit to make sure all the grammar works but I got some grammar fixed for are vs is!xavimat wrote: ↑Sat Jan 20, 2018 9:57 am (PLEASE FORGIVE MY BAD ENGLISH GRAMMAR...)
"Eileen" "Do[es] [they]?"[/code]Note the variables "s" and "es" for the third person verbs; they make some sentences not real English (for example: "[They] do[es]"); but if you pick "he" or "she" as a default, the sentences will be -mostly- real English with added brackets ("[She] do[es]?").
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "renpy/common/00start.rpy", line 120, in script
return
Exception: Could not find return label (u'C:\\Users\\monkey\\Desktop\\DATEKNIGHTGAME\\DATE KNIGHT/game/script.rpy', 1516462077, 9).
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "renpy/common/00start.rpy", line 120, in script
return
File "C:\Users\monkey\Downloads\renpy-6.99.13-sdk\renpy\ast.py", line 1400, in execute
next_node(renpy.game.context().lookup_return(pop=True))
File "C:\Users\monkey\Downloads\renpy-6.99.13-sdk\renpy\execution.py", line 586, in lookup_return
raise Exception("Could not find return label {!r}.".format(self.return_stack[-1]))
Exception: Could not find return label (u'C:\\Users\\monkey\\Desktop\\DATEKNIGHTGAME\\DATE KNIGHT/game/script.rpy', 1516462077, 9).
Windows-8-6.2.9200
Ren'Py 6.99.13.2919
DATE KNIGHT 0.1
Code: Select all
label give_gender:
menu:
"What are your pronouns?"
"He":
$ gender = "he"
"She":
$ gender = "she"
"They":
$ gender = "they"
if gender == "he":
$ they = "he"
$ them = "him"
$ their = "his"
$ theirs = "his"
$ They = "He"
$ Them = "Him"
$ Theirs = "His"
$ were = "was"
$ s = "s"
$ es = "es"
$ selves = "self"
$ aree = "is"
$ ss = "s"
$ ess = "s"
elif gender == "she":
$ they = "she"
$ them = "her"
$ their = "her"
$ theirs = "hers"
$ They = "She"
$ Them = "Her"
$ Theirs = "Hers"
$ were = "was"
$ s = "s"
$ es = "s"
$ selves = "self"
$ aree = "is"
$ ss = "s"
$ ess = "s"
elif gender == "they":
$ they = "they"
$ them = "them"
$ their = "their"
$ theirs = "theirs"
$ They = "They"
$ Them = "Them"
$ Theirs = "Theirs"
$ were = "were"
$ s = ""
$ es = ""
$ selves = "selves"
$ aree = "are"
$ ss = "re"
$ ess = "ve"
Is an unrelated issue. In the code you posted there is no "return" at the end.Could not find return label
Ah-- I thought you only needed one return since it ends the game, right? I have it in the very end of my script.
Users browsing this forum: No registered users