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

individual_chariot_race_payout_effect

individual_chariot_race_payout_effect = yes

game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt, line 5763 (239 lines). No parameters.

individual_chariot_race_payout_effect is a scripted effect in Crusader Kings III, in the Roads to Power files, written at line 5763 of its file. It takes no parameters: individual_chariot_race_payout_effect = yes. The game's script calls it in 1 place, among them Victory for the …! (event chariot_race.0600). Its body carries 1 text of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt.

The comment above it in the file

Used to show how much a character gets from a successful wager in end of the race event chariot_race.0600

What it does

  • If

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

    Then

    • 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

    • 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

    • 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 scope:current gambler

    Then

    • Depending on wager team:
      • When wager team is blues:
        • If

          Then

          • add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:blue_win_payout max = scope:current_gambler.monumental_gold_value }
      • When wager team is greens:
        • If

          Then

          • add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:green_win_payout max = scope:current_gambler.monumental_gold_value }
      • When wager team is whites:
        • If

          Then

          • add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:white_win_payout max = scope:current_gambler.monumental_gold_value }
      • When wager team is reds:
        • If

          Then

          • add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:red_win_payout max = scope:current_gambler.monumental_gold_value }

    Else if

    • Wager type is place
    • Wager target is scope:current gambler

    Then

    • Depending on wager team:
      • When wager team is blues:
        • If

          Then

          • add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:blue_place_payout max = scope:current_gambler.monumental_gold_value }
      • When wager team is greens:
        • If

          Then

          • add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:green_place_payout max = scope:current_gambler.monumental_gold_value }
      • When wager team is whites:
        • If

          Then

          • add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:white_place_payout max = scope:current_gambler.monumental_gold_value }
      • When wager team is reds:
        • If

          Then

          • add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:red_place_payout max = scope:current_gambler.monumental_gold_value }

    Else if

    • Wager type is show
    • Wager target is scope:current gambler

    Then

    • Depending on wager team:
      • When wager team is blues:
      • When wager team is greens:
      • When wager team is whites:
        • If

          • One of these

            • scope:activity.var:first_place: Has the Trait: Charioteer of the Leukoi
            • or

              scope:activity.var:second_place: … (more in the script below)
            • or

              … (more in the script below)
      • … (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)
individual_chariot_race_payout_effect = {
	save_scope_as = current_gambler
	if = {
		limit = {
			var:wager_type ?= flag:win
			var:wager_target ?= scope:activity.var:first_place
		}
		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 = {
		limit = {
			var:wager_type ?= flag:place
			OR = {
				var:wager_target ?= scope:activity.var:first_place
				var:wager_target ?= scope:activity.var:second_place
			}
		}
		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 = {
		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
			}
		}
		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
		}
	}
	# Handle team based bets
	else_if = {
		limit = {
			var:wager_type ?= flag:win
			var:wager_target ?= scope:current_gambler
		}
		switch = {
			trigger = var:wager_team
			flag:blues = {
				if = {
					limit = { scope:activity.var:first_place = { has_trait = charioteer_blue } }
					add_gold = {
						value = scope:current_gambler.var:wager_value
						multiply = scope:activity.var:blue_win_payout
						max = scope:current_gambler.monumental_gold_value
					}
				}
			}
			flag:greens = {
				if = {
					limit = { scope:activity.var:first_place = { has_trait = charioteer_green } }
					add_gold = {
						value = scope:current_gambler.var:wager_value
						multiply = scope:activity.var:green_win_payout
						max = scope:current_gambler.monumental_gold_value
					}
				}
			}
			flag:whites = {
				if = {
					limit = { scope:activity.var:first_place = { has_trait = charioteer_white } }
					add_gold = {
						value = scope:current_gambler.var:wager_value
						multiply = scope:activity.var:white_win_payout
						max = scope:current_gambler.monumental_gold_value
					}
				}
			}
			flag:reds = {
				if = {
					limit = { scope:activity.var:first_place = { has_trait = charioteer_red } }
					add_gold = {
						value = scope:current_gambler.var:wager_value
						multiply = scope:activity.var:red_win_payout
						max = scope:current_gambler.monumental_gold_value
					}
				}
			}
		}
	}
	else_if = {
		limit = {
			var:wager_type ?= flag:place
			var:wager_target ?= scope:current_gambler
		}
		switch = {
			trigger = var:wager_team
			flag:blues = {
				if = {
					limit = {
						OR = {
							scope:activity.var:first_place = { has_trait = charioteer_blue }
							scope:activity.var:second_place = { has_trait = charioteer_blue }
						}
					}
					add_gold = {
						value = scope:current_gambler.var:wager_value
						multiply = scope:activity.var:blue_place_payout
						max = scope:current_gambler.monumental_gold_value
					}
				}
			}
			flag:greens = {
				if = {
					limit = {
						OR = {
							scope:activity.var:first_place = { has_trait = charioteer_green }
							scope:activity.var:second_place = { has_trait = charioteer_green }

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

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

Where it is used

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

Events (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?