Skip to content

Commit

Permalink
Merge pull request #388 from Cold-War-Project/subject-overhaul
Browse files Browse the repository at this point in the history
Diplomacy rework
  • Loading branch information
JackEPepper authored Jul 3, 2023
2 parents e5b9f60 + 6493e56 commit 5bb9e70
Show file tree
Hide file tree
Showing 28 changed files with 1,952 additions and 666 deletions.
12 changes: 10 additions & 2 deletions common/diplomatic_actions/00_relations_actions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
scope:target_country = {
NOT = {
is_country_type = decentralized
is_subject_of = root
}
}
}
Expand Down Expand Up @@ -55,6 +56,9 @@
NOT = {
has_diplomatic_relevance = scope:target_country
}
scope:target_country = {
is_subject_of = root
}
}
}
}
Expand Down Expand Up @@ -152,6 +156,7 @@ damage_relations = {
scope:target_country = {
NOT = {
is_country_type = decentralized
is_subject_of = root
}
}
}
Expand Down Expand Up @@ -180,8 +185,11 @@ damage_relations = {
scope:target_country.relations:root <= relations_threshold:cold
}
should_invalidate = {
NOT = {
has_diplomatic_relevance = scope:target_country
OR = {
NOT = {
has_diplomatic_relevance = scope:target_country
}
is_subject_of = root
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion common/diplomatic_actions/14_trade_agreement.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}
}
pact = {
cost = 5
cost = 50
is_trade_agreement = yes
relations_progress_per_day = 1 # At 100, +1 relations
relations_improvement_max = 80
Expand Down
269 changes: 121 additions & 148 deletions common/diplomatic_actions/15_customs_union.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
customs_union = {
can_select = no
requires_approval = yes
can_use_obligations = yes
requires_approval = no
unlocking_technologies = {
international_relations
}
Expand All @@ -15,15 +13,13 @@
is_country_type = decentralized
has_law = law_type:law_isolationism
}
is_subject_of = root
}
}
possible = {
NOT = {
has_war_with = scope:target_country
}
NOT = {
is_subject_of = scope:target_country
}
is_junior_in_customs_union = no
has_diplomatic_relevance = scope:target_country
NOR = {
Expand All @@ -32,10 +28,6 @@
}
has_law = law_type:law_isolationism
}
custom_tooltip = {
text = DIPLO_ACTION_RELATIONS_CORDIAL_OR_GREATER
scope:target_country.relations:root >= relations_threshold:cordial
}
is_revolutionary = no
scope:target_country = {
is_revolutionary = no
Expand Down Expand Up @@ -79,29 +71,15 @@
recipient_pays_maintenance = no
is_customs_union = yes
relations_progress_per_day = 1 # At 100, +1 relations
relations_improvement_max = 80
subject_type = subject_type_customs_union # A customs union is technically a type of subject, though it isn't presented this way in-game
is_about_to_auto_break = {
scope:target_country.relations:root < 23 # this is: cordial + 3
}
should_auto_break = {
custom_tooltip = {
text = DIPLO_ACTION_RELATIONS_CORDIAL_OR_GREATER_NOT
# make sure to update is_about_to_auto_break when changing this:
scope:target_country.relations:root < relations_threshold:cordial
}
}
relations_improvement_max = 50
should_invalidate = {
OR = {
is_junior_in_customs_union = yes
has_war_with = scope:target_country
is_country_type = decentralized
scope:target_country = {
is_country_type = decentralized
}
is_subject_of = scope:target_country
scope:target_country = {
is_subject_of = root
}
is_junior_in_customs_union = yes
scope:target_country = {
has_law = law_type:law_isolationism
Expand Down Expand Up @@ -156,8 +134,6 @@
}
}
ai = {
check_acceptance_for_will_break = yes
check_acceptance_for_will_propose = yes
# This is the acceptance score for the senior part of the customs union (used for 'join customs union' action and checking )
accept_score = {
value = -1000
Expand Down Expand Up @@ -548,36 +524,32 @@
value = -50
}
}
}
will_break = {
is_junior_in_customs_union = yes
OR = {
has_attitude = {
who = scope:target_country
attitude = antagonistic
}
has_attitude = {
who = scope:target_country
attitude = domineering
if = {
limit = {
OR = {
is_subject_type = subject_type_puppet
is_subject_type = subject_type_vassal
}
}
has_attitude = {
who = scope:target_country
attitude = belligerent
add = {
desc = "DIPLOMATIC_ACCEPTANCE_PUPPET"
value = 1000
}
has_attitude = {
who = scope:target_country
attitude = rebellious
}
if = {
limit = {
is_subject_type = subject_type_protectorate
is_subject_type = subject_type_tributary
}
AND = {
NOT = {
has_law = law_type:law_council_elective
}
scope:target_country = {
has_law = law_type:law_council_elective
}
add = {
desc = "DIPLOMATIC_ACCEPTANCE_PROTECTORATE"
value = 100
}
}
}
will_break = {
always = no
}
propose_score = {
value = 10
}
Expand All @@ -593,21 +565,22 @@
}
}

join_customs_union = {
requires_approval = yes
can_use_obligations = yes
potential = {
NOT = {
is_country_type = decentralized
}
scope:target_country = {
NOT = {
is_country_type = decentralized
}
}
}
possible = {
always = no
#join_customs_union = {
# requires_approval = yes
# can_use_obligations = yes
# potential = {
# is_direct_subject_of = scope:target_country
# NOT = {
# is_country_type = decentralized
# }
# scope:target_country = {
# NOT = {
# is_country_type = decentralized
# }
# }
# }
# possible = {
# always = no
# NOT = {
# has_war_with = scope:target_country
# }
Expand Down Expand Up @@ -647,56 +620,56 @@ join_customs_union = {
# }
# }
# }
}
reverse_pact = customs_union
accept_effect = {
if = {
limit = {
has_diplomatic_pact = {
who = scope:target_country
type = trade_agreement
}
}
remove_diplomatic_pact = {
country = scope:target_country
type = trade_agreement
}
}
}
ai = {
check_acceptance_for_will_propose = yes
propose_score = {
value = 10
}
propose_break_score = {
value = 10
}
use_obligation_chance = {
value = 10
}
owe_obligation_chance = {
value = 10
}
}
}
# }
# reverse_pact = customs_union
# accept_effect = {
# if = {
# limit = {
# has_diplomatic_pact = {
# who = scope:target_country
# type = trade_agreement
# }
# }
# remove_diplomatic_pact = {
# country = scope:target_country
# type = trade_agreement
# }
# }
# }
# ai = {
# check_acceptance_for_will_propose = yes
# propose_score = {
# value = 10
# }
# propose_break_score = {
# value = 10
# }
# use_obligation_chance = {
# value = 10
# }
# owe_obligation_chance = {
# value = 10
# }
# }
#}

change_customs_union = {
requires_approval = yes
can_use_obligations = yes
potential = {
NOT = {
is_country_type = decentralized
}
is_junior_in_customs_union = no
scope:target_country = {
NOT = {
is_country_type = decentralized
}
is_junior_in_customs_union = yes
}
}
possible = {
always = no
#change_customs_union = {
# requires_approval = yes
# can_use_obligations = yes
# potential = {
# NOT = {
# is_country_type = decentralized
# }
# is_junior_in_customs_union = no
# scope:target_country = {
# NOT = {
# is_country_type = decentralized
# }
# is_junior_in_customs_union = yes
# }
# }
# possible = {
# always = no
# NOT = {
# has_war_with = scope:target_country
# }
Expand Down Expand Up @@ -733,35 +706,35 @@ change_customs_union = {
# }
# }
# }
}
transfer_pact = customs_union
accept_effect = {
if = {
limit = {
has_diplomatic_pact = {
who = scope:target_country
type = trade_agreement
}
}
remove_diplomatic_pact = {
country = scope:target_country
type = trade_agreement
}
}
}
ai = {
check_acceptance_for_will_propose = yes
propose_score = {
value = 10
}
propose_break_score = {
value = 10
}
use_obligation_chance = {
value = 50
}
owe_obligation_chance = {
value = 10
}
}
}
# }
# transfer_pact = customs_union
# accept_effect = {
# if = {
# limit = {
# has_diplomatic_pact = {
# who = scope:target_country
# type = trade_agreement
# }
# }
# remove_diplomatic_pact = {
# country = scope:target_country
# type = trade_agreement
# }
# }
# }
# ai = {
# check_acceptance_for_will_propose = yes
# propose_score = {
# value = 10
# }
# propose_break_score = {
# value = 10
# }
# use_obligation_chance = {
# value = 50
# }
# owe_obligation_chance = {
# value = 10
# }
# }
#}
Loading

0 comments on commit 5bb9e70

Please sign in to comment.