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

Scripted effect

generate_artifact_badge_effect

generate_artifact_badge_effect = { OWNER = … }

game/common/scripted_effects/00_artifact_badge_scripted_effects.txt, line 320 (81 lines). Parameters: $OWNER$.

generate_artifact_badge_effect is a scripted effect in Crusader Kings III, written at line 320 of its file. A call passes 1 parameter: OWNER. The game's script calls it in 1 place, among them Thieves: the Confrontation (event travel_events.2301). Patch 1.20.1.2, from game/common/scripted_effects/00_artifact_badge_scripted_effects.txt.

The comment above it in the file

For use in events, outside of going on an actual pilgrimage to the holy site

What it does

  • hidden_effect_new_object = { … }
  • scope:newly_created_artifact:
    • add_artifact_history = { … }
  • scope:dummy_vendor:
  • clear_saved_scope = badge_location

• 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 (81 lines of game script)
generate_artifact_badge_effect = {
	$OWNER$ = { save_scope_as = current_owner }
	hidden_effect_new_object = {
		random_list = {
			1 = {
				trigger = {
					NOT = {
						scope:current_owner = {
							any_character_artifact = { has_variable = is_santiago_pilgrim_badge }
						}
					}
				}
				create_artifact_badge_santiago_effect = { ACQUIRER = scope:current_owner }
			}
			1 = {
				trigger = {
					NOT = {
						scope:current_owner = {
							any_character_artifact = { has_variable = is_jerusalem_pilgrim_badge }
						}
					}
				}
				create_artifact_badge_jerusalem_effect = { ACQUIRER = scope:current_owner }
			}
			1 = {
				trigger = {
					NOT = {
						scope:current_owner = {
							any_character_artifact = { has_variable = is_rome_pilgrim_badge }
						}
					}
				}
				create_artifact_badge_rome_effect = { ACQUIRER = scope:current_owner }
			}
			10 = {
				create_artifact_badge_generic_effect = { ACQUIRER = scope:current_owner }
			}
		}
		#Make the history look neat
		random_pool_character = {
			province = scope:badge_location
			limit = { 
				age = { 20 40 }
				is_lowborn = yes
			}
			save_scope_as = dummy_vendor
		}
		if = {
			limit = {
				NOT = { exists = scope:dummy_vendor }
			}
			create_character = {
				location = scope:badge_location
				random_traits = yes
				dynasty = none
				faith = scope:badge_location.faith
				rite = scope:badge_location.rite
				culture = scope:badge_location.culture
				gender_female_chance = 50
				save_scope_as = dummy_vendor
			}
			scope:dummy_vendor = { add_character_flag = created_vendor }
		}
	}
	scope:newly_created_artifact = {
		add_artifact_history = {
			type = purchased
			location = scope:badge_location
			actor = scope:dummy_vendor
			recipient = scope:current_owner
		}
		save_scope_as = generated_pilgrim_badge 
	}
	scope:dummy_vendor = {
		if = {
			limit = { has_character_flag = created_vendor }
			silent_disappearance_effect = yes
		}
	}
	clear_saved_scope = badge_location
}

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

Where it is used

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

Events (1)

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