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

Scripted trigger

player_adventurer_sufficient_distance_for_contract_spawn_trigger

player_adventurer_sufficient_distance_for_contract_spawn_trigger = yes

game/common/scripted_triggers/00_laamp_triggers.txt, line 546 (21 lines). No parameters.

player_adventurer_sufficient_distance_for_contract_spawn_trigger is a scripted trigger in Crusader Kings III, written at line 546 of its file. It takes no parameters: player_adventurer_sufficient_distance_for_contract_spawn_trigger = yes (or no). The game's script calls it in 2 places, among them player_adventurer_contract_generation_on_domicile_moved_effect (scripted effect) and player_adventurer_contract_generation_on_wait_in_place_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_triggers/00_laamp_triggers.txt.

The comment above it in the file

How far do we have to travel (or to where) before we start spawning more contracts to play with?

What it checks

  • Is played by a person
  • One of these

    • All of these

      • Their location’s kingdom:
        • save_temporary_scope_as = kingdom_temp
      • NOT = { is_target_in_variable_list = { name = laamp_recently_visited_kingdoms target = scope:kingdom_temp } }
    • or

      If

      a check the game hides

      Then

      • location.squared_distance(scope:char_temp.current_travel_plan.departure_location) >= squared_distance_medium

• 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 (21 lines of game script)
player_adventurer_sufficient_distance_for_contract_spawn_trigger = {
	is_ai = no
	save_temporary_scope_as = char_temp
	OR = {
		# Either we've moved to a neighbouring kingdom that we've not been to recently.
		AND = {
			location.kingdom = { save_temporary_scope_as = kingdom_temp }
			NOT = {
				is_target_in_variable_list = {
					name = laamp_recently_visited_kingdoms
					target = scope:kingdom_temp
				}
			}
		}
		# Or we've travelled some distance.
		trigger_if = {
			limit = { exists = scope:char_temp.current_travel_plan }
			"location.squared_distance(scope:char_temp.current_travel_plan.departure_location)" >= squared_distance_medium
		}
	}
}

As written in game/common/scripted_triggers/00_laamp_triggers.txt.

Where it is used

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

Source: game/common/scripted_triggers/00_laamp_triggers.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?