I made some mistakes in the script posted, here is the updated one, but, unfortunately still ain't working :(.
Code:
script
declare_counter one
set_counter one 0
declare_counter Citybesieged
if I_CompareCounter Citybesieged = 0
and I_SettlementOwner Rome = [faction1]
if I_CharacterTypeNearTile [faction2] general, 2 x,y
set_counter Citybesieged 1
end_if
if I_CharacterTypeNearTile [faction2] family, 2 x,y
set_counter Citybesieged 1
end_if
if I_CompareCounter Citybesieged = 0
and I_SettlementOwner Rome = [faction2]
if I_CharacterTypeNearTile [faction1] general, 2 x,y
set_counter Citybesieged 1
end_if
if I_CharacterTypeNearTile [faction1] family, 2 x,y
set_counter Citybesieged 1
end_if
monitor_event FactionTurnStart FactionType faction1
end_monitor
if I_CompareCounter Citybesieged = 1
if I_SettlementOwner City = faction1
if SettlementBuildingExists = governors_villa
if GarrisonSettlementRatio < 0.1
console_command create_unit City "peasants" 4
console_command add_money -2000
console_command add_population City -1500
end_if
monitor_event FactionTurnStart FactionType faction2
end_monitor
if I_CompareCounter Citybesieged = 1
if I_SettlementOwner City = faction2
if SettlementBuildingExists = governors_villa
if GarrisonSettlementRatio < 0.1
console_command create_unit City "peasants" 5
console_command add_money -2000
console_command add_population City -1500
end_if
set_counter one 0
set_counter Citybesieged 0
terminate_script
Bookmarks