StellarStellaris
Overview

This mod ensures that your leaders can have every species-based leader trait that their species makes them eligible for. Somehow managed to get a Psionic, Erudite, Cybernetic, Brainslugged species? Now your leaders can have all of the traits together!

Like the default game, this mod does not guarantee psionic traits for Latent Psionics (instead there is a 20% chance for each leader) or brain slugs (again, 20% chance for each leader). The game includes an event for leaders of a Latent Psionic species randomly gaining the Psionic leader trait, but it was limited to the main species of an empire. That has been altered so any Latent Psionic leaders have a chance to randomly manifest Psionic abilities. Additionally, an event functionally similar has been added for leaders from a species with Brain Slugs to gain the Brain Slug trait.

New for 3.3: governors whose species have the "Numistic Administration" trait gain the "Merchant of Numa" leader trait.

Changes

This mod unifies adding/removing species-based traits for leaders, and it will automatically fire when leaders are spawned (on_leader_spawned), when a species is modified (on_modification_complete - including a one-time, independent chance for latent psionics or brainslugs), or when a ruler returns to their previous leader job (on_ruler_back_to_pre_ruler_class - ensures brainslugged/psionic rulers keep their trait(s) when being demoted). It does not replace the majority of the existing game code for these traits in order to off maximum compatibility with other mods, but it does occasionally result in leaders having their traits in a different order.

The same code is used in each of these three cases (via effects) that do not enforce any requirements other than "does the leader's species have the necessary prerequisite species trait?" So if you've managed to glitch the game into having Psionic Robots, you'll end up with psionic robot leaders.

The original inspiration for me to create this mod was the "Promising Officer" event which rewards admirals with two traits, but none of their appropriate species traits. This seems to occur because the built-in effect to spawn a leader create_leader completely overwrites any species traits whenever traits = { } are specified (as in this event leader.1). Currently, this mod only addresses this one instance, but if you find another place that would benefit from an event-created leader having their species traits added, please leave a comment describing which event.

Compatibility

Built for Stellaris version 3.3 "Libra." Not compatible with achievements.

This mod overrides three default events related to adding leader traits: distar.174 ,utopia.2508 , and utopia.2605. Other mods that make changes to any of the same events will conflict with this one.

For distar.174, the easiest way to resolve the conflict is to comment out or delete the event from this mod, which is in the file events/000_overridden_leader_species_trait_events.txt. The override is just a cleaner way to add the initial brainslug trait for hireable leaders - the original in-game code will execute in the two places it could be triggered but they have a very low impact.

utopia.2508 is the default event for adding or removing Erudite leader traits. That event uses the effect remove_leader_traits_after_modification which is also overridden. If you have conflicts with these, it is recommended you keep at least one of the two overrrides from this mod, otherwise you will lose Erudite-based leader traits from leaders that also have another special species trait, any time that any species in your empire is modified.

utopia.2605 is the event for leaders randomly gaining the Psionic trait from Psionic species. I recommend you use this mod's version of the event in order to benefit from the reduced mean time-to-happen (i.e. happens more frequently) and wider selection criteria (any species with Latent Psionic, not just the owner's main species).

All other the new logic is implemented in standalone events and effects which should not conflict with other mods.

Recommended Companion Mods

Like leaders? Try a couple of my other leader-related mods that work with this one.

When to Install

This mod can be safely added or removed from your save game after the game has started. It is implemented through custom events and effects without adding gameplay objects. If you remove it, your game will work normally.

Known Issues

Overriding events and effects from the default game causes error logs. Expect to see four lines similar to this in error.log:

[15:38:58][game_singleobjectdatabase.h:147]: Object with key: remove_leader_traits_after_modification already exists, using the one at file: common/scripted_effects/99_leader_species_traits_scripted_effect_overrides.txt line: 2
[15:38:59][eventmanager.cpp:361]: an event with id [distar.174] already exists! file: events/distant_stars_events_1.txt line: 5434
[15:39:00][eventmanager.cpp:361]: an event with id [utopia.2508] already exists! file: events/utopia_on_action_events.txt line: 579
[15:39:00][eventmanager.cpp:361]: an event with id [utopia.2605] already exists! file: events/utopia_on_action_events.txt line: 1493

Changelog

See Change Notes

Source Code

Hosted on GitHub

TitleLeader Traits: All Eligible Species Traits
Steam ID2499031295
Steam App281990 (steamDB)
Steam Manifest/UGC1540397795365857103
Creator SteamID76561198040838605
Steam Created2021-05-27T04:20:28+00:00
Steam Updated2022-03-10T03:26:30+00:00
Steam Updated relative1677.9 days ago
Revision #28
Revision archived?Yes (fetch: 2022-04-15 12:47:51)
Revision file date2022-03-10 03:26:29
Tracked Steam files11
Tracked mod files10
Mod size336.81 KB

Tracked mod revisions

Title Revision # Archived? Size Metadata created Metadata last updated
Leader Traits: All Eligible Species Traits 54 NO 0 B 2023-07-02 20:24:04 2026-10-10 23:05:01
Leader Traits: All Eligible Species Traits 54 Yes (fetch: 2023-07-03 19:41:07) 367.55 KB 2023-07-02 20:24:04 2026-10-10 23:05:01
Leader Traits: All Eligible Species Traits 32 Yes (fetch: 2023-01-09 20:14:43) 348.09 KB 2023-01-09 20:12:41 2023-02-07 19:05:01
Leader Traits: All Eligible Species Traits 31 Yes (fetch: 2022-12-28 15:14:56) 348.02 KB 2022-12-28 15:12:44 2023-01-10 00:05:01
Leader Traits: All Eligible Species Traits 30 Yes (fetch: 2022-12-15 01:12:48) 347.94 KB 2022-12-15 01:11:40 2022-12-28 19:05:02
Leader Traits: All Eligible Species Traits 29 Yes (fetch: 2022-05-12 13:25:57) 337.58 KB 2022-05-12 13:14:10 2022-12-15 06:05:02
Leader Traits: All Eligible Species Traits 28 Yes (fetch: 2022-04-15 12:47:51) 336.81 KB 2022-04-10 02:57:03 2022-05-12 17:05:03


Mod File inventory

Path Extension File Count File Size
common/on_actions txt 1 1.76 KB
common/scripted_effects txt 2 17.28 KB
events txt 2 9.98 KB
localisation yml 1 932 B