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

Scripted effect

add_hook_if_possible_default_length_effect

add_hook_if_possible_default_length_effect = { TARGET = … TYPE = … }

game/common/scripted_effects/00_hook_effects.txt, line 28 (14 lines). Parameters: $TARGET$, $TYPE$.

add_hook_if_possible_default_length_effect is a scripted effect in Crusader Kings III, written at line 28 of its file. A call passes 2 parameters: TARGET and TYPE. The game's script calls it in 19 places, among them laamp_construction_contract (contract), laamp_help_claimant_contract (contract) and laamp_join_faction_contract (contract). Patch 1.20.1.2, from game/common/scripted_effects/00_hook_effects.txt.

What it does

  • If

    • can_add_hook = { target = $TARGET$ type = $TYPE$ }

    Then

    • add_hook = { target = $TARGET$ type = $TYPE$ }

• 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 (14 lines of game script)
add_hook_if_possible_default_length_effect = {
	if = {
		limit = {
			can_add_hook = {
				target = $TARGET$
				type = $TYPE$
			}
		}
		add_hook = {
			target = $TARGET$
			type = $TYPE$
		}
	}
}

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

Where it is used

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

Task contracts (6)

  • laamp_construction_contract
  • laamp_help_claimant_contract
  • laamp_join_faction_contract
  • laamp_join_war_contract
  • laamp_raid_contract
  • laamp_treasure_hunting_contract

Events (7)

1 more

Scripted effects inside an event file (1)

  • 1037_noble_reward_effect

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