settlement_decisions = {

	upgrade_hospital_tech = {
        filter = owned
        ai = no
        from_potential = {
            
            has_character_flag = cheats_enabled
        }
        potential = {
			is_capital = yes
			location={
				scmr_hp_building = yes
			}
        }
        allow = {
            always = yes
        }
        effect = {
            location = {
				if = {
					limit = {
							has_hospital = no
						}
					build_holding = {
						type = hospital
						holder = from
					}
				}
				scmr_build_hp_tech = yes
			}
        }
        ai_will_do = {
            factor = 0
        }
    }
	
	upgrade_trade_tech = {
        filter = owned
        ai = no
        from_potential = {
            
            has_character_flag = cheats_enabled
        }
        potential = {
			is_capital = yes
			location={
				scmr_trade_building = yes
			}
        }
        allow = {
            always = yes
        }
        effect = {
            location = {
				if = {
					limit = {
							has_trade_post = no
						}
					build_holding = {
						type = trade_post
						holder = from
					}
				}
				scmr_build_tr_tech = yes
			}
        }
        ai_will_do = {
            factor = 0
        }
    }
	
	upgrade_building_tech = {
        filter = owned
        ai = no
        from_potential = {
            
            has_character_flag = cheats_enabled
        }
        potential = {
            scmr_notfull_building = yes
        }
        allow = {
            always = yes
        }
        effect = {
			if = {
				limit = {
					holding_type = castle
				} 
				scmr_build_castle_tech = yes
			}
           	else_if = {
				limit = {
					holding_type = temple
				}
				scmr_build_temple_tech = yes
			}
			else_if = {
				limit = {
					holding_type = city
				}
				scmr_build_city_tech = yes
			}
			else_if = {
				limit = {
					holding_type = tribal
				}
				scmr_build_tb_tech = yes
			}
			else_if = {
				limit = {
					holding_type = nomad
				}
				scmr_build_nd_tech = yes
			}
		}
        ai_will_do = {
            factor = 0
        }
    }
	
}