Ptolemaioi & The Spartan Intervention Mission?

Thread: Ptolemaioi & The Spartan Intervention Mission?

  1. Malagricus said:

    Default Ptolemaioi & The Spartan Intervention Mission?

    Hello!

    Playing as Ptolemies the mission restoring the exiled spartan king Kleomenes didn't work properly for me.

    Epiros took Sparte as intended and the next turn, the script fired and i got asked if i would accept Kleomenes as guest (which i accepted).
    But instead of waiting a few turns before suggesting i should try and reconquer Sparte (at least that's what i read from the actual script), the "timer has run out" part of the script starts instantly and Kleomenes appears as a rebel near Alexandreia (Sparte is still being held by the Epirotes).

    I have tried it a few times (reloading previous savegame & starting a new campaign), but always with the same outcome, which makes me think that there is a bug hidden somewhere in this part of the script.
    Has this mission worked as intended for anyone else?

    Regards,
    Malagricus.
     
  2. QuintusSertorius's Avatar

    QuintusSertorius said:

    Default Re: Ptolemaioi & The Spartan Intervention Mission?

    Yes, I spotted that on charlieh's Let's Play and investigated, there's a bug. Fixed in 2.3a, if you want to update your own script with the fixed one, you need to replace it with this:

    Code: [View]
        ; Installing a Spartan client in Sparte, in the event it falls
    
        ; The Fall of Sparte
    
        monitor_event FactionTurnStart FactionType f_ptolemaioi
            if I_IsFactionAIControlled f_ptolemaioi            ; not for the AI
                terminate_monitor
            end_if
            if I_SettlementOwner sett_090 != f_kh              ; Koinon Hellenon have lost Sparte
                and I_EventCounter HE_EXILED_SPARTAN_KING < 1  ; not triggered
                set_event_counter SparteHasFallen 1
                historic_event HE_EXILED_SPARTAN_KING true factions { f_ptolemaioi, } ; An exile from Sparte
    
                while I_EventCounter HE_EXILED_SPARTAN_KING_accepted = 0 ;;; while-loop to pause the script until a decision is made
                    and I_EventCounter HE_EXILED_SPARTAN_KING_declined = 0
                end_while
    
                if I_EventCounter HE_EXILED_SPARTAN_KING_accepted = 1
                    set_event_counter KleomenesGuest 1
                end_if
                if I_EventCounter HE_EXILED_SPARTAN_KING_declined = 1
                    terminate_monitor
                end_if
            end_if
            if I_EventCounter KleomenesGuest > 0
                if I_EventCounter HE_RESTORE_KLEOMENES < 1           ; event hasn't triggered yet
                    generate_random_counter start_expedition 1 5     ; generating a number between 1 and 5
                    if I_EventCounter start_expedition = 2               ; 20% chance of occurring
                        and I_EventCounter HE_RESTORE_KLEOMENES < 1      ; event hasn't triggered yet
                        historic_event HE_RESTORE_KLEOMENES factions { f_ptolemaioi, }  ; Notification that it's time to go
                        set_event_counter RecoverSparteTimer 1
                    end_if
                end_if
                if I_EventCounter RecoverSparteTimer > 12             ; it's been 12 turns
                    and I_EventCounter RecoverSparteTimer < 14
                    if I_SettlementOwner sett_090 != f_ptolemaioi   ; still haven't recovered Sparte
                        and I_EventCounter HE_RESTORE_KLEOMENES_HURRY < 1
                        historic_event HE_RESTORE_KLEOMENES_HURRY factions { f_ptolemaioi, }  ; Notification that there's only 8 more turns of patience
                    end_if
                end_if
                if I_EventCounter RecoverSparteTimer > 0             ; timer hasn't run out
                    and I_EventCounter RecoverSparteTimer < 21
                    if I_SettlementOwner sett_090 = f_ptolemaioi   ; have recovered Sparte
                        spawn_army
                            faction f_ptolemaioi
                            character	Kleomenes Agiades, named character, age 35, x 184, y 130 ; spawns next to Sparte
                            traits  NaturalIntelligence 4 , NaturalCharisma 3 , NaturalEnergy 4 , Selflessness 2 , Temperament 3 , LoyaltyLevel 5 , TurnsAlive 3 , CommandExperience 3, GoodLeader 2, ClientRuler 2 , Client090 1 , EthnoDetermined 1
                            unit	hellenistic infantry hoplitai spartiatai		exp 1 armour 0 weapon_lvl 0
                        end
                        console_command give_ancillary "Kleomenes Agiades" mercenary_captain
                        console_command remove_trait "Kleomenes Agiades" FamilyTracker       ; To stop Interloper/Impostor appearing
                        console_command create_building sett_090 oligone                     ; placing an Allied Oligarchy
                        historic_event HE_KLEOMENES_GIVES_THANKS factions { f_ptolemaioi, }  ; Success!
                        terminate_monitor
                    end_if
                end_if
                if I_EventCounter RecoverSparteTimer > 20             ; timer has run out
                    if I_SettlementOwner sett_090 != f_ptolemaioi   ; still haven't recovered Sparte
                        spawn_army
                            faction slave, sub_faction f_kh
                            character	KleomenesX, named character, age 35, x 236, y 96, portrait wgreek6, direction W
                            traits  NaturalIntelligence 4 , NaturalCharisma 3 , NaturalEnergy 4 , Selflessness 2 , Temperament 3 , TurnsAlive 3 , CommandExperience 3 , GoodLeader 2 , Spartiates 1
                            unit	hellenistic infantry hoplitai spartiatai		exp 1 armour 0 weapon_lvl 0
                            unit	hellenistic infantry hoplitai		exp 1 armour 0 weapon_lvl 0
                            unit	hellenistic infantry hoplitai haploi		exp 0 armour 0 weapon_lvl 0
                            unit	hellenistic infantry hoplitai haploi		exp 0 armour 0 weapon_lvl 0
                            unit	hellenistic infantry hemithorakitai		exp 1 armour 0 weapon_lvl 0
                            unit	hellenistic infantry akontistai		exp 0 armour 0 weapon_lvl 0
                            unit	hellenistic infantry cretan		exp 1 armour 0 weapon_lvl 0
                            unit	hellenistic missile cretan archers		exp 1 armour 0 weapon_lvl 0
                        end
                        console_command give_ancillary "KleomenesX" mercenary_captain
                        add_settlement_turmoil sett_178 4
                        historic_event HE_KLEOMENES_REBELS factions { f_ptolemaioi, }  ; Revolt!
                        terminate_monitor
                    end_if
                end_if
            end_if
            if I_EventCounter RecoverSparteTimer > 0           ; checking the clock has started
                inc_event_counter RecoverSparteTimer 1         ; increasing timer
            end_if
            if I_EventCounter SparteHasFallen > 0            ; Script has already been triggered
                and I_SettlementOwner sett_090 = f_kh        ; Koinon Hellenon has recovered Sparte on it's own
                terminate_monitor
            end_if
        end_monitor
    Not savegame compatible, needs a new campaign to be applied.
     
  3. Malagricus said:

    Default Re: Ptolemaioi & The Spartan Intervention Mission?

    Thanks!
    Since this happens really early in the campaign, i'll try the changed script in a new one right away.