##########################################################################
# Planet Megastructure Modifiers
##########################################################################

### ship / fleet scope

plnmg_pk_eradicator_ship_modifier = {
	ship_shield_reduction = 0.99
	ship_armor_reduction = 0.99
	ship_hull_mult = -0.75
	ship_hull_regen_add_perc = -0.95
	ship_speed_reduction = 0.9
	ship_weapon_damage = -10
	ship_evasion_mult = -0.95
	ship_emergency_ftl_min_days_mult = 1.5
	ship_disengage_opportunities_add = -3
	ship_disengage_chance_mult = -0.75
}

plnmg_nano_storm_effect_ship = {
	ship_shield_reduction = 0.01
	ship_armor_reduction = 0.02
	#ship_hull_mult = -0.01
	ship_shield_regen_add_perc = -0.03
	ship_hull_regen_add_perc = -0.05
	ship_armor_regen_add_perc = -0.10
	#ship_speed_reduction = 0.01
	ship_accuracy_mult = -0.03
	ship_weapon_damage = -0.03
	ship_evasion_mult = -0.03
	#ship_emergency_ftl_min_days_mult = 0.1
	ship_disengage_chance_reduction = 0.02
	ship_cloaking_strength_add = -1
}

plnmg_no_retreat_ship_modifier = {
	ship_disengage_opportunities_add = -100
	ship_disengage_chance_mult = -10
	ship_disengage_chance_reduction = 1
}

plnmg_pmcar_pnsz_mod = {
	ship_armor_mult = 0.1
	ship_hull_mult = 0.05
	ship_weapon_damage = 0.01
}

### pop group / pop job scope

# plnmg_demodulation_miners_max_workforce_mult = {
# 	job_plnmg_demodulation_miner_max_workforce_mult = 1
# 	job_plnmg_demodulation_mining_drone_max_workforce_mult = 1
# }
# plnmg_shroud_jobs_max_workforce_mult = {
# 	job_plnmg_shroud_scavenger_max_workforce_mult = 1
# 	job_plnmg_shroud_exploring_drone_max_workforce_mult = 1
# 	job_plnmg_shroud_researcher_max_workforce_mult = 1
# }
# plnmg_nirvana_managers_max_workforce_mult = {
# 	job_plnmg_nirvana_master_max_workforce_mult = 1
# 	job_plnmg_nirvana_drone_max_workforce_mult = 1
# }
# plnmg_sadists_max_workforce_mult = {
# 	job_plnmg_sadist_max_workforce_mult = 1
# 	job_plnmg_sadistic_drone_max_workforce_mult = 1
# }
# planetmega_omnipotents_max_workforce_mult = {
# 	job_planetmega_omnipotent_max_workforce_mult = 1
# 	job_planetmega_omnipotent_drone_max_workforce_mult = 1
# }

#$t$—['concept_planet_enforcers']$BONUS_WORKFORCE_FOR$：$VARIABLE|1%=+$
plnmg_demodulator_jobs_bonus_workforce_mult = {
	custom_tooltip = plnmg_dmdlt_jobs_bonus_workforce_mult_tt
	show_only_custom_tooltip = yes
	pop_plnmg_demodulation_miner_bonus_workforce_mult = 1
	pop_plnmg_demodulation_mining_drone_bonus_workforce_mult = 1
}
plnmg_shroud_jobs_bonus_workforce_mult = {
	custom_tooltip = plnmg_shroud_jobs_bonus_workforce_mult_tt
	show_only_custom_tooltip = yes
	pop_plnmg_shroud_exploring_drone_bonus_workforce_mult = 1
	pop_plnmg_shroud_scavenger_bonus_workforce_mult = 1
	pop_plnmg_shroud_researcher_bonus_workforce_mult = 1
}
plnmg_nirfac_jobs_bonus_workforce_mult = {
	custom_tooltip = plnmg_nirfac_jobs_bonus_workforce_mult_tt
	show_only_custom_tooltip = yes
	pop_plnmg_nirvana_master_bonus_workforce_mult = 1
	pop_plnmg_nirvana_drone_bonus_workforce_mult = 1
}
planetmega_omnipotents_bonus_workforce_mult = {
	custom_tooltip = planetmega_omnipotents_bonus_workforce_mult_tt
	show_only_custom_tooltip = yes
	pop_planetmega_omnipotent_bonus_workforce_mult = 1
	pop_planetmega_omnipotent_drone_bonus_workforce_mult = 1
}

### starbase scope

# plnmg_maginot_nexus_ring_buff = {
# 	ship_fire_rate_mult = 0.2
# 	ship_tracking_add = 10
# 	ship_weapon_range_mult = 10
# 	ship_engagement_range_mult = 10
# 	ship_damage_reduction_mult = 0.1
# 	ship_target_weight_mult = 0.5
# }
# plnmg_maginot_nexus_dsc_buff = {
# 	ship_fire_rate_mult = 0.15
# 	ship_tracking_add = 5
# 	ship_weapon_range_mult = 5
# 	ship_engagement_range_mult = 5
# 	ship_damage_reduction_mult = 0.05
# 	ship_target_weight_mult = 1
# }
# plnmg_maginot_nexus_tr_buff = {
# 	ship_fire_rate_mult = 0.35
# 	ship_weapon_damage = 0.20
# 	ship_tracking_add = 10
# }

### megastructure scope

plnmg_spacemega_eradicated = {
	megastructures_produces_mult = -0.5
	megastructures_upkeep_mult = 1
}

### planet scope

planetmega_has_a_megastructure = {
	icon = "gfx/interface/icons/planet_modifiers/pm_has_a_planetmega.dds"
	icon_frame = 1
	pop_bonus_workforce_mult = 0.01
}

planetmega_maginot_fired = {
	icon = "gfx/interface/icons/planet_modifiers/planetmega_maginot_fired.dds"
	icon_frame = 3
	pop_bonus_workforce_mult = -0.02
}

plnmg_singularity_ready2explode = {
	icon = "gfx/interface/icons/planet_modifiers/pm_exploding_planet.dds"
	icon_frame = 3
	pop_bonus_workforce_mult = -0.05
	planet_jobs_sr_dark_matter_produces_mult = 0.25
}

planetmega_absorbed = {
	icon = "gfx/interface/icons/planet_modifiers/pm_planet_beam.dds"
	icon_frame = 3
}

planetmega_extra_galaxy = {
	icon = "gfx/interface/icons/planet_modifiers/pm_star.dds"
	icon_frame = 1
	planet_jobs_produces_mult = 0.01
}

planetmega_nanostorm_activated = {
	icon = "gfx/interface/icons/modifiers/mod_resource_nanites_mult.dds"
	country_nanostorm_powerlevel = 1
	planet_buildings_nanites_produces_mult = 1
	station_gatherers_nanites_produces_mult = 0.5
}

planetmega_reincarnation_destroyed = {
	icon = "gfx/interface/icons/planet_modifiers/pm_slave_riots.dds" #temp
	icon_frame = 3
	pop_happiness = -0.15
	planet_stability_mult = -0.2
	planet_jobs_produces_mult = -0.25
}

planetmega_economy_promoted = {
	icon = "gfx/interface/icons/planet_modifiers/capital.dds"
	icon_frame = 1
	planet_jobs_produces_mult = 0.01
	planet_jobs_upkeep_mult = 0.01
}

planetmega_tamashi_brainwashed = {
    icon = "gfx/interface/icons/planet_modifiers/pm_assist_research.dds"
    icon_frame = 1
    pop_happiness = 0.01
}
planetmega_tms_strong_control = {
    icon = "gfx/interface/icons/planet_modifiers/pm_assist_research.dds"
	icon_frame = 1
    planet_amenities_no_happiness_add = 100
}

planetmega_worshipper_capital = {
	icon = "gfx/interface/icons/planet_modifiers/pm_has_a_planetmega.dds"
	icon_frame = 1
	planet_buildings_mega_produces_mult = 0.25
}

planetmega_currency_easing = {
	icon = "gfx/interface/icons/planet_modifiers/pm_arcology_project.dds"
	icon_frame = 2
	planet_jobs_trade_produces_mult = 0.3
	planet_buildings_trade_produces_mult = 0.3
	planet_jobs_consumer_goods_upkeep_mult = 0.2
	planet_pops_consumer_goods_upkeep_mult = 0.2
	planet_stability_add = -10
}
planetmega_currency_tightening = {
	icon = "gfx/interface/icons/planet_modifiers/pm_arcology_project.dds"
	icon_frame = 2
	planet_jobs_trade_produces_mult = -0.3
	planet_buildings_trade_produces_mult = -0.3
	planet_jobs_consumer_goods_produces_mult = 0.15
	planet_buildings_consumer_goods_produces_mult = 0.15
	planet_crime_mult = -0.3
}

origin_planetmega_builder_init_modifier = {
	icon = "gfx/interface/icons/planet_modifiers/pm_arcology_project.dds"
	icon_frame = 3
	planet_buildings_mega_produces_mult = -0.25
	planet_buildings_mega_upkeep_mult = 1
}

plaentmega_woshaper_effect_cooldown = {
	icon = "gfx/interface/icons/planet_modifiers/pm_arkship_harvested_resources.dds"
	icon_frame = 3
	pop_bonus_workforce_mult = -0.02
}

plnmg_tms_brainwashed_gestalt = {
	icon = "gfx/interface/icons/planet_modifiers/pm_crime.dds"
	icon_frame = 3
	planet_crime_no_happiness_add = 2
}
plnmg_tms_brainwashed_regular = {
	icon = "gfx/interface/icons/planet_modifiers/pm_crime.dds"
	icon_frame = 3
	pop_government_ethic_attraction = -1.5
}

# ground_megastructure_efficiency_mult = { #别试了，没用
# 	custom_tooltip = ground_megastructure_efficiency_mult_tt
# 	show_only_custom_tooltip = yes
# 	planet_buildings_mega_produces_mult = 1
# 	planet_buildings_mega_upkeep_mult = 1
# }

# specially for stars
planetmega_ca_harvested = {
	icon = "gfx/interface/icons/planet_modifiers/pm_arkship_harvested_resources.dds"
	icon_frame = 3
	station_gatherers_produces_mult = -0.25
	custom_tooltip = planetmega_ca_harvested_tt
	show_only_custom_tooltip = no
}

### country scope

empire_size_add_by_unity_tag_jobs = {
	empire_size_add = 1
	hide_from_country_list = yes
}

planetmega_custom_produces_mult = {
	planet_buildings_mega_produces_mult = 1
	planet_districts_mega_produces_mult = 1
	jobs_about_planetmega_produces_mult = 1
	#hide_from_country_list = yes
}

planetmega_custom_upkeep_mult = {
	planet_buildings_mega_upkeep_mult = 1
	planet_districts_mega_upkeep_mult = 1
	jobs_about_planetmega_upkeep_mult = 1
	#hide_from_country_list = yes
}

agenda_planetmega_granchor_finish = {
	planet_buildings_mega_produces_mult = 0.15
	planet_buildings_mega_upkeep_mult = 0.15
	jobs_about_planetmega_produces_mult = 0.15
	jobs_about_planetmega_upkeep_mult = 0.15
}

planetmega_4dot2_compensation_modifier = {
	shipsize_planetmega_defence_ship_naval_cap_usage_add = -0.8
	planet_buildings_mega_produces_mult = 0.67
	planet_districts_mega_produces_mult = 0.67
	jobs_about_planetmega_produces_mult = 0.67
}

plnmg_ricnt_enhanced_extradimensional = {
	#ship_evasion_mult = 0.05
	ship_tracking_add = 1
	ship_weapon_range_mult = 0.5
	ship_engagement_range_mult = 0.5
	#weapon_type_explosive_weapon_damage_mult = 0.05
	ship_fire_rate_mult = 0.1
}

comp_plnmg_mega_and_job_prod_mult_mod = {
	planet_buildings_mega_produces_mult = 1
	jobs_about_planetmega_produces_mult = 1
	hide_from_country_list = yes
}

planetmega_ultimate_worship = {
	pop_happiness = 0.5
	planet_pops_unity_produces_mult = 0.25
	planet_jobs_unity_produces_mult = 0.13
	pop_bonus_workforce_mult = 0.05
}

planetmega_quota_1_subject_mod = {
	planetmega_owned_limit_add = 1
	monthly_loyalty = 0.25
}
planetmega_quota_2_subject_mod = {
	planetmega_owned_limit_add = 1
	monthly_loyalty = 0.5
}
planetmega_quota_3_subject_mod = {
	planetmega_owned_limit_add = 2
	monthly_loyalty = 0.75
}

planetmega_quota_1_overlord_mod = {
	planetmega_owned_limit_add = 1
}
planetmega_quota_2_overlord_mod = {
	planetmega_owned_limit_add = 1
}
planetmega_quota_3_overlord_mod = {
	planetmega_owned_limit_add = 2
}

### test ###
# planetmega_test_modifier = {
# 	station_gatherers_produces_mult = 1
# 	ship_steal_defeated_ship_chance = 100
# 	fleet_capture_defeated_leader_chance = 100
# }
#覆盖原版(LIOS)，仅作为测试
#据代码，custom_tooltip、show_only_custom_tooltip、icon、icon_frame、important/hide_from_country_list、key这些对象字段不在清零范围——后读的块里没写的属性会沿用先读定义的值
# gal_custodian = {
#     icon = "gfx/interface/icons/modifiers/mod_country_custodian.dds"
#     country_custodian_influence_produces_add = 7 #changed
#     diplo_weight_mult = 0.33
#     #added
#     all_technology_research_speed = 0.1
#     country_unity_produces_mult = 0.33
#     empire_size_mult = -0.1
#     leader_initial_skill = 1
#     councilor_skill_add = 1
#     ruler_skill_add = 1
#     country_leader_cap_add = 1
#     country_leader_pool_size = 1
#     divided_patrongage_max_subjects = 1
#     country_government_civic_points_add = 2
#     envoys_add = 2
# }
