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

Scripted effect · Roads to Power files

chariot_race_payout_effect

chariot_race_payout_effect = yes

game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt, line 6003 (525 lines). No parameters.

chariot_race_payout_effect is a scripted effect in Crusader Kings III, in the Roads to Power files, written at line 6003 of its file. It takes no parameters: chariot_race_payout_effect = yes. The game's script calls it in 1 place, among them Chariot Race (activity). Patch 1.20.1.2, from game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt.

What it does

  • scope:activity › Every guest subset:
    • name = spectators
    • If

      • Wager type is win
      • Wager target is scope:activity.var:first place

      Then

      • set_or_increment_lucky_better_variable = yes
      • scope:activity › Activity log entry › scope:current_gambler:
        • add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:first_place.var:win_payout max = scope:current_gambler.monumental_gold_value }

      Else if

      • Wager type is place
      • One of these

        • Wager target is scope:activity.var:first place
        • or

          Wager target is scope:activity.var:second place

      Then

      • set_or_increment_lucky_better_variable = yes
      • scope:activity › Activity log entry › scope:current_gambler:
        • add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:second_place.var:place_payout max = scope:current_gambler.monumental_gold_value }

      Else if

      • Wager type is show
      • One of these

        • Wager target is scope:activity.var:first place
        • or

          Wager target is scope:activity.var:second place
        • or

          Wager target is scope:activity.var:third place

      Then

      • set_or_increment_lucky_better_variable = yes
      • scope:activity › Activity log entry › scope:current_gambler:
        • add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:third_place.var:show_payout max = scope:current_gambler.monumental_gold_value }

      Else if

      • Wager type is win
      • Wager target is this

      Then

      • Depending on wager team:

      Else if

      • Wager type is place
      • Wager target is this

      Then

    • … (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)
chariot_race_payout_effect = {
	scope:activity = {
		every_guest_subset = {
			name = spectators
			save_scope_as = current_gambler
			if = {
				limit = {
					var:wager_type ?= flag:win
					var:wager_target ?= scope:activity.var:first_place
				}
				set_or_increment_lucky_better_variable = yes
				add_character_flag = successful_bet
				scope:activity = {
					add_activity_log_entry = {
						key = chariot_race_betting_char_outcome_key
						score = 100
						show_in_conclusion = yes
						character = scope:current_gambler
						scope:current_gambler = {
							add_gold = {
								value = scope:current_gambler.var:wager_value
								multiply = scope:activity.var:first_place.var:win_payout
								max = scope:current_gambler.monumental_gold_value
							}
						}
						change_variable = {
							name = chariot_race_pot
							subtract = {
								value = scope:current_gambler.var:wager_value
								multiply = scope:activity.var:first_place.var:win_payout
							}
						}
					}
				}
			}
			else_if = {
				limit = {
					var:wager_type ?= flag:place
					OR = {
						var:wager_target ?= scope:activity.var:first_place
						var:wager_target ?= scope:activity.var:second_place
					}
				}
				set_or_increment_lucky_better_variable = yes
				add_character_flag = successful_bet
				scope:activity = {
					add_activity_log_entry = {
						key = chariot_race_betting_char_outcome_key
						score = 100
						show_in_conclusion = yes
						character = scope:current_gambler
						scope:current_gambler = {
							add_gold = {
								value = scope:current_gambler.var:wager_value
								multiply = scope:activity.var:second_place.var:place_payout
								max = scope:current_gambler.monumental_gold_value
							}
						}
						change_variable = {
							name = chariot_race_pot
							subtract = {
								value = scope:current_gambler.var:wager_value
								multiply = scope:activity.var:second_place.var:place_payout
							}
						}
					}
				}
			}
			else_if = {
				limit = {
					var:wager_type ?= flag:show
					OR = {
						var:wager_target ?= scope:activity.var:first_place
						var:wager_target ?= scope:activity.var:second_place
						var:wager_target ?= scope:activity.var:third_place
					}
				}
				set_or_increment_lucky_better_variable = yes
				add_character_flag = successful_bet
				scope:activity = {
					add_activity_log_entry = {
						key = chariot_race_betting_char_outcome_key
						score = 100
						show_in_conclusion = yes
						character = scope:current_gambler
						scope:current_gambler = {
							add_gold = {
								value = scope:current_gambler.var:wager_value
								multiply = scope:activity.var:third_place.var:show_payout
								max = scope:current_gambler.monumental_gold_value
							}
						}
						change_variable = {
							name = chariot_race_pot
							subtract = {
								value = scope:current_gambler.var:wager_value
								multiply = scope:activity.var:third_place.var:show_payout
							}
						}
					}
				}
			}
			# Handle team based bets
			else_if = {
				limit = {
					var:wager_type ?= flag:win
					var:wager_target ?= this
				}
				switch = {
					trigger = var:wager_team
					flag:blues = {
						if = {
							limit = { scope:activity.var:first_place = { has_trait = charioteer_blue } }
							set_or_increment_lucky_better_variable = yes
							add_character_flag = successful_bet
							scope:activity = {
								add_activity_log_entry = {
									key = chariot_race_betting_team_outcome_key
									score = 100
									show_in_conclusion = yes

As written in game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt.

The first 120 of its 525 lines; the rest is in game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt from line 6003.

Where it is used

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

Activities (1)

Source: game/common/scripted_effects/07_dlc_ep3_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?