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

Scripted effect · All Under Heaven files

mandala_upgrade_creator_effect

mandala_upgrade_creator_effect = yes

game/common/scripted_effects/tgp_mandala_scripted_effects.txt, line 2223 (149 lines). No parameters.

mandala_upgrade_creator_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 2223 of its file. It takes no parameters: mandala_upgrade_creator_effect = yes. The game's script calls it in 1 place, among them on_building_completed (on action). Patch 1.20.1.2, from game/common/scripted_effects/tgp_mandala_scripted_effects.txt.

What it does

Every line of it is script with no tooltip text: the script is below.

The script as written (120 lines of game script)
mandala_upgrade_creator_effect = {
	if = { 
		limit = { has_variable = mandala_house_power_accumulated_creator }
		#Save what we gained so far so we can add it to the refreshed variable
		save_temporary_scope_value_as = {
			name = accumulated_creator_increments
			value = var:mandala_house_power_accumulated_creator
		}
		remove_variable = mandala_house_power_accumulated_creator
		#Clean up any existing modifier
		hidden_effect = {
			if = {
				limit = { has_character_modifier = mandala_creator_modifier }
				remove_character_modifier = mandala_creator_modifier
			}
		}
		#What cadence are we on?
		if = {
			limit = {
				house = { has_house_head_parameter = creator_30_year_modifier }
			}
			set_variable = {
				name = mandala_house_power_accumulated_creator
				value = {
					value = 1
					add = scope:accumulated_creator_increments
				}
				years = 30
			}
			hidden_effect = {
				send_interface_message = {
					type = msg_mandala_good_with_text
					title = mandala_creator_streak_accumulated
					desc = mandala_creator_streak_accumulated_desc
					left_icon = root
					mandala_apply_30_year_modifier = yes
				}
			}
		}
		else_if = {
			limit = {
				house = { house_has_creator_20_years_trigger = yes }
			}
			set_variable = {
				name = mandala_house_power_accumulated_creator
				value = {
					value = 1
					add = scope:accumulated_creator_increments
				}
				years = 20
			}
			hidden_effect = {
				send_interface_message = {
					type = msg_mandala_good_with_text
					title = mandala_creator_streak_accumulated
					desc = mandala_creator_streak_accumulated_desc
					left_icon = root
					mandala_apply_20_year_modifier = yes
				}
			}
		}
		else_if = {
			limit = { 
				house = { house_has_creator_10_years_trigger = yes } #This is just to stop some scope errors
			}
			set_variable = {
				name = mandala_house_power_accumulated_creator
				value = {
					value = 1
					add = scope:accumulated_creator_increments
				}
				years = 10
			}
			hidden_effect = {	
				send_interface_message = {
					type = msg_mandala_good_with_text
					title = mandala_creator_streak_accumulated
					desc = mandala_creator_streak_accumulated_desc
					left_icon = root
					mandala_apply_10_year_modifier = yes
				}
			}
		}
	}
	else = {
		#Clean up any existing modifier
		hidden_effect = {
			if = {
				limit = { has_character_modifier = mandala_creator_modifier }
				remove_character_modifier = mandala_creator_modifier
			}
		}
		#Start from the beginning
		if = {
			limit = {
				house = { has_house_head_parameter = creator_30_year_modifier }
			}
			set_variable = {
				name = mandala_house_power_accumulated_creator
				value = 1
				years = 30
			}
			hidden_effect = {
				send_interface_message = {
					type = msg_mandala_good_with_text
					title = mandala_creator_streak_accumulated
					desc = mandala_creator_streak_accumulated_desc
					left_icon = root
					mandala_apply_30_year_modifier = yes
				}
			}
		}
		else_if = {
			limit = {
				house = { house_has_creator_20_years_trigger = yes }
			}
			set_variable = {
				name = mandala_house_power_accumulated_creator
				value = 1
				years = 20

As written in game/common/scripted_effects/tgp_mandala_scripted_effects.txt.

The first 120 of its 149 lines; the rest is in game/common/scripted_effects/tgp_mandala_scripted_effects.txt from line 2223.

Where it is used

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

On actions (the game's own hooks) (1)

  • on_building_completed

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