Stellaris

Stellaris

379 ratings
Gender Nonbinary Leaders
6
3
11
4
6
3
3
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
385.798 KB
26 Jun, 2021 @ 1:04pm
13 May, 2023 @ 12:32am
7 Change Notes ( view )

Subscribe to download
Gender Nonbinary Leaders

In 1 collection by corsairmarks
Corsair's Stellaris Mods
57 items
Description
Overview
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.

Changes
Stellaris supports 3 gender states in code (male, female, indeterminable), which correspond to the pronouns he, she, and they. Whether a species uses binary female/male genders (the default) or consists solely of a single gender identity is configurable during empire creation in the Species Name tab. This mod adds a chance for leaders adopt a new gender identity when they are spawned by the game (20% chance to change from their assigned gender identity - 10% for each of the other two genders).

With this mod, leaders of a binary-gendered species who become indeterminable have a 50/50 chance of presenting as feminine or masculine. Unfortunately due to underlying game changes, it is no longer possible to influence which portrait a leader uses via in-game flags. Although possible in the past, that means leaders will no longer be able to have portraits where their gender presentation is different than their gender identity. Females will always present as feminine, males will always present as masculine, and indeterminables will randomly present as either feminine or masculine.

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%\Documents\Paradox Interactive\Stellaris\logs (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. I used this to help understand the game state while developing and decided to leave it available for future use.

Compatibility
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 portraits in each of those classes.

If you would like me to implement a compatibility patch (to support feminine/masculine presentation from sexual dimorphism), 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.8 "Gemini." Not compatible with achievements.

When to Install
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.

Known Conflicts
Any other mods that adjust the human portrait groups (not individual portraits), including my mod Human Portraits: Unified.

Known Issues
Only leaders that are spawned into the leader pool (whether the pool is for a player or an AI) will have a chance to randomize their gender identity. Leaders created through other means (for example, the create_leader and clone_leader effects) 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 rulers that do not follow the gender norms of their species during empire creation. The logic for the species customization screens is part of the core Stellaris game and is not alterable by modders.

Changelog
See Change Notes

Source Code
Hosted on GitHub[github.com]

Special Thanks
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.
58 Comments
Wilgryf 5 Mar @ 2:19am 
:DSTpoop:
corsairmarks  [author] 13 May, 2023 @ 12:35am 
The new set_gender effect has arrived, and thankfully I was able to remove all of the clone-related code. However, leader portraits still don't always reflect the flags I have set for gender presentation, and it's still not possible to fully copy the initial ruler portrait.

Short version - it works the same as it has been, but with way less crazy code going on under the surface.
corsairmarks  [author] 26 Apr, 2023 @ 4:36pm 
@Sunconure11 you'll have to look at its code. This mod mostly adjusts portraits for species with sexual di-/tri-morphism (one of the toxoid species has trimorphism), and adds events to attempt to alter the gender of some leaders when they spawn... by spawning a replacement.

I anticipate this would only become an issue if the other mod also tries to modify leaders as they spawn. Also this mod won't necessarily respect gender restrictions by the other mod.
Sunconure11 26 Apr, 2023 @ 2:46pm 
Well, for starters, that mod adds a lot of stuff like various civics, traits, and government types based on sex, so I was wondering how this would play into it.
corsairmarks  [author] 26 Apr, 2023 @ 12:23pm 
@Sunconure11 depends on how tgat mod works. I recommend looking through the code of both.
Sunconure11 26 Apr, 2023 @ 1:26am 
Would this need a patch for the gender politics mod?
corsairmarks  [author] 25 Apr, 2023 @ 11:49pm 
With the upcoming new DLC "Galactic Paragons" as part of patch 3.8 "Gemini," I anticipate this mod will need significant adjustments. And not just because of the upcoming effect change for set_gender .
corsairmarks  [author] 8 Apr, 2023 @ 8:15pm 
@Liara - thanks!
LAJ-47FC9 8 Apr, 2023 @ 2:00am 
Absolutely love this one. You deserve the world, friend.
corsairmarks  [author] 1 Apr, 2023 @ 2:09pm 
@enbylvania65000 Generally yes, it should work. The SE- Restyled (et al) triggers are designed to follow the same gender patterns as this mod (i.e. should work as expected). The Humanoid species class redefinition in SE - Restyled makes any changes to human/humanoid portraits from this mod irrelevant.

I believe some trigger changes that might in be in Stellaris 3.8 "Gemini" will help me further improve Gender Nonbinary Leaders - so I am not planning on script re-working until them.