#building_name =
#{
#	# Effects
##	percentage_score = { gold = 0 prestige = 1 piety = 0 }# where 1.01 = 1%
#	percentage_build_time_bonus = 0.5
##  percentage_build_time = 0.9 #This example means 10% faster
#	percentage_attrition = 0.1
#	percentage_speed = 0.1
#	percentage_assasination_success = 5.0
#	percentage_transportation_cost = 0.5
#	periodic_score = { gold = 0 prestige = 1 piety = 0 }
#	periodic_loyalty = { peasants = 0.01 burghers = 0.01 clergy = 0 nobles = 0 }
#   loyalty_bonus = { peasants = 0.1 burghers = 0.4 clergy = 0 nobles = 0 }
#	pillage = { gold = 10 prestige = 0 piety = -20 }
#	onetime_loyalty_bonus = { peasants = 0 burghers = 0 clergy = 0.1 nobles = 0 }
#	onetime_bonus = { gold = 0 prestige = 20 piety = 0 }
#	require_coastal = yes
#	demense = 0.01 //lower demense penalty
#       additional_return_on_investment = 0.01 used to tweak AI province improvement building and does not affect income
#
#	# Requirements
#	//	CTerrainTuple<bool>	_allowableTerrain;
#	//	CLawsTuple<bool>	_requiredLaws;
#	required_province_improvements = { fishing_wharf = yes sawmill = yes }
##	required_advances = { missile_barrage = yes drilled_pikers = yes }
#	mountain = no, hills = no, forest = no, plains = no, march = no, desert = no
#	prohibiting_province_improvements = { watermills = yes }
#	minimum_income = 15;
#	required_tier = duchy
#	require_capital = yes
#}

######################################################################
#	several tweaks to improvements made by Chris Stone April 02/04
#	- added support cost to castles
#	- reduced cathedral support cost slightly
#	- changed royal post to demesne = 0.8 since it appears to be working in reverse in previous version
#       more twaeks made April 25/04
#       - reverted to previous RP setting since works differently than previously thought
#       - changed support cost of religious structures as they are additive, not substitutive
#######################################################################

fishing_wharf =
{
	cost = { gold = 100 prestige = 0 piety = 0 }
	construction_time = 12
	lasting_effects =
	{
		percentage_score = { gold = 1.05 }
		percentage_transportation_cost = 0.9
		pillage_score = { gold = 1 }
	}
	require_coastal = yes
	additional_return_on_investment = 0.1
}

civilian_harbour =
{
	cost = { gold = 200 prestige = 0 piety = 0 }
	construction_time = 24
	required_advances = { large_ship_building = yes }
	upgradeable = yes 

	lasting_effects =
	{
		percentage_score = { gold = 1.03 }
		percentage_transportation_cost = 0.66
		pillage_score = { gold = 1 }
	}
	require_coastal = yes
	additional_return_on_investment = 0.02 #advance spread benefit
}

naval_harbour =
{
	cost = { gold = 400 prestige = 0 piety = 0 }
	construction_time = 48
	required_province_improvements = { civilian_harbour = yes }
	minimum_income = 10
	upgradeable = yes 

	lasting_effects =
	{
		percentage_score = { gold = 1.01 }
		percentage_transportation_cost = 0.33
		pillage_score = { gold = 2 }
	}
	require_coastal = yes
	additional_return_on_investment = 0.01 #advance spread benefit
}

grand_shipyard =
{
	cost = { gold = 1000 prestige = 0 piety = 0 }
	construction_time = 72
	required_province_improvements = { naval_harbour = yes }
	minimum_income = 15

	lasting_effects =
	{
		percentage_transportation_cost = 0.15
		percentage_score = { gold = 1.05 }
		periodic_score = { prestige = 1 }
		pillage_score = { gold = 2 }
	}
	desert = no
	require_coastal = yes
	additional_return_on_investment = 0.01 #advance spread benefit
}

sawmill =
{
	cost = { gold = 250 prestige = 0 piety = 0 }
	construction_time = 18
	required_province_improvements = { forestry = yes }
	lasting_effects =
	{
		percentage_score = { gold = 1.05 }
		percentage_build_time = 0.95
		pillage_score = { gold = 2 }
	}
	
	mountain = no
	plains = no
	march = no
	desert = no

	additional_return_on_investment = 0.01 #decreased build times
}

forestry =
{
	cost = { gold = 100 prestige = 0 piety = 0 }
	construction_time = 12

	lasting_effects =
	{
		percentage_score = { gold = 1.05 }
		percentage_build_time = 0.95
		pillage_score = { gold = 1 }
	}
	march = no
	desert = no
	additional_return_on_investment = 0.1
	
}

smithy =
{
	cost = { gold = 250 prestige = 0 piety = 0 }
	construction_time = 18
	required_advances = { ironworks = yes }
	upgradeable = yes 

	lasting_effects =
	{
		percentage_score = { gold = 1.04 }
		pillage_score = { gold = 2 }
	}
}

armory =
{
	cost = { gold = 500 prestige = 0 piety = 0 }
	construction_time = 36
	required_advances = { cast_iron = yes black_coal = yes }
	required_province_improvements = { smithy = yes }
	minimum_income = 10

	lasting_effects =
	{
		percentage_score = { gold = 1.1 }
		pillage_score = { gold = 4 }
	}
}

mine =
{
	cost = { gold = 100 prestige = 0 piety = 0 }
	construction_time = 12
	required_advances = { coalpit = yes }
	upgradeable = yes 

	lasting_effects =
	{
		periodic_score = { gold = 1 }
		pillage_score = { gold = 1 }
	}
}

improved_mine =
{
	cost = { gold = 200 prestige = 0 piety = 0 }
	construction_time = 24
	required_advances = { percussion_drilling = yes }
	required_province_improvements = { mine = yes }

	lasting_effects =
	{
		periodic_score = { gold = 1 }
		pillage_score = { gold = 2 }
	}
	forest = no
	plains = no
	march = no
	desert = no
}

watermills =
{
	cost = { gold = 100 prestige = 0 piety = 0 }
	construction_time = 18
	required_advances = { waterwheel = yes }

	lasting_effects =
	{
		percentage_score = { gold = 1.04 }
		pillage_score = { gold = 1 }
	}
	mountain = no
	desert = no
}

windmills =
{
	cost = { gold = 100 prestige = 0 piety = 0 }
	construction_time = 18
	required_advances = { windwheel = yes }

	lasting_effects =
	{
		percentage_score = { gold = 1.04 }
		pillage_score = { gold = 1 }
	}
	mountain = no
	forest = no
}

cheese_dairy =
{
	cost = { gold = 200 prestige = 0 piety = 0 }
	construction_time = 24
	required_advances = { cows = yes }

	lasting_effects =
	{
		percentage_score = { gold = 1.1 }
		pillage_score = { gold = 2 }
	}
	desert = no
}

brewery =
{
	cost = { gold = 100 prestige = 0 piety = 0 }
	construction_time = 18
	required_advances = { sugerrefinery = yes }

	lasting_effects =
	{
		periodic_score = { gold = 1 }
		pillage_score = { gold = 1 }
	}
	desert = no
}

dyeworks =
{
	cost = { gold = 100 prestige = 0 piety = 0 }
	construction_time = 18
	required_advances = { clothmaking = yes }

	lasting_effects =
	{
		periodic_score = { gold = 1 }
		pillage_score = { gold = 1 }
	}
}

glassworks =
{
	cost = { gold = 100 prestige = 0 piety = 0 }
	construction_time = 18
	required_advances = { glassblowing = yes }

	lasting_effects =
	{
		periodic_score = { gold = 1 }
		pillage_score = { gold = 1 }
	}
}

spinningmill =
{
	cost = { gold = 100 prestige = 0 piety = 0 }
	construction_time = 18
	required_advances = { clothmaking = yes }

	lasting_effects =
	{
		percentage_score = { gold = 1.04 }
		pillage_score = { gold = 1 }
	}
}

tilefactory =
{
	cost = { gold = 100 prestige = 0 piety = 0 }
	construction_time = 18
	required_advances = { stonepit = yes }

	lasting_effects =
	{
		percentage_score = { gold = 1.04 }
		percentage_build_time = 0.9
		pillage_score = { gold = 1 }
	}
	additional_return_on_investment = 0.02 #descreased build times plus allows several structures

}

library =
{
	cost = { gold = 100 prestige = 0 piety = 0 }
	construction_time = 24
	required_advances = { the_seven_liberal_arts = yes }

	onetime_bonus = { prestige = 25 }

	lasting_effects =
	{
		#periodic_research_bonus (+)
		percentage_score = { gold = 1.05 }
		pillage_score = { gold = 1 piety = -2 }
	}
}

school =
{
	cost = { gold = 100 prestige = 0 piety = 0 }
	construction_time = 18
	required_advances = { monastic_schools = yes }

	onetime_bonus = { prestige = 25 }

	lasting_effects =
	{
		#character_skill_bonus (+)
		percentage_score = { gold = 0.95 }
		#periodic_score = { gold = -1 }
		pillage_score = { gold = 1 piety = -2 }
	}
	additional_return_on_investment = 0.06 #bonus to character education outcome
}

traininggrounds =
{
	cost = { gold = 150 prestige = 0 piety = 0 }
	construction_time = 12

	lasting_effects =
	{
		speed = 1.1
        	supportable = 100
		pillage_score = { gold = 1 }
	}
	additional_return_on_investment = 0.02 #recruitment
}

templar_house =
{
	cost = { gold = 250 prestige = 0 piety = 0 }
	construction_time = 36
	required_province_improvements = { monastery = yes }

	onetime_bonus = { piety = 25 }

	lasting_effects =
	{
		#increase chance of conversion if province has different religion
		#advance_dispersal (+)
		periodic_loyalty = { nobles = 0.001 }
		percentage_score = { gold = 0.95 }
#		periodic_score = { gold = -1 }
	        supportable = 200
		pillage_score = { gold = 2 piety = -2 }
	}
	additional_return_on_investment = 0.07 #recruitment and loyalty bonus
}

university =
{
	cost = { gold = 600 prestige = 0 piety = 0 }
	construction_time = 48

	required_advances = { universities = yes }
	required_province_improvements = { school = yes }
	minimum_income = 15

	onetime_bonus = { prestige = 50 }
	lasting_effects =
	{
		#periodic_research_bonus (++)
		percentage_score = { gold = 0.90 }
		periodic_score = { prestige = 1 }
#		periodic_score = { gold = -2 }
		pillage_score = { gold = 4 piety = -2 }
	}
	additional_return_on_investment = 0.12 #advance spread bonus
}

waracademy =
{
	cost = { gold = 400 prestige = 0 piety = 0 }
	construction_time = 30

	required_province_improvements = { traininggrounds = yes }
	minimum_income = 15

	lasting_effects =
	{
		speed = 1.1
	        percentage_score = { gold = 0.95 }
		periodic_score = { prestige = 1 }
	        supportable = 200
		pillage_score = { gold = 3 }
	}
	additional_return_on_investment = 0.05 #early game recruitment imperative
}

moneylenders =
{
	cost = { gold = 100 prestige = 0 piety = 0 }
	construction_time = 18
	required_advances = { local_merchant_houses = yes }

	lasting_effects =
	{
		periodic_score = { piety = -2 }
		percentage_score = { gold = 1.1 }
		periodic_loyalty = {burghers = 0.001 clergy = -0.001 }
		pillage_score = { gold = 2 piety = 5 }
	}
	additional_return_on_investment = -0.05 #event dangers associated with this structure
}

monastery =
{
	cost = { gold = 200 prestige = 0 piety = 0 }
	construction_time = 24

	required_advances = { monastic_schools = yes }
	required_province_improvements = { tilefactory = yes }

	onetime_bonus = { piety = 25 }

	lasting_effects =
	{
		percentage_score = { gold = 1.05 }
		pillage_score = { gold = 2 piety = -5 }
	}
}

church =
{
	cost = { gold = 150 prestige = 0 piety = 0 }
	construction_time = 24

	required_province_improvements = { tilefactory = yes }
	required_advances = { brickwork_structures = yes basilican_structures = yes }

	onetime_bonus = { piety = 10 }

	lasting_effects =
	{
		periodic_loyalty = { peasants = 0.001 }
		percentage_score = { gold = 0.97 }
		periodic_score = { piety = 1 }
		pillage_score = { gold = 1 piety = -5 }
	}
	additional_return_on_investment = 0.02 #loyalty bonus
}

large_church =
{
	cost = { gold = 300 prestige = 0 piety = 0 }
	construction_time = 36

	required_province_improvements = { tilefactory = yes church = yes }
	required_advances = { romanesque_vaulting = yes }

	onetime_bonus = { piety = 25 }

	lasting_effects =
	{
		periodic_loyalty = {peasants = 0.002 clergy = 0.001 }
		percentage_score = { gold = 0.96 }
		periodic_score = { piety = 1 }
#		periodic_score = { gold = -1 }
		pillage_score = { gold = 2 piety = -5 }
	}
	additional_return_on_investment = 0.05 #loyalty bonus
}

domed_church =
{
	cost = { gold = 600 prestige = 0 piety = 0 }
	construction_time = 60
	required_province_improvements = { tilefactory = yes large_church = yes }
	required_advances = { cylindrical_structures = yes }
	minimum_income = 10

	onetime_bonus = { piety = 50 }

	lasting_effects =
	{
		periodic_loyalty = {peasants = 0.002 clergy = 0.002 }
		percentage_score = { gold = 0.95 }
		periodic_score = { piety = 1 }
#		periodic_score = { gold = -1 }
		pillage_score = { gold = 3 piety = -5 }
	}
	additional_return_on_investment = 0.05 #loyalty bonus
}

cathedral =
{
	cost = { gold = 1000 prestige = 0 piety = 0 }
	construction_time = 120

	required_province_improvements = { tilefactory = yes domed_church = yes }
	required_advances = { gothic_buttresses = yes }
	minimum_income = 15

	onetime_bonus = { piety = 100 }

	lasting_effects =
	{
		periodic_loyalty = {peasants = 0.003 clergy = 0.003 }
		percentage_score = { gold = 0.90 }
		periodic_score = { piety = 1 }
		periodic_score = { prestige = 1 }
#		periodic_score = { gold = -2 }
		pillage_score = { gold = 4 piety = -5 }
	}
	additional_return_on_investment = 0.08 #loyalty bonus
}

theater =
{
	cost = { gold = 400 prestige = 0 piety = 0 }
	construction_time = 24
	minimum_income = 15
	required_advances = { miracle_plays = yes }

	onetime_bonus = { prestige = 50 }

	lasting_effects =
	{
		periodic_loyalty = { peasants = 0.001 clergy = 0.001 burghers = 0.001 nobles = 0.001 }
		percentage_score = { gold = 0.90 }
		periodic_score = { prestige = 1 }
#		periodic_score = { gold = -2 }
		pillage_score = { gold = 4 }
	}
	additional_return_on_investment = 0.11 #loyalty bonuses
}

grand_palace =
{
	cost = { gold = 1500 prestige = 0 piety = 0 }
	construction_time = 120
	minimum_income = 15

	onetime_bonus = { prestige = 200 }

	lasting_effects =
	{
		demesne = 0.3
		periodic_loyalty = { nobles = 0.002 }
		percentage_score = { gold = 0.95 }
		periodic_score = { prestige = 1 }
	        supportable = 500
		pillage_score = { gold = 10 }
	}
	additional_return_on_investment = 0.05 #demesne bonus
}

roadnet =
{
	cost = { gold = 100 prestige = 0 piety = 0 }
	construction_time = 18
	required_advances = { road_building = yes }

	lasting_effects =
	{
		tolls = 1.05
		percentage_speed = 1.25
		attrition = -0.1
		#advance_dispersal (+)
		pillage_score = { gold = 1 }
	}
	additional_return_on_investment = 0.15 #advance spread bonus
}

extensive_roadnet =
{
	cost = { gold = 400 prestige = 0 piety = 0 }
	construction_time = 36

	required_advances = { road_building = yes }
	required_province_improvements = { roadnet = yes }

	lasting_effects =
	{
		tolls =  1.1
		percentage_speed = 1.2
		#advance_dispersal (+)
		supportable = 20
		attrition = -0.2
		pillage_score = { gold = 2 }
		percentage_build_time = 0.975
	}
	mountain = no
	march = no
	forest = no
	desert = no
	additional_return_on_investment = 0.1 #advance spread bonus
}

royal_post =
{
	cost = { gold = 100 prestige = 0 piety = 0 }
	construction_time = 24

	lasting_effects =
	{
		demesne = 0.2
		periodic_loyalty = { burghers = 0.002 }
		periodic_loyalty = { nobles = 0.002 }
		percentage_score = { gold = 0.95 }
#		periodic_score = { gold = -1 }
		pillage_score = { gold = 1 }
	}
	additional_return_on_investment = 0.06 #demesne bonus
}

court_of_justice =
{
	cost = { gold = 100 prestige = 0 piety = 0 }
	construction_time = 18

	lasting_effects =
	{
		periodic_loyalty = { burghers = 0.002 }
		percentage_score = { gold = 0.90 }
#		periodic_score = { gold = -2 }
		pillage_score = { gold = 1 piety = -2 }
	}

	additional_return_on_investment = 0.1	
}

hill_fort =
{
	cost = { gold = 200 prestige = 0 piety = 0 }
	construction_time = 24
	required_advances = { hill_fort = yes }
	upgradeable = yes 

	lasting_effects =
	{
		supportable = 250
		percentage_score = { gold = 0.98 }
		pillage_score = { gold = 1 }
	}
	additional_return_on_investment = 0.03
}

small_castle =
{
	cost = { gold = 500 prestige = 0 piety = 0 }
	construction_time = 36
	required_province_improvements = { hill_fort = yes }
	required_advances = { small_castle = yes }
	upgradeable = yes 

	onetime_bonus = { prestige = 25 }

	lasting_effects =
	{
		supportable = 500
		percentage_score = { gold = 0.98 }
		pillage_score = { gold = 1 }
	}
	additional_return_on_investment = 0.03
}

medium_castle =
{
	cost = { gold = 1500 prestige = 0 piety = 0 }
	construction_time = 60
	required_province_improvements = { small_castle = yes }
	required_advances = { medium_castle = yes }
	upgradeable = yes 

	onetime_bonus = { prestige = 50 }

	lasting_effects =
	{
		supportable = 1000
		periodic_loyalty = { nobles = 0.002 }
		percentage_score = { gold = 0.97 }
		pillage_score = { gold = 1 }
	}
	additional_return_on_investment = 0.04
}

large_castle =
{
	cost = { gold = 3000 prestige = 0 piety = 0 }
	construction_time = 84
	required_province_improvements = { medium_castle = yes }
	required_advances = { large_castle = yes }
	upgradeable = yes 

	onetime_bonus = { prestige = 75 }

	lasting_effects =
	{
		supportable = 2500
		periodic_loyalty = { nobles = 0.002 }
		percentage_score = { gold = 0.97 }
		pillage_score = { gold = 1 }
	}
	additional_return_on_investment = 0.04
}

huge_castle =
{
	cost = { gold = 5000 prestige = 0 piety = 0 }
	construction_time = 120
	required_province_improvements = { large_castle = yes }
	required_advances = { huge_castle = yes }

	onetime_bonus = { prestige = 150 }

	lasting_effects =
	{
		supportable = 10000
		periodic_loyalty = { nobles = 0.003 }
		percentage_score = { gold = 0.95 }
		periodic_score = { prestige = 1 }
		pillage_score = { gold = 1 }
	}
	mountain = no #note that attrition will make a large castele pretty nasty in these lands anyway
	march = no
	desert = no
	additional_return_on_investment = 0.06
}

thieves_guild =
{
	lasting_effects =
	{
		percentage_score = { gold = 0.75 }
		percentage_score = { prestige = 0.98 }
		percentage_assasination_success = 1.5
		pillage_score = { gold = -5 }
	}
		mountain = no
		hills = no
		forest = no
		plains = no
		march = no
		desert = no

}

smugglers_ring =
{
	lasting_effects =
	{
		percentage_score = { gold = 0.75 }
		percentage_score = { prestige = 0.98 }
		periodic_loyalty = { peasants = -0.002 }
		pillage_score = { gold = -5 }
	}
		mountain = no
		hills = no
		forest = no
		plains = no
		march = no
		desert = no

}

highway_robber_band =
{
	lasting_effects =
	{
		percentage_score = { gold = 0.75 }
		percentage_score = { prestige = 0.98 }
		periodic_loyalty = { burghers = -0.002 }
		attrition = 0.02 # 2% extra attrition
		pillage_score = { gold = -5 }
	}
		mountain = no
		hills = no
		forest = no
		plains = no
		march = no
		desert = no

}