realgray-stellaris-mod/events/!_kdc_events_initialize_ove...

522 lines
13 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace = kdc_event
# 初始化小灰起源
country_event = {
id = kdc_event.9990
hide_window = yes
is_triggered_only = yes
fire_only_once = yes
trigger = {
# is_multiplayer = no
is_ai = no
has_origin = origin_gray
}
immediate = {
set_global_flag = gray_origin_activate
set_country_flag = origin_gray_country
country_event = { id = kdc_event.9991 days = 1 }
set_timed_country_flag = { flag = day_0 days = 1 }
capital_scope = {
save_global_event_target_as = old_empire_home
solar_system = {
set_star_flag = lgate
every_system_planet = {
limit = { has_orbital_station = yes }
orbital_station = { dismantle = yes }
}
set_surveyed = {
surveyed = no
surveyor = root
}
}
}
# 加特质
every_owned_pop = {
modify_species = {
species = owner_main_species
add_trait = trait_gray_origin
change_scoped_species = yes
}
last_created_species = {
save_event_target_as = gray_species
}
}
change_dominant_species = {
species = event_target:gray_species
change_all = yes
}
# add_modifier = {
# modifier = starbase_influence_cost_reduce_base
# multiplier = 90
# }
# L星门
set_spawn_system_batch = begin
# batch-processes the spawn_system effects between "begin" and "end",
# so caches are recalculated only once rather than for every system spawned
# can also be used when removing and adding hyperlanes
no_scope = {
# makes system positions originate from galactic core
spawn_system = {
min_distance >= 550
max_distance <= 560
min_orientation_angle = 44
max_orientation_angle = 46
initializer = distantstars_init_01
hyperlane = no
effect = {
save_global_event_target_as = lcluster1
remove_star_flag = lcluster
set_star_flag = gray_origin_lcluster
}
}
event_target:lcluster1 = {
spawn_system = {
min_distance >= 29
max_distance <= 31
min_orientation_angle = 24
max_orientation_angle = 66
initializer = distantstars_init_02
hyperlane = no
effect = {
save_global_event_target_as = lcluster2
remove_star_flag = lcluster
set_star_flag = gray_origin_lcluster
}
}
spawn_system = {
min_distance >= 29
max_distance <= 31
min_orientation_angle = 114
max_orientation_angle = 156
initializer = distantstars_init_03
hyperlane = no
effect = {
save_global_event_target_as = lcluster3
remove_star_flag = lcluster
set_star_flag = gray_origin_lcluster
}
}
spawn_system = {
min_distance >= 30
max_distance <= 60
min_orientation_angle = 340
max_orientation_angle = 20
initializer = distantstars_init_01b
hyperlane = no
effect = {
save_global_event_target_as = lcluster1b
remove_star_flag = lcluster
set_star_flag = gray_origin_lcluster
}
}
}
event_target:lcluster2 = {
spawn_system = {
min_distance >= 30
max_distance <= 60
min_orientation_angle = 0
max_orientation_angle = 40
initializer = distantstars_init_02b
hyperlane = no
effect = {
save_global_event_target_as = lcluster2b
remove_star_flag = lcluster
set_star_flag = gray_origin_lcluster
}
}
}
event_target:lcluster3 = {
spawn_system = {
min_distance >= 20
max_distance <= 30
min_orientation_angle = 24
max_orientation_angle = 66
initializer = origin_gray_home_system
hyperlane = no
}
spawn_system = {
min_distance >= 10
max_distance <= 50
min_orientation_angle = 250
max_orientation_angle = 290
initializer = distantstars_init_03b
hyperlane = no
effect = {
save_global_event_target_as = lcluster3b
remove_star_flag = lcluster
set_star_flag = gray_origin_lcluster
}
}
}
event_target:origin_gray_home_system = {
spawn_system = {
min_distance >= 5
max_distance <= 10
min_orientation_angle = 250
max_orientation_angle = 290
initializer = distantstars_init_05
hyperlane = no
effect = {
save_global_event_target_as = lcluster5
remove_star_flag = lcluster
set_star_flag = gray_origin_lcluster
}
}
spawn_system = {
min_distance >= 30
max_distance <= 60
min_orientation_angle = 20
max_orientation_angle = 160
initializer = distantstars_init_04b
hyperlane = no
effect = {
save_global_event_target_as = lcluster4b
remove_star_flag = lcluster
set_star_flag = gray_origin_lcluster
}
}
}
}
every_system = {
limit = { has_star_flag = gray_origin_lcluster }
every_system_planet = {
limit = { is_planet_class = pc_gray_goo }
add_deposit = d_nanites_deposit
random_list = {
65 = { add_deposit = d_nanites_deposit }
35 = {}
}
random_list = {
30 = { add_deposit = d_nanites_deposit }
70 = {}
}
random_list = {
50 = { add_deposit = d_nanites_deposit }
50 = {}
}
}
}
# add hyperlanes
event_target:lcluster5 = {
add_hyperlane = {
from = event_target:lcluster5
to = event_target:origin_gray_home_system
}
create_country = {
name = "NAME_gray_enemy_country"
type = faction
flag = {
icon = {
category = "domination"
file = "domination_16.dds"
}
background = {
category = "backgrounds"
file = "00_solid.dds"
}
colors={
"blue"
"blue"
"null"
"null"
}
}
effect = {
wg_boss_default_initial_effect = yes
set_country_flag = gray_enemy_country_flag
save_event_target_as = gray_enemy_country
}
}
random_system_planet = {
create_fleet = {
name = "NAME_gray_tempest_fleet"
effect = {
set_owner = event_target:gray_enemy_country
create_ship = {
name = "NAME_gray_tempest_fleet"
design = NAME_Nanite_Interdictor
upgradable = no
}
set_location = {
target = prev
distance = 15
angle = random
}
set_fleet_stance = aggressive
set_aggro_range_measure_from = self
set_aggro_range = 500
set_fleet_flag = gray_enemy_fleet
add_modifier = {
modifier = gray_tempest_fleet_debuff
days = -1
}
}
settings = {
spawn_debris = no
}
}
}
}
event_target:origin_gray_home_system = {
add_hyperlane = {
from = event_target:origin_gray_home_system
to = event_target:lcluster3
}
add_hyperlane = {
from = event_target:origin_gray_home_system
to = event_target:lcluster2
}
add_hyperlane = {
from = event_target:origin_gray_home_system
to = event_target:lcluster4b
}
}
event_target:lcluster3 = {
add_hyperlane = {
from = event_target:lcluster3
to = event_target:lcluster1
}
add_hyperlane = {
from = event_target:lcluster3
to = event_target:lcluster3b
}
}
event_target:lcluster2 = {
add_hyperlane = {
from = event_target:lcluster2
to = event_target:lcluster1
}
add_hyperlane = {
from = event_target:lcluster2
to = event_target:lcluster3
}
add_hyperlane = {
from = event_target:lcluster2
to = event_target:lcluster2b
}
}
event_target:lcluster1 = {
add_hyperlane = {
from = event_target:lcluster1
to = event_target:lcluster1b
}
}
event_target:lcluster1b = {
add_hyperlane = {
from = event_target:lcluster1b
to = event_target:lcluster2b
}
}
set_spawn_system_batch = end
# 处理开局文字的一堆flag
remove_country_flag = human_1
remove_country_flag = human_2
set_country_flag = custom_start_screen
event_target:origin_gray_home_system = {
random_system_planet = {
limit = { has_planet_flag = origin_gray_empire_home }
save_event_target_as = origin_gray_empire_home
}
}
# 移民
event_target:old_empire_home = {
every_owned_pop = {
resettle_pop = {
pop = this
planet = event_target:origin_gray_empire_home
}
unemploy_pop = yes
}
}
root = { every_owned_fleet = {
delete_fleet = this
}}
# 生成首都的东西
event_target:origin_gray_empire_home = {
solar_system = {
generate_home_system_resources = yes
create_starbase = {
owner = root
size = starbase_starport
module = shipyard
module = trading_hub
building = crew_quarters
}
}
prevent_anomaly = yes
clear_deposits = yes
add_deposit = d_decrepit_dwellings
add_deposit = d_failing_infrastructure
add_deposit = d_failing_infrastructure
# 5 + 3 energy
add_deposit = d_searing_desert
add_deposit = d_underwater_vent
add_deposit = d_tempestous_mountain
# 5 + 3 mining
add_deposit = d_ore_rich_caverns
add_deposit = d_prosperous_mesa
add_deposit = d_submerged_ore_veins
# 5 + 3 farming (lithoids swap 3 for minerals)
add_deposit = d_lush_jungle
add_deposit = d_teeming_reef
if = {
limit = { root = { is_lithoid_empire = yes } }
add_deposit = d_rich_mountain
}
else = {
add_deposit = d_black_soil
}
# 1 random medium deposit
random_list = {
33 = { add_deposit = d_frozen_gas_lake }
33 = { add_deposit = d_prosperous_mesa }
33 = { add_deposit = d_fertile_lands }
}
add_deposit = d_dust_caverns
add_deposit = d_bubbling_swamp
add_deposit = d_crystalline_caverns
set_owner = ROOT
set_controller = root
set_capital = yes
generate_start_buildings_and_districts = yes
clear_planet_modifiers = yes
set_sector_capital = yes
ROOT = { random_owned_leader = {
limit = { leader_class = governor }
unassign_leader = yes
save_event_target_as = target_governor
}}
sector = { assign_leader = event_target:target_governor }
add_modifier = { modifier = gray_planet_debuff clear_on_owner_change = yes }
check_planet_employment = yes
while = {
count = 5
create_army = {
name = random
owner = root
species = root.owner_main_species
type = "defense_army"
}
}
create_fleet = {
effect = {
set_owner = root
create_ship = {
name = random
random_existing_design = science
}
set_fleet_stance = evasive
set_location = root.capital_scope.star
owner = {
random_owned_leader = {
limit = {
leader_class = scientist
NOR = {
is_researching_area = physics
is_researching_area = society
is_researching_area = engineering
}
}
save_event_target_as = science_ship_leader
}
}
if = {
limit = {
exists = event_target:science_ship_leader
}
set_leader = event_target:science_ship_leader
}
}
}
create_fleet = {
effect = {
set_owner = root
create_ship = {
name = random
random_existing_design = constructor
}
set_fleet_stance = evasive
set_location = root.capital_star
}
}
create_fleet = {
effect = {
set_owner = root
while = { count = 3
create_ship = {
name = random
random_existing_design = corvette
}
}
set_fleet_stance = passive
set_location = root.capital_star
}
}
}
# 将旧首都的东西全部移除(搬家了)
event_target:old_empire_home = {
remove_all_armies = yes
remove_all_districts = yes
remove_all_buildings = yes
remove_star_flag = empire_home_system
remove_star_flag = ring_world_built
clear_deposits = yes
reroll_deposits = yes
destroy_colony = yes
solar_system = {
remove_star_flag = empire_home_system
starbase = { fleet = { delete_fleet = this }}
set_name = random
random_system_planet = {
limit = { is_star = yes }
set_name = solar_system
}
# 生成一个L门以免其他星系没有L门过不去
spawn_megastructure = {
type = lgate_base
orbit_angle = 225
orbit_distance = 30
}
set_surveyed = {
surveyed = no
surveyor = root
}
}
}
every_owned_pop_species = { set_species_homeworld = event_target:origin_gray_empire_home }
event_target:origin_gray_home_system = {
every_system_planet = {
if = {
limit = {
has_deposit_for = shipclass_mining_station
has_mining_station = no
}
create_mining_station = { owner = root }
}
if = {
limit = {
has_deposit_for = shipclass_research_station
has_research_station = no
}
create_research_station = { owner = root }
}
}
}
country_event = { id = gray_origin.1 days = 1 }
# 不让所有国家弹出L门事件
every_playable_country = {
set_country_flag = encountered_first_lgate
}
# 封锁L门科技
set_global_flag = l_cluster_opened
}
}