siema mam tutaj kod do europy universalis 4: countryevent = { id =…
- User
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
siema mam tutaj kod do europy universalis 4: country_event = { id = wwu_zandalar_pandaria_invasion.20 title = wwu_zandalar_pandaria_invasion.20.title desc = wwu_zandalar_pandaria_invasion.20.desc picture = ZANDALAR_12_eventPicture
is_triggered_only = yes
trigger = {
tag = A78
has_country_flag = zandalar_war_against_pandaria_started
is_at_war = no
OR = {
AND = {
has_country_flag = zandalar_war_against_pandaria_win
any_country = {
has_country_flag = zandalar_defender_for_resolution
}
}
AND = {
has_country_flag = zandalar_war_against_pandaria_lost
NOT = { has_country_flag = zandalar_war_against_pandaria_lost_end }
}
}
}
immediate = {
random_country = {
limit = {
has_country_flag = zandalar_defender_for_resolution
}
save_event_target_as = current_defender
}
}
option = {
trigger = {
has_country_flag = zandalar_war_against_pandaria_win
}
name = "wwu_zandalar_pandaria_invasion.20.option.a"
ai_chance = { factor = 10 }
if = {
limit = {
NOT = { has_country_flag = zandalar_enterprise_zul }
}
create_subject = {
subject_type = commercial_enterprise
subject = ZFC
}
set_country_flag = zandalar_enterprise_zul
ZFC = {
override_country_name = zandalar_enterprise
remove_country_modifier = zandalar_invasion_force_upgrade
change_government = republic
add_republican_tradition = 100
set_government_rank = 2
}
custom_tooltip = zandalari_zfc_enterprise_claim
hidden_effect = {
every_province = {
limit = {
superregion = pandaria_superregion
NOT = {
owner = ROOT
}
}
add_permanent_claim = ZFC
}
}
}
event_target:current_defender = {
clr_country_flag = zandalar_defender_for_resolution
}
ZFC = {
inherit = event_target:current_defender
}
if = {
limit = {
event_target:current_defender = {
NOT = { total_development = 33 }
}
}
custom_tooltip = zandalari_zfc_8_2
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 33
NOT = { total_development = 66 }
}
}
custom_tooltip = zandalari_zfc_16_4
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 66
NOT = { total_development = 100 }
}
}
custom_tooltip = zandalari_zfc_24_6
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 100
NOT = { total_development = 133 }
}
}
custom_tooltip = zandalari_zfc_32_8
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 133
NOT = { total_development = 166 }
}
}
custom_tooltip = zandalari_zfc_40_10
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 166
NOT = { total_development = 200 }
}
}
custom_tooltip = zandalari_zfc_48_12
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 200
NOT = { total_development = 233 }
}
}
custom_tooltip = zandalari_zfc_56_14
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 233
NOT = { total_development = 266 }
}
}
custom_tooltip = zandalari_zfc_64_16
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 266
NOT = { total_development = 300 }
}
}
custom_tooltip = zandalari_zfc_72_18
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 300
}
}
custom_tooltip = zandalari_zfc_80_20
}
hidden_effect = {
ZFC = {
every_owned_province = {
kill_units = {
who = ZFC # optional, only affect <scope>'s units. Scopes enemy, owner and controller work here.
amount = 100
}
}
}
# AE lokalna
if = {
limit = {
event_target:current_defender = {
NOT = { total_development = 33 }
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 8
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 2
}
}
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 33
NOT = { total_development = 66 }
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 16
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 4
}
}
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 66
NOT = { total_development = 100 }
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 24
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 6
}
}
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 100
NOT = { total_development = 133 }
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 32
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 8
}
}
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 133
NOT = { total_development = 166 }
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 40
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 10
}
}
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 166
NOT = { total_development = 200 }
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 48
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 12
}
}
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 200
NOT = { total_development = 233 }
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 54
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 14
}
}
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 233
NOT = { total_development = 266 }
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 62
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 16
}
}
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 266
NOT = { total_development = 300 }
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 70
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 18
}
}
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 300
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 78
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 20
}
}
}
}
# Zapętl event, jeśli są kolejni
if = {
limit = {
any_country = { has_country_flag = zandalar_defender_for_resolution }
}
country_event = { id = wwu_zandalar_pandaria_invasion.20 }
}
}
option = {
trigger = {
has_country_flag = zandalar_war_against_pandaria_win
}
name = "wwu_zandalar_pandaria_invasion.20.option.b"
ai_chance = { factor = 5 }
if = {
limit = {
NOT = { has_country_flag = zandalar_enterprise_zul }
}
create_subject = {
subject_type = commercial_enterprise
subject = ZFC
}
set_country_flag = zandalar_enterprise_zul
ZFC = {
override_country_name = zandalar_enterprise
remove_country_modifier = zandalar_invasion_force_upgrade
change_government = republic
add_republican_tradition = 100
set_government_rank = 2
}
custom_tooltip = zandalari_zfc_enterprise_claim
hidden_effect = {
every_province = {
limit = {
superregion = pandaria_superregion
NOT = {
owner = ROOT
}
}
add_permanent_claim = ZFC
}
}
}
event_target:current_defender = {
clr_country_flag = zandalar_defender_for_resolution
}
hidden_effect = {
every_country = {
white_peace = event_target:current_defender
}
}
ZFC = {
create_subject = {
subject_type = vassal
subject = event_target:current_defender
}
}
if = {
limit = {
event_target:current_defender = {
NOT = { total_development = 33 }
}
}
custom_tooltip = zandalari_zfc_5_1
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 33
NOT = { total_development = 66 }
}
}
custom_tooltip = zandalari_zfc_10_2
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 66
NOT = { total_development = 100 }
}
}
custom_tooltip = zandalari_zfc_15_3
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 100
NOT = { total_development = 133 }
}
}
custom_tooltip = zandalari_zfc_20_4
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 133
NOT = { total_development = 166 }
}
}
custom_tooltip = zandalari_zfc_25_5
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 166
NOT = { total_development = 200 }
}
}
custom_tooltip = zandalari_zfc_30_6
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 200
NOT = { total_development = 233 }
}
}
custom_tooltip = zandalari_zfc_35_7
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 233
NOT = { total_development = 266 }
}
}
custom_tooltip = zandalari_zfc_40_8
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 266
NOT = { total_development = 300 }
}
}
custom_tooltip = zandalari_zfc_45_9
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 300
}
}
custom_tooltip = zandalari_zfc_50_10
}
hidden_effect = {
ZFC = {
every_owned_province = {
kill_units = {
who = ZFC # optional, only affect <scope>'s units. Scopes enemy, owner and controller work here.
amount = 100
}
}
}
if = {
limit = {
event_target:current_defender = {
NOT = { total_development = 33 }
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 5
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 1
}
}
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 33
NOT = { total_development = 66 }
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 10
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 2
}
}
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 66
NOT = { total_development = 100 }
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 15
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 3
}
}
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 100
NOT = { total_development = 133 }
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 20
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 4
}
}
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 133
NOT = { total_development = 166 }
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 25
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 5
}
}
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 166
NOT = { total_development = 200 }
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 30
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 6
}
}
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 200
NOT = { total_development = 233 }
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 35
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 7
}
}
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 233
NOT = { total_development = 266 }
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 40
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 8
}
}
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 266
NOT = { total_development = 300 }
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 45
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 9
}
}
}
else_if = {
limit = {
event_target:current_defender = {
total_development = 300
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
capital_scope = {
superregion = pandaria_superregion
}
}
add_aggressive_expansion = {
who = ROOT
value = 50
}
}
every_country = {
limit = {
NOT = { is_subject = yes }
NOT = { alliance_with = ROOT }
NOT = {
capital_scope = {
superregion = pandaria_superregion
}
}
}
add_aggressive_expansion = {
who = ROOT
value = 10
}
}
}
}
if = {
limit = {
any_country = { has_country_flag = zandalar_defender_for_resolution }
}
country_event = { id = wwu_zandalar_pandaria_invasion.20 }
}
}
option = {
trigger = {
has_country_flag = zandalar_war_against_pandaria_win
}
name = "wwu_zandalar_pandaria_invasion.20.option.c"
if = {
limit = {
NOT = { has_country_flag = zandalar_enterprise_zul }
}
create_subject = {
subject_type = commercial_enterprise
subject = ZFC
}
set_country_flag = zandalar_enterprise_zul
ZFC = {
override_country_name = zandalar_enterprise
remove_country_modifier = zandalar_invasion_force_upgrade
change_government = republic
add_republican_tradition = 100
set_government_rank = 2
}
custom_tooltip = zandalari_zfc_enterprise_claim
hidden_effect = {
every_province = {
limit = {
superregion = pandaria_superregion
NOT = {
owner = ROOT
}
}
add_permanent_claim = ZFC
}
}
}
ai_chance = { factor = 3 }
hidden_effect = {
ZFC = {
every_owned_province = {
kill_units = {
who = ZFC # optional, only affect <scope>'s units. Scopes enemy, owner and controller work here.
amount = 100
}
}
}
}
event_target:current_defender = {
add_treasury = -300 # zamień na scripted_variable, jeśli chcesz dokładnie od dev
clr_country_flag = zandalar_defender_for_resolution
}
add_treasury = 300
if = {
limit = {
any_country = { has_country_flag = zandalar_defender_for_resolution }
}
country_event = { id = wwu_zandalar_pandaria_invasion.20 }
}
}
option = {
trigger = {
has_country_flag = zandalar_war_against_pandaria_lost
}
name = "wwu_zandalar_pandaria_invasion.20.option.d"
add_stability = -1
increase_zul_power_by_10 = yes
increase_zul_influence_by_10 = yes
ZFC = {
remove_country_modifier = zandalar_invasion_force_upgrade
}
set_country_flag = zandalar_war_against_pandaria_lost_end
}
after = {
if = {
limit = {
any_country = { has_country_flag = zandalar_defender_for_resolution }
}
country_event = { id = wwu_zandalar_pandaria_invasion.101 }
}
}
}
sprawa jest taka, ze w pierwszej opcji rozprowadzanie agresywnej ekspansji nie działa, za to w drugiej opcji działa już tak jak należy z uwzględnieniem jeżeli ktoś ma więcej developmentu. Kody te wydają się być takie same a jednak w pierwszej opcji zatrzymuje się na pierwszym if.
Cześć! Rozumiem problem. Wygląda na to, że kod AE jest rzeczywiście podobny w obu opcjach, ale jest między nimi kluczowa różnica strukturalna, która może powodować problem w pierwszej opcji.
Przeanalizujmy obie opcje bliżej:
Opcja A:
ZFC jako przedsiębiorstwo.ZFC.claim) na Pandarię dla ZFC.zandalar_defender_for_resolution z current_defender.ZFC = { inherit = event_target:current_defender } <- To jest potencjalny problem. inherit kopiuje cechy (np. flagi, modyfikatory, władcę) z celu (current_defender) do ZFC. Może to wprowadzać nieoczekiwane zmiany w stanie gry lub w sposobie, w jaki kolejne bloki (zwłaszcza te w hidden_effect) widzą current_defender.if/else_if z custom_tooltip.hidden_effect = { ... }, który zawiera:
kill_unitsif/else_if sprawdzający current_defender. Twierdzisz, że zatrzymuje się na pierwszym if w tym bloku.Opcja B:
ZFC jako przedsiębiorstwo.ZFC.claim) na Pandarię dla ZFC.zandalar_defender_for_resolution z current_defender.inherit. Zamiast tego jest white_peace i create_subject (w osobnym hidden_effect i bezpośrednio).if/else_if z custom_tooltip.hidden_effect = { ... }, który zawiera:
kill_unitsif/else_if sprawdzający current_defender. Działa poprawnie.Najbardziej prawdopodobna przyczyna:
Linia ZFC = { inherit = event_target:current_defender } w Opcji A jest prawdopodobnie problemem. Chociaż sama w sobie może nie być błędem składniowym, może ona wpływać na kontekst lub dostępność w późniejszym bloku , zwłaszcza gdy jest tam ponownie używany w . Mechanizm może zmieniać stan lub postrzeganie w sposób, który powoduje, że pierwszy warunek w bloku AE () zwraca nieoczekiwany wynik lub powoduje błąd, który przerywa wykonanie bloku. Opcja B omija ten konkretny krok, dlatego obliczenia AE działają.
event_target:current_defenderhidden_effectif/else_ifinheritZFCcurrent_defenderNOT = { total_development = 33 }Sugerowane rozwiązania:
Usuń lub zakomentuj inherit w Opcji A:
Najprostszym testem jest usunięcie linii ZFC = { inherit = event_target:current_defender } z Opcji A. Zobacz, czy to naprawi problem z AE. Jeśli tak, oznacza to, że inherit był przyczyną. Być może dziedziczenie nie jest konieczne do osiągnięcia zamierzonego efektu w tej konkretnej opcji.
# Opcja A - zmodyfikowana
option = {
trigger = {
has_country_flag = zandalar_war_against_pandaria_win
}
name = "wwu_zandalar_pandaria_invasion.20.option.a"
ai_chance = { factor = 10 }
if = {
limit = {
NOT = { has_country_flag = zandalar_enterprise_zul }
}
create_subject = {
subject_type = commercial_enterprise
subject = ZFC
}
set_country_flag = zandalar_enterprise_zul
ZFC = {
override_country_name = zandalar_enterprise
remove_country_modifier = zandalar_invasion_force_upgrade
change_government = republic
add_republican_tradition = 100
set_government_rank = 2
}
custom_tooltip = zandalari_zfc_enterprise_claim
hidden_effect = {
every_province = {
limit = {
superregion = pandaria_superregion
NOT = { owner = ROOT }
}
add_permanent_claim = ZFC
}
}
}
event_target:current_defender = {
clr_country_flag = zandalar_defender_for_resolution
}
# Z komentarzowana lub usunięta linia:
# ZFC = {
# inherit = event_target:current_defender
# }
# Blok tooltips - może być uproszczony (patrz punkt 3)
if = {
limit = {
event_target:current_defender = { NOT = { total_development = 33 } }
}
custom_tooltip = zandalari_zfc_8_2
}
else_if = {
limit = {
event_target:current_defender = { total_development = 33 NOT = { total_development = 66 } }
}
custom_tooltip = zandalari_zfc_16_4
}
# ... reszta bloków else_if ...
else_if = {
limit = {
event_target:current_defender = { total_development = 300 }
}
custom_tooltip = zandalari_zfc_80_20
}
hidden_effect = {
ZFC = {
every_owned_province = {
kill_units = {
who = ZFC
amount = 100
}
}
}
# Blok AE - powinien działać po usunięciu inherit
if = {
limit = {
event_target:current_defender = { NOT = { total_development = 33 } }
}
# ... AE calcs ...
every_country = {
limit = { NOT = { is_subject = yes } NOT = { alliance_with = ROOT } capital_scope = { superregion = pandaria_superregion } }
add_aggressive_expansion = { who = ROOT value = 8 }
}
every_country = {
limit = { NOT = { is_subject = yes } NOT = { alliance_with = ROOT } NOT = { capital_scope = { superregion = pandaria_superregion } } }
add_aggressive_expansion = { who = ROOT value = 2 }
}
}
# ... reszta bloków else_if dla AE ...
else_if = {
limit = {
event_target:current_defender = { total_development = 300 }
}
every_country = {
limit = { NOT = { is_subject = yes } NOT = { alliance_with = ROOT } capital_scope = { superregion = pandaria_superregion } }
add_aggressive_expansion = { who = ROOT value = 78 }
}
every_country = {
limit = { NOT = { is_subject = yes } NOT = { alliance_with = ROOT } NOT = { capital_scope = { superregion = pandaria_superregion } } }
add_aggressive_expansion = { who = ROOT value = 20 }
}
}
}
# Pętla eventu
if = {
limit = {
any_country = { has_country_flag = zandalar_defender_for_resolution }
}
country_event = { id = wwu_zandalar_pandaria_invasion.20 }
}
}
Przenieś blok AE: Alternatywnie, spróbuj przenieść blok AE (wraz z jego if/else_if) z hidden_effect bezpośrednio po bloku custom_tooltip w Opcji A. Może to pomóc, jeśli problemem jest kolejność wykonywania wewnątrz hidden_effect po inherit.
Uprość logikę if/else_if: Zarówno w Opcji A, jak i B, masz oddzielny blok if/else_if do wyświetlania custom_tooltip, a następnie podobny blok w hidden_effect do faktycznego stosowania efektów (w tym AE). Jest to powtarzalne. Można to połączyć, aby kod był czystszy i potencjalnie uniknąć niektórych problemów ze złożonością. Zamiast tego możesz użyć triggered_tooltip w opcji lub po prostu umieścić efekty bezpośrednio, jeśli chcesz, aby narzędzie podpowiadało na podstawie zastosowanego efektu. Jeśli chcesz tylko wyświetlić tekst zależny od dev, można to zrobić inaczej, ale jeśli chcesz zastosować efekt i pokazać tooltip, lepiej połączyć.
Przykład uproszczenia dla Opcji A (zakładając usunięcie inherit):
# Opcja A - uproszczona i bez inherit
option = {
trigger = {
has_country_flag = zandalar_war_against_pandaria_win
}
name = "wwu_zandalar_pandaria_invasion.20.option.a"
ai_chance = { factor = 10 }
if = {
limit = { NOT = { has_country_flag = zandalar_enterprise_zul } }
create_subject = { subject_type = commercial_enterprise subject = ZFC }
set_country_flag = zandalar_enterprise_zul
ZFC = {
override_country_name = zandalar_enterprise
remove_country_modifier = zandalar_invasion_force_upgrade
change_government = republic
add_republican_tradition = 100
set_government_rank = 2
}
custom_tooltip = zandalari_zfc_enterprise_claim
hidden_effect = {
every_province = {
limit = { superregion = pandaria_superregion NOT = { owner = ROOT } }
add_permanent_claim = ZFC
}
}
}
event_target:current_defender = {
clr_country_flag = zandalar_defender_for_resolution
}
# Połączone efekty i tooltipy dla AE
hidden_effect = {
# Najpierw wykonaj efekty niezależne od AE
ZFC = {
every_owned_province = {
kill_units = { who = ZFC amount = 100 }
}
}
# Teraz logika AE i powiązane tooltipy
if = {
limit = { event_target:current_defender = { NOT = { total_development = 33 } } }
# Zastosuj efekty AE
every_country = { limit = { NOT = { is_subject = yes } NOT = { alliance_with = ROOT } capital_scope = { superregion = pandaria_superregion } } add_aggressive_expansion = { who = ROOT value = 8 } }
every_country = { limit = { NOT = { is_subject = yes } NOT = { alliance_with = ROOT } NOT = { capital_scope = { superregion = pandaria_superregion } } } add_aggressive_expansion = { who = ROOT value = 2 } }
# Wyświetl tooltip
custom_tooltip = zandalari_zfc_8_2
}
else_if = {
limit = { event_target:current_defender = { total_development = 33 NOT = { total_development = 66 } } }
every_country = { limit = { NOT = { is_subject = yes } NOT = { alliance_with = ROOT } capital_scope = { superregion = pandaria_superregion } } add_aggressive_expansion = { who = ROOT value = 16 } }
every_country = { limit = { NOT = { is_subject = yes } NOT = { alliance_with = ROOT } NOT = { capital_scope = { superregion = pandaria_superregion } } } add_aggressive_expansion = { who = ROOT value = 4 } }
custom_tooltip = zandalari_zfc_16_4
}
# ... reszta bloków else_if ...
else_if = {
limit = { event_target:current_defender = { total_development = 300 } }
every_country = { limit = { NOT = { is_subject = yes } NOT = { alliance_with = ROOT } capital_scope = { superregion = pandaria_superregion } } add_aggressive_expansion = { who = ROOT value = 78 } }
every_country = { limit = { NOT = { is_subject = yes } NOT = { alliance_with = ROOT } NOT = { capital_scope = { superregion = pandaria_superregion } } } add_aggressive_expansion = { who = ROOT value = 20 } }
custom_tooltip = zandalari_zfc_80_20
}
}
# Pętla eventu
if = {
limit = { any_country = { has_country_flag = zandalar_defender_for_resolution } }
country_event = { id = wwu_zandalar_pandaria_invasion.20 }
}
}
Zacznij od próby nr 1 (usunięcie inherit). Jeśli to nie pomoże, spróbuj uproszczenia logiki (próba nr 3), łącząc tooltipy z efektami w jednym bloku. Daj znać, czy któraś z tych zmian rozwiązała problem!