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

set_or_increment_lucky_better_variable

set_or_increment_lucky_better_variable = yes

game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt, line 5369 (29 lines). No parameters.

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

What it does

  • Otherwise:
    • If

      • Lucky bet counter at least 5
      • has_any_nickname = no

      Then

• 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 (29 lines of game script)
set_or_increment_lucky_better_variable = {
	if = {
		limit = {
			NOT = { has_variable = lucky_bet_counter }
		}
		set_variable = {
			name = lucky_bet_counter
			value = 1
		}
	}
	else = {
		change_variable = {
			name = lucky_bet_counter
			add = 1
		}
		if = {
			limit = {
				var:lucky_bet_counter >= 5
				has_any_nickname = no
			}
			send_interface_toast = {
				# works for our purposes "New Nickname"
				title = sell_titles_nickname_gained
				left_icon = this
				give_nickname = nick_the_lucky
			}
		}
	}
}

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

Where it is used

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

Scripted effects (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?