00_biyearly_country_FMO.txt

common\on_action
 avatar
Hyperion
plain_text
a year ago
1.9 kB
7
Indexable
biyearly_country_pulse = {
	on_actions = {
		ai_take_focus_perks_action
		calculate_global_production_action
	}
	events = {
		#Events that check for and give trading in modifiers and governorship dominance state modifiers.
		#These might lag the game like crazy not sure we'll find out...if they do I can stagger them
		ee_economy_events.3
		ee_economy_events.4
		ee_economy_events.9 #Cleanup event that makes sure there are always at least 3 trade centers in every region.
	}
}
ai_take_focus_perks_action = {
	effect = {
		#This is what allows the ai to take character focus perks. This will "guide" the ai through finishing the tree of their highest skill.
		#It will take an ai character 37.5-39.5 continuous years as ruler to finish a focus tree 
		if = {
			limit = { is_ai = yes }
			every_ruler_with_perk_available = {
				change_variable = {
					name = character_focus_perk_available
					subtract = 1
				}
				if = {
					limit = {
						has_variable = martial_focus_tree_enabled
						NOT = { has_variable = ai_martial_tree_completed_var }
					}
					ai_martial_take_focus_perk_effect = yes
				}
				else_if = {
					limit = {
						has_variable = oratory_focus_tree_enabled
						NOT = { has_variable = ai_oratory_tree_completed_var }
					}
					ai_oratory_take_focus_perk_effect = yes
				}
				else_if = {
					limit = {
						has_variable = civic_focus_tree_enabled
						NOT = { has_variable = ai_civic_tree_completed_var }
					}
					ai_civic_take_focus_perk_effect = yes
				}
				else_if = {
					limit = {
						has_variable = zeal_focus_tree_enabled
						NOT = { has_variable = ai_zeal_tree_completed_var }
					}
					ai_zeal_take_focus_perk_effect = yes
				}
			}
		}
	}
}
calculate_global_production_action = {
	effect = {
		if = {
			limit = { is_ai = no }
			set_produced_global_variables_effect = yes
		}
	}
}
Editor is loading...
Leave a Comment