• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Sledjer

Major
75 Badges
Jan 11, 2014
751
1.014
You can get it Here
or, if you want the Steam version it's Here
The mod should work with any version, at least until the problem is actually fixed in the main game.

Have you ever bemoaned that you xenophobe people hate you once you genetically improve them? Have you winced when you see a long list of unhappiness modifiers on your once main race because you only let your main race rule, allow alien slavery, and allow alien purging?

Well, here's the solution: A simple hidden event that fires when your capital has no members of your main species on it, but does have modified members of your species and switches your country's main species to whatever the last created species is.

Compatibility:
The version is set to 1.1.X, but it is compatible with previous versions too. It should be compatible with literally every mod, assuming it doesn't already do something similar, in which case there isn't much reason to get this mod anyways.

If you want to include this or a changed version of this in your mod, you can feel free to do so, but I would appreciate it if you would give me credit for it on your mod's page and make a comment about it on this post.
 

Attachments

  • genemodfix.rar
    10,6 KB · Views: 7
Last edited:
  • 6
  • 3
Reactions:
sub
 
What happens if with this mod installed you put an other, non subspecies race to be the only habitants of your homeworld? Or if you have different races/subraces present once you have no more of the original?
 
You can't use capital_scope in a trigger sadly so this is currently broken. I believe the trigger scope for this is "home_planet". Also you've currently got this firing every day for every country so this slows the game slightly, there is an on_action for species modification you can use instead.

EDIT: Nope home_planet also doesn't work in a trigger, at least not from a country scope. Hmm damn. Not sure what else to use.

EDITEDIT: Nevermind about capital_scope, the massive spam of the error log was just from some odd-interaction between capital_scope and the subterranean empire. I suspect this is why all the paradox events that use capital_scope also have an "exists = capital_scope" trigger.

@Mohreb
If another species is the sole occupant of your homeworld then whatever species you last modified becomes your main species.
EDIT: *smacks forehead* I'm obviously too tired to be doing this right now. There has to be at least one pop of a subspecies and no pops of your main race on your capital for this to fire, once it does it makes whatever species you made last your main species.
 
Last edited:
What happens if with this mod installed you put an other, non subspecies race to be the only habitants of your homeworld? Or if you have different races/subraces present once you have no more of the original?
The event only fires if a race that is genetically modified from your original race in on your capital.
Unfortunately change_dominant_species only works with last_created_pop and last_created_species AFAIK, so I can't have it work with alien pops.

As far as having multipe subspecies, the event always chooses the most recently created one.

EDITEDIT: Nevermind about capital_scope, the massive spam of the error log was just from some odd-interaction between capital_scope and the subterranean empire. I suspect this is why all the paradox events that use capital_scope also have an "exists = capital_scope" trigger.
Alright, thanks for that. I'll fix it.
 
Last edited:
I just confirmed that it worked in my game. I changed all of humanity (well, 3 planets worth..) at the same time to get venerable, then checked the save file and my primary species was indeed no longer race=0 but race=164.

Now all that needs to happen is for my leaders to ALSO change to the new race, because if every lowly human pop got the gene therapy then surely the leaders did as well. My band-aid solution is to use the console to give the old humans (race=0) the venerable trait. No one belongs to that race anymore, aside from my leaders.

Anyhow, thanks for the mod, much appreciated.
 
You should use a on action trigger like on_modification_complete to avoid the script running each day, as that can cause a bit of slowdown.

Just add is_triggered_only = yes to the event script. Also remove the mean_time_to_happen as that is no longer necessary if the script is triggered on a specific action.

Also, this line doesn't seem to be needed.
Code:
            any_pop = {
                is_subspecies = ROOT
            }

You only need the NOT check. As the script should only trigger if none of your pops on the capital is a prime species. So that other line doesn't make any sense.

So should something like this, and from my testing this seems to work great.
Code:
on_modification_complete = {
    events = {
        genemodfix.1
    }
}

Code:
namespace = genemodfix

country_event = {
    id = genemodfix.1
    hide_window = yes
    is_triggered_only = yes

    trigger = {
        exists = capital_scope
        capital_scope = {
            NOT = {
                any_pop = {
                    is_same_species = ROOT
                }
            }
        }
    }
    immediate = {
        change_dominant_species = last_created_species
    }
}

Obviously this method ain't perfect. As it will only go with the last created species. And if you mod them into a sub species you made ages ago, it may accidentally change it to whatever random species was created last..
 
Obviously this method ain't perfect. As it will only go with the last created species. And if you mod them into a sub species you made ages ago, it may accidentally change it to whatever random species was created last..
How about making it check that last_created_species is indeed a subspecies of the other one. Possibly by checking their name is the same?

Then if it isn't default to changing primary species to what the species on your homeworld is.
 
Holy crap.. can't believe this was such a simple solution.. ok came up with a even better way than using last-created_species. Was toying with some ideas of adding a trait which you add during creation to specify new founder species.. but came up with this instead.

Just change it to change_dominant_species = FROM

This will cause it to change it to whatever species you just modded the capital prime species into last. Even if you mod it into a sub-species you created ages ago on a different planet.

So for instance, if your earlier created a sub-species on a planet by adding rapid growth. And then some time later decide to make this the new prime species by modding the ones in the capital into it. Then you simply add in the rapid growth the same way (and most importantly same order) that you added the traits for the species you created some time ago. And the the script should recognize this with the FROM function. and set the new founding species to that.

I attached my version for people to test out.
 

Attachments

  • genemodfix.7z
    562 bytes · Views: 1
Last edited:
Hmmm. Might also change it so that it pops up as an message box where you can choose if you want to change prime species to the newly created species or not.
 
Hmmm. Might also change it so that it pops up as an message box where you can choose if you want to change prime species to the newly created species or not.
Sounds good, it also doesn't matter if the AI accidentally switches primary race. If they are no longer dominant on their homeworld then it isn't unrealistic that there could be a power switch in their empire.

For the player a choice might be nice. Though it's going to be pretty rare that he isn't dominant on his homeworld.
 
Sounds good, it also doesn't matter if the AI accidentally switches primary race. If they are no longer dominant on their homeworld then it isn't unrealistic that there could be a power switch in their empire.

For the player a choice might be nice. Though it's going to be pretty rare that he isn't dominant on his homeworld.

I have quite a few xeno slaves on my homeworld though ;)

And i don't think the AI ever actually manually mods their species. Especially not their entire founder species. You will get the occasional chance event one where the pop on a planet with low happiness and low habitability will mod themselves and get a fancy new twist on the species name.
But that is a scripted event.

I have never witnessed the AI actually taking it upon themselves to mod their species manually.
 
I made a new version which now pops up a message box after modding all founder species on capital. Which asks whether or not you want to mod your species.

Should give you a bit more control to avoid accidental species being made into the new prime.
 

Attachments

  • genemodfix.7z
    786 bytes · Views: 5
Doesn't seem to be any way of changing the species of a leader, outside of save editing.

The only function i could find that retains to changing species is change_pop_species. But that only works when targeted on pops, not leaders.

It's easy enough to make it trigger an effect on all leaders with every_owned_leader. But not so easy figuring out how to change their species.
 
Well if the old species is literally dead, as in no members exist as they were all modified, then the event could do what I do with console anyhow:
Add missing traits to the original species so they have the same traits as the new one. It's not cheating as the originals are gone anyhow, and it means the leaders get the benefit of the new species, like venerable.
 
Well if the old species is literally dead, as in no members exist as they were all modified, then the event could do what I do with console anyhow:
Add missing traits to the original species so they have the same traits as the new one. It's not cheating as the originals are gone anyhow, and it means the leaders get the benefit of the new species, like venerable.

I just go into the save game, and for example run a replace all search for:
species_index=0
portrait="human"
gender=female
country=0

and replace with:

species_index=116
portrait="human"
gender=female
country=0

And then repat same for opposite gender.

Including the country=0 at end ensures you don't accidentally change the species of leaders of a different empire who also happen to have leaders from your species. Most likely from migrations, seperatists or them conquering planets from you and allowing xenos as leaders.

Would be great to be able to do this in-game with an event script... But Paradox are currently reviewing the gene modding mechanics. So hopefully they will also adress this issue.

EDIT: There are some limitations that make it hard to do what you do with console. As there is no easy way that i know of, for checking if an entire species is extinct. As the any_pop and count_pops functions only work when checked against planets, and not in a country scope.

I've tried the every_owned_planet. But that didn't seem to work with the any_pop or count_pops.
 
Last edited: