Hi,
what I want to do is to create a new origin that works similar to the Syncretic Evolution origin from vanilla.
On game start I obviously want to spawn the pops of the secondary species additional to the one of the first.
Currently I have one main problem: How to I select the secondary species?
I managed to let the player create both species exactly as with the vanilla origin, but when the game starts the pops that should be of the secondary species does not spawn instead a random species spawns(the following code is in the /common/events folder and is executed by an on_game_start_country prompt in the /common/on_actions folder):
So I guess the problem is that I use "species = last_created_species" in the last block, but how exactly should I change that to spawn the actual secondary species?
I looked up the code of the vanilla game files and some other mods, thats why I choose "last_created_species" however I think I probably need to set a flag to the main species and scope to the country or so? But I am not sure how to do that.
Also one additional question: How exactly do I change the pop count of the primary species in general?
what I want to do is to create a new origin that works similar to the Syncretic Evolution origin from vanilla.
On game start I obviously want to spawn the pops of the secondary species additional to the one of the first.
Currently I have one main problem: How to I select the secondary species?
I managed to let the player create both species exactly as with the vanilla origin, but when the game starts the pops that should be of the secondary species does not spawn instead a random species spawns(the following code is in the /common/events folder and is executed by an on_game_start_country prompt in the /common/on_actions folder):
Code:
namespace = restellar
country_event = {
id = restellar.1
hide_window = yes
is_triggered_only = yes
trigger = {
has_origin = origin_multi_syncretic_evolution
}
immediate = {
random_owned_planet = {
limit = { is_capital = yes }
random_owned_species = {
limit = {
has_species_flag = syncretic_species@root.owner
}
save_event_target_as = syncretic_species
set_species_flag = syncretic_species@root.owner
if = {
limit = {
prev.owner = {
has_origin = origin_multi_syncretic_evolution
}
}
set_citizenship_type = {
country = root.owner
type = citizenship_slavery
}
}
}
#This spawns 12 pops of a secondary species
if= {
while = {
count = 12
create_pop = {
species = last_created_species
ethos = random
}
}
}
}
}
}
So I guess the problem is that I use "species = last_created_species" in the last block, but how exactly should I change that to spawn the actual secondary species?
I looked up the code of the vanilla game files and some other mods, thats why I choose "last_created_species" however I think I probably need to set a flag to the main species and scope to the country or so? But I am not sure how to do that.
Also one additional question: How exactly do I change the pop count of the primary species in general?
Last edited: