Got another one. Norman campaign, turn 104. Got CTD during end turn. Reloaded, turned off FOW, ended turn again. Cause of CTD is that a spawned Viking raid shows up and besieges Dubhlinn, which is owned by the Vikings.
Edit: The campaign script apparently doesn't check if the settlement is owned by the Vikings before initiating the siege.
Code:
;--- 917 Mide Theas, Dubhlinn ---
declare_counter siege_Dublin
monitor_event FactionTurnStart FactionType spain
and I_TurnNumber = 103
and not I_SettlementOwner Dublin = norway
and not I_SettlementOwner Dublin = horda
and not I_SettlementOwner Dublin = denmark
and not I_SettlementOwner Dublin = normans
spawn_army
faction spain
character Thor, general, age 29, x 68, y 81, label v21, direction W
unit Huskarl Swordsmen exp 4 armour 0 weapon_lvl 0
unit Sami Warriors exp 2 armour 0 weapon_lvl 0
unit Leidgangr Spearmen exp 2 armour 0 weapon_lvl 0
unit Leidgangr Spearmen exp 2 armour 0 weapon_lvl 0
unit Herkledi Spearmen exp 3 armour 0 weapon_lvl 0
unit Herkledi Spearmen exp 3 armour 0 weapon_lvl 0
unit Vikingr Axemen exp 3 armour 0 weapon_lvl 0
unit Vikingr Axemen exp 3 armour 0 weapon_lvl 0
unit Leidgangr Archers exp 2 armour 0 weapon_lvl 0
unit Norse Swordsmen exp 3 armour 0 weapon_lvl 0
unit Norse Swordsmen exp 3 armour 0 weapon_lvl 0
sieging
siege_settlement v21, Dublin, maintain
add_events
event historic raid_dublin
date 0
position 68, 81
end_add_events
reveal_tile 68, 81
terminate_monitor
end_monitor
monitor_event FactionTurnEnd FactionType spain
and I_CharacterExists v21
and not I_SettlementOwner Dublin = norway
and not I_SettlementOwner Dublin = horda
and not I_SettlementOwner Dublin = denmark
and not I_SettlementOwner Dublin = normans
and I_SettlementUnderSiege Dublin
if I_CompareCounter siege_Dublin < 2
siege_settlement v21, Dublin, maintain
end_if
if I_CompareCounter siege_Dublin = 2
siege_settlement v21, Dublin, attack
terminate_monitor
end_if
inc_counter siege_Dublin 1
end_monitor
Should there be this check for these raids?
Code:
and not I_SettlementOwner Dublin = spain