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

Scripted effect

accolade_knight_training_effect

accolade_knight_training_effect = yes

game/common/scripted_effects/00_accolades_scripted_effects.txt, line 7568 (1508 lines). No parameters.

accolade_knight_training_effect is a scripted effect in Crusader Kings III, written at line 7568 of its file. It takes no parameters: accolade_knight_training_effect = yes. The game's script calls it in 1 place, among them three_year_playable_pulse (on action). Patch 1.20.1.2, from game/common/scripted_effects/00_accolades_scripted_effects.txt.

The comment above it in the file

train chars in acclaimed knight's court
Inside Accolade scope

What it does

  • acclaimed_knight = { … }
  • pick_accolade_type_effect = yes
  • If

    a check the game hides

    Then

    • scope:acclaimed_knight:
      • …% chance of:
      • 1 of 4 things will happen:
        • 25%: Nothing else happens
        • 25%: Nothing else happens
        • 25%: Nothing else happens
        • 25%: Nothing else happens
      • Else, if all of these hold:
        • Conditions › scope:accolade:
          • scope:type = accolade_type:vanguard_attribute
        • Then › 1 of 2 things will happen:
          • 67%: Nothing else happens
          • 33%: Nothing else happens
      • Else, if all of these hold:
        • Conditions › scope:accolade:
          • scope:type = accolade_type:besieger_attribute
        • Then › 1 of 3 things will happen:
          • 50%: Nothing else happens
          • 33%: Nothing else happens
          • 17%: Nothing else happens
    • scope:owner › scope:acclaimed_knight:
      • If does not have the Trait: scope:personality trait add: Gains the Trait scope:personality trait add
      • If number of personality traits more than 3: Loses the Trait scope:personality trait remove
      • If

        • scope:accolade:
          • scope:type = accolade_type:politicker_attribute
        • Diplomacy less than 10

        Then

        • add_diplomacy_skill = 2

        Else if

        • scope:accolade:
          • scope:type = accolade_type:politicker_attribute
        • Diplomacy less than 25

        Then

        • add_diplomacy_skill = 1

        Else if

        • scope:accolade:
          • scope:type = accolade_type:tactician_attribute
        • Martial less than 10

        Then

        • add_martial_skill = 2

        Else if

        • scope:accolade:
          • scope:type = accolade_type:tactician_attribute
        • Martial less than 25

        Then

        • add_martial_skill = 1

        Else if

        • scope:accolade:
          • scope:type = accolade_type:reeve_attribute
        • Stewardship less than 10

        Then

        • add_stewardship_skill = 2

        Else if

        • scope:accolade:
          • scope:type = accolade_type:reeve_attribute

        Then

        • add_stewardship_skill = 1

        Else if

        • scope:accolade:
          • scope:type = accolade_type:manipulator_attribute
        • Intrigue less than 10

        Then

        • add_intrigue_skill = 2

        Else if

        • scope:accolade:
          • scope:type = accolade_type:manipulator_attribute
        • Intrigue less than 25

        Then

        • add_intrigue_skill = 1

        Else if

        • scope:accolade:
          • One of these

            • scope:type = accolade_type:mentor_attribute
            • or

              scope:type = accolade_type:gunpowder_attribute
        • Learning less than 10

        Then

        • add_learning_skill = 2

        Else if

        • scope:accolade:
          • One of these

            • scope:type = accolade_type:mentor_attribute
            • or

              scope:type = accolade_type:gunpowder_attribute
        • Learning less than 25

        Then

        • add_learning_skill = 1
      • If

        • scope:accolade:
          • scope:type = accolade_type:archer_attribute

        Then

        • If

          • scope:accolade.accolade_owner › Any held title:
            • Title tier exactly County
            • is_landless_type_title = no
            • Any county province:
              • One of these

                • terrain = forest
                • or

                  terrain = taiga
          • Has the Trait: Forest Fighter

          Then

        Else if

        • scope:accolade:
          • scope:type = accolade_type:skirmisher_attribute

        Then

        • If all of these hold:
          • … (more in the script below)
        • … (more in the script below)
      • … (more in the script below)

• 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)
accolade_knight_training_effect = {
	save_scope_as = accolade
	acclaimed_knight = { save_scope_as = acclaimed_knight }
	accolade_owner = {
		save_scope_as = owner
	}

	#Set tracking variable so knight isn't trained a crazy amount
	acclaimed_knight = {
		if = {
			limit = {
				NOT = {
					has_variable = acc_knight_trained
				}
			}

			set_variable = {
				name = acc_knight_trained
				value = 1
			}
		}
		else = {
			change_variable = {
				name = acc_knight_trained
				add = 1
			}
		}
	}
	pick_accolade_type_effect = yes


	#Train the knight
	if = {
		limit = {
			exists = scope:acclaimed_knight
		}
		#Have to set up randomized effects outside of message
		#FRICKIN ANNOYING AMIRITE?
		scope:acclaimed_knight = {
			#PERSONALITY TRAITS
			#Not DEFINITELY gaining personality trait, more likely based on squires quality
			random = {
				chance = {
					value = 30
					if = {
						limit = {
							scope:accolade = { var:lifetime_glory >= monumental_glory_value }
						}
						add = 10
					}
					if = {
						limit = {
							scope:accolade = { var:lifetime_glory >= massive_glory_value }
						}
						add = 10
					}
				}
				#HOUSE_KNIGHT - ADD LOYAL
				if = {
					limit = {
						scope:accolade = {
							scope:type = accolade_type:house_knight_attribute
						}
						NOR = {
							has_trait = loyal
							has_trait = disloyal
							has_focus = education_intrigue
							has_lifestyle = intrigue_lifestyle
							has_trait = education_intrigue
						}
					}
					trait:loyal = { save_scope_as = personality_trait_add }
				}
				accolade_personality_trait_picking_effect = yes
			}
			#GENERIC HASTILUDER XP (is randomized and then applied later)
			random_list = {
				1 = {
					add_character_flag = {
						flag = squire_foot
						days = 30
					}
				}
				1 = {
					add_character_flag = {
						flag = squire_horse
						days = 30
					}
				}
				1 = {
					trigger = {
						OR = {
							scope:accolade.accolade_owner = {
								government_has_flag = government_is_nomadic
							}
							culture = {
								OR = {
									culture_specializes_in_skirmisher_maa = yes
									culture_specializes_in_archer_maa = yes
									culture_specializes_in_archer_cavalry_maa = yes
								}
							}
						}
					}
					add_character_flag = {
						flag = squire_bow
						days = 30
					}
				}
				1 = {
					trigger = {
						culture = {
							OR = {
								has_cultural_parameter = poet_trait_romance_bonuses
								has_cultural_parameter = tells_stories
								has_cultural_parameter = poet_trait_gives_bonuses
								has_cultural_parameter = characters_are_better_court_poets
								has_cultural_parameter = poet_trait_more_common
								has_cultural_parameter = better_court_poets
								has_cultural_parameter = may_challenge_to_board_games

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

The first 120 of its 1508 lines; the rest is in game/common/scripted_effects/00_accolades_scripted_effects.txt from line 7568.

Where it is used

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

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

  • three_year_playable_pulse

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