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

Scripted effect · The Royal Court files

court_trait_save_scopes_and_send_interface_message_effect

court_trait_save_scopes_and_send_interface_message_effect = { COURT_TYPE = … }

game/common/scripted_effects/00_ep1_court_type_effects.txt, line 65 (104 lines). Parameters: $COURT_TYPE$.

court_trait_save_scopes_and_send_interface_message_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 65 of its file. A call passes 1 parameter: COURT_TYPE. The game's script calls it in 1 place, among them assign_court_type_traits_to_courtiers_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_ep1_court_type_effects.txt.

The comment above it in the file

Effect to send interface messages about courtiers gaining/leveling court specific traits

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 (104 lines of game script)
court_trait_save_scopes_and_send_interface_message_effect = {
	# Second trait level at CG level 8
	if = {
		limit = {
			any_courtier = {
				ep1_courtier_valid_for_court_trait_2_trigger = { TYPE = $COURT_TYPE$ }
			}
		}
		# If it's more than two we send a gathered message
		if = {
			limit = {
				any_courtier = {
					ep1_courtier_valid_for_court_trait_2_trigger = { TYPE = $COURT_TYPE$ }
					count > 2
				}
			}
			court_trait_handle_multiple_scopes_effect = {
				COURT_TYPE = $COURT_TYPE$
				TRAIT_LEVEL = 2
			}
			send_interface_message = {
				type = msg_courtiers_gain_court_traits
				title = multiple_courtiers_gained_court_type_trait_title
				left_icon = scope:courtier_1
				right_icon = scope:courtier_2
				custom_tooltip = multiple_courtiers_gained_$COURT_TYPE$_2_trait_desc
			}
			remove_variable = num_other_relevant_courtiers
		}
		# Else we send one message per courtier
		else = {
			every_courtier = {
				limit = {
					ep1_courtier_valid_for_court_trait_2_trigger = { TYPE = $COURT_TYPE$ }
				}
				save_scope_as = courtier
				root = {
					send_interface_message = {
						type = msg_courtiers_gain_court_traits
						title = courtier_gained_court_type_trait_title
						right_icon = scope:courtier
						scope:courtier = {
							change_trait_rank = {
								trait = $COURT_TYPE$_court
								rank = 1
							}
						}		
					}
				}
			}
		}
	}
	# First trait level at CG level 5
	if = {
		limit = {
			any_courtier = {
				ep1_courtier_valid_for_court_trait_1_trigger = { TYPE = $COURT_TYPE$ }
			}
		}
		# If it's more than two we send a gathered message
		if = {
			limit = {
				any_courtier = {
					ep1_courtier_valid_for_court_trait_1_trigger = { TYPE = $COURT_TYPE$ }
					count > 2
				}
			}
			court_trait_handle_multiple_scopes_effect = {
				COURT_TYPE = $COURT_TYPE$
				TRAIT_LEVEL = 1
			}
			send_interface_message = {
				type = msg_courtiers_gain_court_traits
				title = multiple_courtiers_gained_court_type_trait_title
				left_icon = scope:courtier_1
				right_icon = scope:courtier_2
				custom_tooltip = multiple_courtiers_gained_$COURT_TYPE$_1_trait_desc
			}
		}
		# Else we send one message per courtier
		else = {
			every_courtier = {
				limit = {
					ep1_courtier_valid_for_court_trait_1_trigger = { TYPE = $COURT_TYPE$ }
				}
				save_scope_as = courtier
				root = {
					send_interface_message = {
						type = msg_courtiers_gain_court_traits
						title = courtier_gained_court_type_trait_title
						right_icon = scope:courtier
						scope:courtier = {
							change_trait_rank = {
                                trait = $COURT_TYPE$_court
                                rank = 1
                            }
						}
						#custom_tooltip = courtier_gained_$COURT_TYPE$_1_trait_desc
					}
				}
			}
		}
	}
}

As written in game/common/scripted_effects/00_ep1_court_type_effects.txt.

Where it is used

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

Source: game/common/scripted_effects/00_ep1_court_type_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?