Heya everyone!
Just need a bit of a had figuring out how I can set up game with the player getting a few more/different ships atm they spawn in unowned. I just can't seem to figure out the set_owner function to set it to a player. I know a few of you play around with events so you know might know better how this works... I can't for the life of me find the player spawn in files either (that set us to have 1 science ship, 1 constructor, and a small fleet) that would probably give us a hint. The only other way I can think to do this is by setting a flag in the intializer for an event to spawn them after the start but... I can't even find or figure out that code for when anomalies give you an extra ship?
Just need a bit of a had figuring out how I can set up game with the player getting a few more/different ships atm they spawn in unowned. I just can't seem to figure out the set_owner function to set it to a player. I know a few of you play around with events so you know might know better how this works... I can't for the life of me find the player spawn in files either (that set us to have 1 science ship, 1 constructor, and a small fleet) that would probably give us a hint. The only other way I can think to do this is by setting a flag in the intializer for an event to spawn them after the start but... I can't even find or figure out that code for when anomalies give you an extra ship?
Code:
### Colony Fleet
colony_fleet_system_initializer = {
name = "Duat"
class = "sc_f"
asteroids_distance = { min = 60 max = 100 }
usage = custom_empire
planet = {
class = "pc_m_star"
orbit_distance = 0
size = { min = 45 max = 45 }
}
change_orbit = 35
planet = {
count = 1
name = "Duat"
class = "pc_barren"
entity = "barren_planet_01_destroyed_entity"
starting_planet = yes
size = 4
tile_blockers = none
modifiers = none
init_effect = {
prevent_anomaly = yes
random_tile = {
limit = { has_building = no has_blocker = no }
set_building = "building_capital_1"
add_resource = {
resource = minerals
amount = 1
replace = yes
}
}
random_tile = {
limit = { has_building = no has_blocker = no }
set_building = "building_power_plant_4"
add_resource = {
resource = energy
amount = 2
replace = yes
}
}
random_tile = {
limit = { has_building = no has_blocker = no }
set_building = "building_power_plant_4"
add_resource = {
resource = energy
amount = 2
replace = yes
}
}
random_tile = {
limit = { has_building = no has_blocker = no }
set_building = "building_power_plant_4"
add_resource = {
resource = energy
amount = 2
replace = yes
}
}
create_pop = {
species = owner_main_species
ethos = owner
}
create_pop = {
species = owner_main_species
ethos = owner
}
create_pop = {
species = owner_main_species
ethos = owner
}
create_pop = {
species = owner_main_species
ethos = owner
}
create_fleet = { }
last_created_fleet = {
set_owner = last_created_country
create_ship = {
name = random
design = "Splendor"
graphical_culture = root
}
set_location = {
target = PREV
distance = 80
}
}
create_fleet = { }
last_created_fleet = {
set_owner = ROOT
create_ship = {
name = random
design = "Diaspora"
graphical_culture = root
}
set_location = {
target = PREV
distance = 90
}
}