Contribution by Griatch 2015
This is a simple gender-aware Character class for allowing users to insert custom markers in their text to indicate gender-aware messaging. It relies on a modified msg() and is meant as an inspiration and starting point to how to do stuff like this.
An object can have the following genders:
Import and add the
SetGender command to your default cmdset in
# mygame/commands/default_cmdsets.py # ... from evennia.contrib.game_systems.gendersub import SetGender # <--- # ... class CharacterCmdSet(default_cmds.CharacterCmdSet): # ... def at_cmdset_creation(self): # ... self.add(SetGender()) # <---
Character inherit from
# mygame/typeclasses/characters.py # ... from evennia.contrib.game_systems.gendersub import GenderCharacter # <--- class Character(GenderCharacter): # <--- # ...
Reload the server (
evennia reload or
reload from inside the game).
When in use, messages can contain special tags to indicate pronouns gendered based on the one being addressed. Capitalization will be retained.
|S: Subjective form: he, she, it, He, She, It, They
|O: Objective form: him, her, it, Him, Her, It, Them
|P: Possessive form: his, her, its, His, Her, Its, Their
|A: Absolute Possessive form: his, hers, its, His, Hers, Its, Theirs
char.msg("%s falls on |p face with a thud." % char.key) "Tom falls on his face with a thud"
The default gender is “ambiguous” (they/them/their/theirs).
To use, have DefaultCharacter inherit from this, or change setting.DEFAULT_CHARACTER to point to this class.
gender command is used to set the gender. It needs to be added to the
default cmdset before it becomes available.
This document page is generated from
evennia/contrib/game_systems/gendersub/README.md. Changes to this
file will be overwritten, so edit that file rather than this one.