Scripted effect
dark_insights_skill_gain_roll_effect
dark_insights_skill_gain_roll_effect = yesgame/common/scripted_effects/00_intrigue_perk_effects.txt, line 6 (109 lines). No parameters.
dark_insights_skill_gain_roll_effect is a scripted effect in Crusader Kings III, written at line 6 of its file. It takes no parameters: dark_insights_skill_gain_roll_effect = yes. The game's script calls it in 1 place, among them Torture (interaction). Its body carries 3 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/00_intrigue_perk_effects.txt.
What it does
- If has the Dark Insights Perk:
If
has_none_of_variables = { name = dark_insights_prowess_increases name = dark_insights_intrigue_increases }
Then
- Might gain some Dark Insights
Else if
One of these
- Dark insights prowess increases less than dark insights prowess increase maximum
or
Dark insights intrigue increases less than dark insights intrigue increase maximum
Then
- Might gain some Dark Insights
Else if
- Dark insights prowess increases at least dark insights prowess increase maximum
- Dark insights intrigue increases at least dark insights intrigue increase maximum
Then
- Has already learned all possible Dark Insights
• 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 (109 lines of game script)
dark_insights_skill_gain_roll_effect = {
#Backup check in case something has gone wrong
if = {
limit = {
has_perk = dark_insights_perk
}
# Backup for the variables
if = {
limit = {
NOT = { has_variable = dark_insights_prowess_increases }
}
set_variable = {
name = dark_insights_prowess_increases
value = 0
}
}
if = {
limit = {
NOT = { has_variable = dark_insights_intrigue_increases }
}
set_variable = {
name = dark_insights_intrigue_increases
value = 0
}
}
# Roll to see if we get a skill increase.
if = {
# For tooltip generation, we need to check if we have the variable yet (the backups above won't create the variables until after the effect is actually run).
limit = {
has_none_of_variables = {
name = dark_insights_prowess_increases
name = dark_insights_intrigue_increases
}
}
custom_tooltip = dark_insight_gain_stats_tt
}
else_if = {
limit = {
OR = {
var:dark_insights_prowess_increases < dark_insights_prowess_increase_maximum
var:dark_insights_intrigue_increases < dark_insights_intrigue_increase_maximum
}
}
custom_tooltip = dark_insight_gain_stats_tt
hidden_effect = {
random = {
chance = dark_insights_stat_increase_chance
scope:actor = {
}
random_list = {
50 = {
trigger = {
var:dark_insights_prowess_increases < dark_insights_prowess_increase_maximum
}
send_interface_toast = {
title = dark_insights_gain_message
left_icon = scope:actor
right_icon = scope:recipient
add_character_modifier = {
modifier = dark_insights_prowess_modifier
}
}
change_variable = {
name = dark_insights_prowess_increases
add = 1
}
}
50 = {
trigger = {
var:dark_insights_intrigue_increases < dark_insights_intrigue_increase_maximum
}
send_interface_toast = {
title = dark_insights_gain_message
left_icon = scope:actor
right_icon = scope:recipient
add_character_modifier = {
modifier = dark_insights_intrigue_modifier
}
}
change_variable = {
name = dark_insights_intrigue_increases
add = 1
}
}
}
}
}
}
else_if = {
limit = {
var:dark_insights_prowess_increases >= dark_insights_prowess_increase_maximum
var:dark_insights_intrigue_increases >= dark_insights_intrigue_increase_maximum
}
custom_tooltip = dark_insights_maximum_insight_tt
}
}
}As written in game/common/scripted_effects/00_intrigue_perk_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls dark_insights_skill_gain_roll_effect.
Character interactions (1)
Source: game/common/scripted_effects/00_intrigue_perk_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.