• 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.

ParasiteX

Second Lieutenant
35 Badges
May 11, 2016
174
54
  • Magicka
  • Sword of the Stars II
  • Magicka 2
  • Stellaris: Ancient Relics
  • BATTLETECH - Backer
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Prison Architect
  • Surviving Mars: First Colony Edition
  • Stellaris: Humanoids Species Pack
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Apocalypse
  • Age of Wonders III
  • Surviving Mars
  • BATTLETECH
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Gold Edition
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Stellaris
  • Pillars of Eternity
  • Crusader Kings II
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Sword of Islam
Trying to run a script that changed the species of Commonwealth to that of UNE if both are in the same game.

Code:
    trigger = {
        any_country = { has_country_flag = human_2 }
        any_country = { has_country_flag = human_1 }
    }
 
    immediate = {
        random_country = {
            limit = {
                has_country_flag = human_1
            }
            owner_species = { save_event_target_as = humans }
        }
        random_country = {
            limit = {
                has_country_flag = human_2
            }
            every_owned_pop = {
                change_pop_species = event_target:humans
            }
            change_dominant_species = event_target:humans
        }
     
    }

The problem when i run this. all it does is remove the species_index from the pops, instead of changing it to the correct species.
I'm not quite sure what i am doing wrong here.

It does seem to correctly change the dominant species to species_index=1 when i look in the save file. Which is what the species is for UNE. So the event_target is saved correctly. But for some reason i cant use it with change_pop_species...
 
This looks like it's useful I'll play with it later and see what I can do