Diplomatic RelationChanged this version
Alliance
An alliance is a Treaty between two Countries. Countries that are allied will not be able to declare War upon each other and can also be called to help in each other's Wars.
Can GuaranteeModifier Typeexpire effectGuaranteeDiplomatic Relationoffer effect2type = diplomacy
3relation_type = mutual
4uses_diplo_capacity = mutual
5block_when_at_war = yes
6break_on_war = yes
7break_on_becoming_subject = yes
8annulled_by_peace_treaty = yes
9annullment_favours_required = 20
10disallow_war = yes
11military_access = yes
12can_share_maps = yes
13fleet_basing_rights = yes
14lifts_fog_of_war = yes
15called_in_defensively = mutual
16called_in_offensively = mutual
17mutual_color = define:NMapColors|DIPLOMACY_ALLIANCE_COLOR
18category = {
19offer = CATEGORY_FRIENDLY_ACTIONS
20cancellation = CATEGORY_HOSTILE_ACTIONS
21request = CATEGORY_FRIENDLY_ACTIONS
22break = CATEGORY_HOSTILE_ACTIONS
}
25relation_type_for_ai = friendly
26show_break_alert = yes
31favors_to_first = {
32value = 1
33add = "scope:first.relative_military_strength(scope:second)"
34divide = 12
}
37favors_to_second = {
38value = 1
39add = "scope:second.relative_military_strength(scope:first)"
40divide = 12
}
53request_visible = {
53always = no
}
54break_visible = {
54always = no
}
56cancel_enabled = {
57scope:actor = {
58not = {
58is_fighting_war_together_with = scope:recipient
}
}
}
62will_expire_trigger = {
}
71offer_declined_effect = {
72scope:actor = {
73add_opinion = {
73target = scope:recipient
73modifier = opinion_decline_alliance
}
}
}
77offer_effect = {
79if = {
80limit = {
81scope:actor != scope:recipient
82scope:actor = {
}
}
89scope:actor = {
90remove_relation = {
}
}
}
97if = {
98limit = {
99scope:actor != scope:recipient
100scope:actor = {
}
}
107scope:actor = {
108remove_relation = {
}
}
}
}
117cancel_effect = {
118scope:actor = {
119custom_tooltip = cancel_alliance_custom_tt We will break off the Alliance with Recipient.
120add_truce_with = {
121target = scope:recipient
122mutual = yes
}
}
125scope:recipient = {
126add_opinion = {
127target = scope:actor
128modifier = opinion_broke_alliance
}
}
131scope:recipient = {
132add_trust = {
133target = scope:actor
134value = -15
}
}
}
139should_ai_offer_trigger = {
140NOT = {
141scope:first = {
142has_opinion = {
143modifier = opinion_broke_alliance
144target = scope:second
}
}
}
}
150expire_effect = {
152if = {
153limit = {
154scope:first = {
156country_rank_level > scope:second.country_rank_level
}
}
159scope:first = {
160create_relation = {
}
}
}
167else_if = {
168limit = {
169scope:second = {
171country_rank_level > scope:first.country_rank_level
}
}
174scope:first = {
175create_relation = {
}
}
}
}
184wants_to_give_diplo_chance = {
185actor_is_rival = -100
186actor_overlord_is_rival = -100
187base = -40
188trust_in_actor = 1
189positive_opinion = 0.3
190negative_opinion = -1
191border_distance = -0.05
192few_relations = 5
193same_court_language = 15
194royal_ties = 3
195strategic_interest = 1
196common_threat = 0.4
197relative_strength = 25
198threatening_rivals = 20
}
200wants_to_give = {
201if = {
203limit = {
204scope:recipient = {
205border_distance_to = {
206country = scope:actor
207value < 150
}
209relative_strength = {
210target = scope:actor
211value < 0.60
}
}
}
215add = {
216desc = "NEEDS_ALLIES_AGAINST_STRONG_RIVALS_AND_NEIGHBOURS" Threat from neighbors and rivals
218value = scope:recipient.country_needs_allies_value
219max = 25
220min = 0
}
}
223scope:actor = {
224add = {
225desc = "COALITION_GRADE_ANTAGONISM_TOWARDS_THEM" Actor is a likely target of a coalition
226value = {
227every_country_with_coalition_grade_antagonism_against_us = {
228limit = {
229not = {
229is_subject_or_below_of = scope:actor
}
}
231subtract = {
232value = country_strength
}
}
235if = {
236limit = {
237NOT = {
238country_strength <= 0
}
}
241divide = country_strength
}
243multiply = 10
}
}
}
247if = {
248limit = {
249scope:actor = {
250any_current_war = {
251NOT = {
252is_on_same_side = {
253country = scope:actor
254target = scope:recipient
}
}
}
}
}
260add = {
261desc = "ACTOR_IS_IN_DIFFERENT_WARS" Actor is at war
262value = -100
}
}
266if = {
267limit = {
268scope:recipient.opinion(scope:actor) < 150
269scope:recipient.conquer_desire(scope:actor) > 20
270scope:recipient = {
271is_neighbor_of = scope:actor
}
}
274add = {
275desc = "RECIPIENTS_DESIRES_ACTORS_LOCATIONS" Recipient desires land belonging to Actor
276value = "scope:recipient.conquer_desire(scope:actor)"
277multiply = -1
278if = {
279limit = {
280scope:recipient = {
281ai_personality = ai_personality:ai_expansionist
}
}
284add = {
285value = "scope:recipient.num_of_locations_with_high_conquer_desire(scope:actor)"
286multiply = -5
}
}
}
}
292if = {
293limit = {
}
299add = {
300value = -1000
301desc = "CHALLENGER_BEYLIK" Challenger for the strongest Beylik
}
}
305add = {
306desc = "RECIPIENT_WOULD_NEED_TO_PAY_FOR_DIPLOMACY" Recipient would need to pay to maintain the relation
307value = scope:recipient.diplomatic_capacity_without_maintenance
308subtract = scope:recipient.used_diplomatic_capacity
309subtract = "scope:recipient.diplomatic_capacity_of_new_relation(scope:actor|scope:scripted_relation_type)"
310if = {
311limit = {
312NOT = {
312scope:recipient.diplomatic_capacity_without_maintenance <= 0
}
}
314divide = scope:recipient.diplomatic_capacity_without_maintenance
}
316max = 0
317multiply = 100
}
320add = {
321desc = "COMMON_RIVALS" Common Rivals
322value = "scope:recipient.num_of_common_rivals(scope:actor)"
323max = 3
324multiply = 5
}
}
328wants_to_keep_diplo_chance = {
329recipient_is_rival = -100
330recipient_overlord_is_rival = -100
331trust_in_recipient = 1
332border_distance = -0.05
333same_court_language = 15
334royal_ties = 3
335strategic_interest = 1
336common_threat = 0.4
337reverse_relative_strength = 25
338threatening_rivals = 20
}
340wants_to_keep = {
341add = {
342desc = "DIPLOREASON_NEGATIVE_OPINION" Negative Opinion
343value = "scope:actor.opinion(scope:recipient)"
344max = 0
}
346add = {
347desc = "DIPLOREASON_POSITIVE_OPINION" Positive Opinion
348value = "scope:actor.opinion(scope:recipient)"
349multiply = 0.3
350min = 0
}
353if = {
354limit = {
}
360add = {
361value = -1000
362desc = "CHALLENGER_BEYLIK" Challenger for the strongest Beylik
}
}
366if = {
367limit = {
368scope:actor.opinion(scope:recipient) < 150
369scope:actor.conquer_desire(scope:recipient) > 20
370scope:actor = {
371is_neighbor_of = scope:recipient
372NOT = {
373wants_to_subjugate = scope:recipient
}
}
}
378add = {
379desc = "RECIPIENTS_DESIRES_ACTORS_LOCATIONS" Recipient desires land belonging to Actor
380value = "scope:actor.conquer_desire(scope:recipient)"
381multiply = -0.5
382if = {
383limit = {
384scope:actor = {
385ai_personality = ai_personality:ai_expansionist
}
}
388add = {
389value = "scope:actor.num_of_locations_with_high_conquer_desire(scope:recipient)"
390multiply = -2.5
}
}
}
}
397if = {
399limit = {
400scope:actor = {
401border_distance_to = {
402country = scope:recipient
403value < 150
}
405relative_strength = {
406target = scope:recipient
407value < 0.60
}
}
}
412scope:actor = {
413add = {
414desc = "NEEDS_ALLIES_AGAINST_STRONG_RIVALS_AND_NEIGHBOURS" Threat from neighbors and rivals
417max = 25
418min = 0
}
}
}
422scope:recipient = {
423add = {
424desc = "COALITION_GRADE_ANTAGONISM_TOWARDS_RECIPIENT" Recipient is a likely target of a coalition
425value = {
426every_country_with_coalition_grade_antagonism_against_us = {
432subtract = {
433value = country_strength
}
}
436if = {
437limit = {
438NOT = {
439country_strength <= 0
}
}
442divide = country_strength
}
444multiply = 10
}
}
}
449add = {
450desc = "ACTOR_WOULD_NEED_TO_PAY_FOR_DIPLOMACY" Actor would need to pay to maintain the relation
451value = scope:actor.diplomatic_capacity_without_maintenance
452subtract = scope:actor.used_diplomatic_capacity
453if = {
454limit = {
455NOT = {
455scope:actor.diplomatic_capacity_without_maintenance <= 0
}
}
457divide = scope:actor.diplomatic_capacity_without_maintenance
}
459max = 0
460multiply = 100
}
464if = {
465limit = {
466scope:actor = {
467at_war = yes
}
}
470add = {
471desc = "ACTOR_IS_IN_DIFFERENT_WARS" Actor is at war
472value = 100
}
}
476add = {
477desc = "COMMON_RIVALS" Common Rivals
478value = "scope:recipient.num_of_common_rivals(scope:actor)"
479max = 3
480multiply = 5
}
483if = {
484limit = {
487OR = {
488AND = {
489scope:actor = {
}
490scope:recipient = {
}
}
492AND = {
493scope:actor = {
}
494scope:recipient = {
}
}
}
}
498subtract = {
499desc = "IN_OPPOSING_RELIGIOUS_FACTONS" In opposing religious factions
500value = 1000
}
}
}