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

Scripted effect

ai_chance_to_become_mandala_godking_effect

ai_chance_to_become_mandala_godking_effect = yes

game/common/scripted_effects/00_ai_value_effects.txt, line 737 (139 lines). No parameters.

ai_chance_to_become_mandala_godking_effect is a scripted effect in Crusader Kings III, written at line 737 of its file. It takes no parameters: ai_chance_to_become_mandala_godking_effect = yes. The game's script calls it in 1 place, among them yearly_playable_pulse (on action). Patch 1.20.1.2, from game/common/scripted_effects/00_ai_value_effects.txt.

What it does

  • If

    • top_overlord = this
    • Is landed
    • Age at most 50
    • Is not incapable
    • Is played by the AI
    • Is at not War
    • If

      a check the game hides

      Then

      • Active mandalas less than 5
    • Any neighboring and across water top liege realm owner:
      • One of these

        • current_military_strength < scope:possible_godking.current_military_strength
        • or

          Any tributary:
          • in_diplomatic_range = scope:possible_godking
          • current_military_strength < scope:possible_godking.current_military_strength
    • less_than_max_amount_of_mandala_capitals_trigger = yes

    Then

    • …% chance of: Starts the story “mandala”

• 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)
ai_chance_to_become_mandala_godking_effect = {
	save_scope_as = possible_godking
	if = {
		limit = {
			top_overlord = this
			is_landed = yes
			age <= 50
			NOT = { is_incapable = yes }
			is_ai = yes
			is_at_war = no
			trigger_if = {
				limit = { exists = global_var:active_mandalas }
				global_var:active_mandalas < 5
			}
			any_neighboring_and_across_water_top_liege_realm_owner = {
				OR = {
					current_military_strength < scope:possible_godking.current_military_strength
					any_tributary = {
						in_diplomatic_range = scope:possible_godking
						current_military_strength < scope:possible_godking.current_military_strength
					}
				}	
			}
			#There aren't already 2 active Mandala Capitals in the dejure Kingdom
			less_than_max_amount_of_mandala_capitals_trigger = yes
		}

		random = {
			chance = {
				value = 50
				#If has Mandala Capital or Ruined Capital make into 100
				if = {
					limit = { has_mandala_capital_trigger = yes }
					add = 100
				}
				add = primary_title.tier
				if = {
					limit = { martial >= 10 }
					add = {
						value = martial
						divide = 5
					}
				}
				if = {
					limit = { intrigue >= 10 }
					add = {
						value = intrigue
						divide = 10
					}
				}
				if = {
					limit = { diplomacy >= 10 }
					add = {
						value = diplomacy
						divide = 10
					}
				}
				if = {
					limit = { stewardship >= 10 }
					add = {
						value = stewardship
						divide = 10
					}
				}
				if = {
					limit = { learning >= 10 }
					add = {
						value = learning
						divide = 10
					}
				}
				if = {
					limit = { has_trait = zealous }
					add = 1
				}
				if = {
					limit = { has_trait = pilgrim }
					add = 1
				}
				if = {
					limit = { has_trait = brave }
					add = 0.25
				}
				if = {
					limit = { has_trait = ambitious }
					add = 0.5
				}
				if = {
					limit = { has_trait = compassionate }
					add = -0.25
				}
				if = {
					limit = { has_trait = shy }
					add = -0.25
				}
				if = {
					limit = { has_trait = lazy }
					add = -0.25
				}
				if = {
					limit = { has_trait = content }
					add = -1
				}
				if = {
					limit = { has_trait = craven }
					add = -1
				}
				if = {
					limit = { has_trait = cynical }
					add = -1
				}
				if = {
					limit = { gold >= massive_gold_value }
					add = 1
				}
				if = {
					limit = {
						house = { has_house_aspiration_parameter = aspect_of_destruction }
						war_chest_gold >= war_chest_gold_maximum
					}

As written in game/common/scripted_effects/00_ai_value_effects.txt.

The first 120 of its 139 lines; the rest is in game/common/scripted_effects/00_ai_value_effects.txt from line 737.

Where it is used

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

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

  • yearly_playable_pulse

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