I've seen various ren'py project which depict one or several characters with dynamic genders and/or pronouns.
It's not a simple thing to implement, so I wrote a python class to manage it from only one place in your project.
It regroups the Character object, the gender per se, the 3 pronouns, and it can be completed with anything a Person class would include - an inventory, or a set of flag variables related to this character for example.
There is also a system which calculates the pronouns directly from the gender, so you don't even have to fill all pronouns for each character yourself.
As the pronouns are properties of the class, they can be integrated with square-brackets in the dialogue lines (and probably in lots of other places where text is shown).
The script.rpy file show how to use it and integrate with dialogue.
The full code is available here, on my Github.
PronounsClass to manage the pronouns of one or several characters
Forum rules
Do not post questions here!
This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Do not post questions here!
This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
-
- Newbie
- Posts: 23
- Joined: Thu Aug 06, 2020 9:27 am
- Github: Gouvernathor
- Discord: Armise#6515
- Contact:
Who is online
Users browsing this forum: No registered users