For appreciation of those who code themselves: this is how intricated and precise coding of recruitment of units should be at the of process: an example of one stage of city barracks for one faction:
(currently, it's not finished, and for the castle barracks the work of re-coding the SSHIP 092 is at rather early stages)
Code:
;==============================================================================================================================
;- Poland city barracks militia_drill_square ----------------------------------------------------------------------------------
;----- increases supply of the AoR unit (does not grow with urbanization level):
recruit_pool "Slavic Javelinmen" 0 0.04 0 0 requires factions { poland, } and hidden_resource poland and not event_counter POLAND4_LOCATION_OF_CRACOW 1
recruit_pool "Woodsmen" 0 0.04 0 0 requires factions { poland, } and hidden_resource poland and not event_counter POLAND6_UNITED_KINGDOM 1
;----- melee ---------------------------- (UNfWE - with replacement of types of units and events)
recruit_pool "EE Spear Militia" 2 0.15 3 0 requires factions { poland, } and not event_counter OSTSIEDLUNG 1
recruit_pool "EE Spear Militia" 2 0.18 3 0 requires factions { poland, } and event_counter OSTSIEDLUNG 1 and not event_counter POLAND5_COUNCIL_OF_LECZYCA 1
recruit_pool "EE Spear Militia" 2 0.13 3 0 requires factions { poland, } and event_counter POLAND5_COUNCIL_OF_LECZYCA 1 and not event_counter PAVISE_SHIELDS 1
recruit_pool "Pavise Spear Militia" 2 0.15 3 0 requires factions { poland, } and event_counter POLAND5_COUNCIL_OF_LECZYCA 1 and not event_counter PAVISE_SHIELDS 1
recruit_pool "Pavise Spear Militia" 2 0.24 3 0 requires factions { poland, } and event_counter PAVISE_SHIELDS 1 and not event_counter FULL_PLATE_ARMOR 1
recruit_pool "Pavise Spear Militia" 2 0.15 3 0 requires factions { poland, } and event_counter FULL_PLATE_ARMOR 1 and not event_counter MATCHLOCK 1
recruit_pool "Halberd Militia" 2 0.17 3 0 requires factions { poland, } and event_counter HALF_PLATE_ARMOR 1 and not event_counter MATCHLOCK 1
recruit_pool "Halberd Militia" 2 0.24 3 0 requires factions { poland, } and event_counter MATCHLOCK 1
;----- missiles ------------------------- (UNfWE)
; beginning: only AoR
recruit_pool "EE Crossbow Militia" 1 0.10 2 0 requires factions { poland, } and event_counter OSTSIEDLUNG 1 and not event_counter MOUNTED_CROSSBOWS 1
recruit_pool "EE Crossbow Militia" 1 0.12 2 0 requires factions { poland, } and event_counter MOUNTED_CROSSBOWS 1 and not event_counter POLAND5_COUNCIL_OF_LECZYCA 1
recruit_pool "EE Crossbow Militia" 1 0.15 2 0 requires factions { poland, } and event_counter POLAND5_COUNCIL_OF_LECZYCA 1 and not event_counter PAVISE_SHIELDS 1
recruit_pool "EE Crossbow Militia" 1 0.12 2 0 requires factions { poland, } and event_counter PAVISE_SHIELDS 1 and not event_counter FULL_PLATE_ARMOR 1
;----- increases supply of the Baltic Crossbowmen from Hansa Teutonica building
recruit_pool "Lettish Crossbowmen" 0 0.07 0 0 requires factions { poland, } and not event_counter FL_is_crowned_ruler 1
recruit_pool "Lettish Crossbowmen" 0 0.10 0 0 requires factions { poland, } and event_counter FL_is_crowned_ruler 1
;--- AI support (Poland city barracks) ----------------------------------------------------
; so that it fields better quality armies (goal: to provide the player with better experience: stronger AI armies)
; added 1 time every 4 turns (leap_year_counter 3) so that the can be recruited in one moment thus creating stronger armies
;......... base value
recruit_pool "Smolensk Infantry" 1 0.001 2 0 requires factions { poland, } and not event_counter is_the_player 1
recruit_pool "Light Swordsmen" 1 0.001 2 0 requires factions { poland, } and not event_counter is_the_player 1
;......... if Poland has fewer than 20 settlements
recruit_pool "Smolensk Infantry" 0 0.124 0 0 requires factions { poland, } and not event_counter is_the_player 1 and not event_counter faction_size_huge 1 and event_counter leap_year_counter 1
recruit_pool "Light Swordsmen" 0 0.124 0 0 requires factions { poland, } and not event_counter is_the_player 1 and not event_counter faction_size_huge 1 and event_counter leap_year_counter 1
;......... mobilization of citizens if the AI is in trouble
recruit_pool "Smolensk Infantry" 0 0.375 0 0 requires factions { poland, } and event_counter is_the_player 1 and not event_counter faction_size_small 1 and event_counter leap_year_counter 1
recruit_pool "Light Swordsmen" 0 0.375 0 0 requires factions { poland, } and event_counter is_the_player 1 and not event_counter faction_size_small 1 and event_counter leap_year_counter 1
and hier for another faction:
Code:
;==============================================================================================================================
;- FRANCE city barracks militia_drill_square ----------------------------------------------------------------------------------------------------------
;----- Axe -> Guisarme ----------------------------
recruit_pool "Axe Militia" 1 0.11 2 0 requires factions { france, } and not event_counter HEAVY_MAIL_ARMOR 1
recruit_pool "Axe Militia" 1 0.13 2 0 requires factions { france, } and event_counter HEAVY_MAIL_ARMOR 1 and not event_counter TRANSITIONAL_ARMOR 1
recruit_pool "Axe Militia" 1 0.11 2 0 requires factions { france, } and event_counter HEAVY_MAIL_ARMOR 1 and not event_counter TRANSITIONAL_ARMOR 1
recruit_pool "NE Urban Militia" 1 0.11 2 0 requires factions { france, } and event_counter TRANSITIONAL_ARMOR 1 and not event_counter HALF_PLATE_ARMOR 1
recruit_pool "NE Urban Militia" 1 0.13 2 0 requires factions { france, } and event_counter HALF_PLATE_ARMOR 1 and not event_counter FULL_PLATE_ARMOR 1
recruit_pool "NE Urban Militia" 1 0.15 2 0 requires factions { france, } and event_counter FULL_PLATE_ARMOR 1
;----- Spear -> Halberd ----------------------------
recruit_pool "Spear Militia" 1 0.15 2 0 requires factions { france, } and not event_counter HEAVY_MAIL_ARMOR 1
recruit_pool "Spear Militia" 1 0.13 2 0 requires factions { france, } and event_counter HEAVY_MAIL_ARMOR 1 and not event_counter TRANSITIONAL_ARMOR 1
recruit_pool "Urban Spear Militia" 1 0.15 2 0 requires factions { france, } and event_counter HEAVY_MAIL_ARMOR 1 and not event_counter TRANSITIONAL_ARMOR 1
recruit_pool "Urban Spear Militia" 1 0.19 2 0 requires factions { france, } and event_counter TRANSITIONAL_ARMOR 1 and not event_counter HALF_PLATE_ARMOR 1
recruit_pool "Urban Spear Militia" 1 0.12 2 0 requires factions { france, } and event_counter HALF_PLATE_ARMOR 1 and not event_counter FULL_PLATE_ARMOR 1
recruit_pool "Halberd Militia" 1 0.13 2 0 requires factions { france, } and event_counter HALF_PLATE_ARMOR 1 and not event_counter FULL_PLATE_ARMOR 1
recruit_pool "Halberd Militia" 1 0.19 2 0 requires factions { france, } and event_counter FULL_PLATE_ARMOR 1
;----- Missiles ----------------------------
recruit_pool "Peasant Archers" 1 0.15 2 0 requires factions { france, } and not event_counter lateran_council3 1
recruit_pool "Peasant Archers" 1 0.12 2 0 requires factions { france, } and event_counter lateran_council3 1 and not event_counter MOUNTED_CROSSBOWS 1
recruit_pool "Urban Crossbow Militia" 1 0.10 2 0 requires factions { france, } and event_counter lateran_council2 1 and not event_counter lateran_council3 1
recruit_pool "Urban Crossbow Militia" 1 0.12 2 0 requires factions { france, } and event_counter lateran_council3 1 and not event_counter MOUNTED_CROSSBOWS 1
recruit_pool "Urban Crossbow Militia" 1 0.15 2 0 requires factions { france, } and event_counter MOUNTED_CROSSBOWS 1 and not event_counter PAVISE_SHIELDS 1
recruit_pool "Arbalest Militia" 1 0.15 2 0 requires factions { france, } and event_counter PAVISE_SHIELDS 1 and not event_counter FULL_PLATE_ARMOR 1
recruit_pool "Arbalest Militia" 1 0.19 2 0 requires factions { france, } and event_counter FULL_PLATE_ARMOR 1 and not event_counter pike_and_shot 1
recruit_pool "Arbalest Militia" 1 0.15 2 0 requires factions { france, } and event_counter pike_and_shot 1
;----- Spearmen --> Pike Miltia
recruit_pool "Sergeant Spearmen" 1 0.11 2 0 requires factions { france, } and not event_counter HEAVY_MAIL_ARMOR 1
recruit_pool "Sergeant Spearmen" 1 0.13 2 0 requires factions { france, } and event_counter HEAVY_MAIL_ARMOR 1 and not event_counter TRANSITIONAL_ARMOR 1
recruit_pool "Sergeant Spearmen" 1 0.11 2 0 requires factions { france, } and event_counter TRANSITIONAL_ARMOR 1 and not event_counter FULL_PLATE_ARMOR 1
recruit_pool "Pike Militia" 1 0.06 2 0 requires factions { france, } and event_counter PAVISE_SHIELDS 1 and not event_counter FULL_PLATE_ARMOR 1
recruit_pool "Pike Militia" 1 0.11 2 0 requires factions { france, } and event_counter FULL_PLATE_ARMOR 1 and not event_counter pike_and_shot 1
recruit_pool "Pike Militia" 1 0.15 2 0 requires factions { france, } and event_counter pike_and_shot 1
;----- LMaT-ArmouredS-Partisan: special in citiese for France to compensate the lack of AoR units that are present elsewhere
recruit_pool "Light Men at Arms" 1 0.08 2 0 requires factions { france, } and not event_counter HEAVY_MAIL_ARMOR 1
recruit_pool "Light Men at Arms" 1 0.06 2 0 requires factions { france, } and event_counter HEAVY_MAIL_ARMOR 1 and not event_counter TRANSITIONAL_ARMOR 1
recruit_pool "Armored Swordsmen" 1 0.06 2 0 requires factions { france, } and event_counter HEAVY_MAIL_ARMOR 1 and not event_counter TRANSITIONAL_ARMOR 1
recruit_pool "Armored Swordsmen" 1 0.10 2 0 requires factions { france, } and event_counter TRANSITIONAL_ARMOR 1 and not event_counter HALF_PLATE_ARMOR 1
recruit_pool "Partisan Militia" 1 0.06 2 0 requires factions { france, } and event_counter HALF_PLATE_ARMOR 1 and not event_counter FULL_PLATE_ARMOR 1
recruit_pool "Partisan Militia" 1 0.14 2 0 requires factions { france, } and event_counter FULL_PLATE_ARMOR 1
;--- AI support (france city barracks) ---------------------------------------------------- (UNfWE)
; so that it fields better quality armies (goal: to provide the player with better experience: stronger AI armies)
; added 1 time every 4 turns (leap_year_counter 3) so that the can be recruited in one moment thus creating stronger armies
;......... base value
recruit_pool "Light Men at Arms" 0 0.001 0 0 requires factions { france, } and not event_counter is_the_player 1 and not event_counter HEAVY_MAIL_ARMOR 1
recruit_pool "Armored Swordsmen" 0 0.001 0 0 requires factions { france, } and not event_counter is_the_player 1 and event_counter HEAVY_MAIL_ARMOR 1 and not event_counter HALF_PLATE_ARMOR 1
recruit_pool "Sergeant Spearmen" 0 0.001 0 0 requires factions { france, } and not event_counter is_the_player 1 and not event_counter FULL_PLATE_ARMOR 1
recruit_pool "Pikemen" 0 0.001 2 0 requires factions { france, } and not event_counter is_the_player 1 and event_counter FULL_PLATE_ARMOR 1
;......... if france has fewer than 20 settlements
recruit_pool "Light Men at Arms" 0 0.124 0 0 requires factions { france, } and not event_counter is_the_player 1 and not event_counter HEAVY_MAIL_ARMOR 1 and not event_counter faction_size_huge 1 and event_counter leap_year_counter 1
recruit_pool "Armored Swordsmen" 0 0.124 0 0 requires factions { france, } and not event_counter is_the_player 1 and event_counter HEAVY_MAIL_ARMOR 1 and not event_counter faction_size_huge 1 and event_counter leap_year_counter 1
recruit_pool "Sergeant Spearmen" 0 0.124 0 0 requires factions { france, } and not event_counter is_the_player 1 and not event_counter MATCHLOCK 1 and not event_counter faction_size_huge 1 and event_counter leap_year_counter 1
recruit_pool "Pikemen" 0 0.124 0 0 requires factions { france, } and not event_counter is_the_player 1 and event_counter MATCHLOCK 1 and not event_counter faction_size_huge 1 and event_counter leap_year_counter 1
;......... mobilization of citizens if the AI is in trouble
recruit_pool "Light Men at Arms" 0 0.375 0 0 requires factions { france, } and not event_counter is_the_player 1 and not event_counter HEAVY_MAIL_ARMOR 1 and event_counter faction_size_small 1 and event_counter leap_year_counter 1
recruit_pool "Armored Swordsmen" 0 0.375 0 0 requires factions { france, } and not event_counter is_the_player 1 and event_counter HEAVY_MAIL_ARMOR 1 and event_counter faction_size_small 1 and event_counter leap_year_counter 1
recruit_pool "Sergeant Spearmen" 0 0.375 0 0 requires factions { france, } and not event_counter is_the_player 1 and not event_counter MATCHLOCK 1 and event_counter faction_size_small 1 and event_counter leap_year_counter 1
recruit_pool "Pikemen" 0 0.375 0 0 requires factions { france, } and not event_counter is_the_player 1 and event_counter MATCHLOCK 1 and event_counter faction_size_small 1 and event_counter leap_year_counter 1