Diff to HTML by rtfpessoa

Files changed (2) hide show
  1. common/scripted_effects/01_scripted_effects_for_diplomacy.txt +41 -0
  2. common/scripted_effects/01_scripted_effects_for_on_actions.txt +297 -0
common/scripted_effects/01_scripted_effects_for_diplomacy.txt CHANGED
@@ -71,4 +71,45 @@ eyalet_dynamic_name_change_effect = {
71
71
  if = { limit = { tag = MOR } eyalet_name_effect = { tag = E16 } }
72
72
  if = { limit = { tag = SAV } eyalet_name_effect = { tag = E17 } }
73
73
  if = { limit = { tag = YEM } eyalet_name_effect = { tag = E17 } }
74
+ }
75
+
76
+ convert_special_subject_to_vassal = {
77
+ if = {
78
+ limit = {
79
+ $subject$ = { is_subject_of = $overlord$ }
80
+ OR = {
81
+ AND = {
82
+ $overlord$ = { NOT = { has_government_attribute = has_eyalets } }
83
+ $subject$ = {
84
+ OR = {
85
+ is_subject_of_type = eyalet
86
+ is_subject_of_type = core_eyalet
87
+ }
88
+ }
89
+ }
90
+ AND = {
91
+ $overlord$ = { NOT = { has_government_attribute = enables_pronoias } }
92
+ $subject$ = {
93
+ OR = {
94
+ is_subject_of_type = pronoia_subject_type
95
+ is_subject_of_type = hereditary_pronoia_subject_type
96
+ }
97
+ }
98
+ }
99
+ AND = {
100
+ $overlord$ = { NOT = { has_government_mechanic = persian_influence_mechanic } }
101
+ $subject$ = {
102
+ is_subject_of_type = cultural_sphere_of_influence_subject
103
+ }
104
+ }
105
+ }
106
+ }
107
+ $overlord$ = {
108
+ create_subject = {
109
+ subject_type = vassal
110
+ subject = $subject$
111
+ keep_liberty_desire = yes
112
+ }
113
+ }
114
+ }
74
115
  }
common/scripted_effects/01_scripted_effects_for_on_actions.txt CHANGED
@@ -4129,4 +4129,301 @@ on_startup_dlc_cleanup_effect = {
4129
4129
  }
4130
4130
  remove_country_modifier = tur_janissary
4131
4131
  }
4132
+ }
4133
+
4134
+ on_dependency_gained_effect = {
4135
+ convert_special_subject_to_vassal = {
4136
+ overlord = ROOT
4137
+ subject = FROM
4138
+ }
4139
+ if = {
4140
+ limit = {
4141
+ FROM = {
4142
+ has_government_attribute = has_dutch_election
4143
+ }
4144
+ }
4145
+ ROOT = {
4146
+ country_event = {
4147
+ id = dutch_republic.31
4148
+ }# States General falls under a PU
4149
+ }
4150
+ }
4151
+ if = {
4152
+ limit = {
4153
+ FROM = {
4154
+ tag = AVE
4155
+ government_rank = 1
4156
+ }
4157
+ }
4158
+ FROM = {
4159
+ country_event = {
4160
+ id = flavor_gbr.20
4161
+ }
4162
+ }
4163
+ }
4164
+ }
4165
+
4166
+ on_dependency_lost_effect = {
4167
+ if = {
4168
+ limit = {
4169
+ has_country_modifier = mng_tibetan_horses_monopoly_modifier
4170
+ FROM = { owns = 667 }
4171
+
4172
+ }
4173
+ remove_country_modifier = mng_tibetan_horses_monopoly_modifier
4174
+ }
4175
+ if = {
4176
+ limit = {
4177
+ has_country_modifier = tur_tatar_vanguard_modifier
4178
+ FROM = { tag = CRI NOT = { is_subject_of = ROOT } }
4179
+ }
4180
+ remove_country_modifier = tur_tatar_vanguard_modifier
4181
+ }
4182
+ if = {
4183
+ limit = {
4184
+ has_country_modifier = rus_grand_duke_of_finland
4185
+ FROM = { tag = FIN }
4186
+ }
4187
+ remove_country_modifier = rus_grand_duke_of_finland
4188
+ }
4189
+ FROM = {
4190
+ if = {
4191
+ limit = { has_country_modifier = revoked_war_rights }
4192
+ remove_country_modifier = revoked_war_rights
4193
+ }
4194
+ if = {
4195
+ limit = { has_country_modifier = grain_trade_imports_modifier }
4196
+ remove_country_modifier = grain_trade_imports_modifier
4197
+ }
4198
+ }
4199
+ }
4200
+
4201
+ on_monarch_death_effect = {
4202
+ if = {
4203
+ limit = {
4204
+ tag = ANS
4205
+ BRA = {
4206
+ has_country_flag = albrecht_achilles_flag
4207
+ }
4208
+ }
4209
+ BRA = {
4210
+ clr_country_flag = albrecht_achilles_flag #Just to be sure
4211
+ kill_heir = {} #If Albrecht Achilles dies in Ansbach he will also be dead in Brandenburg, will appear as normal death of heir to BRA.
4212
+ }
4213
+ }
4214
+ if = {
4215
+ limit = { has_country_modifier = sought_after_bachelor }
4216
+ remove_country_modifier = sought_after_bachelor
4217
+ }
4218
+ if = {
4219
+ limit = {
4220
+ tag = SAX
4221
+ has_country_flag = sax_thuringen_split_to_happen
4222
+ OR = {
4223
+ NOT = { dynasty = "von Wettin" }
4224
+ NOT = { senior_union_with = THU }
4225
+ has_regency = yes
4226
+ }
4227
+ }
4228
+ clr_country_flag = sax_thuringen_split_to_happen
4229
+ }
4230
+ if = {
4231
+ limit = { tag = SAM }
4232
+ country_event = { id = polynesian.35 }
4233
+ }
4234
+ if = {
4235
+ limit = { tag = TOG }
4236
+ country_event = { id = polynesian.36 }
4237
+ }
4238
+ if = { # Ascension of Trailokanat
4239
+ limit = { tag = AYU }
4240
+ country_event = { id = flavor_suk.1 }
4241
+ }
4242
+ if = {
4243
+ limit = { tag = GOT }
4244
+ country_event = { id = flavor_got.37 }
4245
+ }
4246
+ if = {
4247
+ limit = { has_government_attribute = no_stability_loss_on_monarch_death }
4248
+ add_stability = 1
4249
+ }
4250
+
4251
+ if = {
4252
+ limit = {
4253
+ is_subject_of_type = pronoia_subject_type
4254
+ NOT = { liberty_desire = 50 }
4255
+ }
4256
+ overlord = {
4257
+ inherit = ROOT
4258
+ if = {
4259
+ limit = {
4260
+ has_country_flag = BYZ_inheriting_pronoia_crownland_flag
4261
+ OR = {
4262
+ NOT = { has_country_flag = BYZ_crownland_from_pronoia_proc }
4263
+ had_country_flag = {
4264
+ flag = BYZ_crownland_from_pronoia_proc
4265
+ days = 1825
4266
+ }
4267
+ }
4268
+ }
4269
+ clr_country_flag = BYZ_crownland_from_pronoia_proc
4270
+ set_country_flag = BYZ_crownland_from_pronoia_proc
4271
+ change_estate_land_share = {
4272
+ estate = all
4273
+ share = -1
4274
+ }
4275
+ }
4276
+ }
4277
+ }
4278
+ if = {
4279
+ limit = {
4280
+ has_government_attribute = civil_war_on_every_new_ruler
4281
+ }
4282
+ country_event = { id = 611 }
4283
+ }
4284
+
4285
+ }
4286
+
4287
+ on_conquest_effect = {
4288
+ remove_named_unrest = estate_land_seized
4289
+ clr_province_flag = has_estate_unrest_flag
4290
+ if = {
4291
+ limit = {
4292
+ is_part_of_hre = no
4293
+ owner = {
4294
+ has_country_flag = pru_dom_hre_flag
4295
+ alliance_with = emperor
4296
+ }
4297
+ }
4298
+ owner = {
4299
+ add_trust = {
4300
+ who = emperor
4301
+ value = 3
4302
+ mutual = yes
4303
+ }
4304
+ }
4305
+ }
4306
+ else_if = {
4307
+ limit = {
4308
+ is_part_of_hre = no
4309
+ owner = {
4310
+ has_country_flag = pru_dom_hre_flag
4311
+ NOT = { alliance_with = emperor }
4312
+ is_emperor = no
4313
+ }
4314
+ }
4315
+ owner = {
4316
+ add_power_projection = {
4317
+ type = mission_rewards_power_projection
4318
+ amount = 1
4319
+ }
4320
+ }
4321
+ }
4322
+ else_if = {
4323
+ limit = {
4324
+ is_part_of_hre = no
4325
+ owner = { is_emperor = yes }
4326
+ development = 25
4327
+ }
4328
+ emperor = {
4329
+ add_imperial_influence = 1
4330
+ }
4331
+ }
4332
+ if = {
4333
+ limit = {
4334
+ owner = {
4335
+ mission_completed = feo_gothic_invasion
4336
+ }
4337
+ OR = {
4338
+ region = north_german_region
4339
+ region = south_german_region
4340
+ }
4341
+ }
4342
+ add_province_modifier = {
4343
+ name = feo_return_to_gothic_ways
4344
+ duration = -1
4345
+ }
4346
+ }
4347
+ if = {
4348
+ limit = {
4349
+ owner = {
4350
+ mission_completed = feo_subdue_the_hordes
4351
+ }
4352
+ OR = {
4353
+ region = ural_region
4354
+ region = central_asia_region
4355
+ }
4356
+ }
4357
+ add_province_modifier = {
4358
+ name = feo_steppe_construction_efforts
4359
+ duration = -1
4360
+ }
4361
+ }
4362
+ if = {
4363
+ limit = {
4364
+ owner = {
4365
+ mission_completed = feo_gothic_invasion
4366
+ }
4367
+ }
4368
+ if = {
4369
+ limit = {
4370
+ 134 = {
4371
+ country_or_non_sovereign_subject_holds = ROOT
4372
+ }
4373
+ }
4374
+ add_country_modifier = {
4375
+ name = feo_vienna
4376
+ duration = -1
4377
+ hidden = yes
4378
+ }
4379
+ }
4380
+ if = {
4381
+ limit = {
4382
+ 266 = {
4383
+ country_or_non_sovereign_subject_holds = ROOT
4384
+ }
4385
+ }
4386
+ add_country_modifier = {
4387
+ name = feo_prague
4388
+ duration = -1
4389
+ hidden = yes
4390
+ }
4391
+ }
4392
+ if = {
4393
+ limit = {
4394
+ 45 = {
4395
+ country_or_non_sovereign_subject_holds = ROOT
4396
+ }
4397
+ }
4398
+ add_country_modifier = {
4399
+ name = feo_lubeck
4400
+ duration = -1
4401
+ hidden = yes
4402
+ }
4403
+ }
4404
+ if = {
4405
+ limit = {
4406
+ 1878 = {
4407
+ country_or_non_sovereign_subject_holds = ROOT
4408
+ }
4409
+ }
4410
+ add_country_modifier = {
4411
+ name = feo_aachen
4412
+ duration = -1
4413
+ hidden = yes
4414
+ }
4415
+ }
4416
+ if = {
4417
+ limit = {
4418
+ 85 = {
4419
+ country_or_non_sovereign_subject_holds = ROOT
4420
+ }
4421
+ }
4422
+ add_country_modifier = {
4423
+ name = feo_cologne
4424
+ duration = -1
4425
+ hidden = yes
4426
+ }
4427
+ }
4428
+ }
4132
4429
  }