 # Triggers are in Province scope. The From Scope contains the settlement holder (character)
 # start trigger is in title scope.
 
 #<tag> = {
 #	desc = description used in the tooltip of the building
 #	trigger = used for tech requirement of the building, set to 0 if no requirement so it can be build automatically on new games
 #	gold_cost = cost to build the building
 #	build_time = time to build, in days
 #	
 #	ai_creation_factor = weight that the AI uses to determine what building to build
 #	extra_tech_building_start = when starting a new game this building will be pre-built if the province has higher tech than the requirement + this + random 0-1
 #}
 
 # Castle
castle = {
	ca_personal_military_1 = {
		desc = personal_miliary_desc
		
		potential = {
			OR = {
				FROM = {
					capital_holding = {
						title = FROMFROM
					}
				}
			}
		}

		trigger = { always = yes }

		
		gold_cost = 250
		build_time = 300
		
		tax_income = 1
		retinuesize = 200
		levy_size = 0.5
		
		ai_creation_factor = 70
		extra_tech_building_start = 0.01
	}
	
	ca_personal_military_2 = {
		desc = personal_miliary_desc
		
		potential = {
			FROM = {
				capital_holding = {
					title = FROMFROM
				}
			}
		}
	
	
		trigger = { always = yes }
		prerequisites = { ca_training_grounds_2 }
		upgrades_from = ca_personal_military_1
		gold_cost = 400
		build_time = 400
		tax_income = 1.5
		retinuesize = 200
		levy_size = 1.5
		ai_creation_factor = 40
		
		extra_tech_building_start = 0.005
	}
	
	jmerc_desmond = {
		desc = jmerc_desmond_desc
		potential = {
			province_id = 14
		}
		
		trigger = { always = yes }
		
		gold_cost = 200
		build_time = 300
		
		tax_income = 2
		fort_level = 1
		
		ai_creation_factor = 40
		extra_tech_building_start = 0.01
	}
	
	jmerc_imen = {
		potential = {
			province_id = 54
		}
		
		
		trigger = { always = yes }
		
		gold_cost = 200
		build_time = 300
		
		garrison_size = 0.5
		
		ai_creation_factor = 40
		extra_tech_building_start = 0.01
	}
	
	jmerc_amalfi = {
		potential = {
			province_id = 935
		}

		trigger = { always = yes }
		
		gold_cost = 200
		build_time = 300
		
		tax_income = 3
		galleys = 10
		
		ai_creation_factor = 40
		extra_tech_building_start = 0.01
	}
	
	jmerc_bergenshus = {
		potential = {
			province_id = 274
		}

		trigger = { always = yes }
		
		gold_cost = 200
		build_time = 300
		
		tax_income = 0.5
		retinuesize = 200
		
		ai_creation_factor = 40
		extra_tech_building_start = 0.01
	}
	
}


#Desmond(14), Constantinople(196), Bergenshus(274), Isle of Man(54), Amalfi(935) 
#Amalfi - Money Bonus
#Desmond - Garrison, Fort Level
#Constantinople - 
#Isle of Man - 
#Bergenshus - 