Scripted effect
end_loan_story_consequences_tooltip_effect
end_loan_story_consequences_tooltip_effect = yesgame/common/scripted_effects/00_scripted_effects.txt, line 879 (54 lines). No parameters.
end_loan_story_consequences_tooltip_effect is a scripted effect in Crusader Kings III, written at line 879 of its file. It takes no parameters: end_loan_story_consequences_tooltip_effect = yes. The game's script calls it in 2 places, among them story_cycle_loan (story cycle) and end_loan_story_effect (scripted effect). Patch 1.21.0, from game/common/scripted_effects/00_scripted_effects.txt.
What it does
var:lender:If
None of these
- scope:debtor_temp › Any owned story:
story_type = story_cycle_loan- Lender is scope:lender temp
NOT = { this = scope:loan_temp }
- scope:debtor_temp › Any owned story:
One of these
has_hook_of_type = { target = scope:debtor_temp type = strong_loan_hook }or
has_hook_of_type = { target = scope:debtor_temp type = weak_loan_hook }
Then
If
has_hook_of_type = { target = scope:debtor_temp type = strong_loan_hook }
Then
remove_hook = { target = scope:debtor_temp type = strong_loan_hook }
Otherwise
remove_hook = { target = scope:debtor_temp type = weak_loan_hook }
gdp_update_usury_reputation_effect = yes
• 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 (54 lines of game script)
end_loan_story_consequences_tooltip_effect = {
save_temporary_scope_as = loan_temp
story_owner = { save_temporary_scope_as = debtor_temp }
var:lender = {
save_temporary_scope_as = lender_temp
if = { # Clear relation
limit = { has_relation_debtor = scope:debtor_temp }
hidden_effect = { remove_relation_debtor = scope:debtor_temp }
}
if = { # Clear hook
limit = {
scope:debtor_temp = { is_alive = yes }
NOT = {
scope:debtor_temp = { # only if there is not another loan (edge-case from inheritance, etc.)
any_owned_story = {
story_type = story_cycle_loan
var:lender ?= scope:lender_temp
NOT = { this = scope:loan_temp }
}
}
}
OR = {
has_hook_of_type = {
target = scope:debtor_temp
type = strong_loan_hook
}
has_hook_of_type = {
target = scope:debtor_temp
type = weak_loan_hook
}
}
}
if = {
limit = {
has_hook_of_type = {
target = scope:debtor_temp
type = strong_loan_hook
}
}
remove_hook = {
target = scope:debtor_temp
type = strong_loan_hook
}
}
else = {
remove_hook = {
target = scope:debtor_temp
type = weak_loan_hook
}
}
}
gdp_update_usury_reputation_effect = yes
}
}As written in game/common/scripted_effects/00_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls end_loan_story_consequences_tooltip_effect.
Story cycles (1)
- story_cycle_loan
Scripted effects (1)
Source: game/common/scripted_effects/00_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.21.0.