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

Scripted effect

form_portugal_decision_effects

form_portugal_decision_effects = yes

game/common/scripted_effects/00_decisions_effects.txt, line 436 (118 lines). No parameters.

form_portugal_decision_effects is a scripted effect in Crusader Kings III, written at line 436 of its file. It takes no parameters: form_portugal_decision_effects = yes. The game's script calls it in 2 places, among them Form Portugal (decision) and The Kingdom of Portugal (event iberia_north_africa.0001). Its body carries 1 text of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/00_decisions_effects.txt.

What it does

  • …, …, …, and … become De Jure part of the …
  • Portugal: Gains the … Title (root)
  • If

    Then

  • If their culture is not Portuguese:
  • Every … Heritage county in the Kingdom of Portugal:
    • Where:
      • Title tier exactly County
      • Their culture: The Culture has the Iberian Cultural Pillar
      • One of these

        • de_jure_liege = title:d_porto
        • or

          de_jure_liege = title:d_coimbra
        • or

          de_jure_liege = title:d_beja
        • or

          de_jure_liege = title:d_algarve
    • set_county_culture = culture:portuguese
  • Every other county in the Kingdom of Portugal:
    • Only some of them (the filter is in the script below)
    • 50% chance of:
      • set_county_culture = culture:portuguese
  • Portuguese:
    • add_random_innovation = culture_group_military
    • add_random_innovation = culture_group_civic
  • Gain +750 Prestige

• 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 (118 lines of game script)
form_portugal_decision_effects = {
	#Create the title and set proper de jure
	hidden_effect = {
		title:d_porto = {
			save_scope_as = title_d_porto
			set_de_jure_liege_title = title:k_portugal
		}
		title:d_coimbra = {
			save_scope_as = title_d_coimbra
			set_de_jure_liege_title = title:k_portugal
		}
		title:d_beja = {
			save_scope_as = title_d_beja
			set_de_jure_liege_title = title:k_portugal
		}
		title:d_algarve = {
			save_scope_as = title_d_algarve
			set_de_jure_liege_title = title:k_portugal
		}
		title:k_portugal = {
			save_scope_as = title_k_portugal
		}
	}
	custom_tooltip = form_portugal_decision_effects_de_jure_tt

	create_title_and_vassal_change = {
		type = created
		save_scope_as = title_change
		add_claim_on_loss = no
	}
	title:k_portugal = {
		change_title_holder = {
			holder = root
			change = scope:title_change
		}
		save_scope_as = title_k_portugal
	}
	resolve_title_and_vassal_change = scope:title_change

	if = {
		limit = {
			highest_held_title_tier < tier_empire
			primary_title != title:k_portugal
		}
		set_primary_title_to = title:k_portugal
	}

	hidden_effect = {
		if = {
			limit = { has_global_variable = fp2_struggle_compromise_ending }
			title:k_portugal = { fp2_struggle_compromise_create_new_empire_effect = yes }
		}
	}

	#Covert self & court to portuguese culture
	if = {
		limit = { NOT = { has_culture = culture:portuguese } }

		every_courtier = {
			limit = { has_same_culture_as = scope:portugal_former }
			add_to_list = convert_list
		}
		#transfer over innovations from previous culture.
		culture:portuguese = {
			hidden_effect = { reset_culture_creation_date = yes }
			get_all_innovations_from = scope:portugal_former.culture
		}
		set_culture = culture:portuguese

		every_in_list = {
			list = convert_list
			custom = portguese_convert_list #This says "every subject in the realm" even though vassals and their courts only covert later, through event
			set_culture = culture:portuguese
		}
	}

	# Convert Iberian counties to Portugese culture
	every_sub_realm_county = {
		limit = {
			tier = tier_county
			culture = { has_cultural_pillar = heritage_iberian }
			OR = {
				de_jure_liege = title:d_porto
				de_jure_liege = title:d_coimbra
				de_jure_liege = title:d_beja
				de_jure_liege = title:d_algarve
			}
		}
		custom = portugese_convert_iberian_counties
		set_county_culture = culture:portuguese
	}
	every_sub_realm_county = {
		limit = {
			tier = tier_county
			NOT = { culture = { has_cultural_pillar = heritage_iberian } }
			OR = {
				de_jure_liege = title:d_porto
				de_jure_liege = title:d_coimbra
				de_jure_liege = title:d_beja
				de_jure_liege = title:d_algarve
			}
		}
		custom = portugese_convert_non_iberian_counties
		random = {
			chance = 50
			set_county_culture = culture:portuguese
		}
	}

	#Innovations
	culture:portuguese = {
		add_random_innovation = culture_group_military
		add_random_innovation = culture_group_civic
	}

	#Prestige
	add_prestige = massive_prestige_gain
}

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

Where it is used

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

Decisions (1)

Events (1)

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