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

Scripted effect

diarch_demand_despotate_interaction_accepted_effect

diarch_demand_despotate_interaction_accepted_effect = yes

game/common/scripted_effects/00_diarchy_scripted_effects.txt, line 1709 (109 lines). No parameters.

diarch_demand_despotate_interaction_accepted_effect is a scripted effect in Crusader Kings III, written at line 1709 of its file. It takes no parameters: diarch_demand_despotate_interaction_accepted_effect = yes. The game's script calls it in 3 places, among them Demand Private Despotate (interaction), diarchy.8031 (event) and diarchy.8033 (event). Patch 1.20.1.2, from game/common/scripted_effects/00_diarchy_scripted_effects.txt.

What it does

  • scope:target:
    • Every in de jure hierarchy:
      • Where:
        • holder = scope:recipient
        • Title tier at least County
      • Gains the … Title (actor)
    • If

      • scope:actor: Is not landed

      Then

      • scope:target › One de jure county, picked in order:
        • Where › Their holder:
          • Is played by the AI
          • Any liege or above:
        • Gains the … Title (actor)
    • Gains the … Title (actor)
    • Every De Jure Vassal of …:
      • Where:
        • liege = scope:recipient
      • change_liege = { liege = scope:actor change = scope:change }
  • If

    • scope:hook = yes
    • has_usable_hook = scope:recipient

    Then

    • use_hook = scope:recipient
    • reverse_add_opinion = { target = scope:recipient modifier = frustrated_opinion opinion = -40 }
  • Else, if played by the AI: Opinion: Grateful (+40)

• 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 (109 lines of game script)
diarch_demand_despotate_interaction_accepted_effect = {
	create_title_and_vassal_change = {
		type = granted
		save_scope_as = change
	}
	scope:target = {
		# First, we try to give them lands we hold.
		every_in_de_jure_hierarchy = {
			limit = {
				holder = scope:recipient
				tier >= tier_county
			}
			change_title_holder = {
				holder = scope:actor
				change = scope:change
			}
		}
		# If they're not now landed, try to give them a random county — we do this so that we can keep them administrative.
		if = {
			limit = {
				scope:actor = { is_landed = no }
			}
			scope:target = {
				ordered_de_jure_county = {
					limit = {
						holder = {
							is_ai = yes
							any_liege_or_above = { this = scope:recipient }
						}
					}
					alternative_limit = {
						holder = {
							any_liege_or_above = { this = scope:recipient }
						}
					}
					order_by = development_level
					change_title_holder = {
						holder = scope:actor
						change = scope:change
					}
				}
			}
		}
		# If we haven't managed that, pick a random county not owned by a player and give them that.
		change_title_holder = {
			holder = scope:actor
			change = scope:change
		}
		every_dejure_vassal_title_holder = {
			limit = {
				liege = scope:recipient
				NOR = {
					this = scope:actor
					this = scope:recipient
				}
			}
			custom = custom.every_target_de_jure_vassal
			change_liege = {
				liege = scope:actor
				change = scope:change
			}
		}
	}
	resolve_title_and_vassal_change = scope:change
	if = {
		limit = {
			NOT = {
				scope:actor = { is_vassal_of = scope:recipient }
			}
		}
		hidden_effect = {
			create_title_and_vassal_change = {
				type = swear_fealty
				save_scope_as = change
			}
			scope:actor = {
				change_liege = {
					liege = scope:recipient
					change = scope:change
				}
			}
			resolve_title_and_vassal_change = scope:change
		}
	}
	# If you used a hook, calc some extra stuff.
	if = {
		limit = {
			scope:hook = yes
			has_usable_hook = scope:recipient
		}
		# Use the hook up.
		use_hook = scope:recipient
		# Plus scope:recipient is concerned.
		reverse_add_opinion = {
			target = scope:recipient
			modifier = frustrated_opinion
			opinion = -40
		}
	}
	# Otherwise you didn't, so you should be happy.
	else_if = {
		limit = { is_ai = yes }
		add_opinion = {
			target = scope:recipient
			modifier = grateful_opinion
			opinion = 40
		}
	}
}

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

Where it is used

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

Character interactions (1)

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