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

Scripted effect · Tours and Tournaments files

tournament_contest_generate_prize_effect

tournament_contest_generate_prize_effect = { CONTEST = … }

game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt, line 3696 (441 lines). Parameters: $CONTEST$.

tournament_contest_generate_prize_effect is a scripted effect in Crusader Kings III, in the Tours and Tournaments files, written at line 3696 of its file. A call passes 1 parameter: CONTEST. The game's script calls it in 1 place, among them tournament_disburse_contest_prize_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt.

The comment above it in the file

Create a prize artifact relevant to the current contest type

What it does

  • 1 of 12 things will happen:
    • 17%:
      • create_artifact_armor_effect = { OWNER = scope:host CREATOR = scope:dummy_gender SET_ARMOR_TYPE = flag:no }
      • If

        a check the game hides

        Then

        • scope:newly_created_artifact:
          • set_artifact_name = tournament_prize_armor_name
    • 17%:
      • create_artifact_weapon_effect = { OWNER = scope:host CREATOR = scope:dummy_gender SET_WEAPON_TYPE = flag:no }
      • If

        a check the game hides

        Then

        • scope:newly_created_artifact:
          • set_artifact_name = tournament_prize_weapon_name
    • 17%:
      • create_artifact_bow_effect = { OWNER = scope:host CREATOR = scope:dummy_gender SET_BOW_TYPE = flag:no }
      • If

        a check the game hides

        Then

        • scope:newly_created_artifact:
          • set_artifact_name = tournament_prize_bow_name
    • 6%:
      • create_artifact_ring_effect = { OWNER = scope:host SMITH = scope:dummy_gender }
      • If

        a check the game hides

        Then

        • scope:newly_created_artifact:
          • set_artifact_name = tournament_prize_ring_name
    • 6%:
    • 6%:
    • 6%:
      • create_artifact_goblet_effect = { OWNER = scope:host SMITH = scope:dummy_gender }
      • If

        a check the game hides

        Then

        • scope:newly_created_artifact:
          • set_artifact_name = tournament_prize_goblet_name
    • 6%:
      • create_artifact_bowl_effect = { OWNER = scope:host SMITH = scope:dummy_gender }
      • If

        a check the game hides

        Then

        • scope:newly_created_artifact:
          • set_artifact_name = tournament_prize_bowl_name
    • 6%:
      • create_artifact_urn_effect = { OWNER = scope:host POTTER = scope:dummy_gender }
      • If

        a check the game hides

        Then

        • scope:newly_created_artifact:
          • set_artifact_name = tournament_prize_urn_name
    • 6%:
      • hidden_effect_new_object = { … }
    • 6%:
      • hidden_effect_new_object = { … }
    • 6%:
      • If

        Then

        • hidden_effect_new_object = { … }

        Otherwise

        • hidden_effect_new_object = { … }
  • If

    a check the game hides

    Then

    • scope:newly_created_artifact:
    • scope:newly_created_artifact:
      • If

        • scope:host = scope:contest_winner

        Then

        • set_artifact_description = tournament_prize_host_desc_$CONTEST$

        Otherwise

        • set_artifact_description = tournament_prize_desc_$CONTEST$
      • scope:activity › Activity log entry › scope:$CONTEST$_prize:
        • set_owner = { … }

• 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)
tournament_contest_generate_prize_effect = {
	save_scope_value_as = {
		name = contest_type
		value = flag:$CONTEST$
	}
	hidden_effect = { random_dummy_gender_effect = yes }
	scope:activity = {
		### Combined wealth and quality determines tier
		# 50-129 Masterwork 
		# 130-179 Famed 
		# 180+ Illustrious
		save_scope_value_as = {
			name = wealth
			value = {
				value = 0
				# Activity prize options
				if = { # Common only
					limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_bad } }
					add = { 1 24 }
				}
				else_if = { # Common or Masterwork - often Masterwork
					limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_normal } }
					add = { 15 64 }
				}
				else_if = { # Masterwork or Famed - often Masterwork
					limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_good } }
					add = { 35 89 }
				}
				else_if = { # Masterwork, Famed, or Illustrious - often Famed
					limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_very_good } }
					add = { 60 105 }
				}
				else_if = { # Famed or Illustrious - 50/50 split
					limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_splendid } }
					add = { 69 111 }
				}
			}
		}
		save_scope_value_as = {
			name = quality
			value = {
				value = 0
				# Activity prize options
				if = { # Common only
					limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_bad } }
					add = { 1 24 }
				}
				else_if = { # Common or Masterwork - often Masterwork
					limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_normal } }
					add = { 15 64 }
				}
				else_if = { # Masterwork or Famed - often Masterwork
					limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_good } }
					add = { 35 89 }
				}
				else_if = { # Masterwork, Famed, or Illustrious - often Famed
					limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_very_good } }
					add = { 60 105 }
				}
				else_if = { # Famed or Illustrious - 50/50 split
					limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_splendid } }
					add = { 69 111 }
				}
			}
		}
	}
	random_list = {
	 	15 = { # Armor
	 		trigger = {
	 			OR = {
	 				scope:contest_type = flag:duel
	 				scope:contest_type = flag:joust
	 				scope:contest_type = flag:melee
	 			}
	 		}
	 		create_artifact_armor_effect = {
				OWNER = scope:host
				CREATOR = scope:dummy_gender
				SET_ARMOR_TYPE = flag:no
			}
			if = {
				limit = { exists = scope:newly_created_artifact }
				scope:newly_created_artifact = { set_artifact_name = tournament_prize_armor_name }
			}
	 	}
	 	15 = { # Weapon
	 		trigger = {
	 			OR = {
	 				scope:contest_type = flag:duel
	 				scope:contest_type = flag:joust
	 				scope:contest_type = flag:melee
	 			}
	 		}
	 		create_artifact_weapon_effect = {
				OWNER = scope:host
				CREATOR = scope:dummy_gender
				SET_WEAPON_TYPE = flag:no
			}
			if = {
				limit = { exists = scope:newly_created_artifact }
				scope:newly_created_artifact = { set_artifact_name = tournament_prize_weapon_name }
			}
	 	}
	 	15 = { # Bow
	 		trigger = { scope:contest_type = flag:archery }
		 	create_artifact_bow_effect = {
				OWNER = scope:host
				CREATOR = scope:dummy_gender
				SET_BOW_TYPE = flag:no
			}
			if = {
				limit = { exists = scope:newly_created_artifact }
				scope:newly_created_artifact = { set_artifact_name = tournament_prize_bow_name }
			}
	 	}
	 	5 = { # Ring
		 	create_artifact_ring_effect = {
				OWNER = scope:host
				SMITH = scope:dummy_gender
			}

As written in game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt.

The first 120 of its 441 lines; the rest is in game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt from line 3696.

Where it is used

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

Source: game/common/scripted_effects/04_dlc_ep2_tournament_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?