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

Scripted effect

create_artifact_wall_muhammad_sword_effect

create_artifact_wall_muhammad_sword_effect = { OWNER = … }

game/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt, line 2244 (293 lines). Parameters: $OWNER$.

create_artifact_wall_muhammad_sword_effect is a scripted effect in Crusader Kings III, written at line 2244 of its file. A call passes 1 parameter: OWNER. The game's script calls it in 2 places, among them generate_historical_artifact_based_on_location_effect (scripted effect) and inspiration_adventure_create_artifact_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt.

What it does

  • set_artifact_rarity_famed = yes
  • 1 of 9 things will happen:
    • 11%: Nothing else happens
    • 11%: Nothing else happens
    • 11%: Nothing else happens
    • 11%: Nothing else happens
    • 11%: Nothing else happens
    • 11%: Nothing else happens
    • 11%: Nothing else happens
    • 11%: Nothing else happens
    • 11%: Nothing else happens
  • “Sword of Muhammad” Artifact is created
  • scope:newly_created_artifact › 1 of 8 things will happen:
    • 13%:
      • add_artifact_modifier = muhammed_sword_1_modifier
    • 13%:
      • add_artifact_modifier = muhammed_sword_2_modifier
    • 13%:
      • add_artifact_modifier = muhammed_sword_3_modifier
    • 13%:
      • add_artifact_modifier = muhammed_sword_4_modifier
    • 13%:
      • add_artifact_modifier = muhammed_sword_5_modifier
    • 13%:
      • add_artifact_modifier = muhammed_sword_6_modifier
    • 13%:
      • add_artifact_modifier = muhammed_sword_7_modifier
    • 13%:
      • add_artifact_modifier = muhammed_sword_8_modifier
  • If

    • scope:muhammad_sword_name = flag:aladb

    Then

    • scope:muhammad_sword:
      • add_artifact_history = { type = given date = 624.3.13 recipient = character:33922 }
  • If

    • scope:muhammad_sword_name = flag:almathur

    Then

    • scope:muhammad_sword:
      • add_artifact_history = { type = inherited date = 570.6.1 recipient = character:33922 }
  • If

    • scope:muhammad_sword_name = flag:arrasub

    Then

    • scope:muhammad_sword:
      • add_artifact_history = { type = inherited date = 570.6.1 recipient = character:33922 }
  • If

    • One of these

      • scope:muhammad_sword_name = flag:albattar
      • or

        scope:muhammad_sword_name = flag:haft
      • or

        scope:muhammad_sword_name = flag:qali

    Then

    • scope:muhammad_sword:
      • add_artifact_history = { … }
  • If

    • scope:muhammad_sword_name = flag:dhu

    Then

    • scope:muhammad_sword:
      • add_artifact_history = { … }
  • If

    • scope:muhammad_sword_name = flag:mikhdham

    Then

    • scope:muhammad_sword:
      • add_artifact_history = { type = given date = 610.1.1 recipient = character:33922 }
  • If

    • scope:muhammad_sword_name = flag:alqadib

    Then

    • scope:muhammad_sword:
      • add_artifact_history = { type = given date = 610.1.1 recipient = character:33922 }

• 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)
create_artifact_wall_muhammad_sword_effect = {
	# Get the character the artifact is being made for.
	$OWNER$ = { save_scope_as = owner }
	# Not really used, but if we don't set the scopes we get errors in the feature selection
	set_artifact_rarity_famed = yes

	# Identify which sword it is
	random_list = {
		10 = {
			trigger = {
				NOT = {
					any_artifact = {
						has_variable = sword_muhammad_aladb
					}
				}
			}
			save_scope_value_as = {
				name = muhammad_sword_name
				value = flag:aladb
			}
		}
		10 = {
			trigger = {
				NOT = {
					any_artifact = {
						has_variable = sword_muhammad_almathur
					}
				}
			}
			save_scope_value_as = {
				name = muhammad_sword_name
				value = flag:almathur
			}
		}
		10 = {
			trigger = {
				NOT = {
					any_artifact = {
						has_variable = sword_muhammad_arrasub
					}
				}
			}
			save_scope_value_as = {
				name = muhammad_sword_name
				value = flag:arrasub
			}
		}
		10 = {
			trigger = {
				NOT = {
					any_artifact = {
						has_variable = sword_muhammad_albattar
					}
				}
			}
			save_scope_value_as = {
				name = muhammad_sword_name
				value = flag:albattar
			}
			
		}
		10 = {
			trigger = {
				NOT = {
					any_artifact = {
						has_variable = sword_muhammad_haft
					}
				}
			}
			save_scope_value_as = {
				name = muhammad_sword_name
				value = flag:haft
			}
		}
		10 = {
			trigger = {
				NOT = {
					any_artifact = {
						has_variable = sword_muhammad_qali
					}
				}
			}
			save_scope_value_as = {
				name = muhammad_sword_name
				value = flag:qali
			}
		}
		10 = {
			trigger = {
				NOT = {
					any_artifact = {
						has_variable = sword_muhammad_dhu
					}
				}
			}
			save_scope_value_as = {
				name = muhammad_sword_name
				value = flag:dhu
			}
		}
		10 = {
			trigger = {
				NOT = {
					any_artifact = {
						has_variable = sword_muhammad_mikhdham
					}
				}
			}
			save_scope_value_as = {
				name = muhammad_sword_name
				value = flag:mikhdham
			}
		}
		10 = {
			trigger = {
				NOT = {
					any_artifact = {
						has_variable = sword_muhammad_alqadib
					}
				}

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

The first 120 of its 293 lines; the rest is in game/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt from line 2244.

Where it is used

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

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