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_secret_and_save_as_secret_effect

give_secret_and_save_as_secret_effect = { SECRET_TYPE = … }

game/common/scripted_effects/00_secret_effects.txt, line 2396 (40 lines). Parameters: $SECRET_TYPE$.

give_secret_and_save_as_secret_effect is a scripted effect in Crusader Kings III, written at line 2396 of its file. A call passes 1 parameter: SECRET_TYPE. No file of common/, events/ or history/ calls it. Patch 1.20.1.2, from game/common/scripted_effects/00_secret_effects.txt.

The comment above it in the file

Give secret and save as scope:secret

What it does

  • If

    • One of these

      • scope:give_secret_type = flag:secret_deviant
      • or

        scope:give_secret_type = flag:secret_cannibal
      • or

        scope:give_secret_type = flag:secret_non_believer
      • or

        scope:give_secret_type = flag:secret_witch

    Then

    • add_secret = { type = $SECRET_TYPE$ }

    Else if

    • scope:give_secret_type = flag:secret_incest

    Then

    Else if

    • scope:give_secret_type = flag:secret_homosexual
    • is_male = yes

    Then

• 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 (40 lines of game script)
give_secret_and_save_as_secret_effect = {
	save_temporary_scope_value_as = {
		name = give_secret_type
		value = flag:$SECRET_TYPE$
	}

	if = {
		limit = {
			OR = {
				scope:give_secret_type = flag:secret_deviant
				scope:give_secret_type = flag:secret_cannibal
				scope:give_secret_type = flag:secret_non_believer
				scope:give_secret_type = flag:secret_witch
			}
		}
		add_secret = {
			type = $SECRET_TYPE$
		}
	}
	else_if = {
		limit = {
			scope:give_secret_type = flag:secret_incest
		}
		give_incest_secret_or_nothing_effect = yes
	}
	else_if = {
		limit = {
			scope:give_secret_type = flag:secret_homosexual
			is_male = yes
		}
		give_homosexual_secret_or_nothing_effect = yes
	}

	random_secret = {
		limit = {
			secret_type = $SECRET_TYPE$
		}
		save_scope_as = secret
	}
}

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

Where it is used

No file of common/, events/ or history/ calls it.

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?