@EarlyRepeatableTechCost = 50000
@EarlyRepeatableTechLevelCost = 5000
@EarlyRepatableTechFactor = 0.5
@RepeatableCategoryFactor = 0.01
@RepeatableDifferntFactor = 0.05
@EarlyRepeatableWeight = 12.5
@EarlyRepeatableTier = 5
@SpecializationPenalty = 0.6
@SpecializationLevel = 0.75

tech_repeatable_improved_tile_food_output = {
	area = society
	cost = @EarlyRepeatableTechCost
	cost_per_level = @EarlyRepeatableTechLevelCost
	tier = @EarlyRepeatableTier
	category = { biology }
	levels = -1
	prerequisites = { "tech_colonization_4" }
	weight = @EarlyRepeatableWeight
	
	weight_modifier = {
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_food_output value > 0 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_food_output value > 1 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_food_output value > 2 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_food_output value > 3 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_food_output value > 4 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_food_output value > 5 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_food_output value > 6 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_food_output value > 7 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_food_output value > 8 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_food_output value > 9 }
		}
	} 
	
	ai_weight = {
		factor = 1.0
	}
	
	weight_groups = {
		production_repeatable
	}
	mod_weight_if_group_picked = {
		production_repeatable = @RepeatableCategoryFactor
    }
    mod_weight_if_group_picked = {
		ship_repeatable = @RepeatableDifferntFactor
	}

	modifier = {
		planet_jobs_food_produces_mult = 0.05
	}
}

tech_repeatable_improved_core_system_cap = {
	area = society
	cost = @EarlyRepeatableTechCost
	cost_per_level = @EarlyRepeatableTechLevelCost
	tier = @EarlyRepeatableTier
	category = { new_worlds }
	levels = -1
	prerequisites = { "tech_galactic_bureaucracy" }
	weight = @EarlyRepeatableWeight
	
	weight_modifier = {
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_admin_cap value > 0 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_admin_cap value > 1 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_admin_cap value > 2 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_admin_cap value > 3 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_admin_cap value > 4 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_admin_cap value > 5 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_admin_cap value > 6 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_admin_cap value > 7 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_admin_cap value > 8 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_admin_cap value > 9 }
		}

	} 
	
	ai_weight = {
		factor = 1.0
	}
	
	weight_groups = {
		production_repeatable
	}
	mod_weight_if_group_picked = {
		production_repeatable = @RepeatableCategoryFactor
    }
    mod_weight_if_group_picked = {
		ship_repeatable = @RepeatableDifferntFactor
	}

	modifier = {
		country_unity_produces_mult = 0.05
	}
}

# tech_repeatable_improved_edict_length = {
# 	area = society
# 	cost = @EarlyRepeatableTechCost
# 	cost_per_level = @EarlyRepeatableTechLevelCost
# 	tier = @EarlyRepeatableTier
# 	category = { statecraft }
# 	levels = -1
# 	prerequisites = { "tech_galactic_administration" }
# 	weight = @EarlyRepeatableWeight
	
# 	weight_modifier = {
# 		modifier = {
# 			factor = @EarlyRepatableTechFactor
# 			check_variable = { which = repeatable_editct_length value > 0 }
# 		}
# 		modifier = {
# 			factor = @EarlyRepatableTechFactor
# 			check_variable = { which = repeatable_editct_length value > 1 }
# 		}
# 		modifier = {
# 			factor = @EarlyRepatableTechFactor
# 			check_variable = { which = repeatable_editct_length value > 2 }
# 		}
# 		modifier = {
# 			factor = @EarlyRepatableTechFactor
# 			check_variable = { which = repeatable_editct_length value > 3 }
# 		}
# 		modifier = {
# 			factor = @EarlyRepatableTechFactor
# 			check_variable = { which = repeatable_editct_length value > 4 }
# 		}
# 		modifier = {
# 			factor = @EarlyRepatableTechFactor
# 			check_variable = { which = repeatable_editct_length value > 5 }
# 		}
# 		modifier = {
# 			factor = @EarlyRepatableTechFactor
# 			check_variable = { which = repeatable_editct_length value > 6 }
# 		}
# 		modifier = {
# 			factor = @EarlyRepatableTechFactor
# 			check_variable = { which = repeatable_editct_length value > 7 }
# 		}
# 		modifier = {
# 			factor = @EarlyRepatableTechFactor
# 			check_variable = { which = repeatable_editct_length value > 8 }
# 		}
# 		modifier = {
# 			factor = @EarlyRepatableTechFactor
# 			check_variable = { which = repeatable_editct_length value > 9 }
# 		}
# 	} 
	
# 	ai_weight = {
# 		factor = 1.0
# 	}
	
# 	weight_groups = {
# 		production_repeatable
# 	}
# 	mod_weight_if_group_picked = {
# 		production_repeatable = @RepeatableCategoryFactor
#     }
#     mod_weight_if_group_picked = {
# 		ship_repeatable = @RepeatableDifferntFactor
# 	}

# 	modifier = {
# 		edict_length_mult = 0.1
# 	}
# }

tech_repeatable_improved_army_damage = {
	area = society
	cost = @EarlyRepeatableTechCost
	cost_per_level = @EarlyRepeatableTechLevelCost
	tier = @EarlyRepeatableTier
	category = { military_theory }
	levels = -1
	prerequisites = { "tech_combat_training" }
	weight = @EarlyRepeatableWeight
	
	weight_modifier = {
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_damage value > 0 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_damage value > 1 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_damage value > 2 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_damage value > 3 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_damage value > 4 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_damage value > 5 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_damage value > 6 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_damage value > 7 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_damage value > 8 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_damage value > 9 }
		}
	} 
	
	ai_weight = {
		factor = 1.0
	}
	
	weight_groups = {
		ship_repeatable
	}
	mod_weight_if_group_picked = {
		ship_repeatable = @RepeatableCategoryFactor
    }	
    mod_weight_if_group_picked = {
		production_repeatable = @RepeatableDifferntFactor
	}
	
	modifier = {
		army_damage_mult = 0.1
	}
}

tech_repeatable_improved_army_health = {
	area = society
	cost = @EarlyRepeatableTechCost
	cost_per_level = @EarlyRepeatableTechLevelCost
	tier = @EarlyRepeatableTier
	category = { military_theory }
	levels = -1
	prerequisites = { "tech_combat_training" }
	weight = @EarlyRepeatableWeight
	
	weight_modifier = {
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_health value > 0 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_health value > 1 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_health value > 2 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_health value > 3 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_health value > 4 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_health value > 5 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_health value > 6 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_health value > 7 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_health value > 8 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_army_health value > 9 }
		}
	} 
	
	ai_weight = {
		factor = 1.0
	}
	
	weight_groups = {
		ship_repeatable
	}
	mod_weight_if_group_picked = {
		ship_repeatable = @RepeatableCategoryFactor
    }	
    mod_weight_if_group_picked = {
		production_repeatable = @RepeatableDifferntFactor
	}
	
	modifier = {
		army_health = 0.1
	}
}

tech_repeatable_improved_leader_life_span = {
	area = society
	cost = @EarlyRepeatableTechCost
	cost_per_level = @EarlyRepeatableTechLevelCost
	tier = @EarlyRepeatableTier
	category = { biology }
	levels = -1
	prerequisites = { "tech_gene_tailoring" }
	weight = @EarlyRepeatableWeight
	
	weight_modifier = {
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_life_span value > 0 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_life_span value > 1 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_life_span value > 2 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_life_span value > 3 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_life_span value > 4 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_life_span value > 5 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_life_span value > 6 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_life_span value > 7 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_life_span value > 8 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_life_span value > 9 }
		}
	} 
	
	ai_weight = {
		factor = 1.0
	}
	
	weight_groups = {
		production_repeatable
	}
	mod_weight_if_group_picked = {
		production_repeatable = @RepeatableCategoryFactor
    }
    mod_weight_if_group_picked = {
		ship_repeatable = @RepeatableDifferntFactor
	}

	modifier = {
		leader_lifespan_add = 5
	}
}

tech_repeatable_naval_cap = {
	area = society
	cost = @EarlyRepeatableTechCost
	cost_per_level = @EarlyRepeatableTechLevelCost
	tier = @EarlyRepeatableTier
	category = { military_theory }
	levels = 5
	prerequisites = { "tech_doctrine_navy_size_4" }
	weight = @EarlyRepeatableWeight
	
	weight_modifier = {
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_naval_cap value > 0 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_naval_cap value > 1 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_naval_cap value > 2 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_naval_cap value > 3 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_naval_cap value > 4 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_naval_cap value > 5 }
		}
	} 
	
	ai_weight = {
		factor = 1.0
	}
	
	weight_groups = {
		ship_repeatable
	}
	mod_weight_if_group_picked = {
		ship_repeatable = @RepeatableCategoryFactor
    }	
    mod_weight_if_group_picked = {
		production_repeatable = @RepeatableDifferntFactor
	}
	
	modifier = {
		country_naval_cap_add = 20		
	}
}

tech_repeatable_command_limit = {
	area = society
	cost = @EarlyRepeatableTechCost
	cost_per_level = @EarlyRepeatableTechLevelCost
	tier = @EarlyRepeatableTier
	category = { military_theory }
	levels = 5
	prerequisites = { "tech_doctrine_fleet_size_5" }
	weight = @EarlyRepeatableWeight
	
	weight_modifier = {
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_command_limit value > 0 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_command_limit value > 1 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_command_limit value > 2 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_command_limit value > 3 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_command_limit value > 4 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_command_limit value > 5 }
		}
	} 
	
	ai_weight = {
		factor = 1.0
	}
	
	weight_groups = {
		ship_repeatable
	}
	mod_weight_if_group_picked = {
		ship_repeatable = @RepeatableCategoryFactor
    }	
    mod_weight_if_group_picked = {
		production_repeatable = @RepeatableDifferntFactor
	}
	
	modifier = {
		command_limit_add = 10		
	}
}


tech_repeatable_improved_starbase_capacity = {
	area = society
	cost = @EarlyRepeatableTechCost
	cost_per_level = @EarlyRepeatableTechLevelCost
	tier = @EarlyRepeatableTier
	category = { new_worlds }
	levels = 5
	prerequisites = { "tech_galactic_ambitions" }
	weight = @EarlyRepeatableWeight
	
	weight_modifier = {
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_starbase_cap value > 0 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_starbase_cap value > 1 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_starbase_cap value > 2 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_starbase_cap value > 3 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_starbase_cap value > 4 }
		}
		modifier = {
			factor = @EarlyRepatableTechFactor
			check_variable = { which = repeatable_starbase_cap value > 5 }
		}
	} 
	
	ai_weight = {
		factor = 1.0
	}
	
	weight_groups = {
		ship_repeatable
	}
	mod_weight_if_group_picked = {
		ship_repeatable = @RepeatableCategoryFactor
    }	
    mod_weight_if_group_picked = {
		production_repeatable = @RepeatableDifferntFactor
	}
	
	modifier = {
		country_starbase_capacity_add = 1
	}
}
