Gender Nonbinary Leaders
Would you like your leaders to have a chance to have gender identities that vary from the gender presentation of their portraits? Do you want your leaders to be able to use "they" pronouns? Then this mod is for you!
The effects are more noticeable for species portraits that have sexual dimorphism, but that is not a requirement.
Stellaris supports 3 gender states in code (male, female, indeterminable), which correspond to the pronouns he, she, and they. Whether a species uses binary male/female genders or the indeterminable gender is determined by its species class (e.g. molluscoid or fungoid). This mod adds a chance for the binary-gendered species classes to have leaders adopt a new gender identity when they are spawned by the game (24% chance to consider changing their gender identity – 8% each to identify as indeterminable, female, or male).
With this mod, leaders of a binary-gendered species who become indeterminable have a 50/50 chance of presenting as feminine or masculine, and leaders who become female/male (or do not change from their starting gender) have a 10% chance to present as the opposite normative gender in their portrait. In order to implement this effect, it was necessary to redefine the portrait groups associated with each species.
What this means to you is that most leader portrait mods will need a compatibility patch in order to properly respect the leader’s gender presentation flag. Without a patch, males will always present as masculine, females will present as feminine, and indeterminables will present as the default for the species. Fun fact: some built-in species use the female portrait as default, but most use male.
Because Stellaris does not provide a scriptable way to check whether a species class is set to use binary genders or not, this mod uses a hard-coded list of the built-in species classes known to use binary genders. In addition, gender = yes is the default for custom species classes, so this mod assumes any unrecognized species classes are binary-gendered.
What this means to you is that if you have a custom species class that is set to gender = no this mod will still think it is gendered and roll for a chance to change a leader’s gender identity when they spawn. It does not randomize the gender identity for the built-in species classes that are set to gender = no: fungoid, plantoid, lithoid, machine, robot, and all the crisis species.
This mod optionally adds copious log entries to game.log file when running; use the in-game console to enable it with event nonbinary_leaders.3. Here’s where you can find the game.log file: %USERPROFILE%DocumentsParadox InteractiveStellarislogs (Windows), ~/Documents/Paradox Interactive/Stellaris/logs (MacOS), or ~/.local/share/Paradox Interactive/Stellaris/logs (*nix). To turn tracing off again, use the same command again.
Lastly, you can log detailed information about all of your leaders (owned and pool) to game.log by firing my debugging event from the in-game console: event nonbinary_leaders.1000.
This mod is implemented via an event attached to on_leader_spawned to add the % chance to reroll a leader’s gender identity. That part should be widely compatible with other mods, including my other mods that also affect leader spawning.
As discussed above, a compatibility patch is necessary to fully support varying gender presentation for other mods that add species portraits. By default, this mod supports all the built-in, gendered species classes and any sexually dimorphic species in each class.
If you would like me to implement a compatibility patch (to support feminine/masculine presentation from sexual dimorphism and/or to respect a custom species class as non-gendered), please leave a comment asking nicely, what you want, and with a link to the mod you want to be compatible.
Built for Stellaris version 3.1.* "Lem." Not compatible with achievements.
This mod can be added to or removed from your savegame safely without issue. If you remove this mod, existing leaders will remain as-is but new leaders will only spawn to match the gender usage of their species class and portraits will revert to the default selection criteria. Leaders retain custom flags set on them, but this doesn’t affect gameplay.
Recruiting leaders while paused has two caveats:
- Changing a leader’s gender identity creates an updated duplicate, but the original may appear to remain in the leader pool. Unpause the game and the original will be removed. If the "Recruit Leader" window is open, leader’s portrait will change clothes (to the defaults) and their level become -1; this is purely a display issue – that leader has been removed from the game. This graphical glitch also leads to lots of leader-related logs in error.log because the removed, zombie leader had no owner.
- Randomized leaders in the pool who choose to retain their assigned gender identity but change their presentation do not propelry switch their portrait. Playing unpaused reduces (but does not eliminate) this issue. New in 3.1 due to the game being more conservative about changing a leader’s portrait graphic. This a very minor issue that impacts very few leaders and is not noticable unless viewing things with debugtooltip.
Only leaders that are spawned into the leader pool will have a chance to randomize their gender identity and presentation. Leaders created through other means are unaffected. Generally those are special event leaders and are intended to have a particular gender.
Leaders which select to identify as nonbinary (indeterminable) will not show a gender in their tooltip. This is as-designed by Paradox, because the original purpose of the third gender is for non-gendered species (i.e. has no concept of gender at all). Showing the line "Gender: Indeterminable" for every one of their leaders would be redundant.
Finally, it is not possible to allow for selecting gender-nonbinary rulers during species creation. The logic for the species customization screens is part of the core Stellaris game and is not alterable by modders.
See Change Notes
Hosted on GitHub[github.com]
Thanks to Paradox Development Studios (a subsidiary of Paradox Interactive) for making Stellaris, a game that I have enjoyed playing and modifying. This mod would not be possible without their efforts to add aliens which do not use a gender – a feature I repurposed for this mod! They did all the heavy lifting to make their localisation (translations) work with 3 possible pronouns.
Thanks to Harebrained Studios (now owned by Paradox Interactive), the makers of BattleTech. BattleTech supports gender nonbinary characters as part of the base game, and is part of the inspiration for this mod.
Finally, thanks to the Stellaris Modding Den[discord.gg] for all the help with mod development. Discussing Stellaris’ built-in pronoun handling with another modder was my primary inspiration to create this mod.