castle = {
	ca_bureaucrat_1 = {
		desc = bureaucrat_1_desc
		potential = {
			always = no
            OR = {
                AND = {
                    FROMFROM = { is_capital = yes }
                    is_capital = yes
                    FROM = { higher_tier_than = COUNT }
                }
                has_building = ca_bureaucrat_1
            }
		}
		trigger = {
			TECH_LEGALISM = 1
            FROM = {
                higher_tier_than = COUNT
			}
		}
		gold_cost = 250
		build_time = 365
		ai_creation_factor = 98
		extra_tech_building_start = 1
	}
    ca_bureaucrat_2 = {
		desc = bureaucrat_2_desc
		potential = {
			always = no
            OR = {
                AND = {
                    FROMFROM = { is_capital = yes }
                    is_capital = yes
                    FROM = { higher_tier_than = COUNT }
                }
                has_building = ca_bureaucrat_1
            }
		}
		trigger = {
			TECH_LEGALISM = 2
            FROM = {
                higher_tier_than = COUNT
			}
		}
        upgrades_from = ca_bureaucrat_1
		gold_cost = 500
		build_time = 365
		ai_creation_factor = 98
		extra_tech_building_start = 1
	}
    ca_bureaucrat_3 = {
		desc = bureaucrat_3_desc
		potential = {
			always = no
            OR = {
                AND = {
                    FROMFROM = { is_capital = yes }
                    is_capital = yes
                    FROM = { higher_tier_than = COUNT }
                }
                has_building = ca_bureaucrat_1
            }
		}
		trigger = {
			TECH_LEGALISM = 3
            FROM = { 
				higher_tier_than = DUKE
			}
		}
        upgrades_from = ca_bureaucrat_2
		gold_cost = 750
		build_time = 730
		ai_creation_factor = 98
		extra_tech_building_start = 1
	}
    ca_bureaucrat_4 = {
		desc = bureaucrat_4_desc
		potential = {
			always = no
            OR = {
                AND = {
                    FROMFROM = { is_capital = yes }
                    is_capital = yes
                    FROM = { higher_tier_than = COUNT }
                }
                has_building = ca_bureaucrat_1
            }
		}
		trigger = {
			TECH_LEGALISM = 4
            FROM = { 
				higher_tier_than = DUKE
			}
		}
        upgrades_from = ca_bureaucrat_3
		gold_cost = 1000
		build_time = 730
		ai_creation_factor = 98
		extra_tech_building_start = 1
	}
    ca_bureaucrat_5 = {
		desc = bureaucrat_5_desc
		potential = {
			always = no
            OR = {
                AND = {
                    FROMFROM = { is_capital = yes }
                    is_capital = yes
                    FROM = { higher_tier_than = COUNT }
                }
                has_building = ca_bureaucrat_1
            }
		}
		trigger = {
			TECH_LEGALISM = 5
            FROM = { 
				higher_tier_than = KING
			}
		}
        upgrades_from = ca_bureaucrat_4
		gold_cost = 1250
		build_time = 1095
		ai_creation_factor = 98
		extra_tech_building_start = 1
	}
    ca_bureaucrat_6 = {
		desc = bureaucrat_6_desc
		potential = {
			always = no
            OR = {
                AND = {
                    FROMFROM = { is_capital = yes }
                    is_capital = yes
                    FROM = { higher_tier_than = COUNT }
                }
                has_building = ca_bureaucrat_1
            }
		}
		trigger = {
			TECH_LEGALISM = 6
            FROM = { 
				higher_tier_than = KING
			}
            
		}
        upgrades_from = ca_bureaucrat_5
		gold_cost = 1500
		build_time = 1095
		ai_creation_factor = 98
		extra_tech_building_start = 1
	}
}

city = {
	ct_bureaucrat_1 = {
		desc = bureaucrat_1_desc
		potential = {
			always = no
            OR = {
                AND = {
                    FROMFROM = { is_capital = yes }
                    is_capital = yes
                    FROM = { higher_tier_than = COUNT }
                }
                has_building = ct_bureaucrat_1
            }
		}
		trigger = {
			TECH_LEGALISM = 1
            FROM = {
                higher_tier_than = COUNT
			}
		}
		gold_cost = 250
		build_time = 365
		ai_creation_factor = 98
		extra_tech_building_start = 0
	}
    ct_bureaucrat_2 = {
		desc = bureaucrat_2_desc
		potential = {
			always = no
            OR = {
                AND = {
                    FROMFROM = { is_capital = yes }
                    is_capital = yes
                    FROM = { higher_tier_than = COUNT }
                }
                has_building = ct_bureaucrat_1
            }
		}
		trigger = {
			TECH_LEGALISM = 2
            FROM = {
                higher_tier_than = COUNT
			}
		}
        upgrades_from = ct_bureaucrat_1
		gold_cost = 500
		build_time = 365
		ai_creation_factor = 98
		extra_tech_building_start = 0
	}
    ct_bureaucrat_3 = {
		desc = bureaucrat_3_desc
		potential = {
			always = no
            OR = {
                AND = {
                    FROMFROM = { is_capital = yes }
                    is_capital = yes
                    FROM = { higher_tier_than = COUNT }
                }
                has_building = ct_bureaucrat_1
            }
		}
		trigger = {
			TECH_LEGALISM = 3
            FROM = {
                higher_tier_than = DUKE
			}
		}
        upgrades_from = ct_bureaucrat_2
		gold_cost = 750
		build_time = 730
		ai_creation_factor = 98
		extra_tech_building_start = 0.3
	}
    ct_bureaucrat_4 = {
		desc = bureaucrat_4_desc
		potential = {
			always = no
            OR = {
                AND = {
                    FROMFROM = { is_capital = yes }
                    is_capital = yes
                    FROM = { higher_tier_than = COUNT }
                }
                has_building = ct_bureaucrat_1
            }
		}
		trigger = {
			TECH_LEGALISM = 4
            FROM = {
                higher_tier_than = DUKE
			}
		}
        upgrades_from = ct_bureaucrat_3
		gold_cost = 1000
		build_time = 730
		ai_creation_factor = 98
		extra_tech_building_start = 0.3
	}
    ct_bureaucrat_5 = {
		desc = bureaucrat_5_desc
		potential = {
			always = no
            OR = {
                AND = {
                    FROMFROM = { is_capital = yes }
                    is_capital = yes
                    FROM = { higher_tier_than = COUNT }
                }
                has_building = ct_bureaucrat_1
            }
		}
		trigger = {
			TECH_LEGALISM = 5
            FROM = {
                higher_tier_than = KING
			}
		}
        upgrades_from = ct_bureaucrat_4
		gold_cost = 1250
		build_time = 730
		ai_creation_factor = 98
		extra_tech_building_start = 0.3
	}
    ct_bureaucrat_6 = {
		desc = bureaucrat_6_desc
		potential = {
			always = no
            OR = {
                AND = {
                    FROMFROM = { is_capital = yes }
                    is_capital = yes
                    FROM = { higher_tier_than = COUNT }
                }
                has_building = ct_bureaucrat_1
            }
		}
		trigger = {
			TECH_LEGALISM = 6
            FROM = {
                higher_tier_than = KING
			}
		}
        upgrades_from = ct_bureaucrat_5
		gold_cost = 1500
		build_time = 730
		ai_creation_factor = 98
		extra_tech_building_start = 0.3
	}
}

temple = {
	tp_bureaucrat_1 = {
		desc = bureaucrat_1_desc
		potential = {
			always = no
            OR = {
                AND = {
                    FROMFROM = { is_capital = yes }
                    is_capital = yes
                    FROM = { higher_tier_than = COUNT }
                }
                has_building = tp_bureaucrat_1
            }
		}
		trigger = {
			TECH_LEGALISM = 1
            FROM = {
                higher_tier_than = COUNT
			}
		}
		gold_cost = 250
		build_time = 365
		ai_creation_factor = 98
		extra_tech_building_start = 0
	}
    tp_bureaucrat_2 = {
		desc = bureaucrat_2_desc
		potential = {
			always = no
            OR = {
                AND = {
                    FROMFROM = { is_capital = yes }
                    is_capital = yes
                    FROM = { higher_tier_than = COUNT }
                }
                has_building = tp_bureaucrat_1
            }
		}
		trigger = {
			TECH_LEGALISM = 2
            FROM = {
                higher_tier_than = COUNT
			}
		}
        upgrades_from = tp_bureaucrat_1
		gold_cost = 500
		build_time = 365
		ai_creation_factor = 98
		extra_tech_building_start = 0
	}
    tp_bureaucrat_3 = {
		desc = bureaucrat_3_desc
		potential = {
			always = no
            OR = {
                AND = {
                    FROMFROM = { is_capital = yes }
                    is_capital = yes
                    FROM = { higher_tier_than = COUNT }
                }
                has_building = tp_bureaucrat_1
            }
		}
		trigger = {
			TECH_LEGALISM = 3
            FROM = {
                higher_tier_than = DUKE
			}
		}
        upgrades_from = tp_bureaucrat_2
		gold_cost = 750
		build_time = 730
		ai_creation_factor = 98
		extra_tech_building_start = 0.3
	}
    tp_bureaucrat_4 = {
		desc = bureaucrat_4_desc
		potential = {
			always = no
            OR = {
                AND = {
                    FROMFROM = { is_capital = yes }
                    is_capital = yes
                    FROM = { higher_tier_than = COUNT }
                }
                has_building = tp_bureaucrat_1
            }
		}
		trigger = {
			TECH_LEGALISM = 4
            FROM = {
                higher_tier_than = DUKE
			}
		}
        upgrades_from = tp_bureaucrat_3
		gold_cost = 1000
		build_time = 730
		ai_creation_factor = 98
		extra_tech_building_start = 0.3
	}
    tp_bureaucrat_5 = {
		desc = bureaucrat_5_desc
		potential = {
			always = no
            OR = {
                AND = {
                    FROMFROM = { is_capital = yes }
                    is_capital = yes
                    FROM = { higher_tier_than = COUNT }
                }
                has_building = tp_bureaucrat_1
            }
		}
		trigger = {
			TECH_LEGALISM = 5
            FROM = {
                higher_tier_than = KING
			}
		}
        upgrades_from = tp_bureaucrat_4
		gold_cost = 1250
		build_time = 730
		ai_creation_factor = 98
		extra_tech_building_start = 0.3
	}
    tp_bureaucrat_6 = {
		desc = bureaucrat_6_desc
		potential = {
			always = no
            OR = {
                AND = {
                    FROMFROM = { is_capital = yes }
                    is_capital = yes
                    FROM = { higher_tier_than = COUNT }
                }
                has_building = tp_bureaucrat_1
            }
		}
		trigger = {
			TECH_LEGALISM = 6
            FROM = {
                higher_tier_than = KING
			}
		}
        upgrades_from = tp_bureaucrat_5
		gold_cost = 1500
		build_time = 730
		ai_creation_factor = 98
		extra_tech_building_start = 0.3
	}
}