Scripted effect
randomize_available_compliment_effect
randomize_available_compliment_effect = { COMPLIMENT_RECEIVER = … }game/common/scripted_effects/00_compliment_effects.txt, line 42 (186 lines). Parameters: $COMPLIMENT_RECEIVER$.
randomize_available_compliment_effect is a scripted effect in Crusader Kings III, written at line 42 of its file. A call passes 1 parameter: COMPLIMENT_RECEIVER. The game's script calls it in 9 places, among them … of Words (event seduce_ongoing.1801), Holy Letter (event learning_theology.3021) and Hospitality: Petals and Thorns (event diplomacy_foreign_special.1028). Patch 1.20.1.2, from game/common/scripted_effects/00_compliment_effects.txt.
The comment above it in the file
If you don't want to specify the available compliments, you can use this to get a selection relative to your root.diplomacy skill and your target's preferences. Run the effect as many times as the amount of compliment options you need. More diplomatically skilled characters has a higher chance to receive options which have a high likelihood of success. If you want to block a certain compliment, you can add that flag yourself before randomizing and then removing it afterwards. Use in scope of compliment giver. Needs arguments COMPLIMENT_RECEIVER
What it does
- 1 of 12 things will happen:
- 8% (base chance; changed in play): Nothing else happens
- 8% (base chance; changed in play): Nothing else happens
- 8% (base chance; changed in play): Nothing else happens
- 8% (base chance; changed in play): Nothing else happens
- 8% (base chance; changed in play): Nothing else happens
- 8% (base chance; changed in play): Nothing else happens
- 8% (base chance; changed in play): Nothing else happens
- 8% (base chance; changed in play): Nothing else happens
- 8% (base chance; changed in play): Nothing else happens
- 8% (base chance; changed in play): Nothing else happens
- 8% (base chance; changed in play): Nothing else happens
- 8% (base chance; changed in play): Nothing else happens
• the game's own tooltip text · ◦ our reading of the script line · code the script where neither exists
“They” is whatever it runs on (the scope it is called in). The scripted triggers and effects it calls link to their own pages; $PARAMETERS$ stay as written: each call fills them in.
The script as written (120 lines of game script)
randomize_available_compliment_effect = {
random_list = {
1 = {
trigger = { NOT = { has_character_flag = available_compliment_compassionate } }
modifier = {
factor = 3
root.diplomacy >= decent_skill_rating
$COMPLIMENT_RECEIVER$ = { ai_compassion >= low_positive_compassion }
}
modifier = {
factor = 2
root.diplomacy < medium_skill_rating
$COMPLIMENT_RECEIVER$ = { ai_compassion < 0 }
}
add_character_flag = available_compliment_compassionate
}
1 = {
trigger = { NOT = { has_character_flag = available_compliment_bold } }
modifier = {
factor = 3
root.diplomacy >= decent_skill_rating
$COMPLIMENT_RECEIVER$ = { ai_boldness >= low_positive_boldness }
}
modifier = {
factor = 2
root.diplomacy < medium_skill_rating
$COMPLIMENT_RECEIVER$ = { ai_boldness < 0 }
}
add_character_flag = available_compliment_bold
}
1 = {
trigger = { NOT = { has_character_flag = available_compliment_honorable } }
modifier = {
factor = 3
root.diplomacy >= decent_skill_rating
$COMPLIMENT_RECEIVER$ = { ai_honor >= low_positive_honor }
}
modifier = {
factor = 2
root.diplomacy < medium_skill_rating
$COMPLIMENT_RECEIVER$ = { ai_honor < 0 }
}
add_character_flag = available_compliment_honorable
}
1 = {
trigger = { NOT = { has_character_flag = available_compliment_greedy } }
modifier = {
factor = 3
root.diplomacy >= decent_skill_rating
$COMPLIMENT_RECEIVER$ = { ai_greed >= low_positive_greed }
}
modifier = {
factor = 2
root.diplomacy < medium_skill_rating
$COMPLIMENT_RECEIVER$ = { ai_greed < 0 }
}
add_character_flag = available_compliment_greedy
}
1 = {
trigger = { NOT = { has_character_flag = available_compliment_rational } }
modifier = {
factor = 3
root.diplomacy >= decent_skill_rating
$COMPLIMENT_RECEIVER$ = { ai_rationality >= low_positive_rationality }
}
modifier = {
factor = 2
root.diplomacy < medium_skill_rating
$COMPLIMENT_RECEIVER$ = { ai_rationality < 0 }
}
add_character_flag = available_compliment_rational
}
1 = {
trigger = { NOT = { has_character_flag = available_compliment_zealous } }
modifier = {
factor = 3
root.diplomacy >= decent_skill_rating
$COMPLIMENT_RECEIVER$ = { ai_zeal >= low_positive_zeal }
}
modifier = {
factor = 2
root.diplomacy < medium_skill_rating
$COMPLIMENT_RECEIVER$ = { ai_zeal < 0 }
}
add_character_flag = available_compliment_zealous
}
1 = {
trigger = { NOT = { has_character_flag = available_compliment_energetic } }
modifier = {
factor = 3
root.diplomacy >= decent_skill_rating
$COMPLIMENT_RECEIVER$ = { ai_energy >= low_positive_energy }
}
modifier = {
factor = 2
root.diplomacy < medium_skill_rating
$COMPLIMENT_RECEIVER$ = { ai_energy < 0 }
}
add_character_flag = available_compliment_energetic
}
1 = {
trigger = { NOT = { has_character_flag = available_compliment_forgiving } }
modifier = {
factor = 3
root.diplomacy >= decent_skill_rating
$COMPLIMENT_RECEIVER$ = { ai_vengefulness <= low_negative_vengefulness }
}
modifier = {
factor = 2
root.diplomacy < medium_skill_rating
$COMPLIMENT_RECEIVER$ = { ai_vengefulness > 0 }
}
add_character_flag = available_compliment_forgiving
}
1 = {
trigger = { NOT = { has_character_flag = available_compliment_beautiful } }
modifier = {
factor = 3
root.diplomacy >= decent_skill_rating
$COMPLIMENT_RECEIVER$ = { attraction >= 10 }As written in game/common/scripted_effects/00_compliment_effects.txt.
The first 120 of its 186 lines; the rest is in game/common/scripted_effects/00_compliment_effects.txt from line 42.
Where it is used
Every place in common/, events/ and history/ that calls randomize_available_compliment_effect.
Events (7)
- … of Words
seduce_ongoing.1801 - Holy Letter
learning_theology.3021 - Hospitality: Petals and Thorns
diplomacy_foreign_special.1028 - Romance: Poetic License
court_ongoing.1100 - Sway: Compliments
sway_ongoing.1002 - The Grand Play: A Compliment?
cultural_festival.3001
1 more
- The Power of Words
diplomacy_majesty.0004
Source: game/common/scripted_effects/00_compliment_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.