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

Scripted effect

set_up_historical_military_orders_effect

set_up_historical_military_orders_effect = yes

game/common/scripted_effects/00_holy_order_effects.txt, line 5016 (763 lines). No parameters.

set_up_historical_military_orders_effect is a scripted effect in Crusader Kings III, written at line 5016 of its file. It takes no parameters: set_up_historical_military_orders_effect = yes. The game's script calls it in 1 place, among them on_game_start (on action). Patch 1.20.1.2, from game/common/scripted_effects/00_holy_order_effects.txt.

What it does

  • If

    • game_start_date >= 1178.10.1

    Then

    • create_holy_order_neutral_effect = { … }
    • scope:leader › Every Courtier: Gains the Trait Military Order Member
    • If

      a check the game hides

      Then

      • Maials:
        • Gains the … Title (title:c tarragona.holder)
        • lease_out_to_holy_order = scope:templar
      • Obidos:
        • Gains the … Title (title:c coimbra.holder)
        • lease_out_to_holy_order = scope:templar
    • character:gualdim_pais_1 = { set_employer = scope:leader }
    • character:gilbert_horal_1 = { set_employer = scope:leader }
    • character:231001 = { set_employer = scope:leader }
    • character:torroja_2 = { set_employer = scope:leader }
  • If

    • game_start_date >= 1178.10.1

    Then

    • create_holy_order_neutral_effect = { … }
    • scope:leader_1 › Every Courtier: Gains the Trait Military Order Member
    • If

      a check the game hides

      Then

      • Antartus:
        • Gains the … Title (title:c tripoli.holder)
        • lease_out_to_holy_order = scope:hospitaller
      • Haugsdorf:
        • Gains the … Title (title:c krems.holder)
        • lease_out_to_holy_order = scope:hospitaller
    • character:142132 = { set_employer = scope:leader_1 }
    • character:147007 = { set_employer = scope:leader_1 }
    • character:147008 = { set_employer = scope:leader_1 }
    • character:147009 = { set_employer = scope:leader_1 }
    • character:147010 = { set_employer = scope:leader_1 }
    • character:147012 = { set_employer = scope:leader_1 }
  • If current year more than 1177:
  • If current year more than 1177:
  • If current year more than 1177:
  • If

    • current_date < 868.1.1

    Then

    Else if

    • current_date <= 1067.1.1

    Then

  • If

    • current_date >= 1066.1.1
    • current_date <= 1067.1.1

    Then

    • Leylan: Gains the … Title (title:c maragha.holder)
    • scope:game_start_founder:
    • scope:order_leader › Every Courtier: Gains the Trait Military Order Member
    • If

      a check the game hides

      Then

      • Zermion:
        • Gains the … Title (title:c amida.holder)
        • lease_out_to_holy_order = scope:turkic
      • Khuftidkan:
        • Gains the … Title (title:c shahrazur.holder)
        • lease_out_to_holy_order = scope:turkic

    Else if

    • current_date >= 1177.1.1

    Then

    • Amorion: Gains the … Title (title:c maragha.holder)
    • scope:game_start_founder:
    • scope:order_leader › Every Courtier: Gains the Trait Military Order Member
    • If

      a check the game hides

      Then

      • Zermion:
        • Gains the … Title (title:c amida.holder)
        • lease_out_to_holy_order = scope:turkic
      • Leylan:
        • Gains the … Title (title:c maragha.holder)
        • lease_out_to_holy_order = scope:turkic
  • Qartajana: Gains the … Title (title:c tunis.holder)
  • scope:game_start_founder:
  • scope:order_leader › Every Courtier: Gains the Trait Military Order Member
  • If current year at least 1066 › Mattija:
    • Gains the … Title (title:c algier.holder)
    • lease_out_to_holy_order = scope:raider
  • If current year at least 1178 › Cartagena: … (more in the script below)
  • … (more in the script below)

• 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)
set_up_historical_military_orders_effect = {
	#CHRISTIAN MILITARY ORDERS
	#Create Templars
	if = {
		limit = {
			game_start_date >= 1178.10.1
		}
		character:st_amand_1 = {
			save_scope_as = leader
		}
		character:223523 = {
			save_scope_as = founder
			set_variable = {
				name = military_order_game_start_founder
				days = 10
			}
		}
		title:b_saida = {
			save_scope_as = barony
		}
		create_holy_order_neutral_effect = {
			LEADER = scope:leader
			CAPITAL = scope:barony
			NEW_HO_SCOPE = new_holy_order
			FOUNDER = scope:founder
			ORDER_TYPE = military
		}
		scope:leader = {
			every_courtier = {
				add_trait = order_member
			}
			faith = {
				random_faith_holy_order = {
					limit = {
						leader = scope:leader
					}
					save_scope_as = templar
				}
			}
		}
		#Lease out additional holdings
		if = {
			limit = {
				exists = scope:templar
			}
			title:b_maials = {
				create_title_and_vassal_change = {
					type = revoked
					save_scope_as = change
					add_claim_on_loss = no
				}
				change_title_holder = {
					holder = title:c_tarragona.holder
					change = scope:change
				}
				resolve_title_and_vassal_change = scope:change
				lease_out_to_holy_order = scope:templar
			}
			title:b_obidos = { # Tomar/Pombal/Almourol
				create_title_and_vassal_change = {
					type = revoked
					save_scope_as = change
					add_claim_on_loss = no
				}
				change_title_holder = {
					holder = title:c_coimbra.holder
					change = scope:change
				}
				resolve_title_and_vassal_change = scope:change
				lease_out_to_holy_order = scope:templar
			}
		}
		# Grandmasters/members
		character:gualdim_pais_1 = { set_employer = scope:leader } # Gualdim Pais
		character:gilbert_horal_1 = { set_employer = scope:leader } # Gilbert Horal
		character:231001 = { set_employer = scope:leader } # Gilbert de Ridefort
		character:torroja_2 = { set_employer = scope:leader } # Arnau de Torroja
	}
	#Create Hospitallers
	if = {
		limit = {
			game_start_date >= 1178.10.1
		}
		character:231000 = {
			save_scope_as = leader_1
		}
		character:223523 = {
			save_scope_as = founder_1
			set_variable = {
				name = military_order_game_start_founder
				days = 10
			}
		}
		title:b_hebron = {
			save_scope_as = barony_1
		}
		create_holy_order_neutral_effect = {
			LEADER = scope:leader_1
			CAPITAL = scope:barony_1
			NEW_HO_SCOPE = new_holy_order
			FOUNDER = scope:founder_1
			ORDER_TYPE = military
		}
		scope:leader_1 = {
			every_courtier = {
				add_trait = order_member
			}
			faith = {
				random_faith_holy_order = {
					limit = {
						leader = scope:leader_1
					}
					save_scope_as = hospitaller
				}
			}
		}
		#Lease out additional holdings
		if = {
			limit = {
				exists = scope:hospitaller

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

The first 120 of its 763 lines; the rest is in game/common/scripted_effects/00_holy_order_effects.txt from line 5016.

Where it is used

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

On actions (the game's own hooks) (1)

  • on_game_start

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