Leader Traits: All Eligible Species Traits

If you liked this item, please rate it up on Steam Workshop page.

Author: corsairmarks

Last revision: 24 Jun, 2023 at 04:13 UTC (11)

File size: 367.62 KB

On Steam Workshop

Description:
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.

Governors whose species has 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) or when a species is modified (on_modification_complete – including a one-time, independent chance for latent psionics or brainslugs). 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.

Compatibility

Built for Stellaris version 3.8 "Gemini." Not compatible with achievements.

This mod overrides eleven default events related to adding leader traits. Other mods that make changes to any of the same events will conflict with this one:

  1. distar.170, distar.171, and distar.172 enable cybernetic empires to complete the special project for brainslugs, and ensure robotic leaders aren’t selected to receive the brainslug trait – you should keep the versions from this mod or otherwise merge the changes.
  2. distar.173 and/or distar.174 are just a cleaner way to add the initial brainslug trait for hireable leaders; if removed or disabled, the original in-game code will execute instead but it has a very low impact.
  3. paragon.1, paragon.99, and paragon.50 are events related to The Beholder’s abilities to make planetfall and perform psi-inoculation – required so that The Beholder can psi-inoculate cyborgs into psiborgs (also buffs The Beholder’s leader traits). The relevant decisions are also overridden decision_deploy_beholder and decision_psi_inoculate_pops in order to support the necessary functionality.
  4. utopia.2508 is the default event for adding or removing Erudite leader traits; 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.
  5. utopia.2601 ensures that newly-spawned latent psionic leaders are flagged as having already rolled for a chance at a psionic trait. If removed or disabled, the flag won’t be set so some latent psionic leaders may be able to get a second chance at randomly rolling a psionic trait.
  6. 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).

Beginning with Stellaris version 3.8 "Gemini," leader traits respect their opposites blocks. It is no longer possible to add "incompatible" traits to the same leader. Therefore, this mod now also overrides the built-in special leader traits file 00_special_leader_traits.txt. That means that this mod conflicts with other mods that override the same file (traits require a full-file override). For this mod to take precedence, load it after other mods that edit the same file.

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

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.

Recommended Companion Mods

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

Known Issues

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

Object w/key remove_leader_traits_after_modification exists, using file: common/scripted_effects/99_leader_species_traits_scripted_effect_overrides.txt line: 2 Event w/id [distar.170] exists! file: events/distant_stars_events_1.txt line: 5061 Event w/id [distar.171] exists! file: events/distant_stars_events_1.txt line: 5148 Event w/id [distar.172] exists! file: events/distant_stars_events_1.txt line: 5192 Event w/id [distar.173] exists! file: events/distant_stars_events_1.txt line: 5356 Event w/id [distar.174] exists! file: events/distant_stars_events_1.txt line: 5401 Event w/id [paragon.1] exists! file: events/paragon_events.txt line: 501 Event w/id [paragon.99] exists! file: events/paragon_events.txt line: 717 Event w/id [paragon.50] exists! file: events/paragon_events.txt line: 815 Event w/id [utopia.2508] exists! file: events/utopia_on_action_events.txt line: 634 Event w/id [utopia.2601] exists! file: events/utopia_on_action_events.txt line: 1290 Event w/id [utopia.2605] exists! file: events/utopia_on_action_events.txt line: 1378 Object w/key decision_deploy_beholder exists, using file: common/decisions/18_leader_species_traits_paragon_decision_overrides.txt line: 4 Object w/key decision_psi_inoculate_pops exists, using file: common/decisions/18_leader_species_traits_paragon_decision_overrides.txt line: 83
Changelog

See Change Notes

Source Code

Hosted on GitHub[github.com]

[discord.gg]