@terraforming_tier_1 = 5000 
@terraforming_tier_2 = 10000 
@terraforming_tier_3 = 20000 

##################Tier1#############
terraform_link = {
	from = ideal_world
	to = pc_desert
	resources = { category = terraforming cost = { energy = @terraforming_tier_1 } }
	duration = 2000
	condition = { has_technology = tech_perfect_pleace }
	ai_weight = { weight = 0 }
}
#######################################Tier2###############################################
###########Science world
terraform_link = {
	from = ideal_world
	to = ideal_science_world
	resources = { category = terraforming cost = { nanites = @terraforming_tier_2 } }
	duration = 2000
	condition = { has_technology = tech_ideal_lab }
	ai_weight = { weight = 0 }
}
###############City world
terraform_link = {
	from = ideal_world
	to = ideal_city_world
	resources = { category = terraforming cost = { nanites = @terraforming_tier_2 } }
	duration = 2000
	condition = { has_technology = tech_ideal_city }
	ai_weight = { weight = 0 }
}
###############Factory world
terraform_link = {
	from = ideal_world
	to = ideal_factory_world
	resources = { category = terraforming cost = { nanites = @terraforming_tier_2 } }
	duration = 2000
	condition = { has_technology = tech_ideal_factory }
	ai_weight = { weight = 0 }
}
###############Fortress World
terraform_link = {
	from = ideal_world
	to = ideal_fortress_world
	resources = { category = terraforming cost = { nanites = @terraforming_tier_2 } }
	duration = 2000
	condition = { has_technology = tech_ideal_fortress }
	ai_weight = { weight = 0 }
}
###############Resource World
terraform_link = {
	from = ideal_world
	to = ideal_resource_world
	resources = { category = terraforming cost = { nanites = @terraforming_tier_2 } }
	duration = 2000
	condition = { has_technology = tech_ideal_resource }
	ai_weight = { weight = 0 }
}
###############Hive/Machine replication world
terraform_link = {
	from = ideal_world
	to = ideal_hive_world
	resources = { category = terraforming cost = { nanites = @terraforming_tier_2 } }
	duration = 2000
	condition = { has_technology = tech_ideal_hive }
	ai_weight = { weight = 0 }
}
###################
#######RINGWORLDS##
###################
terraform_link = {
	from = lea_ringworld_basic_mhf
	to = pc_ringworld_habitable
	resources = { category = terraforming cost = { nanites = @terraforming_tier_1 } }
	duration = 3000
	condition = { has_technology = tech_ideal_ringworld }
	ai_weight = { weight = 0 }
}
########################Science Ring
terraform_link = {
	from = lea_ringworld_basic_mhf
	to = lea_ringworld_advanced_science_mhf
	resources = { category = terraforming cost = { nanites = @terraforming_tier_3 } }
	duration = 4000
	condition = { has_technology = tech_ideal_ringworld_second }
	ai_weight = { weight = 0 }
}
########################City Ring
terraform_link = {
	from = lea_ringworld_basic_mhf
	to = lea_ringworld_advanced_city_mhf
	resources = { category = terraforming cost = { nanites = @terraforming_tier_3 } }
	duration = 4000
	condition = { 
		has_technology = tech_ideal_ringworld 
		owner = { is_gestalt = no }
	}
	ai_weight = { weight = 0 }
}

########################Factory Ring
terraform_link = {
	from = lea_ringworld_basic_mhf
	to = lea_ringworld_advanced_factory_mhf
	resources = { category = terraforming cost = { nanites = @terraforming_tier_3 } }
	duration = 4000
	condition = { has_technology = tech_ideal_ringworld_second }
	ai_weight = { weight = 0 }
}
########################Resource Ring
terraform_link = {
	from = lea_ringworld_basic_mhf
	to = lea_ringworld_advanced_resource_mhf
	resources = { category = terraforming cost = { nanites = @terraforming_tier_3 } }
	duration = 4000
	condition = { has_technology = tech_ideal_ringworld_second }
	ai_weight = { weight = 0 }
}

terraform_link = {
	from = lea_ringworld_basic_mhf
	to = lea_ringworld_advanced_fortress_mhf
	resources = { category = terraforming cost = { nanites = @terraforming_tier_3 } }
	duration = 4000
	condition = { has_technology = tech_ideal_ringworld_second }
	ai_weight = { weight = 0 }
}
########################Hive Ring
terraform_link = {
	from = lea_ringworld_basic_mhf
	to = lea_ringworld_advanced_hive_mhf
	resources = { category = terraforming cost = { nanites = @terraforming_tier_3 } }
	duration = 4000
	condition = { 
		has_technology = tech_ideal_ringworld 
		owner = { is_gestalt = yes }
	}
	ai_weight = { weight = 0 }
}


######Barren to frozen
terraform_link = {
	from = pc_barren
	to = pc_arctic
	resources = { category = terraforming cost = { energy = 50000 } }
	duration = 1000
	condition = { 
		has_technology = tech_terraforming_barren_to_frozen
	}
	ai_weight = { weight = 0 }
}

terraform_link = {
	from = pc_barren_cold
	to = pc_arctic
	resources = { category = terraforming cost = { energy = 50000 } }
	duration = 1000
	condition = { 
		has_technology = tech_terraforming_barren_to_frozen
	}
	ai_weight = { weight = 0 }
}