Diff to HTML by rtfpessoa

Files changed (2) hide show
  1. common/new_diplomatic_actions/00_diplomatic_actions.txt +5322 -0
  2. common/new_diplomatic_actions/00diplomatic_actions.txt +0 -198
common/new_diplomatic_actions/00_diplomatic_actions.txt ADDED
@@ -0,0 +1,5322 @@
1
+ # Triggers and effects will be given the Actor's scope, with the Recipient's as FROM
2
+ # Icons are used from the messageicons.dds
3
+ static_actions = { # static_actions is a reserved token.
4
+ # alert_index maps to the frame of the alert icon
5
+ royal_marriage = { alert_index = 1 alert_tooltip = ICON_RM }
6
+ requestpeace = { alert_index = 2 alert_tooltip = ICON_PEACE } # alert_index will be overwritten in code for this one.
7
+ allianceaction = { alert_index = 3 alert_tooltip = ICON_ALLIANCE }
8
+ # 4 is currently unused.
9
+ integrationaction = { alert_index = 5 alert_tooltip = ICON_ANNEX }
10
+ annexationaction = { alert_index = 5 alert_tooltip = ICON_ANNEX }
11
+ vassalaction = { alert_index = 6 alert_tooltip = ICON_VASSAL }
12
+ milaccess = { alert_index = 7 alert_tooltip = ICON_ASKMIL }
13
+ fleet_access = { alert_index = 8 alert_tooltip = ICON_ASKFLEET }
14
+ offermilaccess = { alert_index = 9 alert_tooltip = ICON_OFFACC }
15
+ callaction = { alert_index = 10 alert_tooltip = ICON_CALLALLY } # This one is referred to in the code (settings.cpp)
16
+ offerloan = { alert_index = 11 alert_tooltip = ICON_OFFERLOAN }
17
+ sellprov = { alert_index = 12 alert_tooltip = ICON_PROVSALE }
18
+ #13 is cursed
19
+ request_to_join_federation = { alert_index = 14 alert_tooltip = ICON_FEDERATIONREQUEST }
20
+ invite_to_federation = { alert_index = 15 alert_tooltip = ICON_FEDERATIONINVITE }
21
+ transfer_trade_power = { alert_index = 16 alert_tooltip = TRANSFER_TRADE_POWER }
22
+ religious_unity_action = { alert_index = 17 alert_tooltip = ICON_RELIGIOUS_UNITY }
23
+ # 18 is used by requestpeace
24
+ form_coalition = { alert_index = 19 alert_tooltip = ICON_FORM_COALITION }
25
+ enforce_peace = { alert_index = 20 alert_tooltip = ICON_ENFORCE_PEACE } # This one may be overwritten in code.
26
+ grant_electorate = { alert_index = 21 alert_tooltip = ICON_GRANT_ELECTORATE }
27
+ demand_unlawful_territory_action = { alert_index = 22 alert_tooltip = ICON_DEMAND_UNLAWFUL_TERRITORY }
28
+ # 23 is used by requestpeace
29
+ # 24 is used by requestpeace
30
+ # 25 is used by requestpeace
31
+ # 26 is used by requestpeace
32
+ # 27 is used by enforce_peace (when actor is coalition leader) with tooltip "ICON_ENFORCE_PEACE_COALITION_LEADER"
33
+ support_independence_action = { alert_index = 28 alert_tooltip = support_independence }
34
+ steer_trade = { alert_index = 29 alert_tooltip = ICON_STEER_TRADE }
35
+ ask_for_march = { alert_index = 30 alert_tooltip = ICON_MARCH }
36
+ sell_ships_action = { alert_index = 31 alert_tooltip = ICON_FLEETSALE }
37
+ grant_freecity = { alert_index = 32 alert_tooltip = ICON_GRANT_FREECITY }
38
+ # 33 is currently unused
39
+ invite_to_trade_league = { alert_index = 34 alert_tooltip = ICON_TRADELEAGUEINVITE }
40
+ request_to_join_trade_league = { alert_index = 35 alert_tooltip = ICON_TRADELEAGUEREQUEST }
41
+ sharemap = { alert_index = 36 alert_tooltip = ICON_REQUESTSHAREMAP } # alert_tooltip gets special treatment in the code
42
+ condottieri_action = { alert_index = 37 alert_tooltip = ICON_CONDOTTIERI }
43
+ offer_fleet_access = { alert_index = 38 alert_tooltip = ICON_OFFERFLEET }
44
+ break_alliance = { alert_index = 39 alert_tooltip = ICON_BREAK_ALLIANCE }
45
+ tributary_state_action = { alert_index = 40 alert_tooltip = ICON_TRIBUTARY }
46
+ ask_for_tributary_state_action = { alert_index = 41 alert_tooltip = ICON_ASK_TRIBUTARY }
47
+ knowledge_sharing = { alert_index = 42 alert_tooltip = ICON_KNOWLEDGESHARE } #The answer to life
48
+ # 43 is currently unused
49
+ charter_company = { alert_index = 44 alert_tooltip = ICON_CHARTERCOMPANY }
50
+ reduce_relations_favor = { alert_index = 45 alert_tooltip = ICON_TRADEFAVORSFORREDUCERELATIONS }
51
+ return_core_favor = { alert_index = 46 alert_tooltip = ICON_TRADEFAVORSFORRETURNCORE }
52
+ break_alliance_favor = { alert_index = 47 alert_tooltip = ICON_TRADEFAVORSFORBREAKALLIANCE }
53
+ trade_favors_for_trust = { alert_index = 48 alert_tooltip = ICON_TRADEFAVORSFORTRUST }
54
+ trade_favors_for_men = { alert_index = 49 alert_tooltip = ICON_TRADEFAVORSFORMEN }
55
+ trade_favors_for_sailors = { alert_index = 50 alert_tooltip = ICON_TRADEFAVORSFORSAILORS }
56
+ trade_favors_for_heir = { alert_index = 51 alert_tooltip = ICON_TRADEFAVORSFORHEIR }
57
+ trade_favors_for_war_prep = { alert_index = 52 alert_tooltip = ICON_TRADEFAVORSFORWARPREP }
58
+ trade_favors_for_gold = { alert_index = 53 alert_tooltip = ICON_TRADEFAVORSFORGOLD }
59
+ ask_knowledge_sharing = { alert_index = 55 alert_tooltip = ICON_ASKKNOWLEDGESHARE }
60
+ }
61
+
62
+ # Create new diplomatic actions like this. AI will currently never send them.
63
+ #demand_dummy = {
64
+ # category = influence
65
+ #
66
+ # alert_index = 40
67
+ # alert_tooltip = demand_dummy_alert_tooltip
68
+ #
69
+ # require_acceptance = yes # Whether the recipient gets an option to decline
70
+ #
71
+ # is_visible = {
72
+ # always = no ############################ Remove this line to unleash the magic ########################################
73
+ # religion_group = christian
74
+ # is_subject = no
75
+ # FROM = {
76
+ # is_subject = no
77
+ # }
78
+ # }
79
+ # is_allowed = {
80
+ # variable_arithmetic_trigger = {
81
+ # custom_tooltip = HAS_OLDER_RULER_THAN_THEIR_HEIR
82
+ # export_to_variable = { # All export to variable will happen first. Then the other effects and triggers will be executed/evaluated in order
83
+ # variable_name = my_age
84
+ # value = trigger_value:ruler_age
85
+ # }
86
+ # export_to_variable = {
87
+ # variable_name = their_age
88
+ # value = trigger_value:heir_age
89
+ # who = FROM
90
+ # }
91
+ # ruler_age = 0 # This is a normal trigger.
92
+ # FROM = {
93
+ # heir_age = 0 # This is a normal trigger too.
94
+ # }
95
+ # check_variable = { # This trigger is only allowed inside a variable_arithmetic_trigger.
96
+ # which = my_age
97
+ # which = their_age
98
+ # }
99
+ # }
100
+ # religion = catholic
101
+ # }
102
+ # on_accept = {
103
+ # add_trust = {
104
+ # who = FROM
105
+ # value = 20
106
+ # mutual = yes
107
+ # }
108
+ # create_subject = {
109
+ # subject_type = dummy
110
+ # subject = FROM
111
+ # }
112
+ # }
113
+ # on_decline =
114
+ # {
115
+ # add_trust = {
116
+ # who = FROM
117
+ # value = -100
118
+ # mutual = no
119
+ # }
120
+ # }
121
+ #
122
+ # ai_acceptance = { # This works similarly to variable_arithmetic_trigger, but does not support triggers generally. Instead, "limit" will be evaluated first and the rest ignored if it isn't passed.
123
+ # add_entry = {
124
+ # name = TRUST
125
+ # limit = { religion = catholic }
126
+ # export_to_variable = {
127
+ # variable_name = ai_value # Each "add_entry" must create one variable called "ai_value", the value of which will be extracted after executing all effects
128
+ # value = trust
129
+ # who = FROM
130
+ # with = THIS
131
+ # }
132
+ # subtract_variable = { which = ai_value value = 50 }
133
+ # multiply_variable = { which = ai_value value = 2 }
134
+ # }
135
+ # add_entry = {
136
+ # name = TRUST
137
+ # limit = { NOT = { religion = catholic } }
138
+ # export_to_variable = {
139
+ # variable_name = ai_value
140
+ # value = trust
141
+ # who = FROM
142
+ # with = THIS
143
+ # }
144
+ # export_to_variable = {
145
+ # variable_name = is_defender
146
+ # value = trigger_value:is_defender_of_faith # This sets is_defender to either 0.0 or 1.0
147
+ # }
148
+ # multiply_variable = {
149
+ # which = is_defender
150
+ # value = 10
151
+ # }
152
+ # change_variable = {
153
+ # which = ai_value
154
+ # which = is_defender # This adds 10 to ai_value if you are defender of faith
155
+ # }
156
+ # subtract_variable = { which = ai_value value = 50 }
157
+ # }
158
+ # add_entry = {
159
+ # name = OPINION
160
+ # export_to_variable = {
161
+ # variable_name = ai_value
162
+ # value = opinion
163
+ # who = FROM
164
+ # with = THIS
165
+ # }
166
+ # divide_variable = { which = ai_value value = 4 }
167
+ # }
168
+ # }
169
+ #
170
+ # ai_will_do = { # this is a trigger
171
+ # has_opinion_modifier = {
172
+ # modifier = insulted
173
+ # who = FROM
174
+ # }
175
+ # }
176
+ #}
177
+ #
178
+ #cancel_dummy = {
179
+ # category = influence
180
+ # require_acceptance = no
181
+ # is_visible = {
182
+ # overlord_of = FROM
183
+ # FROM = {
184
+ # is_subject_of_type = dummy
185
+ # }
186
+ # }
187
+ # is_allowed = {
188
+ # reverse_has_opinion_modifier = {
189
+ # modifier = insulted
190
+ # who = FROM
191
+ # }
192
+ # }
193
+ # on_accept = {
194
+ # add_trust = {
195
+ # who = FROM
196
+ # value = -100
197
+ # mutual = yes
198
+ # }
199
+ # FROM = {
200
+ # grant_independence = yes
201
+ # }
202
+ # }
203
+ # ai_will_do = {
204
+ # always = no
205
+ # }
206
+ #}
207
+
208
+ # Sell indulgence
209
+ sell_indulgence = {
210
+ category = economy
211
+
212
+ alert_index = 56
213
+ alert_tooltip = sell_indulgence_alert_tooltip
214
+
215
+ require_acceptance = yes # Whether the recipient gets an option to decline
216
+
217
+ is_visible = {
218
+ has_government_attribute = can_sell_indulgences
219
+ religion = catholic
220
+ }
221
+ is_allowed = {
222
+ if = {
223
+ limit = { FROM = { NOT = { religion = catholic } } }
224
+ custom_trigger_tooltip = {
225
+ tooltip = sell_indulgence_catholic
226
+ FROM = { religion = catholic }
227
+ }
228
+ }
229
+ if = {
230
+ limit = { FROM = { tag = PAP } }
231
+ custom_trigger_tooltip = {
232
+ tooltip = sell_indulgence_pope
233
+ FROM = { NOT = { tag = PAP } }
234
+ }
235
+ }
236
+ if = {
237
+ limit = { FROM = { is_subject_other_than_tributary_trigger = yes } }
238
+ custom_trigger_tooltip = {
239
+ tooltip = sell_indulgence_subject
240
+ FROM = { is_free_or_tributary_trigger = yes }
241
+ }
242
+ }
243
+ if = {
244
+ limit = { NOT = { papal_influence = 50 } NOT = { tag = PAP } }
245
+ custom_trigger_tooltip = {
246
+ tooltip = sell_indulgence_pi
247
+ papal_influence = 50
248
+ }
249
+ }
250
+ if = {
251
+ limit = { war_with = FROM }
252
+ custom_trigger_tooltip = {
253
+ tooltip = sell_indulgence_war
254
+ NOT = { war_with = FROM }
255
+ }
256
+ }
257
+ }
258
+ on_accept = {
259
+ if = {
260
+ limit = { NOT = { tag = PAP } }
261
+ add_papal_influence = -50
262
+ }
263
+ else = {
264
+ add_corruption = 0.5
265
+ }
266
+ add_reform_desire = 0.0025
267
+ FROM = {
268
+ add_stability = 1
269
+ add_prestige = 10
270
+ country_event = {
271
+ id = flavor_rig.5
272
+ }
273
+ }
274
+ change_variable = {
275
+ which = sold_indulgences
276
+ value = 1
277
+ }
278
+ }
279
+ on_decline = {
280
+ }
281
+
282
+ ai_acceptance = { # This works similarly to variable_arithmetic_trigger, but does not support triggers generally. Instead, "limit" will be evaluated first and the rest ignored if it isn't passed.
283
+ add_entry = {
284
+ name = TRUST
285
+ export_to_variable = {
286
+ variable_name = ai_value
287
+ value = trust
288
+ who = FROM
289
+ with = ROOT
290
+ }
291
+ subtract_variable = {
292
+ which = ai_value
293
+ value = 50
294
+ }
295
+ #1 trust = +4 ai points
296
+ multiply_variable = {
297
+ which = ai_value
298
+ value = 0.4
299
+ }
300
+ }
301
+ add_entry = {
302
+ name = OPINION
303
+ export_to_variable = {
304
+ variable_name = ai_value
305
+ value = opinion
306
+ who = FROM
307
+ with = ROOT
308
+ }
309
+ multiply_variable = {
310
+ which = ai_value
311
+ value = 0.2
312
+ }
313
+ }
314
+ add_entry = {
315
+ name = DIPLO_IS_RIVAL
316
+ limit = {
317
+ FROM = {
318
+ ai_attitude = {
319
+ who = ROOT
320
+ attitude = attitude_rivalry
321
+ }
322
+ }
323
+ }
324
+ export_to_variable = {
325
+ variable_name = ai_value
326
+ value = 1
327
+ }
328
+
329
+ multiply_variable = {
330
+ which = ai_value
331
+ value = -1000
332
+ }
333
+ }
334
+ add_entry = {
335
+ name = diplomatic_reputation
336
+ limit = { }
337
+ export_to_variable = {
338
+ variable_name = ai_value
339
+ value = trigger_value:diplomatic_reputation
340
+ }
341
+ #1 rep = 2
342
+ multiply_variable = {
343
+ which = ai_value
344
+ value = 2
345
+ }
346
+ }
347
+ add_entry = {
348
+ name = STABILITY_AI_MODIFIER
349
+ export_to_variable = {
350
+ variable_name = ai_value
351
+ value = stability
352
+ who = FROM
353
+ with = ROOT
354
+ }
355
+ multiply_variable = {
356
+ which = ai_value
357
+ value = -25
358
+ }
359
+ }
360
+ }
361
+
362
+ ai_will_do = { # this is a trigger
363
+ has_opinion = {
364
+ who = FROM
365
+ value = 50
366
+ }
367
+ FROM = {
368
+ NOT = { stability = 2 }
369
+ }
370
+ NOT = { is_rival = FROM }
371
+ NOT = { is_enemy = FROM }
372
+ trust = {
373
+ who = FROM
374
+ value = 65
375
+ }
376
+ }
377
+ }
378
+
379
+ # Fabricate Ottoman Campaign of Conquest cb
380
+ fabricate_ottoman_invasion_cb = {
381
+ category = covert
382
+
383
+ require_acceptance = no
384
+
385
+ is_visible = {
386
+ has_government_attribute = has_eyalets
387
+ }
388
+ is_allowed = {
389
+ if = {
390
+ limit = {
391
+ FROM = { total_development = 150 }
392
+ }
393
+ custom_trigger_tooltip = {
394
+ tooltip = FROM_HAS_NOT_150_TOTAL_DEV
395
+ FROM = { NOT = { total_development = 150 } }
396
+ }
397
+ }
398
+ if = {
399
+ limit = {
400
+ NOT = {
401
+ has_spy_network_in = {
402
+ who = FROM
403
+ value = 30
404
+ }
405
+ }
406
+ NOT = { full_idea_group = spy_ideas }
407
+ }
408
+ custom_trigger_tooltip = {
409
+ tooltip = REQUIRES_30_SPY_NETWORK_TT
410
+ has_spy_network_in = {
411
+ who = FROM
412
+ value = 30
413
+ }
414
+ }
415
+ }
416
+ if = {
417
+ limit = {
418
+ NOT = {
419
+ has_spy_network_in = {
420
+ who = FROM
421
+ value = 24
422
+ }
423
+ }
424
+ full_idea_group = spy_ideas
425
+ }
426
+ custom_trigger_tooltip = {
427
+ tooltip = REQUIRES_24_SPY_NETWORK_TT
428
+ has_spy_network_in = {
429
+ who = FROM
430
+ value = 24
431
+ }
432
+ }
433
+ }
434
+ if = {
435
+ limit = {
436
+ has_casus_belli = {
437
+ type = cb_ottoman_subjugation_war
438
+ target = FROM
439
+ }
440
+ }
441
+ custom_trigger_tooltip = {
442
+ tooltip = HAS_OTTOMAN_INVASION_CB_ALREADY_TT
443
+ NOT = {
444
+ has_casus_belli = {
445
+ type = cb_ottoman_subjugation_war
446
+ target = FROM
447
+ }
448
+ }
449
+ }
450
+ }
451
+ if = {
452
+ limit = {
453
+ FROM = { is_subject = yes }
454
+ }
455
+ custom_trigger_tooltip = {
456
+ tooltip = CANNOT_DO_ACTION_TO_SUBJECTS_TT
457
+ FROM = { is_subject = no }
458
+ }
459
+ }
460
+ if = {
461
+ limit = {
462
+ NOT = { is_neighbor_of = FROM }
463
+ }
464
+ custom_trigger_tooltip = {
465
+ tooltip = FROM_MUST_BE_NEIGHBOR_TT
466
+ is_neighbor_of = FROM
467
+ }
468
+ }
469
+ }
470
+ on_accept = {
471
+ if = {
472
+ limit = {
473
+ full_idea_group = spy_ideas
474
+ }
475
+ add_spy_network_in = {
476
+ who = FROM
477
+ value = -24
478
+ }
479
+ }
480
+ else = {
481
+ add_spy_network_in = {
482
+ who = FROM
483
+ value = -30
484
+ }
485
+ }
486
+ add_casus_belli = {
487
+ target = FROM
488
+ type = cb_ottoman_subjugation_war
489
+ months = 60
490
+ }
491
+ FROM = {
492
+ set_country_flag = got_invasion_cb_fabricated_by_@ROOT
493
+ }
494
+ }
495
+ on_decline = {
496
+ }
497
+
498
+ ai_will_do = { # this is a trigger
499
+ has_spy_network_in = {
500
+ who = FROM
501
+ value = 50
502
+ }
503
+ }
504
+ }
505
+
506
+ # Elevate Eyalet to Vassal status
507
+ reign_in_eyalet = {
508
+ category = influence
509
+
510
+ alert_index = 5
511
+ alert_tooltip = reign_in_eyalet_alert_tooltip
512
+
513
+ require_acceptance = yes
514
+
515
+ is_visible = {
516
+ has_government_attribute = has_eyalets
517
+ FROM = {
518
+ is_subject_of = ROOT
519
+ is_subject_of_type = eyalet
520
+ }
521
+ }
522
+ is_allowed = {
523
+ if = {
524
+ limit = {
525
+ FROM = { liberty_desire = 50 }
526
+ }
527
+ custom_trigger_tooltip = {
528
+ tooltip = FROM_IS_REBELLIOUS_TT
529
+ FROM = { liberty_desire = 50 }
530
+ }
531
+ }
532
+ }
533
+ on_accept = {
534
+ create_subject = {
535
+ subject_type = core_eyalet
536
+ subject = FROM
537
+ keep_liberty_desire = yes
538
+ }
539
+ }
540
+ on_decline = {
541
+ }
542
+
543
+ ai_will_do = { # this is a trigger
544
+ always = yes #There is never a reason for the Ottomans to not want to integrate their eyalets
545
+ }
546
+
547
+ ai_acceptance = {
548
+ add_entry = {
549
+ name = DIPLO_OPPINION
550
+ export_to_variable = {
551
+ variable_name = ai_value
552
+ value = opinion
553
+ who = FROM
554
+ with = ROOT
555
+ }
556
+ multiply_variable = {
557
+ which = ai_value
558
+ value = 0.2
559
+ }
560
+ }
561
+ add_entry = {
562
+ name = AI_TRUST_TOWARDS_ROOT
563
+ export_to_variable = {
564
+ variable_name = ai_value
565
+ value = trust
566
+ who = FROM
567
+ with = ROOT
568
+ }
569
+ subtract_variable = {
570
+ which = ai_value
571
+ value = 50
572
+ }
573
+ #1 trust = +4 ai points
574
+ multiply_variable = {
575
+ which = ai_value
576
+ value = 0.4
577
+ }
578
+ }
579
+ add_entry = {
580
+ name = AI_DIPLOMATIC_REPUTATION
581
+ export_to_variable = {
582
+ variable_name = ai_value
583
+ value = trigger_value:diplomatic_reputation
584
+ }
585
+ #1 rep = 4
586
+ multiply_variable = {
587
+ which = ai_value
588
+ value = 4
589
+ }
590
+ }
591
+ add_entry = {
592
+ name = AI_TOTAL_DEVELOPMENT
593
+ export_to_variable = {
594
+ variable_name = ai_value
595
+ value = total_development
596
+ who = FROM
597
+ }
598
+ #4 dev = -1
599
+ multiply_variable = {
600
+ which = ai_value
601
+ value = -0.25
602
+ }
603
+ }
604
+ add_entry = {
605
+ name = HAS_BONUS_REIGN_IN_REASON
606
+ limit = {
607
+ has_country_flag = tur_reduced_requirements_for_core_eyalet
608
+ }
609
+ export_to_variable = {
610
+ variable_name = ai_value
611
+ value = 1
612
+ }
613
+ multiply_variable = {
614
+ which = ai_value
615
+ value = 20
616
+ }
617
+ }
618
+ add_entry = {
619
+ name = AI_LIBERTY_DESIRE
620
+ export_to_variable = {
621
+ variable_name = ai_value
622
+ value = liberty_desire
623
+ who = FROM
624
+ }
625
+ multiply_variable = {
626
+ which = ai_value
627
+ value = -1
628
+ }
629
+ }
630
+ }
631
+ }
632
+
633
+ # Call Eyalet into wars
634
+ call_eyalet_into_wars = {
635
+ category = influence
636
+
637
+ require_acceptance = no
638
+
639
+ is_visible = {
640
+ has_government_attribute = has_eyalets
641
+ FROM = {
642
+ is_subject_of = ROOT
643
+ is_subject_of_type = eyalet
644
+ }
645
+ }
646
+ is_allowed = {
647
+ if = {
648
+ limit = {
649
+ FROM = { liberty_desire = 50 }
650
+ }
651
+ custom_trigger_tooltip = {
652
+ tooltip = FROM_IS_REBELLIOUS_TT
653
+ FROM = { liberty_desire = 50 }
654
+ }
655
+ }
656
+ if = {
657
+ limit = {
658
+ is_at_war = no
659
+ }
660
+ custom_trigger_tooltip = {
661
+ tooltip = ROOT_IS_NOT_AT_WAR_TT
662
+ is_at_war = yes
663
+ }
664
+ }
665
+ if = {
666
+ limit = {
667
+ FROM = {
668
+ NOT = {
669
+ owes_favors = {
670
+ who = ROOT
671
+ value = 10
672
+ }
673
+ }
674
+ }
675
+ is_in_war = {
676
+ defender_leader = ROOT
677
+ }
678
+ }
679
+ custom_trigger_tooltip = {
680
+ tooltip = FROM_MUST_OWE_10_FAVORS_DEFENSIVE_WAR_TT
681
+ FROM = {
682
+ owes_favors = {
683
+ who = ROOT
684
+ value = 10
685
+ }
686
+ }
687
+ }
688
+ }
689
+ if = {
690
+ limit = {
691
+ FROM = {
692
+ NOT = {
693
+ owes_favors = {
694
+ who = ROOT
695
+ value = 20
696
+ }
697
+ }
698
+ }
699
+ NOT = {
700
+ is_in_war = {
701
+ defender_leader = ROOT
702
+ }
703
+ }
704
+ }
705
+ custom_trigger_tooltip = {
706
+ tooltip = FROM_MUST_OWE_20_FAVORS_TT
707
+ FROM = {
708
+ owes_favors = {
709
+ who = ROOT
710
+ value = 20
711
+ }
712
+ }
713
+ }
714
+ }
715
+ if = {
716
+ limit = {
717
+ FROM = { is_at_war = yes }
718
+ }
719
+ custom_trigger_tooltip = {
720
+ tooltip = FROM_IS_AT_WAR_TT
721
+ FROM = { is_at_war = no }
722
+ }
723
+ }
724
+ }
725
+ on_accept = {
726
+ FROM = {
727
+ ROOT = {
728
+ add_favors = {
729
+ who = PREV
730
+ amount = -10
731
+ }
732
+ }
733
+ join_all_defensive_wars_of = ROOT
734
+ }
735
+ if = {
736
+ limit = {
737
+ FROM = {
738
+ owes_favors = {
739
+ who = ROOT
740
+ value = 10
741
+ }
742
+ }
743
+ }
744
+ FROM = {
745
+ ROOT = {
746
+ add_favors = {
747
+ who = PREV
748
+ amount = -10
749
+ }
750
+ }
751
+ join_all_offensive_wars_of = ROOT
752
+ }
753
+ }
754
+ }
755
+ on_decline = {
756
+ }
757
+
758
+ ai_will_do = { # this is a trigger
759
+ always = yes
760
+ }
761
+ }
762
+
763
+ fabricate_tributary_cb = {
764
+ category = covert
765
+
766
+ require_acceptance = no
767
+
768
+ is_visible = {
769
+ has_country_flag = jap_enable_fabricating_trib_CB_flag
770
+ }
771
+ is_allowed = {
772
+ if = {
773
+ limit = {
774
+ NOT = {
775
+ has_spy_network_in = {
776
+ who = FROM
777
+ value = 100
778
+ }
779
+ }
780
+ NOT = { full_idea_group = spy_ideas }
781
+ }
782
+ custom_trigger_tooltip = {
783
+ tooltip = REQUIRES_100_SPY_NETWORK_TT
784
+ has_spy_network_in = {
785
+ who = FROM
786
+ value = 100
787
+ }
788
+ }
789
+ }
790
+ if = {
791
+ limit = {
792
+ NOT = {
793
+ has_spy_network_in = {
794
+ who = FROM
795
+ value = 80
796
+ }
797
+ }
798
+ full_idea_group = spy_ideas
799
+ }
800
+ custom_trigger_tooltip = {
801
+ tooltip = REQUIRES_100_SPY_NETWORK_TT
802
+ has_spy_network_in = {
803
+ who = FROM
804
+ value = 80
805
+ }
806
+ }
807
+ }
808
+ if = {
809
+ limit = {
810
+ has_casus_belli = {
811
+ type = cb_force_tributary_mission
812
+ target = FROM
813
+ }
814
+ }
815
+ custom_trigger_tooltip = {
816
+ tooltip = has_force_trib_cb_already_tt
817
+ NOT = {
818
+ has_casus_belli = {
819
+ type = cb_force_tributary_mission
820
+ target = FROM
821
+ }
822
+ }
823
+ }
824
+ }
825
+ if = {
826
+ limit = {
827
+ FROM = { is_subject = yes }
828
+ }
829
+ custom_trigger_tooltip = {
830
+ tooltip = CANNOT_DO_ACTION_TO_SUBJECTS_TT
831
+ FROM = { is_subject = no }
832
+ }
833
+ }
834
+ if = {
835
+ limit = {
836
+ NOT = { total_development = FROM }
837
+ }
838
+ custom_trigger_tooltip = {
839
+ tooltip = we_need_more_dev_tt
840
+ total_development = FROM
841
+ }
842
+ }
843
+ }
844
+ on_accept = {
845
+ if = {
846
+ limit = {
847
+ full_idea_group = spy_ideas
848
+ }
849
+ add_spy_network_in = {
850
+ who = FROM
851
+ value = -80
852
+ }
853
+ }
854
+ else = {
855
+ add_spy_network_in = {
856
+ who = FROM
857
+ value = -100
858
+ }
859
+ }
860
+ add_casus_belli = {
861
+ target = FROM
862
+ type = cb_force_tributary_mission
863
+ months = 60
864
+ }
865
+ }
866
+ on_decline = {
867
+ }
868
+
869
+ ai_will_do = { # this is a trigger
870
+ has_spy_network_in = {
871
+ who = FROM
872
+ value = 100
873
+ }
874
+ }
875
+ }
876
+
877
+ offer_protectorate = {
878
+ category = influence
879
+ require_acceptance = yes
880
+
881
+ alert_index = 4
882
+ alert_tooltip = offer_protectorate_alert_tooltip
883
+
884
+ is_visible = {
885
+ has_government_attribute = can_establish_trade_protectorates
886
+ is_subject = no
887
+ FROM = { is_subject = no }
888
+ }
889
+ is_allowed = {
890
+ if = {
891
+ limit = {
892
+ NOT = {
893
+ FROM = {
894
+ capital_scope = {
895
+ trade_range = ROOT
896
+ }
897
+ }
898
+ }
899
+ }
900
+ custom_trigger_tooltip = {
901
+ tooltip = REQUIRES_CAPITAL_IN_TRADE_RANGE_TT
902
+ FROM = {
903
+ capital_scope = {
904
+ trade_range = ROOT
905
+ }
906
+ }
907
+ }
908
+ }
909
+ if = {
910
+ limit = {
911
+ FROM = { is_at_war = yes }
912
+ }
913
+ custom_trigger_tooltip = {
914
+ tooltip = FROM_IS_AT_WAR_TT
915
+ FROM = { is_at_war = no }
916
+ }
917
+ }
918
+ if = {
919
+ limit = {
920
+ is_at_war = yes
921
+ }
922
+ custom_trigger_tooltip = {
923
+ tooltip = ROOT_IS_AT_WAR_TT
924
+ is_at_war = no
925
+ }
926
+ }
927
+ if = {
928
+ limit = {
929
+ FROM = {
930
+ OR = {
931
+ has_reform = steppe_horde
932
+ has_reform = great_mongol_state_reform
933
+ }
934
+ }
935
+ }
936
+ custom_trigger_tooltip = {
937
+ tooltip = FROM_IS_A_HORDE_TT
938
+ FROM = {
939
+ NOT = { has_reform = steppe_horde }
940
+ NOT = { has_reform = great_mongol_state_reform }
941
+ }
942
+ }
943
+ }
944
+ if = {
945
+ limit = {
946
+ FROM = {
947
+ same_continent = ROOT
948
+ }
949
+ }
950
+ custom_trigger_tooltip = {
951
+ tooltip = FROM_IS_ON_ROOT_CONTINENT_TT
952
+ FROM = {
953
+ NOT = { same_continent = ROOT }
954
+ }
955
+ }
956
+ }
957
+ }
958
+ on_accept = {
959
+ create_subject = {
960
+ subject_type = trade_protectorate
961
+ subject = FROM
962
+ }
963
+ }
964
+ on_decline = {
965
+ }
966
+
967
+ ai_will_do = { # this is a trigger
968
+ OR = {
969
+ ai_attitude = {
970
+ who = FROM
971
+ attitude = attitude_friendly
972
+ }
973
+ ai_attitude = {
974
+ who = FROM
975
+ attitude = attitude_protective
976
+ }
977
+ FROM = {
978
+ any_neighbor_country = {
979
+ NOT = { tag = ROOT }
980
+ FROM = {
981
+ ai_attitude = {
982
+ who = PREV
983
+ attitude = attitude_threatened
984
+ }
985
+ }
986
+ }
987
+ }
988
+ FROM = {
989
+ ai_attitude = {
990
+ who = ROOT
991
+ attitude = attitude_threatened
992
+ }
993
+ }
994
+ }
995
+ NOT = {
996
+ ai_attitude = {
997
+ who = FROM
998
+ attitude = attitude_domineering
999
+ }
1000
+ }
1001
+ NOT = {
1002
+ ai_attitude = {
1003
+ who = FROM
1004
+ attitude = attitude_hostile
1005
+ }
1006
+ }
1007
+ NOT = {
1008
+ ai_attitude = {
1009
+ who = FROM
1010
+ attitude = attitude_outraged
1011
+ }
1012
+ }
1013
+ has_opinion = {
1014
+ who = FROM
1015
+ value = 50
1016
+ }
1017
+ NOT = {
1018
+ FROM = {
1019
+ has_country_modifier = dissolve_protectorate_timer
1020
+ }
1021
+ }
1022
+ }
1023
+
1024
+ ai_acceptance = {
1025
+ add_entry = {
1026
+ name = DIPLO_OPPINION
1027
+ export_to_variable = {
1028
+ variable_name = ai_value
1029
+ value = opinion
1030
+ who = FROM
1031
+ with = ROOT
1032
+ }
1033
+ multiply_variable = {
1034
+ which = ai_value
1035
+ value = 0.125
1036
+ }
1037
+ }
1038
+ add_entry = {
1039
+ name = AI_TRUST_TOWARDS_ROOT
1040
+ export_to_variable = {
1041
+ variable_name = ai_value
1042
+ value = trust
1043
+ who = FROM
1044
+ with = ROOT
1045
+ }
1046
+ subtract_variable = {
1047
+ which = ai_value
1048
+ value = 50
1049
+ }
1050
+ #1 trust = +4 ai points
1051
+ multiply_variable = {
1052
+ which = ai_value
1053
+ value = 0.4
1054
+ }
1055
+ }
1056
+ add_entry = {
1057
+ name = AI_DIPLOMATIC_REPUTATION
1058
+ export_to_variable = {
1059
+ variable_name = ai_value
1060
+ value = trigger_value:diplomatic_reputation
1061
+ }
1062
+ #1 rep = 3
1063
+ multiply_variable = {
1064
+ which = ai_value
1065
+ value = 3
1066
+ }
1067
+ }
1068
+ add_entry = {
1069
+ name = AI_TOTAL_DEVELOPMENT
1070
+ export_to_variable = {
1071
+ variable_name = ai_value
1072
+ value = total_development
1073
+ who = FROM
1074
+ }
1075
+ #4 dev = -1
1076
+ multiply_variable = {
1077
+ which = ai_value
1078
+ value = -0.25
1079
+ }
1080
+ }
1081
+ add_entry = {
1082
+ name = DIPLO_HAS_AI_HAS_OWN_SUBJECTS_TT
1083
+ limit = {
1084
+ FROM = { num_of_subjects = 1 }
1085
+ }
1086
+ export_to_variable = {
1087
+ variable_name = ai_value
1088
+ value = 1
1089
+ }
1090
+ multiply_variable = {
1091
+ which = ai_value
1092
+ value = -1000
1093
+ }
1094
+ }
1095
+ add_entry = {
1096
+ name = attitude_neutral_DIPLO_ATTITUDE_TT
1097
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_neutral } } }
1098
+ export_to_variable = { variable_name = ai_value value = 1 }
1099
+ multiply_variable = { which = ai_value value = -20 }
1100
+ }
1101
+ add_entry = {
1102
+ name = attitude_rivalry_DIPLO_ATTITUDE_TT
1103
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_rivalry } } }
1104
+ export_to_variable = { variable_name = ai_value value = 1 }
1105
+ multiply_variable = { which = ai_value value = -1000 }
1106
+ }
1107
+ add_entry = {
1108
+ name = attitude_hostile_DIPLO_ATTITUDE_TT
1109
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_hostile } } }
1110
+ export_to_variable = { variable_name = ai_value value = 1 }
1111
+ multiply_variable = { which = ai_value value = -1000 }
1112
+ }
1113
+ add_entry = {
1114
+ name = attitude_friendly_DIPLO_ATTITUDE_TT
1115
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_friendly } } }
1116
+ export_to_variable = { variable_name = ai_value value = 1 }
1117
+ multiply_variable = { which = ai_value value = 10 }
1118
+ }
1119
+ add_entry = {
1120
+ name = attitude_threatened_DIPLO_ATTITUDE_TT
1121
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_threatened } } }
1122
+ export_to_variable = { variable_name = ai_value value = 1 }
1123
+ multiply_variable = { which = ai_value value = 10 }
1124
+ }
1125
+ add_entry = {
1126
+ name = attitude_outraged_DIPLO_ATTITUDE_TT
1127
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_outraged } } }
1128
+ export_to_variable = { variable_name = ai_value value = 1 }
1129
+ multiply_variable = { which = ai_value value = -1000 }
1130
+ }
1131
+ add_entry = {
1132
+ name = attitude_domineering_DIPLO_ATTITUDE_TT
1133
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_domineering } } }
1134
+ export_to_variable = { variable_name = ai_value value = 1 }
1135
+ multiply_variable = { which = ai_value value = -1000 }
1136
+ }
1137
+ add_entry = {
1138
+ name = DIPLO_BORDER_DISTANCE_TT
1139
+ export_to_variable = {
1140
+ variable_name = ai_value
1141
+ value = border_distance
1142
+ who = FROM
1143
+ with = ROOT
1144
+ }
1145
+ #2 units = -1
1146
+ multiply_variable = {
1147
+ which = ai_value
1148
+ value = -0.5
1149
+ }
1150
+ }
1151
+ }
1152
+ }
1153
+
1154
+ dissolve_protectorate = {
1155
+ category = influence
1156
+ require_acceptance = no
1157
+
1158
+ is_visible = {
1159
+ OR = {
1160
+ AND = {
1161
+ is_subject_of = FROM
1162
+ is_subject_of_type = trade_protectorate
1163
+ }
1164
+ FROM = {
1165
+ is_subject_of = ROOT
1166
+ is_subject_of_type = trade_protectorate
1167
+ }
1168
+ }
1169
+ }
1170
+ is_allowed = {
1171
+ }
1172
+ on_accept = {
1173
+ if = {
1174
+ limit = {
1175
+ is_subject_of = FROM
1176
+ is_subject_of_type = trade_protectorate
1177
+ }
1178
+ grant_independence = yes
1179
+ }
1180
+ else = {
1181
+ FROM = {
1182
+ grant_independence = yes
1183
+ }
1184
+ }
1185
+ if = {
1186
+ limit = {
1187
+ is_subject_of = FROM
1188
+ is_subject_of_type = trade_protectorate
1189
+ NOT = { liberty_desire = 100 }
1190
+ }
1191
+ if = {
1192
+ limit = {
1193
+ has_stab_reduction_from_dip_action_modifier = yes
1194
+ }
1195
+ add_prestige = -1
1196
+ }
1197
+ else = {
1198
+ add_stability = -1
1199
+ }
1200
+ add_country_modifier = {
1201
+ name = dissolve_protectorate_timer
1202
+ duration = 3650
1203
+ hidden = yes
1204
+ }
1205
+ }
1206
+ else_if = {
1207
+ limit = {
1208
+ FROM = {
1209
+ NOT = { liberty_desire = 100 }
1210
+ }
1211
+ }
1212
+ if = {
1213
+ limit = {
1214
+ has_stab_reduction_from_dip_action_modifier = yes
1215
+ }
1216
+ add_prestige = -1
1217
+ }
1218
+ else = {
1219
+ add_stability = -1
1220
+ }
1221
+ FROM = {
1222
+ add_country_modifier = {
1223
+ name = dissolve_protectorate_timer
1224
+ duration = 3650
1225
+ hidden = yes
1226
+ }
1227
+ }
1228
+ }
1229
+ }
1230
+ on_decline = {
1231
+ }
1232
+
1233
+ ai_will_do = { # Overlords will never want to break the relationship
1234
+ is_subject_of = FROM
1235
+ OR = {
1236
+ liberty_desire = 100
1237
+ AND = {
1238
+ stability = 1
1239
+ liberty_desire = 90
1240
+ NOT = {
1241
+ has_opinion = {
1242
+ who = ROOT
1243
+ value = -50
1244
+ }
1245
+ }
1246
+ }
1247
+ AND = {
1248
+ stability = 1
1249
+ liberty_desire = 80
1250
+ NOT = {
1251
+ has_opinion = {
1252
+ who = ROOT
1253
+ value = -100
1254
+ }
1255
+ }
1256
+ }
1257
+ AND = {
1258
+ stability = 1
1259
+ liberty_desire = 70
1260
+ NOT = {
1261
+ has_opinion = {
1262
+ who = ROOT
1263
+ value = -150
1264
+ }
1265
+ }
1266
+ }
1267
+ AND = {
1268
+ stability = 1
1269
+ liberty_desire = 60
1270
+ NOT = {
1271
+ has_opinion = {
1272
+ who = ROOT
1273
+ value = -199
1274
+ }
1275
+ }
1276
+ }
1277
+ }
1278
+ NOT = {
1279
+ any_neighbor_country = {
1280
+ ROOT = {
1281
+ ai_attitude = {
1282
+ who = PREV
1283
+ attitude = attitude_threatened
1284
+ }
1285
+ }
1286
+ }
1287
+ }
1288
+ }
1289
+ }
1290
+
1291
+ request_protectorate = {
1292
+ category = influence
1293
+ require_acceptance = yes
1294
+
1295
+ alert_index = 4
1296
+ alert_tooltip = request_protectorate_alert_tooltip
1297
+
1298
+ is_visible = {
1299
+ FROM = { has_government_attribute = can_establish_trade_protectorates }
1300
+ is_subject = no
1301
+ FROM = { is_subject = no }
1302
+ NOT = { has_reform = steppe_horde }
1303
+ NOT = { has_reform = great_mongol_state_reform }
1304
+ }
1305
+ is_allowed = {
1306
+ if = {
1307
+ limit = {
1308
+ NOT = {
1309
+ capital_scope = {
1310
+ trade_range = FROM
1311
+ }
1312
+ }
1313
+ }
1314
+ custom_trigger_tooltip = {
1315
+ tooltip = REQUIRES_FROM_TO_BE_IN_TRADE_RANGE_TT
1316
+ capital_scope = {
1317
+ trade_range = FROM
1318
+ }
1319
+ }
1320
+ }
1321
+ if = {
1322
+ limit = {
1323
+ FROM = { is_at_war = yes }
1324
+ }
1325
+ custom_trigger_tooltip = {
1326
+ tooltip = FROM_IS_AT_WAR_TT
1327
+ FROM = { is_at_war = no }
1328
+ }
1329
+ }
1330
+ if = {
1331
+ limit = {
1332
+ is_at_war = yes
1333
+ }
1334
+ custom_trigger_tooltip = {
1335
+ tooltip = ROOT_IS_AT_WAR_TT
1336
+ is_at_war = no
1337
+ }
1338
+ }
1339
+ if = {
1340
+ limit = {
1341
+ FROM = {
1342
+ same_continent = ROOT
1343
+ }
1344
+ }
1345
+ custom_trigger_tooltip = {
1346
+ tooltip = FROM_IS_ON_ROOT_CONTINENT_TT
1347
+ FROM = {
1348
+ NOT = { same_continent = ROOT }
1349
+ }
1350
+ }
1351
+ }
1352
+ }
1353
+ on_accept = {
1354
+ every_subject_country = {
1355
+ limit = {
1356
+ NOT = { is_subject_of_type = colony }
1357
+ NOT = { is_subject_of_type = crown_colony }
1358
+ NOT = { is_subject_of_type = private_enterprise }
1359
+ NOT = { is_subject_of_type = self_governing_colony }
1360
+ }
1361
+ ROOT = {
1362
+ release = PREV
1363
+ }
1364
+ }
1365
+ FROM = {
1366
+ create_subject = {
1367
+ subject_type = trade_protectorate
1368
+ subject = ROOT
1369
+ }
1370
+ }
1371
+ }
1372
+ on_decline = {
1373
+ }
1374
+
1375
+ ai_will_do = { # this is a trigger
1376
+ OR = {
1377
+ ai_attitude = {
1378
+ who = FROM
1379
+ attitude = attitude_threatened
1380
+ }
1381
+ any_neighbor_country = {
1382
+ NOT = { tag = FROM }
1383
+ ROOT = {
1384
+ ai_attitude = {
1385
+ who = PREV
1386
+ attitude = attitude_threatened
1387
+ }
1388
+ }
1389
+ }
1390
+ FROM = {
1391
+ OR = {
1392
+ ai_attitude = {
1393
+ who = ROOT
1394
+ attitude = attitude_domineering
1395
+ }
1396
+ ai_attitude = {
1397
+ who = ROOT
1398
+ attitude = attitude_protective
1399
+ }
1400
+ }
1401
+ }
1402
+ }
1403
+ NOT = { mil_tech = FROM }
1404
+ OR = {
1405
+ NOT = { army_size = FROM }
1406
+ AND = {
1407
+ capital_scope = { is_island = yes }
1408
+ NOT = { navy_size = FROM }
1409
+ }
1410
+ FROM = {
1411
+ military_strength = {
1412
+ who = ROOT
1413
+ value = 2
1414
+ }
1415
+ }
1416
+ }
1417
+ NOT = { has_country_modifier = dissolve_protectorate_timer }
1418
+ NOT = {
1419
+ ai_attitude = {
1420
+ who = FROM
1421
+ attitude = attitude_rivalry
1422
+ }
1423
+ }
1424
+ NOT = {
1425
+ ai_attitude = {
1426
+ who = FROM
1427
+ attitude = attitude_hostile
1428
+ }
1429
+ }
1430
+ NOT = {
1431
+ ai_attitude = {
1432
+ who = FROM
1433
+ attitude = attitude_outraged
1434
+ }
1435
+ }
1436
+ NOT = {
1437
+ ai_attitude = {
1438
+ who = FROM
1439
+ attitude = attitude_domineering
1440
+ }
1441
+ }
1442
+ }
1443
+
1444
+ ai_acceptance = {
1445
+ add_entry = {
1446
+ name = DIPLO_OPPINION
1447
+ export_to_variable = {
1448
+ variable_name = ai_value
1449
+ value = opinion
1450
+ who = FROM
1451
+ with = ROOT
1452
+ }
1453
+ multiply_variable = {
1454
+ which = ai_value
1455
+ value = 0.125
1456
+ }
1457
+ }
1458
+ add_entry = {
1459
+ name = AI_TRUST_TOWARDS_ROOT
1460
+ export_to_variable = {
1461
+ variable_name = ai_value
1462
+ value = trust
1463
+ who = FROM
1464
+ with = ROOT
1465
+ }
1466
+ subtract_variable = {
1467
+ which = ai_value
1468
+ value = 50
1469
+ }
1470
+ #1 trust = +4 ai points
1471
+ multiply_variable = {
1472
+ which = ai_value
1473
+ value = 0.4
1474
+ }
1475
+ }
1476
+ add_entry = {
1477
+ name = AI_DIPLOMATIC_REPUTATION
1478
+ export_to_variable = {
1479
+ variable_name = ai_value
1480
+ value = trigger_value:diplomatic_reputation
1481
+ }
1482
+ #1 rep = 3
1483
+ multiply_variable = {
1484
+ which = ai_value
1485
+ value = 3
1486
+ }
1487
+ }
1488
+ add_entry = {
1489
+ name = DIPLO_OUR_TOTAL_DEVELOPMENT_TT
1490
+ export_to_variable = {
1491
+ variable_name = ai_value
1492
+ value = total_development
1493
+ who = ROOT
1494
+ }
1495
+ #10 dev = -1
1496
+ multiply_variable = {
1497
+ which = ai_value
1498
+ value = -0.1
1499
+ }
1500
+ }
1501
+ add_entry = {
1502
+ name = attitude_neutral_DIPLO_ATTITUDE_TT
1503
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_neutral } } }
1504
+ export_to_variable = { variable_name = ai_value value = 1 }
1505
+ multiply_variable = { which = ai_value value = -20 }
1506
+ }
1507
+ add_entry = {
1508
+ name = attitude_rivalry_DIPLO_ATTITUDE_TT
1509
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_rivalry } } }
1510
+ export_to_variable = { variable_name = ai_value value = 1 }
1511
+ multiply_variable = { which = ai_value value = -1000 }
1512
+ }
1513
+ add_entry = {
1514
+ name = attitude_hostile_DIPLO_ATTITUDE_TT
1515
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_hostile } } }
1516
+ export_to_variable = { variable_name = ai_value value = 1 }
1517
+ multiply_variable = { which = ai_value value = -1000 }
1518
+ }
1519
+ add_entry = {
1520
+ name = attitude_friendly_DIPLO_ATTITUDE_TT
1521
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_friendly } } }
1522
+ export_to_variable = { variable_name = ai_value value = 1 }
1523
+ multiply_variable = { which = ai_value value = 50 }
1524
+ }
1525
+ add_entry = {
1526
+ name = attitude_outraged_DIPLO_ATTITUDE_TT
1527
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_outraged } } }
1528
+ export_to_variable = { variable_name = ai_value value = 1 }
1529
+ multiply_variable = { which = ai_value value = -1000 }
1530
+ }
1531
+ add_entry = {
1532
+ name = attitude_domineering_DIPLO_ATTITUDE_TT
1533
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_domineering } } }
1534
+ export_to_variable = { variable_name = ai_value value = 1 }
1535
+ multiply_variable = { which = ai_value value = 1000 }
1536
+ }
1537
+ add_entry = {
1538
+ name = attitude_protective_DIPLO_ATTITUDE_TT
1539
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_protective } } }
1540
+ export_to_variable = { variable_name = ai_value value = 1 }
1541
+ multiply_variable = { which = ai_value value = 1000 }
1542
+ }
1543
+ add_entry = {
1544
+ name = DIPLO_BORDER_DISTANCE_TT
1545
+ export_to_variable = {
1546
+ variable_name = ai_value
1547
+ value = border_distance
1548
+ who = FROM
1549
+ with = ROOT
1550
+ }
1551
+ #2 units = -1
1552
+ multiply_variable = {
1553
+ which = ai_value
1554
+ value = -0.5
1555
+ }
1556
+ }
1557
+ }
1558
+ }
1559
+
1560
+ # Call Protectorate into wars
1561
+ call_trade_protectorate_into_wars = {
1562
+ category = influence
1563
+
1564
+ require_acceptance = no
1565
+
1566
+ is_visible = {
1567
+ FROM = {
1568
+ is_subject_of = ROOT
1569
+ is_subject_of_type = trade_protectorate
1570
+ }
1571
+ }
1572
+ is_allowed = {
1573
+ if = {
1574
+ limit = {
1575
+ FROM = { liberty_desire = 50 }
1576
+ }
1577
+ custom_trigger_tooltip = {
1578
+ tooltip = FROM_IS_REBELLIOUS_TT
1579
+ FROM = { liberty_desire = 50 }
1580
+ }
1581
+ }
1582
+ if = {
1583
+ limit = {
1584
+ is_at_war = no
1585
+ }
1586
+ custom_trigger_tooltip = {
1587
+ tooltip = ROOT_IS_NOT_AT_WAR_TT
1588
+ is_at_war = yes
1589
+ }
1590
+ }
1591
+ if = {
1592
+ limit = {
1593
+ FROM = {
1594
+ NOT = {
1595
+ has_opinion = {
1596
+ who = ROOT
1597
+ value = 0
1598
+ }
1599
+ }
1600
+ }
1601
+ }
1602
+ custom_trigger_tooltip = {
1603
+ tooltip = FROM_MUST_HAVE_POSITIVE_OPINION_TT
1604
+ FROM = {
1605
+ has_opinion = {
1606
+ who = ROOT
1607
+ value = 0
1608
+ }
1609
+ }
1610
+ }
1611
+ }
1612
+ if = {
1613
+ limit = {
1614
+ FROM = { is_at_war = yes }
1615
+ }
1616
+ custom_trigger_tooltip = {
1617
+ tooltip = FROM_IS_AT_WAR_TT
1618
+ FROM = { is_at_war = no }
1619
+ }
1620
+ }
1621
+ }
1622
+ on_accept = {
1623
+ FROM = {
1624
+ add_opinion = {
1625
+ who = ROOT
1626
+ modifier = trade_protectorate_called_into_war
1627
+ }
1628
+ join_all_defensive_wars_of = ROOT
1629
+ }
1630
+ if = {
1631
+ limit = {
1632
+ is_in_war = { attackers = ROOT }
1633
+ }
1634
+ FROM = {
1635
+ add_opinion = {
1636
+ who = ROOT
1637
+ modifier = trade_protectorate_called_into_war
1638
+ }
1639
+ join_all_offensive_wars_of = ROOT
1640
+ }
1641
+ }
1642
+ }
1643
+ on_decline = {
1644
+ }
1645
+
1646
+ ai_will_do = { # this is a trigger
1647
+ always = yes
1648
+ }
1649
+ }
1650
+
1651
+ # Grant Autonomy to Core Eyalet
1652
+ grant_autonomy_to_core_eyalet = {
1653
+ category = influence
1654
+
1655
+ require_acceptance = no
1656
+
1657
+ is_visible = {
1658
+ has_government_attribute = has_eyalets
1659
+ FROM = {
1660
+ is_subject_of = ROOT
1661
+ is_subject_of_type = core_eyalet
1662
+ }
1663
+ }
1664
+ is_allowed = {
1665
+ if = {
1666
+ limit = {
1667
+ FROM = { liberty_desire = 50 }
1668
+ }
1669
+ custom_trigger_tooltip = {
1670
+ tooltip = FROM_IS_REBELLIOUS_TT
1671
+ FROM = { liberty_desire = 50 }
1672
+ }
1673
+ }
1674
+ }
1675
+ on_accept = {
1676
+ create_subject = {
1677
+ subject_type = eyalet
1678
+ subject = FROM
1679
+ keep_liberty_desire = yes
1680
+ }
1681
+ }
1682
+ on_decline = {
1683
+ }
1684
+
1685
+ ai_will_do = { # this is a trigger
1686
+ always = no #AI should never want to have its eyalet to be less centralized
1687
+ }
1688
+ }
1689
+
1690
+ # Turn Eyalet to Vassal status
1691
+ promote_vassal_to_eyalet = {
1692
+ category = influence
1693
+
1694
+ require_acceptance = yes
1695
+
1696
+ alert_index = 6
1697
+ alert_tooltip = promote_vassal_to_eyalet_alert_tooltip
1698
+
1699
+ is_visible = {
1700
+ has_government_attribute = has_eyalets
1701
+ FROM = {
1702
+ is_subject_of = ROOT
1703
+ is_subject_of_type = vassal
1704
+ }
1705
+ }
1706
+ is_allowed = {
1707
+ if = {
1708
+ limit = {
1709
+ FROM = { liberty_desire = 50 }
1710
+ }
1711
+ custom_trigger_tooltip = {
1712
+ tooltip = FROM_IS_REBELLIOUS_TT
1713
+ FROM = { liberty_desire = 50 }
1714
+ }
1715
+ }
1716
+ }
1717
+ on_accept = {
1718
+ create_subject = {
1719
+ subject_type = eyalet
1720
+ subject = FROM
1721
+ keep_liberty_desire = yes
1722
+ }
1723
+ FROM = {
1724
+ if = {
1725
+ limit = {
1726
+ NOT = { has_reform = papacy_reform }
1727
+ NOT = { has_reform = celestial_empire }
1728
+ NOT = { has_reform = shogunate }
1729
+ }
1730
+ if = {
1731
+ limit = {
1732
+ OR = {
1733
+ culture_group = maghrebi
1734
+ has_reform = pirate_republic_reform
1735
+ }
1736
+ }
1737
+ set_country_flag = pirate_eyalet
1738
+ }
1739
+ if = {
1740
+ limit = { NOT = { government = monarchy } }
1741
+ change_government = monarchy
1742
+ }
1743
+ if = {
1744
+ limit = { has_country_flag = pirate_eyalet }
1745
+ clr_country_flag = pirate_eyalet
1746
+ add_government_reform = barbary_eyalet_government
1747
+ }
1748
+ else = {
1749
+ add_government_reform = eyalet_government
1750
+ }
1751
+ set_country_flag = has_eyalet_color
1752
+ set_country_flag = has_overriden_color_flag
1753
+ change_country_color = { country = ROOT }
1754
+ }
1755
+ }
1756
+ }
1757
+ on_decline = {
1758
+ }
1759
+
1760
+ ai_will_do = { # this is a trigger
1761
+ always = no #Too risky to test this out with the AI
1762
+ }
1763
+
1764
+ ai_acceptance = {
1765
+ add_entry = {
1766
+ name = DIPLO_OPPINION
1767
+ export_to_variable = {
1768
+ variable_name = ai_value
1769
+ value = opinion
1770
+ who = FROM
1771
+ with = ROOT
1772
+ }
1773
+ multiply_variable = {
1774
+ which = ai_value
1775
+ value = 0.2
1776
+ }
1777
+ }
1778
+ add_entry = {
1779
+ name = AI_TRUST_TOWARDS_ROOT
1780
+ export_to_variable = {
1781
+ variable_name = ai_value
1782
+ value = trust
1783
+ who = FROM
1784
+ with = ROOT
1785
+ }
1786
+ subtract_variable = {
1787
+ which = ai_value
1788
+ value = 50
1789
+ }
1790
+ #1 trust = +4 ai points
1791
+ multiply_variable = {
1792
+ which = ai_value
1793
+ value = 0.4
1794
+ }
1795
+ }
1796
+ add_entry = {
1797
+ name = AI_DIPLOMATIC_REPUTATION
1798
+ export_to_variable = {
1799
+ variable_name = ai_value
1800
+ value = trigger_value:diplomatic_reputation
1801
+ }
1802
+ #1 rep = 4
1803
+ multiply_variable = {
1804
+ which = ai_value
1805
+ value = 4
1806
+ }
1807
+ }
1808
+ add_entry = {
1809
+ name = AI_LIBERTY_DESIRE
1810
+ export_to_variable = {
1811
+ variable_name = ai_value
1812
+ value = liberty_desire
1813
+ who = FROM
1814
+ }
1815
+ multiply_variable = {
1816
+ which = ai_value
1817
+ value = -1
1818
+ }
1819
+ }
1820
+ }
1821
+ }
1822
+
1823
+ # Promote Appanage Heir
1824
+ promote_appanage_heir = {
1825
+ category = influence
1826
+
1827
+ require_acceptance = no
1828
+
1829
+ is_visible = {
1830
+ has_government_attribute = heir
1831
+ FROM = {
1832
+ is_subject_of = ROOT
1833
+ is_subject_of_type = appanage
1834
+ has_government_attribute = heir
1835
+ }
1836
+ }
1837
+ is_allowed = {
1838
+ if = {
1839
+ limit = {
1840
+ FROM = { liberty_desire = 50 }
1841
+ }
1842
+ custom_trigger_tooltip = {
1843
+ tooltip = FROM_IS_REBELLIOUS_TT
1844
+ FROM = { liberty_desire = 50 }
1845
+ }
1846
+ }
1847
+ if = {
1848
+ limit = {
1849
+ has_heir = yes
1850
+ }
1851
+ custom_trigger_tooltip = {
1852
+ tooltip = ROOT_HAS_HEIR_TT
1853
+ has_heir = no
1854
+ }
1855
+ }
1856
+ if = {
1857
+ limit = {
1858
+ FROM = { has_heir = no }
1859
+ }
1860
+ custom_trigger_tooltip = {
1861
+ tooltip = FROM_HAS_NO_HEIR_TT
1862
+ FROM = { has_heir = YES }
1863
+ }
1864
+ }
1865
+ }
1866
+ on_accept = {
1867
+ FROM = { exile_heir_as = appanage_heir }
1868
+ set_heir = appanage_heir
1869
+ }
1870
+ on_decline = {
1871
+ }
1872
+
1873
+ ai_will_do = { # this is a trigger
1874
+ FROM = {
1875
+ OR = {
1876
+ AND = {
1877
+ heir_adm = 3
1878
+ heir_dip = 3
1879
+ heir_mil = 3
1880
+ }
1881
+ AND = {
1882
+ heir_adm = 5
1883
+ OR = {
1884
+ heir_dip = 2
1885
+ heir_mil = 2
1886
+ }
1887
+ }
1888
+ AND = {
1889
+ heir_dip = 5
1890
+ OR = {
1891
+ heir_adm = 2
1892
+ heir_mil = 2
1893
+ }
1894
+ }
1895
+ AND = {
1896
+ heir_mil = 5
1897
+ OR = {
1898
+ heir_dip = 2
1899
+ heir_adm = 2
1900
+ }
1901
+ }
1902
+ }
1903
+ }
1904
+ }
1905
+
1906
+ #ai_acceptance = {
1907
+ # add_entry = {
1908
+ # name = DIPLO_OPPINION
1909
+ # export_to_variable = {
1910
+ # variable_name = ai_value
1911
+ # value = opinion
1912
+ # who = FROM
1913
+ # with = ROOT
1914
+ # }
1915
+ # multiply_variable = {
1916
+ # which = ai_value
1917
+ # value = 0.2
1918
+ # }
1919
+ # }
1920
+ # add_entry = {
1921
+ # name = AI_TRUST_TOWARDS_ROOT
1922
+ # export_to_variable = {
1923
+ # variable_name = ai_value
1924
+ # value = trust
1925
+ # who = FROM
1926
+ # with = ROOT
1927
+ # }
1928
+ # subtract_variable = {
1929
+ # which = ai_value
1930
+ # value = 50
1931
+ # }
1932
+ # #1 trust = +4 ai points
1933
+ # multiply_variable = {
1934
+ # which = ai_value
1935
+ # value = 0.4
1936
+ # }
1937
+ # }
1938
+ # add_entry = {
1939
+ # name = AI_DIPLOMATIC_REPUTATION
1940
+ # export_to_variable = {
1941
+ # variable_name = ai_value
1942
+ # value = trigger_value:diplomatic_reputation
1943
+ # }
1944
+ # #1 rep = 4
1945
+ # multiply_variable = {
1946
+ # which = ai_value
1947
+ # value = 4
1948
+ # }
1949
+ # }
1950
+ # add_entry = {
1951
+ # name = AI_LIBERTY_DESIRE
1952
+ # export_to_variable = {
1953
+ # variable_name = ai_value
1954
+ # value = liberty_desire
1955
+ # who = FROM
1956
+ # }
1957
+ # multiply_variable = {
1958
+ # which = ai_value
1959
+ # value = -1
1960
+ # }
1961
+ # }
1962
+ #}
1963
+ }
1964
+
1965
+ # Allow Commercial Enterprise to dow
1966
+ grant_war_rights = {
1967
+ category = influence
1968
+
1969
+ require_acceptance = no
1970
+
1971
+ is_visible = {
1972
+ FROM = {
1973
+ is_subject_of = ROOT
1974
+ is_subject_of_type = commercial_enterprise
1975
+ has_country_modifier = revoked_war_rights
1976
+ }
1977
+ }
1978
+ is_allowed = {
1979
+ always = yes
1980
+ }
1981
+ on_accept = {
1982
+ FROM = {
1983
+ remove_country_modifier = revoked_war_rights
1984
+ }
1985
+ }
1986
+ on_decline = {
1987
+ }
1988
+
1989
+ ai_will_do = { # this is a trigger
1990
+ always = no
1991
+ }
1992
+ }
1993
+
1994
+ # Disallow Commercial Enterprise to dow
1995
+ revoke_war_rights = {
1996
+ category = influence
1997
+
1998
+ require_acceptance = no
1999
+
2000
+ is_visible = {
2001
+ FROM = {
2002
+ is_subject_of = ROOT
2003
+ is_subject_of_type = commercial_enterprise
2004
+ NOT = { has_country_modifier = revoked_war_rights }
2005
+ }
2006
+ }
2007
+ is_allowed = {
2008
+ always = yes
2009
+ }
2010
+ on_accept = {
2011
+ FROM = {
2012
+ add_country_modifier = {
2013
+ name = revoked_war_rights
2014
+ duration = -1
2015
+ }
2016
+ add_opinion = {
2017
+ who = ROOT
2018
+ modifier = revoked_our_right_to_war
2019
+ }
2020
+ }
2021
+ }
2022
+ on_decline = {
2023
+ }
2024
+
2025
+ ai_will_do = { # this is a trigger
2026
+ always = no
2027
+ }
2028
+ }
2029
+
2030
+ # Steal Modern Ideas
2031
+ steal_modern_ideas = {
2032
+ category = covert
2033
+ require_acceptance = no
2034
+
2035
+ is_visible = {
2036
+ has_government_mechanic = russian_modernization_mechanic
2037
+ }
2038
+ is_allowed = {
2039
+ if = {
2040
+ limit = {
2041
+ FROM = { NOT = { tech_difference = 0 } }
2042
+ }
2043
+ custom_trigger_tooltip = {
2044
+ tooltip = FROM_HAS_LESS_THAN_ROOT_TECHNOLOGY
2045
+ FROM = { tech_difference = 0 }
2046
+ }
2047
+ }
2048
+ if = {
2049
+ limit = {
2050
+ NOT = {
2051
+ has_spy_network_in = {
2052
+ who = FROM
2053
+ value = 30
2054
+ }
2055
+ }
2056
+ NOT = { full_idea_group = spy_ideas }
2057
+ }
2058
+ custom_trigger_tooltip = {
2059
+ tooltip = REQUIRES_30_SPY_NETWORK_TT
2060
+ has_spy_network_in = {
2061
+ who = FROM
2062
+ value = 30
2063
+ }
2064
+ }
2065
+ }
2066
+ if = {
2067
+ limit = {
2068
+ NOT = {
2069
+ has_spy_network_in = {
2070
+ who = FROM
2071
+ value = 24
2072
+ }
2073
+ }
2074
+ full_idea_group = spy_ideas
2075
+ }
2076
+ custom_trigger_tooltip = {
2077
+ tooltip = REQUIRES_24_SPY_NETWORK_TT
2078
+ has_spy_network_in = {
2079
+ who = FROM
2080
+ value = 24
2081
+ }
2082
+ }
2083
+ }
2084
+ if = {
2085
+ limit = { has_estate_privilege = estate_nobles_mestnichestvo }
2086
+ custom_trigger_tooltip = {
2087
+ tooltip = CANNOT_GAIN_ANY_MODERNIZATION_TT
2088
+ NOT = { has_estate_privilege = estate_nobles_mestnichestvo }
2089
+ }
2090
+ }
2091
+ }
2092
+ on_accept = {
2093
+ if = {
2094
+ limit = {
2095
+ full_idea_group = spy_ideas
2096
+ }
2097
+ add_spy_network_in = {
2098
+ who = FROM
2099
+ value = -24
2100
+ }
2101
+ }
2102
+ else = {
2103
+ add_spy_network_in = {
2104
+ who = FROM
2105
+ value = -30
2106
+ }
2107
+ }
2108
+ if = {
2109
+ limit = { FROM = { tech_difference = 0 } }
2110
+ add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 2.0 }
2111
+ }
2112
+ if = {
2113
+ limit = { FROM = { tech_difference = 1 } }
2114
+ add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 0.5 }
2115
+ }
2116
+ if = {
2117
+ limit = { FROM = { tech_difference = 2 } }
2118
+ add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 0.5 }
2119
+ }
2120
+ if = {
2121
+ limit = { FROM = { tech_difference = 3 } }
2122
+ add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 0.5 }
2123
+ }
2124
+ if = {
2125
+ limit = { FROM = { tech_difference = 4 } }
2126
+ add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 0.5 }
2127
+ }
2128
+ if = {
2129
+ limit = { FROM = { tech_difference = 5 } }
2130
+ add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 0.5 }
2131
+ }
2132
+ if = {
2133
+ limit = { FROM = { tech_difference = 6 } }
2134
+ add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 0.5 }
2135
+ }
2136
+ }
2137
+
2138
+ ai_will_do = { # this is a trigger
2139
+ has_spy_network_in = {
2140
+ who = FROM
2141
+ value = 30
2142
+ }
2143
+ }
2144
+ }
2145
+
2146
+ # Study Modern Ideas
2147
+ request_access_to_modern_ideas = {
2148
+ category = economy
2149
+ require_acceptance = yes
2150
+
2151
+ alert_index = 11
2152
+ alert_tooltip = request_access_to_modern_ideas_alert_tooltip
2153
+
2154
+ is_visible = {
2155
+ has_government_mechanic = russian_modernization_mechanic
2156
+ }
2157
+ is_allowed = {
2158
+ if = {
2159
+ limit = {
2160
+ FROM = { NOT = { tech_difference = 0 } }
2161
+ }
2162
+ custom_trigger_tooltip = {
2163
+ tooltip = FROM_HAS_LESS_THAN_ROOT_TECHNOLOGY
2164
+ FROM = { tech_difference = 0 }
2165
+ }
2166
+ }
2167
+ if = {
2168
+ limit = { NOT = { years_of_income = 0.25 } }
2169
+ years_of_income = 0.25
2170
+ }
2171
+ if = {
2172
+ limit = { has_estate_privilege = estate_nobles_mestnichestvo }
2173
+ custom_trigger_tooltip = {
2174
+ tooltip = CANNOT_GAIN_ANY_MODERNIZATION_TT
2175
+ NOT = { has_estate_privilege = estate_nobles_mestnichestvo }
2176
+ }
2177
+ }
2178
+ if = {
2179
+ limit = { war_with = FROM }
2180
+ custom_trigger_tooltip = {
2181
+ tooltip = WAR_WITH_FROM_TT
2182
+ NOT = { war_with = FROM }
2183
+ }
2184
+ }
2185
+ }
2186
+ on_accept = {
2187
+ if = {
2188
+ limit = { FROM = { tech_difference = 0 } }
2189
+ add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 2.0 }
2190
+ }
2191
+ if = {
2192
+ limit = { FROM = { tech_difference = 1 } }
2193
+ add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 0.5 }
2194
+ }
2195
+ if = {
2196
+ limit = { FROM = { tech_difference = 2 } }
2197
+ add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 0.5 }
2198
+ }
2199
+ if = {
2200
+ limit = { FROM = { tech_difference = 3 } }
2201
+ add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 0.5 }
2202
+ }
2203
+ if = {
2204
+ limit = { FROM = { tech_difference = 4 } }
2205
+ add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 0.5 }
2206
+ }
2207
+ if = {
2208
+ limit = { FROM = { tech_difference = 5 } }
2209
+ add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 0.5 }
2210
+ }
2211
+ if = {
2212
+ limit = { FROM = { tech_difference = 6 } }
2213
+ add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 0.5 }
2214
+ }
2215
+ FROM = {
2216
+ country_event = {
2217
+ id = flavor_rus.294
2218
+ }
2219
+ }
2220
+ }
2221
+ on_decline = {
2222
+ }
2223
+
2224
+ ai_will_do = { # this is a trigger
2225
+ years_of_income = 0.5
2226
+ is_in_deficit = no
2227
+ is_bankrupt = no
2228
+ is_at_war = no
2229
+ not = { num_of_loans = 1 }
2230
+ not = {
2231
+ has_government_power = {
2232
+ mechanic_type = russian_modernization_mechanic
2233
+ power_type = russian_modernization
2234
+ value = 90
2235
+ }
2236
+ }
2237
+ }
2238
+
2239
+ ai_acceptance = {
2240
+ add_entry = {
2241
+ name = BASE_REJECTION
2242
+ limit = {
2243
+ always = yes
2244
+ }
2245
+ export_to_variable = {
2246
+ variable_name = ai_value
2247
+ value = 1
2248
+ }
2249
+
2250
+ multiply_variable = {
2251
+ which = ai_value
2252
+ value = -50
2253
+ }
2254
+ }
2255
+ add_entry = {
2256
+ name = DIPLO_OPPINION
2257
+ export_to_variable = {
2258
+ variable_name = ai_value
2259
+ value = opinion
2260
+ who = FROM
2261
+ with = ROOT
2262
+ }
2263
+ multiply_variable = {
2264
+ which = ai_value
2265
+ value = 0.125
2266
+ }
2267
+ }
2268
+ add_entry = {
2269
+ name = HAS_DEFICIT
2270
+ limit = {
2271
+ FROM = {
2272
+ is_in_deficit = yes
2273
+ }
2274
+ }
2275
+ export_to_variable = {
2276
+ variable_name = ai_value
2277
+ value = 1
2278
+ }
2279
+
2280
+ multiply_variable = {
2281
+ which = ai_value
2282
+ value = 25
2283
+ }
2284
+ }
2285
+ add_entry = {
2286
+ name = SIZE_OF_LOANS
2287
+ limit = {
2288
+ FROM = {
2289
+ num_of_loans = 1
2290
+ }
2291
+ }
2292
+ export_to_variable = {
2293
+ variable_name = ai_value
2294
+ value = num_of_loans
2295
+ }
2296
+ multiply_variable = {
2297
+ which = ai_value
2298
+ value = 10
2299
+ }
2300
+ }
2301
+ add_entry = {
2302
+ name = AI_PERSONALITY
2303
+ limit = {
2304
+ FROM = {
2305
+ OR = {
2306
+ personality = ai_capitalist
2307
+ personality = ai_balanced
2308
+ }
2309
+ }
2310
+ }
2311
+ export_to_variable = {
2312
+ variable_name = ai_value
2313
+ value = 1
2314
+ }
2315
+
2316
+ multiply_variable = {
2317
+ which = ai_value
2318
+ value = 15
2319
+ }
2320
+ }
2321
+ add_entry = {
2322
+ name = AI_PERSONALITY
2323
+ limit = {
2324
+ FROM = {
2325
+ OR = {
2326
+ personality = ai_diplomat
2327
+ personality = ai_colonialist
2328
+ }
2329
+ }
2330
+ }
2331
+ export_to_variable = {
2332
+ variable_name = ai_value
2333
+ value = 1
2334
+ }
2335
+
2336
+ multiply_variable = {
2337
+ which = ai_value
2338
+ value = 10
2339
+ }
2340
+ }
2341
+ add_entry = {
2342
+ name = AI_PERSONALITY
2343
+ limit = {
2344
+ FROM = {
2345
+ personality = ai_militarist
2346
+ }
2347
+ }
2348
+ export_to_variable = {
2349
+ variable_name = ai_value
2350
+ value = 1
2351
+ }
2352
+
2353
+ multiply_variable = {
2354
+ which = ai_value
2355
+ value = -25
2356
+ }
2357
+ }
2358
+ add_entry = {
2359
+ name = AI_TRUST_TOWARDS_ROOT
2360
+ export_to_variable = {
2361
+ variable_name = ai_value
2362
+ value = trust
2363
+ who = FROM
2364
+ with = ROOT
2365
+ }
2366
+ subtract_variable = {
2367
+ which = ai_value
2368
+ value = 50
2369
+ }
2370
+ #1 trust = +4 ai points
2371
+ multiply_variable = {
2372
+ which = ai_value
2373
+ value = 0.4
2374
+ }
2375
+ }
2376
+ add_entry = {
2377
+ name = AI_DIPLOMATIC_REPUTATION
2378
+ export_to_variable = {
2379
+ variable_name = ai_value
2380
+ value = trigger_value:diplomatic_reputation
2381
+ }
2382
+ #1 rep = 3
2383
+ multiply_variable = {
2384
+ which = ai_value
2385
+ value = 3
2386
+ }
2387
+ }
2388
+ add_entry = {
2389
+ name = attitude_neutral_DIPLO_ATTITUDE_TT
2390
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_neutral } } }
2391
+ export_to_variable = { variable_name = ai_value value = 1 }
2392
+ multiply_variable = { which = ai_value value = -20 }
2393
+ }
2394
+ add_entry = {
2395
+ name = attitude_rivalry_DIPLO_ATTITUDE_TT
2396
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_rivalry } } }
2397
+ export_to_variable = { variable_name = ai_value value = 1 }
2398
+ multiply_variable = { which = ai_value value = -1000 }
2399
+ }
2400
+ add_entry = {
2401
+ name = attitude_hostile_DIPLO_ATTITUDE_TT
2402
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_hostile } } }
2403
+ export_to_variable = { variable_name = ai_value value = 1 }
2404
+ multiply_variable = { which = ai_value value = -1000 }
2405
+ }
2406
+ add_entry = {
2407
+ name = attitude_friendly_DIPLO_ATTITUDE_TT
2408
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_friendly } } }
2409
+ export_to_variable = { variable_name = ai_value value = 1 }
2410
+ multiply_variable = { which = ai_value value = 50 }
2411
+ }
2412
+ add_entry = {
2413
+ name = attitude_outraged_DIPLO_ATTITUDE_TT
2414
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_outraged } } }
2415
+ export_to_variable = { variable_name = ai_value value = 1 }
2416
+ multiply_variable = { which = ai_value value = -1000 }
2417
+ }
2418
+ add_entry = {
2419
+ name = attitude_domineering_DIPLO_ATTITUDE_TT
2420
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_domineering } } }
2421
+ export_to_variable = { variable_name = ai_value value = 1 }
2422
+ multiply_variable = { which = ai_value value = 1000 }
2423
+ }
2424
+ add_entry = {
2425
+ name = attitude_protective_DIPLO_ATTITUDE_TT
2426
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_protective } } }
2427
+ export_to_variable = { variable_name = ai_value value = 1 }
2428
+ multiply_variable = { which = ai_value value = 1000 }
2429
+ }
2430
+ add_entry = {
2431
+ name = DIPLO_BORDER_DISTANCE_TT
2432
+ export_to_variable = {
2433
+ variable_name = ai_value
2434
+ value = border_distance
2435
+ who = FROM
2436
+ with = ROOT
2437
+ }
2438
+ #10 units = 1
2439
+ multiply_variable = {
2440
+ which = ai_value
2441
+ value = 0.1
2442
+ }
2443
+ }
2444
+ }
2445
+ }
2446
+
2447
+ # Share Modern Ideas
2448
+ share_modern_ideas = {
2449
+ category = economy
2450
+ require_acceptance = yes
2451
+
2452
+ alert_index = 11
2453
+ alert_tooltip = share_modern_ideas_alert_tooltip
2454
+
2455
+ is_visible = {
2456
+ FROM = { has_government_mechanic = russian_modernization_mechanic }
2457
+ }
2458
+ is_allowed = {
2459
+ if = {
2460
+ limit = {
2461
+ FROM = { ROOT = { NOT = { tech_difference = 0 } } }
2462
+ }
2463
+ custom_trigger_tooltip = {
2464
+ tooltip = ROOT_HAS_LESS_THAN_ROOT_TECHNOLOGY
2465
+ FROM = { ROOT = { tech_difference = 0 } }
2466
+ }
2467
+ }
2468
+ if = {
2469
+ limit = { war_with = FROM }
2470
+ custom_trigger_tooltip = {
2471
+ tooltip = WAR_WITH_FROM_TT
2472
+ NOT = { war_with = FROM }
2473
+ }
2474
+ }
2475
+ }
2476
+ on_accept = {
2477
+ if = {
2478
+ limit = { FROM = { ROOT = { tech_difference = 0 } } }
2479
+ FROM = { add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 2.0 } }
2480
+ }
2481
+ if = {
2482
+ limit = { FROM = { ROOT = { tech_difference = 1 } } }
2483
+ FROM = { add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 0.5 } }
2484
+ }
2485
+ if = {
2486
+ limit = { FROM = { ROOT = { tech_difference = 2 } } }
2487
+ FROM = { add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 0.5 } }
2488
+ }
2489
+ if = {
2490
+ limit = { FROM = { ROOT = { tech_difference = 3 } } }
2491
+ FROM = { add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 0.5 } }
2492
+ }
2493
+ if = {
2494
+ limit = { FROM = { ROOT = { tech_difference = 4 } } }
2495
+ FROM = { add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 0.5 } }
2496
+ }
2497
+ if = {
2498
+ limit = { FROM = { ROOT = { tech_difference = 5 } } }
2499
+ FROM = { add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 0.5 } }
2500
+ }
2501
+ if = {
2502
+ limit = { FROM = { ROOT = { tech_difference = 6 } } }
2503
+ FROM = { add_government_power = { mechanic_type = russian_modernization_mechanic power_type = russian_modernization value = 0.5 } }
2504
+ }
2505
+ FROM = {
2506
+ country_event = {
2507
+ id = flavor_rus.297
2508
+ }
2509
+ }
2510
+ }
2511
+ on_decline = {
2512
+ }
2513
+
2514
+ ai_will_do = { # this is a trigger
2515
+ OR = {
2516
+ ai_attitude = {
2517
+ who = FROM
2518
+ attitude = attitude_friendly
2519
+ }
2520
+ ai_attitude = {
2521
+ who = FROM
2522
+ attitude = attitude_defensive
2523
+ }
2524
+ ai_attitude = {
2525
+ who = FROM
2526
+ attitude = attitude_protective
2527
+ }
2528
+ ai_attitude = {
2529
+ who = FROM
2530
+ attitude = attitude_allied
2531
+ }
2532
+ is_subject_of = FROM
2533
+ }
2534
+ FROM = {
2535
+ years_of_income = 0.5
2536
+ is_in_deficit = no
2537
+ is_bankrupt = no
2538
+ is_at_war = no
2539
+ not = { num_of_loans = 1 }
2540
+ not = {
2541
+ has_government_power = {
2542
+ mechanic_type = russian_modernization_mechanic
2543
+ power_type = russian_modernization
2544
+ value = 90
2545
+ }
2546
+ }
2547
+ }
2548
+ OR = {
2549
+ alliance_with = FROM
2550
+ is_subject_of = FROM
2551
+ AND = {
2552
+ is_in_deficit = yes
2553
+ num_of_loans = 2
2554
+ }
2555
+ is_bankrupt = yes
2556
+ personality = ai_capitalist
2557
+ }
2558
+ NOT = {
2559
+ ai_attitude = {
2560
+ who = FROM
2561
+ attitude = attitude_rivalry
2562
+ }
2563
+ }
2564
+ NOT = {
2565
+ ai_attitude = {
2566
+ who = FROM
2567
+ attitude = attitude_threatened
2568
+ }
2569
+ }
2570
+ NOT = {
2571
+ ai_attitude = {
2572
+ who = FROM
2573
+ attitude = attitude_hostile
2574
+ }
2575
+ }
2576
+ NOT = {
2577
+ ai_attitude = {
2578
+ who = FROM
2579
+ attitude = attitude_outraged
2580
+ }
2581
+ }
2582
+ NOT = {
2583
+ ai_attitude = {
2584
+ who = FROM
2585
+ attitude = attitude_domineering
2586
+ }
2587
+ }
2588
+ }
2589
+
2590
+ ai_acceptance = {
2591
+ add_entry = {
2592
+ name = HAS_DEFICIT
2593
+ limit = {
2594
+ FROM = {
2595
+ is_in_deficit = yes
2596
+ }
2597
+ }
2598
+ export_to_variable = {
2599
+ variable_name = ai_value
2600
+ value = 1
2601
+ }
2602
+
2603
+ multiply_variable = {
2604
+ which = ai_value
2605
+ value = -25
2606
+ }
2607
+ }
2608
+ add_entry = {
2609
+ name = HAS_BANKRUPTCY
2610
+ limit = {
2611
+ FROM = {
2612
+ is_bankrupt = yes
2613
+ }
2614
+ }
2615
+ export_to_variable = {
2616
+ variable_name = ai_value
2617
+ value = 1
2618
+ }
2619
+
2620
+ multiply_variable = {
2621
+ which = ai_value
2622
+ value = -1000
2623
+ }
2624
+ }
2625
+ add_entry = {
2626
+ name = SIZE_OF_LOANS
2627
+ limit = {
2628
+ FROM = {
2629
+ num_of_loans = 1
2630
+ }
2631
+ }
2632
+ export_to_variable = {
2633
+ variable_name = ai_value
2634
+ value = num_of_loans
2635
+ }
2636
+ multiply_variable = {
2637
+ which = ai_value
2638
+ value = -20
2639
+ }
2640
+ }
2641
+ add_entry = {
2642
+ name = CANNOT_AFFORD
2643
+ limit = {
2644
+ FROM = {
2645
+ NOT = { years_of_income = 0.25 }
2646
+ }
2647
+ }
2648
+ export_to_variable = {
2649
+ variable_name = ai_value
2650
+ value = 1
2651
+ }
2652
+
2653
+ multiply_variable = {
2654
+ which = ai_value
2655
+ value = -1000
2656
+ }
2657
+ }
2658
+ add_entry = {
2659
+ name = DOES_NOT_BENEFIT
2660
+ limit = {
2661
+ FROM = {
2662
+ or = {
2663
+ has_government_power = {
2664
+ mechanic_type = russian_modernization_mechanic
2665
+ power_type = russian_modernization
2666
+ value = 90
2667
+ }
2668
+ has_estate_privilege = estate_nobles_mestnichestvo
2669
+ }
2670
+ }
2671
+ }
2672
+ export_to_variable = {
2673
+ variable_name = ai_value
2674
+ value = 1
2675
+ }
2676
+
2677
+ multiply_variable = {
2678
+ which = ai_value
2679
+ value = -1000
2680
+ }
2681
+ }
2682
+ }
2683
+ }
2684
+
2685
+ create_pronoia = {
2686
+ category = influence
2687
+
2688
+ alert_index = 17 #doesn't matter. it is forced onto the subject
2689
+ alert_tooltip = sell_indulgence_alert_tooltip #doesn't matter. it is forced onto the subject
2690
+
2691
+ require_acceptance = no
2692
+
2693
+ is_visible = {
2694
+ has_government_attribute = enables_pronoias
2695
+ FROM = {
2696
+ is_subject_of = ROOT
2697
+ NOT = {
2698
+ OR = {
2699
+ is_subject_of_type = hereditary_pronoia_subject_type
2700
+ is_subject_of_type = pronoia_subject_type
2701
+ }
2702
+ }
2703
+ is_subject_other_than_tributary_trigger = yes
2704
+ }
2705
+ }
2706
+ is_allowed = {
2707
+ if = {
2708
+ limit = { BYZ_reached_pronia_slot_limit = yes }
2709
+ custom_trigger_tooltip = {
2710
+ tooltip = BYZ_not_enough_free_pronoia_slots
2711
+ BYZ_enough_pronoia_slots = yes
2712
+ }
2713
+ }
2714
+ if = {
2715
+ limit = { from = { liberty_desire = 15 } }
2716
+ custom_trigger_tooltip = {
2717
+ tooltip = BYZ_too_much_liberty_desire
2718
+ from = { not = { liberty_desire = 15 } }
2719
+ }
2720
+ }
2721
+ if = {
2722
+ limit = { from = { total_development = 100 } }
2723
+ custom_trigger_tooltip = {
2724
+ tooltip = FROM_HAS_NOT_100_TOTAL_DEV
2725
+ from = { not = { total_development = 100 } }
2726
+ }
2727
+ }
2728
+ if = {
2729
+ limit = { from = { not = { government = monarchy } } }
2730
+ custom_trigger_tooltip = {
2731
+ tooltip = FROM_IS_NOT_MONARCHY
2732
+ from = { government = monarchy }
2733
+ }
2734
+ }
2735
+ if = {
2736
+ limit = {
2737
+ from = {
2738
+ not = { is_subject_of_type = vassal }
2739
+ not = { is_subject_of_type = client_vassal }
2740
+ }
2741
+ }
2742
+ custom_trigger_tooltip = {
2743
+ tooltip = FROM_IS_NOT_VASSAL_OF_ROOT
2744
+ FROM = {
2745
+ OR = {
2746
+ is_subject_of_type = vassal
2747
+ is_subject_of_type = client_vassal
2748
+ }
2749
+ }
2750
+ }
2751
+ }
2752
+ }
2753
+ on_accept = {
2754
+ from = { grant_independence = { keep_liberty_desire = yes } }
2755
+ hidden_effect = {
2756
+ # country_event = { id = MEE_Byzantine_Events.56 }
2757
+ FROM = {
2758
+ set_saved_name = {
2759
+ key = byzantine_general
2760
+ type = advisor
2761
+ scope = ROOT
2762
+ }
2763
+ define_ruler = {
2764
+ name = byzantine_general
2765
+ change_mil = 4
2766
+ change_adm = 1
2767
+ change_dip = 0
2768
+ min_age = 30
2769
+ male = yes
2770
+ religion = ROOT
2771
+ culture = ROOT
2772
+ }
2773
+ if = {
2774
+ limit = {
2775
+ has_heir = yes
2776
+ }
2777
+ kill_heir = { allow_new_heir = no }
2778
+ }
2779
+ }
2780
+ }
2781
+ if = {
2782
+ limit = {
2783
+ has_country_flag = BYZ_hereditary_pronoiars
2784
+ }
2785
+ create_subject = {
2786
+ subject_type = pronoia_subject_type
2787
+ subject = FROM
2788
+ keep_liberty_desire = yes
2789
+ }
2790
+ }
2791
+ else = {
2792
+ create_subject = {
2793
+ subject_type = hereditary_pronoia_subject_type
2794
+ subject = FROM
2795
+ keep_liberty_desire = yes
2796
+ }
2797
+ }
2798
+ }
2799
+
2800
+ ai_will_do = {
2801
+ if = {
2802
+ limit = {
2803
+ NOT = {
2804
+ OR = {
2805
+ mission_completed = BYZ_decentralized_pronoia
2806
+ mission_completed = BYZ_centralized_pronoia
2807
+ }
2808
+ }
2809
+ }
2810
+ always = yes
2811
+ }
2812
+ else_if = {
2813
+ limit = {
2814
+ is_subject_of_type = march
2815
+ }
2816
+ always = yes
2817
+ }
2818
+ else = {
2819
+ always = no
2820
+ }
2821
+ }
2822
+ }
2823
+ release_pronia = {
2824
+ category = influence
2825
+ require_acceptance = no
2826
+ is_visible = {
2827
+ FROM = {
2828
+ is_subject_of = ROOT
2829
+ OR = {
2830
+ is_subject_of_type = hereditary_pronoia_subject_type
2831
+ is_subject_of_type = pronoia_subject_type
2832
+ }
2833
+ }
2834
+ }
2835
+ is_allowed = {
2836
+ always = yes
2837
+ }
2838
+ on_accept = {
2839
+ from = {
2840
+ if = {
2841
+ limit = { not = { liberty_desire = 50 } }
2842
+ add_opinion = {
2843
+ who = root
2844
+ modifier = vassal_abandoned
2845
+ }
2846
+ }
2847
+ grant_independence = yes
2848
+ every_owned_province = {
2849
+ limit = {
2850
+ or = {
2851
+ is_claim = root
2852
+ is_permanent_claim = root
2853
+ is_core = root
2854
+ }
2855
+ }
2856
+ if = {
2857
+ limit = { is_permanent_claim = root }
2858
+ remove_claim = root
2859
+ }
2860
+ if = {
2861
+ limit = { is_claim = root }
2862
+ remove_claim = root
2863
+ }
2864
+ if = {
2865
+ limit = { is_core = root }
2866
+ remove_core = root
2867
+ }
2868
+ }
2869
+ }
2870
+ add_prestige = -25
2871
+ }
2872
+ ai_will_do = {
2873
+ always = no
2874
+ }
2875
+ }
2876
+
2877
+ make_pronoia_inheritable = {
2878
+ category = influence
2879
+
2880
+ alert_index = 17 #doesn't matter. it is forced onto the subject
2881
+ alert_tooltip = sell_indulgence_alert_tooltip #doesn't matter. it is forced onto the subject
2882
+
2883
+ require_acceptance = no
2884
+
2885
+ is_visible = {
2886
+ FROM = {
2887
+ is_subject_of = ROOT
2888
+ is_subject_of_type = hereditary_pronoia_subject_type
2889
+ }
2890
+ }
2891
+ is_allowed = {
2892
+ if = {
2893
+ limit = { from = { liberty_desire = 15 } }
2894
+ custom_trigger_tooltip = {
2895
+ tooltip = BYZ_too_much_liberty_desire
2896
+ from = { not = { liberty_desire = 15 } }
2897
+ }
2898
+ }
2899
+ }
2900
+ on_accept = {
2901
+ ROOT = {
2902
+ create_subject = {
2903
+ subject_type = pronoia_subject_type
2904
+ subject = FROM
2905
+ }
2906
+ }
2907
+ }
2908
+
2909
+ ai_will_do = {
2910
+ if = {
2911
+ limit = {
2912
+ NOT = {
2913
+ OR = {
2914
+ mission_completed = BYZ_decentralized_pronoia
2915
+ mission_completed = BYZ_centralized_pronoia
2916
+ }
2917
+ }
2918
+ }
2919
+ always = no
2920
+ }
2921
+ else_if = {
2922
+ limit = {
2923
+ FROM = { development_of_overlord_fraction = 0.25 }
2924
+ }
2925
+ always = yes
2926
+ }
2927
+ else = {
2928
+ always = no
2929
+ }
2930
+ }
2931
+ }
2932
+
2933
+ # Sphere of Cultural Influence
2934
+ invite_into_cultural_sphere_of_influence = {
2935
+ category = influence
2936
+ require_acceptance = yes
2937
+
2938
+ alert_index = 60
2939
+ alert_tooltip = invite_into_cultural_sphere_of_influence_alert_tooltip
2940
+
2941
+ is_visible = {
2942
+ has_government_mechanic = persian_influence_mechanic
2943
+ is_subject = no
2944
+ FROM = { is_subject = no }
2945
+ }
2946
+ is_allowed = {
2947
+ if = {
2948
+ limit = {
2949
+ NOT = {
2950
+ FROM = {
2951
+ capital_scope = {
2952
+ trade_range = ROOT
2953
+ }
2954
+ }
2955
+ }
2956
+ }
2957
+ custom_trigger_tooltip = {
2958
+ tooltip = REQUIRES_CAPITAL_IN_TRADE_RANGE_TT
2959
+ FROM = {
2960
+ capital_scope = {
2961
+ trade_range = ROOT
2962
+ }
2963
+ }
2964
+ }
2965
+ }
2966
+ if = {
2967
+ limit = {
2968
+ FROM = { is_at_war = yes }
2969
+ }
2970
+ custom_trigger_tooltip = {
2971
+ tooltip = FROM_IS_AT_WAR_TT
2972
+ FROM = { is_at_war = no }
2973
+ }
2974
+ }
2975
+ if = {
2976
+ limit = {
2977
+ is_at_war = yes
2978
+ }
2979
+ custom_trigger_tooltip = {
2980
+ tooltip = ROOT_IS_AT_WAR_TT
2981
+ is_at_war = no
2982
+ }
2983
+ }
2984
+ if = {
2985
+ limit = { FROM = { NOT = { religion = root } } }
2986
+ custom_trigger_tooltip = {
2987
+ tooltip = FROM_IS_NOT_ROOT_RELIGION_TT
2988
+ FROM = { religion = root }
2989
+ }
2990
+ }
2991
+ if = {
2992
+ limit = { FROM = { is_great_power = yes } }
2993
+ custom_trigger_tooltip = {
2994
+ tooltip = FROM_IS_GREAT_POWER_TT
2995
+ FROM = { is_great_power = no }
2996
+ }
2997
+ }
2998
+ if = {
2999
+ limit = { FROM = { total_development = root } }
3000
+ custom_trigger_tooltip = {
3001
+ tooltip = FROM_MORE_DEV_THAN_ROOT_TT
3002
+ FROM = { NOT = { total_development = root } }
3003
+ }
3004
+ }
3005
+ }
3006
+ on_accept = {
3007
+ create_subject = {
3008
+ subject_type = cultural_sphere_of_influence_subject
3009
+ subject = FROM
3010
+ }
3011
+ }
3012
+ on_decline = {
3013
+ }
3014
+
3015
+ ai_will_do = { # this is a trigger
3016
+ OR = {
3017
+ ai_attitude = {
3018
+ who = FROM
3019
+ attitude = attitude_friendly
3020
+ }
3021
+ ai_attitude = {
3022
+ who = FROM
3023
+ attitude = attitude_protective
3024
+ }
3025
+ FROM = {
3026
+ any_neighbor_country = {
3027
+ NOT = { tag = ROOT }
3028
+ FROM = {
3029
+ ai_attitude = {
3030
+ who = PREV
3031
+ attitude = attitude_threatened
3032
+ }
3033
+ }
3034
+ }
3035
+ }
3036
+ FROM = {
3037
+ ai_attitude = {
3038
+ who = ROOT
3039
+ attitude = attitude_threatened
3040
+ }
3041
+ }
3042
+ }
3043
+ NOT = {
3044
+ ai_attitude = {
3045
+ who = FROM
3046
+ attitude = attitude_domineering
3047
+ }
3048
+ }
3049
+ NOT = {
3050
+ ai_attitude = {
3051
+ who = FROM
3052
+ attitude = attitude_hostile
3053
+ }
3054
+ }
3055
+ NOT = {
3056
+ ai_attitude = {
3057
+ who = FROM
3058
+ attitude = attitude_outraged
3059
+ }
3060
+ }
3061
+ has_opinion = {
3062
+ who = FROM
3063
+ value = 50
3064
+ }
3065
+ NOT = {
3066
+ FROM = {
3067
+ has_country_modifier = just_left_sphere_of_cultural_influence_timer
3068
+ }
3069
+ }
3070
+ }
3071
+
3072
+ ai_acceptance = {
3073
+ add_entry = {
3074
+ name = DIPLO_OPPINION
3075
+ export_to_variable = {
3076
+ variable_name = ai_value
3077
+ value = opinion
3078
+ who = FROM
3079
+ with = ROOT
3080
+ }
3081
+ multiply_variable = {
3082
+ which = ai_value
3083
+ value = 0.125
3084
+ }
3085
+ }
3086
+ add_entry = {
3087
+ name = AI_TRUST_TOWARDS_ROOT
3088
+ export_to_variable = {
3089
+ variable_name = ai_value
3090
+ value = trust
3091
+ who = FROM
3092
+ with = ROOT
3093
+ }
3094
+ subtract_variable = {
3095
+ which = ai_value
3096
+ value = 50
3097
+ }
3098
+ #1 trust = +4 ai points
3099
+ multiply_variable = {
3100
+ which = ai_value
3101
+ value = 0.4
3102
+ }
3103
+ }
3104
+ add_entry = {
3105
+ name = AI_DIPLOMATIC_REPUTATION
3106
+ export_to_variable = {
3107
+ variable_name = ai_value
3108
+ value = trigger_value:diplomatic_reputation
3109
+ }
3110
+ #1 rep = 3
3111
+ multiply_variable = {
3112
+ which = ai_value
3113
+ value = 3
3114
+ }
3115
+ }
3116
+ add_entry = {
3117
+ name = AI_TOTAL_DEVELOPMENT
3118
+ export_to_variable = {
3119
+ variable_name = ai_value
3120
+ value = total_development
3121
+ who = FROM
3122
+ }
3123
+ #4 dev = -1
3124
+ multiply_variable = {
3125
+ which = ai_value
3126
+ value = -0.25
3127
+ }
3128
+ }
3129
+ add_entry = {
3130
+ name = DIPLO_HAS_AI_HAS_OWN_SUBJECTS_TT
3131
+ limit = {
3132
+ FROM = { num_of_subjects = 1 }
3133
+ }
3134
+ export_to_variable = {
3135
+ variable_name = ai_value
3136
+ value = 1
3137
+ }
3138
+ multiply_variable = {
3139
+ which = ai_value
3140
+ value = -20
3141
+ }
3142
+ }
3143
+ add_entry = {
3144
+ name = ADDITIONAL_REASONS_FROM_EVENTS_AND_MISSIONS_TO_ACCEPT_TT
3145
+ limit = { FROM = { has_country_flag = easier_to_get_into_persian_sphere } }
3146
+ export_to_variable = { variable_name = ai_value value = 1 }
3147
+ multiply_variable = { which = ai_value value = 25 }
3148
+ }
3149
+ add_entry = {
3150
+ name = attitude_neutral_DIPLO_ATTITUDE_TT
3151
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_neutral } } }
3152
+ export_to_variable = { variable_name = ai_value value = 1 }
3153
+ multiply_variable = { which = ai_value value = -10 }
3154
+ }
3155
+ add_entry = {
3156
+ name = attitude_rivalry_DIPLO_ATTITUDE_TT
3157
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_rivalry } } }
3158
+ export_to_variable = { variable_name = ai_value value = 1 }
3159
+ multiply_variable = { which = ai_value value = -1000 }
3160
+ }
3161
+ add_entry = {
3162
+ name = attitude_hostile_DIPLO_ATTITUDE_TT
3163
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_hostile } } }
3164
+ export_to_variable = { variable_name = ai_value value = 1 }
3165
+ multiply_variable = { which = ai_value value = -1000 }
3166
+ }
3167
+ add_entry = {
3168
+ name = attitude_friendly_DIPLO_ATTITUDE_TT
3169
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_friendly } } }
3170
+ export_to_variable = { variable_name = ai_value value = 1 }
3171
+ multiply_variable = { which = ai_value value = 20 }
3172
+ }
3173
+ add_entry = {
3174
+ name = attitude_threatened_DIPLO_ATTITUDE_TT
3175
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_threatened } } }
3176
+ export_to_variable = { variable_name = ai_value value = 1 }
3177
+ multiply_variable = { which = ai_value value = 20 }
3178
+ }
3179
+ add_entry = {
3180
+ name = attitude_outraged_DIPLO_ATTITUDE_TT
3181
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_outraged } } }
3182
+ export_to_variable = { variable_name = ai_value value = 1 }
3183
+ multiply_variable = { which = ai_value value = -1000 }
3184
+ }
3185
+ add_entry = {
3186
+ name = attitude_domineering_DIPLO_ATTITUDE_TT
3187
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_domineering } } }
3188
+ export_to_variable = { variable_name = ai_value value = 1 }
3189
+ multiply_variable = { which = ai_value value = -1000 }
3190
+ }
3191
+ add_entry = {
3192
+ name = DIPLO_BORDER_DISTANCE_TT
3193
+ export_to_variable = {
3194
+ variable_name = ai_value
3195
+ value = border_distance
3196
+ who = FROM
3197
+ with = ROOT
3198
+ }
3199
+ #4 units = -1
3200
+ multiply_variable = {
3201
+ which = ai_value
3202
+ value = -0.25
3203
+ }
3204
+ }
3205
+ }
3206
+ }
3207
+
3208
+ remove_them_from_cultural_sphere_of_influece = {
3209
+ category = influence
3210
+ require_acceptance = no
3211
+
3212
+ is_visible = {
3213
+ FROM = {
3214
+ is_subject_of = ROOT
3215
+ is_subject_of_type = cultural_sphere_of_influence_subject
3216
+ }
3217
+ }
3218
+ is_allowed = {
3219
+ }
3220
+ on_accept = {
3221
+ FROM = {
3222
+ grant_independence = yes
3223
+ add_country_modifier = {
3224
+ name = just_left_sphere_of_cultural_influence_timer
3225
+ duration = 3650
3226
+ hidden = yes
3227
+ }
3228
+ }
3229
+ reverse_add_opinion = {
3230
+ who = from
3231
+ modifier = was_removed_from_our_sphere_of_influence
3232
+ }
3233
+ add_opinion = {
3234
+ who = from
3235
+ modifier = removed_from_our_sphere_of_influence
3236
+ }
3237
+ add_truce_with = from
3238
+ }
3239
+ on_decline = {
3240
+ }
3241
+
3242
+ ai_will_do = { # Overlords will never want to break the relationship
3243
+ always = no
3244
+ }
3245
+ }
3246
+
3247
+ leave_the_cultural_sphere_of_influece = {
3248
+ category = influence
3249
+ require_acceptance = no
3250
+
3251
+ is_visible = {
3252
+ is_subject_of = FROM
3253
+ is_subject_of_type = cultural_sphere_of_influence_subject
3254
+ }
3255
+ is_allowed = {
3256
+ }
3257
+ on_accept = {
3258
+ if = {
3259
+ limit = {
3260
+ is_subject_of = FROM
3261
+ is_subject_of_type = cultural_sphere_of_influence_subject
3262
+ NOT = { liberty_desire = 100 }
3263
+ }
3264
+ if = {
3265
+ limit = {
3266
+ has_stab_reduction_from_dip_action_modifier = yes
3267
+ }
3268
+ add_prestige = -1
3269
+ }
3270
+ else = {
3271
+ add_stability = -1
3272
+ }
3273
+ }
3274
+ grant_independence = yes
3275
+ reverse_add_opinion = {
3276
+ who = from
3277
+ modifier = left_our_sphere_of_influence
3278
+ }
3279
+ add_opinion = {
3280
+ who = from
3281
+ modifier = left_their_sphere_of_influence
3282
+ }
3283
+ add_country_modifier = {
3284
+ name = just_left_sphere_of_cultural_influence_timer
3285
+ duration = 3650
3286
+ hidden = yes
3287
+ }
3288
+ }
3289
+ on_decline = {
3290
+ }
3291
+
3292
+ ai_will_do = { # Overlords will never want to break the relationship
3293
+ is_subject_of = FROM
3294
+ OR = {
3295
+ liberty_desire = 100
3296
+ AND = {
3297
+ stability = 1
3298
+ liberty_desire = 90
3299
+ NOT = {
3300
+ has_opinion = {
3301
+ who = ROOT
3302
+ value = -50
3303
+ }
3304
+ }
3305
+ }
3306
+ AND = {
3307
+ stability = 1
3308
+ liberty_desire = 80
3309
+ NOT = {
3310
+ has_opinion = {
3311
+ who = ROOT
3312
+ value = -100
3313
+ }
3314
+ }
3315
+ }
3316
+ AND = {
3317
+ stability = 1
3318
+ liberty_desire = 70
3319
+ NOT = {
3320
+ has_opinion = {
3321
+ who = ROOT
3322
+ value = -150
3323
+ }
3324
+ }
3325
+ }
3326
+ AND = {
3327
+ stability = 1
3328
+ liberty_desire = 60
3329
+ NOT = {
3330
+ has_opinion = {
3331
+ who = ROOT
3332
+ value = -199
3333
+ }
3334
+ }
3335
+ }
3336
+ }
3337
+ NOT = {
3338
+ any_neighbor_country = {
3339
+ ROOT = {
3340
+ ai_attitude = {
3341
+ who = PREV
3342
+ attitude = attitude_threatened
3343
+ }
3344
+ }
3345
+ }
3346
+ }
3347
+ }
3348
+ }
3349
+
3350
+ join_cultural_sphere_of_influence = {
3351
+ category = influence
3352
+ require_acceptance = yes
3353
+
3354
+ alert_index = 59
3355
+ alert_tooltip = join_cultural_sphere_of_influence_alert_tooltip
3356
+
3357
+ is_visible = {
3358
+ FROM = { has_government_mechanic = persian_influence_mechanic }
3359
+ is_subject = no
3360
+ FROM = { is_subject = no }
3361
+ }
3362
+ is_allowed = {
3363
+ if = {
3364
+ limit = {
3365
+ NOT = {
3366
+ capital_scope = {
3367
+ trade_range = FROM
3368
+ }
3369
+ }
3370
+ }
3371
+ custom_trigger_tooltip = {
3372
+ tooltip = REQUIRES_FROM_TO_BE_IN_TRADE_RANGE_TT
3373
+ capital_scope = {
3374
+ trade_range = FROM
3375
+ }
3376
+ }
3377
+ }
3378
+ if = {
3379
+ limit = {
3380
+ FROM = { is_at_war = yes }
3381
+ }
3382
+ custom_trigger_tooltip = {
3383
+ tooltip = FROM_IS_AT_WAR_TT
3384
+ FROM = { is_at_war = no }
3385
+ }
3386
+ }
3387
+ if = {
3388
+ limit = {
3389
+ is_at_war = yes
3390
+ }
3391
+ custom_trigger_tooltip = {
3392
+ tooltip = ROOT_IS_AT_WAR_TT
3393
+ is_at_war = no
3394
+ }
3395
+ }
3396
+ if = {
3397
+ limit = { NOT = { religion = from } }
3398
+ custom_trigger_tooltip = {
3399
+ tooltip = ROOT_IS_NOT_FROM_RELIGION_TT
3400
+ religion = from
3401
+ }
3402
+ }
3403
+ if = {
3404
+ limit = { is_great_power = yes }
3405
+ custom_trigger_tooltip = {
3406
+ tooltip = ROOT_IS_GREAT_POWER_TT
3407
+ is_great_power = no
3408
+ }
3409
+ }
3410
+ if = {
3411
+ limit = { total_development = from }
3412
+ custom_trigger_tooltip = {
3413
+ tooltip = ROOT_MORE_DEV_THAN_FROM_TT
3414
+ NOT = { total_development = from }
3415
+ }
3416
+ }
3417
+ }
3418
+ on_accept = {
3419
+ FROM = {
3420
+ create_subject = {
3421
+ subject_type = cultural_sphere_of_influence_subject
3422
+ subject = ROOT
3423
+ }
3424
+ }
3425
+ }
3426
+ on_decline = {
3427
+ }
3428
+
3429
+ ai_will_do = { # this is a trigger
3430
+ OR = {
3431
+ ai_attitude = {
3432
+ who = FROM
3433
+ attitude = attitude_threatened
3434
+ }
3435
+ any_neighbor_country = {
3436
+ NOT = { tag = FROM }
3437
+ ROOT = {
3438
+ ai_attitude = {
3439
+ who = PREV
3440
+ attitude = attitude_threatened
3441
+ }
3442
+ }
3443
+ }
3444
+ FROM = {
3445
+ OR = {
3446
+ ai_attitude = {
3447
+ who = ROOT
3448
+ attitude = attitude_domineering
3449
+ }
3450
+ ai_attitude = {
3451
+ who = ROOT
3452
+ attitude = attitude_protective
3453
+ }
3454
+ }
3455
+ }
3456
+ }
3457
+ NOT = { mil_tech = FROM }
3458
+ OR = {
3459
+ NOT = { army_size = FROM }
3460
+ AND = {
3461
+ capital_scope = { is_island = yes }
3462
+ NOT = { navy_size = FROM }
3463
+ }
3464
+ FROM = {
3465
+ military_strength = {
3466
+ who = ROOT
3467
+ value = 2
3468
+ }
3469
+ }
3470
+ }
3471
+ NOT = { has_country_modifier = dissolve_protectorate_timer }
3472
+ NOT = {
3473
+ ai_attitude = {
3474
+ who = FROM
3475
+ attitude = attitude_rivalry
3476
+ }
3477
+ }
3478
+ NOT = {
3479
+ ai_attitude = {
3480
+ who = FROM
3481
+ attitude = attitude_hostile
3482
+ }
3483
+ }
3484
+ NOT = {
3485
+ ai_attitude = {
3486
+ who = FROM
3487
+ attitude = attitude_outraged
3488
+ }
3489
+ }
3490
+ NOT = {
3491
+ ai_attitude = {
3492
+ who = FROM
3493
+ attitude = attitude_domineering
3494
+ }
3495
+ }
3496
+ is_emperor = no
3497
+ is_emperor_of_china = no
3498
+ }
3499
+
3500
+ ai_acceptance = {
3501
+ add_entry = {
3502
+ name = DIPLO_OPPINION
3503
+ export_to_variable = {
3504
+ variable_name = ai_value
3505
+ value = opinion
3506
+ who = FROM
3507
+ with = ROOT
3508
+ }
3509
+ multiply_variable = {
3510
+ which = ai_value
3511
+ value = 0.125
3512
+ }
3513
+ }
3514
+ add_entry = {
3515
+ name = AI_TRUST_TOWARDS_ROOT
3516
+ export_to_variable = {
3517
+ variable_name = ai_value
3518
+ value = trust
3519
+ who = FROM
3520
+ with = ROOT
3521
+ }
3522
+ subtract_variable = {
3523
+ which = ai_value
3524
+ value = 50
3525
+ }
3526
+ #1 trust = +4 ai points
3527
+ multiply_variable = {
3528
+ which = ai_value
3529
+ value = 0.4
3530
+ }
3531
+ }
3532
+ add_entry = {
3533
+ name = AI_DIPLOMATIC_REPUTATION
3534
+ export_to_variable = {
3535
+ variable_name = ai_value
3536
+ value = trigger_value:diplomatic_reputation
3537
+ }
3538
+ #1 rep = 3
3539
+ multiply_variable = {
3540
+ which = ai_value
3541
+ value = 3
3542
+ }
3543
+ }
3544
+ add_entry = {
3545
+ name = DIPLO_OUR_TOTAL_DEVELOPMENT_TT
3546
+ export_to_variable = {
3547
+ variable_name = ai_value
3548
+ value = total_development
3549
+ who = ROOT
3550
+ }
3551
+ #10 dev = -1
3552
+ multiply_variable = {
3553
+ which = ai_value
3554
+ value = -0.1
3555
+ }
3556
+ }
3557
+ add_entry = {
3558
+ name = attitude_neutral_DIPLO_ATTITUDE_TT
3559
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_neutral } } }
3560
+ export_to_variable = { variable_name = ai_value value = 1 }
3561
+ multiply_variable = { which = ai_value value = -20 }
3562
+ }
3563
+ add_entry = {
3564
+ name = attitude_rivalry_DIPLO_ATTITUDE_TT
3565
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_rivalry } } }
3566
+ export_to_variable = { variable_name = ai_value value = 1 }
3567
+ multiply_variable = { which = ai_value value = -1000 }
3568
+ }
3569
+ add_entry = {
3570
+ name = attitude_hostile_DIPLO_ATTITUDE_TT
3571
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_hostile } } }
3572
+ export_to_variable = { variable_name = ai_value value = 1 }
3573
+ multiply_variable = { which = ai_value value = -1000 }
3574
+ }
3575
+ add_entry = {
3576
+ name = attitude_friendly_DIPLO_ATTITUDE_TT
3577
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_friendly } } }
3578
+ export_to_variable = { variable_name = ai_value value = 1 }
3579
+ multiply_variable = { which = ai_value value = 50 }
3580
+ }
3581
+ add_entry = {
3582
+ name = attitude_outraged_DIPLO_ATTITUDE_TT
3583
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_outraged } } }
3584
+ export_to_variable = { variable_name = ai_value value = 1 }
3585
+ multiply_variable = { which = ai_value value = -1000 }
3586
+ }
3587
+ add_entry = {
3588
+ name = attitude_domineering_DIPLO_ATTITUDE_TT
3589
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_domineering } } }
3590
+ export_to_variable = { variable_name = ai_value value = 1 }
3591
+ multiply_variable = { which = ai_value value = 1000 }
3592
+ }
3593
+ add_entry = {
3594
+ name = attitude_protective_DIPLO_ATTITUDE_TT
3595
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_protective } } }
3596
+ export_to_variable = { variable_name = ai_value value = 1 }
3597
+ multiply_variable = { which = ai_value value = 1000 }
3598
+ }
3599
+ add_entry = {
3600
+ name = DIPLO_BORDER_DISTANCE_TT
3601
+ export_to_variable = {
3602
+ variable_name = ai_value
3603
+ value = border_distance
3604
+ who = FROM
3605
+ with = ROOT
3606
+ }
3607
+ #4 units = -1
3608
+ multiply_variable = {
3609
+ which = ai_value
3610
+ value = -0.25
3611
+ }
3612
+ }
3613
+ add_entry = {
3614
+ name = ADDITIONAL_REASONS_FROM_EVENTS_AND_MISSIONS_TO_ACCEPT_TT
3615
+ limit = { has_country_flag = easier_to_get_into_persian_sphere }
3616
+ export_to_variable = { variable_name = ai_value value = 1 }
3617
+ multiply_variable = { which = ai_value value = 25 }
3618
+ }
3619
+ }
3620
+ }
3621
+
3622
+ # Create Vassal out of Influenced Country
3623
+ elevate_influenced_country_to_vassal = {
3624
+ category = influence
3625
+
3626
+ alert_index = 61
3627
+ alert_tooltip = elevate_influenced_country_to_vassal_alert_tooltip
3628
+
3629
+ require_acceptance = yes
3630
+
3631
+ is_visible = {
3632
+ has_government_mechanic = persian_influence_mechanic
3633
+ FROM = {
3634
+ is_subject_of = ROOT
3635
+ is_subject_of_type = cultural_sphere_of_influence_subject
3636
+ }
3637
+ }
3638
+ is_allowed = {
3639
+ if = {
3640
+ limit = {
3641
+ FROM = { liberty_desire = 50 }
3642
+ }
3643
+ custom_trigger_tooltip = {
3644
+ tooltip = FROM_IS_REBELLIOUS_TT
3645
+ FROM = { liberty_desire = 50 }
3646
+ }
3647
+ }
3648
+ if = {
3649
+ limit = {
3650
+ has_global_modifier_value = {
3651
+ which = influence_to_vassal_elevation_cost
3652
+ value = 100
3653
+ }
3654
+ }
3655
+ custom_trigger_tooltip = {
3656
+ tooltip = COST_HIGHER_THAN_OUR_MAX_INFLUENCE_TT
3657
+ NOT = {
3658
+ has_global_modifier_value = {
3659
+ which = influence_to_vassal_elevation_cost
3660
+ value = 100
3661
+ }
3662
+ }
3663
+ }
3664
+ }
3665
+ if = {
3666
+ limit = {
3667
+ FROM = { NOT = { primary_culture = root } }
3668
+ }
3669
+ custom_trigger_tooltip = {
3670
+ tooltip = FROM_HAS_NOT_OUR_PRIMARY_CULTURE_TT
3671
+ FROM = { primary_culture = root }
3672
+ }
3673
+ }
3674
+ if = {
3675
+ limit = { NOT = { has_enough_persian_influence_to_elevate = yes } }
3676
+ custom_trigger_tooltip = {
3677
+ tooltip = HAS_ENOUGH_PERSIAN_INFLUENCE_TT
3678
+ has_enough_persian_influence_to_elevate = yes
3679
+ }
3680
+ }
3681
+ }
3682
+ on_accept = {
3683
+ export_to_variable = {
3684
+ which = PERSIAN_INFLUENCE_COST
3685
+ value = modifier:influence_to_vassal_elevation_cost
3686
+ }
3687
+ while = {
3688
+ limit = {
3689
+ check_variable = {
3690
+ which = PERSIAN_INFLUENCE_COST
3691
+ value = 1
3692
+ }
3693
+ }
3694
+ subtract_variable = {
3695
+ which = PERSIAN_INFLUENCE_COST
3696
+ value = 1
3697
+ }
3698
+ add_government_power = {
3699
+ mechanic_type = persian_influence_mechanic
3700
+ power_type = persian_influence
3701
+ value = -1
3702
+ scaled_with_gain_modifier = no
3703
+ }
3704
+ }
3705
+ consume_persian_influence_reduction = yes
3706
+ change_variable = {
3707
+ which = persian_influence_elevation_counter
3708
+ value = 1
3709
+ }
3710
+ from = {
3711
+ country_event = {
3712
+ id = persian_influence_events.100
3713
+ }
3714
+ }
3715
+ if = {
3716
+ limit = { has_country_flag = improved_elevation_effect }
3717
+ add_historical_friend = from
3718
+ from = { add_historical_friend = root }
3719
+ }
3720
+ }
3721
+ on_decline = {
3722
+ }
3723
+
3724
+ ai_will_do = { # this is a trigger
3725
+ always = yes #There is never a reason for the Ottomans to not want to integrate their eyalets
3726
+ }
3727
+
3728
+ ai_acceptance = {
3729
+ add_entry = {
3730
+ name = DIPLO_OPPINION
3731
+ export_to_variable = {
3732
+ variable_name = ai_value
3733
+ value = opinion
3734
+ who = FROM
3735
+ with = ROOT
3736
+ }
3737
+ multiply_variable = {
3738
+ which = ai_value
3739
+ value = 0.2
3740
+ }
3741
+ }
3742
+ add_entry = {
3743
+ name = AI_TRUST_TOWARDS_ROOT
3744
+ export_to_variable = {
3745
+ variable_name = ai_value
3746
+ value = trust
3747
+ who = FROM
3748
+ with = ROOT
3749
+ }
3750
+ subtract_variable = {
3751
+ which = ai_value
3752
+ value = 50
3753
+ }
3754
+ #1 trust = +4 ai points
3755
+ multiply_variable = {
3756
+ which = ai_value
3757
+ value = 0.4
3758
+ }
3759
+ }
3760
+ add_entry = {
3761
+ name = AI_DIPLOMATIC_REPUTATION
3762
+ export_to_variable = {
3763
+ variable_name = ai_value
3764
+ value = trigger_value:diplomatic_reputation
3765
+ }
3766
+ #1 rep = 4
3767
+ multiply_variable = {
3768
+ which = ai_value
3769
+ value = 4
3770
+ }
3771
+ }
3772
+ add_entry = {
3773
+ name = AI_TOTAL_DEVELOPMENT
3774
+ export_to_variable = {
3775
+ variable_name = ai_value
3776
+ value = total_development
3777
+ who = FROM
3778
+ }
3779
+ #4 dev = -1
3780
+ multiply_variable = {
3781
+ which = ai_value
3782
+ value = -0.25
3783
+ }
3784
+ }
3785
+ add_entry = {
3786
+ name = HAS_BONUS_REIGN_IN_REASON
3787
+ limit = {
3788
+ has_country_flag = tur_reduced_requirements_for_core_eyalet
3789
+ }
3790
+ export_to_variable = {
3791
+ variable_name = ai_value
3792
+ value = 1
3793
+ }
3794
+ multiply_variable = {
3795
+ which = ai_value
3796
+ value = 20
3797
+ }
3798
+ }
3799
+ add_entry = {
3800
+ name = AI_LIBERTY_DESIRE
3801
+ export_to_variable = {
3802
+ variable_name = ai_value
3803
+ value = liberty_desire
3804
+ who = FROM
3805
+ }
3806
+ multiply_variable = {
3807
+ which = ai_value
3808
+ value = -1
3809
+ }
3810
+ }
3811
+ }
3812
+ }
3813
+
3814
+ # Fabricate Spread the True Faith cb
3815
+ fabricate_spread_the_true_faith_cb = {
3816
+ category = covert
3817
+
3818
+ require_acceptance = no
3819
+
3820
+ is_visible = {
3821
+ has_unlocked_diplomatic_action = { type = fabricate_spread_the_true_faith_cb }
3822
+ NOT = { religion = from }
3823
+ }
3824
+ is_allowed = {
3825
+ if = {
3826
+ limit = {
3827
+ NOT = {
3828
+ has_spy_network_in = {
3829
+ who = FROM
3830
+ value = 30
3831
+ }
3832
+ }
3833
+ NOT = { full_idea_group = spy_ideas }
3834
+ NOT = { has_country_flag = reduced_spread_faith_cb_spy_cost }
3835
+ }
3836
+ custom_trigger_tooltip = {
3837
+ tooltip = REQUIRES_30_SPY_NETWORK_TT
3838
+ has_spy_network_in = {
3839
+ who = FROM
3840
+ value = 30
3841
+ }
3842
+ }
3843
+ }
3844
+ if = {
3845
+ limit = {
3846
+ NOT = {
3847
+ has_spy_network_in = {
3848
+ who = FROM
3849
+ value = 24
3850
+ }
3851
+ }
3852
+ full_idea_group = spy_ideas
3853
+ NOT = { has_country_flag = reduced_spread_faith_cb_spy_cost }
3854
+ }
3855
+ custom_trigger_tooltip = {
3856
+ tooltip = REQUIRES_24_SPY_NETWORK_TT
3857
+ has_spy_network_in = {
3858
+ who = FROM
3859
+ value = 24
3860
+ }
3861
+ }
3862
+ }
3863
+ if = {
3864
+ limit = {
3865
+ NOT = {
3866
+ has_spy_network_in = {
3867
+ who = FROM
3868
+ value = 10
3869
+ }
3870
+ }
3871
+ NOT = { full_idea_group = spy_ideas }
3872
+ has_country_flag = reduced_spread_faith_cb_spy_cost
3873
+ }
3874
+ custom_trigger_tooltip = {
3875
+ tooltip = REQUIRES_10_SPY_NETWORK_TT
3876
+ has_spy_network_in = {
3877
+ who = FROM
3878
+ value = 10
3879
+ }
3880
+ }
3881
+ }
3882
+ if = {
3883
+ limit = {
3884
+ NOT = {
3885
+ has_spy_network_in = {
3886
+ who = FROM
3887
+ value = 8
3888
+ }
3889
+ }
3890
+ full_idea_group = spy_ideas
3891
+ has_country_flag = reduced_spread_faith_cb_spy_cost
3892
+ }
3893
+ custom_trigger_tooltip = {
3894
+ tooltip = REQUIRES_8_SPY_NETWORK_TT
3895
+ has_spy_network_in = {
3896
+ who = FROM
3897
+ value = 8
3898
+ }
3899
+ }
3900
+ }
3901
+ if = {
3902
+ limit = {
3903
+ has_casus_belli = {
3904
+ type = cb_spread_the_true_faith
3905
+ target = FROM
3906
+ }
3907
+ }
3908
+ custom_trigger_tooltip = {
3909
+ tooltip = HAS_SPREAD_THE_TRUE_FAITH_CB_ALREADY_TT
3910
+ NOT = {
3911
+ has_casus_belli = {
3912
+ type = cb_spread_the_true_faith
3913
+ target = FROM
3914
+ }
3915
+ }
3916
+ }
3917
+ }
3918
+ if = {
3919
+ limit = {
3920
+ FROM = { is_subject = yes }
3921
+ }
3922
+ custom_trigger_tooltip = {
3923
+ tooltip = CANNOT_DO_ACTION_TO_SUBJECTS_TT
3924
+ FROM = { is_subject = no }
3925
+ }
3926
+ }
3927
+ if = {
3928
+ limit = {
3929
+ NOT = {
3930
+ FROM = {
3931
+ capital_scope = {
3932
+ trade_range = ROOT
3933
+ }
3934
+ }
3935
+ }
3936
+ }
3937
+ custom_trigger_tooltip = {
3938
+ tooltip = REQUIRES_CAPITAL_IN_TRADE_RANGE_TT
3939
+ FROM = {
3940
+ capital_scope = {
3941
+ trade_range = ROOT
3942
+ }
3943
+ }
3944
+ }
3945
+ }
3946
+ }
3947
+ on_accept = {
3948
+ if = {
3949
+ limit = {
3950
+ full_idea_group = spy_ideas
3951
+ has_country_flag = reduced_spread_faith_cb_spy_cost
3952
+ }
3953
+ add_spy_network_in = {
3954
+ who = FROM
3955
+ value = -8
3956
+ }
3957
+ }
3958
+ else_if = {
3959
+ limit = {
3960
+ NOT = { full_idea_group = spy_ideas }
3961
+ has_country_flag = reduced_spread_faith_cb_spy_cost
3962
+ }
3963
+ add_spy_network_in = {
3964
+ who = FROM
3965
+ value = -10
3966
+ }
3967
+ }
3968
+ else_if = {
3969
+ limit = {
3970
+ full_idea_group = spy_ideas
3971
+ NOT = { has_country_flag = reduced_spread_faith_cb_spy_cost }
3972
+ }
3973
+ add_spy_network_in = {
3974
+ who = FROM
3975
+ value = -24
3976
+ }
3977
+ }
3978
+ else = {
3979
+ add_spy_network_in = {
3980
+ who = FROM
3981
+ value = -30
3982
+ }
3983
+ }
3984
+ add_casus_belli = {
3985
+ target = FROM
3986
+ type = cb_spread_the_true_faith
3987
+ months = 60
3988
+ }
3989
+ }
3990
+ on_decline = {
3991
+ }
3992
+
3993
+ ai_will_do = { # this is a trigger
3994
+ has_spy_network_in = {
3995
+ who = FROM
3996
+ value = 50
3997
+ }
3998
+ }
3999
+ }
4000
+
4001
+ # Change primary culture of target
4002
+ promote_primary_culture = {
4003
+ category = influence
4004
+
4005
+ alert_index = 65
4006
+ alert_tooltip = promote_primary_culture_alert_tooltip
4007
+
4008
+ require_acceptance = yes
4009
+
4010
+ is_visible = {
4011
+ has_government_mechanic = persian_influence_mechanic
4012
+ }
4013
+ is_allowed = {
4014
+ if = {
4015
+ limit = {
4016
+ FROM = { primary_culture = root }
4017
+ }
4018
+ custom_trigger_tooltip = {
4019
+ tooltip = FROM_HAS_OUR_PRIMARY_CULTURE_TT
4020
+ FROM = { NOT = { primary_culture = root } }
4021
+ }
4022
+ }
4023
+ if = {
4024
+ limit = { NOT = { has_government_power = { mechanic_type = persian_influence_mechanic power_type = persian_influence value = 10 } } }
4025
+ custom_trigger_tooltip = {
4026
+ tooltip = HAS_NOT_10_PERSIAN_INFLUENCE_TT
4027
+ has_government_power = { mechanic_type = persian_influence_mechanic power_type = persian_influence value = 10 }
4028
+ }
4029
+ }
4030
+ if = {
4031
+ limit = { FROM = { NOT = { is_subject_of = root } NOT = { guaranteed_by = root } } }
4032
+ custom_trigger_tooltip = {
4033
+ tooltip = FROM_IS_NEITHER_GUARANTEED_NOR_SUBJECT_TT
4034
+ FROM = {
4035
+ OR = {
4036
+ is_subject_of = root
4037
+ guaranteed_by = root
4038
+ }
4039
+ }
4040
+ }
4041
+ }
4042
+ if = {
4043
+ limit = { war_with = from }
4044
+ custom_trigger_tooltip = {
4045
+ tooltip = WAR_WITH_FROM_TT
4046
+ NOT = { war_with = from }
4047
+ }
4048
+ }
4049
+ }
4050
+ on_accept = {
4051
+ change_variable = {
4052
+ which = num_of_forced_culture_conversions
4053
+ value = 1
4054
+ }
4055
+ from = {
4056
+ change_primary_culture = root
4057
+ }
4058
+ add_government_power = {
4059
+ mechanic_type = persian_influence_mechanic
4060
+ power_type = persian_influence
4061
+ value = -10
4062
+ scaled_with_gain_modifier = no
4063
+ }
4064
+ }
4065
+ on_decline = {
4066
+ }
4067
+
4068
+ ai_will_do = { # this is a trigger
4069
+ has_government_power = {
4070
+ mechanic_type = persian_influence_mechanic
4071
+ power_type = persian_influence
4072
+ value = 100
4073
+ }
4074
+ OR = {
4075
+ ai_attitude = {
4076
+ who = FROM
4077
+ attitude = attitude_friendly
4078
+ }
4079
+ ai_attitude = {
4080
+ who = FROM
4081
+ attitude = attitude_protective
4082
+ }
4083
+ FROM = {
4084
+ any_neighbor_country = {
4085
+ NOT = { tag = ROOT }
4086
+ FROM = {
4087
+ ai_attitude = {
4088
+ who = PREV
4089
+ attitude = attitude_threatened
4090
+ }
4091
+ }
4092
+ }
4093
+ }
4094
+ FROM = {
4095
+ ai_attitude = {
4096
+ who = ROOT
4097
+ attitude = attitude_threatened
4098
+ }
4099
+ }
4100
+ }
4101
+ NOT = {
4102
+ ai_attitude = {
4103
+ who = FROM
4104
+ attitude = attitude_domineering
4105
+ }
4106
+ }
4107
+ NOT = {
4108
+ ai_attitude = {
4109
+ who = FROM
4110
+ attitude = attitude_hostile
4111
+ }
4112
+ }
4113
+ NOT = {
4114
+ ai_attitude = {
4115
+ who = FROM
4116
+ attitude = attitude_outraged
4117
+ }
4118
+ }
4119
+ NOT = {
4120
+ ai_attitude = {
4121
+ who = FROM
4122
+ attitude = attitude_rebellious
4123
+ }
4124
+ }
4125
+ NOT = {
4126
+ ai_attitude = {
4127
+ who = FROM
4128
+ attitude = attitude_disloyal
4129
+ }
4130
+ }
4131
+ has_opinion = {
4132
+ who = FROM
4133
+ value = 100
4134
+ }
4135
+ }
4136
+
4137
+ ai_acceptance = {
4138
+ add_entry = {
4139
+ name = DIPLO_OPPINION
4140
+ export_to_variable = {
4141
+ variable_name = ai_value
4142
+ value = opinion
4143
+ who = FROM
4144
+ with = ROOT
4145
+ }
4146
+ multiply_variable = {
4147
+ which = ai_value
4148
+ value = 0.2
4149
+ }
4150
+ }
4151
+ add_entry = {
4152
+ name = AI_TRUST_TOWARDS_ROOT
4153
+ export_to_variable = {
4154
+ variable_name = ai_value
4155
+ value = trust
4156
+ who = FROM
4157
+ with = ROOT
4158
+ }
4159
+ subtract_variable = {
4160
+ which = ai_value
4161
+ value = 50
4162
+ }
4163
+ #1 trust = +4 ai points
4164
+ multiply_variable = {
4165
+ which = ai_value
4166
+ value = 0.4
4167
+ }
4168
+ }
4169
+ add_entry = {
4170
+ name = AI_DIPLOMATIC_REPUTATION
4171
+ export_to_variable = {
4172
+ variable_name = ai_value
4173
+ value = trigger_value:diplomatic_reputation
4174
+ }
4175
+ #1 rep = 4
4176
+ multiply_variable = {
4177
+ which = ai_value
4178
+ value = 4
4179
+ }
4180
+ }
4181
+ add_entry = {
4182
+ name = AI_TOTAL_DEVELOPMENT
4183
+ export_to_variable = {
4184
+ variable_name = ai_value
4185
+ value = total_development
4186
+ who = FROM
4187
+ }
4188
+ #4 dev = -1
4189
+ multiply_variable = {
4190
+ which = ai_value
4191
+ value = -0.25
4192
+ }
4193
+ }
4194
+ add_entry = {
4195
+ name = attitude_neutral_DIPLO_ATTITUDE_TT
4196
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_neutral } } }
4197
+ export_to_variable = { variable_name = ai_value value = 1 }
4198
+ multiply_variable = { which = ai_value value = -20 }
4199
+ }
4200
+ add_entry = {
4201
+ name = attitude_rivalry_DIPLO_ATTITUDE_TT
4202
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_rivalry } } }
4203
+ export_to_variable = { variable_name = ai_value value = 1 }
4204
+ multiply_variable = { which = ai_value value = -1000 }
4205
+ }
4206
+ add_entry = {
4207
+ name = attitude_hostile_DIPLO_ATTITUDE_TT
4208
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_hostile } } }
4209
+ export_to_variable = { variable_name = ai_value value = 1 }
4210
+ multiply_variable = { which = ai_value value = -1000 }
4211
+ }
4212
+ add_entry = {
4213
+ name = attitude_friendly_DIPLO_ATTITUDE_TT
4214
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_friendly } } }
4215
+ export_to_variable = { variable_name = ai_value value = 1 }
4216
+ multiply_variable = { which = ai_value value = 20 }
4217
+ }
4218
+ add_entry = {
4219
+ name = attitude_threatened_DIPLO_ATTITUDE_TT
4220
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_threatened } } }
4221
+ export_to_variable = { variable_name = ai_value value = 1 }
4222
+ multiply_variable = { which = ai_value value = 50 }
4223
+ }
4224
+ add_entry = {
4225
+ name = attitude_outraged_DIPLO_ATTITUDE_TT
4226
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_outraged } } }
4227
+ export_to_variable = { variable_name = ai_value value = 1 }
4228
+ multiply_variable = { which = ai_value value = -1000 }
4229
+ }
4230
+ add_entry = {
4231
+ name = attitude_domineering_DIPLO_ATTITUDE_TT
4232
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_domineering } } }
4233
+ export_to_variable = { variable_name = ai_value value = 1 }
4234
+ multiply_variable = { which = ai_value value = -1000 }
4235
+ }
4236
+ add_entry = {
4237
+ name = attitude_rebellious_DIPLO_ATTITUDE_TT
4238
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_rebellious } } }
4239
+ export_to_variable = { variable_name = ai_value value = 1 }
4240
+ multiply_variable = { which = ai_value value = -1000 }
4241
+ }
4242
+ add_entry = {
4243
+ name = attitude_disloyal_DIPLO_ATTITUDE_TT
4244
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_disloyal } } }
4245
+ export_to_variable = { variable_name = ai_value value = 1 }
4246
+ multiply_variable = { which = ai_value value = -100 }
4247
+ }
4248
+ add_entry = {
4249
+ name = AI_LIBERTY_DESIRE
4250
+ limit = {
4251
+ FROM = { is_subject_of = root liberty_desire = 50 }
4252
+ }
4253
+ export_to_variable = {
4254
+ variable_name = ai_value
4255
+ value = 1
4256
+ }
4257
+ multiply_variable = {
4258
+ which = ai_value
4259
+ value = -1000
4260
+ }
4261
+ }
4262
+ }
4263
+ }
4264
+
4265
+ send_royal_ambassador = {
4266
+ category = covert
4267
+
4268
+ require_acceptance = no
4269
+
4270
+ is_visible = {
4271
+ OR = {
4272
+ has_government_mechanic = persian_influence_mechanic
4273
+ has_government_mechanic = the_three_royal_fires_mechanic
4274
+ }
4275
+ has_unlocked_diplomatic_action = { type = send_royal_ambassador }
4276
+ }
4277
+ is_allowed = {
4278
+ if = {
4279
+ limit = {
4280
+ has_government_mechanic = persian_influence_mechanic
4281
+ NOT = { has_government_power = { mechanic_type = persian_influence_mechanic power_type = persian_influence value = 25 } }
4282
+ }
4283
+ custom_trigger_tooltip = {
4284
+ tooltip = HAS_NOT_25_PERSIAN_INFLUENCE_TT
4285
+ has_government_power = { mechanic_type = persian_influence_mechanic power_type = persian_influence value = 25 }
4286
+ }
4287
+ }
4288
+ if = {
4289
+ limit = {
4290
+ has_government_mechanic = the_three_royal_fires_mechanic
4291
+ NOT = { has_government_power = { mechanic_type = the_three_royal_fires_mechanic power_type = asha_vahishta value = 25 } }
4292
+ }
4293
+ custom_trigger_tooltip = {
4294
+ tooltip = HAS_NOT_25_ASHA_VAHISHTA_TT
4295
+ has_government_power = { mechanic_type = the_three_royal_fires_mechanic power_type = asha_vahishta value = 25 }
4296
+ }
4297
+ }
4298
+ if = {
4299
+ limit = { war_with = from }
4300
+ custom_trigger_tooltip = {
4301
+ tooltip = WAR_WITH_FROM_TT
4302
+ NOT = { war_with = from }
4303
+ }
4304
+ }
4305
+ #if = {
4306
+ # limit = {
4307
+ # FROM = { is_subject = yes }
4308
+ # }
4309
+ # custom_trigger_tooltip = {
4310
+ # tooltip = CANNOT_DO_ACTION_TO_SUBJECTS_TT
4311
+ # FROM = { is_subject = no }
4312
+ # }
4313
+ #}
4314
+ if = {
4315
+ limit = {
4316
+ FROM = { has_opinion_modifier = { who = root modifier = royal_ambassador_visit } }
4317
+ }
4318
+ custom_trigger_tooltip = {
4319
+ tooltip = FROM_WAS_VISITED_BY_ROYAL_AMBASSADORS_TT
4320
+ FROM = { NOT = { has_opinion_modifier = { who = root modifier = royal_ambassador_visit } } }
4321
+ }
4322
+ }
4323
+ }
4324
+ on_accept = {
4325
+ reverse_add_opinion = {
4326
+ who = from
4327
+ modifier = royal_ambassador_visit
4328
+ }
4329
+ add_government_power = {
4330
+ mechanic_type = persian_influence_mechanic
4331
+ power_type = persian_influence
4332
+ value = -25
4333
+ scaled_with_gain_modifier = no
4334
+ }
4335
+ add_government_power = {
4336
+ mechanic_type = the_three_royal_fires_mechanic
4337
+ power_type = asha_vahishta
4338
+ value = -25
4339
+ }
4340
+ }
4341
+ on_decline = {
4342
+ }
4343
+
4344
+ ai_will_do = { # this is a trigger
4345
+ always = no
4346
+ }
4347
+ }
4348
+
4349
+ invite_to_zoroastrian_community = {
4350
+ category = influence
4351
+ require_acceptance = yes
4352
+
4353
+ alert_index = 62
4354
+ alert_tooltip = invite_to_zoroastrian_community_alert_tooltip
4355
+
4356
+ is_visible = {
4357
+ has_government_mechanic = the_three_royal_fires_mechanic
4358
+ is_subject = no
4359
+ FROM = { is_subject = no }
4360
+ NOT = { religion = from }
4361
+ }
4362
+ is_allowed = {
4363
+ if = {
4364
+ limit = {
4365
+ NOT = {
4366
+ FROM = {
4367
+ capital_scope = {
4368
+ trade_range = ROOT
4369
+ }
4370
+ }
4371
+ }
4372
+ }
4373
+ custom_trigger_tooltip = {
4374
+ tooltip = REQUIRES_CAPITAL_IN_TRADE_RANGE_TT
4375
+ FROM = {
4376
+ capital_scope = {
4377
+ trade_range = ROOT
4378
+ }
4379
+ }
4380
+ }
4381
+ }
4382
+ if = {
4383
+ limit = {
4384
+ FROM = { is_at_war = yes }
4385
+ }
4386
+ custom_trigger_tooltip = {
4387
+ tooltip = FROM_IS_AT_WAR_TT
4388
+ FROM = { is_at_war = no }
4389
+ }
4390
+ }
4391
+ if = {
4392
+ limit = {
4393
+ is_at_war = yes
4394
+ }
4395
+ custom_trigger_tooltip = {
4396
+ tooltip = ROOT_IS_AT_WAR_TT
4397
+ is_at_war = no
4398
+ }
4399
+ }
4400
+ if = {
4401
+ limit = { FROM = { total_development = root } }
4402
+ custom_trigger_tooltip = {
4403
+ tooltip = FROM_MORE_DEV_THAN_ROOT_TT
4404
+ FROM = { NOT = { total_development = root } }
4405
+ }
4406
+ }
4407
+ if = {
4408
+ limit = { FROM = { tag = PAP } }
4409
+ custom_trigger_tooltip = {
4410
+ tooltip = FROM_IS_THE_POPE_TT
4411
+ FROM = { NOT = { tag = PAP } }
4412
+ }
4413
+ }
4414
+ if = {
4415
+ limit = { OR = { NOT = { has_country_flag = gained_first_invitation_charge } NOT = { check_variable = { which = zoroastrian_invitation_charges value = 1 } } } }
4416
+ custom_trigger_tooltip = {
4417
+ tooltip = ROOT_HAS_NO_INVITATION_CHARGES_TT
4418
+ check_variable = {
4419
+ which = zoroastrian_invitation_charges
4420
+ value = 1
4421
+ }
4422
+ has_country_flag = gained_first_invitation_charge
4423
+ }
4424
+ }
4425
+ }
4426
+ on_accept = {
4427
+ change_variable = {
4428
+ which = zoroastrian_invitation_charges
4429
+ value = -1
4430
+ }
4431
+ change_variable = {
4432
+ which = num_of_forced_conversions
4433
+ value = 1
4434
+ }
4435
+ FROM = {
4436
+ change_religion = root
4437
+ country_event = {
4438
+ id = flavor_per.72
4439
+ }
4440
+ }
4441
+ }
4442
+ on_decline = {
4443
+ FROM = {
4444
+ add_country_modifier = {
4445
+ name = just_asked_to_convert_timer
4446
+ duration = 18250
4447
+ }
4448
+ }
4449
+ }
4450
+
4451
+ ai_will_do = { # this is a trigger
4452
+ OR = {
4453
+ ai_attitude = {
4454
+ who = FROM
4455
+ attitude = attitude_friendly
4456
+ }
4457
+ ai_attitude = {
4458
+ who = FROM
4459
+ attitude = attitude_protective
4460
+ }
4461
+ FROM = {
4462
+ any_neighbor_country = {
4463
+ NOT = { tag = ROOT }
4464
+ FROM = {
4465
+ ai_attitude = {
4466
+ who = PREV
4467
+ attitude = attitude_threatened
4468
+ }
4469
+ }
4470
+ }
4471
+ }
4472
+ FROM = {
4473
+ ai_attitude = {
4474
+ who = ROOT
4475
+ attitude = attitude_threatened
4476
+ }
4477
+ }
4478
+ }
4479
+ NOT = {
4480
+ ai_attitude = {
4481
+ who = FROM
4482
+ attitude = attitude_domineering
4483
+ }
4484
+ }
4485
+ NOT = {
4486
+ ai_attitude = {
4487
+ who = FROM
4488
+ attitude = attitude_hostile
4489
+ }
4490
+ }
4491
+ NOT = {
4492
+ ai_attitude = {
4493
+ who = FROM
4494
+ attitude = attitude_outraged
4495
+ }
4496
+ }
4497
+ has_opinion = {
4498
+ who = FROM
4499
+ value = 50
4500
+ }
4501
+ NOT = {
4502
+ FROM = {
4503
+ has_country_modifier = just_asked_to_convert_timer
4504
+ }
4505
+ }
4506
+ }
4507
+
4508
+ ai_acceptance = {
4509
+ add_entry = {
4510
+ name = DIPLO_OPPINION
4511
+ export_to_variable = {
4512
+ variable_name = ai_value
4513
+ value = opinion
4514
+ who = FROM
4515
+ with = ROOT
4516
+ }
4517
+ multiply_variable = {
4518
+ which = ai_value
4519
+ value = 0.125
4520
+ }
4521
+ }
4522
+ add_entry = {
4523
+ name = AI_TRUST_TOWARDS_ROOT
4524
+ export_to_variable = {
4525
+ variable_name = ai_value
4526
+ value = trust
4527
+ who = FROM
4528
+ with = ROOT
4529
+ }
4530
+ subtract_variable = {
4531
+ which = ai_value
4532
+ value = 50
4533
+ }
4534
+ #1 trust = +4 ai points
4535
+ multiply_variable = {
4536
+ which = ai_value
4537
+ value = 0.4
4538
+ }
4539
+ }
4540
+ add_entry = {
4541
+ name = AI_DIPLOMATIC_REPUTATION
4542
+ export_to_variable = {
4543
+ variable_name = ai_value
4544
+ value = trigger_value:diplomatic_reputation
4545
+ }
4546
+ #1 rep = 3
4547
+ multiply_variable = {
4548
+ which = ai_value
4549
+ value = 3
4550
+ }
4551
+ }
4552
+ add_entry = {
4553
+ name = AI_TOTAL_DEVELOPMENT
4554
+ export_to_variable = {
4555
+ variable_name = ai_value
4556
+ value = total_development
4557
+ who = FROM
4558
+ }
4559
+ #4 dev = -1
4560
+ multiply_variable = {
4561
+ which = ai_value
4562
+ value = -0.25
4563
+ }
4564
+ }
4565
+ add_entry = {
4566
+ name = attitude_neutral_DIPLO_ATTITUDE_TT
4567
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_neutral } } }
4568
+ export_to_variable = { variable_name = ai_value value = 1 }
4569
+ multiply_variable = { which = ai_value value = -10 }
4570
+ }
4571
+ add_entry = {
4572
+ name = attitude_rivalry_DIPLO_ATTITUDE_TT
4573
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_rivalry } } }
4574
+ export_to_variable = { variable_name = ai_value value = 1 }
4575
+ multiply_variable = { which = ai_value value = -1000 }
4576
+ }
4577
+ add_entry = {
4578
+ name = attitude_hostile_DIPLO_ATTITUDE_TT
4579
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_hostile } } }
4580
+ export_to_variable = { variable_name = ai_value value = 1 }
4581
+ multiply_variable = { which = ai_value value = -1000 }
4582
+ }
4583
+ add_entry = {
4584
+ name = attitude_friendly_DIPLO_ATTITUDE_TT
4585
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_friendly } } }
4586
+ export_to_variable = { variable_name = ai_value value = 1 }
4587
+ multiply_variable = { which = ai_value value = 20 }
4588
+ }
4589
+ add_entry = {
4590
+ name = attitude_threatened_DIPLO_ATTITUDE_TT
4591
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_threatened } } }
4592
+ export_to_variable = { variable_name = ai_value value = 1 }
4593
+ multiply_variable = { which = ai_value value = 20 }
4594
+ }
4595
+ add_entry = {
4596
+ name = attitude_outraged_DIPLO_ATTITUDE_TT
4597
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_outraged } } }
4598
+ export_to_variable = { variable_name = ai_value value = 1 }
4599
+ multiply_variable = { which = ai_value value = -1000 }
4600
+ }
4601
+ add_entry = {
4602
+ name = attitude_domineering_DIPLO_ATTITUDE_TT
4603
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_domineering } } }
4604
+ export_to_variable = { variable_name = ai_value value = 1 }
4605
+ multiply_variable = { which = ai_value value = -1000 }
4606
+ }
4607
+ add_entry = {
4608
+ name = DIPLO_BORDER_DISTANCE_TT
4609
+ export_to_variable = {
4610
+ variable_name = ai_value
4611
+ value = border_distance
4612
+ who = FROM
4613
+ with = ROOT
4614
+ }
4615
+ #4 units = -1
4616
+ multiply_variable = {
4617
+ which = ai_value
4618
+ value = -0.25
4619
+ }
4620
+ }
4621
+ add_entry = {
4622
+ name = ADDITIONAL_REASONS_FROM_EVENTS_AND_MISSIONS_TO_ACCEPT_TT
4623
+ limit = { FROM = { has_country_flag = easier_to_get_into_persian_sphere } }
4624
+ export_to_variable = { variable_name = ai_value value = 1 }
4625
+ multiply_variable = { which = ai_value value = 25 }
4626
+ }
4627
+ }
4628
+ }
4629
+
4630
+ mam_export_grain = {
4631
+ category = economy
4632
+
4633
+ require_acceptance = yes
4634
+
4635
+ alert_index = 63
4636
+ alert_tooltip = export_grain_alert_tooltip
4637
+
4638
+ is_visible = {
4639
+ has_country_flag = enable_export_grain_dip_action_flag
4640
+ owns = 362
4641
+ owns = 363
4642
+ owns = 2316
4643
+ owns = 4316
4644
+ }
4645
+ is_allowed = {
4646
+ if = {
4647
+ limit = {
4648
+ NOT = {
4649
+ OR = {
4650
+ alliance_with = FROM
4651
+ FROM = { is_subject_of = ROOT }
4652
+ }
4653
+ }
4654
+ }
4655
+ custom_trigger_tooltip = {
4656
+ tooltip = REQUIRES_ALLIANCE_OR_SUBJECT_TT
4657
+ OR = {
4658
+ alliance_with = FROM
4659
+ FROM = { is_subject_of = ROOT }
4660
+ }
4661
+ }
4662
+ }
4663
+ if = {
4664
+ limit = {
4665
+ FROM = { has_ruler_flag = trading_grain_exports_flag }
4666
+ }
4667
+ custom_trigger_tooltip = {
4668
+ tooltip = is_already_trading_grain_tt
4669
+ FROM = {
4670
+ NOT = { has_ruler_flag = trading_grain_exports_flag }
4671
+ }
4672
+ }
4673
+ }
4674
+ if = {
4675
+ limit = {
4676
+ NOT = {
4677
+ any_owned_province = {
4678
+ province_distance = {
4679
+ who = FROM
4680
+ distance = 150
4681
+ }
4682
+ }
4683
+ }
4684
+ }
4685
+ custom_trigger_tooltip = {
4686
+ tooltip = must_be_within_distance_tt
4687
+ any_owned_province = {
4688
+ province_distance = {
4689
+ who = FROM
4690
+ distance = 150
4691
+ }
4692
+ }
4693
+ }
4694
+ }
4695
+ if = {
4696
+ limit = {
4697
+ calc_true_if = {
4698
+ all_country = {
4699
+ has_ruler_flag = trading_grain_exports_flag
4700
+ }
4701
+ amount = 4
4702
+ }
4703
+ NOT = { has_country_flag = increase_exports_to_6_flag }
4704
+ }
4705
+ custom_trigger_tooltip = {
4706
+ tooltip = mam_no_more_than_4_trades_tt
4707
+ NOT = {
4708
+ calc_true_if = {
4709
+ all_country = {
4710
+ has_ruler_flag = trading_grain_exports_flag
4711
+ }
4712
+ amount = 4
4713
+ }
4714
+ }
4715
+ }
4716
+ }
4717
+ else = {
4718
+ custom_trigger_tooltip = {
4719
+ tooltip = mam_no_more_than_6_trades_tt
4720
+ NOT = {
4721
+ calc_true_if = {
4722
+ all_country = {
4723
+ has_ruler_flag = trading_grain_exports_flag
4724
+ }
4725
+ amount = 6
4726
+ }
4727
+ }
4728
+ }
4729
+ }
4730
+ if = {
4731
+ limit = {
4732
+ NOT = { adm_power = 50 }
4733
+ }
4734
+ custom_trigger_tooltip = {
4735
+ tooltip = NOT_ENOUGH_RESOURCES
4736
+ adm_power = 50
4737
+ }
4738
+ }
4739
+ }
4740
+ on_accept = {
4741
+ FROM = {
4742
+ set_ruler_flag = trading_grain_exports_flag
4743
+ add_ruler_modifier = {
4744
+ name = grain_trade_imports_modifier
4745
+ duration = -1
4746
+ }
4747
+ add_opinion = {
4748
+ who = ROOT
4749
+ modifier = engaged_in_grain_trade_modifier
4750
+ }
4751
+ }
4752
+ if = {
4753
+ limit = {
4754
+ NOT = { has_country_flag = exported_grain_in_europe }
4755
+ FROM = {
4756
+ capital_scope = {
4757
+ continent = europe
4758
+ }
4759
+ }
4760
+ }
4761
+ set_country_flag = exported_grain_in_europe
4762
+ }
4763
+ if = {
4764
+ limit = {
4765
+ NOT = { has_country_flag = exported_grain_in_oceania }
4766
+ FROM = {
4767
+ capital_scope = {
4768
+ continent = oceania
4769
+ }
4770
+ }
4771
+ }
4772
+ set_country_flag = exported_grain_in_oceania
4773
+ }
4774
+ if = {
4775
+ limit = {
4776
+ NOT = { has_country_flag = exported_grain_in_north_america }
4777
+ FROM = {
4778
+ capital_scope = {
4779
+ continent = north_america
4780
+ }
4781
+ }
4782
+
4783
+ }
4784
+ set_country_flag = exported_grain_in_north_america
4785
+ }
4786
+ if = {
4787
+ limit = {
4788
+ NOT = { has_country_flag = exported_grain_in_south_america }
4789
+ FROM = {
4790
+ capital_scope = {
4791
+ continent = south_america
4792
+ }
4793
+ }
4794
+
4795
+ }
4796
+ set_country_flag = exported_grain_in_south_america
4797
+ }
4798
+ if = {
4799
+ limit = {
4800
+ NOT = { has_country_flag = exported_grain_in_africa }
4801
+ FROM = {
4802
+ capital_scope = {
4803
+ continent = africa
4804
+ }
4805
+ }
4806
+ }
4807
+ set_country_flag = exported_grain_in_africa
4808
+ }
4809
+ if = {
4810
+ limit = {
4811
+ NOT = { has_country_flag = exported_grain_in_asia }
4812
+ FROM = {
4813
+ capital_scope = {
4814
+ continent = asia
4815
+ }
4816
+ }
4817
+ }
4818
+ set_country_flag = exported_grain_in_asia
4819
+ }
4820
+ add_adm_power = -50
4821
+ add_mercantilism = 2
4822
+ }
4823
+ on_decline = {
4824
+ add_prestige_or_monarch_power = { amount = -10 }
4825
+ FROM = {
4826
+ add_country_modifier = {
4827
+ name = just_asked_to_convert_timer
4828
+ duration = 18250
4829
+ }
4830
+ }
4831
+ }
4832
+
4833
+ ai_will_do = { # this is a trigger
4834
+ NOT = {
4835
+ FROM = {
4836
+ has_country_modifier = just_asked_to_convert_timer
4837
+ }
4838
+ }
4839
+ OR = {
4840
+ ai_attitude = {
4841
+ who = FROM
4842
+ attitude = attitude_friendly
4843
+ }
4844
+ ai_attitude = {
4845
+ who = FROM
4846
+ attitude = attitude_loyal
4847
+ }
4848
+ ai_attitude = {
4849
+ who = FROM
4850
+ attitude = attitude_allied
4851
+ }
4852
+ ai_attitude = {
4853
+ who = FROM
4854
+ attitude = attitude_protective
4855
+ }
4856
+ }
4857
+ NOT = {
4858
+ ai_attitude = {
4859
+ who = FROM
4860
+ attitude = attitude_domineering
4861
+ }
4862
+ }
4863
+ NOT = {
4864
+ ai_attitude = {
4865
+ who = FROM
4866
+ attitude = attitude_hostile
4867
+ }
4868
+ }
4869
+ NOT = {
4870
+ ai_attitude = {
4871
+ who = FROM
4872
+ attitude = attitude_outraged
4873
+ }
4874
+ }
4875
+ has_opinion = {
4876
+ who = FROM
4877
+ value = 50
4878
+ }
4879
+ }
4880
+
4881
+ ai_acceptance = {
4882
+ add_entry = {
4883
+ name = DIPLO_OPPINION
4884
+ export_to_variable = {
4885
+ variable_name = ai_value
4886
+ value = opinion
4887
+ who = FROM
4888
+ with = ROOT
4889
+ }
4890
+ multiply_variable = {
4891
+ which = ai_value
4892
+ value = 0.125
4893
+ }
4894
+ }
4895
+ add_entry = {
4896
+ name = AI_TRUST_TOWARDS_ROOT
4897
+ export_to_variable = {
4898
+ variable_name = ai_value
4899
+ value = trust
4900
+ who = FROM
4901
+ with = ROOT
4902
+ }
4903
+ subtract_variable = {
4904
+ which = ai_value
4905
+ value = 50
4906
+ }
4907
+ #1 trust = +4 ai points
4908
+ multiply_variable = {
4909
+ which = ai_value
4910
+ value = 0.4
4911
+ }
4912
+ }
4913
+ add_entry = {
4914
+ name = AI_DIPLOMATIC_REPUTATION
4915
+ export_to_variable = {
4916
+ variable_name = ai_value
4917
+ value = trigger_value:diplomatic_reputation
4918
+ }
4919
+ #1 rep = 3
4920
+ multiply_variable = {
4921
+ which = ai_value
4922
+ value = 3
4923
+ }
4924
+ }
4925
+ add_entry = {
4926
+ name = attitude_neutral_DIPLO_ATTITUDE_TT
4927
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_neutral } } }
4928
+ export_to_variable = { variable_name = ai_value value = 1 }
4929
+ multiply_variable = { which = ai_value value = -10 }
4930
+ }
4931
+ add_entry = {
4932
+ name = attitude_rivalry_DIPLO_ATTITUDE_TT
4933
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_rivalry } } }
4934
+ export_to_variable = { variable_name = ai_value value = 1 }
4935
+ multiply_variable = { which = ai_value value = -1000 }
4936
+ }
4937
+ add_entry = {
4938
+ name = attitude_hostile_DIPLO_ATTITUDE_TT
4939
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_hostile } } }
4940
+ export_to_variable = { variable_name = ai_value value = 1 }
4941
+ multiply_variable = { which = ai_value value = -1000 }
4942
+ }
4943
+ add_entry = {
4944
+ name = attitude_friendly_DIPLO_ATTITUDE_TT
4945
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_friendly } } }
4946
+ export_to_variable = { variable_name = ai_value value = 1 }
4947
+ multiply_variable = { which = ai_value value = 20 }
4948
+ }
4949
+ add_entry = {
4950
+ name = attitude_threatened_DIPLO_ATTITUDE_TT
4951
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_threatened } } }
4952
+ export_to_variable = { variable_name = ai_value value = 1 }
4953
+ multiply_variable = { which = ai_value value = 20 }
4954
+ }
4955
+ add_entry = {
4956
+ name = attitude_outraged_DIPLO_ATTITUDE_TT
4957
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_outraged } } }
4958
+ export_to_variable = { variable_name = ai_value value = 1 }
4959
+ multiply_variable = { which = ai_value value = -1000 }
4960
+ }
4961
+ add_entry = {
4962
+ name = attitude_domineering_DIPLO_ATTITUDE_TT
4963
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_domineering } } }
4964
+ export_to_variable = { variable_name = ai_value value = 1 }
4965
+ multiply_variable = { which = ai_value value = -1000 }
4966
+ }
4967
+ add_entry = {
4968
+ name = DIPLO_BORDER_DISTANCE_TT
4969
+ export_to_variable = {
4970
+ variable_name = ai_value
4971
+ value = border_distance
4972
+ who = FROM
4973
+ with = ROOT
4974
+ }
4975
+ #5 units = -1
4976
+ multiply_variable = {
4977
+ which = ai_value
4978
+ value = -0.2
4979
+ }
4980
+ }
4981
+ }
4982
+ }
4983
+
4984
+ mam_sponsor_hajj = {
4985
+ category = influence
4986
+ require_acceptance = yes
4987
+
4988
+ alert_index = 64
4989
+ alert_tooltip = sponsor_hajj_alert_tooltip
4990
+
4991
+ is_visible = {
4992
+ has_country_flag = sponsor_hajj_dip_action_flag
4993
+ 384 = {
4994
+ country_or_non_sovereign_subject_holds = ROOT
4995
+ }
4996
+ 385 = {
4997
+ country_or_non_sovereign_subject_holds = ROOT
4998
+ }
4999
+ is_subject = no
5000
+ }
5001
+ is_allowed = {
5002
+ if = {
5003
+ limit = {
5004
+ NOT = {
5005
+ religion_group = muslim
5006
+ }
5007
+ }
5008
+ custom_trigger_tooltip = {
5009
+ tooltip = REQUIRES_ROOT_BEING_MUSLIM_TT
5010
+ religion_group = muslim
5011
+ }
5012
+ }
5013
+ if = {
5014
+ limit = {
5015
+ NOT = {
5016
+ FROM = { religion_group = muslim }
5017
+ }
5018
+ }
5019
+ custom_trigger_tooltip = {
5020
+ tooltip = REQUIRES_FROM_BEING_MUSLIM_TT
5021
+ FROM = { religion_group = muslim }
5022
+ }
5023
+ }
5024
+ if = {
5025
+ limit = {
5026
+ FROM = { has_ruler_flag = performed_hajj_already_flag }
5027
+ }
5028
+ custom_trigger_tooltip = {
5029
+ tooltip = from_has_performed_hajj_already_tt
5030
+ FROM = {
5031
+ NOT = { has_ruler_flag = performed_hajj_already_flag }
5032
+ }
5033
+ }
5034
+ }
5035
+ if = {
5036
+ limit = { war_with = FROM }
5037
+ custom_trigger_tooltip = {
5038
+ tooltip = WAR_WITH_FROM_TT
5039
+ NOT = { war_with = FROM }
5040
+ }
5041
+ }
5042
+ if = {
5043
+ limit = {
5044
+ OR = {
5045
+ is_rival = FROM
5046
+ is_enemy = FROM
5047
+ }
5048
+ }
5049
+ custom_trigger_tooltip = {
5050
+ tooltip = NOT_RIVAL_OR_ENEMY_TT
5051
+ NOT = {
5052
+ is_rival = FROM
5053
+ is_enemy = FROM
5054
+ }
5055
+ }
5056
+ }
5057
+ if = {
5058
+ limit = {
5059
+ calc_true_if = {
5060
+ all_country = {
5061
+ has_ruler_flag = performed_hajj_already_flag
5062
+ }
5063
+ amount = 4
5064
+ }
5065
+ }
5066
+ custom_trigger_tooltip = {
5067
+ tooltip = mam_no_more_than_4_hajj_tt
5068
+ NOT = {
5069
+ calc_true_if = {
5070
+ all_country = {
5071
+ has_ruler_flag = performed_hajj_already_flag
5072
+ }
5073
+ amount = 4
5074
+ }
5075
+ }
5076
+ }
5077
+ }
5078
+ if = {
5079
+ limit = {
5080
+ NOT = { treasury = 200 }
5081
+ }
5082
+ custom_trigger_tooltip = {
5083
+ tooltip = NOT_ENOUGH_RESOURCES_TREASURY_200
5084
+ treasury = 200
5085
+ }
5086
+ }
5087
+ if = {
5088
+ limit = {
5089
+ NOT = { dip_power = 50 }
5090
+ }
5091
+ custom_trigger_tooltip = {
5092
+ tooltip = NOT_ENOUGH_RESOURCES_DIP_50
5093
+ dip_power = 50
5094
+ }
5095
+ }
5096
+ }
5097
+ on_accept = {
5098
+ FROM = { set_ruler_flag = performed_hajj_already_flag }
5099
+ if = {
5100
+ limit = {
5101
+ has_dlc = "Cradle of Civilization"
5102
+ }
5103
+ FROM = {
5104
+ if = {
5105
+ limit = {
5106
+ NOT = { has_religious_school_of = ROOT }
5107
+ NOT = {
5108
+ school_opinion = {
5109
+ who = ROOT
5110
+ opinion = 1
5111
+ }
5112
+ }
5113
+ }
5114
+ if = {
5115
+ limit = {
5116
+ NOT = {
5117
+ school_opinion = {
5118
+ who = ROOT
5119
+ opinion = 0
5120
+ }
5121
+ }
5122
+ }
5123
+ set_school_opinion = {
5124
+ who = ROOT
5125
+ opinion = 0
5126
+ }
5127
+ }
5128
+ else = {
5129
+ set_school_opinion = {
5130
+ who = ROOT
5131
+ opinion = 1
5132
+ }
5133
+ }
5134
+ }
5135
+ if = {
5136
+ limit = {
5137
+ piety = 0
5138
+ }
5139
+ add_piety = 0.25
5140
+ }
5141
+ else = { add_piety = -0.25 }
5142
+ }
5143
+ }
5144
+ FROM = {
5145
+ add_legitimacy = 10
5146
+ add_devotion = 10
5147
+ add_opinion = {
5148
+ who = ROOT
5149
+ modifier = performed_hajj_modifier
5150
+ }
5151
+ }
5152
+ add_trust = {
5153
+ who = FROM
5154
+ value = 10
5155
+ mutual = yes
5156
+ }
5157
+ add_estate_loyalty = {
5158
+ estate = estate_church
5159
+ loyalty = 20
5160
+ }
5161
+ add_dip_power = -50
5162
+ add_treasury = -200
5163
+ }
5164
+ on_decline = {
5165
+ FROM = {
5166
+ add_country_modifier = {
5167
+ name = just_asked_to_convert_timer
5168
+ duration = 18250
5169
+ }
5170
+ }
5171
+ }
5172
+
5173
+ ai_will_do = { # this is a trigger
5174
+ NOT = {
5175
+ FROM = {
5176
+ has_country_modifier = just_asked_to_convert_timer
5177
+ }
5178
+ }
5179
+ OR = {
5180
+ ai_attitude = {
5181
+ who = FROM
5182
+ attitude = attitude_friendly
5183
+ }
5184
+ ai_attitude = {
5185
+ who = FROM
5186
+ attitude = attitude_loyal
5187
+ }
5188
+ ai_attitude = {
5189
+ who = FROM
5190
+ attitude = attitude_allied
5191
+ }
5192
+ ai_attitude = {
5193
+ who = FROM
5194
+ attitude = attitude_protective
5195
+ }
5196
+ }
5197
+ NOT = {
5198
+ ai_attitude = {
5199
+ who = FROM
5200
+ attitude = attitude_domineering
5201
+ }
5202
+ }
5203
+ NOT = {
5204
+ ai_attitude = {
5205
+ who = FROM
5206
+ attitude = attitude_hostile
5207
+ }
5208
+ }
5209
+ NOT = {
5210
+ ai_attitude = {
5211
+ who = FROM
5212
+ attitude = attitude_outraged
5213
+ }
5214
+ }
5215
+ has_opinion = {
5216
+ who = FROM
5217
+ value = 50
5218
+ }
5219
+ }
5220
+
5221
+ ai_acceptance = {
5222
+ add_entry = {
5223
+ name = DIPLO_OPPINION
5224
+ export_to_variable = {
5225
+ variable_name = ai_value
5226
+ value = opinion
5227
+ who = FROM
5228
+ with = ROOT
5229
+ }
5230
+ multiply_variable = {
5231
+ which = ai_value
5232
+ value = 0.125
5233
+ }
5234
+ }
5235
+ add_entry = {
5236
+ name = AI_TRUST_TOWARDS_ROOT
5237
+ export_to_variable = {
5238
+ variable_name = ai_value
5239
+ value = trust
5240
+ who = FROM
5241
+ with = ROOT
5242
+ }
5243
+ subtract_variable = {
5244
+ which = ai_value
5245
+ value = 50
5246
+ }
5247
+ #1 trust = +4 ai points
5248
+ multiply_variable = {
5249
+ which = ai_value
5250
+ value = 0.4
5251
+ }
5252
+ }
5253
+ add_entry = {
5254
+ name = AI_DIPLOMATIC_REPUTATION
5255
+ export_to_variable = {
5256
+ variable_name = ai_value
5257
+ value = trigger_value:diplomatic_reputation
5258
+ }
5259
+ #1 rep = 3
5260
+ multiply_variable = {
5261
+ which = ai_value
5262
+ value = 3
5263
+ }
5264
+ }
5265
+ add_entry = {
5266
+ name = attitude_neutral_DIPLO_ATTITUDE_TT
5267
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_neutral } } }
5268
+ export_to_variable = { variable_name = ai_value value = 1 }
5269
+ multiply_variable = { which = ai_value value = -10 }
5270
+ }
5271
+ add_entry = {
5272
+ name = attitude_rivalry_DIPLO_ATTITUDE_TT
5273
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_rivalry } } }
5274
+ export_to_variable = { variable_name = ai_value value = 1 }
5275
+ multiply_variable = { which = ai_value value = -1000 }
5276
+ }
5277
+ add_entry = {
5278
+ name = attitude_hostile_DIPLO_ATTITUDE_TT
5279
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_hostile } } }
5280
+ export_to_variable = { variable_name = ai_value value = 1 }
5281
+ multiply_variable = { which = ai_value value = -1000 }
5282
+ }
5283
+ add_entry = {
5284
+ name = attitude_friendly_DIPLO_ATTITUDE_TT
5285
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_friendly } } }
5286
+ export_to_variable = { variable_name = ai_value value = 1 }
5287
+ multiply_variable = { which = ai_value value = 20 }
5288
+ }
5289
+ add_entry = {
5290
+ name = attitude_threatened_DIPLO_ATTITUDE_TT
5291
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_threatened } } }
5292
+ export_to_variable = { variable_name = ai_value value = 1 }
5293
+ multiply_variable = { which = ai_value value = 20 }
5294
+ }
5295
+ add_entry = {
5296
+ name = attitude_outraged_DIPLO_ATTITUDE_TT
5297
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_outraged } } }
5298
+ export_to_variable = { variable_name = ai_value value = 1 }
5299
+ multiply_variable = { which = ai_value value = -1000 }
5300
+ }
5301
+ add_entry = {
5302
+ name = attitude_domineering_DIPLO_ATTITUDE_TT
5303
+ limit = { FROM = { ai_attitude = { who = ROOT attitude = attitude_domineering } } }
5304
+ export_to_variable = { variable_name = ai_value value = 1 }
5305
+ multiply_variable = { which = ai_value value = -1000 }
5306
+ }
5307
+ add_entry = {
5308
+ name = DIPLO_BORDER_DISTANCE_TT
5309
+ export_to_variable = {
5310
+ variable_name = ai_value
5311
+ value = border_distance
5312
+ who = FROM
5313
+ with = ROOT
5314
+ }
5315
+ #5 units = -1
5316
+ multiply_variable = {
5317
+ which = ai_value
5318
+ value = -0.2
5319
+ }
5320
+ }
5321
+ }
5322
+ }
common/new_diplomatic_actions/00diplomatic_actions.txt DELETED
@@ -1,198 +0,0 @@
1
- # Triggers and effects will be given the Actor's scope, with the Recipient's as FROM
2
-
3
- static_actions = # static_actions is a reserved token.
4
- {
5
- # alert_index maps to the frame of the alert icon
6
- royal_marriage = { alert_index = 1 alert_tooltip = ICON_RM }
7
- requestpeace = { alert_index = 2 alert_tooltip = ICON_PEACE } # alert_index will be overwritten in code for this one.
8
- allianceaction = { alert_index = 3 alert_tooltip = ICON_ALLIANCE }
9
- # 4 is currently unused.
10
- integrationaction = { alert_index = 5 alert_tooltip = ICON_ANNEX }
11
- annexationaction = { alert_index = 5 alert_tooltip = ICON_ANNEX }
12
- vassalaction = { alert_index = 6 alert_tooltip = ICON_VASSAL }
13
- milaccess = { alert_index = 7 alert_tooltip = ICON_ASKMIL }
14
- fleet_access = { alert_index = 8 alert_tooltip = ICON_ASKFLEET }
15
- offermilaccess = { alert_index = 9 alert_tooltip = ICON_OFFACC }
16
- callaction = { alert_index = 10 alert_tooltip = ICON_CALLALLY } # This one is referred to in the code (settings.cpp)
17
- offerloan = { alert_index = 11 alert_tooltip = ICON_OFFERLOAN }
18
- sellprov = { alert_index = 12 alert_tooltip = ICON_PROVSALE }
19
- #13 is cursed
20
- request_to_join_federation = { alert_index = 14 alert_tooltip = ICON_FEDERATIONREQUEST }
21
- invite_to_federation = { alert_index = 15 alert_tooltip = ICON_FEDERATIONINVITE }
22
- transfer_trade_power = { alert_index = 16 alert_tooltip = TRANSFER_TRADE_POWER }
23
- religious_unity_action = { alert_index = 17 alert_tooltip = ICON_RELIGIOUS_UNITY }
24
- # 18 is used by requestpeace
25
- form_coalition = { alert_index = 19 alert_tooltip = ICON_FORM_COALITION }
26
- enforce_peace = { alert_index = 20 alert_tooltip = ICON_ENFORCE_PEACE } # This one may be overwritten in code.
27
- grant_electorate = { alert_index = 21 alert_tooltip = ICON_GRANT_ELECTORATE }
28
- demand_unlawful_territory_action = { alert_index = 22 alert_tooltip = ICON_DEMAND_UNLAWFUL_TERRITORY }
29
- # 23 is used by requestpeace
30
- # 24 is used by requestpeace
31
- # 25 is used by requestpeace
32
- # 26 is used by requestpeace
33
- # 27 is used by enforce_peace (when actor is coalition leader) with tooltip "ICON_ENFORCE_PEACE_COALITION_LEADER"
34
- support_independence_action = { alert_index = 28 alert_tooltip = support_independence }
35
- steer_trade = { alert_index = 29 alert_tooltip = ICON_STEER_TRADE }
36
- ask_for_march = { alert_index = 30 alert_tooltip = ICON_MARCH }
37
- sell_ships_action = { alert_index = 31 alert_tooltip = ICON_FLEETSALE }
38
- grant_freecity = { alert_index = 32 alert_tooltip = ICON_GRANT_FREECITY }
39
- # 33 is currently unused
40
- invite_to_trade_league = { alert_index = 34 alert_tooltip = ICON_TRADELEAGUEINVITE }
41
- request_to_join_trade_league = { alert_index = 35 alert_tooltip = ICON_TRADELEAGUEREQUEST }
42
- sharemap = { alert_index = 36 alert_tooltip = ICON_REQUESTSHAREMAP } # alert_tooltip gets special treatment in the code
43
- condottieri_action = { alert_index = 37 alert_tooltip = ICON_CONDOTTIERI }
44
- offer_fleet_access = { alert_index = 38 alert_tooltip = ICON_OFFERFLEET }
45
- break_alliance = { alert_index = 39 alert_tooltip = ICON_BREAK_ALLIANCE }
46
- tributary_state_action = { alert_index = 40 alert_tooltip = ICON_TRIBUTARY }
47
- ask_for_tributary_state_action = { alert_index = 41 alert_tooltip = ICON_ASK_TRIBUTARY }
48
- knowledge_sharing = { alert_index = 42 alert_tooltip = ICON_KNOWLEDGESHARE } #The answer to life
49
- # 43 is currently unused
50
- charter_company = { alert_index = 44 alert_tooltip = ICON_CHARTERCOMPANY }
51
- }
52
-
53
- # Create new diplomatic actions like this. AI will currently never send them.
54
- demand_dummy = {
55
- category = influence
56
-
57
- alert_index = 40
58
- alert_tooltip = demand_dummy_alert_tooltip
59
-
60
- require_acceptance = yes # Whether the recipient gets an option to decline
61
-
62
- is_visible = {
63
- always = no ############################ Remove this line to unleash the magic ########################################
64
- religion_group = christian
65
- is_subject = no
66
- FROM = {
67
- is_subject = no
68
- }
69
- }
70
- is_allowed = {
71
- variable_arithmetic_trigger = {
72
- custom_tooltip = HAS_OLDER_RULER_THAN_THEIR_HEIR
73
- export_to_variable = { # All export to variable will happen first. Then the other effects and triggers will be executed/evaluated in order
74
- variable_name = my_age
75
- value = trigger_value:ruler_age
76
- }
77
- export_to_variable = {
78
- variable_name = their_age
79
- value = trigger_value:heir_age
80
- who = FROM
81
- }
82
- ruler_age = 0 # This is a normal trigger.
83
- FROM = {
84
- heir_age = 0 # This is a normal trigger too.
85
- }
86
- check_variable = { # This trigger is only allowed inside a variable_arithmetic_trigger.
87
- which = my_age
88
- which = their_age
89
- }
90
- }
91
- religion = catholic
92
- }
93
- on_accept = {
94
- add_trust = {
95
- who = FROM
96
- value = 20
97
- mutual = yes
98
- }
99
- create_subject = {
100
- subject_type = dummy
101
- subject = FROM
102
- }
103
- }
104
- on_decline =
105
- {
106
- add_trust = {
107
- who = FROM
108
- value = -100
109
- mutual = no
110
- }
111
- }
112
-
113
- ai_acceptance = { # This works similarly to variable_arithmetic_trigger, but does not support triggers generally. Instead, "limit" will be evaluated first and the rest ignored if it isn't passed.
114
- add_entry = {
115
- name = TRUST
116
- limit = { religion = catholic }
117
- export_to_variable = {
118
- variable_name = ai_value # Each "add_entry" must create one variable called "ai_value", the value of which will be extracted after executing all effects
119
- value = trust
120
- who = FROM
121
- with = THIS
122
- }
123
- subtract_variable = { which = ai_value value = 50 }
124
- multiply_variable = { which = ai_value value = 2 }
125
- }
126
- add_entry = {
127
- name = TRUST
128
- limit = { NOT = { religion = catholic } }
129
- export_to_variable = {
130
- variable_name = ai_value
131
- value = trust
132
- who = FROM
133
- with = THIS
134
- }
135
- export_to_variable = {
136
- variable_name = is_defender
137
- value = trigger_value:is_defender_of_faith # This sets is_defender to either 0.0 or 1.0
138
- }
139
- multiply_variable = {
140
- which = is_defender
141
- value = 10
142
- }
143
- change_variable = {
144
- which = ai_value
145
- which = is_defender # This adds 10 to ai_value if you are defender of faith
146
- }
147
- subtract_variable = { which = ai_value value = 50 }
148
- }
149
- add_entry = {
150
- name = OPINION
151
- export_to_variable = {
152
- variable_name = ai_value
153
- value = opinion
154
- who = FROM
155
- with = THIS
156
- }
157
- divide_variable = { which = ai_value value = 4 }
158
- }
159
- }
160
-
161
- ai_will_do = { # this is a trigger
162
- has_opinion_modifier = {
163
- modifier = insulted
164
- who = FROM
165
- }
166
- }
167
- }
168
-
169
- cancel_dummy = {
170
- category = influence
171
- require_acceptance = no
172
- is_visible = {
173
- overlord_of = FROM
174
- FROM = {
175
- is_subject_of_type = dummy
176
- }
177
- }
178
- is_allowed = {
179
- reverse_has_opinion_modifier = {
180
- modifier = insulted
181
- who = FROM
182
- }
183
- }
184
- on_accept = {
185
- add_trust = {
186
- who = FROM
187
- value = -100
188
- mutual = yes
189
- }
190
- FROM = {
191
- grant_independence = yes
192
- }
193
- }
194
- ai_will_do = {
195
- always = no
196
- }
197
- }
198
-