Scripted effect · All Under Heaven files
local_examination_disburse_activity_entrant_rewards
local_examination_disburse_activity_entrant_rewards = yesgame/common/scripted_effects/tgp_imperial_examination_scripted_effects.txt, line 516 (184 lines). No parameters.
local_examination_disburse_activity_entrant_rewards is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 516 of its file. It takes no parameters: local_examination_disburse_activity_entrant_rewards = yes. The game's script calls it in 2 places, among them Local Examination (activity) and Releasing the Roll (event imperial_examination.7001). Patch 1.20.1.2, from game/common/scripted_effects/tgp_imperial_examination_scripted_effects.txt.
What it does
- If has “been caught cheating longterm” (a variable the game's script sets):
change_merit = { value = imperial_examination_merit_base_reward_value multiply = 0.1 }
- Else, if all of these hold:
- Conditions:
is_in_guest_subset = { name = entrants }
- Then:
- If played by a person › Their activity › Activity log entry › scope:entrant:
- Influence changes
- Merit changes
- Otherwise:
- Influence changes
- Merit changes
- Gains the modifier “Passed Provincial Examination”
- Character max merit level +2
create_character_memory = { type = passed_provincial_exam_memory }If
has_none_of_variables = { name = been_caught_cheating name = been_caught_cheating_longterm }- Government allows: merit
Then
add_secret = { target = scope:host type = secret_exam_cheater }
- If played by a person › Their activity › Activity log entry › scope:entrant:
- Conditions:
- Otherwise:
- If played by a person › Their activity › Activity log entry:
scope:entrant:- Influence +10
- Merit changes
failee_chance_to_gain_elder_effect = yes
- Otherwise:
- Influence +10
- Merit changes
- Their activity:
create_character_memory = { type = failed_provincial_exam_memory }
- If played by a person › Their activity › Activity log entry:
- If does not have the Trait: Confucian Education: Gains the Trait Confucian Education
- Confucian Education experience changes
• 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)
local_examination_disburse_activity_entrant_rewards = {
save_temporary_scope_as = entrant
#This variable is set to track the loc we show players when notifying them of their family's results.
#Cheaters
if = {
limit = { has_variable = been_caught_cheating_longterm }
#No influence for cheaters
change_merit = {
value = imperial_examination_merit_base_reward_value
multiply = 0.1
}
}
#Entrants
else_if = {
limit = {
is_in_guest_subset = { name = entrants }
}
#Influence based on your score
if = {
limit = { is_ai = no }
#Record it
involved_activity = {
add_activity_log_entry = {
key = imperial_examination_entrant_rewards
score = 80
tags = { completed }
show_in_conclusion = yes
character = scope:entrant
location = scope:entrant.location
scope:entrant = {
change_influence = local_examination_entrant_influence_reward_value
#Merit based on your score
change_merit = local_examination_merit_base_reward_value
# Gain Prestige if you have the relevant flag
if = {
limit = { has_character_flag = examination_prestige_reward }
remove_character_flag = examination_prestige_reward
add_prestige = major_prestige_gain
}
}
}
}
}
else = {
change_influence = local_examination_entrant_influence_reward_value
#Merit based on your score
change_merit = local_examination_merit_base_reward_value
# Gain Prestige if you have the relevant flag
if = {
limit = { has_character_flag = examination_prestige_reward }
remove_character_flag = examination_prestige_reward
add_prestige = major_prestige_gain
}
}
#Save flags
add_character_flag = passed_provincial_exam
add_character_modifier = {
modifier = tgp_passed_provincial_exam_modifier
}
#Create memory of passing the exam
create_character_memory = {
type = passed_provincial_exam_memory
}
ordered_memory = {
order_by = memory_creation_date
set_variable = { name = location value = memory_owner.location }
}
#Send interface_message to relevant chars to notify them
every_close_family_member = {
send_interface_message = {
type = event_msg_merit_effect_good
title = provincial_exam_close_family_passed
right_icon = root
desc = msg_provincial_exam_close_family_passed_desc
}
}
if = {
limit = {
has_character_flag = exam_cheat_intent
has_none_of_variables = {
name = been_caught_cheating
name = been_caught_cheating_longterm
}
government_allows = merit
}
add_secret = {
target = scope:host
type = secret_exam_cheater
}
}
}
#Failees
else = {
if = {
limit = { is_ai = no }
#Record it
involved_activity = {
add_activity_log_entry = {
key = imperial_examination_entrant_rewards
score = 80
tags = { completed }
show_in_conclusion = yes
character = scope:entrant
location = scope:entrant.location
scope:entrant = {
#Dwindling influence & merit for failees
change_influence = imperial_examination_failee_influence_reward_value
change_merit = imperial_examination_failee_merit_reward_value
# Lose Prestige if you have the relevant flag
if = {
limit = { has_character_flag = examination_prestige_reward }
remove_character_flag = examination_prestige_reward
add_prestige = major_prestige_loss
}
}
failee_chance_to_gain_elder_effect = yes
}
}As written in game/common/scripted_effects/tgp_imperial_examination_scripted_effects.txt.
The first 120 of its 184 lines; the rest is in game/common/scripted_effects/tgp_imperial_examination_scripted_effects.txt from line 516.
Where it is used
Every place in common/, events/ and history/ that calls local_examination_disburse_activity_entrant_rewards.
Activities (1)
Events (1)
- Releasing the Roll
imperial_examination.7001
Source: game/common/scripted_effects/tgp_imperial_examination_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.