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

Scripted effect

councillor_spouse_lifestyle_rank_up_effect

councillor_spouse_lifestyle_rank_up_effect = { SKILL = … }

game/common/scripted_effects/00_spouse_effects.txt, line 13 (105 lines). Parameters: $SKILL$.

councillor_spouse_lifestyle_rank_up_effect is a scripted effect in Crusader Kings III, written at line 13 of its file. A call passes 1 parameter: SKILL. The game's script calls it in 1 place, among them councillor_spouse_background.0001 (event). Patch 1.20.1.2, from game/common/scripted_effects/00_spouse_effects.txt.

What it does

  • …% chance of:
    • If has the Modifier: councillor spouse … 2 modifier:
    • Else, if has the Modifier: councillor spouse … 1 modifier:
      • Loses “councillor spouse … 1 modifier”
      • scope:council_owner › scope:councillor: Gains the modifier “councillor spouse $SKILL$ 2 modifier”
    • Otherwise › scope:council_owner › scope:councillor: Gains the modifier “councillor spouse $SKILL$ 1 modifier”

• 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 (105 lines of game script)
councillor_spouse_lifestyle_rank_up_effect = {
	random = {
		chance = var:councillor_spouse_lifestyle_progress
		modifier = {
			add = $SKILL$
		}
		modifier = {
			factor = councillor_spouse_lifestyle_progress_factor
		}
		save_temporary_scope_value_as = {
			name = ranked_up
			value = yes
		}
		save_scope_as = councillor
		random_spouse = {
			limit = {
				exists = this.cp:councillor_spouse
				this.cp:councillor_spouse = scope:councillor
			}
			save_scope_as = council_owner
		}
		save_scope_value_as = {
			name = skill_type
			value = flag:$SKILL$
		}
		if = {
			limit = { has_character_modifier = councillor_spouse_$SKILL$_2_modifier }
			remove_character_modifier = councillor_spouse_$SKILL$_2_modifier
			scope:council_owner = {
				send_interface_message = {
					type = msg_spouse_task_good
					title = councillor_spouse_background.0001.title
					desc = councillor_spouse_background.0001.$SKILL$_notification
					left_icon = scope:councillor
					scope:councillor = {
						switch = {
							trigger = scope:skill_type
							flag:diplomacy = {
								add_trait = diplomat
								debug_log = "A Spouse reached Lifestyle Rank 3, Diplomat was set"
							}
							flag:martial = {
								add_trait = strategist
								debug_log = "A Spouse reached Lifestyle Rank 3, Strategist was set"
							}
							flag:stewardship = {
								add_trait = architect
								debug_log = "A Spouse reached Lifestyle Rank 3, Architect was set"
							}
							flag:intrigue = {
								add_trait = schemer
								debug_log = "A Spouse reached Lifestyle Rank 3, Schemer was set"
							}
							flag:learning = {
								add_trait = erudite
								debug_log = "A Spouse reached Lifestyle Rank 3, Erudite was set"
							}
							fallback = { debug_log = "A Spouse reached Lifestyle Rank 3, but no trait was set" }
						}
					}
				}
			}
		}
		else_if = {
			limit = { has_character_modifier = councillor_spouse_$SKILL$_1_modifier }
			remove_character_modifier = councillor_spouse_$SKILL$_1_modifier
			scope:council_owner = {
				send_interface_message = {
					type = msg_spouse_task_good
					title = councillor_spouse_background.0001.title
					desc = councillor_spouse_background.0001.$SKILL$_notification
					left_icon = scope:councillor
					scope:councillor = {
						add_character_modifier = {
							modifier = councillor_spouse_$SKILL$_2_modifier
						}
					}
				}
			}
			debug_log = "A Spouse reached Lifestyle Rank 2"
		}
		else = {
			scope:council_owner = {
				send_interface_message = {
					type = msg_spouse_task_good
					title = councillor_spouse_background.0001.title
					desc = councillor_spouse_background.0001.$SKILL$_notification
					left_icon = scope:councillor
					scope:councillor = {
						add_character_modifier = {
							modifier = councillor_spouse_$SKILL$_1_modifier
						}
					}
				}
			}
			debug_log = "A Spouse reached Lifestyle Rank 1"
		}

		#Reset the progress once the character has ranked up
		set_variable = {
			name = councillor_spouse_lifestyle_progress
			value = 0
		}
	}
}

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

Where it is used

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

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