###################
# Building Values #
###################

# Beware, this file is full of MATH!

###################
# Values to edit! #
###################

# These values control things like how building modifiers scale.
# You shouldn't have to change more than a few numbers to affect every single building in the game!

#######
# Tax #
#######

# Base
@poor_tax_base = 0.45
@normal_tax_base = 0.55
@good_tax_base = 0.15
@excellent_tax_base = 0.25

@copper_mine_tax_base = 3
@silver_mine_tax_base = 5
@special_mine_tax_base = 7

# We have four 'tax classes', each one has a better scale than the others.
@poor_tax_scale_addition_per_tier = 0.25
@normal_tax_scale_addition_per_tier = 0.4
@good_tax_scale_addition_per_tier = 0.6
@excellent_tax_scale_addition_per_tier = 0.55

@copper_mine_tax_scale_addition_per_tier = 2
@silver_mine_tax_scale_addition_per_tier = 3
@special_mine_tax_scale_addition_per_tier = 4

########
# Levy #
########

# Base
@poor_levy_base = 50
@small_levy_base = 75
@normal_levy_base = 100
@good_levy_base = 125
@excellent_levy_base = 150

# Scaling Increase
@poor_levy_scale_addition_per_tier = 25
@small_levy_scale_addition_per_tier = 50
@normal_levy_scale_addition_per_tier = 75
@good_levy_scale_addition_per_tier = 100
@excellent_levy_scale_addition_per_tier = 125

############
# Garrison #
############

# Base
@normal_garrison_base = 150
@good_garrison_base = 250

# Scaling Increase
@normal_garrison_scale_addition_per_tier = 150
@good_garrison_scale_addition_per_tier = 250

###############
# Fort Levels #
###############

# Base
@normal_fort_level_base = 1
@good_fort_level_base = 2
@great_fort_level_base = 1

# Scaling Increase
@normal_fort_level_scale_addition_per_tier = 1
@good_fort_level_scale_addition_per_tier = 2
@great_fort_level_scale_addition_per_tier = 3

##############
# Advantage  #
##############

# Base
@normal_advantage_base = 2
@good_advantage_base = 3

# Scaling Increase
@normal_advantage_scale_addition_per_tier = 2
@good_advantage_scale_addition_per_tier = 3


#################
# Building Cost #
#################

@cheap_cost_base = 25
@normal_cost_base = 50
@expensive_cost_base = 75
@main_cost_base = 100
@tribal_cost_base = 50

# We have four 'building cost classes', each one has a better scale than the others.
@cheap_cost_scale_addition_per_tier = 5
@normal_cost_scale_addition_per_tier = 10
@expensive_cost_scale_addition_per_tier = 15
@main_cost_scale_addition_per_tier = 20
@tribal_cost_scale_addition_per_tier = 10

#####################
# Construction Time #
#####################

# Base
@very_quick_construction_time_base = 250
@quick_construction_time_base = 350
@standard_construction_time_base = 450
@slow_construction_time_base = 550
@very_slow_construction_time_base = 650

#####################
# Build Speed Bonus #
#####################

# Base
@normal_build_speed_base = -0.01
@good_build_speed_base = -0.02
@great_build_speed_base = -0.03

# Scaling Increase
@normal_build_speed_scale_addition_per_tier = -0.01
@good_build_speed_scale_addition_per_tier = -0.02
@great_build_speed_scale_addition_per_tier = -0.03

###########################################################################################
# Nothing below this line should need to be edited if you want to change building balance #
###########################################################################################

@poor_tax_tier_1 = @[poor_tax_base]
@poor_tax_tier_2 = @[poor_tax_tier_1 + poor_tax_scale_addition_per_tier]
@poor_tax_tier_3 = @[poor_tax_tier_2 + poor_tax_scale_addition_per_tier]
@poor_tax_tier_4 = @[poor_tax_tier_3 + poor_tax_scale_addition_per_tier]
@poor_tax_tier_5 = @[poor_tax_tier_4 + poor_tax_scale_addition_per_tier]
@poor_tax_tier_6 = @[poor_tax_tier_5 + poor_tax_scale_addition_per_tier]
@poor_tax_tier_7 = @[poor_tax_tier_6 + poor_tax_scale_addition_per_tier]
@poor_tax_tier_8 = @[poor_tax_tier_7 + poor_tax_scale_addition_per_tier]

@normal_tax_tier_1 = @[normal_tax_base]
@normal_tax_tier_2 = @[normal_tax_tier_1 + normal_tax_scale_addition_per_tier]
@normal_tax_tier_3 = @[normal_tax_tier_2 + normal_tax_scale_addition_per_tier]
@normal_tax_tier_4 = @[normal_tax_tier_3 + normal_tax_scale_addition_per_tier]
@normal_tax_tier_5 = @[normal_tax_tier_4 + normal_tax_scale_addition_per_tier]
@normal_tax_tier_6 = @[normal_tax_tier_5 + normal_tax_scale_addition_per_tier]
@normal_tax_tier_7 = @[normal_tax_tier_6 + normal_tax_scale_addition_per_tier]
@normal_tax_tier_8 = @[normal_tax_tier_7 + normal_tax_scale_addition_per_tier]

@good_tax_tier_1 = @[good_tax_base]
@good_tax_tier_2 = @[good_tax_tier_1 + good_tax_scale_addition_per_tier]
@good_tax_tier_3 = @[good_tax_tier_2 + good_tax_scale_addition_per_tier]
@good_tax_tier_4 = @[good_tax_tier_3 + good_tax_scale_addition_per_tier]
@good_tax_tier_5 = @[good_tax_tier_4 + good_tax_scale_addition_per_tier]
@good_tax_tier_6 = @[good_tax_tier_5 + good_tax_scale_addition_per_tier]
@good_tax_tier_7 = @[good_tax_tier_6 + good_tax_scale_addition_per_tier]
@good_tax_tier_8 = @[good_tax_tier_7 + good_tax_scale_addition_per_tier]

@excellent_tax_tier_1 = @[excellent_tax_base]
@excellent_tax_tier_2 = @[excellent_tax_tier_1 + excellent_tax_scale_addition_per_tier]
@excellent_tax_tier_3 = @[excellent_tax_tier_2 + excellent_tax_scale_addition_per_tier]
@excellent_tax_tier_4 = @[excellent_tax_tier_3 + excellent_tax_scale_addition_per_tier]
@excellent_tax_tier_5 = @[excellent_tax_tier_4 + excellent_tax_scale_addition_per_tier]
@excellent_tax_tier_6 = @[excellent_tax_tier_5 + excellent_tax_scale_addition_per_tier]
@excellent_tax_tier_7 = @[excellent_tax_tier_6 + excellent_tax_scale_addition_per_tier]
@excellent_tax_tier_8 = @[excellent_tax_tier_7 + excellent_tax_scale_addition_per_tier]

@special_mine_tax_tier_1 = @[special_mine_tax_base]
@special_mine_tax_tier_2 = @[special_mine_tax_tier_1 + special_mine_tax_scale_addition_per_tier]
@special_mine_tax_tier_3 = @[special_mine_tax_tier_2 + special_mine_tax_scale_addition_per_tier]
@special_mine_tax_tier_4 = @[special_mine_tax_tier_3 + special_mine_tax_scale_addition_per_tier]
@special_mine_tax_tier_5 = @[special_mine_tax_tier_4 + special_mine_tax_scale_addition_per_tier]
@special_mine_tax_tier_6 = @[special_mine_tax_tier_5 + special_mine_tax_scale_addition_per_tier]
@special_mine_tax_tier_7 = @[special_mine_tax_tier_6 + special_mine_tax_scale_addition_per_tier]
@special_mine_tax_tier_8 = @[special_mine_tax_tier_7 + special_mine_tax_scale_addition_per_tier]

@copper_mine_tax_tier_1 = @[copper_mine_tax_base]
@copper_mine_tax_tier_2 = @[copper_mine_tax_tier_1 + copper_mine_tax_scale_addition_per_tier]
@copper_mine_tax_tier_3 = @[copper_mine_tax_tier_2 + copper_mine_tax_scale_addition_per_tier]
@copper_mine_tax_tier_4 = @[copper_mine_tax_tier_3 + copper_mine_tax_scale_addition_per_tier]
@copper_mine_tax_tier_5 = @[copper_mine_tax_tier_4 + copper_mine_tax_scale_addition_per_tier]
@copper_mine_tax_tier_6 = @[copper_mine_tax_tier_5 + copper_mine_tax_scale_addition_per_tier]
@copper_mine_tax_tier_7 = @[copper_mine_tax_tier_6 + copper_mine_tax_scale_addition_per_tier]
@copper_mine_tax_tier_8 = @[copper_mine_tax_tier_7 + copper_mine_tax_scale_addition_per_tier]

@silver_mine_tax_tier_1 = @[silver_mine_tax_base]
@silver_mine_tax_tier_2 = @[silver_mine_tax_tier_1 + silver_mine_tax_scale_addition_per_tier]
@silver_mine_tax_tier_3 = @[silver_mine_tax_tier_2 + silver_mine_tax_scale_addition_per_tier]
@silver_mine_tax_tier_4 = @[silver_mine_tax_tier_3 + silver_mine_tax_scale_addition_per_tier]
@silver_mine_tax_tier_5 = @[silver_mine_tax_tier_4 + silver_mine_tax_scale_addition_per_tier]
@silver_mine_tax_tier_6 = @[silver_mine_tax_tier_5 + silver_mine_tax_scale_addition_per_tier]
@silver_mine_tax_tier_7 = @[silver_mine_tax_tier_6 + silver_mine_tax_scale_addition_per_tier]
@silver_mine_tax_tier_8 = @[silver_mine_tax_tier_7 + silver_mine_tax_scale_addition_per_tier]

@poor_levy_tier_1 = @[poor_levy_base]
@poor_levy_tier_2 = @[poor_levy_tier_1 + poor_levy_scale_addition_per_tier]
@poor_levy_tier_3 = @[poor_levy_tier_2 + poor_levy_scale_addition_per_tier]
@poor_levy_tier_4 = @[poor_levy_tier_3 + poor_levy_scale_addition_per_tier]
@poor_levy_tier_5 = @[poor_levy_tier_4 + poor_levy_scale_addition_per_tier]
@poor_levy_tier_6 = @[poor_levy_tier_5 + poor_levy_scale_addition_per_tier]
@poor_levy_tier_7 = @[poor_levy_tier_6 + poor_levy_scale_addition_per_tier]
@poor_levy_tier_8 = @[poor_levy_tier_7 + poor_levy_scale_addition_per_tier]

@small_levy_tier_1 = @[small_levy_base]
@small_levy_tier_2 = @[small_levy_tier_1 + small_levy_scale_addition_per_tier]
@small_levy_tier_3 = @[small_levy_tier_2 + small_levy_scale_addition_per_tier]
@small_levy_tier_4 = @[small_levy_tier_3 + small_levy_scale_addition_per_tier]
@small_levy_tier_5 = @[small_levy_tier_4 + small_levy_scale_addition_per_tier]
@small_levy_tier_6 = @[small_levy_tier_5 + small_levy_scale_addition_per_tier]
@small_levy_tier_7 = @[small_levy_tier_6 + small_levy_scale_addition_per_tier]
@small_levy_tier_8 = @[small_levy_tier_7 + small_levy_scale_addition_per_tier]

@normal_levy_tier_1 = @[normal_levy_base]
@normal_levy_tier_2 = @[normal_levy_tier_1 + normal_levy_scale_addition_per_tier]
@normal_levy_tier_3 = @[normal_levy_tier_2 + normal_levy_scale_addition_per_tier]
@normal_levy_tier_4 = @[normal_levy_tier_3 + normal_levy_scale_addition_per_tier]
@normal_levy_tier_5 = @[normal_levy_tier_4 + normal_levy_scale_addition_per_tier]
@normal_levy_tier_6 = @[normal_levy_tier_5 + normal_levy_scale_addition_per_tier]
@normal_levy_tier_7 = @[normal_levy_tier_6 + normal_levy_scale_addition_per_tier]
@normal_levy_tier_8 = @[normal_levy_tier_7 + normal_levy_scale_addition_per_tier]

@good_levy_tier_1 = @[good_levy_base]
@good_levy_tier_2 = @[good_levy_tier_1 + good_levy_scale_addition_per_tier]
@good_levy_tier_3 = @[good_levy_tier_2 + good_levy_scale_addition_per_tier]
@good_levy_tier_4 = @[good_levy_tier_3 + good_levy_scale_addition_per_tier]
@good_levy_tier_5 = @[good_levy_tier_4 + good_levy_scale_addition_per_tier]
@good_levy_tier_6 = @[good_levy_tier_5 + good_levy_scale_addition_per_tier]
@good_levy_tier_7 = @[good_levy_tier_6 + good_levy_scale_addition_per_tier]
@good_levy_tier_8 = @[good_levy_tier_7 + good_levy_scale_addition_per_tier]

@excellent_levy_tier_1 = @[excellent_levy_base]
@excellent_levy_tier_2 = @[excellent_levy_tier_1 + excellent_levy_scale_addition_per_tier]
@excellent_levy_tier_3 = @[excellent_levy_tier_2 + excellent_levy_scale_addition_per_tier]
@excellent_levy_tier_4 = @[excellent_levy_tier_3 + excellent_levy_scale_addition_per_tier]
@excellent_levy_tier_5 = @[excellent_levy_tier_4 + excellent_levy_scale_addition_per_tier]
@excellent_levy_tier_6 = @[excellent_levy_tier_5 + excellent_levy_scale_addition_per_tier]
@excellent_levy_tier_7 = @[excellent_levy_tier_6 + excellent_levy_scale_addition_per_tier]
@excellent_levy_tier_8 = @[excellent_levy_tier_7 + excellent_levy_scale_addition_per_tier]

@normal_garrison_tier_1 = @[normal_garrison_base]
@normal_garrison_tier_2 = @[normal_garrison_tier_1 + normal_garrison_scale_addition_per_tier]
@normal_garrison_tier_3 = @[normal_garrison_tier_2 + normal_garrison_scale_addition_per_tier]
@normal_garrison_tier_4 = @[normal_garrison_tier_3 + normal_garrison_scale_addition_per_tier]
@normal_garrison_tier_5 = @[normal_garrison_tier_4 + normal_garrison_scale_addition_per_tier]
@normal_garrison_tier_6 = @[normal_garrison_tier_5 + normal_garrison_scale_addition_per_tier]
@normal_garrison_tier_7 = @[normal_garrison_tier_6 + normal_garrison_scale_addition_per_tier]
@normal_garrison_tier_8 = @[normal_garrison_tier_7 + normal_garrison_scale_addition_per_tier]

@good_garrison_tier_1 = @[good_garrison_base]
@good_garrison_tier_2 = @[good_garrison_tier_1 + good_garrison_scale_addition_per_tier]
@good_garrison_tier_3 = @[good_garrison_tier_2 + good_garrison_scale_addition_per_tier]
@good_garrison_tier_4 = @[good_garrison_tier_3 + good_garrison_scale_addition_per_tier]
@good_garrison_tier_5 = @[good_garrison_tier_4 + good_garrison_scale_addition_per_tier]
@good_garrison_tier_6 = @[good_garrison_tier_5 + good_garrison_scale_addition_per_tier]
@good_garrison_tier_7 = @[good_garrison_tier_6 + good_garrison_scale_addition_per_tier]
@good_garrison_tier_8 = @[good_garrison_tier_7 + good_garrison_scale_addition_per_tier]

@normal_build_speed_tier_1 = @[normal_build_speed_base]
@normal_build_speed_tier_2 = @[normal_build_speed_tier_1 + normal_build_speed_scale_addition_per_tier]
@normal_build_speed_tier_3 = @[normal_build_speed_tier_2 + normal_build_speed_scale_addition_per_tier]
@normal_build_speed_tier_4 = @[normal_build_speed_tier_3 + normal_build_speed_scale_addition_per_tier]
@normal_build_speed_tier_5 = @[normal_build_speed_tier_4 + normal_build_speed_scale_addition_per_tier]
@normal_build_speed_tier_6 = @[normal_build_speed_tier_5 + normal_build_speed_scale_addition_per_tier]
@normal_build_speed_tier_7 = @[normal_build_speed_tier_6 + normal_build_speed_scale_addition_per_tier]
@normal_build_speed_tier_8 = @[normal_build_speed_tier_7 + normal_build_speed_scale_addition_per_tier]

@good_build_speed_tier_1 = @[good_build_speed_base]
@good_build_speed_tier_2 = @[good_build_speed_tier_1 + good_build_speed_scale_addition_per_tier]
@good_build_speed_tier_3 = @[good_build_speed_tier_2 + good_build_speed_scale_addition_per_tier]
@good_build_speed_tier_4 = @[good_build_speed_tier_3 + good_build_speed_scale_addition_per_tier]
@good_build_speed_tier_5 = @[good_build_speed_tier_4 + good_build_speed_scale_addition_per_tier]
@good_build_speed_tier_6 = @[good_build_speed_tier_5 + good_build_speed_scale_addition_per_tier]
@good_build_speed_tier_7 = @[good_build_speed_tier_6 + good_build_speed_scale_addition_per_tier]
@good_build_speed_tier_8 = @[good_build_speed_tier_7 + good_build_speed_scale_addition_per_tier]

@great_build_speed_tier_1 = @[great_build_speed_base]
@great_build_speed_tier_2 = @[great_build_speed_tier_1 + great_build_speed_scale_addition_per_tier]
@great_build_speed_tier_3 = @[great_build_speed_tier_2 + great_build_speed_scale_addition_per_tier]
@great_build_speed_tier_4 = @[great_build_speed_tier_3 + great_build_speed_scale_addition_per_tier]
@great_build_speed_tier_5 = @[great_build_speed_tier_4 + great_build_speed_scale_addition_per_tier]
@great_build_speed_tier_6 = @[great_build_speed_tier_5 + great_build_speed_scale_addition_per_tier]
@great_build_speed_tier_7 = @[great_build_speed_tier_6 + great_build_speed_scale_addition_per_tier]
@great_build_speed_tier_8 = @[great_build_speed_tier_7 + great_build_speed_scale_addition_per_tier]

@normal_fort_level_tier_1 = @[normal_fort_level_base]
@normal_fort_level_tier_2 = @[normal_fort_level_tier_1 + normal_fort_level_scale_addition_per_tier]
@normal_fort_level_tier_3 = @[normal_fort_level_tier_2 + normal_fort_level_scale_addition_per_tier]
@normal_fort_level_tier_4 = @[normal_fort_level_tier_3 + normal_fort_level_scale_addition_per_tier]
@normal_fort_level_tier_5 = @[normal_fort_level_tier_4 + normal_fort_level_scale_addition_per_tier]
@normal_fort_level_tier_6 = @[normal_fort_level_tier_5 + normal_fort_level_scale_addition_per_tier]
@normal_fort_level_tier_7 = @[normal_fort_level_tier_6 + normal_fort_level_scale_addition_per_tier]
@normal_fort_level_tier_8 = @[normal_fort_level_tier_7 + normal_fort_level_scale_addition_per_tier]

@good_fort_level_tier_1 = @[good_fort_level_base]
@good_fort_level_tier_2 = @[good_fort_level_tier_1 + good_fort_level_scale_addition_per_tier]
@good_fort_level_tier_3 = @[good_fort_level_tier_2 + good_fort_level_scale_addition_per_tier]
@good_fort_level_tier_4 = @[good_fort_level_tier_3 + good_fort_level_scale_addition_per_tier]
@good_fort_level_tier_5 = @[good_fort_level_tier_4 + good_fort_level_scale_addition_per_tier]
@good_fort_level_tier_6 = @[good_fort_level_tier_5 + good_fort_level_scale_addition_per_tier]
@good_fort_level_tier_7 = @[good_fort_level_tier_6 + good_fort_level_scale_addition_per_tier]
@good_fort_level_tier_8 = @[good_fort_level_tier_7 + good_fort_level_scale_addition_per_tier]

@great_fort_level_tier_1 = @[great_fort_level_base]
@great_fort_level_tier_2 = @[great_fort_level_tier_1 + great_fort_level_scale_addition_per_tier]
@great_fort_level_tier_3 = @[great_fort_level_tier_2 + great_fort_level_scale_addition_per_tier]
@great_fort_level_tier_4 = @[great_fort_level_tier_3 + great_fort_level_scale_addition_per_tier]
@great_fort_level_tier_5 = @[great_fort_level_tier_4 + great_fort_level_scale_addition_per_tier]
@great_fort_level_tier_6 = @[great_fort_level_tier_5 + great_fort_level_scale_addition_per_tier]
@great_fort_level_tier_7 = @[great_fort_level_tier_6 + great_fort_level_scale_addition_per_tier]
@great_fort_level_tier_8 = @[great_fort_level_tier_7 + great_fort_level_scale_addition_per_tier]

@normal_advantage_tier_1 = @[normal_advantage_base]
@normal_advantage_tier_2 = @[normal_advantage_tier_1 + normal_advantage_scale_addition_per_tier]
@normal_advantage_tier_3 = @[normal_advantage_tier_2 + normal_advantage_scale_addition_per_tier]
@normal_advantage_tier_4 = @[normal_advantage_tier_3 + normal_advantage_scale_addition_per_tier]
@normal_advantage_tier_5 = @[normal_advantage_tier_4 + normal_advantage_scale_addition_per_tier]
@normal_advantage_tier_6 = @[normal_advantage_tier_5 + normal_advantage_scale_addition_per_tier]
@normal_advantage_tier_7 = @[normal_advantage_tier_6 + normal_advantage_scale_addition_per_tier]
@normal_advantage_tier_8 = @[normal_advantage_tier_7 + normal_advantage_scale_addition_per_tier]

@good_advantage_tier_1 = @[good_advantage_base]
@good_advantage_tier_2 = @[good_advantage_tier_1 + good_advantage_scale_addition_per_tier]
@good_advantage_tier_3 = @[good_advantage_tier_2 + good_advantage_scale_addition_per_tier]
@good_advantage_tier_4 = @[good_advantage_tier_3 + good_advantage_scale_addition_per_tier]
@good_advantage_tier_5 = @[good_advantage_tier_4 + good_advantage_scale_addition_per_tier]
@good_advantage_tier_6 = @[good_advantage_tier_5 + good_advantage_scale_addition_per_tier]
@good_advantage_tier_7 = @[good_advantage_tier_6 + good_advantage_scale_addition_per_tier]
@good_advantage_tier_8 = @[good_advantage_tier_7 + good_advantage_scale_addition_per_tier]

@cheap_cost_tier_1 = @[cheap_cost_base]
@cheap_cost_tier_2 = @[cheap_cost_tier_1 + cheap_cost_scale_addition_per_tier]
@cheap_cost_tier_3 = @[cheap_cost_tier_2 + cheap_cost_scale_addition_per_tier]
@cheap_cost_tier_4 = @[cheap_cost_tier_3 + cheap_cost_scale_addition_per_tier]
@cheap_cost_tier_5 = @[cheap_cost_tier_4 + cheap_cost_scale_addition_per_tier]
@cheap_cost_tier_6 = @[cheap_cost_tier_5 + cheap_cost_scale_addition_per_tier]
@cheap_cost_tier_7 = @[cheap_cost_tier_6 + cheap_cost_scale_addition_per_tier]
@cheap_cost_tier_8 = @[cheap_cost_tier_7 + cheap_cost_scale_addition_per_tier]

@normal_cost_tier_1 = @[normal_cost_base]
@normal_cost_tier_2 = @[normal_cost_tier_1 + normal_cost_scale_addition_per_tier]
@normal_cost_tier_3 = @[normal_cost_tier_2 + normal_cost_scale_addition_per_tier]
@normal_cost_tier_4 = @[normal_cost_tier_3 + normal_cost_scale_addition_per_tier]
@normal_cost_tier_5 = @[normal_cost_tier_4 + normal_cost_scale_addition_per_tier]
@normal_cost_tier_6 = @[normal_cost_tier_5 + normal_cost_scale_addition_per_tier]
@normal_cost_tier_7 = @[normal_cost_tier_6 + normal_cost_scale_addition_per_tier]
@normal_cost_tier_8 = @[normal_cost_tier_7 + normal_cost_scale_addition_per_tier]

@expensive_cost_tier_1 = @[expensive_cost_base]
@expensive_cost_tier_2 = @[expensive_cost_tier_1 + expensive_cost_scale_addition_per_tier]
@expensive_cost_tier_3 = @[expensive_cost_tier_2 + expensive_cost_scale_addition_per_tier]
@expensive_cost_tier_4 = @[expensive_cost_tier_3 + expensive_cost_scale_addition_per_tier]
@expensive_cost_tier_5 = @[expensive_cost_tier_4 + expensive_cost_scale_addition_per_tier]
@expensive_cost_tier_6 = @[expensive_cost_tier_5 + expensive_cost_scale_addition_per_tier]
@expensive_cost_tier_7 = @[expensive_cost_tier_6 + expensive_cost_scale_addition_per_tier]
@expensive_cost_tier_8 = @[expensive_cost_tier_7 + expensive_cost_scale_addition_per_tier]

@main_cost_tier_1 = @[main_cost_base]
@main_cost_tier_2 = @[main_cost_tier_1 + main_cost_scale_addition_per_tier]
@main_cost_tier_3 = @[main_cost_tier_2 + main_cost_scale_addition_per_tier]
@main_cost_tier_4 = @[main_cost_tier_3 + main_cost_scale_addition_per_tier]
@main_cost_tier_5 = @[main_cost_tier_4 + main_cost_scale_addition_per_tier]

@tribal_cost_tier_1 = @[tribal_cost_base]
@tribal_cost_tier_2 = @[tribal_cost_tier_1 + tribal_cost_scale_addition_per_tier]

#################
# Building Cost #
#################

# Cheap Buildings
cheap_building_tier_1_cost = @[cheap_cost_tier_1]
cheap_building_tier_2_cost = @[cheap_cost_tier_2]
cheap_building_tier_3_cost = @[cheap_cost_tier_3]
cheap_building_tier_4_cost = @[cheap_cost_tier_4]
cheap_building_tier_5_cost = @[cheap_cost_tier_5]
cheap_building_tier_6_cost = @[cheap_cost_tier_6]
cheap_building_tier_7_cost = @[cheap_cost_tier_7]
cheap_building_tier_8_cost = @[cheap_cost_tier_8]

# Normal Buildings
normal_building_tier_1_cost = @[normal_cost_tier_1]
normal_building_tier_2_cost = @[normal_cost_tier_2]
normal_building_tier_3_cost = @[normal_cost_tier_3]
normal_building_tier_4_cost = @[normal_cost_tier_4]
normal_building_tier_5_cost = @[normal_cost_tier_5]
normal_building_tier_6_cost = @[normal_cost_tier_6]
normal_building_tier_7_cost = @[normal_cost_tier_7]
normal_building_tier_8_cost = @[normal_cost_tier_8]

# Expensive Buildings
expensive_building_tier_1_cost = @[expensive_cost_tier_1]
expensive_building_tier_2_cost = @[expensive_cost_tier_2]
expensive_building_tier_3_cost = @[expensive_cost_tier_3]
expensive_building_tier_4_cost = @[expensive_cost_tier_4]
expensive_building_tier_5_cost = @[expensive_cost_tier_5]
expensive_building_tier_6_cost = @[expensive_cost_tier_6]
expensive_building_tier_7_cost = @[expensive_cost_tier_7]
expensive_building_tier_8_cost = @[expensive_cost_tier_8]

# Main Buildings (Castle, Temple, City)
main_building_tier_1_cost = @[main_cost_tier_1]
main_building_tier_2_cost = @[main_cost_tier_2]
main_building_tier_3_cost = @[main_cost_tier_3]
main_building_tier_4_cost = @[main_cost_tier_4]

# Tribal Buildings
tribal_building_tier_1_cost = @[tribal_cost_tier_1]
tribal_building_tier_2_cost = @[tribal_cost_tier_2]

##############
# Tax Values #
##############

# Poor Tax
poor_building_tax_tier_1 = @[poor_tax_tier_1]
poor_building_tax_tier_2 = @[poor_tax_tier_2]
poor_building_tax_tier_3 = @[poor_tax_tier_3]
poor_building_tax_tier_4 = @[poor_tax_tier_4]
poor_building_tax_tier_5 = @[poor_tax_tier_5]
poor_building_tax_tier_6 = @[poor_tax_tier_6]
poor_building_tax_tier_7 = @[poor_tax_tier_7]
poor_building_tax_tier_8 = @[poor_tax_tier_8]

# Normal Tax
normal_building_tax_tier_1 = @[normal_tax_tier_1]
normal_building_tax_tier_2 = @[normal_tax_tier_2]
normal_building_tax_tier_3 = @[normal_tax_tier_3]
normal_building_tax_tier_4 = @[normal_tax_tier_4]
normal_building_tax_tier_5 = @[normal_tax_tier_5]
normal_building_tax_tier_6 = @[normal_tax_tier_6]
normal_building_tax_tier_7 = @[normal_tax_tier_7]
normal_building_tax_tier_8 = @[normal_tax_tier_8]

# Good Tax
good_building_tax_tier_1 = @[good_tax_tier_1]
good_building_tax_tier_2 = @[good_tax_tier_2]
good_building_tax_tier_3 = @[good_tax_tier_3]
good_building_tax_tier_4 = @[good_tax_tier_4]
good_building_tax_tier_5 = @[good_tax_tier_5]
good_building_tax_tier_6 = @[good_tax_tier_6]
good_building_tax_tier_7 = @[good_tax_tier_7]
good_building_tax_tier_8 = @[good_tax_tier_8]

# Excellent Tax
excellent_building_tax_tier_1 = @[excellent_tax_tier_1]
excellent_building_tax_tier_2 = @[excellent_tax_tier_2]
excellent_building_tax_tier_3 = @[excellent_tax_tier_3]
excellent_building_tax_tier_4 = @[excellent_tax_tier_4]
excellent_building_tax_tier_5 = @[excellent_tax_tier_5]
excellent_building_tax_tier_6 = @[excellent_tax_tier_6]
excellent_building_tax_tier_7 = @[excellent_tax_tier_7]
excellent_building_tax_tier_8 = @[excellent_tax_tier_8]

# Special Mine Tax, for unique buildings and such
special_mine_building_tax_tier_1 = @[special_mine_tax_tier_1]
special_mine_building_tax_tier_2 = @[special_mine_tax_tier_2]
special_mine_building_tax_tier_3 = @[special_mine_tax_tier_3]
special_mine_building_tax_tier_4 = @[special_mine_tax_tier_4]
special_mine_building_tax_tier_5 = @[special_mine_tax_tier_5]
special_mine_building_tax_tier_6 = @[special_mine_tax_tier_6]
special_mine_building_tax_tier_7 = @[special_mine_tax_tier_7]
special_mine_building_tax_tier_8 = @[special_mine_tax_tier_8]

copper_mine_building_tax_tier_1 = @[copper_mine_tax_tier_1]
copper_mine_building_tax_tier_2 = @[copper_mine_tax_tier_2]
copper_mine_building_tax_tier_3 = @[copper_mine_tax_tier_3]
copper_mine_building_tax_tier_4 = @[copper_mine_tax_tier_4]
copper_mine_building_tax_tier_5 = @[copper_mine_tax_tier_5]
copper_mine_building_tax_tier_6 = @[copper_mine_tax_tier_6]
copper_mine_building_tax_tier_7 = @[copper_mine_tax_tier_7]
copper_mine_building_tax_tier_8 = @[copper_mine_tax_tier_8]

silver_mine_building_tax_tier_1 = @[silver_mine_tax_tier_1]
silver_mine_building_tax_tier_2 = @[silver_mine_tax_tier_2]
silver_mine_building_tax_tier_3 = @[silver_mine_tax_tier_3]
silver_mine_building_tax_tier_4 = @[silver_mine_tax_tier_4]
silver_mine_building_tax_tier_5 = @[silver_mine_tax_tier_5]
silver_mine_building_tax_tier_6 = @[silver_mine_tax_tier_6]
silver_mine_building_tax_tier_7 = @[silver_mine_tax_tier_7]
silver_mine_building_tax_tier_8 = @[silver_mine_tax_tier_8]

###############
# Levy Values #
###############

# Poor levy
poor_building_levy_tier_1 = @[poor_levy_tier_1]
poor_building_levy_tier_2 = @[poor_levy_tier_2]
poor_building_levy_tier_3 = @[poor_levy_tier_3]
poor_building_levy_tier_4 = @[poor_levy_tier_4]
poor_building_levy_tier_5 = @[poor_levy_tier_5]
poor_building_levy_tier_6 = @[poor_levy_tier_6]
poor_building_levy_tier_7 = @[poor_levy_tier_7]
poor_building_levy_tier_8 = @[poor_levy_tier_8]

# small levy
small_building_levy_tier_1 = @[small_levy_tier_1]
small_building_levy_tier_2 = @[small_levy_tier_2]
small_building_levy_tier_3 = @[small_levy_tier_3]
small_building_levy_tier_4 = @[small_levy_tier_4]
small_building_levy_tier_5 = @[small_levy_tier_5]
small_building_levy_tier_6 = @[small_levy_tier_6]
small_building_levy_tier_7 = @[small_levy_tier_7]
small_building_levy_tier_8 = @[small_levy_tier_8]

# Normal levy
normal_building_levy_tier_1 = @[normal_levy_tier_1]
normal_building_levy_tier_2 = @[normal_levy_tier_2]
normal_building_levy_tier_3 = @[normal_levy_tier_3]
normal_building_levy_tier_4 = @[normal_levy_tier_4]
normal_building_levy_tier_5 = @[normal_levy_tier_5]
normal_building_levy_tier_6 = @[normal_levy_tier_6]
normal_building_levy_tier_7 = @[normal_levy_tier_7]
normal_building_levy_tier_8 = @[normal_levy_tier_8]

# Good levy
good_building_levy_tier_1 = @[good_levy_tier_1]
good_building_levy_tier_2 = @[good_levy_tier_2]
good_building_levy_tier_3 = @[good_levy_tier_3]
good_building_levy_tier_4 = @[good_levy_tier_4]
good_building_levy_tier_5 = @[good_levy_tier_5]
good_building_levy_tier_6 = @[good_levy_tier_6]
good_building_levy_tier_7 = @[good_levy_tier_7]
good_building_levy_tier_8 = @[good_levy_tier_8]

# Excellent levy
excellent_building_levy_tier_1 = @[excellent_levy_tier_1]
excellent_building_levy_tier_2 = @[excellent_levy_tier_2]
excellent_building_levy_tier_3 = @[excellent_levy_tier_3]
excellent_building_levy_tier_4 = @[excellent_levy_tier_4]
excellent_building_levy_tier_5 = @[excellent_levy_tier_5]
excellent_building_levy_tier_6 = @[excellent_levy_tier_6]
excellent_building_levy_tier_7 = @[excellent_levy_tier_7]
excellent_building_levy_tier_8 = @[excellent_levy_tier_8]

###################
# Garrison Values #
###################

# Normal garrison
normal_building_garrison_tier_1 = @[normal_garrison_tier_1]
normal_building_garrison_tier_2 = @[normal_garrison_tier_2]
normal_building_garrison_tier_3 = @[normal_garrison_tier_3]
normal_building_garrison_tier_4 = @[normal_garrison_tier_4]
normal_building_garrison_tier_5 = @[normal_garrison_tier_5]
normal_building_garrison_tier_6 = @[normal_garrison_tier_6]
normal_building_garrison_tier_7 = @[normal_garrison_tier_7]
normal_building_garrison_tier_8 = @[normal_garrison_tier_8]

# Good garrison
good_building_garrison_tier_1 = @[good_garrison_tier_1]
good_building_garrison_tier_2 = @[good_garrison_tier_2]
good_building_garrison_tier_3 = @[good_garrison_tier_3]
good_building_garrison_tier_4 = @[good_garrison_tier_4]
good_building_garrison_tier_5 = @[good_garrison_tier_5]
good_building_garrison_tier_6 = @[good_garrison_tier_6]
good_building_garrison_tier_7 = @[good_garrison_tier_7]
good_building_garrison_tier_8 = @[good_garrison_tier_8]

######################
# Build Speed Values #
######################

# Normal build_speed
normal_building_build_speed_tier_1 = @[normal_build_speed_tier_1]
normal_building_build_speed_tier_2 = @[normal_build_speed_tier_2]
normal_building_build_speed_tier_3 = @[normal_build_speed_tier_3]
normal_building_build_speed_tier_4 = @[normal_build_speed_tier_4]
normal_building_build_speed_tier_5 = @[normal_build_speed_tier_5]
normal_building_build_speed_tier_6 = @[normal_build_speed_tier_6]
normal_building_build_speed_tier_7 = @[normal_build_speed_tier_7]
normal_building_build_speed_tier_8 = @[normal_build_speed_tier_8]

# Good build_speed
good_building_build_speed_tier_1 = @[good_build_speed_tier_1]
good_building_build_speed_tier_2 = @[good_build_speed_tier_2]
good_building_build_speed_tier_3 = @[good_build_speed_tier_3]
good_building_build_speed_tier_4 = @[good_build_speed_tier_4]
good_building_build_speed_tier_5 = @[good_build_speed_tier_5]
good_building_build_speed_tier_6 = @[good_build_speed_tier_6]
good_building_build_speed_tier_7 = @[good_build_speed_tier_7]
good_building_build_speed_tier_8 = @[good_build_speed_tier_8]

# Great build_speed
great_building_build_speed_tier_1 = @[great_build_speed_tier_1]
great_building_build_speed_tier_2 = @[great_build_speed_tier_2]
great_building_build_speed_tier_3 = @[great_build_speed_tier_3]
great_building_build_speed_tier_4 = @[great_build_speed_tier_4]
great_building_build_speed_tier_5 = @[great_build_speed_tier_5]
great_building_build_speed_tier_6 = @[great_build_speed_tier_6]
great_building_build_speed_tier_7 = @[great_build_speed_tier_7]
great_building_build_speed_tier_8 = @[great_build_speed_tier_8]

#####################
# Fort Level Values #
#####################

# Normal fort_level
normal_building_fort_level_tier_1 = @[normal_fort_level_tier_1]
normal_building_fort_level_tier_2 = @[normal_fort_level_tier_2]
normal_building_fort_level_tier_3 = @[normal_fort_level_tier_3]
normal_building_fort_level_tier_4 = @[normal_fort_level_tier_4]
normal_building_fort_level_tier_5 = @[normal_fort_level_tier_5]
normal_building_fort_level_tier_6 = @[normal_fort_level_tier_6]
normal_building_fort_level_tier_7 = @[normal_fort_level_tier_7]
normal_building_fort_level_tier_8 = @[normal_fort_level_tier_8]

# Good fort_level
good_building_fort_level_tier_1 = @[good_fort_level_tier_1]
good_building_fort_level_tier_2 = @[good_fort_level_tier_2]
good_building_fort_level_tier_3 = @[good_fort_level_tier_3]
good_building_fort_level_tier_4 = @[good_fort_level_tier_4]
good_building_fort_level_tier_5 = @[good_fort_level_tier_5]
good_building_fort_level_tier_6 = @[good_fort_level_tier_6]
good_building_fort_level_tier_7 = @[good_fort_level_tier_7]
good_building_fort_level_tier_8 = @[good_fort_level_tier_8]

# Great fort_level
great_building_fort_level_tier_1 = @[great_fort_level_tier_1]
great_building_fort_level_tier_2 = @[great_fort_level_tier_2]
great_building_fort_level_tier_3 = @[great_fort_level_tier_3]
great_building_fort_level_tier_4 = @[great_fort_level_tier_4]
great_building_fort_level_tier_5 = @[great_fort_level_tier_5]
great_building_fort_level_tier_6 = @[great_fort_level_tier_6]
great_building_fort_level_tier_7 = @[great_fort_level_tier_7]
great_building_fort_level_tier_8 = @[great_fort_level_tier_8]

#############
# Advantage #
#############

# Normal advantage
normal_building_advantage_tier_1 = @[normal_advantage_tier_1]
normal_building_advantage_tier_2 = @[normal_advantage_tier_2]
normal_building_advantage_tier_3 = @[normal_advantage_tier_3]
normal_building_advantage_tier_4 = @[normal_advantage_tier_4]
normal_building_advantage_tier_5 = @[normal_advantage_tier_5]
normal_building_advantage_tier_6 = @[normal_advantage_tier_6]
normal_building_advantage_tier_7 = @[normal_advantage_tier_7]
normal_building_advantage_tier_8 = @[normal_advantage_tier_8]

# Good advantage
good_building_advantage_tier_1 = @[good_advantage_tier_1]
good_building_advantage_tier_2 = @[good_advantage_tier_2]
good_building_advantage_tier_3 = @[good_advantage_tier_3]
good_building_advantage_tier_4 = @[good_advantage_tier_4]
good_building_advantage_tier_5 = @[good_advantage_tier_5]
good_building_advantage_tier_6 = @[good_advantage_tier_6]
good_building_advantage_tier_7 = @[good_advantage_tier_7]
good_building_advantage_tier_8 = @[good_advantage_tier_8]

#############################
# Construction Speed Values #
#############################

very_quick_construction_time = @[very_quick_construction_time_base]
quick_construction_time = @[quick_construction_time_base]
standard_construction_time = @[standard_construction_time_base]
slow_construction_time = @[slow_construction_time_base]
very_slow_construction_time = @[very_slow_construction_time_base]


# Chance of filling one more building slot. Used when starting from a bookmark
# root = province
# scope:county = county
# scope:holder = holder
fill_building_slot_chance = {
	value = 140
	if = {
		limit = {
			current_date < 1066.1.1
		}
		subtract = 70
	}
	if = {
		limit = {
			has_building_or_higher = tribe_01
		}
		subtract = 15
	}
	if = {
		limit = {
			has_special_building = yes
			NOR = {
				has_building_or_higher = hadrians_wall_01
				has_building_or_higher = offas_dyke_01
				has_building_or_higher = stonehenge_01
				has_building_or_higher = the_pyramids_01
				has_building_or_higher = the_colosseum_01
				has_building_or_higher = alhambra_01
			}
			num_buildings <= 1
		}
		add = 35
	}
	add = {
		value = county.development_level
		multiply = 1.5
		max = 35
	}
	multiply = {
		value = county.development_rate_modifier
		max = 1.5
		min = 0.85
	}
	subtract = {
		value = 50
		multiply = num_buildings # Note that the holding itself is a building
	}
	if = {
		limit = {
			num_buildings >= 3
		}
		subtract = 1000
	}
}

# Chance of upgrading one more building. Used when starting from a bookmark. Done after filling out building slots
upgrade_building_chance = {
	value = 65
	if = { # Very few upgraded buildings in 867
		limit = {
			current_date < 1066.1.1
		}
		subtract = 70
	}
	if = {
		limit = {
			has_building_or_higher = tribe_01
		}
		subtract = 15
	}
	add = {
		value = county.development_level
		multiply = 1.5
		max = 35
	}
	multiply = {
		value = county.development_rate_modifier
		max = 1.5
		min = 0.85
	}
	subtract = {
		value = 25
		multiply = combined_building_level
	}
}
