-
Notifications
You must be signed in to change notification settings - Fork 12
/
religious_cbs.txt
3340 lines (2749 loc) · 61.3 KB
/
religious_cbs.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# crusade
# new_crusade
# religious - Regular Holy War CB
# liberate_religion
crusade = {
name = CB_NAME_CRUSADE
war_name = WAR_NAME_CRUSADE
sprite = 9
truce_days = 3650
battle_warscore_mult = 0.5
max_defender_occupation_score = 85
sort_priority = 3000
is_permanent = yes
is_holy_war = yes
check_de_jure_tier = KING # this scans all de jure kingdoms for the counties which are held by or vassals(or below) of selected character. Only valid if is_permanent = yes
is_crusade = yes
allowed_to_target_tributaries = no
can_use_gui = {
# Attacker
ROOT = {
uses_new_crusade = no
has_called_crusade = no
religion_authority >= 0.05
mercenary = no
trigger_if = {
limit = {
has_alternate_start_parameter = {
key = religion_names
value = random
}
}
custom_tooltip = {
text = ALT_GHW_STARTED
has_global_flag = muslim_jihads_unlocked
has_global_flag = pagan_ghws_unlocked
has_global_flag = christian_crusades_unlocked
}
}
trigger_else = {
OR = {
religion_group = zoroastrian_group
religion_group = jewish_group
trigger_if = {
limit = { religion_group = pagan_group }
custom_tooltip = {
text = CTT_PAGAN_GHWS_UNLOCKED
has_global_flag = pagan_ghws_unlocked
}
}
trigger_else_if = {
limit = { religion_group = christian }
custom_tooltip = {
text = CTT_CHRISTIAN_CRUSADES_UNLOCKED
has_global_flag = christian_crusades_unlocked
}
}
trigger_else_if = {
limit = { religion_group = muslim }
custom_tooltip = {
text = CTT_MUSLIM_JIHADS_UNLOCKED
has_global_flag = muslim_jihads_unlocked
}
}
trigger_else = {
always = no
}
}
}
}
}
can_use = {
# Attacker
ROOT = {
can_call_crusade = yes
uses_new_crusade = no
# Religion check
OR = {
NOT = { religion_group = FROM }
# One is a heretic of the other
is_heresy_of = FROM
is_parent_religion = FROM
trigger_if = {
limit = { religion_group = pagan_group }
NOT = { religion = FROM }
}
}
# Not if the Schism has been mended
trigger_if = {
limit = { has_global_flag = schism_mended }
NOR = {
religion = catholic
religion = fraticelli
}
}
}
}
can_use_title = {
# Defender
FROM = {
# Don't declare Crusades on revolters - chances are high the war will invalidate
independent = yes
num_of_realm_counties = {
value >= 6
title = PREV
}
}
}
is_valid = {
# Attacker
ROOT = {
can_call_crusade = yes
# Religion check
OR = {
NOT = { religion_group = FROM }
# One is a heretic of the other
is_heresy_of = FROM
is_parent_religion = FROM
trigger_if = {
limit = { religion_group = pagan_group }
NOT = { religion = FROM }
}
}
}
}
is_valid_title = {
# Defender
FROM = {
num_of_realm_counties = {
value >= 1
title = PREV
}
}
}
on_add = {
fire_haruspicy_event_effect = yes
anger_china_effect = yes
}
on_success_title = {
log = "[Root.GetBestName] (ID: [Root.GetID]) succeeded with [Root.GetHerHis] crusade for the [This.GetFullName] against [From.GetBestName] (ID: [From.GetID])"
# Should we give the seized land to its current king?
if = {
limit = {
has_holder = yes
holder_scope = {
religion = attacker
}
}
holder_scope = {
gain_settlements_under_title = {
title = PREV
enemy = defender
is_crusade = yes # Even if the title holder is not participating in the war, gain holdings occupied by all Crusade participants
type = holy_war
}
}
}
# Should we give the seized land to a claimant of our faith?
else_if = {
limit = {
OR = {
has_holder = no
holder_scope = {
NOT = { religion = attacker }
}
}
best_crusade_claimant = {
always = yes # There is a "best" claimant
}
}
# Claimants must be of ROOT's religion, and are ranked by strength of claim and actual contribution to the war
best_crusade_claimant = {
if = {
limit = { is_ruler = no }
set_character_flag = set_feudal_gov
}
gain_settlements_under_title = {
title = PREV
enemy = defender
is_crusade = yes # Even if the title holder is not participating in the war, gain holdings occupied by all Crusade participants
type = holy_war
}
if = {
limit = {
top_liege = {
character = defender
}
}
set_defacto_liege = THIS
}
if = { # transfer targeted kingdom title
limit = {
PREV = {
OR = {
has_holder = no
holder_scope = {
top_liege = { character = defender }
}
}
}
OR = {
independent = yes
is_ruler = no
liege = {
real_tier = EMPEROR
}
}
}
usurp_title = {
target = PREV
type = holy_war
}
}
if = {
limit = { has_character_flag = set_feudal_gov }
set_government_type = feudal_government
}
clr_character_flag = set_feudal_gov
}
}
# Give the seized land to the main contributor of the Crusade
else = {
most_participating_crusader = {
gain_settlements_under_title = {
title = PREV
enemy = defender
type = holy_war
}
if = { # transfer targeted kingdom title
limit = {
primary_title = { is_primary_type_title = no } # Mercs, the Pope, Holy Orders, etc
PREV = {
OR = {
has_holder = no
holder_scope = {
top_liege = { character = defender }
}
}
}
NOT = { character = attacker }
OR = {
independent = yes
liege = {
real_tier = EMPEROR
}
}
}
usurp_title_only = {
target = PREV
type = holy_war
}
if = {
limit = {
NOT = { culture = PREV }
}
hidden_effect = {
save_event_target_as = winning_crusader
PREV = { conquest_culture = event_target:winning_crusader }
}
}
}
hidden_effect = {
if = {
limit = {
trigger_if = {
limit = { has_nickname = yes }
this_has_lame_nickname_trigger = yes
}
}
random_list = {
10 = {
trigger = { religion_group = christian }
give_nickname = nick_the_crusader
}
10 = { give_nickname = nick_the_holy }
10 = { give_nickname = nick_the_glorious }
10 = { give_nickname = nick_the_lionheart }
10 = { give_nickname = nick_the_great }
10 = { give_nickname = nick_the_hammer }
10 = { give_nickname = nick_the_pilgrim }
40 = {
trigger = { NOT = { religion_group = christian } }
give_nickname = nick_the_sword_of_god
}
}
}
}
}
}
any_attacker = {
limit = { NOT = { character = ROOT } }
hidden_effect = {
participation_scaled_prestige = 500
participation_scaled_piety = 1000
if = {
limit = { uses_decadence = yes }
participation_scaled_decadence = -100
}
}
}
any_attacker = {
limit = {
ai = no
is_ironman = yes
NOT = { has_character_flag = achievement_crusader }
}
set_character_flag = achievement_crusader
}
attacker = {
show_scope_change = no
participation_scaled_prestige = 500
participation_scaled_piety = 1000
if = {
limit = { uses_decadence = yes }
participation_scaled_decadence = -100
}
religion_authority = {
name = won_crusade
years = 20
}
}
defender = {
show_scope_change = no
piety = -100
religion_authority = {
name = lost_crusade
years = 20
}
}
hidden_effect = {
check_if_reconquista_finished_effect = yes
defender = {
landless_pope_effect = yes
}
}
}
on_fail = {
attacker = {
show_scope_change = no
piety = -100
}
any_defender = {
limit = { NOT = { character = defender } }
hidden_effect = {
participation_scaled_piety = 200
participation_scaled_prestige = 100
if = {
limit = { uses_decadence = yes }
participation_scaled_decadence = -50
}
}
}
defender = {
show_scope_change = no
participation_scaled_piety = 200
participation_scaled_prestige = 100
if = {
limit = { uses_decadence = yes }
participation_scaled_decadence = -50
}
hidden_effect = {
roman_victory_triumph_effect = yes
if = {
limit = {
trigger_if = {
limit = { has_nickname = yes }
this_has_lame_nickname_trigger = yes
}
}
random_list = {
10 = { give_nickname = nick_the_holy }
10 = { give_nickname = nick_the_glorious }
10 = { give_nickname = nick_the_lionheart }
10 = { give_nickname = nick_the_great }
10 = { give_nickname = nick_the_hammer }
20 = {
trigger = { NOT = { religion_group = christian } }
give_nickname = nick_the_sword_of_god
}
}
}
}
}
}
on_reverse_demand = {
attacker = {
show_scope_change = no
transfer_scaled_wealth = {
to = defender
value = 4.0
}
piety = -200
religion_authority = {
name = lost_crusade
years = 20
}
if = {
limit = {
uses_decadence = yes
NOT = {
any_liege = {
dynasty = PREV
}
}
}
participation_scaled_decadence = 35
}
}
any_attacker = {
limit = {
uses_decadence = yes
NOR = {
character = attacker
any_liege = {
dynasty = PREV
}
}
}
hidden_effect = {
participation_scaled_decadence = 35
}
}
defender = {
show_scope_change = no
piety = 100
participation_scaled_piety = 300
participation_scaled_prestige = 150
religion_authority = {
name = won_crusade
years = 20
}
if = {
limit = { uses_decadence = yes }
participation_scaled_decadence = -100
}
hidden_effect = {
roman_victory_triumph_effect = yes
if = {
limit = {
trigger_if = {
limit = { has_nickname = yes }
this_has_lame_nickname_trigger = yes
}
}
random_list = {
10 = { give_nickname = nick_the_holy }
10 = { give_nickname = nick_the_glorious }
10 = { give_nickname = nick_the_lionheart }
10 = { give_nickname = nick_the_great }
10 = { give_nickname = nick_the_hammer }
20 = {
trigger = { NOT = { religion_group = christian } }
give_nickname = nick_the_sword_of_god
}
}
}
}
}
any_defender = {
limit = { NOT = { character = defender } }
hidden_effect = {
participation_scaled_piety = 300
participation_scaled_prestige = 150
if = {
limit = { uses_decadence = yes }
participation_scaled_decadence = -100
}
}
}
}
attacker_ai_victory_worth = {
factor = -1 # always accept
}
attacker_ai_defeat_worth = {
factor = 100
}
defender_ai_victory_worth = {
factor = -1 # always accept
}
defender_ai_defeat_worth = {
factor = 100
}
}
# Crusade using the new crusade system. See crusade.info in the religion folder for documentation
new_crusade = {
name = CB_NAME_CRUSADE
war_name = WAR_NAME_CRUSADE
sprite = 9
truce_days = 3650
battle_warscore_mult = 0.5
max_defender_occupation_score = 85
sort_priority = 3000
is_permanent = yes
is_holy_war = yes
check_de_jure_tier = KING # this scans all de jure kingdoms for the counties which are held by or vassals(or below) of selected character. Only valid if is_permanent = yes
is_crusade = yes
allow_whitepeace = no
allowed_to_target_tributaries = no
can_ask_to_join_war = no # People join via script instead
can_use_gui = {
# Attacker
ROOT = {
uses_new_crusade = yes
has_called_crusade = no
religion_authority >= 0.05
mercenary = no
trigger_if = {
limit = {
has_alternate_start_parameter = {
key = religion_names
value = random
}
}
custom_tooltip = {
text = ALT_GHW_STARTED
has_global_flag = muslim_jihads_unlocked
has_global_flag = pagan_ghws_unlocked
has_global_flag = christian_crusades_unlocked
}
}
trigger_else = {
religion_group = christian
custom_tooltip = {
text = CTT_CHRISTIAN_CRUSADES_UNLOCKED
has_global_flag = christian_crusades_unlocked
}
}
}
}
can_use = {
# Attacker
ROOT = {
can_call_crusade = yes
uses_new_crusade = yes
NOT = { has_character_modifier = cancel_crusade_cooldown }
}
# Defender
FROM = {
independent = yes # Don't declare Crusades on revolters - chances are high the war will invalidate
NOT = { religion = ROOT }
OR = {
NOT = { religion_group = ROOT }
religion_group = pagan_group
# One is a heretic of the other
is_heresy_of = ROOT
is_parent_religion = ROOT
# Fourth Crusade
trigger_if = {
limit = { has_character_flag = fourth_crusade_target }
NOT = { has_character_flag = fourth_crusade_recipient }
}
trigger_else_if = {
limit = { has_global_flag = 4th_crusade_official }
has_landed_title = e_byzantium
}
}
}
# Not if the Schism has been mended
trigger_if = {
limit = { has_global_flag = schism_mended }
NOR = {
religion = catholic
religion = fraticelli
}
}
}
can_use_title = {
# Defender
FROM = {
trigger_if = {
limit = {
NOT = {
num_of_realm_counties = {
value >= 6
title = PREV
}
}
}
PREV = { title = k_thrace }
has_landed_title = e_byzantium
religion_group = christian
num_of_realm_counties = {
value >= 1
title = PREV
}
}
}
}
is_valid = {
# Attacker
ROOT = {
can_call_crusade = yes
}
# Defender
FROM = {
NOT = { religion = ROOT }
# Religion check
OR = {
NOT = { religion_group = ROOT }
# One is a heretic of the other
is_heresy_of = ROOT
is_parent_religion = ROOT
religion_group = pagan_group
trigger_if = {
limit = { has_global_flag = 4th_crusade_official }
has_landed_title = e_byzantium
}
trigger_else_if = {
limit = { has_character_flag = fourth_crusade_target }
NOT = { has_character_flag = fourth_crusade_recipient }
}
}
}
}
is_valid_title = {
# Defender
FROM = {
num_of_realm_counties = {
value >= 1
title = PREV
}
}
}
on_add = {
fire_haruspicy_event_effect = yes
anger_china_effect = yes
}
on_success_title = {
log = "[Root.GetBestName] (ID: [Root.GetID]) succeeded with [Root.GetHerHis] Holy Fury crusade for the [This.GetFullName] against [From.GetBestName] (ID: [From.GetID])"
custom_tooltip = {
text = new_crusade_win_TT
}
# Religion Authority and Prestige/Piety for the winner (Pope)
attacker = {
show_scope_change = no
participation_scaled_prestige = 500
participation_scaled_piety = 1000
religion_authority = {
name = won_crusade
years = 20
}
crusade_target_title = {
save_event_target_as = new_crusade_title
}
official_crusade_recipient = {
save_event_target_as = new_crusade_recipient
}
crusade_target_char = {
save_event_target_as = new_crusade_target_char
}
}
most_participating_crusader = {
save_event_target_as = new_crusade_most_participating_member
}
# Religion Authority and Prestige/Piety loss for the loser (Target of Crusade)
defender = {
show_scope_change = no
piety = -100
religion_authority = {
name = lost_crusade
years = 20
}
}
hidden_effect = {
if = { # Achievement
limit = {
event_target:new_crusade_target_char = {
has_landed_title = e_byzantium
religion_group = defender
}
}
any_attacker = {
limit = {
ai = no
is_ironman = yes
}
set_character_flag = achievement_venetian_guile
}
}
any_attacker = {
if = {
limit = {
ai = yes
NOT = {
crusade_beneficiary = {
always = yes
}
}
}
character_event = { id = HFP.41007 } # Beneficiary event - AI only
}
}
# Should we give the seized land to the Official Crusade Recipient?
if = {
limit = {
most_participating_crusader = {
official_crusade_recipient = {
is_alive = yes
religion = attacker
}
NOR = {
has_character_flag = crusade_selfish_stance
has_character_flag = crusade_beneficiary_stance
}
}
}
most_participating_crusader = {
official_crusade_recipient = {
set_crusader_king = THIS
}
}
}
# Give the seized land to the main contributor of the Crusade or his/her Beneficiary
else_if = {
limit = {
most_participating_crusader = {
trigger_if = {
limit = { ai = yes }
crusade_beneficiary = {
is_alive = yes
}
}
holy_order = no
mercenary = no
NOR = {
has_landed_title = k_papacy
has_landed_title = d_fraticelli
}
}
}
most_participating_crusader = {
# Give the title to your Beneficiary
if = {
limit = {
crusade_beneficiary = {
is_alive = yes
is_ruler = no
NOT = {
any_heir_title = {
always = yes
}
}
mercenary = no
holy_order = no
}
NOT = { has_character_flag = crusade_selfish_stance }
}
crusade_beneficiary = {
set_crusader_king = THIS
set_character_flag = crusader_king_flag
}
}
# Find an appropriate replacement Beneficiary if there is none selected, or the currently selected one is improper in one way or another
else_if = {
limit = {
ai = yes
NOT = { has_character_flag = crusade_selfish_stance }
any_dynasty_member = {
is_adult = yes
religion = PREV
is_ruler = no
NOT = {
any_heir_title = {
always = yes
}
}
mercenary = no
holy_order = no
}
}
any_dynasty_member = {
limit = {
is_adult = yes
religion = PREV
is_ruler = no
NOT = {
any_heir_title = {
always = yes
}
}
}
score_value = {
value = 1
additive_modifier = {
value = 1000
preferred_gender_based_on_laws_trigger = yes
}
additive_modifier = {
value = 500
is_child_of = PREV
}
additive_modifier = {
value = 250
is_vassal_or_below_of = PREV
}
additive_modifier = {
value = 125
practical_age < 45
}
additive_modifier = {
value = 62
culture = PREV
}
}
set_crusader_king = THIS
set_character_flag = crusader_king_flag
}
}
# Take the titles yourself
else = {
if = {
limit = {
any_owned_bloodline = {
has_bloodline_flag = grand_crusader_bloodline
bloodline_is_active_for = PREV
}
}
set_crusade_pot_multiplier = 0.2