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

Scripted effect

legitimize_bastard_interaction_opinions_effect

legitimize_bastard_interaction_opinions_effect = { BASTARD = … HOUSE_HEAD = … LEGITIMIZER = … }

game/common/scripted_effects/00_bastard_effects.txt, line 952 (223 lines). Parameters: $BASTARD$, $HOUSE_HEAD$, $LEGITIMIZER$.

legitimize_bastard_interaction_opinions_effect is a scripted effect in Crusader Kings III, written at line 952 of its file. A call passes 3 parameters: BASTARD, HOUSE_HEAD and LEGITIMIZER. The game's script calls it in 4 places, among them Legitimize Bastard (House) (interaction), House … (event bastard_interaction.0001) and The Blessing of Ignorance (event birth.2001). Patch 1.20.1.2, from game/common/scripted_effects/00_bastard_effects.txt.

The comment above it in the file

Effect run in the legitimize bastard interactions

What it does

  • If

    • Any secret:
      • secret_target = { … }

    Then

    • One random secret:
      • Where:
        • secret_target = { … }
      • expose_secret = scope:actor
  • $BASTARD$ = { … }

• 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)
legitimize_bastard_interaction_opinions_effect = {
	hidden_effect = {
		$LEGITIMIZER$ = {
			save_scope_as = actor
			save_scope_as = puppet_or_actor
		}
		if = {
			limit = {
				exists = $HOUSE_HEAD$
			}
			$HOUSE_HEAD$ = {
				save_scope_as = house_head
			}
		}

		if = {
			limit = {
				scope:actor = {
					is_parent_of = $BASTARD$
				}
			}
			scope:actor = {
				save_scope_as = parent
			}
		}
		else = {
			$BASTARD$ = {
				random_parent = {
					limit = {
						house = scope:actor.house
						is_playable_character = yes
					}
					alternative_limit = {
						house = scope:actor.house	
					}
					alternative_limit = {
						always = yes
					}
					weight = {
						base = 1
						compare_modifier = {
							value = highest_held_title_tier
							multiplier = 1000
						}
					}
					save_scope_as = parent
				}
			}
		}
	}
	# Reveal secret if you are the father
	if = {
		limit = {
			any_secret = {
				type = secret_unmarried_illegitimate_child
				secret_target = {
					real_father = {
						this = scope:actor
					}
				}
			}
		}
		random_secret = {
			type = secret_unmarried_illegitimate_child
			limit = {
				secret_target = {
					real_father = {
						this = root
					}
				}
			}
			expose_secret = scope:actor
		}
	}

	$BASTARD$ = {
		hidden_effect = { remove_trait = bastard }
		add_trait_force_tooltip = legitimized_bastard
		add_opinion = {
			target = scope:actor
			modifier = legitimized_me_opinion
		}
		scope:actor = {
			if = {
				limit = {
					is_parent_of = $BASTARD$
				}
				$BASTARD$ = {
					random_parent = {
						limit = { this != scope:actor }
						add_opinion = {
							target = scope:actor
							modifier = legitimized_my_child_opinion
						}
					}
				}
				every_spouse = {
					limit = {
						NOT = { is_parent_of = $BASTARD$ }
					}
					add_opinion = {
						target = scope:actor
						modifier = legitimized_a_bastard_opinion
					}
				}
				if = {
					limit = {
						any_child = {
							is_adult = yes
							NOT = { this = $BASTARD$ }
							NOR = {
								has_trait = bastard
								has_trait = legitimized_bastard
								opinion = {
									value >= 40
									target = $BASTARD$
								}
							}
						}
					}

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

The first 120 of its 223 lines; the rest is in game/common/scripted_effects/00_bastard_effects.txt from line 952.

Where it is used

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

Character interactions (1)

Events (3)

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