Scripted effect · All Under Heaven files
tgp_restore_japanese_government_decision_effect
tgp_restore_japanese_government_decision_effect = yesgame/common/scripted_effects/10_dlc_tgp_japan_scripted_effects.txt, line 2805 (90 lines). No parameters.
tgp_restore_japanese_government_decision_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 2805 of its file. It takes no parameters: tgp_restore_japanese_government_decision_effect = yes. The game's script calls it in 3 places, among them Restore Ritsuryō Bureaucracy (decision), Ritsuryō Bureaucracy Restored (event tgp_japan_decision.9911) and Ritsuryō Bureaucracy Restored (event tgp_japan_decision.9912). Its body carries 2 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_japan_scripted_effects.txt.
What it does
japan_clear_flavour_flags_effect = yes- Adopts Ritsuryō Government
- If does NOT have the Japanese Regency Succession Law: Adopts the Japanese Regency Succession Law
- Every Sōryō Vassal:
- Where: Government is Sōryō
- Opinion: Restored Ritsuryō Government
- Other same-Heritage Vassals will adopt Ritsuryō Government
• 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 (90 lines of game script)
tgp_restore_japanese_government_decision_effect = {
japan_clear_flavour_flags_effect = yes
save_scope_as = kampaku
save_scope_as = background_throne_room_scope
add_character_flag = tgp_japan_restore_japanese_government_flag
# Change government if relevant
change_government = japan_administrative_government
if = {
limit = {
NOT = { has_realm_law = japanese_regency_succession_law }
}
add_realm_law_skip_effects = japanese_regency_succession_law
}
# Inform vassals and convert governments if relevant
every_vassal = {
custom = every_japan_feudal_vassal_custom
limit = { government_has_flag = government_is_japan_feudal }
add_opinion = {
target = scope:kampaku
modifier = restored_ritsuryo_opinion
}
}
if = {
limit = { NOT = { exists = scope:vassal } }
custom_tooltip = tgp_japan_restore_japanese_government_decision_civil_war_tt
}
hidden_effect = {
ordered_powerful_vassal = {
limit = {
is_ai = yes
NOR = {
government_has_mechanic = administrative
is_allied_to = scope:kampaku
}
opinion = {
target = scope:kampaku
value < 25
}
save_temporary_scope_as = vassal_temp
NOT = {
scope:kampaku = { has_usable_hook = scope:vassal_temp }
}
}
order_by = military_power
save_scope_as = rebel
}
if = {
limit = {
NOT = { exists = scope:rebel }
}
ordered_vassal = {
limit = {
is_ai = yes
NOT = { government_has_mechanic = administrative }
opinion = {
target = scope:kampaku
value < 25
}
save_temporary_scope_as = vassal_temp
NOT = {
scope:kampaku = { has_usable_hook = scope:vassal_temp }
}
}
order_by = military_power
save_scope_as = rebel
}
}
if = {
limit = { exists = scope:rebel }
tgp_restore_ritsuryo_civil_war_effect = {
REBEL = scope:rebel
LIEGE = scope:kampaku
}
}
}
custom_tooltip = {
text = tgp_japan_restore_japanese_government_decision_vassal_tt
every_vassal_or_below = {
limit = {
primary_title.tier >= tier_county
culture = { has_same_culture_heritage = scope:kampaku.culture }
}
trigger_event = {
id = tgp_japan_decision.9912
delayed = yes
}
}
}
remove_character_flag = tgp_japan_restore_japanese_government_flag
}As written in game/common/scripted_effects/10_dlc_tgp_japan_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls tgp_restore_japanese_government_decision_effect.
Decisions (1)
Events (2)
- Ritsuryō Bureaucracy Restored
tgp_japan_decision.9911 - Ritsuryō Bureaucracy Restored
tgp_japan_decision.9912
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.