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

Scripted effect · The Northern Lords files

forge_the_jomsvikings_scripted_effect

forge_the_jomsvikings_scripted_effect = yes

game/common/scripted_effects/01_dlc_fp1_scripted_effects.txt, line 509 (126 lines). No parameters.

forge_the_jomsvikings_scripted_effect is a scripted effect in Crusader Kings III, in the The Northern Lords files, written at line 509 of its file. It takes no parameters: forge_the_jomsvikings_scripted_effect = yes. The game's script calls it in 3 places, among them Forging the Jomsvikings (event fp1_major_decisions.0031), Forging the Jomsvikings (event fp1_major_decisions.0032) and fp1_jomsvikings.1011 (event). Its body carries 1 text of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/01_dlc_fp1_scripted_effects.txt.

What it does

  • A Military Order of your Faith will be founded · You become the order's Military Order Patron · You will select a non County Capital Barony as the order's Headquarters
  • If

    • scope:designated_county › Any county province:
      • has_holding = no

    Then

    • scope:designated_county › One random county province:
      • Where:
        • has_holding = no
      • set_holding_type = castle_holding
  • create_character = { template = fp1_jomsviking_bigwig location = scope:leased_barony.title_province save_scope_as = leader }
  • create_holy_order_neutral_effect = { … }
  • scope:leased_barony:
    • set_title_name = b_jomsberg
  • create_holy_order_accompanying_effect = yes
  • scope:leader.primary_title: The coat of arms changes

• 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 (120 lines of game script)
forge_the_jomsvikings_scripted_effect = {
	# Display simplified results.
	custom_tooltip = create_holy_order_decision_effect_message
	# Select a random county.
	random_held_title = {
		limit = { fp1_valid_county_for_jomsvikings_trigger = yes }
		save_scope_as = designated_county
	}
	# Select an appropriate barony.
	## If there's an empty space in the capital, we create a castle.
	if = {
		limit = {
			scope:designated_county = {
				any_county_province = { has_holding = no }
			}
		}
		scope:designated_county = {
			random_county_province = {
				limit = { has_holding = no }
				set_holding_type = castle_holding
				barony = { save_scope_as = leased_barony }
			}
		}
	}
	## Otherwise, grab an existing non-capital castle/city.
	else = {
		scope:designated_county = {
			random_county_province = {
				limit = {
					is_county_capital = no
					OR = {
						has_holding_type = castle_holding
						has_holding_type = city_holding
					}
				}
				barony = { save_scope_as = leased_barony }
			}
		}
	}
	# Create a suitable leader for the Jomsvikings.
	create_character = {
		template = fp1_jomsviking_bigwig
		location = scope:leased_barony.title_province
		save_scope_as = leader
	}
	# Create the actual Military Order.
	create_holy_order_neutral_effect = {
		LEADER = scope:leader
		CAPITAL = scope:leased_barony
		NEW_HO_SCOPE = new_holy_order
		FOUNDER = scope:founder
		ORDER_TYPE = military
	}
	# Make the local settlement Jomsberg.
	## Rename it.
	scope:leased_barony = { set_title_name = b_jomsberg }
	## Give it some buildings.
	hidden_effect = {
		scope:leased_barony.title_province = {
			# Walls & Towers.
			if = {
				limit = {
					NOT = { has_building_or_higher = curtain_walls_01 }
				}
				# If it doesn't have a free building slot, give it one.
				if = {
					limit = { free_building_slots = 0 }
					add_province_modifier = extra_building_slot
				}
				# Add the building.
				add_building = curtain_walls_01
			}
			# Barracks.
			if = {
				limit = {
					NOT = { has_building_or_higher = barracks_01 }
				}
				# If it doesn't have a free building slot, give it one.
				if = {
					limit = { free_building_slots = 0 }
					add_province_modifier = extra_building_slot
				}
				# Add the building.
				add_building = barracks_01
			}
			# Military Camps.
			if = {
				limit = {
					NOT = { has_building_or_higher = military_camps_01 }
				}
				# If it doesn't have a free building slot, give it one.
				if = {
					limit = { free_building_slots = 0 }
					add_province_modifier = extra_building_slot
				}
				# Add the building.
				add_building = military_camps_01
			}
		}
	}
	## Mark it so it can be renamed if the order is ever destroyed.
	set_global_variable = {
		name = jomsberg_location
		value = scope:leased_barony
	}
	# And the Grandmaster of Jomsberg certainly looks favourably on their patron.
	## Hidden because the title doesn't play nicely with characters created in the same immediate block.
	hidden_effect = {
		scope:founder = { set_relation_friend = { reason = friend_forging_jomsvikings target = scope:leader } }
	}
	# Mark the Jomsvikings as existing & make them easily accessible
	set_global_variable = {
		name = jomsvikings_title
		value = scope:leader.primary_title
	}
	# Some minor misc effects.
	create_holy_order_accompanying_effect = yes
	scope:leader.primary_title = { set_coa = ho_jomsvikings }
	# Flag the Jomsvikings as forged.
	hidden_effect = {

As written in game/common/scripted_effects/01_dlc_fp1_scripted_effects.txt.

The first 120 of its 126 lines; the rest is in game/common/scripted_effects/01_dlc_fp1_scripted_effects.txt from line 509.

Where it is used

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

Events (3)

Source: game/common/scripted_effects/01_dlc_fp1_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?