Results 1 to 16 of 16

Thread: 6.4 FIX for End Turn CTD, early era turn 128-130

  1. #1

    Icon4 6.4 FIX for End Turn CTD, early era turn 128-130

    This can potentially fix your saved game if your having issues when you end turn and keep CTD on the same faction's turn. Especially if your playing early era campaign and it's approximately turn 128-130 (after teutonic order emerges and are heading to attack Palanga). If you might think the crash is related to kievan rus(or lithuania if kievan rus is dead) because the game crashes when they end their turn (it is trying to switch to Teutonic Order's turn...basically whoever goes before them)
    If your not in playing early era around turn 128-130ish then you can still try similar methods below to try and troubleshoot your particular game, the link below kind of shows my train of thought leading to fixing this.

    I had another thread where you can see where I was struggling with this crash for a few hours and trying to fix my saved game. If your interested it's: http://www.twcenter.net/forums/showthread.php?t=565499

    ********* ********* ********* ********* ********* ********* ********* *********

    Turns out that the problem that would have prevented me from continuing to play my campaign was actually related to the Teutonic Order's turn! Something in the campaign script must be bugged with SS6.4 and the early era campaign, because after more thorough searching I found numerous people complaining about their campaigns coming to an end because of CTD error around turn 128-130...

    I'm sure somebody can fix the campaign script or whatever files that are causing people to lose their campaigns, but I'm not one of those people unfortunately...instead here is the brute force approach to continuing your campaign if your having this error.

    How to fix your campaign= Kill the 2-4 teutonic generals/armies(I had 4) who are attempting to attack near Palanga (I found 3 of the 4 armies hiding in the forest nearby, close to their visible army). You will be using the console(~) and a couple commands to kill these units. After you kill them off with your unit then disband it(don't want a free 3gold chevron unit) and turn fog of war back on and continue playing like normal.
    It's not required, but I'd highly recommend after you find the teutonic order armies you move them all onto the little island (Location 70,280)in the top-right of the map above the british isles...if you don't you will be chasing them around A LOT after they lose and withdraw/retreat each time, they need to be 100% dead and off the campaign map.

    Console Commands I used:

    toggle_fow = turns fog of war on/off, so you can find the Teutonic Order army and kill them
    show_cursorstat = gives the x,y coordinates of where your mouse pointer is for move_character command
    move_character "Captain Oliver" 231,248 = example of how to move unit(Oliver) to a location (231,248)
    character_reset "Captain Oliver" = this gives your unit 100% of his movement back...spam to keep moving
    auto_win attacker = type this into console on the battle screen(shows the odds, etc) and do auto-resolve
    auto_win defender = use same as above...except when you get ambushed while searching the forest for Teutonic Order

    You can also move all 4 of their armies into your lands and kill them yourself if you want to...the Teutonic Order generals that spawn are the following....Grandmaster Herrmann, Councilor Conrad and 2 random name generals (you need to find these yourself and then you can kill them how you'd like)

    move_character "Grandmaster Herrmann" 70,280 will not work...his name is "Herrmann von_Salza" and "Council Conrad" is "Conrad von_Thuringen". move_character "Herrmann von_Salza" 70,280 will work.
    Location 70,280 is an island that I tried to move all 4 armies onto an isolated island above the british isles where they would be stranded(thus unable to siege Palanga), but the game would still crash...these must die to avoid the crash.

    Afterwards I spam end-turned for about 35-40 turns and didn't have a crash after implementing this 'inelegant fix/workaround'. It's not the best solution, but it works and will keep you from having to quit and start over (just to encounter this error again at 128). I will continue playing my campaign normally from here out and if another error occurs then I'll be sure to update this thread, if not then it worked indefinetely!

  2. #2

    Default Re: 6.4 FIX for End Turn CTD, early era turn 128-130

    Got me around a crash dealing with a Jihad siege on Constantinople, for now at least! Thanks! Was really upset by the idea of having to give up my campaign.

  3. #3

    Default Re: 6.4 FIX for End Turn CTD, early era turn 128-130

    Quote Originally Posted by Rosscoliosis View Post
    Got me around a crash dealing with a Jihad siege on Constantinople, for now at least! Thanks! Was really upset by the idea of having to give up my campaign.
    Great to hear!

  4. #4
    SPARTAN VI's Avatar Campidoctor
    Join Date
    Sep 2005
    Location
    United States
    Posts
    1,626

    Default Re: 6.4 FIX for End Turn CTD, early era turn 128-130

    This should be stickied. Almost abandoned my campaign because of the Teutonic Order bug.

    2016 TW: Warhammer Modding Winner!

    SPARTAN VI's Building Progression Icons Mod
    Streaming Total War & Strategy Games - SPARTAN VI's Game Night

  5. #5

    Default Re: 6.4 FIX for End Turn CTD, early era turn 128-130

    Is there a 'Real' Fix for this bug yet?

  6. #6

    Default Re: 6.4 FIX for End Turn CTD, early era turn 128-130

    I'm working on this.
    It will need a new campaign_script.txt file and a restart to the campaign.
    So far I've been sorting out the spawning of priests and merchants.
    I've relocated the spawn sites for the TO armies that appear, but it looks like more drastic surgery is required.
    I'll probably remove all the move commands for names characters and just let the AI decide where to attack.

    A shame this hasn't been sorted out after all this time.

  7. #7

    Default Re: 6.4 FIX for End Turn CTD, early era turn 128-130

    Some code that could help to fix the issue kindly posted by MWY
    Quote Originally Posted by MWY View Post
    @Roz: We don't have the teutonic order spawning anymore, so there's no CTD. I think It could have something to do with the siege script?

    Spoiler Alert, click show to read: 
    Code:
    monitor_event FactionTurnStart FactionType teutonic_order
    and I_TurnNumber = 1
    
    if I_IsFactionAIControlled teutonic_order
    spawn_army
    faction teutonic_order
    character Gojko Petrovic, named character, age 30, x 217, y 148, family
    traits LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
    unit EE Bodyguard exp 2 armour 0 weapon_lvl 0
    unit Slav Levies exp 1 armour 0 weapon_lvl 0
    unit Slav Levies exp 1 armour 0 weapon_lvl 0
    unit Slav Levies exp 1 armour 0 weapon_lvl 0
    unit Slav Levies exp 1 armour 0 weapon_lvl 0
    unit Bashtinik Infantry exp 1 armour 0 weapon_lvl 0
    unit Bashtinik Infantry exp 1 armour 0 weapon_lvl 0
    unit Slav Levies exp 1 armour 0 weapon_lvl 0
    unit Slav Levies exp 1 armour 0 weapon_lvl 0
    end
    end_if
    
    terminate_monitor
    end_monitor
    
    monitor_event FactionTurnStart FactionType teutonic_order
    and IsFactionAIControlled
    and I_CharacterExists Gojko Petrovic
    
    if not I_SettlementOwner Skadar = slave
    terminate_monitor
    end_if
    
    if I_SettlementUnderSiege Skadar
    and I_TurnNumber = 1 ;if settlement under siege already, avoid ctd.
    terminate_monitor
    end_if
    
    if not I_CharacterTypeNearTile teutonic_order, named_character, 0, 217, 148 ;if character not standing where it should, avoid ctd
    terminate_monitor
    end_if
    
    if I_TurnNumber = 2
    console_command auto_win attacker
    siege_settlement Gojko Petrovic, Skadar, attack
    terminate_monitor
    end_if
    
    if I_TurnNumber = 1
    siege_settlement Gojko Petrovic, Skadar, maintain
    end_if 
    end_monitor


    This is a script I use which catches every possible bug. Characters who should take a settlement should spawn directly beneath it. Then you check the location and cancel it when they couldn't spawn because of an army/agents in that location. Other characters who don't need to siege are best spawned in a quiet area with much room around them. I don't know how the SS6.4 script looks so these are just my first thoughts.
    And here the TO code with some tweaks i started to do but im a newbie modding M2TW so need help
    My edits are in red
    Spoiler Alert, click show to read: 
    Code:
    ;============== Teutonic Order Emergent =================
    
    monitor_event EventCounter EventCounterType inquisition
        and EventCounter > 0
    
    
        add_events
            event emergent_faction teutonic_order
            date    0
        end_add_events
    
    
        spawn_army 
            faction teutonic_order
            character Herrmann von_Salza, named character, age 40, x 231, y 244, label teuton4leader, family
            traits FactionleaderTO 1, MilitaryInclination 1 , Military_Edu 3 , NaturalMilitarySkill 2 , GoodCommander 3 , Bloodthirsty 2 , BattleDread 2 , StrategyDread 2 , PublicFaith 3 , ContentGeneral 3 , Prim 2 , ReligionStarter 1
            unit    TO Bodyguard         exp 5 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 4 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 3 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 4 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 3 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Knechten         exp 2 armour 0 weapon_lvl 0
            unit    Knechten         exp 1 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 3 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 2 armour 0 weapon_lvl 0
        end
    
    
        add_money teutonic_order, 5000
    
    
        spawn_army 
            faction teutonic_order
            character Conrad von_Thuringen, named character, age 30, x 232, y 243, label teuton4heir, family
            traits FactionheirTO 1, MilitaryInclination 1 , Military_Edu 3 , NaturalMilitarySkill 1 , GoodCommander 2 , LoyaltyStarter 1 , Drink 1 , PublicFaith 1 , ContentGeneral 3 , ReligionStarter 1
            unit    TO Bodyguard         exp 3 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Order Militia         exp 1 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    Prussian Archers             exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers             exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers             exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers             exp 4 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 2 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 3 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 3 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 2 armour 0 weapon_lvl 0
        end
    
    
        add_money teutonic_order, 5000
        spawn_character teutonic_order random_name, priest, age 27, x 222, y 238 
        spawn_character teutonic_order random_name, priest, age 35, x 224, y 236
            
        historic_event teutonic_order_invasion event/teutonic_faction_intro.bik
    
    
        console_command diplomatic_stance teutonic_order lithuania war
    
    
        destroy_buildings hre teutonic_knights_chapter_house false
    
    
    terminate_monitor
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType teutonic_order
        and I_IsFactionAIControlled lithuania
        and I_TurnNumber < 170
    
    
        console_command diplomatic_stance teutonic_order lithuania war
    
    
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType teutonic_order
        and I_TurnNumber = 165
    
    
        spawn_army 
            faction teutonic_order
            character random_name, named character, age 40, x 231, y 248, family, direction E
            traits MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 2 , BattleDread 2 , StrategyDread 2 , PublicFaith 2 , Drink 2 , ReligionStarter 1
            unit    TO Bodyguard         exp 5 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 4 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 3 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 4 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 3 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Knechten         exp 2 armour 0 weapon_lvl 0
            unit    Knechten         exp 1 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 3 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 2 armour 0 weapon_lvl 0
        end
    
    
        add_money teutonic_order 5000
    terminate_monitor
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType teutonic_order
        and I_TurnNumber = 170
        and not I_SettlementOwner Palanga = teutonic_order
        and not I_SettlementOwner Riga = teutonic_order
    
    
        spawn_army 
            faction teutonic_order
            character random_name, named character, age 40, x 232, y 248, family, direction E
            traits MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 2 , BattleDread 2 , StrategyDread 2 , PublicFaith 2 , Drink 2 , ReligionStarter 1
            unit    TO Bodyguard         exp 5 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 4 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 3 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 4 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 3 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Knechten         exp 2 armour 0 weapon_lvl 0
            unit    Knechten         exp 1 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 3 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 2 armour 0 weapon_lvl 0
        end
    
    
        spawn_army 
            faction teutonic_order
            character random_name, named character, age 22, x 233, y 248, family, direction E
            traits MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 3 , BattleDread 2 , StrategyDread 2 , PublicFaith 2 , Drink 2 , ReligionStarter 1
            unit    TO Bodyguard         exp 5 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 4 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 3 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 4 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 3 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Knechten         exp 2 armour 0 weapon_lvl 0
            unit    Knechten         exp 1 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 3 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 2 armour 0 weapon_lvl 0
        end
    
    
        spawn_army 
            faction teutonic_order
            character random_name, named character, age 20, x 234, y 248, family, direction E
            traits MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 3 , BattleDread 3 , StrategyDread 2 , PublicFaith 2 , Drink 2 , ReligionStarter 1
            unit    TO Bodyguard         exp 5 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 4 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 3 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 4 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 3 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Knechten         exp 2 armour 0 weapon_lvl 0
            unit    Knechten         exp 1 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 3 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 2 armour 0 weapon_lvl 0
        end
    
    
        add_money teutonic_order 40000
    terminate_monitor
    end_monitor
    
    
    declare_counter attack_palanga
    set_counter attack_palanga 0
    
    
    monitor_event FactionTurnStart FactionType teutonic_order
        and not I_SettlementOwner Palanga = teutonic_order
        and I_CharacterExists teuton4leader
        and I_CharacterExists teuton4heir
        
        if I_SettlementUnderSiege Palanga
            and I_TurnNumber >= 1 ;if settlement under siege already, avoid ctd.
            terminate_monitor
        end_if
    
    
        if I_CompareCounter attack_palanga = 1
            siege_settlement teuton4leader, Palanga, maintain
            siege_settlement teuton4heir, Palanga, attack
            set_counter attack_palanga 2
            move teuton4heir, 250, 255;for riga
            terminate_monitor
        end_if
    
    
        if not I_SettlementUnderSiege Palanga
            if I_CompareCounter attack_palanga = 0
                siege_settlement teuton4leader, Palanga, maintain
                siege_settlement teuton4heir, Palanga, maintain
                set_counter attack_palanga 1
            end_if
        end_if
    end_monitor
    
    
    declare_counter attack_riga
    set_counter attack_riga 0
    
    
    monitor_event FactionTurnStart FactionType teutonic_order
        and I_CharacterExists teuton4heir
        and I_CompareCounter attack_palanga = 2
        
        if I_SettlementUnderSiege Riga
            and I_TurnNumber >= 1 ;if settlement under siege already, avoid ctd.
            terminate_monitor
        end_if
    
    
        if not I_CharacterTypeNearTile teutonic_order, named_character, 1, 250, 255
            move teuton4heir, 250, 255
        end_if
    
    
        if I_CompareCounter attack_riga = 1
            siege_settlement teuton4heir, Riga, attack
            set_counter attack_riga 0
        end_if
    
    
        if not I_SettlementUnderSiege Riga
            if I_CharacterTypeNearTile teutonic_order, named_character, 0, 249, 254
                siege_settlement teuton4heir, Riga, maintain
                set_counter attack_riga 1
            end_if
    
    
            if I_CharacterTypeNearTile teutonic_order, named_character, 1, 250, 255
                siege_settlement teuton4heir, Riga, maintain
                set_counter attack_riga 1
            end_if
        end_if
    
    
        if I_SettlementOwner Riga = teutonic_order
            terminate_monitor
        end_if
    end_monitor


    So next would be to make the "Grand Master Von Salza" Spawn right next to Riga and then other Conrad Guy at Palanga or vice versa, then make them siege the settlements right away, right?

    And finally add the terminate_monitor if they dont spawn in their intended location due of some obstruction?

    Also i think some faction owner filter should be added for sieging those settlement, ei like only if owned by lithuania or slave faction...so the TO dont declare war to catholic factions that might have conquered those territories in the previous ~50 turns.

    I got some ideas while doing the Re-Emergent Factions submod, that would make the TO spawn on these two settlements without needing the Horde ability...which could work also to make Lithuania spawn a bit before that as well...since a Lithuanian State at 1100AD is not historically acurate...but well these are just ideas for my little submod xD.

    Extra modification of the TO Script using MWY's one as base
    Spoiler Alert, click show to read: 
    Code:
    ;============== Teutonic Order Emergent =================
    
    monitor_event EventCounter EventCounterType inquisition
        and EventCounter > 0
    
    
        add_events
            event emergent_faction teutonic_order
            date    0
        end_add_events
    
    
        spawn_army 
            faction teutonic_order
    ;        character Herrmann von_Salza, named character, age 40, x 231, y 244, label teuton4leader, family
    ;        Spawns right under Palanga
            character Herrmann von_Salza, named character, age 40, x 224, y 238, label teuton4leader, family
            traits FactionleaderTO 1, MilitaryInclination 1 , Military_Edu 3 , NaturalMilitarySkill 2 , GoodCommander 3 , Bloodthirsty 2 , BattleDread 2 , StrategyDread 2 , PublicFaith 3 , ContentGeneral 3 , Prim 2 , ReligionStarter 1
            unit    TO Bodyguard         exp 5 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 4 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 3 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 4 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 3 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Knechten         exp 2 armour 0 weapon_lvl 0
            unit    Knechten         exp 1 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 3 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 2 armour 0 weapon_lvl 0
        end
    
    
        add_money teutonic_order, 5000
    
    
        spawn_army 
            faction teutonic_order
    ;        character Conrad von_Thuringen, named character, age 30, x 232, y 243, label teuton4heir, family
    ;        Spawns right under Riga
            character Conrad von_Thuringen, named character, age 30, x 250, y 254, label teuton4heir, family
            traits FactionheirTO 1, MilitaryInclination 1 , Military_Edu 3 , NaturalMilitarySkill 1 , GoodCommander 2 , LoyaltyStarter 1 , Drink 1 , PublicFaith 1 , ContentGeneral 3 , ReligionStarter 1
            unit    TO Bodyguard         exp 3 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Order Militia         exp 1 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    Prussian Archers             exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers             exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers             exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers             exp 4 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 2 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 3 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 3 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 2 armour 0 weapon_lvl 0
        end
    
    
        add_money teutonic_order, 5000
        spawn_character teutonic_order random_name, priest, age 27, x 222, y 238 
        spawn_character teutonic_order random_name, priest, age 35, x 224, y 236
            
        historic_event teutonic_order_invasion event/teutonic_faction_intro.bik
    
    
        console_command diplomatic_stance teutonic_order lithuania war
    
    
        destroy_buildings hre teutonic_knights_chapter_house false
    
    
    terminate_monitor
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType teutonic_order
        and not I_SettlementOwner Palanga = teutonic_order
        and I_CharacterExists teuton4leader
    
        if not I_SettlementOwner Palanga = lithuania
        and not I_SettlementOwner Palanga = slave
        and not I_SettlementOwner Palanga = russia
        and not I_SettlementOwner Palanga = kievan_rus
        and not I_SettlementOwner Palanga = cumans
            terminate_monitor
        end_if
    
        if I_SettlementUnderSiege Palanga;if settlement under siege already, avoid ctd.
            terminate_monitor
        end_if
    
    
        if not I_CharacterTypeNearTile teutonic_order, named_character, 0, 224, 238 ;if character not standing where it should, avoid ctd
            terminate_monitor
        end_if
    
    
        if not I_SettlementUnderSiege Palanga
            siege_settlement teuton4leader, Palanga, maintain
            terminate_monitor
        end_if
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType teutonic_order
        and not I_SettlementOwner Riga = teutonic_order
        and I_CharacterExists teuton4heir
    
        if not I_SettlementOwner Riga = lithuania
        and not I_SettlementOwner Riga = slave
        and not I_SettlementOwner Riga = russia
        and not I_SettlementOwner Riga = kievan_rus
        and not I_SettlementOwner Riga = cumans
            terminate_monitor
        end_if
    
        if I_SettlementUnderSiege Riga;if settlement under siege already, avoid ctd.
            terminate_monitor
        end_if
    
    
        if not I_CharacterTypeNearTile teutonic_order, named_character, 0, 250, 254 ;if character not standing where it should, avoid ctd
            terminate_monitor
        end_if
    
    
        if not I_SettlementUnderSiege Riga
            siege_settlement teuton4heir, Riga, maintain
            terminate_monitor
        end_if
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType teutonic_order
        and I_IsFactionAIControlled lithuania
        and I_TurnNumber < 170
    
    
        console_command diplomatic_stance teutonic_order lithuania war
    
    
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType teutonic_order
        and I_TurnNumber = 165
    
    
        spawn_army 
            faction teutonic_order
            character random_name, named character, age 40, x 231, y 248, family, direction E
            traits MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 2 , BattleDread 2 , StrategyDread 2 , PublicFaith 2 , Drink 2 , ReligionStarter 1
            unit    TO Bodyguard         exp 5 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 4 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 3 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 4 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 3 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Knechten         exp 2 armour 0 weapon_lvl 0
            unit    Knechten         exp 1 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 3 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 2 armour 0 weapon_lvl 0
        end
    
    
        add_money teutonic_order 5000
    terminate_monitor
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType teutonic_order
        and I_TurnNumber = 170
        and not I_SettlementOwner Palanga = teutonic_order
        and not I_SettlementOwner Riga = teutonic_order
    
    
        spawn_army 
            faction teutonic_order
            character random_name, named character, age 40, x 232, y 248, family, direction E
            traits MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 2 , BattleDread 2 , StrategyDread 2 , PublicFaith 2 , Drink 2 , ReligionStarter 1
            unit    TO Bodyguard         exp 5 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 4 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 3 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 4 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 3 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Knechten         exp 2 armour 0 weapon_lvl 0
            unit    Knechten         exp 1 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 3 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 2 armour 0 weapon_lvl 0
        end
    
    
        spawn_army 
            faction teutonic_order
            character random_name, named character, age 22, x 233, y 248, family, direction E
            traits MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 3 , BattleDread 2 , StrategyDread 2 , PublicFaith 2 , Drink 2 , ReligionStarter 1
            unit    TO Bodyguard         exp 5 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 4 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 3 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 4 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 3 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Knechten         exp 2 armour 0 weapon_lvl 0
            unit    Knechten         exp 1 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 3 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 2 armour 0 weapon_lvl 0
        end
    
    
        spawn_army 
            faction teutonic_order
            character random_name, named character, age 20, x 234, y 248, family, direction E
            traits MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 3 , BattleDread 3 , StrategyDread 2 , PublicFaith 2 , Drink 2 , ReligionStarter 1
            unit    TO Bodyguard         exp 5 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 4 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 3 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 4 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 3 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Knechten         exp 2 armour 0 weapon_lvl 0
            unit    Knechten         exp 1 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 3 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 2 armour 0 weapon_lvl 0
        end
    
    
        add_money teutonic_order 40000
    terminate_monitor
    end_monitor
    
    ;;Old scripted sieges of Riga and Palanga that caused CTD
    ;declare_counter attack_palanga
    ;set_counter attack_palanga 0
    ;
    ;monitor_event FactionTurnStart FactionType teutonic_order
    ;    and not I_SettlementOwner Palanga = teutonic_order
    ;    and I_CharacterExists teuton4leader
    ;    and I_CharacterExists teuton4heir
    ;
    ;    if I_SettlementUnderSiege Palanga
    ;        and I_TurnNumber >= 1 ;if settlement under siege already, avoid ctd.
    ;        terminate_monitor
    ;    end_if
    ;
    ;    if I_CompareCounter attack_palanga = 1
    ;        siege_settlement teuton4leader, Palanga, maintain
    ;        siege_settlement teuton4heir, Palanga, attack
    ;        set_counter attack_palanga 2
    ;        move teuton4heir, 250, 255;for riga
    ;        terminate_monitor
    ;    end_if
    ;
    ;    if not I_SettlementUnderSiege Palanga
    ;        if I_CompareCounter attack_palanga = 0
    ;            siege_settlement teuton4leader, Palanga, maintain
    ;            siege_settlement teuton4heir, Palanga, maintain
    ;            set_counter attack_palanga 1
    ;        end_if
    ;    end_if
    ;end_monitor
    ;
    ;declare_counter attack_riga
    ;set_counter attack_riga 0
    ;
    ;monitor_event FactionTurnStart FactionType teutonic_order
    ;    and I_CharacterExists teuton4heir
    ;    and I_CompareCounter attack_palanga = 2
    ;
    ;    if I_SettlementUnderSiege Riga
    ;        and I_TurnNumber >= 1 ;if settlement under siege already, avoid ctd.
    ;        terminate_monitor
    ;    end_if
    ;
    ;    if not I_CharacterTypeNearTile teutonic_order, named_character, 1, 250, 255
    ;        move teuton4heir, 250, 255
    ;    end_if
    ;
    ;    if I_CompareCounter attack_riga = 1
    ;        siege_settlement teuton4heir, Riga, attack
    ;        set_counter attack_riga 0
    ;    end_if
    ;
    ;    if not I_SettlementUnderSiege Riga
    ;        if I_CharacterTypeNearTile teutonic_order, named_character, 0, 249, 254
    ;            siege_settlement teuton4heir, Riga, maintain
    ;            set_counter attack_riga 1
    ;        end_if
    ;        if I_CharacterTypeNearTile teutonic_order, named_character, 1, 250, 255
    ;            siege_settlement teuton4heir, Riga, maintain
    ;            set_counter attack_riga 1
    ;        end_if
    ;    end_if
    ;
    ;    if I_SettlementOwner Riga = teutonic_order
    ;        terminate_monitor
    ;    end_if
    ;end_monitor
    Last edited by Melooo182; February 12, 2014 at 08:26 AM.

  8. #8

    Default Re: 6.4 FIX for End Turn CTD, early era turn 128-130

    Sadly I have lost use of my PC with all the files on it for a short while due to the power supply unit blowing up.
    (I'm hoping it didn't damage anything else.)

    In some ways it might just be simpler to spawn the TO armies near Riga and Palanga and then remove all the siege commands. That will let the AI decide where they go after that.
    No need to check who owns settlements or where anybody is or who is alive. Just spawn armies and forget.
    If they just stand around being useless that's better than risking a CTD.

  9. #9

    Default Re: 6.4 FIX for End Turn CTD, early era turn 128-130

    Ok i think i got it, No CTDs after testing 5 times xD, yeah i know it needs to be tested more, any volunteers?.

    Spoiler for Script
    Code:
    ;============== Teutonic Order Emergent =================
    
    monitor_event EventCounter EventCounterType inquisition
        and EventCounter > 0
    ;monitor_event FactionTurnEnd FactionType slave;    testing
    ;    and I_TurnNumber = 2;            testing
    
    
        add_events
            event emergent_faction teutonic_order
            date    0
        end_add_events
    
    
        spawn_army 
            faction teutonic_order
    ;        character Herrmann von_Salza, named character, age 40, x 231, y 244, label teuton4leader, family
    ;        Spawns right under Palanga
            character Herrmann von_Salza, named character, family, age 40, x 224, y 238, label teuton4leader, direction N
            traits FactionleaderTO 1, MilitaryInclination 1 , Military_Edu 3 , NaturalMilitarySkill 2 , GoodCommander 3 , Bloodthirsty 2 , BattleDread 2 , StrategyDread 2 , PublicFaith 3 , ContentGeneral 3 , Prim 2 , ReligionStarter 1
            unit    TO Bodyguard         exp 5 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 4 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 3 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 4 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 3 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Knechten         exp 2 armour 0 weapon_lvl 0
            unit    Knechten         exp 1 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 3 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 2 armour 0 weapon_lvl 0
        end
    
    
        add_money teutonic_order, 5000
    
    
        spawn_army 
            faction teutonic_order
    ;        character Conrad von_Thuringen, named character, age 30, x 232, y 243, label teuton4heir, family
    ;        Spawns right under Riga
            character Conrad von_Thuringen, named character, family, age 30, x 250, y 254, label teuton4heir, direction N
            traits FactionheirTO 1, MilitaryInclination 1 , Military_Edu 3 , NaturalMilitarySkill 1 , GoodCommander 2 , LoyaltyStarter 1 , Drink 1 , PublicFaith 1 , ContentGeneral 3 , ReligionStarter 1
            unit    TO Bodyguard         exp 3 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Order Militia         exp 1 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    Prussian Archers             exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers             exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers             exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers             exp 4 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 2 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 3 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 3 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 2 armour 0 weapon_lvl 0
        end
    
    
        add_money teutonic_order, 5000
        spawn_character teutonic_order random_name, priest, age 27, x 222, y 238 
        spawn_character teutonic_order random_name, priest, age 35, x 224, y 236
            
        historic_event teutonic_order_invasion event/teutonic_faction_intro.bik
    
    
        console_command diplomatic_stance teutonic_order lithuania war
    
    
        destroy_buildings hre teutonic_knights_chapter_house false
    
    
    terminate_monitor
    end_monitor
    
    
    declare_counter attack_palanga
    set_counter attack_palanga 0
    
    
    monitor_event FactionTurnStart FactionType teutonic_order
        and not I_SettlementOwner Palanga = teutonic_order
        and I_CharacterExists teuton4leader
        
        if not I_SettlementOwner Palanga = lithuania
        and not I_SettlementOwner Palanga = slave
        and not I_SettlementOwner Palanga = russia
        and not I_SettlementOwner Palanga = kievan_rus
        and not I_SettlementOwner Palanga = cumans
            terminate_monitor
        end_if
        
        if I_SettlementUnderSiege Palanga;if settlement under siege already, avoid ctd.
        and  I_CompareCounter attack_palanga = 0
            terminate_monitor
        end_if
    
    
        if not I_CharacterTypeNearTile teutonic_order, named_character, 0, 224, 238 ;if character not standing where it should, avoid ctd
            terminate_monitor
        end_if
    
    
        if not I_SettlementUnderSiege Palanga
            siege_settlement teuton4leader, Palanga, maintain
            set_counter attack_palanga 1
        end_if
    
    
        if I_SettlementUnderSiege Palanga
        and I_CompareCounter attack_palanga = 1
            siege_settlement teuton4leader, Palanga, attack
            set_counter attack_palanga 0
            terminate_monitor
        end_if    
    end_monitor
    
    
    declare_counter attack_riga
    set_counter attack_riga 0
    
    
    monitor_event FactionTurnStart FactionType teutonic_order
        and not I_SettlementOwner Riga = teutonic_order
        and I_CharacterExists teuton4heir
        
        if not I_SettlementOwner Riga = lithuania
        and not I_SettlementOwner Riga = slave
        and not I_SettlementOwner Riga = russia
        and not I_SettlementOwner Riga = kievan_rus
        and not I_SettlementOwner Riga = cumans
            terminate_monitor
        end_if
        
        if I_SettlementUnderSiege Riga;if settlement under siege already, avoid ctd.
        and I_CompareCounter attack_riga = 0
            terminate_monitor
        end_if
    
    
        if not I_CharacterTypeNearTile teutonic_order, named_character, 0, 250, 254 ;if character not standing where it should, avoid ctd
            terminate_monitor
        end_if
    
    
        if not I_SettlementUnderSiege Riga
            siege_settlement teuton4heir, Riga, maintain
            set_counter attack_riga 1
        end_if
    
    
        if I_SettlementUnderSiege Riga
        and I_CompareCounter attack_riga = 1
            siege_settlement teuton4leader, Palanga, attack
            set_counter attack_riga 0
            terminate_monitor
        end_if    
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType teutonic_order
        and I_IsFactionAIControlled lithuania
        and I_TurnNumber < 170
    
    
        console_command diplomatic_stance teutonic_order lithuania war
    
    
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType teutonic_order
        and I_TurnNumber = 165
    
    
        spawn_army 
            faction teutonic_order
            character random_name, named character, age 40, x 231, y 248, family, direction E
            traits MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 2 , BattleDread 2 , StrategyDread 2 , PublicFaith 2 , Drink 2 , ReligionStarter 1
            unit    TO Bodyguard         exp 5 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 4 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 3 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 4 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 3 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Knechten         exp 2 armour 0 weapon_lvl 0
            unit    Knechten         exp 1 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 3 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 2 armour 0 weapon_lvl 0
        end
    
    
        add_money teutonic_order 5000
    terminate_monitor
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType teutonic_order
        and I_TurnNumber = 170
        and not I_SettlementOwner Palanga = teutonic_order
        and not I_SettlementOwner Riga = teutonic_order
    
    
        spawn_army 
            faction teutonic_order
            character random_name, named character, age 40, x 232, y 248, family, direction E
            traits MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 2 , BattleDread 2 , StrategyDread 2 , PublicFaith 2 , Drink 2 , ReligionStarter 1
            unit    TO Bodyguard         exp 5 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 4 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 3 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 4 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 3 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Knechten         exp 2 armour 0 weapon_lvl 0
            unit    Knechten         exp 1 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 3 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 2 armour 0 weapon_lvl 0
        end
    
    
        spawn_army 
            faction teutonic_order
            character random_name, named character, age 22, x 233, y 248, family, direction E
            traits MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 3 , BattleDread 2 , StrategyDread 2 , PublicFaith 2 , Drink 2 , ReligionStarter 1
            unit    TO Bodyguard         exp 5 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 4 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 3 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 4 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 3 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Knechten         exp 2 armour 0 weapon_lvl 0
            unit    Knechten         exp 1 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 3 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 2 armour 0 weapon_lvl 0
        end
    
    
        spawn_army 
            faction teutonic_order
            character random_name, named character, age 20, x 234, y 248, family, direction E
            traits MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 3 , BattleDread 3 , StrategyDread 2 , PublicFaith 2 , Drink 2 , ReligionStarter 1
            unit    TO Bodyguard         exp 5 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Order Militia         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 2 armour 0 weapon_lvl 0
            unit    Sword Brethren         exp 3 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 4 armour 0 weapon_lvl 0
            unit    Burgher Pikemen         exp 3 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    NE Catapult            exp 1 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 3 armour 0 weapon_lvl 0
            unit    Prussian Archers         exp 4 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 3 armour 0 weapon_lvl 0
            unit    Christ Knights         exp 1 armour 0 weapon_lvl 0
            unit    Knechten         exp 2 armour 0 weapon_lvl 0
            unit    Knechten         exp 1 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 3 armour 0 weapon_lvl 0
            unit    Ritterbruder         exp 2 armour 0 weapon_lvl 0
        end
    
    
        add_money teutonic_order 40000
    terminate_monitor
    end_monitor
    
    
    ;;Old scripted sieges of Riga and Palanga that caused CTD
    ;declare_counter attack_palanga
    ;set_counter attack_palanga 0
    ;
    ;monitor_event FactionTurnStart FactionType teutonic_order
    ;    and not I_SettlementOwner Palanga = teutonic_order
    ;    and I_CharacterExists teuton4leader
    ;    and I_CharacterExists teuton4heir
    ;
    ;    if I_CompareCounter attack_palanga = 1
    ;        siege_settlement teuton4leader, Palanga, maintain
    ;        siege_settlement teuton4heir, Palanga, attack
    ;        set_counter attack_palanga 2
    ;        move teuton4heir, 250, 255;for riga
    ;        terminate_monitor
    ;    end_if
    ;
    ;    if not I_SettlementUnderSiege Palanga
    ;        if I_CompareCounter attack_palanga = 0
    ;            siege_settlement teuton4leader, Palanga, maintain
    ;            siege_settlement teuton4heir, Palanga, maintain
    ;            set_counter attack_palanga 1
    ;        end_if
    ;    end_if
    ;end_monitor
    ;
    ;declare_counter attack_riga
    ;set_counter attack_riga 0
    ;
    ;monitor_event FactionTurnStart FactionType teutonic_order
    ;    and I_CharacterExists teuton4heir
    ;    and I_CompareCounter attack_palanga = 2
    ;
    ;    if not I_CharacterTypeNearTile teutonic_order, named_character, 1, 250, 255
    ;        move teuton4heir, 250, 255
    ;    end_if
    ;
    ;    if I_CompareCounter attack_riga = 1
    ;        siege_settlement teuton4heir, Riga, attack
    ;        set_counter attack_riga 0
    ;    end_if
    ;
    ;    if not I_SettlementUnderSiege Riga
    ;        if I_CharacterTypeNearTile teutonic_order, named_character, 0, 249, 254
    ;            siege_settlement teuton4heir, Riga, maintain
    ;            set_counter attack_riga 1
    ;        end_if
    ;        if I_CharacterTypeNearTile teutonic_order, named_character, 1, 250, 255
    ;            siege_settlement teuton4heir, Riga, maintain
    ;            set_counter attack_riga 1
    ;        end_if
    ;    end_if
    ;
    ;    if I_SettlementOwner Riga = teutonic_order
    ;        terminate_monitor
    ;    end_if
    ;end_monitor


    If want to test it
    DOWNLOAD HERE
    It makes use of the SMM so can be applied or removed any time using SS_setup.exe

    NOT savegame compatible, i'm sorry this is just how changes on campaign_script.txt works, you'll need to start a new campaign.
    Last edited by Melooo182; March 02, 2014 at 09:45 AM.

  10. #10

    Default Re: 6.4 FIX for End Turn CTD, early era turn 128-130

    The fix didn't work for me. It's still crashing right after Kiev tries to pass its turn to the Teutons. This is very frustrating, I don't really want to kill off the Teutonic Order because their presence was something i was looking forward to.

  11. #11

    Default Re: 6.4 FIX for End Turn CTD, early era turn 128-130

    Dang, just to be sure, did you start a new campaign after applying the fix?
    Forgot to say the fix is not savegame compatible :/
    Last edited by Melooo182; March 02, 2014 at 09:53 AM.

  12. #12

    Default Re: 6.4 FIX for End Turn CTD, early era turn 128-130

    Corrected a small mistake on the script that could create problems

    removed the check for non catholic faction before sieging Palanga or Riga

  13. #13

    Default Re: 6.4 FIX for End Turn CTD, early era turn 128-130

    So is this something I should be using? My situation is that I'm on turn 130 and the Teutonic Order is sieging Riga. Every time they attack the game either crashes while loading the battle or about a minute into the battle (I can't autoresolve because I would lose big time). Before this constant CTD I only had 1 CTD which was due to needing the knights hospitaller fix. I have been looking at and trying every CTD fix I can find, but I'm wondering if it's the TO that's the problem. Also, I'm playing as Venice and my log is here if it helps.

    14:38:27.219 [system.rpt] [always] CPU: SSE2
    14:38:27.235 [system.rpt] [always] ==== system log start, build date: Feb 25 2008 version development ===
    14:38:27.235 [system.io] [always] mounted pack packs/data_0.pack
    14:38:27.235 [system.io] [always] mounted pack packs/data_1.pack
    14:38:27.235 [system.io] [always] mounted pack packs/data_2.pack
    14:38:27.235 [system.io] [always] mounted pack packs/data_3.pack
    14:38:27.235 [system.io] [always] mounted pack packs/data_4.pack
    14:38:27.235 [system.io] [always] mounted pack packs/localized.pack
    15:02:12.947 [system.rpt] [error] Medieval 2: Total War encountered an unspecified error and will now exit.

  14. #14

    Default Re: 6.4 FIX for End Turn CTD, early era turn 128-130

    To fix your current campaign follow what is on the OP, for future campaigns you should rather get the bugfix compilation which already contains the script in post 9.

  15. #15

    Default Re: 6.4 FIX for End Turn CTD, early era turn 128-130

    Thanks! Will do that.

  16. #16

    Default Re: 6.4 FIX for End Turn CTD, early era turn 128-130

    In this post by Melooo182 (it's post #7 in this thread) ...
    http://www.twcenter.net/forums/showt...1#post13629426

    ... there are three quoted text passages. Into which file (and in which folder the file) do I put these these 3 texts? And is it adding or replacing?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •