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

poopchute

Sergeant
25 Badges
Dec 19, 2013
89
6
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Cities in Motion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Leviathan: Warships
  • Magicka
  • Stellaris - Path to Destruction bundle
  • Imperator: Rome
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Surviving Mars
  • BATTLETECH
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Stellaris
  • Crusader Kings II: Way of Life
  • Warlock: Master of the Arcane
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
How do I correctly spawn, from scripts, after species and country creation:
1. starting starport, with initial module?
2. science ship, scientist, and assign scientist to the ship?
3. assign scientists to the three research slots?
4. create and assign planetary governor and ruler?
5. constructor ship?

This is for creating a species from script, so they have the correct starting system with correct names, for an AI player. The planet, species, and country all work and the starting three corvette fleet all spawn in correctly. Any help greatly appreciated.
 
Working code snippet that I'm working from:

Code:
init_effect = {
            save_event_target_as = nomad_spawn
            create_species = {
                name = Krogan
                plural = Krogan
                class = "REP"
                portrait = "rep14"
                homeworld = THIS
                ftl=hyperdrive
                weapon="tech_mass_drivers_1"
                traits = {
                    trait="trait_strong"
                    trait="trait_resilient"
                    trait="trait_rapid_breeders"
                    trait="trait_repugnant"
                }
            }
            create_country = {
                name = Krogan Empire
                government = "military_junta"
                flags = { krogan }
                species = last_created
                #type = default
                ethos = {
                    ethic="ethic_individualist"
                    ethic="ethic_xenophobe"
                    ethic="ethic_militarist"       
                }
                flag = {
                    icon = {
                        category="zoological"
                        file="flag_zoological_12.dds"
                    }
                    background= {
                        category = "backgrounds"
                        file="00_solid.dds"
                    }
                    colors={
                        "black"
                        "black"
                        "null"
                        "null"
                    }
                }
            }
           # create_spaceport = {
            #    set_spaceport_level = 1
            #   set_spaceport_module = "projectile_weapon"
             #  set_owner = last_created_country
            #}
            create_fleet = {name = random}
           
            last_created_fleet = {
                set_owner = last_created_country
                create_ship = {
                    name = "Dagger"
                    design = "Dagger"
                }
                create_ship = {
                    name = "Dagger"
                    design = "Dagger"
                }
                create_ship = {
                    name = "Dagger"
                    design = "Dagger"
                }
                set_location = event_target:nomad_spawn
           
            }
            #create_fleet = {name = random2}
            #last_create_fleet = {
            #    create_ship = { name = "ship" design = "Constructor"}
        #        set_location = event_target:nomad_spawn
        #    }
        #    create_fleet = {name = random3}
        #    last_create_fleet = {
        #        create_ship = { name = "ship" design = "Prototype"}
        #        set_location = event_target:nomad_spawn
        #    }
        }