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_join_house_bloc_effect

tgp_join_house_bloc_effect = { INVITER = … OPINION = … }

game/common/scripted_effects/10_dlc_tgp_house_bloc_scripted_effects.txt, line 122 (75 lines). Parameters: $INVITER$, $OPINION$.

tgp_join_house_bloc_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 122 of its file. A call passes 2 parameters: INVITER and OPINION. The game's script calls it in 17 places, among them Invite House to Bloc (interaction), Join House Bloc (interaction) and Festival (activity). 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_house_bloc_scripted_effects.txt.

The comment above it in the file

Add additional character, and all members of their house, to a 'block'.
root: house - who was invited
INVITER: house - who is a member of the bloc to join

What it does

  • $INVITER$ ?= { … }
  • If

    a check the game hides

    Then

    • scope:joiner.house_head: House … will join the … Bloc

    Else if

    • If

      a check the game hides

      Then

      • scope:old_bloc != scope:bloc

    Then

    • House … will join the …
    • If

      • $OPINION$ = flag:yes
      • scope:inviter != scope:joiner

      Then

      • scope:inviter:
        • Their house head › If played by the AI:
          • If

            • has_opinion_modifier = { modifier = left_house_bloc_opinion target = scope:joiner.house_head }

            Then

            • remove_opinion = { modifier = left_house_bloc_opinion target = scope:joiner.house_head }
          • Opinion: Joined House Bloc (+15)
        • change_house_relation_effect = { … }

• 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 (75 lines of game script)
tgp_join_house_bloc_effect = {
	save_scope_as = joiner
	house_confederation ?= { save_scope_as = old_bloc }
	$INVITER$ ?= {
		save_scope_as = inviter
		house_confederation ?= { save_scope_as = bloc }
	}
	if = { # Tooltip for interaction
		limit = { NOT = { exists = scope:bloc } }
		scope:joiner.house_head = { custom_tooltip = join_house_bloc_tt_no_scope }
	}
	else_if = {
		limit = {
			exists = scope:joiner
			exists = scope:inviter
			exists = scope:bloc
			trigger_if = {
				limit = { exists = scope:old_bloc }
				scope:old_bloc != scope:bloc
			}
		}
		hidden_effect = {
			scope:old_bloc ?= { remove_confederation_member_house = scope:joiner }
		}
		# ADD MEMBER HOUSE
		custom_description = {
			text = join_house_bloc_effect
			subject = scope:joiner.house_head
			object = scope:inviter.house_head
			scope:bloc ?= {
				hidden_effect = { add_confederation_member_house = scope:joiner }
			}
		}
		# OPINION
		if = {
			limit = {
				$OPINION$ = flag:yes
				exists = scope:joiner
				scope:inviter != scope:joiner
			}
			scope:inviter ?= {
				house_head ?= {
					if = { # Hide for players
						limit = { is_ai = yes }
						if = {
							limit = {
								has_opinion_modifier = {
									modifier = left_house_bloc_opinion
									target = scope:joiner.house_head
								}
							}
							remove_opinion = {
								modifier = left_house_bloc_opinion
								target = scope:joiner.house_head
							}
						}
						add_opinion = {
							modifier = joined_house_bloc_opinion
							target = scope:joiner.house_head
							opinion = 15
						}
					}
				}
				change_house_relation_effect = {
					HOUSE = scope:joiner
					VALUE = house_relation_improve_medium_value
					REASON = joined_bloc
					CHAR = scope:joiner.house_head
					TARGET_CHAR = scope:inviter.house_head
					TITLE = scope:dummy_gender
				}
			}
		}
	}
}

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

Where it is used

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

Character interactions (2)

Activities (1)

Activity pulse actions (1)

  • festival_join_bloc

Events (6)

Scripted effects inside an event file (3)

  • court_ceremonial_bloc_bribe_effect
  • tgp_japan_general_8800_grant_effect
  • tgp_yoshinaka_new_house_bloc_effect

On actions (the game's own hooks) (1)

  • on_vassal_gained

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?