CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

Scripted effect · All Under Heaven files

tgp_on_member_house_left_shared_effect

tgp_on_member_house_left_shared_effect = yes

game/common/scripted_effects/10_dlc_tgp_house_bloc_scripted_effects.txt, line 914 (134 lines). No parameters.

tgp_on_member_house_left_shared_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 914 of its file. It takes no parameters: tgp_on_member_house_left_shared_effect = yes. The game's script calls it in 6 places, among them house_bloc_ceremony (confederation types), house_bloc_determination (confederation types) and house_bloc_humility (confederation types). Its body carries 3 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_house_bloc_scripted_effects.txt.

What it does

• 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)
tgp_on_member_house_left_shared_effect = {
    save_scope_as = bloc
    scope:house = {
        save_scope_as = leaver
        if = {
            limit = { has_variable = recently_joined_bloc }
            remove_variable = recently_joined_bloc
        }
		house_head ?= { save_scope_as = house_head }
    }
    # MESSAGES
    every_player = {
        limit = {
            OR = {
                house = scope:house
                confederation ?= scope:bloc
            }
        }
        # Inform Members of Leavers
        send_interface_toast = {
            type = msg_house_left_house_bloc 
            title = msg_house_left_bloc
            desc = msg_house_left_bloc_desc
            left_icon = scope:leaver
            right_icon = scope:bloc.leading_house
            if = {
            	limit = {
            		NOT = { exists = scope:house_head }
            	}
				custom_tooltip = msg_house_left_bloc_no_reason
            }
			else_if = {
				limit = { house = scope:leaver }
				custom_tooltip = msg_house_left_bloc_desc_root
			}
			else = {
				custom_tooltip = msg_house_left_bloc_desc
			}
            # MEMBER LIST TOOLTIP
            #show_as_tooltip = {
            #   scope:bloc = {
            #       every_in_list = {
            #           variable = leaving_house_members
            #           limit = { house = scope:leaver }
            #           #custom = house_left_bloc_member_custom
            #           custom_tooltip = house_bloc_member_tt
            #       }
            #   }
            #}
        }
    }
    every_in_list = {
        variable = leaving_house_members
        limit = { house = scope:leaver }
        save_temporary_scope_as = house_member_temp
	    if = {
	     	limit = { is_alive = yes }
	     	remove_character_flag = bloc_message_flag
	    }
        scope:bloc = {
            remove_list_variable = {
                name = leaving_house_members
                target = scope:house_member_temp
            }
        }
        # Find sub-Vassal houses of leaving vassal Houses
        if = {
            limit = {
                house.house_head = { is_independent_ruler = no } 
            }
            scope:bloc = {
                every_confederation_member_house = {
                    limit = {
                        house_head = {
                            is_independent_ruler = no
                            liege.house ?= scope:house
                        }
                        NOR = {
                            this = scope:house
                            is_in_list = leaving_vassal_houses
                        }
                    }
                    add_to_list = leaving_vassal_houses
                }
            }
        }
    }
    # Find leader if necessary
    if = {
        limit = { NOT = { exists = leading_house } }
		if = {
			limit = {
				any_confederation_member = { has_title = title:e_japan }
			}
			random_confederation_member = {
				limit = { has_title = title:e_japan }
				save_scope_as = new_leader_scope
			}
			tgp_set_house_bloc_leading_house_effect = { LEADER = scope:new_leader_scope }
		}
		else = {
			tgp_find_new_house_bloc_leader_effect = yes
		}
    }
    # Remove Vassal houses of leaving Houses from above
    every_in_list = {
        list = leaving_vassal_houses
        save_temporary_scope_as = vassal_house_temp
		set_variable = {
			name = bloc_leaving_reason
			value = flag:reason_followed_liege
			days = 4
		}
		tgp_leave_house_bloc_effect = {
			OPINION = flag:no
			TRUCE = flag:yes
		}
    }
    # Disband if necessary
    if = {

As written in game/common/scripted_effects/10_dlc_tgp_house_bloc_scripted_effects.txt.

The first 120 of its 134 lines; the rest is in game/common/scripted_effects/10_dlc_tgp_house_bloc_scripted_effects.txt from line 914.

Where it is used

Every place in common/, events/ and history/ that calls tgp_on_member_house_left_shared_effect.

Confederation types (6)

  • house_bloc_ceremony
  • house_bloc_determination
  • house_bloc_humility
  • house_bloc_prosperity
  • house_bloc_service
  • house_bloc_strength

Source: game/common/scripted_effects/10_dlc_tgp_house_bloc_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.

Spotted a mistake on this page?