Scripted effect · All Under Heaven files
set_duchies_to_attack_effect
set_duchies_to_attack_effect = yesgame/common/scripted_effects/10_dlc_tgp_scripted_effects.txt, line 2426 (132 lines). No parameters.
set_duchies_to_attack_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 2426 of its file. It takes no parameters: set_duchies_to_attack_effect = yes. The game's script calls it in 1 place, among them grand_campaign_project (great project). Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt.
The comment above it in the file
GRAND CAMPAIGN great project effects
What it does
Every line of it is script with no tooltip text: the script is below.
The script as written (120 lines of game script)
set_duchies_to_attack_effect = {
while = {
count = 20 #as for tgp France holds the record for the most duchies with 17
limit = {
list_size:duchies_to_attack > 0
}
# Assign the project's location Duchy as the mandatory contribution
if = {
limit = {
NOT = { exists = scope:grand_campaign_project.var:attack_1 }
}
random_in_list = {
list = duchies_to_attack
limit = {
this = scope:grand_campaign_project.great_project_location.duchy
}
set_duchies_to_attack_variable_effect = {
VALUE = 1
}
}
}
# Otherwise pick the smallest duchy and assign it the furthest possible variable
ordered_in_list = {
list = duchies_to_attack
order_by = {
value = holder.realm_size
multiply = -1
}
limit = {
this != scope:grand_campaign_project.great_project_location.duchy
}
switch = {
trigger = list_size:duchies_to_attack
1 = {
set_duchies_to_attack_variable_effect = {
VALUE = 2
}
}
2 = {
set_duchies_to_attack_variable_effect = {
VALUE = 3
}
}
3 = {
set_duchies_to_attack_variable_effect = {
VALUE = 4
}
}
4 = {
set_duchies_to_attack_variable_effect = {
VALUE = 5
}
}
5 = {
set_duchies_to_attack_variable_effect = {
VALUE = 6
}
}
6 = {
set_duchies_to_attack_variable_effect = {
VALUE = 7
}
}
7 = {
set_duchies_to_attack_variable_effect = {
VALUE = 8
}
}
8 = {
set_duchies_to_attack_variable_effect = {
VALUE = 9
}
}
9 = {
set_duchies_to_attack_variable_effect = {
VALUE = 10
}
}
10 = {
set_duchies_to_attack_variable_effect = {
VALUE = 11
}
}
11 = {
set_duchies_to_attack_variable_effect = {
VALUE = 12
}
}
12 = {
set_duchies_to_attack_variable_effect = {
VALUE = 13
}
}
13 = {
set_duchies_to_attack_variable_effect = {
VALUE = 14
}
}
14 = {
set_duchies_to_attack_variable_effect = {
VALUE = 15
}
}
15 = {
set_duchies_to_attack_variable_effect = {
VALUE = 16
}
}
16 = {
set_duchies_to_attack_variable_effect = {
VALUE = 17
}
}
17 = {
set_duchies_to_attack_variable_effect = {
VALUE = 18
}
}
18 = {
set_duchies_to_attack_variable_effect = {As written in game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt.
The first 120 of its 132 lines; the rest is in game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt from line 2426.
Where it is used
Every place in common/, events/ and history/ that calls set_duchies_to_attack_effect.
Great projects (1)
- grand_campaign_project
Source: game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.