Skip to content

Commit

Permalink
update the pronoun code now afte release
Browse files Browse the repository at this point in the history
  • Loading branch information
Bronya-Rand committed Aug 7, 2021
1 parent 5fec67c commit 1bb3050
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 46 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Follow these steps to set up the template for Ren'Py 7.
6. Xcode Support! Open this project in Xcode and you can edit, build, and run your mod without opening the Ren'Py Launcher ever again!
> Note: You need to change your `RENPY_TOOL` location and the Ren'Py app location in the target scheme for Xcode. [Learn more ›](XCODE.md)
7. [BETA] Pronoun Support! Allow users to identify with what pronoun they go by!
> This works best with `He/Him`, `She/Her`, and `They/Them` pronouns but this can be expanded on as much as you like.
> This works best with `He/Him`, `She/Her`, and `They/Them` pronouns but this can be expanded on as much as you like. Make sure to call `finishPronouns()` in your script after a pronoun is selected! See *pronoun_example.rpy* for a example on how to use this feature.
### Added Features
1. Terra's In-Depth Poem Game Guide!
Expand Down
31 changes: 24 additions & 7 deletions game/definitions.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ init python:
renpy.pause(time)
#_windows_hidden = False

# Sets pronouns finalizations to the game.
def finishPronouns():
heC = he.capitalize()
himC = him.capitalize()
areC = are.capitalize()
hesC = hes.capitalize()
persistent.he = he
persistent.him = him
persistent.are = are
persistent.hes = hes

# Music

# This section is where you can reference DDLC audio and add your own!
Expand Down Expand Up @@ -1351,13 +1362,19 @@ define _dismiss_pause = config.developer
# [BETA] Pronoun Variables
## This section adds the feature to use player pronouns within the game text easily.
## To use this feature, simply ask the user for their pronoun and use it here.
## For capitalization, use pronoun1C or pronoun2C
default persistent.pronoun1 = ""
default persistent.pronoun2 = ""
default pronoun1 = persistent.pronoun1
default pronoun2 = persistent.pronoun2
default pronoun1C = persistent.pronoun1.capitalize()
default pronoun2C = persistent.pronoun2.capitalize()
## For capitalization, use heC, himC, areC and hesC
default persistent.he = ""
default persistent.him = ""
default persistent.are = ""
default persistent.hes = ""
default he = persistent.he
default him = persistent.him
default are = persistent.are
default hes = persistent.hes
default heC = persistent.he.capitalize()
default himC = persistent.him.capitalize()
default areC = persistent.are.capitalize()
default hesC = persistent.hes.capitalize()

# Persistent Variables

Expand Down
80 changes: 42 additions & 38 deletions game/pronoun_example.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -13,64 +13,68 @@ label pronoun_menu:
menu:
"What is your pronoun?"
"He/Him":
$ pronoun1 = "he"
$ pronoun2 = "him"
$ pronoun1C = pronoun1.capitalize()
$ pronoun2C = pronoun2.capitalize()
$ persistent.pronoun1 = pronoun1
$ persistent.pronoun2 = pronoun2
$ he = "he"
$ him = "him"
$ are = "is"
$ hes = "he's"
$ heC = he.capitalize()
$ himC = him.capitalize()
$ areC = are.capitalize()
$ hesC = hes.capitalize()

"Set Pronoun to He/Him."
$ renpy.jump('pronoun_menu')
"She/Her":
$ pronoun1 = "she"
$ pronoun2 = "her"
$ pronoun1C = pronoun1.capitalize()
$ pronoun2C = pronoun2.capitalize()
$ persistent.pronoun1 = pronoun1
$ persistent.pronoun2 = pronoun2
$ he = "she"
$ him = "her"
$ are = "is"
$ hes = "she's"
$ heC = he.capitalize()
$ himC = him.capitalize()
$ areC = are.capitalize()
$ hesC = hes.capitalize()
python:
finishPronouns()

"Set Pronoun to She/Her."
$ renpy.jump('pronoun_menu')
"They/Them":
$ pronoun1 = "they"
$ pronoun2 = "them"
$ pronoun1C = pronoun1.capitalize()
$ pronoun2C = pronoun2.capitalize()
$ persistent.pronoun1 = pronoun1
$ persistent.pronoun2 = pronoun2
$ he = "they"
$ him = "them"
$ are = "are"
$ hes = "they're"
$ heC = he.capitalize()
$ himC = him.capitalize()
$ areC = are.capitalize()
$ hesC = hes.capitalize()
python:
finishPronouns()

"Set Pronoun to They/Them."
$ renpy.jump('pronoun_menu')
"Current Pronoun":
if not pronoun1 and not pronoun2:
if not he:
"You have yet set a pronoun."
else:
"Your current pronoun is [pronoun1C]/[pronoun2C]."
"Your current pronoun is [heC]/[himC]."
$ renpy.jump('pronoun_menu')
"Play a sample.":
if not pronoun1 and not pronoun2:
if not he:
"You have yet set a pronoun. Set one up before proceeding."
$ renpy.jump('pronoun_menu')
mc "My pronouns are [pronoun1]/[pronoun2]."
if pronoun1 == "they":
m "[pronoun1C] are here to learn about how dense [pronoun1] really are."
else:
m "[pronoun1C] is here to learn about how dense [pronoun1] really is."
s "Don't say mean things to [pronoun2]!"
n "I don't like the looks of [pronoun2]."
if pronoun1 == "they":
y "A-Are [pronoun1] going to be okay?"
else:
y "I-Is [pronoun1] going to be okay?"
mc "My pronouns are [he]/[him]."
m "[hesC] here to learn about how dense [he] really [are]."
s "Don't say mean things to [him]!"
n "I don't like the looks of [him]."
y "[areC[0]]-[areC] [he] going to be okay?"
$ renpy.jump('pronoun_menu')
"Clear Pronouns":
$ pronoun1 = ""
$ pronoun2 = ""
$ pronoun1C = ""
$ pronoun2C = ""
$ persistent.pronoun1 = pronoun1
$ persistent.pronoun2 = pronoun2
$ he = ""
$ him = ""
$ are = ""
$ hes = ""
python:
finishPronouns()

"Cleared all Pronouns."
$ renpy.jump('pronoun_menu')
Expand Down

0 comments on commit 1bb3050

Please sign in to comment.