ai_add_equipment = { if = { limit = { is_debug = yes } log = "[GetDateText]: [THIS.GetName]: ai_add_equipment - adding equipment" } if = { limit = { has_equipment = { infantry_weapons_type < 1000 } } add_equipment_to_stockpile = { type = infantry_weapons_type amount = 1000 } } if = { limit = { has_equipment = { cnc_equipment_type < 500 } } add_equipment_to_stockpile = { type = cnc_equipment_type amount = 500 } } if = { limit = { has_equipment = { L_AT_Equipment < 250 } } add_equipment_to_stockpile = { type = L_AT_Equipment amount = 250 } } if = { limit = { has_equipment = { AA_Equipment < 250 } } add_equipment_to_stockpile = { type = AA_Equipment amount = 250 } } if = { limit = { has_equipment = { util_vehicle_type < 500 } } add_equipment_to_stockpile = { type = util_vehicle_type amount = 500 } } if = { limit = { has_equipment = { H_AT_Equipment < 500 } } add_equipment_to_stockpile = { type = H_AT_Equipment amount = 500 } } if = { limit = { has_equipment = { medium_tank_aa_chassis < 200 } has_design_based_on = medium_tank_aa_chassis } add_equipment_to_stockpile = { type = medium_tank_aa_chassis amount = 200 } } if = { limit = { has_equipment = { medium_tank_amphibious_chassis < 500 } has_design_based_on = medium_tank_amphibious_chassis } add_equipment_to_stockpile = { type = medium_tank_amphibious_chassis amount = 500 } } if = { limit = { has_equipment = { medium_tank_flame_chassis < 500 } has_design_based_on = medium_tank_flame_chassis } add_equipment_to_stockpile = { type = medium_tank_flame_chassis amount = 500 } } if = { limit = { has_equipment = { medium_tank_chassis < 500 } has_design_based_on = medium_tank_chassis } add_equipment_to_stockpile = { type = medium_tank_chassis amount = 500 } } if = { limit = { has_equipment = { medium_tank_artillery_chassis < 300 } has_design_based_on = medium_tank_artillery_chassis } add_equipment_to_stockpile = { type = medium_tank_artillery_chassis amount = 300 } } if = { limit = { has_equipment = { artillery_equipment < 300 } } add_equipment_to_stockpile = { type = artillery_equipment amount = 300 } } if = { limit = { has_equipment = { heavy_tank_amphibious_chassis < 250 } } add_equipment_to_stockpile = { type = heavy_tank_amphibious_chassis amount = 250 } } if = { limit = { has_equipment = { heavy_tank_chassis < 250 } has_design_based_on = heavy_tank_chassis } add_equipment_to_stockpile = { type = heavy_tank_chassis amount = 250 } } } ai_spawn_units = { set_temp_variable = { div_count_player = 0 } set_temp_variable = { plane_count_player = 0 } random_other_country = { limit = { is_ai = no } set_temp_variable = { div_count_player = num_divisions } set_temp_variable = { plane_count_player = num_deployed_planes } } if = { limit = { has_idea = minor_power } multiply_temp_variable = { div_count_player = 0.3 } multiply_temp_variable = { plane_count_player = 0.2 } } else_if = { limit = { has_idea = regional_power } multiply_temp_variable = { div_count_player = 0.7 } multiply_temp_variable = { plane_count_player = 0.4 } } else_if = { limit = { has_idea = large_power } multiply_temp_variable = { div_count_player = 1.2 } multiply_temp_variable = { plane_count_player = 0.8 } } else_if = { limit = { has_idea = great_power } multiply_temp_variable = { div_count_player = 1.8 } multiply_temp_variable = { plane_count_player = 1.2 } } else_if = { limit = { has_idea = super_power } multiply_temp_variable = { div_count_player = 2.5 } multiply_temp_variable = { plane_count_player = 1.6 } } else = { multiply_temp_variable = { div_count_player = 0.15 } multiply_temp_variable = { plane_count_player = 0.1 } } if = { limit = { check_variable = { num_divisions < div_count_player } } random_list = { 40 = { capital_scope = { create_unit = { division = "name = \"Mechanized Infantry Division\" division_template = \"Mechanized Infantry Division\" start_experience_factor = 0.6" owner = PREV count = 5 } } } 30 = { capital_scope = { create_unit = { division = "name = \"Armored Division\" division_template = \"Armored Division\" start_experience_factor = 0.6" owner = PREV count = 5 } } } 10 = { capital_scope = { create_unit = { division = "name = \"Air Assault Division\" division_template = \"Air Assault Division\" start_experience_factor = 0.6" owner = PREV count = 5 } } } 10 = { capital_scope = { create_unit = { division = "name = \"Mechanized Marines Infantry Division\" division_template = \"Mechanized Marines Infantry Division\" start_experience_factor = 0.6" owner = PREV count = 5 } } } 10 = { capital_scope = { create_unit = { division = "name = \"Special Forces Division\" division_template = \"Special Forces Division\" start_experience_factor = 0.6" owner = PREV count = 5 } } } } } if = { limit = { check_variable = { num_deployed_planes < plane_count_player } } if = { limit = { has_design_based_on = medium_plane_airframe } add_equipment_to_stockpile = { type = medium_plane_airframe amount = 200 } } if = { limit = { has_design_based_on = medium_plane_cas_airframe } add_equipment_to_stockpile = { type = medium_plane_cas_airframe amount = 100 } } if = { limit = { has_design_based_on = medium_plane_fighter_airframe } add_equipment_to_stockpile = { type = medium_plane_fighter_airframe amount = 100 } } if = { limit = { has_design_based_on = large_plane_airframe } add_equipment_to_stockpile = { type = large_plane_airframe amount = 25 } } } } ai_add_xp = { army_experience = 25 navy_experience = 25 air_experience = 25 if = { limit = { difficulty > 2 } army_experience = 25 navy_experience = 25 air_experience = 25 } if = { limit = { difficulty > 3 } army_experience = 25 navy_experience = 25 air_experience = 25 } add_mastery = { amount = 5 } }