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

Scripted effect

give_random_secret_effect

give_random_secret_effect = yes

game/common/scripted_effects/00_secret_effects.txt, line 2084 (71 lines). No parameters.

give_random_secret_effect is a scripted effect in Crusader Kings III, written at line 2084 of its file. It takes no parameters: give_random_secret_effect = yes. The game's script calls it in 2 places, among them A Shady Discussion (event yearly.5040) and yearly.5030 (event). Patch 1.20.1.2, from game/common/scripted_effects/00_secret_effects.txt.

The comment above it in the file

Used to give people a random secret (small chance of multiples)

What it does

• 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 (71 lines of game script)
give_random_secret_effect = {
	random_list = {
		20 = {
			modifier = {
				factor = 0
				OR = {
					has_trait = deviant
					any_secret = {
						type = secret_deviant
					}
				}
			}
			give_deviant_secret_or_trait_effect = yes
		}
		20 = {
			modifier = {
				factor = 0
				OR = {
					has_sexuality = homosexual
					any_secret = {
						type = secret_homosexual
					}
				}
			}
			give_homosexual_secret_or_nothing_effect = yes
		}
		10 = {
			modifier = {
				factor = 0
				OR = {
					has_trait = deviant
					any_secret = {
						type = secret_deviant
					}
					has_sexuality = homosexual
					any_secret = {
						type = secret_homosexual
					}
				}
			}
			add_secret = {
				type = secret_deviant
			}
			give_homosexual_secret_or_nothing_effect = yes
		}
		5 = { # Get ALL the secrets!
			if = {
				limit = {
					NOR = {
						has_sexuality = homosexual
						any_secret = {
							type = secret_homosexual
						}
					}
				}
				give_homosexual_secret_or_nothing_effect = yes
			}
			if = {
				limit = {
					NOR = {
						has_trait = deviant
						any_secret = {
							type = secret_deviant
						}
					}
				}
				give_deviant_secret_or_trait_effect = yes
			}
		}
	}
}

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

Where it is used

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

Events (2)

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