On Hard difficulty and above, the AI has a tendency to spam endless stacks against the player, turning the mid/late game into an annoying slog. This is exacerbated by 0-turn recruitment. In any case, unless the player enjoys fighting multiple full stack battles per turn, this could easily kill the fun of the campaign. The solution to this consists of 3 different overhauls to make the armies that the AI fields powerful yet limited by the choices that the player makes


1. A recruitment system that makes use of extra_recruitment_points


Multiple-turn recruitment makes manpower extremely limited, while 0-turn recruitment makes manpower no longer an important game mechanic. The compromise is to make all units take 5/10/15/20 turns to recruit (depending on cost) BUT introduce a lot of Rome Remastered's extra_recruitment_points bonuses in many buildings. For example, a building representing the Seleucid settler colony could provide 5 extra_recruitment_points at level one, 10 at level 2, and so on. Place these in important settlements like Sardis or Antiochea at the start, and the Seleucids now have a few strategic regions to easily train the 5/10/15/20 turn units. More importantly, this limits the production of units to slow and steady growth instead of virtually unlimited once enough cities reach 6000+ population. Some important points to note:


- Make sure to use do

Code:
 extra_recruitment_points bonus 5
instead of

Code:
 extra_recruitment_points 5
or else the bonuses won't stack properly

- It's probably a good idea to make the governor's house building provide increasing extra_recruitment_points to simulate larger cities pumping out troops more quickly. I recommend a 1-2-3-4-5 system.

- Another 1-5 points could be provided by a "government" style building like in EB1 or RTR7, with more centralized forms of governments providing closer to 5 points and more decentralized forms of governments proving closer to 1 points.

- The remaining 1-10 points could be provided by miscellaneous buildings limited only by your creativity or historical accuracy. "Migration" and "Colony" buildings are good for the Antiquity timeframe and gives the place a choice to build them to increase their rate of unit production

- Combine these three sources of extra_recruitment_points and a Huge City with a very centralized government and all recruiting buildings built will provide 20 recruitment points, which means you could for example send forth 4 levy-tier units, or squeeze out 1 elite unit every turn.

2. War-weariness to lower or increase extra_recruitment_points


This extra_recruitment_points system doesn't do much to make AI manpower more fun by itself. Instead, it provides enough granularity in the recruitment time being between 1-20 turns to allow for simple scripting to adjust it based on campaign events. The most important towards limiting the AI in a reasonable way is "war-weariness". Should the AI score major victories or conquer settlements, or should the player just conquer settlements, they should experience a temporary penalty in extra_recruitment_points across all settlements. This effect subsides over time, but if the AI or player keeps blitzing, then their recruitment will ground to a halt, and they'll be forced to go on the defensive until the weariness subsides.


This is key to providing a both realistic and fun experience. Now the AI will seen neverending at first, but winning a series of crushing defeats on them as the player will cripple them long enough for you to snatch up a few settlements or simulate an uneasy peace for many turns. Likewise, the player who manages to blitz will be inconvenienced by lower recruitment rates from their exhausted population, but it's only enough to make blitzing challenging, not make rapid conquest impossible. No longer can the AI endlessly send forth doomstacks or the player easily blitz AI factions.


Here's the scripting to make it all possible


Code:



;;; War weariness


monitor_event NewTurnStart TrueCondition
	; Destroy all war weariness buildings to rid them for the player and rebels, and to prepare for the AI faction's next turn
	for_each settlement in world
		destroy_building "local" weary+1
		destroy_building "local" weary+2
		destroy_building "local" weary+3
		destroy_building "local" weary+4
		destroy_building "local" weary+5
		destroy_building "local" weary+6
		destroy_building "local" weary+7
		destroy_building "local" weary+8
		destroy_building "local" weary+9
    end_for
	
	for_each faction in world
		
		declare_counter weariness                                             
		retrieve_counter faction_weariness faction weariness     
		
		if I_CompareCounter weariness > 10
			and I_CompareCounter weariness <= 20
			
			for_each settlement in faction
				console_command create_building "local" weary+1 
			end_for
		end_if
		
		if I_CompareCounter weariness > 20
			and I_CompareCounter weariness <= 30
			
			for_each settlement in faction
				console_command create_building "local" weary+2 
			end_for
		end_if
		
		if I_CompareCounter weariness > 30
			and I_CompareCounter weariness <= 40
			
			for_each settlement in faction
				console_command create_building "local" weary+3 
			end_for
		end_if
		
		if I_CompareCounter weariness > 40
			and I_CompareCounter weariness <= 50
			
			for_each settlement in faction
				console_command create_building "local" weary+4 
			end_for
		end_if
		
		if I_CompareCounter weariness > 50
			and I_CompareCounter weariness <= 60
			
			for_each settlement in faction
				console_command create_building "local" weary+5 
			end_for
		end_if
		
		if I_CompareCounter weariness > 60
			and I_CompareCounter weariness <= 70
			
			for_each settlement in faction
				console_command create_building "local" weary+6 
			end_for
		end_if
		
		if I_CompareCounter weariness > 70
			and I_CompareCounter weariness <= 80
			
			for_each settlement in faction
				console_command create_building "local" weary+7 
			end_for
		end_if
		
		if I_CompareCounter weariness > 80
			and I_CompareCounter weariness <= 90
			
			for_each settlement in faction
				console_command create_building "local" weary+8 
			end_for
		end_if
		
		if I_CompareCounter weariness > 90
			and I_CompareCounter weariness <= 100
			
			for_each settlement in faction
				console_command create_building "local" weary+9 
			end_for
		end_if
		
		;;; Factions with accumulated weariness recover more quickly to prevent downwards spirals
		
		if I_CompareCounter weariness > 0
			and I_CompareCounter weariness <= 33
			
			inc_counter weariness -5
		end_if
		
		if I_CompareCounter weariness > 33
			and I_CompareCounter weariness <= 66
			
			inc_counter weariness -5
		end_if
		
		if I_CompareCounter weariness > 66
			and I_CompareCounter weariness <= 100
			
			inc_counter weariness -5
		end_if
		
		if I_CompareCounter weariness > 100
			and I_CompareCounter weariness <= 150
			
			inc_counter weariness -10
		end_if
		
		if I_CompareCounter weariness > 150
			
			; time for a counterattack
			set_counter weariness 0
		end_if
			
		store_counter weariness faction faction_weariness  
	end_for
end_monitor


; To prevent a strong AI faction from snowballing, simply winning a battle will make the faction war-weary
monitor_event PostBattle TrueCondition
	and WonBattle
	and not FactionType slave
	and not I_ConflictType Naval
	and not FactionIsLocal
	
	declare_counter weariness                                             
	retrieve_counter faction_weariness faction weariness     
	
	inc_counter weariness 3 ;TAG_AI_WINS    
	store_counter weariness faction faction_weariness          
end_monitor


; Capturing a settlement even more so for the AI
monitor_event GeneralCaptureSettlement TrueCondition
	and not FactionType slave
	and not FactionIsLocal


	declare_counter weariness                                             
	retrieve_counter faction_weariness faction weariness     
	
	inc_counter weariness 20 ;TAG_AI_CAPTURES_SETTLEMENT    
	store_counter weariness faction faction_weariness    
end_monitor


; Capturing a settlement even more so for the Player
monitor_event GeneralCaptureSettlement TrueCondition
	and not FactionType slave
	and FactionIsLocal


	declare_counter weariness                                             
	retrieve_counter faction_weariness faction weariness     
	
	inc_counter weariness 20 ;TAG_PLAYER_CAPTURES_SETTLEMENT    
	store_counter weariness faction faction_weariness    
end_monitor


; Losing any land battle increases war exhaustion, but only against the player. Unfortunately checking against each faction is the only way
; Player is Rome
monitor_event PostBattle TrueCondition
	and not WonBattle
	and not FactionType slave
	and not I_ConflictType Naval
	and not I_ConflictType Siege
	;and not I_ConflictType SallyBesieger
	and not FactionIsLocal
	and GeneralFoughtFaction seleucid
	and I_LocalFaction seleucid
	
	declare_counter weariness                                             
	retrieve_counter faction_weariness faction weariness     
	
	inc_counter weariness 20 ;TAG_LOSE_VS_PLAYER   
	
	store_counter weariness faction faction_weariness    
end_monitor
; Player is Carthage
monitor_event PostBattle TrueCondition
	and not WonBattle
	and not FactionType slave
	and not I_ConflictType Naval
	and not I_ConflictType Siege
	;and not I_ConflictType SallyBesieger
	and not FactionIsLocal
	and GeneralFoughtFaction egypt
	and I_LocalFaction egypt
	
	declare_counter weariness                                             
	retrieve_counter faction_weariness faction weariness     
	
	inc_counter weariness 20 ;TAG_LOSE_VS_PLAYER     
	store_counter weariness faction faction_weariness    
end_monitor

Let's break down each section and how a modder can tweak the script to achieve different gameplay experiences


Code:

; To prevent a strong AI faction from snowballing, simply winning a battle will make the faction war-weary
monitor_event PostBattle TrueCondition
	and WonBattle
	and not FactionType slave
	and not I_ConflictType Naval
	and not FactionIsLocal
	
	declare_counter weariness                                             
	retrieve_counter faction_weariness faction weariness     
	
	inc_counter weariness 3 ;TAG_AI_WINS    
	store_counter weariness faction faction_weariness          
end_monitor

War weariness is a positive number normally between 0-100, but can go beyond. The higher the war-weariness, the more severe the recruitment penalties. For this monitor, if an AI faction wins a land battle, it suffers a small +3 weariness. Trivial on its own, but if an AI faction starts snowballing and scoring a ton of victories, its war-weariness will skyrocket. This is one component of preventing an AI from exploding across the map


Code:

; Capturing a settlement even more so for the AI
monitor_event GeneralCaptureSettlement TrueCondition
	and not FactionType slave
	and not FactionIsLocal


	declare_counter weariness                                             
	retrieve_counter faction_weariness faction weariness     
	
	inc_counter weariness 20 ;TAG_AI_CAPTURES_SETTLEMENT    
	store_counter weariness faction faction_weariness    
end_monitor

This is a much more severe way to limit AI factions that are doing well. Conquering any settlement increases war-weariness by 1.


Code:

; Losing any land battle increases war exhaustion, but only against the player. Unfortunately checking against each faction is the only way
; Player is Rome
monitor_event PostBattle TrueCondition
	and not WonBattle
	and not FactionType slave
	and not I_ConflictType Naval
	and not I_ConflictType Siege
	;and not I_ConflictType SallyBesieger
	and not FactionIsLocal
	and GeneralFoughtFaction seleucid
	and I_LocalFaction seleucid
	
	declare_counter weariness                                             
	retrieve_counter faction_weariness faction weariness     
	
	inc_counter weariness 20 ;TAG_LOSE_VS_PLAYER   
	
	store_counter weariness faction faction_weariness    
end_monitor
; Player is Carthage
monitor_event PostBattle TrueCondition
	and not WonBattle
	and not FactionType slave
	and not I_ConflictType Naval
	and not I_ConflictType Siege
	;and not I_ConflictType SallyBesieger
	and not FactionIsLocal
	and GeneralFoughtFaction egypt
	and I_LocalFaction egypt
	
	declare_counter weariness                                             
	retrieve_counter faction_weariness faction weariness     
	
	inc_counter weariness 20 ;TAG_LOSE_VS_PLAYER     
	store_counter weariness faction faction_weariness    
end_monitor

This monitor is key for improving the player experience. While AI factions can defeat one another with no severe penalty, should one lose against the player, it will suffer massive war-weariness. This way, the player enjoys the satisfaction of destroying an enemy stack actually impacting the AI. The AI can't just pump out another stack - its recruitment just got nerfed for the foreseeable future.


You will have to copy and paste this block for each playable faction in your game. Unfortunately, there's no simple way to do something like for_each loops for this.


Code:

; Destroy all war weariness buildings to rid them for the player and rebels, and to prepare for the AI faction's next turn
	for_each settlement in world
		destroy_building "local" weary+1
		destroy_building "local" weary+2
		destroy_building "local" weary+3
		destroy_building "local" weary+4
		destroy_building "local" weary+5
		destroy_building "local" weary+6
		destroy_building "local" weary+7
		destroy_building "local" weary+8
		destroy_building "local" weary+9
    end_for
	
	for_each faction in world
		
		declare_counter weariness                                             
		retrieve_counter faction_weariness faction weariness     
		
		if I_CompareCounter weariness > 10
			and I_CompareCounter weariness <= 20
			
			for_each settlement in faction
				console_command create_building "local" weary+1 
			end_for
		end_if
		
		if I_CompareCounter weariness > 20
			and I_CompareCounter weariness <= 30
			
			for_each settlement in faction
				console_command create_building "local" weary+2 
			end_for
		end_if
		
		if I_CompareCounter weariness > 30
			and I_CompareCounter weariness <= 40
			
			for_each settlement in faction
				console_command create_building "local" weary+3 
			end_for
		end_if
		
		if I_CompareCounter weariness > 40
			and I_CompareCounter weariness <= 50
			
			for_each settlement in faction
				console_command create_building "local" weary+4 
			end_for
		end_if
		
		if I_CompareCounter weariness > 50
			and I_CompareCounter weariness <= 60
			
			for_each settlement in faction
				console_command create_building "local" weary+5 
			end_for
		end_if
		
		if I_CompareCounter weariness > 60
			and I_CompareCounter weariness <= 70
			
			for_each settlement in faction
				console_command create_building "local" weary+6 
			end_for
		end_if
		
		if I_CompareCounter weariness > 70
			and I_CompareCounter weariness <= 80
			
			for_each settlement in faction
				console_command create_building "local" weary+7 
			end_for
		end_if
		
		if I_CompareCounter weariness > 80
			and I_CompareCounter weariness <= 90
			
			for_each settlement in faction
				console_command create_building "local" weary+8 
			end_for
		end_if
		
		if I_CompareCounter weariness > 90
			and I_CompareCounter weariness <= 100
			
			for_each settlement in faction
				console_command create_building "local" weary+9 
			end_for
		end_if

This script cleanly places and manages the weary+X building tree across all non-rebel factions. Higher levels of weary+X gives more recruitment nerfs.


Code:

building hinterland_weary
{
    classification military
    icon law
	levels weary+1 weary+2 weary+3 weary+4 weary+5 weary+6 weary+7 weary+8 weary+9
    {
		weary+1 requires hidden_resource not_here
        {
            capability
            {       
				extra_recruitment_points bonus -6 requires not is_player
				
				
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building imperial_palace
				;extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building proconsuls_palace
				;extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building governors_palace
				;extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building governors_villa
			}
            construction  1
            cost  100
            settlement_min town
            upgrades
            {
            }
        }
		weary+2 requires hidden_resource not_here
        {
            capability
            {      
				extra_recruitment_points bonus -7 requires not is_player
				
				
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building imperial_palace
				;extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building proconsuls_palace
				;extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building governors_palace
				;extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building governors_villa
			}
            construction  1
            cost  100
            settlement_min town
            upgrades
            {
            }
        }
		weary+3 requires hidden_resource not_here
        {
            capability
            {       
				extra_recruitment_points bonus -8 requires not is_player
				
				
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building imperial_palace
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building proconsuls_palace
				;extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building governors_palace
				;extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building governors_villa
			}
            construction  1
            cost  100
            settlement_min town
            upgrades
            {
            }
        }
		weary+4 requires hidden_resource not_here
        {
            capability
            {    
				extra_recruitment_points bonus -9 requires not is_player
				
				
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building imperial_palace
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building proconsuls_palace
				;extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building governors_palace
				;extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building governors_villa
			}
            construction  1
            cost  100
            settlement_min town
            upgrades
            {
            }
        }
		weary+5 requires hidden_resource not_here
        {
            capability
            {    
				extra_recruitment_points bonus -10 requires not is_player
				
				
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building imperial_palace
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building proconsuls_palace
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building governors_palace
				;extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building governors_villa
			}
            construction  1
            cost  100
            settlement_min town
            upgrades
            {
            }
        }
		weary+6 requires hidden_resource not_here
        {
            capability
            {   
				extra_recruitment_points bonus -11 requires not is_player
				
				
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building imperial_palace
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building proconsuls_palace
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building governors_palace
				;extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building governors_villa
			}
            construction  1
            cost  100
            settlement_min town
            upgrades
            {
            }
        }
		weary+7 requires hidden_resource not_here
        {
            capability
            {   
				extra_recruitment_points bonus -12 requires not is_player
				
				
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building imperial_palace
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building proconsuls_palace
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building governors_palace
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building governors_villa
			}
            construction  1
            cost  100
            settlement_min town
            upgrades
            {
            }
        }
		weary+8 requires hidden_resource not_here
        {
            capability
            {    
				extra_recruitment_points bonus -13 requires not is_player
				
				
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building imperial_palace
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building proconsuls_palace
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building governors_palace
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building governors_villa
			}
            construction  1
            cost  100
            settlement_min town
            upgrades
            {
            }
        }
		weary+9 requires hidden_resource not_here
        {
            capability
            {    
				extra_recruitment_points bonus -14 requires not is_player
				
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building imperial_palace
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building proconsuls_palace
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building governors_palace
				extra_recruitment_points bonus -1 requires is_player and building_present_min_level core_building governors_villa
			}
            construction  1
            cost  100
            settlement_min town
            upgrades
            {
            }
        }
    }
    plugins
    {
    }
}

Obviously this building should not be destroyable by the player. Notice that the extra_recruitment_points penalty caps out at 14 for the AI. A recommended approach is to give the AI factions "extra_recruitment_points bonus 20" for all of its governor's house building, so that by default it can pump out doomstacks. However, the moment it starts conquering or getting spanked by the player, its recruitment will decrease and decrease as its war weariness accumulates. But will this downwards spiral last forever?




Code:

		;;; Factions with accumulated weariness recover more quickly to prevent downwards spirals
		
		if I_CompareCounter weariness > 0
			and I_CompareCounter weariness <= 33
			
			inc_counter weariness -5
		end_if
		
		if I_CompareCounter weariness > 33
			and I_CompareCounter weariness <= 66
			
			inc_counter weariness -5
		end_if
		
		if I_CompareCounter weariness > 66
			and I_CompareCounter weariness <= 100
			
			inc_counter weariness -5
		end_if
		
		if I_CompareCounter weariness > 100
			and I_CompareCounter weariness <= 150
			
			inc_counter weariness -10
		end_if

Nope. War-weariness needs to subside over time to simulate a faction slowly recovering its national manpower and psyche.


Code:
		
		if I_CompareCounter weariness > 150
			
			; time for a counterattack
			set_counter weariness 0
		end_if
			
		store_counter weariness faction faction_weariness

Most importantly, have a failsafe if the war-weariness gets too high. A particularly brutal player could smash AI field armies so badly that the AI will be crippled for the rest of the campaign. So, if the AI war-weariness gets too high, it gets set back to 0, signalling the start of a counteroffensive.


You can achieve the following gameplay experiences by tweaking these values differently
- To extend the period for which war-weariness is at its highest, don't set it back to 0 until its at 200 or even 250
- To make the AI even more aggressive at first, but more neutered after experiencing setbacks, increase the default governor's house AI extra_recruitment_points bonus to 30 or even 40, but cancel that out over the course of the weary+X building line
- To punish the player or AI for reaching higher levels of war-weariness, lower the war-weariness decrease over time for higher levels of war-weariness. Likewise, to be more forgiving, increase the war-weariness recovery for higher levels. This would incentize careful expansion.
- To make counterattacks less extreme, set war-weariness back to 50 or even 100 after it gets too high


3. Blockades affect extra_recruitment_points

With those two features you can make the AI challenging yet not invincible, but there's one extra feature that would help, and that's making blockading the AI another way to limit its recruitment points

Code:
 
 
;;; Blockading the AI decreases recruitment


monitor_event NewTurnStart TrueCondition
	for_each settlement in world
		destroy_building "local" blockaded+1
		destroy_building "local" blockaded+2
		destroy_building "local" blockaded+3
		destroy_building "local" blockaded+4
		destroy_building "local" blockaded+5
		destroy_building "local" blockaded+6
    end_for
	
	for_each faction in world
		
		declare_counter blockaded                                             
		retrieve_counter faction_blockaded faction blockaded     
		
		if I_CompareCounter blockaded > 0
			and I_CompareCounter blockaded <= 1
			
			for_each settlement in faction
				console_command create_building "local" blockaded+1 
			end_for
		end_if
		
		if I_CompareCounter blockaded > 1
			and I_CompareCounter blockaded <= 2
			
			for_each settlement in faction
				console_command create_building "local" blockaded+2 
			end_for
		end_if
		
		if I_CompareCounter blockaded > 2
			and I_CompareCounter blockaded <= 3
			
			for_each settlement in faction
				console_command create_building "local" blockaded+3 
			end_for
		end_if
		
		if I_CompareCounter blockaded > 3
			and I_CompareCounter blockaded <= 4
			
			for_each settlement in faction
				console_command create_building "local" blockaded+4 
			end_for
		end_if
		
		if I_CompareCounter blockaded > 4
			and I_CompareCounter blockaded <= 5
			
			for_each settlement in faction
				console_command create_building "local" blockaded+5 
			end_for
		end_if
		
		if I_CompareCounter blockaded > 5
			
			for_each settlement in faction
				console_command create_building "local" blockaded+6 
			end_for
		end_if
		
		set_counter blockaded 0
			
		store_counter blockaded faction faction_blockaded  
	end_for
end_monitor


; Count blockaded settlements
monitor_event SettlementTurnStart TrueCondition
	and SettlementOrderLevel blockaded > 0
	
	declare_counter blockaded                                             
	retrieve_counter faction_blockaded faction blockaded     
	
	inc_counter blockaded 1   
	store_counter blockaded faction faction_blockaded   
end_monitor
Code:
 
 
building hinterland_blockaded
{
    classification military
    icon law
	levels blockaded+1 blockaded+2 blockaded+3 blockaded+4 blockaded+5 blockaded+6 
    {
		blockaded+1 requires hidden_resource not_here
        {
            capability
            {                
				extra_recruitment_points bonus -1 requires not is_player
			}
            construction  1
            cost  100
            settlement_min town
            upgrades
            {
            }
        }
		blockaded+2 requires hidden_resource not_here
        {
            capability
            {      
				extra_recruitment_points bonus -2 requires not is_player
			}
            construction  1
            cost  100
            settlement_min town
            upgrades
            {
            }
        }
		blockaded+3 requires hidden_resource not_here
        {
            capability
            {       
				extra_recruitment_points bonus -3 requires not is_player
			}
            construction  1
            cost  100
            settlement_min town
            upgrades
            {
            }
        }
		blockaded+4 requires hidden_resource not_here
        {
            capability
            {    
				extra_recruitment_points bonus -4 requires not is_player
			}
            construction  1
            cost  100
            settlement_min town
            upgrades
            {
            }
        }
		blockaded+5 requires hidden_resource not_here
        {
            capability
            {    
				extra_recruitment_points bonus -5 requires not is_player
			}
            construction  1
            cost  100
            settlement_min town
            upgrades
            {
            }
        }
		blockaded+6 requires hidden_resource not_here
        {
            capability
            {    
				extra_recruitment_points bonus -5 requires not is_player
			}
            construction  1
            cost  100
            settlement_min town
            upgrades
            {
            }
        }
    }
    plugins
    {
    }
}
Note that the Blockaded building will be placed only after 1-2 turns have passed since blockading an AI port. The script checks for unrest caused by blockading, which takes a turn or two to appear.

Combine these 3 features and AI and even player manpower will be much more interesting to manipulate