
International OrganizationChanged this version
Independence Movement
It is time to shake off the shackles of our Overlords and fight for freedom! Independence movements can begin at any time, but are more likely to occur if a Subject is dissatisfied with life under their current leader. An independence movement can quickly gain supporters if we are unpopular.
IndependenceCasus Bellijoin offensive wars alwaysDefinitionin_game/common/international_organizations/independence_movement.txt:1
2has_target = yes
3unique = no
4expel_members_who_are_targets_of_other_members = yes
5expel_members_who_are_attackers_at_war_with_other_members = yes
6has_leader_country = yes
7leader_type = country
8leader_change_method = none
9disband_if_no_leader = yes
10show_on_diplomatic_map = yes
11subject_limited = no
12show_strength_comparison_with_target = yes
13declare_war_on_target_casus_belli = cb_independence_war
15custom_name = independence_movement_name
18leader_color = define:NMapColors|INTERNATIONAL_ORGANIZATION_LEADER_COLOR
21join_offensive_wars_always = {
22custom_tooltip = {
23text = independence_movement_join_war_always_tt War is declared against their Overlord
24scope:target ?= {
25this = root.international_organization_target
}
27trigger_if = {
28limit = {
29exists = scope:casus_belli
}
}
}
}
36join_defensive_wars_always = {
37or = {
38custom_tooltip = {
39text = independence_movement_join_war_def_always_tt Their Overlord declares War
40scope:target ?= {
41this = root.international_organization_target
}
}
44custom_tooltip = {
45text = independence_movement_join_war_def_always_tt_during They are fighting the Overlord for independence
46scope:recipient = {
47is_at_war_with = root.international_organization_target
}
}
}
}
53create_visible_trigger = {
54is_subject = yes
55overlord = scope:target
}
58create_enabled_trigger = {
59is_disloyal_subject = yes
}
62invite_visible_trigger = {
63always = yes
}
66can_declare_war = {
67always = yes
}
70potential_target_trigger = {
71is_overlord = yes
72any_subject = {
73is_disloyal_subject = yes
75not = {
75is_at_war_with = root
}
76not = {
76has_truce_with = root
}
77not = {
77is_fighting_war_together_with = root
}
}
}
81can_target_trigger = {
}
84can_lead_trigger = {
85is_subject = yes
}
88can_join_trigger = {
89trigger_if = {
90limit = {
91exists = scope:recipient
}
93opinion = {
94target = scope:recipient.leader_country
95value > 0
}
}
98is_rebel_country = no
100not = {
100is_at_war_with = scope:target
}
101not = {
101has_truce_with = scope:target
}
102not = {
102is_fighting_war_together_with = scope:target
}
103scope:target = {
104NOT = {
105any_overlord_or_above = {
106this = root
}
}
}
111or = {
112has_limited_diplomacy = no
113overlord ?= scope:target
}
}
117can_leave_trigger = {
118always = yes
}
121auto_leave_trigger = {
122or = {
124has_truce_with = scope:target
125AND = {
126overlord ?= scope:target
127subject_loyalty > 80
}
}
}
132auto_disband_trigger = {
133leader_country = {
134or = {
135subject_loyalty > 80
136not = {
136overlord ?= scope:target
}
138has_truce_with = scope:target
}
}
}
143on_joined = {
144if = {
145limit = {
146scope:recipient = {
147total_members = 1
}
}
150add_casus_belli = {
152province = scope:recipient.leader_country.capital.province
153target = scope:target
}
}
156scope:target = {
157random_current_war = {
158limit = {
159attacker_leader = scope:recipient.leader_country
160defender_leader = scope:target
}
162save_scope_as = independence_war
}
}
165if = {
166limit = {
167exists = scope:independence_war
}
169join_war_as_attacker = {
169war = scope:independence_war
}
}
}
173on_left = {
}
176monthly_effect = {
}
179ai_desire_to_join = {
181add = {
182desc = "BASE_REASON" Base Reason
183value = -20
}
185if = {
186limit = {
187overlord ?= scope:target
}
189add = {
190desc = "game_concept_subject_loyalty" Subject Loyalty
191value = 50
192subtract = subject_loyalty
193multiply = 5
}
}
196add = {
197desc = "OPINION_OF_TARGET" Opinion of Target
198scope:target = {
199value = prev_opinion_of_this
200multiply = -0.4
}
}
203if = {
204limit = {
205exists = scope:recipient
}
207add = {
208desc = "OPINION_OF_SUBJECT" Opinion of Recipient Leader Country
209scope:recipient.leader_country = {
210value = prev_opinion_of_this
211multiply = 0.4
}
}
214add = {
215desc = "DIPLOMATIC_REPUTATION_OF_SUBJECT" Diplomatic Reputation of Recipient Leader Country
216value = "scope:recipient.leader_country.modifier:diplomatic_reputation"
217multiply = 3
}
219scope:recipient.leader_country = {
220save_temporary_value_as = {
221name = trust Trust
222value = prev_trust_of_this
}
224if = {
225limit = {
226scope:trust > 50
}
228add = {
229desc = "TRUST_OF_SUBJECT" Trust of Recipient Leader Country
230value = scope:trust
231subtract = 50
}
}
234else = {
235subtract = {
236desc = "TRUST_OF_SUBJECT" Trust of Recipient Leader Country
237value = 50
238subtract = scope:trust
}
}
}
242if = {
243limit = {
244in_union_with = scope:recipient.leader_country
245is_subject_of = scope:target
}
247add = {
248desc = "SAME_UNION_AS_LEADER_COUNTRY" In a Union with Recipient Leader Country
249value = 200
}
}
}
254add = {
255desc = "DIPLOMATIC_REPUTATION_OF_TARGET" Diplomatic Reputation of Target
256value = "scope:target.modifier:diplomatic_reputation"
257multiply = -3
}
259add = {
260desc = "TRUST_OF_TARGET" Trust of Target
261scope:target = {
262value = prev_trust_of_this
263subtract = 50
264multiply = -1
}
}
268add = {
269desc = "ANTAGONISM_OF_TARGET" Antagonism of Target
270scope:target = {
271value = prev_antagonism_towards_this
}
}
274add = {
275desc = "DIPLOREASON_IN_DEBT" In Debt
276value = num_loans
277multiply = -20
}
279add = {
280desc = "[war_exhaustion|e]"
281value = war_exhaustion
282multiply = -2
}
284save_temporary_value_as = {
285name = relative_strength_of_io
286value = {
287value = 0
288if = {
289limit = {
290exists = scope:recipient
}
292scope:recipient = {
293every_international_organization_member = {
294add = country_strength
}
}
297add = "root.country_strength"
}
299else = {
300add = country_strength
}
}
}
304save_temporary_value_as = {
305name = relative_strength_of_target
306value = {
307value = 0
308scope:target = {
309add = country_strength
310every_subject = {
311limit = {
312exists = scope:recipient
313is_member_of_international_organization = scope:recipient
}
315subtract = country_strength
}
317every_related_country = {
318type = alliance
319limit = {
320OR = {
321NOT = {
321exists = scope:recipient
}
322NOT = {
322is_member_of_international_organization = scope:recipient
}
}
}
325add = country_strength
}
}
}
}
330if = {
331limit = {
332exists = scope:relative_strength_of_io
333exists = scope:relative_strength_of_target
334scope:relative_strength_of_target != 0
}
336add = {
338desc = "RELATIVE_STRENGTH_IO" Relative Strength of Recipient to Target
339value = 100
340multiply = {
341value = scope:relative_strength_of_io
342divide = {
343value = scope:relative_strength_of_target
344add = scope:relative_strength_of_io
}
}
347subtract = 50
348max = 25
}
}
351else = {
352add = {
354desc = "RELATIVE_STRENGTH_TO_TARGET" Relative Strength of Country to Target
355value = 100
356multiply = "root.relative_strength(scope:target)"
357subtract = 50
358max = 25
}
}
361if = {
362limit = {
362is_during_bankruptcy = yes
}
363add = {
364desc = "IS_BANKRUPT_TOOLTIP" Is Bankrupt
365value = -1000
}
}
368if = {
369limit = {
369at_war = yes
}
370add = {
371desc = "IS_AT_WAR" Is at War
372value = -25
}
}
375if = {
376limit = {
376is_rival_of = root
}
377add = {
378desc = "RIVAL_OF_ACTOR" Is Rival of Actor
379value = -100
}
}
382if = {
383limit = {
383is_rival_of = scope:target
}
384add = {
385desc = "RIVAL_OF_TARGET" Is Rival of Target
386value = 100
}
}
}
391ai_desire_to_allow_new_member = {
392add = {
393desc = "WE_WANT_THE_ORGANIZATION_TO_GROW" We want the International Organization to grow
394value = 20
}
}