Scripted effect · All Under Heaven files
japan_establish_house_fief_effect
japan_establish_house_fief_effect = yesgame/common/scripted_effects/10_dlc_tgp_japan_scripted_effects.txt, line 1 (137 lines). No parameters.
japan_establish_house_fief_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 1 of its file. It takes no parameters: japan_establish_house_fief_effect = yes. The game's script calls it in 2 places, among them The … Fief (event tgp_japan_decision.9001) and The … Fief (event tgp_japan_decision.9002). Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_japan_scripted_effects.txt.
What it does
If
Then
If
a check the game hides
Then
create_dynasty = { … }
- Their house:
set_house_name_from_dynasty = dynasty
- Adopts Sōryō Government
If
a check the game hides
Then
- Otherwise:
create_noble_family_effect = { GOVERNMENT_GIVER = this }- scope:new_title: The coat of arms changes
scope:old_head:- If played by the AI: Opinion: Split Clan
- Event tgp_japan_decision.9005
- Otherwise:
- Their top liege:
If
scope:new_head:- Is landed
None of these
- Petition liege house fief allowed flag is scope:new head.top liege
- Their top liege: Government is Sōryō
Then
- Opinion: Established Fief
create_character_memory = { type = establish_house_fief_memory }- One memory, picked in order:
memory_type = establish_house_fief_memory
add_achievement_flag_effect = { FLAG = achievement_a_house_of_my_own_flag }
• 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)
japan_establish_house_fief_effect = {
save_scope_as = house_fiefer
save_scope_as = new_head
# Dynasty
if = {
limit = { tgp_japan_cadet_creates_dynasty_trigger = yes }
if = {
limit = { exists = var:new_japanese_house_name }
create_dynasty = {
name = {
first_valid = {
triggered_desc = {
trigger = { scope:new_head.var:new_japanese_house_name ?= flag:japanese_house_random_barony }
desc = japanese_house_random_barony
}
triggered_desc = {
trigger = { scope:new_head.var:new_japanese_house_name ?= flag:japanese_house_primary_county }
desc = japanese_house_primary_county
}
triggered_desc = {
trigger = { scope:new_head.var:new_japanese_house_name ?= flag:japanese_house_domicile_barony }
desc = japanese_house_domicile_barony
}
triggered_desc = {
trigger = { scope:new_head.var:new_japanese_house_name ?= flag:japanese_house_domicile_county }
desc = japanese_house_domicile_county
}
triggered_desc = {
trigger = { scope:new_head.var:new_japanese_house_name ?= flag:japanese_house_first_name }
desc = japanese_house_first_name
}
triggered_desc = {
trigger = { scope:new_head.var:new_japanese_house_name ?= flag:custom }
desc = japanese_house_name_custom
}
desc = japanese_house_name_flag
}
}
save_scope_as = new_dynasty
}
}
else = {
create_dynasty = { save_scope_as = new_dynasty }
}
house = {
set_house_name_from_dynasty = dynasty
save_scope_as = new_house
}
}
# House
else_if = {
limit = { is_house_head = no }
found_cadet_house_decision_effect = {
CHARACTER = root
PRESTIGE = 0
}
}
# Government
change_government = japan_feudal_government
# Old Dynasty
if = {
limit = { exists = scope:new_house }
# Rename old NF title
if = {
limit = {
scope:old_head ?= this
exists = scope:old_nf_title
}
#scope:old_nf_title = { set_title_name_dynamic = japanese_noble_family_name }
}
else = {
create_noble_family_effect = { GOVERNMENT_GIVER = this }
scope:new_title = {
#set_title_name_dynamic = japanese_noble_family_name
set_coa = scope:new_house
}
}
# Upset old Clan Head
scope:old_head ?= {
if = {
limit = { is_ai = yes }
add_opinion = {
modifier = established_house_fief_old_clan_head_opinion
target = root
}
}
trigger_event = tgp_japan_decision.9005
}
}
# Crime to Regent
top_liege ?= {
if = {
limit = {
scope:new_head = {
is_landed = yes
NOR = {
var:petition_liege_house_fief_allowed_flag ?= scope:new_head.top_liege
top_liege = {
government_has_flag = government_is_japan_feudal
}
}
}
}
show_as_tooltip = {
add_opinion = {
modifier = established_house_fief_regent_crime
target = scope:new_head
}
}
hidden_effect = {
send_interface_message = {
type = event_toast_effect_bad
title = tgp_japan_establish_house_fief_kampaku_toast
left_icon = scope:new_head
right_icon = scope:new_head.primary_title
show_as_tooltip = {
scope:new_head = { change_government = japan_feudal_government }
}
add_opinion = {
modifier = established_house_fief_regent_crimeAs written in game/common/scripted_effects/10_dlc_tgp_japan_scripted_effects.txt.
The first 120 of its 137 lines; the rest is in game/common/scripted_effects/10_dlc_tgp_japan_scripted_effects.txt from line 1.
Where it is used
Every place in common/, events/ and history/ that calls japan_establish_house_fief_effect.
Events (2)
- The … Fief
tgp_japan_decision.9001 - The … Fief
tgp_japan_decision.9002
Source: game/common/scripted_effects/10_dlc_tgp_japan_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.