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

set_book_subject_effect

set_book_subject_effect = { BASE_SCOPE = … NO_SUBJECT = … }

game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt, line 2689 (435 lines). Parameters: $BASE_SCOPE$, $NO_SUBJECT$.

set_book_subject_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 2689 of its file. A call passes 2 parameters: BASE_SCOPE and NO_SUBJECT. The game's script calls it in 2 places, among them Inspiration Funded (event fund_inspiration.0031) and Book Inspiration (inspirations). Patch 1.20.1.2, from game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt.

The comment above it in the file

Effect used when a character becomes inspired to write a book

What it does

Every line of it is script with no tooltip text: the script is below.

The script as written (120 lines of game script)
set_book_subject_effect = {
	save_temporary_scope_value_as = {
		name = allow_no_subject_option
		value = $NO_SUBJECT$
	}
	hidden_effect = { #If they haven't specified what they're gonna write about we decide it here (might still leave it up to the sponsor if allow_no_subject_option = yes!)
		$BASE_SCOPE$ = {
			if = {
				limit = {
					NOT = { exists = var:book_subject }
				}
				random_list = { #What do they want to write about?
					1 = {
						modifier = {
							add = 60
							has_education_martial_trigger = yes
						}
						modifier = {
							add = 40
							book_subject_martial_trigger = yes
						}
						modifier = {
							add = { #If they're good you get +, if they're shit you get -
								value = average_skill_rating
								subtract = martial
								multiply = -5
							}
						}
						set_variable = {
							name = book_subject
							value = flag:martial
						}
					}
					1 = {
						modifier = {
							add = 60
							has_education_diplomacy_trigger = yes
						}
						modifier = {
							add = { #If they're good you get +, if they're shit you get -
								value = average_skill_rating
								subtract = diplomacy
								multiply = -5
							}
						}
						set_variable = {
							name = book_subject
							value = flag:diplomacy
						}
					}
					1 = {
						modifier = {
							add = 60
							has_education_stewardship_trigger = yes
						}
						modifier = {
							add = { #If they're good you get +, if they're shit you get -
								value = average_skill_rating
								subtract = stewardship
								multiply = -5
							}
						}
						set_variable = {
							name = book_subject
							value = flag:stewardship
						}
					}
					1 = {
						modifier = {
							add = 60
							has_education_intrigue_trigger = yes
						}
						modifier = {
							add = { #If they're good you get +, if they're shit you get -
								value = average_skill_rating
								subtract = intrigue
								multiply = -5
							}
						}
						set_variable = {
							name = book_subject
							value = flag:intrigue
						}
					}
					1 = {
						modifier = {
							add = 60
							has_education_learning_trigger = yes
						}
						modifier = {
							add = { #If they're good you get +, if they're shit you get -
								value = average_skill_rating
								subtract = learning
								multiply = -5
							}
						}
						set_variable = {
							name = book_subject
							value = flag:learning
						}
					}
					1 = {
						modifier = {
							add = 50
							book_subject_medicine_trigger = yes
						}
						modifier = {
							add = 20
							is_witch_trigger = yes
						}
						modifier = {
							add = {
								value = learning
								multiply = 2
							}
						}
						ai_value_modifier = {
							ai_rationality = 0.25
						}
						set_variable = {

As written in game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt.

The first 120 of its 435 lines; the rest is in game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt from line 2689.

Where it is used

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

Events (1)

Inspirations (1)

  • Book Inspiration

Source: game/common/scripted_effects/01_ep1_court_artifact_creation_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?