Initial commit
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
# =============================================================================
|
||||
# Giga + Age of Wonder Compatibility Patch — megastructure build-menu filter
|
||||
# Persistent on-screen "mode" button (see interface/zzzz_compat_megatab_bar.gui,
|
||||
# shown by events/zzzz_compat_megatab_events.txt). Cycles the build-menu filter:
|
||||
# All -> Giga only -> Age of Wonder only -> All ...
|
||||
#
|
||||
# State is two per-country flags (MP-safe, each player independent):
|
||||
# neither = All
|
||||
# compat_mega_hide_aow set = Giga only
|
||||
# compat_mega_hide_giga set = AoW only
|
||||
# Megastructures' `potential` checks these (AoW via the shared
|
||||
# AOW_trigger_mega_potential override; Giga per-structure). The list only rebuilds
|
||||
# when the build window OPENS, so you set the mode first, then open the menu.
|
||||
#
|
||||
# Three buttons share one slot in the bar; the bound button_effect `potential`
|
||||
# (evaluated live, FROM = the viewing player's country) shows only the one matching
|
||||
# the current mode, so the button always displays the current mode and clicking it
|
||||
# advances to the next. ALL THREE also require NOT has_edict = compat_hide_megatab,
|
||||
# so activating that edict hides the button entirely (live).
|
||||
# =============================================================================
|
||||
|
||||
# Current mode = All -> click sets Giga only
|
||||
compat_megatab_show_all = {
|
||||
potential = {
|
||||
from = {
|
||||
NOT = { has_edict = compat_hide_megatab }
|
||||
NOT = { has_country_flag = compat_mega_hide_giga }
|
||||
NOT = { has_country_flag = compat_mega_hide_aow }
|
||||
}
|
||||
}
|
||||
allow = { always = yes }
|
||||
effect = {
|
||||
custom_tooltip = compat_megatab_btn_tt
|
||||
hidden_effect = {
|
||||
from = {
|
||||
set_country_flag = compat_mega_hide_aow
|
||||
remove_country_flag = compat_mega_hide_giga
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Current mode = Giga only -> click sets AoW only
|
||||
compat_megatab_show_giga = {
|
||||
potential = {
|
||||
from = {
|
||||
NOT = { has_edict = compat_hide_megatab }
|
||||
has_country_flag = compat_mega_hide_aow
|
||||
NOT = { has_country_flag = compat_mega_hide_giga }
|
||||
}
|
||||
}
|
||||
allow = { always = yes }
|
||||
effect = {
|
||||
custom_tooltip = compat_megatab_btn_tt
|
||||
hidden_effect = {
|
||||
from = {
|
||||
set_country_flag = compat_mega_hide_giga
|
||||
remove_country_flag = compat_mega_hide_aow
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Current mode = AoW only -> click returns to All
|
||||
compat_megatab_show_aow = {
|
||||
potential = {
|
||||
from = {
|
||||
NOT = { has_edict = compat_hide_megatab }
|
||||
has_country_flag = compat_mega_hide_giga
|
||||
NOT = { has_country_flag = compat_mega_hide_aow }
|
||||
}
|
||||
}
|
||||
allow = { always = yes }
|
||||
effect = {
|
||||
custom_tooltip = compat_megatab_btn_tt
|
||||
hidden_effect = {
|
||||
from = {
|
||||
remove_country_flag = compat_mega_hide_giga
|
||||
remove_country_flag = compat_mega_hide_aow
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
# =============================================================================
|
||||
# Giga + Age of Wonder Compatibility Patch — "hide the filter button" edict
|
||||
# A free, perpetual toggle. While active, has_edict = compat_hide_megatab is true,
|
||||
# and the filter button's button_effects (common/button_effects/zzzz_compat_megatabs.txt)
|
||||
# fail their `potential`, so the on-screen button disappears. Toggle off to restore.
|
||||
# The filter setting itself is unaffected; it just can't be changed while hidden.
|
||||
# =============================================================================
|
||||
compat_hide_megatab = {
|
||||
length = -1 # perpetual toggle
|
||||
icon = "GFX_edict_type_policy"
|
||||
|
||||
resources = {
|
||||
category = edicts
|
||||
cost = { influence = 0 } # free UI preference toggle
|
||||
}
|
||||
|
||||
# No gameplay effect; the active state is read via has_edict only. Use a
|
||||
# custom_tooltip (not a stat modifier) so the edicts menu shows clean text
|
||||
# instead of a "+0%" line.
|
||||
effect = {
|
||||
custom_tooltip = edict_compat_hide_megatab_effect
|
||||
}
|
||||
|
||||
potential = { is_ai = no }
|
||||
allow = { always = yes }
|
||||
|
||||
ai_weight = { weight = 0 }
|
||||
}
|
||||
@@ -0,0 +1,242 @@
|
||||
# =============================================================================
|
||||
# Giga + Age of Wonder Compatibility Patch — Dyson Sphere [single unified line]
|
||||
# Design (per user): the ONLY Dyson Sphere path is
|
||||
# Giga Dyson Swarm -> AOW (star-class) Dyson Sphere
|
||||
# AOW's own Dyson Sphere/Swarm build buttons and Giga's direct Dyson Sphere build
|
||||
# are all disabled (see zzzz_compat_dyson_swarm.txt and
|
||||
# zzzz_compat_giga_dyson_overrides.txt).
|
||||
#
|
||||
# AOW_MEGA_dyson_sphere_entry below is now an UPGRADE-ONLY transitional structure:
|
||||
# * upgrade_from = the completed Giga swarm stages (dyson_swarm_3 + dyson_swarm_3_basic
|
||||
# + the star-class ones) AND AOW's own swarm variants (AOW_MEGA_dyson_swarm_2_*
|
||||
# and AOW_MEGA_dyson_swarm_3_*) — so a finished swarm of ANY kind upgrades into it.
|
||||
# Having upgrade_from also removes it from the build menu (no standalone AOW build).
|
||||
# * its on_build_complete (fires on upgrade too) reads the ACTUAL star class and
|
||||
# redirects to AOW_MEGA_dyson_sphere_0_<class> (a zero-build-time passthrough).
|
||||
# sphere_0 then cascades: sphere_0 -> sphere_1 -> sphere_2 (see
|
||||
# zzzz_compat_dyson_variants.txt), so the player lands on sphere_2 ("Initial").
|
||||
# From there AOW's own sphere chain (2 -> 3 -> 4 -> 5 -> disco) takes over.
|
||||
# * the "no existing megastructure" placement check was removed because the
|
||||
# structure being upgraded (the swarm) is itself a megastructure.
|
||||
# * the single-star-system check is relaxed when is_upgrading = yes, since a Giga
|
||||
# swarm can be built in binary/trinary systems that the AOW sphere normally forbids.
|
||||
# Giga's swarm->Giga-sphere link is severed in zzzz_compat_giga_dyson_overrides.txt.
|
||||
# =============================================================================
|
||||
|
||||
AOW_MEGA_dyson_sphere_entry = {
|
||||
entity = "construction_platform_entity"
|
||||
construction_entity = "construction_platform_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
place_entity_on_planet_plane = no
|
||||
entity_offset = { x = -7 y = -7 }
|
||||
build_time = 1800
|
||||
custom_tooltip_requirements = "MEGASTRUCTURE_TOOLTIP_REQUIREMENTS_DYSON_SPHERE"
|
||||
resources = {
|
||||
category = megastructures
|
||||
cost = {
|
||||
unity = 1000
|
||||
}
|
||||
cost = {
|
||||
alloys = 5000
|
||||
}
|
||||
upkeep = {
|
||||
energy = 5
|
||||
}
|
||||
}
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
# COMPAT: reached by upgrading ANY completed Dyson Swarm (Giga or AOW, any star class).
|
||||
# Having upgrade_from also removes it from the build menu (no standalone AOW sphere build).
|
||||
upgrade_from = {
|
||||
dyson_swarm_3
|
||||
dyson_swarm_3_basic
|
||||
dyson_swarm_3_a_star
|
||||
dyson_swarm_3_b_star
|
||||
dyson_swarm_3_f_star
|
||||
dyson_swarm_3_g_star
|
||||
dyson_swarm_3_k_star
|
||||
dyson_swarm_3_m_giant_star
|
||||
dyson_swarm_3_m_star
|
||||
AOW_MEGA_dyson_swarm_2_hyper
|
||||
AOW_MEGA_dyson_swarm_2_super
|
||||
AOW_MEGA_dyson_swarm_2_o
|
||||
AOW_MEGA_dyson_swarm_2_b
|
||||
AOW_MEGA_dyson_swarm_2_giant
|
||||
AOW_MEGA_dyson_swarm_2_a
|
||||
AOW_MEGA_dyson_swarm_2_f
|
||||
AOW_MEGA_dyson_swarm_2_g
|
||||
AOW_MEGA_dyson_swarm_2_k
|
||||
AOW_MEGA_dyson_swarm_2_m
|
||||
AOW_MEGA_dyson_swarm_3_hyper
|
||||
AOW_MEGA_dyson_swarm_3_super
|
||||
AOW_MEGA_dyson_swarm_3_o
|
||||
AOW_MEGA_dyson_swarm_3_b
|
||||
AOW_MEGA_dyson_swarm_3_giant
|
||||
AOW_MEGA_dyson_swarm_3_a
|
||||
AOW_MEGA_dyson_swarm_3_f
|
||||
AOW_MEGA_dyson_swarm_3_g
|
||||
AOW_MEGA_dyson_swarm_3_k
|
||||
AOW_MEGA_dyson_swarm_3_m
|
||||
}
|
||||
# COMPAT FIX: the Giga-Swarm to AoW-Sphere bridge must always complete, no matter
|
||||
# what the Giga/AoW megastructure sort button is set to. This is AoW's own
|
||||
# AOW_trigger_mega_potential logic for KEY = dyson_sphere, inlined verbatim EXCEPT the
|
||||
# compat_mega_hide_aow filter line is omitted, so the sphere upgrade is never blocked
|
||||
# by the sort button. The entry is upgrade-only (it never appears in the build menu),
|
||||
# so exempting it adds zero menu clutter; AoW's real dyson-sphere enable/cap game
|
||||
# rules (no_player / no_ai flags + mega-cap vars) are preserved.
|
||||
potential = {
|
||||
if = {
|
||||
limit = { is_ai = no }
|
||||
OR = {
|
||||
NOT = { has_global_flag = AOW_flag_GLBL_no_player_dyson_sphere }
|
||||
event_target:global_event_country = {
|
||||
check_variable = { which = AOW_var_player_mega_cap_dyson_sphere value != 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
else_if = {
|
||||
limit = { is_ai = yes }
|
||||
OR = {
|
||||
NOT = { has_global_flag = AOW_flag_GLBL_no_ai_dyson_sphere }
|
||||
event_target:global_event_country = {
|
||||
check_variable = { which = AOW_var_ai_mega_cap_dyson_sphere value != 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
possible = {
|
||||
hidden_trigger = { exists = starbase }
|
||||
custom_tooltip = {#on_build_start
|
||||
fail_text = "AOW_mega_requires_CNTR_no_more_megastructure"
|
||||
from = { NOT = { has_country_flag = AOW_flag_CNTR_no_more_dyson_sphere } }
|
||||
}
|
||||
custom_tooltip = {#必须在国境内
|
||||
fail_text = "requires_inside_border"
|
||||
is_inside_border = from
|
||||
}
|
||||
custom_tooltip = {#星系内不能有非人工非土著的殖民地
|
||||
fail_text = "requires_no_colonies"
|
||||
AOW_trgr_SSTM_has_non_artificial_non_primitive_colony = no
|
||||
}
|
||||
custom_tooltip = {#有入侵性政策才能在土著星系建造
|
||||
fail_text = "blocked_by_pre_ftl_policy"
|
||||
AOW_trgr_SSTM_can_aggressively_interfere_with_pre_ftl = yes
|
||||
}
|
||||
custom_tooltip = {#必须是单恒星星系
|
||||
fail_text = "AOW_mega_requires_SSTM_single_star"
|
||||
OR = {
|
||||
from = { has_technology = AOW_TECH_dimension_hiding }
|
||||
AOW_trgr_SSTM_single_star_system = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
placement_rules = {
|
||||
planet_possible = {
|
||||
custom_tooltip = {#必须光谱分类为OBAFGKM的恒星
|
||||
fail_text = "AOW_mega_requires_PLNT_obafgkm_star"
|
||||
AOW_trgr_PLNT_obafgkm_star = yes
|
||||
}
|
||||
if = {#超巨星和特超巨星上建造需要掌握多维空间科技
|
||||
limit = {
|
||||
planet = {
|
||||
OR = {
|
||||
AOW_trgr_PLNT_super_star = yes
|
||||
AOW_trgr_PLNT_hyper_star = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
custom_tooltip = {
|
||||
fail_text = "AOW_mega_requires_PLNT_multi_dimensional_dyson_sphere"
|
||||
from = { has_technology = AOW_TECH_multi_dimensional_warehouse }
|
||||
}
|
||||
}
|
||||
custom_tooltip = {#不能有异常
|
||||
fail_text = "requires_no_anomaly"
|
||||
NOT = { has_anomaly = yes }
|
||||
}
|
||||
# COMPAT: removed the "no existing megastructure" check — this is reached by
|
||||
# upgrading the swarm, which is itself a megastructure on this star.
|
||||
}
|
||||
}
|
||||
|
||||
# root = system
|
||||
# from = country
|
||||
ai_weight = {
|
||||
weight = 300
|
||||
#位置限制
|
||||
modifier = { factor = 0.1 starbase = { NOT = { has_starbase_size >= starbase_starfortress } } }
|
||||
modifier = { factor = 0.1 AOW_trgr_SSTM_neighbor_didnt_undercontrol = yes }
|
||||
#自身限制
|
||||
modifier = { factor = 1.5 from = { is_pacifist = yes } }
|
||||
}
|
||||
on_build_start = {
|
||||
set_star_flag = dyson_sphere_construction
|
||||
AOW_effect_check_mega_cap = {
|
||||
key = dyson_sphere
|
||||
constructing = dyson_sphere_0
|
||||
}
|
||||
}
|
||||
on_build_cancel = {
|
||||
remove_star_flag = dyson_sphere_construction
|
||||
}
|
||||
on_build_complete = {
|
||||
remove_star_flag = dyson_sphere_construction
|
||||
set_star_flag = dyson_sphere_built
|
||||
from = { set_country_flag = built_dyson_sphere }
|
||||
fromfrom = {
|
||||
set_megastructure_flag = dyson_sphere
|
||||
set_megastructure_flag = AOW_flag_MEGA_dyson_sphere_@owner
|
||||
planet = { AOW_eft_PLNT_dismantle_orbital_station = yes }
|
||||
if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_hyper_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_0_hyper
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else_if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_super_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_0_super
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else_if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_o_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_0_O
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else_if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_b_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_0_B
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else_if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_giant_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_0_giant
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else_if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_a_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_0_A
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else_if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_f_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_0_F
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else_if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_g_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_0_G
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else_if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_k_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_0_K
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else_if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_m_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_0_M
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
# =============================================================================
|
||||
# Giga + Age of Wonder Compatibility Patch — Dyson Swarm [TIER 2 / divergent]
|
||||
# "TWO BUILD BUTTONS, Giga primary" — same architecture as zzzz_compat_dyson_sphere.txt.
|
||||
#
|
||||
# AOW's vanilla-override `dyson_swarm_1` is a fresh build that redirects by star
|
||||
# spectral class to AOW_MEGA_dyson_swarm_1_<class> in on_build_complete. Giga
|
||||
# keeps the vanilla dyson_swarm_1/2/3 (wins by load order); AOW's entry is
|
||||
# re-homed here to a new directly-buildable `AOW_MEGA_dyson_swarm_entry` (faithful
|
||||
# copy of AOW's dyson_swarm_1, new ID — all AOW refs it makes remain valid).
|
||||
# AOW's `AOW_MEGA_dyson_swarm_*` variants keep their unique IDs and coexist.
|
||||
# Mutual exclusion via AOW_trgr_PLNT_existing_megastructure = no.
|
||||
# =============================================================================
|
||||
|
||||
AOW_MEGA_dyson_swarm_entry = {
|
||||
entity = "dyson_swarm_phase_1_entity"
|
||||
construction_entity = "dyson_swarm_phase_1_entity"
|
||||
portrait = "GFX_megastructure_dyson_swarm_background"
|
||||
entity_offset = { x = -0.1 y = -0.1 }
|
||||
rotate_to_center = no
|
||||
scale_offset = yes
|
||||
place_entity_on_planet_plane = yes
|
||||
use_planet_resource = yes
|
||||
build_time = 1080 # 3 years
|
||||
custom_tooltip_requirements = "MEGASTRUCTURE_TOOLTIP_REQUIREMENTS_DYSON_SPHERE"
|
||||
resources = {
|
||||
category = megastructures
|
||||
cost = {
|
||||
unity = 1000
|
||||
}
|
||||
cost = {
|
||||
alloys = 500
|
||||
}
|
||||
upkeep = {
|
||||
alloys = 5
|
||||
}
|
||||
}
|
||||
construction_blocks_and_blocked_by = none
|
||||
inline_script = {
|
||||
script = megastructures/dismantle_megastructure_with_effects
|
||||
time = 360
|
||||
tech = tech_dyson_swarm
|
||||
category = megastructures
|
||||
key = dyson_swarm
|
||||
alloys = 500
|
||||
minerals = 0 vm = 0 eg = 0 rc = 0 lm = 0 zo = 0 dm = 0
|
||||
}
|
||||
prerequisites = { "tech_dyson_swarm" }
|
||||
potential = { always = no } # COMPAT: AOW Dyson Swarm build disabled — use the Giga Dyson Swarm instead.
|
||||
possible = {
|
||||
hidden_trigger = { exists = starbase }
|
||||
custom_tooltip = {#on_build_start
|
||||
fail_text = "AOW_mega_requires_CNTR_no_more_megastructure"
|
||||
from = { NOT = { has_country_flag = AOW_flag_CNTR_no_more_dyson_swarm } }
|
||||
}
|
||||
custom_tooltip = {
|
||||
fail_text = "requires_inside_border"
|
||||
is_inside_border = from
|
||||
}
|
||||
}
|
||||
placement_rules = {
|
||||
planet_possible = {
|
||||
custom_tooltip = {
|
||||
fail_text = "AOW_mega_requires_PLNT_obafgkm_star_rift_star"
|
||||
OR = {
|
||||
AOW_trgr_PLNT_obafgkm_star = yes
|
||||
is_planet_class = pc_rift_star
|
||||
}
|
||||
}
|
||||
custom_tooltip = {
|
||||
fail_text = "requires_no_anomaly"
|
||||
NOT = { has_anomaly = yes }
|
||||
}
|
||||
custom_tooltip = {#放置处不能有巨构
|
||||
fail_text = "requires_no_existing_megastructure"
|
||||
AOW_trgr_PLNT_existing_megastructure = no
|
||||
}
|
||||
if = {
|
||||
limit = {
|
||||
from = { is_ai = yes }
|
||||
}
|
||||
NOR = {
|
||||
has_deposit = d_energy_1
|
||||
has_deposit = d_energy_2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
country_modifier = {
|
||||
custom_tooltip = dyson_swarm_1_mod_tooltip
|
||||
}
|
||||
# root = system
|
||||
# from = country
|
||||
ai_weight = {
|
||||
factor = 5
|
||||
modifier = {
|
||||
factor = 0.1
|
||||
starbase = { NOT = { has_starbase_size >= starbase_starfortress } }
|
||||
}
|
||||
modifier = {
|
||||
factor = 0.1
|
||||
any_neighbor_system = {
|
||||
exists = owner
|
||||
NOT = {
|
||||
owner = { is_same_value = from }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
on_build_start = {
|
||||
AOW_effect_check_mega_cap = {
|
||||
key = dyson_swarm
|
||||
constructing = dyson_swarm_1
|
||||
}
|
||||
}
|
||||
on_build_cancel = {}
|
||||
on_build_complete = {
|
||||
from = {
|
||||
change_variable = { which = dyson_swarm_counter value = 1 }
|
||||
}
|
||||
fromfrom.planet = {
|
||||
AOW_eft_PLNT_dismantle_orbital_station = yes
|
||||
remove_modifier = dyson_swarm_1_mod
|
||||
remove_modifier = dyson_swarm_2_mod
|
||||
remove_modifier = dyson_swarm_3_mod
|
||||
add_modifier = {
|
||||
modifier = dyson_swarm_1_mod
|
||||
days = -1
|
||||
}
|
||||
}
|
||||
fromfrom = {
|
||||
planet = { AOW_eft_PLNT_dismantle_orbital_station = yes }
|
||||
set_megastructure_flag = dyson_swarm
|
||||
set_megastructure_flag = AOW_flag_MEGA_dyson_swarm_@owner
|
||||
if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_hyper_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_swarm_1_hyper
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else_if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_super_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_swarm_1_super
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else_if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_o_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_swarm_1_o
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else_if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_b_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_swarm_1_b
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else_if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_giant_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_swarm_1_giant
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else_if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_a_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_swarm_1_a
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else_if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_f_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_swarm_1_f
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else_if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_g_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_swarm_1_g
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else_if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_k_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_swarm_1_k
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else_if = {
|
||||
limit = { planet = { AOW_trgr_PLNT_m_star = yes } }
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_swarm_1_m
|
||||
finish_upgrade = yes
|
||||
}
|
||||
else = {}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,550 @@
|
||||
# =============================================================================
|
||||
# Giga + Age of Wonder Compatibility Patch — Giga Dyson Swarm/Sphere overrides
|
||||
# AOW overrides dyson_swarm_1 (redirects to AOW swarm) and dyson_swarm_3 (removes
|
||||
# Giga's auto-upgrade to dyson_swarm_3_basic). This file restores Giga's original
|
||||
# behaviour so the Giga Dyson Swarm chain works correctly.
|
||||
#
|
||||
# User design: the ONLY Dyson Sphere path is Giga Dyson Swarm -> AOW Dyson Sphere.
|
||||
# * dyson_swarm_1 : restored to Giga original (no AOW redirect to AOW swarm).
|
||||
# * dyson_swarm_3 : restored to Giga original, then on_build_complete routes
|
||||
# DIRECTLY to AOW_MEGA_dyson_sphere_entry (bypasses swarm_3_basic / star-class
|
||||
# passthroughs which are virtual inline_script shells that cannot carry a
|
||||
# reliable on_build_complete).
|
||||
# * dyson_swarm_3_basic + 7 star-class variants : on_build_complete overrides
|
||||
# kept as a safety net in case any other path reaches them (dead code under
|
||||
# normal flow). These were the cause of the "stuck at swarm stage 3" bug.
|
||||
# * dyson_sphere_0 : direct Giga Dyson Sphere build DISABLED.
|
||||
# * dyson_sphere_2 : Giga swarm->sphere link severed.
|
||||
# =============================================================================
|
||||
|
||||
# =============================================================================
|
||||
# dyson_swarm_1 — Giga original restored (AOW's redirect removed)
|
||||
# =============================================================================
|
||||
dyson_swarm_1 = {
|
||||
entity = "dyson_swarm_phase_1_entity"
|
||||
construction_entity = "dyson_swarm_phase_1_entity"
|
||||
portrait = "GFX_megastructure_dyson_swarm_background"
|
||||
entity_offset = { x = 0.1 y = 0.1 }
|
||||
rotate_to_center = no
|
||||
scale_offset = yes
|
||||
place_entity_on_planet_plane = yes
|
||||
use_planet_resource = yes
|
||||
build_time = 1080 # 3 years
|
||||
resources = {
|
||||
category = giga_kilostructures
|
||||
cost = {
|
||||
unity = 1000
|
||||
}
|
||||
inline_script = {
|
||||
script = megastructures/generic_parts/giga_mega_alloy_cost
|
||||
alloys = 500
|
||||
}
|
||||
upkeep = {
|
||||
alloys = 5
|
||||
}
|
||||
}
|
||||
|
||||
outliner_trigger = { exists = owner NOT = { has_megastructure_flag = giga_outliner_hidden_by_@owner } }
|
||||
|
||||
construction_blocks_and_blocked_by = none
|
||||
|
||||
prerequisites = { "tech_dyson_swarm" }
|
||||
|
||||
dismantle_cost = {
|
||||
category = giga_kilostructures
|
||||
cost = {
|
||||
energy = 500
|
||||
}
|
||||
}
|
||||
|
||||
dismantle_time = 360
|
||||
|
||||
dismantle_potential = {
|
||||
always = yes
|
||||
}
|
||||
|
||||
dismantle_possible = {
|
||||
can_dismantle_megastructure = {
|
||||
TECH = tech_dyson_swarm
|
||||
}
|
||||
}
|
||||
|
||||
on_dismantle_start = {
|
||||
fromfrom.planet = { set_planet_flag = giga_dismantle_not_cancelled planet_event = { id = giga_dismantle.001 days = 361 } }
|
||||
}
|
||||
|
||||
on_dismantle_cancel = {
|
||||
fromfrom.planet = { remove_planet_flag = giga_dismantle_not_cancelled }
|
||||
}
|
||||
|
||||
on_dismantle_complete = {
|
||||
from = {
|
||||
add_resource = {
|
||||
alloys = 500
|
||||
mult = modifier:megastructure_dismantle_refund_mult
|
||||
}
|
||||
if = {
|
||||
limit = {
|
||||
check_variable = {
|
||||
which = dyson_swarm_counter
|
||||
value >= 1
|
||||
}
|
||||
}
|
||||
change_variable = {
|
||||
which = dyson_swarm_counter
|
||||
value = -1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
potential = {
|
||||
NOT = { has_country_flag = compat_mega_hide_giga } # compat (SPIKE): AoW-only build-menu tab hides Giga structures
|
||||
has_machine_age_dlc = yes
|
||||
NOT = { has_global_flag = vanilla_dyson_swarm_disabled}
|
||||
OR = {
|
||||
check_variable = {
|
||||
which = dyson_swarm_counter
|
||||
value < value:dyson_swarm_limit
|
||||
}
|
||||
has_global_flag = vanilla_dyson_swarm_capped_u
|
||||
}
|
||||
}
|
||||
|
||||
possible = {
|
||||
hidden_trigger = {
|
||||
exists = starbase
|
||||
}
|
||||
custom_tooltip = {
|
||||
fail_text = "requires_inside_border"
|
||||
is_inside_border = from
|
||||
}
|
||||
custom_tooltip = {
|
||||
fail_text = "requires_surveyed_system"
|
||||
NOT = {
|
||||
any_system_planet = {
|
||||
is_surveyed = {
|
||||
who = prev.from
|
||||
status = no
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
custom_tooltip = {
|
||||
fail_text = "requires_less_than_x_dyson_swarms"
|
||||
from = {
|
||||
OR = {
|
||||
check_variable = {
|
||||
which = dyson_swarm_counter
|
||||
value < value:dyson_swarm_limit
|
||||
}
|
||||
has_global_flag = vanilla_dyson_swarm_capped_u
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
placement_rules = {
|
||||
planet_possible = {
|
||||
custom_tooltip = { fail_text = "requires_no_existing_megastructure" NOR = { has_planet_flag = megastructure has_planet_flag = has_megastructure } }
|
||||
custom_tooltip = { fail_text = "must_build_around_star" is_star = yes }
|
||||
custom_tooltip = { fail_text = "requires_no_anomaly" has_anomaly = no }
|
||||
custom_tooltip = { fail_text = "requires_further_stars" NOR = { AND = { giga_is_close_pair_star = yes is_primary_star = no } giga_is_close_pair_primary = yes } }
|
||||
custom_tooltip = {
|
||||
fail_text = "requires_standard_star_class"
|
||||
giga_brown_dwarf = no
|
||||
OR = {
|
||||
giga_is_standard_star = yes
|
||||
is_planet_class = pc_toxoid_star
|
||||
}
|
||||
giga_is_o_star_for_megas = no
|
||||
NOT = { has_planet_flag = giga_eawaf_sun }
|
||||
}
|
||||
if = {
|
||||
limit = {
|
||||
from = { is_ai = yes }
|
||||
}
|
||||
NOR = {
|
||||
has_deposit = d_energy_1
|
||||
has_deposit = d_energy_2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
country_modifier = {
|
||||
custom_tooltip = dyson_swarm_1_mod_tooltip
|
||||
}
|
||||
|
||||
# root = system
|
||||
# from = country
|
||||
ai_weight = {
|
||||
weight = value:giga_ai_base_mega
|
||||
|
||||
mult = value:giga_ai_core_territory
|
||||
|
||||
mult = value:giga_ai_value_deposits
|
||||
|
||||
mult = value:giga_ai_prevent_spam|MEGA|dyson_swarm|
|
||||
}
|
||||
|
||||
on_build_start = {
|
||||
from = {
|
||||
set_country_flag = is_currently_building_dyson_swarm
|
||||
}
|
||||
}
|
||||
on_build_cancel = {
|
||||
from = {
|
||||
remove_country_flag = is_currently_building_dyson_swarm
|
||||
}
|
||||
}
|
||||
on_build_complete = {
|
||||
set_star_flag = conduit_excluded
|
||||
fromfrom.planet = {
|
||||
set_planet_flag = has_megastructure
|
||||
add_modifier = {
|
||||
modifier = dyson_swarm_1_mod
|
||||
days = -1
|
||||
}
|
||||
if = {
|
||||
limit = { has_orbital_station = yes }
|
||||
orbital_station = {
|
||||
dismantle = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
from = {
|
||||
remove_country_flag = is_currently_building_dyson_swarm
|
||||
set_timed_country_flag = { years = 5 flag = has_recently_built_dyson_swarm }
|
||||
change_variable = {
|
||||
which = dyson_swarm_counter
|
||||
value = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# dyson_sphere_0 — Direct Giga Dyson Sphere build DISABLED (build a Giga Dyson Swarm instead)
|
||||
# =============================================================================
|
||||
dyson_sphere_0 = {
|
||||
entity = "construction_platform_entity"
|
||||
construction_entity = "construction_platform_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
place_entity_on_planet_plane = no
|
||||
entity_offset = { x = -7 y = -7 }
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
build_time = 0
|
||||
potential = { always = no }
|
||||
possible = { always = no }
|
||||
placement_rules = { planet_possible = { always = no } }
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# dyson_sphere_2 — Giga swarm->Giga sphere link severed (rerouted to AOW). Unreachable.
|
||||
# =============================================================================
|
||||
dyson_sphere_2 = {
|
||||
entity = "dyson_sphere_phase_02_entity"
|
||||
construction_entity = "dyson_sphere_part_1_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
place_entity_on_planet_plane = no
|
||||
upgrade_from = { dyson_sphere_1 }
|
||||
build_time = 0
|
||||
potential = { always = no }
|
||||
possible = { always = no }
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# dyson_swarm_3 — Giga original restored (AOW removed the auto-upgrade).
|
||||
# COMPAT: on_build_complete routes DIRECTLY to AOW_MEGA_dyson_sphere_entry.
|
||||
# The Giga star-class scaling (giga_dyson_scaling) is irrelevant here because
|
||||
# the AOW sphere entry bridge reads the actual star class and routes to the
|
||||
# correct sphere_0 variant. Bypassing swarm_3_basic / swarm_3_*_star avoids
|
||||
# the "stuck at swarm stage 3" bug — those are virtual inline_script shells
|
||||
# that cannot carry a functioning on_build_complete.
|
||||
# =============================================================================
|
||||
dyson_swarm_3 = {
|
||||
entity = "dyson_swarm_phase_3_entity"
|
||||
construction_entity = "dyson_swarm_phase_3_entity"
|
||||
portrait = "GFX_megastructure_dyson_swarm_background"
|
||||
entity_offset = { x = -0.1 y = -0.1 }
|
||||
rotate_to_center = no
|
||||
scale_offset = yes
|
||||
place_entity_on_planet_plane = yes
|
||||
outliner_trigger = {
|
||||
exists = owner
|
||||
system_has_arc_furnace = no
|
||||
NOT = {
|
||||
solar_system = {
|
||||
has_star_flag = arc_furnace_construction
|
||||
}
|
||||
}
|
||||
NOT = {
|
||||
solar_system = {
|
||||
any_system_planet = {
|
||||
is_colony = yes
|
||||
is_artificial = no
|
||||
exists = owner
|
||||
owner = {
|
||||
is_primitive = no
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if = {
|
||||
limit = {
|
||||
solar_system = {
|
||||
any_system_planet = {
|
||||
exists = owner
|
||||
owner = {
|
||||
is_primitive = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
owner = {
|
||||
has_policy_flag = interference_aggressive
|
||||
}
|
||||
}
|
||||
owner = {
|
||||
has_technology = tech_dyson_sphere
|
||||
OR = {
|
||||
has_global_flag = vanilla_dyson_capped_u
|
||||
check_variable = { which = giga_current_vanilla_dyson value < giga_vanilla_dyson_cap }
|
||||
root = { is_upgrading = yes }
|
||||
}
|
||||
}
|
||||
NOT = { has_megastructure_flag = giga_outliner_hidden_by_@owner }
|
||||
}
|
||||
|
||||
construction_blocks_and_blocked_by = none
|
||||
use_planet_resource = yes
|
||||
|
||||
dismantle_cost = {
|
||||
category = giga_kilostructures
|
||||
cost = {
|
||||
energy = 1500
|
||||
}
|
||||
}
|
||||
|
||||
dismantle_time = 360
|
||||
|
||||
dismantle_potential = {
|
||||
always = yes
|
||||
}
|
||||
|
||||
dismantle_possible = {
|
||||
can_dismantle_megastructure = {
|
||||
TECH = tech_dyson_swarm
|
||||
}
|
||||
}
|
||||
|
||||
on_dismantle_start = {
|
||||
fromfrom.planet = { set_planet_flag = giga_dismantle_not_cancelled planet_event = { id = giga_dismantle.003 days = 361 } }
|
||||
}
|
||||
|
||||
on_dismantle_cancel = {
|
||||
fromfrom.planet = { remove_planet_flag = giga_dismantle_not_cancelled }
|
||||
}
|
||||
|
||||
on_dismantle_complete = {
|
||||
from = {
|
||||
add_resource = {
|
||||
alloys = 1500
|
||||
mult = modifier:megastructure_dismantle_refund_mult
|
||||
}
|
||||
if = {
|
||||
limit = {
|
||||
check_variable = {
|
||||
which = dyson_swarm_counter
|
||||
value >= 1
|
||||
}
|
||||
}
|
||||
change_variable = {
|
||||
which = dyson_swarm_counter
|
||||
value = -1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
build_time = 1080 # 3 years
|
||||
resources = {
|
||||
category = giga_kilostructures
|
||||
cost = {
|
||||
unity = 5000
|
||||
}
|
||||
inline_script = {
|
||||
script = megastructures/generic_parts/giga_mega_alloy_cost
|
||||
alloys = 1500
|
||||
}
|
||||
|
||||
upkeep = {
|
||||
alloys = 20
|
||||
}
|
||||
}
|
||||
upgrade_from = {
|
||||
dyson_swarm_2
|
||||
}
|
||||
|
||||
prerequisites = { "tech_dyson_swarm" }
|
||||
|
||||
potential = {
|
||||
always = yes
|
||||
}
|
||||
|
||||
country_modifier = {
|
||||
custom_tooltip = dyson_swarm_3_mod_tooltip
|
||||
}
|
||||
|
||||
ai_weight = { weight = value:giga_ai_base_continue }
|
||||
|
||||
on_build_complete = {
|
||||
fromfrom.planet = {
|
||||
remove_modifier = dyson_swarm_2_mod
|
||||
add_modifier = {
|
||||
modifier = dyson_swarm_3_mod
|
||||
days = -1
|
||||
}
|
||||
}
|
||||
if = {
|
||||
limit = {
|
||||
any_system_megastructure = {
|
||||
OR = {
|
||||
is_megastructure_type = orbital_arc_furnace_4
|
||||
is_megastructure_type = orbital_arc_furnace_restored
|
||||
}
|
||||
}
|
||||
}
|
||||
from = {
|
||||
set_country_flag = burning_brightly_achievement
|
||||
}
|
||||
}
|
||||
# COMPAT: route directly to AOW sphere entry (bypassing Giga's
|
||||
# swarm_3_basic / swarm_3_*_star virtual passthroughs). The entry
|
||||
# bridge reads the actual star class and routes to the correct
|
||||
# AOW sphere_0 variant.
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_entry
|
||||
finish_upgrade = yes
|
||||
}
|
||||
fromfrom = {
|
||||
set_megastructure_flag = giga_dyson_swarm
|
||||
if = {
|
||||
limit = {
|
||||
OR = {
|
||||
has_global_flag = vanilla_dyson_disabled
|
||||
NOT = { has_global_flag = vanilla_dyson_swarm_replace_disabled }
|
||||
}
|
||||
}
|
||||
set_megastructure_flag = giga_outliner_hidden_by_@owner
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# Giga swarm stage-3 final variants — SAFETY NET overrides.
|
||||
# These are normally UNREACHED because dyson_swarm_3 now routes directly to
|
||||
# AOW_MEGA_dyson_sphere_entry (see above). The on_build_complete redirects below
|
||||
# exist only as dead-code insurance in case any other path creates these
|
||||
# inline_script virtual megastructures. They were the original compat design
|
||||
# but proved unreliable — the inline_script body does not support a functioning
|
||||
# on_build_complete override, which caused the "stuck at swarm stage 3" bug.
|
||||
# =============================================================================
|
||||
|
||||
dyson_swarm_3_basic = {
|
||||
inline_script = {
|
||||
script = megastructures/dyson_swarm/dyson_swarm_scale
|
||||
}
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_entry
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dyson_swarm_3_a_star = {
|
||||
inline_script = {
|
||||
script = megastructures/dyson_swarm/dyson_swarm_scale
|
||||
}
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_entry
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dyson_swarm_3_b_star = {
|
||||
inline_script = {
|
||||
script = megastructures/dyson_swarm/dyson_swarm_scale
|
||||
}
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_entry
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dyson_swarm_3_f_star = {
|
||||
inline_script = {
|
||||
script = megastructures/dyson_swarm/dyson_swarm_scale
|
||||
}
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_entry
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dyson_swarm_3_g_star = {
|
||||
inline_script = {
|
||||
script = megastructures/dyson_swarm/dyson_swarm_scale
|
||||
}
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_entry
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dyson_swarm_3_k_star = {
|
||||
inline_script = {
|
||||
script = megastructures/dyson_swarm/dyson_swarm_scale
|
||||
}
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_entry
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dyson_swarm_3_m_giant_star = {
|
||||
inline_script = {
|
||||
script = megastructures/dyson_swarm/dyson_swarm_scale
|
||||
}
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_entry
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dyson_swarm_3_m_star = {
|
||||
inline_script = {
|
||||
script = megastructures/dyson_swarm/dyson_swarm_scale
|
||||
}
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_entry
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,299 @@
|
||||
# =============================================================================
|
||||
# Giga + Age of Wonder Compatibility Patch — hyper_relay family [TIER 1]
|
||||
# Loads after both mods, so these definitions win the merge.
|
||||
#
|
||||
# MERGE METHOD (Tier 1 template):
|
||||
# * Base = Giga's definition — it uses the modern 4.x dismantle API
|
||||
# (dismantle_cost/dismantle_possible/...), the correct hyper-relay portrait,
|
||||
# the richer `possible` block, Giga's AI weighting, and already lists
|
||||
# `giga_hyper_relay_ai_site` in upgrade_from (so Giga's AI relay placement
|
||||
# keeps working).
|
||||
# * Graft from AOW = its per-structure enable/disable toggle
|
||||
# `AOW_trigger_mega_potential = { KEY = hyper_relay }`, added to `potential`
|
||||
# so AOW's settings menu can still disable the relay. (Defaults to enabled.)
|
||||
# * upgrade_from = union of both — Giga's is already the superset here.
|
||||
# Net: nothing from either mod is lost regardless of load order.
|
||||
# =============================================================================
|
||||
|
||||
hyper_relay = {
|
||||
entity = "hyper_relay_entity"
|
||||
construction_entity = "hyper_relay_entity"
|
||||
portrait = "GFX_megastructure_hyper_relay_background"
|
||||
place_entity_on_planet_plane = no
|
||||
build_outside_gravity_well = yes
|
||||
show_galactic_map_icon = no
|
||||
build_time = 360
|
||||
show_in_outliner = no
|
||||
|
||||
resources = {
|
||||
category = megastructures_hyper_relay
|
||||
cost = {
|
||||
trigger = {
|
||||
NOT = { has_country_flag = flash_forge_hyper_relay_activated }
|
||||
}
|
||||
rare_crystals = 100
|
||||
influence = 25
|
||||
}
|
||||
inline_script = {
|
||||
script = megastructures/generic_parts/giga_mega_alloy_cost
|
||||
condition = "NOT = { has_country_flag = flash_forge_hyper_relay_activated }"
|
||||
alloys = 500
|
||||
}
|
||||
|
||||
upkeep = {
|
||||
energy = 2
|
||||
}
|
||||
}
|
||||
construction_blocks_and_blocked_by = self_type
|
||||
build_megastructure_no_cost_localization_key = "FLASH_FORGE_MEGASTRUCTURE"
|
||||
|
||||
dismantle_cost = {
|
||||
category = megastructures_hyper_relay
|
||||
cost = {
|
||||
energy = 500
|
||||
}
|
||||
}
|
||||
|
||||
dismantle_time = 360
|
||||
|
||||
dismantle_potential = {
|
||||
always = yes
|
||||
}
|
||||
|
||||
dismantle_possible = {
|
||||
can_dismantle_megastructure = {
|
||||
TECH = tech_hyper_relays
|
||||
}
|
||||
}
|
||||
|
||||
on_dismantle_complete = {
|
||||
from = {
|
||||
add_resource = {
|
||||
alloys = 500
|
||||
rare_crystals = 100
|
||||
mult = modifier:megastructure_dismantle_refund_mult
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
potential = {
|
||||
has_technology = tech_hyper_relays
|
||||
AOW_trigger_mega_potential = { KEY = hyper_relay } # AOW toggle (merged in)
|
||||
}
|
||||
|
||||
possible = {
|
||||
hidden_trigger = {
|
||||
exists = starbase
|
||||
}
|
||||
custom_tooltip = {
|
||||
fail_text = "requires_inside_border_or_subject"
|
||||
OR = {
|
||||
is_inside_border = from
|
||||
AND = {
|
||||
exists = owner
|
||||
owner = {
|
||||
is_subject = yes
|
||||
overlord = { is_same_value = from }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
custom_tooltip = {
|
||||
fail_text = "requires_surveyed_system" # or is in my subject's territory
|
||||
OR = {
|
||||
NOT = {
|
||||
any_system_planet = {
|
||||
is_surveyed = {
|
||||
who = prev.from
|
||||
status = no
|
||||
}
|
||||
}
|
||||
}
|
||||
AND = {
|
||||
exists = owner
|
||||
owner = {
|
||||
is_subject = yes
|
||||
overlord = { is_same_value = from }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
custom_tooltip = {
|
||||
fail_text = "requires_no_existing_hyper_relay"
|
||||
NOR = {
|
||||
has_megastructure = hyper_relay
|
||||
has_megastructure = hyper_relay_ruined
|
||||
has_megastructure = hyper_relay_restored
|
||||
}
|
||||
}
|
||||
custom_tooltip = {
|
||||
fail_text = "requires_technology_hyper_relays"
|
||||
from = { has_technology = tech_hyper_relays }
|
||||
}
|
||||
custom_tooltip = {
|
||||
fail_text = "requires_hyperlane"
|
||||
count_neighbor_system = {
|
||||
count > 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
placement_rules = { # those would be ignored since the hyper relay is being "free-placed" between the inner and outer radius of the system
|
||||
}
|
||||
|
||||
# root = system
|
||||
# from = country
|
||||
ai_weight = {
|
||||
weight = value:giga_ai_base_kilo
|
||||
|
||||
modifier = {
|
||||
factor = 3
|
||||
is_capital_system = yes
|
||||
}
|
||||
|
||||
modifier = {
|
||||
factor = 1.5
|
||||
any_neighbor_system = {
|
||||
OR = {
|
||||
has_megastructure = hyper_relay
|
||||
has_megastructure = hyper_relay_restored
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
modifier = {
|
||||
factor = 1.5
|
||||
count_system_colony = {
|
||||
count > 0
|
||||
}
|
||||
}
|
||||
|
||||
modifier = {
|
||||
factor = 0.2
|
||||
from = {
|
||||
is_gestalt = no
|
||||
}
|
||||
is_capital_system = no
|
||||
}
|
||||
}
|
||||
|
||||
bypass_type = relay_bypass
|
||||
on_build_queued = {
|
||||
fromfrom = {
|
||||
fleet_event = { id = astral_planes.1010 }
|
||||
}
|
||||
}
|
||||
on_build_unqueued = {
|
||||
fromfrom = {
|
||||
fleet_event = { id = astral_planes.1015 }
|
||||
}
|
||||
}
|
||||
on_build_complete = {
|
||||
fromfromfrom = {
|
||||
fleet_event = { id = astral_planes.1020 }
|
||||
}
|
||||
from = {
|
||||
country_event = { id = tutorial.2131 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Ruined Hyper Relay
|
||||
## Tags: @ruined
|
||||
hyper_relay_ruined = {
|
||||
entity = "hyper_relay_01_destroyed_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
place_entity_on_planet_plane = no
|
||||
build_outside_gravity_well = yes
|
||||
# not a valid bypass. bypass_type = relay_bypass
|
||||
show_galactic_map_icon = no
|
||||
show_in_outliner = no
|
||||
construction_blocks_and_blocked_by = self_type
|
||||
potential = {
|
||||
always = no
|
||||
}
|
||||
}
|
||||
|
||||
# Restored Hyper Relay
|
||||
## Tags: @restored
|
||||
hyper_relay_restored = {
|
||||
entity = "hyper_relay_entity"
|
||||
construction_entity = "hyper_relay_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
place_entity_on_planet_plane = no
|
||||
# build_outside_gravity_well = yes
|
||||
show_galactic_map_icon = no
|
||||
bypass_type = relay_bypass
|
||||
show_in_outliner = no
|
||||
|
||||
potential = {
|
||||
has_technology = tech_hyper_relays
|
||||
}
|
||||
|
||||
dismantle_cost = {
|
||||
category = megastructures_hyper_relay
|
||||
cost = {
|
||||
energy = 500
|
||||
}
|
||||
}
|
||||
|
||||
dismantle_time = 360
|
||||
|
||||
dismantle_potential = {
|
||||
always = yes
|
||||
}
|
||||
|
||||
dismantle_possible = {
|
||||
can_dismantle_megastructure = {
|
||||
TECH = tech_hyper_relays
|
||||
}
|
||||
}
|
||||
|
||||
on_dismantle_complete = {
|
||||
from = {
|
||||
add_resource = {
|
||||
alloys = 500
|
||||
rare_crystals = 100
|
||||
mult = modifier:megastructure_dismantle_refund_mult
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
possible = {
|
||||
custom_tooltip = {
|
||||
fail_text = "requires_tech_hyper_drive_2"
|
||||
from = { has_technology = tech_hyper_drive_2 }
|
||||
}
|
||||
}
|
||||
upgrade_from = {
|
||||
hyper_relay_ruined
|
||||
giga_hyper_relay_ai_site
|
||||
}
|
||||
build_time = 180
|
||||
resources = {
|
||||
category = megastructures_hyper_relay
|
||||
cost = {
|
||||
alloys = 500
|
||||
rare_crystals = 100
|
||||
energy = 500
|
||||
}
|
||||
|
||||
upkeep = {
|
||||
energy = 2
|
||||
}
|
||||
}
|
||||
construction_blocks_and_blocked_by = self_type
|
||||
on_build_start = {
|
||||
fromfrom = {
|
||||
set_graphical_culture = root.from
|
||||
}
|
||||
}
|
||||
on_build_complete = {
|
||||
if = {
|
||||
limit = { exists = from } #does not always exist when upgraded from script via "finish_upgrade = yes"
|
||||
from = {
|
||||
country_event = { id = tutorial.2131 }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,474 @@
|
||||
# =============================================================================
|
||||
# Giga + Age of Wonder Compatibility Patch — Dyson Sphere stage cascade
|
||||
# Loads AFTER zzzz_compat_dyson_variants.txt (zzzzz_ > zzzz_).
|
||||
# sphere_0 and sphere_1 are zero-build-time passthrough stages in AOW's chain.
|
||||
# Normally the player would see "Dyson Sphere Site" (sphere_0) and "Dyson Sphere
|
||||
# Frame" (sphere_1) as separate clickable upgrades. This file adds on_build_complete
|
||||
# auto-redirects so the chain cascades instantly:
|
||||
# _entry -> sphere_0 -> sphere_1 -> sphere_2
|
||||
# The player lands on sphere_2 ("Dyson Sphere: Initial") and continues manually.
|
||||
# =============================================================================
|
||||
|
||||
# ---- sphere_0 overrides (add on_build_complete cascade to sphere_1) ----
|
||||
|
||||
AOW_MEGA_dyson_sphere_0_hyper = {
|
||||
entity = "construction_platform_entity"
|
||||
construction_entity = "construction_platform_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
place_entity_on_planet_plane = no
|
||||
entity_offset = { x = -7 y = -7 }
|
||||
build_time = 0
|
||||
resources = {
|
||||
category = megastructures
|
||||
upkeep = { energy = @AOW_var_DS_UPKP_energy }
|
||||
}
|
||||
inline_script = {
|
||||
script = megastructures/dismantle_megastructure
|
||||
time = 360
|
||||
tech = tech_dyson_sphere
|
||||
category = megastructures
|
||||
alloys = 5000
|
||||
minerals = 0 vm = 0 eg = 0 rc = 0 lm = 0 zo = 0 dm = 0
|
||||
}
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_entry }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_1_hyper
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AOW_MEGA_dyson_sphere_0_super = {
|
||||
entity = "construction_platform_entity"
|
||||
construction_entity = "construction_platform_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
place_entity_on_planet_plane = no
|
||||
entity_offset = { x = -7 y = -7 }
|
||||
build_time = 0
|
||||
resources = {
|
||||
category = megastructures
|
||||
upkeep = { energy = @AOW_var_DS_UPKP_energy }
|
||||
}
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_entry }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_1_super
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AOW_MEGA_dyson_sphere_0_O = {
|
||||
entity = "construction_platform_entity"
|
||||
construction_entity = "construction_platform_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
place_entity_on_planet_plane = no
|
||||
entity_offset = { x = -7 y = -7 }
|
||||
build_time = 0
|
||||
resources = {
|
||||
category = megastructures
|
||||
upkeep = { energy = @AOW_var_DS_UPKP_energy }
|
||||
}
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_entry }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_1_O
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AOW_MEGA_dyson_sphere_0_B = {
|
||||
entity = "construction_platform_entity"
|
||||
construction_entity = "construction_platform_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
place_entity_on_planet_plane = no
|
||||
entity_offset = { x = -7 y = -7 }
|
||||
build_time = 0
|
||||
resources = {
|
||||
category = megastructures
|
||||
upkeep = { energy = @AOW_var_DS_UPKP_energy }
|
||||
}
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_entry }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_1_B
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AOW_MEGA_dyson_sphere_0_giant = {
|
||||
entity = "construction_platform_entity"
|
||||
construction_entity = "construction_platform_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
place_entity_on_planet_plane = no
|
||||
entity_offset = { x = -7 y = -7 }
|
||||
build_time = 0
|
||||
resources = {
|
||||
category = megastructures
|
||||
upkeep = { energy = @AOW_var_DS_UPKP_energy }
|
||||
}
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_entry }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_1_giant
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AOW_MEGA_dyson_sphere_0_A = {
|
||||
entity = "construction_platform_entity"
|
||||
construction_entity = "construction_platform_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
place_entity_on_planet_plane = no
|
||||
entity_offset = { x = -7 y = -7 }
|
||||
build_time = 0
|
||||
resources = {
|
||||
category = megastructures
|
||||
upkeep = { energy = @AOW_var_DS_UPKP_energy }
|
||||
}
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_entry }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_1_A
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AOW_MEGA_dyson_sphere_0_F = {
|
||||
entity = "construction_platform_entity"
|
||||
construction_entity = "construction_platform_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
place_entity_on_planet_plane = no
|
||||
entity_offset = { x = -7 y = -7 }
|
||||
build_time = 0
|
||||
resources = {
|
||||
category = megastructures
|
||||
upkeep = { energy = @AOW_var_DS_UPKP_energy }
|
||||
}
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_entry }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_1_F
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AOW_MEGA_dyson_sphere_0_G = {
|
||||
entity = "construction_platform_entity"
|
||||
construction_entity = "construction_platform_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
place_entity_on_planet_plane = no
|
||||
entity_offset = { x = -7 y = -7 }
|
||||
build_time = 0
|
||||
resources = {
|
||||
category = megastructures
|
||||
upkeep = { energy = @AOW_var_DS_UPKP_energy }
|
||||
}
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_entry }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_1_G
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AOW_MEGA_dyson_sphere_0_K = {
|
||||
entity = "construction_platform_entity"
|
||||
construction_entity = "construction_platform_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
place_entity_on_planet_plane = no
|
||||
entity_offset = { x = -7 y = -7 }
|
||||
build_time = 0
|
||||
resources = {
|
||||
category = megastructures
|
||||
upkeep = { energy = @AOW_var_DS_UPKP_energy }
|
||||
}
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_entry }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_1_K
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AOW_MEGA_dyson_sphere_0_M = {
|
||||
entity = "construction_platform_entity"
|
||||
construction_entity = "construction_platform_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
place_entity_on_planet_plane = no
|
||||
entity_offset = { x = -7 y = -7 }
|
||||
build_time = 0
|
||||
resources = {
|
||||
category = megastructures
|
||||
upkeep = { energy = @AOW_var_DS_UPKP_energy }
|
||||
}
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_entry }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_1_M
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# ---- sphere_1 overrides (passthrough: redirect to sphere_2) ----
|
||||
# sphere_1 is only reached via the cascade from sphere_0 above.
|
||||
# It exists for 0 days and auto-redirects to sphere_2 ("Initial").
|
||||
|
||||
AOW_MEGA_dyson_sphere_1_hyper = {
|
||||
entity = "AOW_new_dyson_sphere_phase_01_entity"
|
||||
construction_entity = "AOW_new_dyson_sphere_frame_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
scales_with_planet = yes
|
||||
use_planet_resource = yes
|
||||
build_time = 0
|
||||
resources = { category = megastructures }
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_0_hyper }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_2_hyper
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AOW_MEGA_dyson_sphere_1_super = {
|
||||
entity = "AOW_new_dyson_sphere_phase_01_entity"
|
||||
construction_entity = "AOW_new_dyson_sphere_frame_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
scales_with_planet = yes
|
||||
use_planet_resource = yes
|
||||
build_time = 0
|
||||
resources = { category = megastructures }
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_0_super }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_2_super
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AOW_MEGA_dyson_sphere_1_O = {
|
||||
entity = "AOW_new_dyson_sphere_phase_01_entity"
|
||||
construction_entity = "AOW_new_dyson_sphere_frame_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
scales_with_planet = yes
|
||||
use_planet_resource = yes
|
||||
build_time = 0
|
||||
resources = { category = megastructures }
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_0_O }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_2_O
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AOW_MEGA_dyson_sphere_1_B = {
|
||||
entity = "AOW_new_dyson_sphere_phase_01_entity"
|
||||
construction_entity = "AOW_new_dyson_sphere_frame_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
scales_with_planet = yes
|
||||
use_planet_resource = yes
|
||||
build_time = 0
|
||||
resources = { category = megastructures }
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_0_B }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_2_B
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AOW_MEGA_dyson_sphere_1_giant = {
|
||||
entity = "AOW_new_dyson_sphere_phase_01_entity"
|
||||
construction_entity = "AOW_new_dyson_sphere_frame_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
scales_with_planet = yes
|
||||
use_planet_resource = yes
|
||||
build_time = 0
|
||||
resources = { category = megastructures }
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_0_giant }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_2_giant
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AOW_MEGA_dyson_sphere_1_A = {
|
||||
entity = "AOW_new_dyson_sphere_phase_01_entity"
|
||||
construction_entity = "AOW_new_dyson_sphere_frame_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
scales_with_planet = yes
|
||||
use_planet_resource = yes
|
||||
build_time = 0
|
||||
resources = { category = megastructures }
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_0_A }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_2_A
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AOW_MEGA_dyson_sphere_1_F = {
|
||||
entity = "AOW_new_dyson_sphere_phase_01_entity"
|
||||
construction_entity = "AOW_new_dyson_sphere_frame_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
scales_with_planet = yes
|
||||
use_planet_resource = yes
|
||||
build_time = 0
|
||||
resources = { category = megastructures }
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_0_F }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_2_F
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AOW_MEGA_dyson_sphere_1_G = {
|
||||
entity = "AOW_new_dyson_sphere_phase_01_entity"
|
||||
construction_entity = "AOW_new_dyson_sphere_frame_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
scales_with_planet = yes
|
||||
use_planet_resource = yes
|
||||
build_time = 0
|
||||
resources = { category = megastructures }
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_0_G }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_2_G
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AOW_MEGA_dyson_sphere_1_K = {
|
||||
entity = "AOW_new_dyson_sphere_phase_01_entity"
|
||||
construction_entity = "AOW_new_dyson_sphere_frame_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
scales_with_planet = yes
|
||||
use_planet_resource = yes
|
||||
build_time = 0
|
||||
resources = { category = megastructures }
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_0_K }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_2_K
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AOW_MEGA_dyson_sphere_1_M = {
|
||||
entity = "AOW_new_dyson_sphere_phase_01_entity"
|
||||
construction_entity = "AOW_new_dyson_sphere_frame_entity"
|
||||
portrait = "GFX_megastructure_construction_background"
|
||||
scales_with_planet = yes
|
||||
use_planet_resource = yes
|
||||
build_time = 0
|
||||
resources = { category = megastructures }
|
||||
upgrade_from = { AOW_MEGA_dyson_sphere_0_M }
|
||||
upgrade_desc = hide
|
||||
prerequisites = { "tech_dyson_sphere" }
|
||||
potential = { always = no }
|
||||
ai_weight = { factor = 0 }
|
||||
on_build_complete = {
|
||||
fromfrom = {
|
||||
upgrade_megastructure_to = AOW_MEGA_dyson_sphere_2_M
|
||||
finish_upgrade = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
# =============================================================================
|
||||
# Giga + Age of Wonder Compatibility Patch — on_actions
|
||||
# Additive (merges with vanilla/Giga/AoW on_actions). Shows the megastructure
|
||||
# filter bar on game start and after loading a single-player save.
|
||||
# =============================================================================
|
||||
on_game_start = {
|
||||
events = {
|
||||
compat_megatab.0
|
||||
}
|
||||
}
|
||||
|
||||
on_single_player_save_game_load = {
|
||||
events = {
|
||||
compat_megatab.0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
# =============================================================================
|
||||
# Giga + Age of Wonder Compatibility Patch — scripted_effects bridge
|
||||
# Loads after both mods, so this wins the merge for spawn_habitat_cracker_effect.
|
||||
#
|
||||
# Both mods overwrite this vanilla effect (fired when a habitat planet is
|
||||
# cracked): each cleans up only ITS OWN habitat-station fleets —
|
||||
# AOW: limit = { is_ship_class = shipclass_habitat_station }
|
||||
# Giga: limit = { giga_is_habitat_orbital = yes }
|
||||
# so under the other mod the orphaned station fleet / has_megastructure flag is
|
||||
# left behind. Merged version below uses Giga's (safer) spawn ordering and sets
|
||||
# the build-site flag, but cleans up BOTH mods' habitat fleets.
|
||||
# =============================================================================
|
||||
|
||||
spawn_habitat_cracker_effect = {
|
||||
# this: the pc_habitat being cracked
|
||||
create_ambient_object = {
|
||||
location = this
|
||||
type = habitat_cracker_object
|
||||
play_animation_once = yes
|
||||
duration = 5
|
||||
|
||||
use_3d_location = yes
|
||||
base_angle_towards = star
|
||||
entity_face_object = star
|
||||
|
||||
entity_offset = { min = 0 max = 0 }
|
||||
|
||||
entity_scale_to_size = yes
|
||||
scale = 0.10
|
||||
}
|
||||
save_event_target_as = target_habitat
|
||||
solar_system = {
|
||||
spawn_megastructure = {
|
||||
type = habitat_central_complex_ruined
|
||||
owner = this.owner
|
||||
coords_from = PREV
|
||||
}
|
||||
random_system_planet = {
|
||||
limit = {
|
||||
OR = {
|
||||
has_planet_flag = habitat@event_target:target_habitat
|
||||
has_planet_flag = habitat_build_site
|
||||
}
|
||||
}
|
||||
remove_planet_flag = habitat@event_target:target_habitat
|
||||
set_planet_flag = habitat_build_site
|
||||
}
|
||||
every_fleet_in_system = {
|
||||
limit = {
|
||||
OR = {
|
||||
is_ship_class = shipclass_habitat_station # AOW habitats
|
||||
giga_is_habitat_orbital = yes # Giga habitats
|
||||
}
|
||||
}
|
||||
orbit = {
|
||||
if = {
|
||||
limit = { NOT = { has_planet_flag = habitat_build_site } }
|
||||
remove_planet_flag = has_megastructure
|
||||
}
|
||||
}
|
||||
delete_fleet = this
|
||||
}
|
||||
}
|
||||
remove_planet = yes
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# Giga + Age of Wonder Compatibility Patch — Dyson Sphere gigastructure flag
|
||||
#
|
||||
# The AOW Dyson Sphere replaces the Giga Dyson Sphere, but the AOW sphere_5
|
||||
# completion only sets has_built_or_repaired_megastructure — it does NOT set
|
||||
# has_built_or_repaired_gigastructure. That flag is required by the Giga
|
||||
# "Gigastructural Constructs" ascension perk to unlock the rest of the Giga
|
||||
# tech tree. The Giga Dyson Sphere stage 5 normally sets both flags.
|
||||
#
|
||||
# AOW_eft_SSTM_dyson_sphere_change_planets is called from every AOW sphere_5
|
||||
# on_build_complete (all 10 star-class variants + the vanilla override), so
|
||||
# injecting the flag here fixes all paths with a single override.
|
||||
#
|
||||
# Scope: megastructure (system). from = the country that built the sphere.
|
||||
# =============================================================================
|
||||
|
||||
AOW_eft_SSTM_dyson_sphere_change_planets = {
|
||||
from = {
|
||||
set_country_flag = has_built_or_repaired_gigastructure
|
||||
}
|
||||
|
||||
every_system_planet = {
|
||||
limit = {
|
||||
OR = {
|
||||
is_planet_class = pc_molten
|
||||
is_planet_class = pc_toxic
|
||||
habitable_planet = yes
|
||||
}
|
||||
}
|
||||
if = {
|
||||
limit = {
|
||||
OR = {
|
||||
has_colony_progress > 0
|
||||
is_colony = yes
|
||||
}
|
||||
}
|
||||
destroy_colony = yes
|
||||
}
|
||||
change_pc = pc_frozen
|
||||
}
|
||||
every_system_planet = {
|
||||
limit = {
|
||||
is_planet_class = pc_barren
|
||||
}
|
||||
change_pc = pc_barren_cold
|
||||
}
|
||||
remove_system_terraforming_candidates = yes
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
# =============================================================================
|
||||
# Giga + Age of Wonder Compatibility Patch — scripted_triggers bridge
|
||||
# Loads after both mods (see descriptor.mod dependencies), so these definitions
|
||||
# win the merge for every shared vanilla-override trigger below.
|
||||
#
|
||||
# PROBLEM: Both mods overwrite the same vanilla scripted_triggers, but each only
|
||||
# "knows" its own megastructures:
|
||||
# - Giga's versions are huge hard-coded enumerations of Giga megastructure IDs
|
||||
# (zzz_overwrites.txt) and never list AOW structures.
|
||||
# - AOW's versions (zz_AOW_trgr_Vanilla.txt) only account for AOW structures.
|
||||
# Whichever loads last wins, so cross-mod placement checks misfire (double-builds,
|
||||
# broken gating).
|
||||
#
|
||||
# FIX: Re-author each trigger using mod-AGNOSTIC generic iterators
|
||||
# (has_any_megastructure / any_owned_megastructure / any_system_megastructure),
|
||||
# enumerating only the small, stable set of "gate-type" megastructures as the
|
||||
# exception. That way both mods' rosters are recognized automatically.
|
||||
# =============================================================================
|
||||
|
||||
# Helper (new name, no collision): true when the scoped megastructure is a
|
||||
# transit "gate" that should NOT block building other megastructures.
|
||||
# Covers vanilla gateways/relays/L-gate plus the gateway variants both mods add.
|
||||
compat_is_gate_megastructure = {
|
||||
OR = {
|
||||
is_megastructure_type = gateway_0
|
||||
is_megastructure_type = gateway_final
|
||||
is_megastructure_type = gateway_restored
|
||||
is_megastructure_type = gateway_ruined
|
||||
is_megastructure_type = gateway_derelict
|
||||
is_megastructure_type = gateway_heaven
|
||||
is_megastructure_type = gateway_titan
|
||||
is_megastructure_type = gateway_ness_restored
|
||||
is_megastructure_type = gateway_ness_ruined
|
||||
is_megastructure_type = hyper_relay
|
||||
is_megastructure_type = hyper_relay_restored
|
||||
is_megastructure_type = hyper_relay_ruined
|
||||
is_megastructure_type = lgate_base
|
||||
}
|
||||
}
|
||||
|
||||
# "No non-gate megastructure in this system" — used to enforce one big
|
||||
# megastructure per system. Preserves Giga's outer structure (incl. ring_world
|
||||
# flag), but the inner test now means "a megastructure that is NOT a gate exists"
|
||||
# for ANY mod's structure, instead of Giga's fixed blocking list.
|
||||
# Conservative by design: enforces one-mega-per-system across BOTH mods, which is
|
||||
# exactly what prevents the cross-mod double-build bug.
|
||||
has_no_non_gate_megastructure = {
|
||||
OR = {
|
||||
has_any_megastructure = no
|
||||
NOT = {
|
||||
has_star_flag = ring_world_built # ringworlds count as a megastructure
|
||||
any_system_megastructure = { # exists a non-gate megastructure?
|
||||
NOT = { compat_is_gate_megastructure = yes }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# "Empire owns any (real) megastructure" — generic, catches both rosters.
|
||||
# Gate-type structures are excluded to match Giga's original intent (a mere
|
||||
# gateway/relay should not count as "owning a megastructure").
|
||||
has_any_megastructure_in_empire = {
|
||||
OR = {
|
||||
any_owned_megastructure = {
|
||||
NOT = { compat_is_gate_megastructure = yes }
|
||||
}
|
||||
any_system_within_border = {
|
||||
any_system_megastructure = {
|
||||
NOT = { compat_is_gate_megastructure = yes }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Ringworld output boost — keep Giga's logic (incl. its exclusion list) and ALSO
|
||||
# grant the boost to AOW's pc_starcage_world (AOW's ringworld-equivalent).
|
||||
has_ringworld_output_boost = {
|
||||
OR = {
|
||||
AND = {
|
||||
is_ringworld = yes
|
||||
giga_has_ringworld_output_boost_exclusions = no
|
||||
}
|
||||
giga_has_ringworld_output_boost = yes
|
||||
is_planet_class = pc_starcage_world # AOW
|
||||
}
|
||||
}
|
||||
|
||||
# Dismantle check (parameterized $TECH$, called by both mods). Keep Giga's
|
||||
# custom_tooltips AND AOW's "dismantle at war" global-flag flexibility.
|
||||
can_dismantle_megastructure = {
|
||||
custom_tooltip = {
|
||||
fail_text = "requires_not_upgrading"
|
||||
is_upgrading = no
|
||||
}
|
||||
custom_tooltip = {
|
||||
fail_text = "requires_owned_system"
|
||||
solar_system = {
|
||||
is_owned_by = from
|
||||
}
|
||||
}
|
||||
if = {
|
||||
limit = { has_global_flag = can_dismantle_megastructure_at_war } # AOW feature
|
||||
from = { has_technology = $TECH$ }
|
||||
}
|
||||
else = {
|
||||
from = {
|
||||
has_technology = $TECH$
|
||||
is_at_war = no
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# AOW_trigger_mega_potential — patch override (megastructure build-menu tabs)
|
||||
# Every AOW megastructure routes its `potential` through this one shared trigger,
|
||||
# so adding a single condition here gates the ENTIRE AOW roster behind the
|
||||
# Giga-only build-menu tab. Body is AOW's original verbatim; the only addition is
|
||||
# the `NOT = { has_country_flag = compat_mega_hide_aow }` line in the player branch.
|
||||
# AI evaluates the is_ai=yes branch (no tab check) and is never affected, since the
|
||||
# hide flag only ever exists on a human player's country (set by the tab buttons).
|
||||
# Scope here is the viewing country (megastructure potential scope = country).
|
||||
# Keeps AOW's $KEY$ parameter intact.
|
||||
# =============================================================================
|
||||
AOW_trigger_mega_potential = {
|
||||
if = { #如果是玩家,则对应巨构没有被禁用
|
||||
limit = { is_ai = no }
|
||||
NOT = { has_country_flag = compat_mega_hide_aow } # compat: Giga-only tab hides AOW structures
|
||||
OR = {
|
||||
NOT = { has_global_flag = AOW_flag_GLBL_no_player_$KEY$ }
|
||||
event_target:global_event_country = {
|
||||
check_variable = { which = AOW_var_player_mega_cap_$KEY$ value != 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
else_if = { #如果是AI,则对应巨构没有被禁用
|
||||
limit = { is_ai = yes }
|
||||
OR = {
|
||||
NOT = { has_global_flag = AOW_flag_GLBL_no_ai_$KEY$ }
|
||||
event_target:global_event_country = {
|
||||
check_variable = { which = AOW_var_ai_mega_cap_$KEY$ value != 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user