Is the populating of home planets at the start of a game hard-coded? I see that special empires (fallen, primitive, etc.) have scripts populating their planets, but nothing for the default country type.
i suggest you have a look at our mod files. especially the code in prescripted_countries and the stuff in solar_system_initializers could help you a lot.
planet_event = {
id = relocate_megacitizens.1
is_triggered_only = yes
location = ROOT
hide_window = yes
immediate = {
planet_event = {
id = relocate_megacitizens.2
}
}
}
planet_event = {
id = relocate_megacitizens.2
is_triggered_only = yes
hide_window = yes
immediate = {
create_pop = {
species = owner_main_species
ethos = owner
}
create_pop = {
species = owner_main_species
ethos = owner
}
}
}