Code:
;====================================================================================================== POLAND EVOLUTION
;---------- Poland Evolution
; turn 100-150 ostsiedlung
set_event_counter poland3_first_tourney_player 0 ; turn 180-220
set_event_counter poland4_location_of_cracow_player 0 ; turn 250-300
set_event_counter poland5_council_of_leczyca_player 0 ; turn 300-370
set_event_counter poland6_united_kingdom_player 0 ; turn 400-470
set_event_counter poland7_golden_age_player 0 ; turn 560-640
;-------------------------------------------------------------------- POLAND 1 STARTING INFO
; information about reforms
monitor_event PreFactionTurnStart FactionType poland
if I_IsFactionAIControlled poland
terminate_monitor
end_if
if I_TurnNumber = 4
historic_event POLAND0_STARTING_INFO
terminate_monitor
end_if
end_monitor
monitor_event PreFactionTurnStart FactionType poland
if I_IsFactionAIControlled poland
terminate_monitor
end_if
if I_TurnNumber = 5
historic_event POLAND1_REFORMS_INFO
terminate_monitor
end_if
end_monitor
;-------------------------------------------------------------------- POLAND 2 OSTSIEDLUNG
; Ostsiedlung (ca. 1180) - higher growth of the settlements
monitor_event PreFactionTurnStart FactionType poland
if I_EventCounter OSTSIEDLUNG > 0 ; in case any other Ostsiedlung trigger already has fired
terminate_monitor
end_if
if I_TurnNumber > 99
and RandomPercent > 20 ; useful in case of a bug
and I_CompareCounter number_p_large_town_built > 3 ; 4+ Local Guards were built (Large Town level)
and I_CompareCounter number_mines_built > 1 ; 2+ Mines were build (miners were first people to move east)
historic_event OSTSIEDLUNG
if not I_IsFactionAIControlled poland
inc_event_counter poland_ostsiedlung_player 1
end_if
if not I_IsFactionAIControlled hungary ; in case the player is Hungary, but it was Poland AI triggering the event
inc_event_counter hungary_ostsiedlung_player 1
end_if
if not I_IsFactionAIControlled hre ; in case the player is HRE, but it was Poland AI triggering the event
inc_event_counter hre_ostsiedlung_player 1
end_if
terminate_monitor
end_if
end_monitor
;-------------------------------------------------------------------- POLAND 3 FIRST TOURNEY
; First Tourney 1243
; it impacts on the possibility to build Tourney Fields and on recruitment of some knights
monitor_event PreFactionTurnStart FactionType poland
if I_TurnNumber > 180
and RandomPercent > 20 ; useful in case of a bug
and I_CompareCounter number_tourney_fields_built > 2 ; Poland has built 3 Tourney Fields (Minor City level)
and I_EventCounter FL_is_crowned_ruler > 0 ; FL has the crown
and I_SettlementOwner Krakow = poland ; at least the capital is in the Polish hands
and I_SettlementOwner Wroclaw = poland ; first tourney was held in Silesia
historic_event POLAND3_FIRST_TOURNEY factions { poland, hre, france, england, norway, denmark, hungary, lithuania, kievan_rus, russia, cumans, }
if not I_IsFactionAIControlled poland
inc_event_counter poland3_first_tourney_player 1
end_if
terminate_monitor
end_if
if I_TurnNumber > 240 ; FALL BACK - in case of failure or a bug
and RandomPercent > 90 ; to add some randomness against the bugs
and I_SettlementOwner Krakow = poland ; at least the capital is in the Polish hands
historic_event POLAND3_FIRST_TOURNEY factions { poland, hre, france, england, norway, denmark, hungary, lithuania, kievan_rus, russia, cumans, }
if not I_IsFactionAIControlled poland
inc_event_counter poland3_first_tourney_player 1
end_if
terminate_monitor
end_if
end_monitor
;-------------------------------------------------------------------- POLAND 4 LOCATION OF CRACOW
; wave of location of the cities in the wake of Ostsiedlung (1230-1300)
monitor_event PreFactionTurnStart FactionType poland
if I_TurnNumber > 250
and RandomPercent > 20 ; useful in case of a bug
and I_CompareCounter number_city_hall_built > 2 ; Poland has built 3 City Halls (Large City level)
and I_SettlementOwner Krakow = poland ; at least the capital is in the Polish hands
historic_event POLAND4_LOCATION_OF_CRACOW factions { poland, hre, france, england, norway, denmark, hungary, lithuania, kievan_rus, russia, cumans, }
if not I_IsFactionAIControlled poland
inc_event_counter poland4_location_of_cracow_player 1
end_if
terminate_monitor
end_if
if I_TurnNumber > 300 ; FALL BACK - in case of failure or a bug
and RandomPercent > 90 ; useful in case of a bug
and I_SettlementOwner Krakow = poland ; at least the capital is in the Polish hands
historic_event POLAND4_LOCATION_OF_CRACOW factions { poland, hre, france, england, norway, denmark, hungary, lithuania, kievan_rus, russia, cumans, }
if not I_IsFactionAIControlled poland
inc_event_counter poland4_location_of_cracow_player 1
end_if
terminate_monitor
end_if
end_monitor
;-------------------------------------------------------------------- POLAND 5 COUNCIL OF LECZYCA
; changes in the ecclesiastical life of Poland (1280-1320)
monitor_event PreFactionTurnStart FactionType poland
if I_TurnNumber > 300
and RandomPercent > 20 ; useful in case of a bug
and I_SettlementOwner Krakow = poland ; at least the capital is in the Polish hands
and I_CompareCounter number_cathedral_built > 3 ; Poland has built 4 Cathedrals (Large City level)
historic_event POLAND5_COUNCIL_OF_LECZYCA factions { poland, hre, france, england, norway, denmark, hungary, lithuania, kievan_rus, russia, cumans, }
if not I_IsFactionAIControlled poland
inc_event_counter poland5_council_of_leczyca_player 1
end_if
terminate_monitor
end_if
if I_TurnNumber > 370 ; FALL BACK - in case of failure or a bug
and RandomPercent > 90 ; to add some randomness against the bugs
and I_SettlementOwner Krakow = poland ; at least the capital is in the Polish hands
historic_event POLAND5_COUNCIL_OF_LECZYCA factions { poland, hre, france, england, norway, denmark, hungary, lithuania, kievan_rus, russia, cumans, }
if not I_IsFactionAIControlled poland
inc_event_counter poland5_council_of_leczyca_player 1
end_if
terminate_monitor
end_if
end_monitor
;-------------------------------------------------------------------- POLAND 6 UNITED KINGDOM
; reunification of Poland under Wladislav the Elbow (1300-1330)
monitor_event PreFactionTurnStart FactionType poland
if I_TurnNumber > 400
and RandomPercent > 20 ; useful in case of a bug
and I_CompareCounter number_citadel_built > 2 ; Poland has built 3 Citadels (Large City castle level)
and I_EventCounter FL_is_crowned_ruler > 0 ; FL has the crown
and I_SettlementOwner Krakow = poland ; Wladislav united 3 provices (no Silesia and Pomerania)
and I_SettlementOwner Poznan = poland
and I_SettlementOwner Plock = poland
historic_event POLAND6_UNITED_KINGDOM factions { poland, hre, france, england, norway, denmark, hungary, lithuania, kievan_rus, russia, cumans, }
if not I_IsFactionAIControlled poland
inc_event_counter poland6_united_kingdom_player 1
end_if
terminate_monitor
end_if
if I_TurnNumber > 470 ; FALL BACK - in case of failure or a bug
and RandomPercent > 90 ; to add some randomness against the bugs
and I_SettlementOwner Krakow = poland
and I_SettlementOwner Poznan = poland
and I_SettlementOwner Plock = poland
historic_event POLAND6_UNITED_KINGDOM factions { poland, hre, france, england, norway, denmark, hungary, lithuania, kievan_rus, russia, cumans, }
if not I_IsFactionAIControlled poland
inc_event_counter poland6_united_kingdom_player 1
end_if
terminate_monitor
end_if
end_monitor
;-------------------------------------------------------------------- POLAND 7 GOLDEN AGE
; Golden Age of 15th century (1450-1600)
monitor_event PreFactionTurnStart FactionType poland
if I_TurnNumber > 560
and RandomPercent > 20 ; useful in case of a bug
and I_CompareCounter number_great_university_built > 0 ; Great University exists (Huge City level)
and I_CompareCounter number_cathedral_built > 4 ; Poland has built 5 Cathedrals (Large City level)
and I_EventCounter FL_is_crowned_ruler > 0 ; FL has the crown
and I_SettlementOwner Krakow = poland
historic_event POLAND7_GOLDEN_AGE factions { poland, hre, france, england, norway, denmark, hungary, lithuania, kievan_rus, russia, cumans, }
if not I_IsFactionAIControlled poland
inc_event_counter poland7_golden_age_player 1
end_if
terminate_monitor
end_if
if I_TurnNumber > 640 ; FALL BACK - in case of failure or a bug
and RandomPercent > 90 ; to add some randomness against the bugs
and I_SettlementOwner Krakow = poland ; at least the capital is in the Polish hands
historic_event POLAND7_GOLDEN_AGE factions { poland, hre, france, england, norway, denmark, hungary, lithuania, kievan_rus, russia, cumans, }
if not I_IsFactionAIControlled poland
inc_event_counter poland7_golden_age_player 1
end_if
terminate_monitor
end_if
end_monitor