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

Scripted effect

yearly_0001_improve_skill_effect

yearly_0001_improve_skill_effect = { MENTEE = … MENTOR = … }

game/common/scripted_effects/00_yearly_event_effects.txt, line 83 (206 lines). Parameters: $MENTEE$, $MENTOR$.

yearly_0001_improve_skill_effect is a scripted effect in Crusader Kings III, written at line 83 of its file. A call passes 2 parameters: MENTEE and MENTOR. The game's script calls it in 1 place, among them yearly.0001 (event). Patch 1.20.1.2, from game/common/scripted_effects/00_yearly_event_effects.txt.

What it does

  • If yearly 0001 skill is Diplomacy › 1 of 2 things will happen:
    • 33% – I take … lessons to heart:
      • yearly_0001_success_modifier = { SKILL = diplomacy }
      • add_diplomacy_skill = 2
    • 67% – … advises me on my current situation:
  • Else, if yearly 0001 skill is Martial › 1 of 2 things will happen:
    • 33% – I take … lessons to heart:
      • yearly_0001_success_modifier = { SKILL = martial }
      • add_martial_skill = 2
    • 67% – … advises me on my current situation:
  • Else, if yearly 0001 skill is Stewardship › 1 of 2 things will happen:
    • 33% – I take … lessons to heart:
      • yearly_0001_success_modifier = { SKILL = stewardship }
      • add_stewardship_skill = 2
    • 67% – … advises me on my current situation:
  • Else, if yearly 0001 skill is Intrigue › 1 of 2 things will happen:
    • 33% – I take … lessons to heart:
      • yearly_0001_success_modifier = { SKILL = intrigue }
      • add_intrigue_skill = 2
    • 67% – … advises me on my current situation:
  • Else, if yearly 0001 skill is Learning › 1 of 2 things will happen:
    • 33% – I take … lessons to heart:
      • yearly_0001_success_modifier = { SKILL = learning }
      • add_learning_skill = 2
    • 67% – … advises me on my current situation:

• 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)
yearly_0001_improve_skill_effect = {
	$MENTOR$ = {
		save_scope_as = effect_mentor
	}
	$MENTEE$ = {
		save_scope_as = effect_mentee
	}

	#First we need to determine how much our mentor can teach us.
	#This is based on the skill difference between the two of us.
	if = {
		limit = {
			var:yearly_0001_skill = flag:diplomacy
		}

		random_list = {
			#Permanently increase Diplomacy by 2 points
			33 = {
				desc = yearly.0001.a.success

				#Lower chance of getting this result as Diplomacy increases.
				yearly_0001_success_modifier = {
					SKILL = diplomacy
				}

				#Apply the skill increase
				send_interface_toast = {
					title = yearly.0001.a.success
						left_icon = $MENTEE$
					right_icon = $MENTOR$
					add_diplomacy_skill = 2
				}
				
			}
			#Temporarily increase Diplomacy by 3 points
			66 = {
				desc = yearly.0001.a.failure

				send_interface_toast = {
					title = yearly.0001.a.failure
						left_icon = $MENTEE$
					right_icon = $MENTOR$
					add_character_modifier = {
						modifier = yearly_0001_improved_diplomacy
						years = 5
					}
				}
			}
		}
	}
	else_if = {
		limit = {
			var:yearly_0001_skill = flag:martial
		}

		random_list = {
			#Permanently increase Martial by 2 points
			33 = {
				desc = yearly.0001.a.success

				#Lower chance of getting this result as Martial increases.
				yearly_0001_success_modifier = {
					SKILL = martial
				}

				#Apply the skill increase
				send_interface_toast = {
					title = yearly.0001.a.success
						left_icon = $MENTEE$
					right_icon = $MENTOR$
					add_martial_skill = 2
				}
			}
			#Temporarily increase Martial by 3 points
			66 = {
				desc = yearly.0001.a.failure

				send_interface_toast = {
					title = yearly.0001.a.failure
						left_icon = $MENTEE$
					right_icon = $MENTOR$
					add_character_modifier = {
						modifier = yearly_0001_improved_martial
						years = 5
					}
				}
			}
		}

	}
	else_if = {
		limit = {
			var:yearly_0001_skill = flag:stewardship
		}
		
		random_list = {
			#Permanently increase Stewardship by 2 points
			33 = {
				desc = yearly.0001.a.success
				#Lower chance of getting this result as Stewardship increases.
				yearly_0001_success_modifier = {
					SKILL = stewardship
				}
				
				#Apply the skill increase
				send_interface_toast = {
					title = yearly.0001.a.success
						left_icon = $MENTEE$
					right_icon = $MENTOR$
					add_stewardship_skill = 2
				}
			}
			#Temporarily increase Stewardship by 3 points
			66 = {
				desc = yearly.0001.a.failure

				send_interface_toast = {
					title = yearly.0001.a.failure
						left_icon = $MENTEE$
					right_icon = $MENTOR$

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

The first 120 of its 206 lines; the rest is in game/common/scripted_effects/00_yearly_event_effects.txt from line 83.

Where it is used

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

Events (1)

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