Talking on scripting & optimisation: Belovese has streamlined the coding for factions' evolution, it's now very easy to add any event for many factions. We'll be using them in the future. If you've got ideas, you may always post the relevant code here.
Code:
;====================================================================================================== GEORGIA EVOLUTION ;---------- Georgia Evolution
; counters used in EDB for availability of the units, but also benefits from the buildings (library, equestrian etc.)
set_event_counter georgian2_golden_age_player 0 ; turn 80-140
set_event_counter georgian3_shota_rustaveli_player 0 ; turn 150-220
set_event_counter georgian4_crossbow_in_caucasus_player 0 ; turn 200-300
set_event_counter georgian6_revival_player 0 ; turn 270-360
set_event_counter georgian7_last_united_kingdom_player 0 ; turn 520-600
set_event_counter georgian8_tatar_lancers_reform_player 0 ; turn 70-160
monitor_event PreFactionTurnStart FactionType georgia
if not I_IsFactionAIControlled georgia
log -------------------- Georgia evolution: (0 1) INFORMATION ----------------------------------------
if I_TurnNumber == 1
historic_event GEORGIAN0_STARTING_INFO
end_if
if I_TurnNumber == 2
historic_event GEORGIAN1_REFORMS_INFO
end_if
if I_TurnNumber == 4
historic_event GEORGIAN1B_MILITARY_REFORMS_INFO
end_if
end_if
if I_EventCounter GEORGIAN2_GOLDEN_AGE = 0
and RandomPercent < 40
and I_SettlementOwner Tbilisi = georgia
log -------------------- Georgia evolution: (2) GOLDEN AGE ----------------------------------------
; historically should take place around turn 140
set_event_counter continue 0
if I_TurnNumber > 70 ; just in case the player rushes the map
and I_SettlementOwner Kutaisi = georgia ; Geogia holds core regions
if I_CompareCounter number_landowners2_built > 2 ; Georgia built 3+ Local Guards (Large Town level)
and I_CompareCounter number_ikoner_studio_built > 1 ; Georgia built 2+ Ikoner Studio (Minor City level)
if I_FactionLeaderTrait georgia WifeIsGreek > 0 ; the FL should have either wife or some ancestors of Byzantine / Kievian descent
set_event_counter continue 1
end_if
if I_FactionLeaderTrait georgia Royal_Relation_Greek > 0
set_event_counter continue 1
end_if
if I_FactionLeaderTrait georgia WifeIsKievan > 0
set_event_counter continue 1
end_if
if I_FactionLeaderTrait georgia Royal_Relation_Kievan > 0
set_event_counter continue 1
end_if
end_if
if I_EventCounter FL_is_crowned_ruler == 1 ; FL has the crown
and not I_IsFactionAIControlled georgia ; to ensure it's not another faction FL who's got the crown
set_event_counter continue 1
end_if
if I_TurnNumber > 130 ; FALL BACK - in case of failure or a bug
set_event_counter continue 1
end_if
end_if
if I_EventCounter continue = 1
set_event_counter continue 0
historic_event GEORGIAN2_GOLDEN_AGE factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian2_golden_age_player 1
end_if
end_if
end_if
if I_EventCounter GEORGIAN3_SHOTA_RUSTAVELI = 0
and I_EventCounter GEORGIAN2_GOLDEN_AGE = 1
and I_TurnNumber > 150
and RandomPercent < 40 ; to add some randomness against the bugs
log -------------------- Georgia evolution: (3) SHOTA RUSTAVELI ----------------------------------------
; historically should take place around turn 170
set_event_counter continue 0
if I_SettlementOwner Tbilisi = georgia ; at least the capital is in the Georgian hands
if I_CompareCounter number_ikoner_studio_built > 3 ; Gergia has built 3 Ikoner Studios (Minor City level)
and I_CompareCounter number_cathedral_o_built > 1 ; at least 2 Large City
and I_SettlementOwner Kutaisi = georgia
set_event_counter continue 1
end_if
if I_TurnNumber > 210 ; FALL BACK - in case of failure or a bug
set_event_counter continue 1
end_if
end_if
if I_SettlementOwner Jerusalem = georgia ; automatic if Georgia conquers Jerusalem
set_event_counter continue 1
end_if
if I_EventCounter continue = 1
set_event_counter continue 0
historic_event GEORGIAN3_SHOTA_RUSTAVELI factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian3_shota_rustaveli_player 1
end_if
end_if
end_if
if I_EventCounter GEORGIAN4_CROSSBOW_IN_CAUCASUS = 0
and I_EventCounter GEORGIAN3_SHOTA_RUSTAVELI = 1
and RandomPercent < 40
and I_TurnNumber > 200
and I_SettlementOwner Tbilisi = georgia
and I_EventCounter MOUNTED_CROSSBOWS > 0 ; improvments in crossbow technology in Europe occured
log -------------------- Georgia evolution: (4) CROSSBOW IN CAUCASUS ----------------------------------------
; add crossbow units for Georgia
; this event is unrelated to the next Georgian events (may happen later)
; there's no pic
if I_CompareCounter number_university_built > 0 ; at least 1 Large City (allows contacts with the Latins)
and I_CompareCounter number_marksmans_range_built > 1 ; Gergia has built 2 Marksmans Ranges (Castle level)
and I_SettlementOwner Kutaisi = georgia
if I_FactionLeaderTrait georgia WifeIsJerusalem > 0 ; the FL should have either wife or some ancestors of Byzantine / Kievian descent
set_event_counter continue 1
end_if
if I_FactionLeaderTrait georgia Royal_Relation_Jerusalem > 0
set_event_counter continue 1
end_if
if I_FactionLeaderTrait georgia WifeIsHRE > 0
set_event_counter continue 1
end_if
if I_FactionLeaderTrait georgia Royal_Relation_HRE > 0
set_event_counter continue 1
end_if
if I_FactionLeaderTrait georgia WifeIsEnglish > 0
set_event_counter continue 1
end_if
if I_FactionLeaderTrait georgia Royal_Relation_English > 0
set_event_counter continue 1
end_if
if I_FactionLeaderTrait georgia WifeIsSicilian > 0
set_event_counter continue 1
end_if
if I_FactionLeaderTrait georgia Royal_Relation_Sicilian > 0
set_event_counter continue 1
end_if
if I_FactionLeaderTrait georgia WifeIsFrench > 0
set_event_counter continue 1
end_if
if I_FactionLeaderTrait georgia Royal_Relation_French > 0
set_event_counter continue 1
end_if
end_if
if I_TurnNumber > 290 ; FALL BACK - in case of failure or a bug
set_event_counter continue 1
end_if
if I_EventCounter continue = 1
set_event_counter continue 0
historic_event GEORGIAN4_CROSSBOW_IN_CAUCASUS factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian4_crossbow_in_caucasus_player 1
end_if
end_if
end_if
if I_EventCounter GEORGIAN5_REVIVAL_ALLOWED = 0 ; no randomness here as it should happen as soon as conditions are met: this is just a pre-condition for Georgian Revival
and I_EventCounter GEORGIAN3_SHOTA_RUSTAVELI = 1
log -------------------- Georgia evolution: (5) REVIVAL ALLOWED ----------------------------------------
if not I_SettlementOwner Tbilisi = georgia
and not I_SettlementOwner Tbilisi = slave
historic_event GEORGIAN5_REVIVAL_ALLOWED
end_if
if I_TurnNumber > 270 ; fallback
historic_event GEORGIAN5_REVIVAL_ALLOWED
end_if
end_if
if I_EventCounter GEORGIAN6_REVIVAL = 0
and I_EventCounter GEORGIAN5_REVIVAL_ALLOWED = 1
and RandomPercent < 40
and I_SettlementOwner Tbilisi = georgia
log -------------------- Georgia evolution: (6) GEORGIAN REVIVAL ----------------------------------------
; historically should take place around turn 380
set_event_counter continue 0
if I_TurnNumber > 270
and I_CompareCounter number_landowners3_built > 3 ; Gergia has built 4 Local Councils (Minor City level)
and I_CompareCounter number_citadel_built > 0 ; at least 1 Citadel (Large Castle) exists
set_event_counter continue 1
end_if
if I_TurnNumber > 350 ; FALL BACK - in case of failure or a bug
set_event_counter continue 1
end_if
if I_EventCounter continue = 1
set_event_counter continue = 0
historic_event GEORGIAN6_REVIVAL factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian6_revival_player 1
end_if
end_if
end_if
end_monitor