﻿# Dev-cheat repair tool (see events/developer_events.txt dev.1.l): recomputes
# idea_group_unlocked as the number of can_go_X flags actually set, instead of
# trusting the stored counter - fixes saves inflated by the pre-fix
# embrace_idea_group double-increment bug.
ve_recalculate_idea_group_unlocked = {
	set_variable = {
		name = idea_group_unlocked
		value = 0
	}
	if = {
		limit = { has_variable = can_go_academic }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_agrarian }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_financial }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_infrastructure }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_extraction }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_mass_conscription }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_war_economy }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_industrialist }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_bureaucratic }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_nationalist }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_parliamentary }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_diplomatic }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_mercantile }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_welfare }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_reformist }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_labour }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_offensive }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_defensive }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_naval }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_professional_army }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
	if = {
		limit = { has_variable = can_go_colonial }
		change_variable = { name = idea_group_unlocked add = 1 }
	}
}

boost_academic_idea_effect = {
	if = {
		limit = {
			var:academic_idea == 0
		}
		change_variable = {
			name = academic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = academic_idea_1_mdf
				}
			}
			add_modifier = {
				name = academic_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:academic_idea == 1
		}
		change_variable = {
			name = academic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = academic_idea_2_mdf
				}
			}
			add_modifier = {
				name = academic_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:academic_idea == 2
		}
		change_variable = {
			name = academic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = academic_idea_3_mdf
				}
			}
			add_modifier = {
				name = academic_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:academic_idea == 3
		}
		change_variable = {
			name = academic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = academic_idea_4_mdf
				}
			}
			add_modifier = {
				name = academic_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:academic_idea == 4
		}
		change_variable = {
			name = academic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = academic_idea_5_mdf
				}
			}
			add_modifier = {
				name = academic_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:academic_idea == 5
		}
		change_variable = {
			name = academic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = academic_idea_6_mdf
				}
			}
			add_modifier = {
				name = academic_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:academic_idea == 6
		}
		change_variable = {
			name = academic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = academic_idea_7_mdf
				}
			}
			add_modifier = {
				name = academic_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = academic_idea_completed
		add_modifier = {
			name = academic_ambition_mdf
			months = -1
		}
	}
}

boost_industrialist_idea_effect = {
	if = {
		limit = {
			var:industrialist_idea == 0
		}
		change_variable = {
			name = industrialist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = industrialist_idea_1_mdf
				}
			}
			add_modifier = {
				name = industrialist_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:industrialist_idea == 1
		}
		change_variable = {
			name = industrialist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = industrialist_idea_2_mdf
				}
			}
			add_modifier = {
				name = industrialist_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:industrialist_idea == 2
		}
		change_variable = {
			name = industrialist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = industrialist_idea_3_mdf
				}
			}
			add_modifier = {
				name = industrialist_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:industrialist_idea == 3
		}
		change_variable = {
			name = industrialist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = industrialist_idea_4_mdf
				}
			}
			add_modifier = {
				name = industrialist_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:industrialist_idea == 4
		}
		change_variable = {
			name = industrialist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = industrialist_idea_5_mdf
				}
			}
			add_modifier = {
				name = industrialist_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:industrialist_idea == 5
		}
		change_variable = {
			name = industrialist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = industrialist_idea_6_mdf
				}
			}
			add_modifier = {
				name = industrialist_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:industrialist_idea == 6
		}
		change_variable = {
			name = industrialist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = industrialist_idea_7_mdf
				}
			}
			add_modifier = {
				name = industrialist_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = industrialist_idea_completed
		add_modifier = {
			name = industrialist_ambition_mdf
			months = -1
		}
	}
}

boost_bureaucratic_idea_effect = {
	if = {
		limit = {
			var:bureaucratic_idea == 0
		}
		change_variable = {
			name = bureaucratic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = bureaucratic_idea_1_mdf
				}
			}
			add_modifier = {
				name = bureaucratic_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:bureaucratic_idea == 1
		}
		change_variable = {
			name = bureaucratic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = bureaucratic_idea_2_mdf
				}
			}
			add_modifier = {
				name = bureaucratic_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:bureaucratic_idea == 2
		}
		change_variable = {
			name = bureaucratic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = bureaucratic_idea_3_mdf
				}
			}
			add_modifier = {
				name = bureaucratic_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:bureaucratic_idea == 3
		}
		change_variable = {
			name = bureaucratic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = bureaucratic_idea_4_mdf
				}
			}
			add_modifier = {
				name = bureaucratic_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:bureaucratic_idea == 4
		}
		change_variable = {
			name = bureaucratic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = bureaucratic_idea_5_mdf
				}
			}
			add_modifier = {
				name = bureaucratic_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:bureaucratic_idea == 5
		}
		change_variable = {
			name = bureaucratic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = bureaucratic_idea_6_mdf
				}
			}
			add_modifier = {
				name = bureaucratic_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:bureaucratic_idea == 6
		}
		change_variable = {
			name = bureaucratic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = bureaucratic_idea_7_mdf
				}
			}
			add_modifier = {
				name = bureaucratic_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = bureaucratic_idea_completed
		add_modifier = {
			name = bureaucratic_ambition_mdf
			months = -1
		}
	}
}

boost_nationalist_idea_effect = {
	if = {
		limit = {
			var:nationalist_idea == 0
		}
		change_variable = {
			name = nationalist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = nationalist_idea_1_mdf
				}
			}
			add_modifier = {
				name = nationalist_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:nationalist_idea == 1
		}
		change_variable = {
			name = nationalist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = nationalist_idea_2_mdf
				}
			}
			add_modifier = {
				name = nationalist_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:nationalist_idea == 2
		}
		change_variable = {
			name = nationalist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = nationalist_idea_3_mdf
				}
			}
			add_modifier = {
				name = nationalist_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:nationalist_idea == 3
		}
		change_variable = {
			name = nationalist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = nationalist_idea_4_mdf
				}
			}
			add_modifier = {
				name = nationalist_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:nationalist_idea == 4
		}
		change_variable = {
			name = nationalist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_variable = nationalist_idea_5_var
				}
			}
			set_variable = nationalist_idea_5_var
			add_modifier = {
				name = nationalist_idea_5_mdf
				months = -1
			}
			ve_idea_purchase_5 = yes
		}
	}
	else_if = {
		limit = {
			var:nationalist_idea == 5
		}
		change_variable = {
			name = nationalist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = nationalist_idea_6_mdf
				}
			}
			add_modifier = {
				name = nationalist_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:nationalist_idea == 6
		}
		change_variable = {
			name = nationalist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_variable = nationalist_idea_7_var
				}
			}
			# Adds +0.02 to coercive religious and ethnic project outcomes, and
			# enables the Nationalist project-progress bonuses (see project values).
			set_variable = nationalist_idea_7_var
			add_modifier = {
				name = nationalist_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = nationalist_idea_completed
		add_modifier = {
			name = nationalist_ambition_mdf
			months = -1
		}
	}
}

boost_parliamentary_idea_effect = {
	if = {
		limit = {
			var:parliamentary_idea == 0
		}
		change_variable = {
			name = parliamentary_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = parliamentary_idea_1_mdf
				}
			}
			add_modifier = {
				name = parliamentary_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:parliamentary_idea == 1
		}
		change_variable = {
			name = parliamentary_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = parliamentary_idea_2_mdf
				}
			}
			add_modifier = {
				name = parliamentary_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:parliamentary_idea == 2
		}
		change_variable = {
			name = parliamentary_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = parliamentary_idea_3_mdf
				}
			}
			add_modifier = {
				name = parliamentary_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:parliamentary_idea == 3
		}
		change_variable = {
			name = parliamentary_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = parliamentary_idea_4_mdf
				}
			}
			add_modifier = {
				name = parliamentary_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:parliamentary_idea == 4
		}
		change_variable = {
			name = parliamentary_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = parliamentary_idea_5_mdf
				}
			}
			add_modifier = {
				name = parliamentary_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:parliamentary_idea == 5
		}
		change_variable = {
			name = parliamentary_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = parliamentary_idea_6_mdf
				}
			}
			add_modifier = {
				name = parliamentary_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:parliamentary_idea == 6
		}
		change_variable = {
			name = parliamentary_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = parliamentary_idea_7_mdf
				}
			}
			add_modifier = {
				name = parliamentary_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = parliamentary_idea_completed
		add_modifier = {
			name = parliamentary_ambition_mdf
			months = -1
		}
	}
}

boost_diplomatic_idea_effect = {
	if = {
		limit = {
			var:diplomatic_idea == 0
		}
		change_variable = {
			name = diplomatic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = diplomatic_idea_1_mdf
				}
			}
			add_modifier = {
				name = diplomatic_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:diplomatic_idea == 1
		}
		change_variable = {
			name = diplomatic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = diplomatic_idea_2_mdf
				}
			}
			add_modifier = {
				name = diplomatic_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:diplomatic_idea == 2
		}
		change_variable = {
			name = diplomatic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = diplomatic_idea_3_mdf
				}
			}
			add_modifier = {
				name = diplomatic_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:diplomatic_idea == 3
		}
		change_variable = {
			name = diplomatic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = diplomatic_idea_4_mdf
				}
			}
			add_modifier = {
				name = diplomatic_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:diplomatic_idea == 4
		}
		change_variable = {
			name = diplomatic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = diplomatic_idea_5_mdf
				}
			}
			add_modifier = {
				name = diplomatic_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:diplomatic_idea == 5
		}
		change_variable = {
			name = diplomatic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = diplomatic_idea_6_mdf
				}
			}
			add_modifier = {
				name = diplomatic_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:diplomatic_idea == 6
		}
		change_variable = {
			name = diplomatic_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = diplomatic_idea_7_mdf
				}
			}
			add_modifier = {
				name = diplomatic_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = diplomatic_idea_completed
		add_modifier = {
			name = diplomatic_ambition_mdf
			months = -1
		}
	}
}

boost_mercantile_idea_effect = {
	if = {
		limit = {
			var:mercantile_idea == 0
		}
		change_variable = {
			name = mercantile_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = mercantile_idea_1_mdf
				}
			}
			add_modifier = {
				name = mercantile_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:mercantile_idea == 1
		}
		change_variable = {
			name = mercantile_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = mercantile_idea_2_mdf
				}
			}
			add_modifier = {
				name = mercantile_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:mercantile_idea == 2
		}
		change_variable = {
			name = mercantile_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = mercantile_idea_3_mdf
				}
			}
			add_modifier = {
				name = mercantile_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:mercantile_idea == 3
		}
		change_variable = {
			name = mercantile_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = mercantile_idea_4_mdf
				}
			}
			add_modifier = {
				name = mercantile_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:mercantile_idea == 4
		}
		change_variable = {
			name = mercantile_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = mercantile_idea_5_mdf
				}
			}
			add_modifier = {
				name = mercantile_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:mercantile_idea == 5
		}
		change_variable = {
			name = mercantile_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = mercantile_idea_6_mdf
				}
			}
			add_modifier = {
				name = mercantile_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:mercantile_idea == 6
		}
		change_variable = {
			name = mercantile_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = mercantile_idea_7_mdf
				}
			}
			add_modifier = {
				name = mercantile_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = mercantile_idea_completed
		add_modifier = {
			name = mercantile_ambition_mdf
			months = -1
		}
	}
}

boost_welfare_idea_effect = {
	if = {
		limit = {
			var:welfare_idea == 0
		}
		change_variable = {
			name = welfare_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = welfare_idea_1_mdf
				}
			}
			add_modifier = {
				name = welfare_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:welfare_idea == 1
		}
		change_variable = {
			name = welfare_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = welfare_idea_2_mdf
				}
			}
			add_modifier = {
				name = welfare_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:welfare_idea == 2
		}
		change_variable = {
			name = welfare_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = welfare_idea_3_mdf
				}
			}
			add_modifier = {
				name = welfare_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:welfare_idea == 3
		}
		change_variable = {
			name = welfare_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = welfare_idea_4_mdf
				}
			}
			add_modifier = {
				name = welfare_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:welfare_idea == 4
		}
		change_variable = {
			name = welfare_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = welfare_idea_5_mdf
				}
			}
			add_modifier = {
				name = welfare_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:welfare_idea == 5
		}
		change_variable = {
			name = welfare_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = welfare_idea_6_mdf
				}
			}
			add_modifier = {
				name = welfare_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:welfare_idea == 6
		}
		change_variable = {
			name = welfare_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = welfare_idea_7_mdf
				}
			}
			add_modifier = {
				name = welfare_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = welfare_idea_completed
		add_modifier = {
			name = welfare_ambition_mdf
			months = -1
		}
	}
}

boost_reformist_idea_effect = {
	if = {
		limit = {
			var:reformist_idea == 0
		}
		change_variable = {
			name = reformist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = reformist_idea_1_mdf
				}
			}
			add_modifier = {
				name = reformist_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:reformist_idea == 1
		}
		change_variable = {
			name = reformist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = reformist_idea_2_mdf
				}
			}
			add_modifier = {
				name = reformist_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:reformist_idea == 2
		}
		change_variable = {
			name = reformist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = reformist_idea_3_mdf
				}
			}
			add_modifier = {
				name = reformist_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:reformist_idea == 3
		}
		change_variable = {
			name = reformist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = reformist_idea_4_mdf
				}
			}
			add_modifier = {
				name = reformist_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:reformist_idea == 4
		}
		change_variable = {
			name = reformist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = reformist_idea_5_mdf
				}
			}
			add_modifier = {
				name = reformist_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:reformist_idea == 5
		}
		change_variable = {
			name = reformist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = reformist_idea_6_mdf
				}
			}
			add_modifier = {
				name = reformist_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:reformist_idea == 6
		}
		change_variable = {
			name = reformist_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = reformist_idea_7_mdf
				}
			}
			add_modifier = {
				name = reformist_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = reformist_idea_completed
		add_modifier = {
			name = reformist_ambition_mdf
			months = -1
		}
	}
}

boost_labour_idea_effect = {
	if = {
		limit = {
			var:labour_idea == 0
		}
		change_variable = {
			name = labour_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = labour_idea_1_mdf
				}
			}
			add_modifier = {
				name = labour_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:labour_idea == 1
		}
		change_variable = {
			name = labour_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = labour_idea_2_mdf
				}
			}
			add_modifier = {
				name = labour_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:labour_idea == 2
		}
		change_variable = {
			name = labour_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = labour_idea_3_mdf
				}
			}
			add_modifier = {
				name = labour_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:labour_idea == 3
		}
		change_variable = {
			name = labour_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = labour_idea_4_mdf
				}
			}
			add_modifier = {
				name = labour_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:labour_idea == 4
		}
		change_variable = {
			name = labour_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = labour_idea_5_mdf
				}
			}
			add_modifier = {
				name = labour_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:labour_idea == 5
		}
		change_variable = {
			name = labour_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = labour_idea_6_mdf
				}
			}
			add_modifier = {
				name = labour_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:labour_idea == 6
		}
		change_variable = {
			name = labour_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = labour_idea_7_mdf
				}
			}
			add_modifier = {
				name = labour_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = labour_idea_completed
		add_modifier = {
			name = labour_ambition_mdf
			months = -1
		}
	}
}

boost_offensive_idea_effect = {
	if = {
		limit = {
			var:offensive_idea == 0
		}
		change_variable = {
			name = offensive_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = offensive_idea_1_mdf
				}
			}
			add_modifier = {
				name = offensive_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:offensive_idea == 1
		}
		change_variable = {
			name = offensive_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = offensive_idea_2_mdf
				}
			}
			add_modifier = {
				name = offensive_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:offensive_idea == 2
		}
		change_variable = {
			name = offensive_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = offensive_idea_3_mdf
				}
			}
			add_modifier = {
				name = offensive_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:offensive_idea == 3
		}
		change_variable = {
			name = offensive_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = offensive_idea_4_mdf
				}
			}
			add_modifier = {
				name = offensive_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:offensive_idea == 4
		}
		change_variable = {
			name = offensive_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = offensive_idea_5_mdf
				}
			}
			add_modifier = {
				name = offensive_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:offensive_idea == 5
		}
		change_variable = {
			name = offensive_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = offensive_idea_6_mdf
				}
			}
			add_modifier = {
				name = offensive_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:offensive_idea == 6
		}
		change_variable = {
			name = offensive_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = offensive_idea_7_mdf
				}
			}
			add_modifier = {
				name = offensive_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = offensive_idea_completed
		add_modifier = {
			name = offensive_ambition_mdf
			months = -1
		}
	}
}

boost_defensive_idea_effect = {
	if = {
		limit = {
			var:defensive_idea == 0
		}
		change_variable = {
			name = defensive_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = defensive_idea_1_mdf
				}
			}
			add_modifier = {
				name = defensive_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:defensive_idea == 1
		}
		change_variable = {
			name = defensive_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = defensive_idea_2_mdf
				}
			}
			add_modifier = {
				name = defensive_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:defensive_idea == 2
		}
		change_variable = {
			name = defensive_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = defensive_idea_3_mdf
				}
			}
			add_modifier = {
				name = defensive_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:defensive_idea == 3
		}
		change_variable = {
			name = defensive_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = defensive_idea_4_mdf
				}
			}
			add_modifier = {
				name = defensive_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:defensive_idea == 4
		}
		change_variable = {
			name = defensive_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = defensive_idea_5_mdf
				}
			}
			add_modifier = {
				name = defensive_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:defensive_idea == 5
		}
		change_variable = {
			name = defensive_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = defensive_idea_6_mdf
				}
			}
			add_modifier = {
				name = defensive_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:defensive_idea == 6
		}
		change_variable = {
			name = defensive_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = defensive_idea_7_mdf
				}
			}
			add_modifier = {
				name = defensive_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = defensive_idea_completed
		add_modifier = {
			name = defensive_ambition_mdf
			months = -1
		}
	}
}

boost_naval_idea_effect = {
	if = {
		limit = {
			var:naval_idea == 0
		}
		change_variable = {
			name = naval_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = naval_idea_1_mdf
				}
			}
			add_modifier = {
				name = naval_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:naval_idea == 1
		}
		change_variable = {
			name = naval_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = naval_idea_2_mdf
				}
			}
			add_modifier = {
				name = naval_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:naval_idea == 2
		}
		change_variable = {
			name = naval_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = naval_idea_3_mdf
				}
			}
			add_modifier = {
				name = naval_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:naval_idea == 3
		}
		change_variable = {
			name = naval_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = naval_idea_4_mdf
				}
			}
			add_modifier = {
				name = naval_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:naval_idea == 4
		}
		change_variable = {
			name = naval_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = naval_idea_5_mdf
				}
			}
			add_modifier = {
				name = naval_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:naval_idea == 5
		}
		change_variable = {
			name = naval_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = naval_idea_6_mdf
				}
			}
			add_modifier = {
				name = naval_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:naval_idea == 6
		}
		change_variable = {
			name = naval_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = naval_idea_7_mdf
				}
			}
			add_modifier = {
				name = naval_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = naval_idea_completed
		add_modifier = {
			name = naval_ambition_mdf
			months = -1
		}
	}
}

boost_professional_army_idea_effect = {
	if = {
		limit = {
			var:professional_army_idea == 0
		}
		change_variable = {
			name = professional_army_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = professional_army_idea_1_mdf
				}
			}
			add_modifier = {
				name = professional_army_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:professional_army_idea == 1
		}
		change_variable = {
			name = professional_army_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = professional_army_idea_2_mdf
				}
			}
			add_modifier = {
				name = professional_army_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:professional_army_idea == 2
		}
		change_variable = {
			name = professional_army_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = professional_army_idea_3_mdf
				}
			}
			add_modifier = {
				name = professional_army_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:professional_army_idea == 3
		}
		change_variable = {
			name = professional_army_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = professional_army_idea_4_mdf
				}
			}
			add_modifier = {
				name = professional_army_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:professional_army_idea == 4
		}
		change_variable = {
			name = professional_army_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = professional_army_idea_5_mdf
				}
			}
			add_modifier = {
				name = professional_army_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:professional_army_idea == 5
		}
		change_variable = {
			name = professional_army_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = professional_army_idea_6_mdf
				}
			}
			add_modifier = {
				name = professional_army_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:professional_army_idea == 6
		}
		change_variable = {
			name = professional_army_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = professional_army_idea_7_mdf
				}
			}
			add_modifier = {
				name = professional_army_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = professional_army_idea_completed
		add_modifier = {
			name = professional_army_ambition_mdf
			months = -1
		}
	}
}

boost_colonial_idea_effect = {
	if = {
		limit = {
			var:colonial_idea == 0
		}
		change_variable = {
			name = colonial_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = colonial_idea_1_mdf
				}
			}
			add_modifier = {
				name = colonial_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:colonial_idea == 1
		}
		change_variable = {
			name = colonial_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = colonial_idea_2_mdf
				}
			}
			add_modifier = {
				name = colonial_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:colonial_idea == 2
		}
		change_variable = {
			name = colonial_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = colonial_idea_3_mdf
				}
			}
			add_modifier = {
				name = colonial_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:colonial_idea == 3
		}
		change_variable = {
			name = colonial_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = colonial_idea_4_mdf
				}
			}
			add_modifier = {
				name = colonial_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:colonial_idea == 4
		}
		change_variable = {
			name = colonial_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = colonial_idea_5_mdf
				}
			}
			add_modifier = {
				name = colonial_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:colonial_idea == 5
		}
		change_variable = {
			name = colonial_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = colonial_idea_6_mdf
				}
			}
			add_modifier = {
				name = colonial_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:colonial_idea == 6
		}
		change_variable = {
			name = colonial_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = colonial_idea_7_mdf
				}
			}
			add_modifier = {
				name = colonial_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = colonial_idea_completed
		add_modifier = {
			name = colonial_ambition_mdf
			months = -1
		}
	}
}

boost_financial_idea_effect = {
	if = {
		limit = {
			var:financial_idea == 0
		}
		change_variable = {
			name = financial_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = financial_idea_1_mdf
				}
			}
			add_modifier = {
				name = financial_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:financial_idea == 1
		}
		change_variable = {
			name = financial_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = financial_idea_2_mdf
				}
			}
			add_modifier = {
				name = financial_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:financial_idea == 2
		}
		change_variable = {
			name = financial_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = financial_idea_3_mdf
				}
			}
			add_modifier = {
				name = financial_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:financial_idea == 3
		}
		change_variable = {
			name = financial_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = financial_idea_4_mdf
				}
			}
			add_modifier = {
				name = financial_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:financial_idea == 4
		}
		change_variable = {
			name = financial_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = financial_idea_5_mdf
				}
			}
			add_modifier = {
				name = financial_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:financial_idea == 5
		}
		change_variable = {
			name = financial_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = financial_idea_6_mdf
				}
			}
			add_modifier = {
				name = financial_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:financial_idea == 6
		}
		change_variable = {
			name = financial_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = financial_idea_7_mdf
				}
			}
			add_modifier = {
				name = financial_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = financial_idea_completed
		add_modifier = {
			name = financial_ambition_mdf
			months = -1
		}
	}
}

boost_infrastructure_idea_effect = {
	if = {
		limit = {
			var:infrastructure_idea == 0
		}
		change_variable = {
			name = infrastructure_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = infrastructure_idea_1_mdf
				}
			}
			add_modifier = {
				name = infrastructure_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:infrastructure_idea == 1
		}
		change_variable = {
			name = infrastructure_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = infrastructure_idea_2_mdf
				}
			}
			add_modifier = {
				name = infrastructure_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:infrastructure_idea == 2
		}
		change_variable = {
			name = infrastructure_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = infrastructure_idea_3_mdf
				}
			}
			add_modifier = {
				name = infrastructure_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:infrastructure_idea == 3
		}
		change_variable = {
			name = infrastructure_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = infrastructure_idea_4_mdf
				}
			}
			add_modifier = {
				name = infrastructure_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:infrastructure_idea == 4
		}
		change_variable = {
			name = infrastructure_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = infrastructure_idea_5_mdf
				}
			}
			add_modifier = {
				name = infrastructure_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:infrastructure_idea == 5
		}
		change_variable = {
			name = infrastructure_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = infrastructure_idea_6_mdf
				}
			}
			add_modifier = {
				name = infrastructure_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:infrastructure_idea == 6
		}
		change_variable = {
			name = infrastructure_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = infrastructure_idea_7_mdf
				}
			}
			add_modifier = {
				name = infrastructure_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = infrastructure_idea_completed
		add_modifier = {
			name = infrastructure_ambition_mdf
			months = -1
		}
	}
}

boost_extraction_idea_effect = {
	if = {
		limit = {
			var:extraction_idea == 0
		}
		change_variable = {
			name = extraction_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = extraction_idea_1_mdf
				}
			}
			add_modifier = {
				name = extraction_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:extraction_idea == 1
		}
		change_variable = {
			name = extraction_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = extraction_idea_2_mdf
				}
			}
			add_modifier = {
				name = extraction_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:extraction_idea == 2
		}
		change_variable = {
			name = extraction_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = extraction_idea_3_mdf
				}
			}
			add_modifier = {
				name = extraction_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:extraction_idea == 3
		}
		change_variable = {
			name = extraction_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = extraction_idea_4_mdf
				}
			}
			add_modifier = {
				name = extraction_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:extraction_idea == 4
		}
		change_variable = {
			name = extraction_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = extraction_idea_5_mdf
				}
			}
			add_modifier = {
				name = extraction_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:extraction_idea == 5
		}
		change_variable = {
			name = extraction_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = extraction_idea_6_mdf
				}
			}
			add_modifier = {
				name = extraction_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:extraction_idea == 6
			has_global_variable = age_3_started_trigger
		}
		change_variable = {
			name = extraction_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = extraction_idea_7_mdf
				}
			}
			add_modifier = {
				name = extraction_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = extraction_idea_completed
		add_modifier = {
			name = extraction_ambition_mdf
			months = -1
		}
	}
}

boost_mass_conscription_idea_effect = {
	if = {
		limit = {
			var:mass_conscription_idea == 0
		}
		change_variable = {
			name = mass_conscription_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = mass_conscription_idea_1_mdf
				}
			}
			add_modifier = {
				name = mass_conscription_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:mass_conscription_idea == 1
		}
		change_variable = {
			name = mass_conscription_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = mass_conscription_idea_2_mdf
				}
			}
			add_modifier = {
				name = mass_conscription_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:mass_conscription_idea == 2
		}
		change_variable = {
			name = mass_conscription_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = mass_conscription_idea_3_mdf
				}
			}
			add_modifier = {
				name = mass_conscription_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:mass_conscription_idea == 3
		}
		change_variable = {
			name = mass_conscription_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = mass_conscription_idea_4_mdf
				}
			}
			add_modifier = {
				name = mass_conscription_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:mass_conscription_idea == 4
		}
		change_variable = {
			name = mass_conscription_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = mass_conscription_idea_5_mdf
				}
			}
			add_modifier = {
				name = mass_conscription_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:mass_conscription_idea == 5
		}
		change_variable = {
			name = mass_conscription_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = mass_conscription_idea_6_mdf
				}
			}
			add_modifier = {
				name = mass_conscription_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:mass_conscription_idea == 6
		}
		change_variable = {
			name = mass_conscription_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = mass_conscription_idea_7_mdf
				}
			}
			add_modifier = {
				name = mass_conscription_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = mass_conscription_idea_completed
		add_modifier = {
			name = mass_conscription_ambition_mdf
			months = -1
		}
	}
}

boost_war_economy_idea_effect = {
	if = {
		limit = {
			var:war_economy_idea == 0
		}
		change_variable = {
			name = war_economy_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = war_economy_idea_1_mdf
				}
			}
			add_modifier = {
				name = war_economy_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:war_economy_idea == 1
		}
		change_variable = {
			name = war_economy_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = war_economy_idea_2_mdf
				}
			}
			add_modifier = {
				name = war_economy_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:war_economy_idea == 2
		}
		change_variable = {
			name = war_economy_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = war_economy_idea_3_mdf
				}
			}
			add_modifier = {
				name = war_economy_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:war_economy_idea == 3
		}
		change_variable = {
			name = war_economy_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = war_economy_idea_4_mdf
				}
			}
			add_modifier = {
				name = war_economy_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:war_economy_idea == 4
		}
		change_variable = {
			name = war_economy_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = war_economy_idea_5_mdf
				}
			}
			add_modifier = {
				name = war_economy_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:war_economy_idea == 5
		}
		change_variable = {
			name = war_economy_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = war_economy_idea_6_mdf
				}
			}
			add_modifier = {
				name = war_economy_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:war_economy_idea == 6
		}
		change_variable = {
			name = war_economy_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = war_economy_idea_7_mdf
				}
			}
			add_modifier = {
				name = war_economy_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = war_economy_idea_completed
		add_modifier = {
			name = war_economy_ambition_mdf
			months = -1
		}
	}
}

boost_agrarian_idea_effect = {
	if = {
		limit = {
			var:agrarian_idea == 0
		}
		change_variable = {
			name = agrarian_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = agrarian_idea_1_mdf
				}
			}
			add_modifier = {
				name = agrarian_idea_1_mdf
				months = -1
			}
		}
		ve_idea_purchase_1 = yes
	}
	else_if = {
		limit = {
			var:agrarian_idea == 1
		}
		change_variable = {
			name = agrarian_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = agrarian_idea_2_mdf
				}
			}
			add_modifier = {
				name = agrarian_idea_2_mdf
				months = -1
			}
		}
		ve_idea_purchase_2 = yes
	}
	else_if = {
		limit = {
			var:agrarian_idea == 2
		}
		change_variable = {
			name = agrarian_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = agrarian_idea_3_mdf
				}
			}
			add_modifier = {
				name = agrarian_idea_3_mdf
				months = -1
			}
		}
		ve_idea_purchase_3 = yes
	}
	else_if = {
		limit = {
			var:agrarian_idea == 3
		}
		change_variable = {
			name = agrarian_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = agrarian_idea_4_mdf
				}
			}
			add_modifier = {
				name = agrarian_idea_4_mdf
				months = -1
			}
		}
		ve_idea_purchase_4 = yes
	}
	else_if = {
		limit = {
			var:agrarian_idea == 4
		}
		change_variable = {
			name = agrarian_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = agrarian_idea_5_mdf
				}
			}
			add_modifier = {
				name = agrarian_idea_5_mdf
				months = -1
			}
		}
		ve_idea_purchase_5 = yes
	}
	else_if = {
		limit = {
			var:agrarian_idea == 5
		}
		change_variable = {
			name = agrarian_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = agrarian_idea_6_mdf
				}
			}
			add_modifier = {
				name = agrarian_idea_6_mdf
				months = -1
			}
		}
		ve_idea_purchase_6 = yes
	}
	else_if = {
		limit = {
			var:agrarian_idea == 6
		}
		change_variable = {
			name = agrarian_idea
			add = 1
		}
		if = {
			limit = {
				NOT = {
					has_modifier = agrarian_idea_7_mdf
				}
			}
			add_modifier = {
				name = agrarian_idea_7_mdf
				months = -1
			}
		}
		ve_idea_purchase_7 = yes
		set_variable = agrarian_idea_completed
		add_modifier = {
			name = agrarian_ambition_mdf
			months = -1
		}
	}
}
