Results 1 to 9 of 9

Thread: A fix for SS6.4's "William Wallace Uprising"

  1. #1

    Default A fix for SS6.4's "William Wallace Uprising"

    This fix is for the early campaign. With a little modification, it can be adapted to late campaign too.
    - In EDCT, replace Trait ScotlandHero with this:
    Code:
    Trait ScotlandHero
     Characters family
    
     Level Hero_of_Scotland
       Description Hero_of_Scotland_desc
       EffectsDescription Hero_of_Scotland_effects_desc
       Epithet Hero_of_Scotland_epithet_desc
       Threshold 1
    
       Effect Command 1 
       Effect TroopMorale 3 
       Effect Level 3 
       Effect Combat_V_Faction_England 3
    - In export_vnvs, add this line:
    Code:
    {Hero_of_Scotland_epithet_desc}Wallace
    -In campaign_script, replace the corresponding section with this:
    Code:
    ;============== William Wallace Uprising ================
    declare_counter wallace
    
    monitor_event GeneralCaptureSettlement FactionType england
        and TargetFactionType scotland
        and I_TurnNumber > 60
    
        if I_CompareCounter wallace > 0
         terminate_monitor
        end_if
        if I_TurnNumber > 130
            set_counter wallace 1
            terminate_monitor
        end_if
    end_monitor
    
    monitor_event FactionTurnStart FactionType scotland
        and I_TurnNumber > 60
    
        if I_CompareCounter wallace = 1
            spawn_army
                faction scotland
                character    William, named character, age 20, x 55, y 253, portrait wallace, battle_model wallace_general, label scotland4wallace
                traits     ScotlandHero 1, MilitaryInclination 1, Military_Edu 2, NaturalMilitarySkill 2, GoodCommander 1, LoyaltyStarter 1, ReligionStarter 1, BattleChivalry 2, Loyal 2, Just 2, Rabblerouser 3, Hardened 1
                unit        Highland Nobles        exp 4 armour 0 weapon_lvl 1
                unit        Highland Nobles        exp 2 armour 0 weapon_lvl 1
                unit        Highlanders            exp 3 armour 1 weapon_lvl 1
                unit        Highlanders            exp 3 armour 1 weapon_lvl 1
                unit        Highlanders            exp 3 armour 1 weapon_lvl 1
                unit        Highland Pikemen        exp 4 armour 1 weapon_lvl 0
                unit        Highland Pikemen        exp 4 armour 1 weapon_lvl 0
                unit        Highland Pikemen        exp 3 armour 1 weapon_lvl 0
                unit        Highland Pikemen        exp 3 armour 1 weapon_lvl 0
                unit        Highland Nobles        exp 3 armour 0 weapon_lvl 1
                unit        Highland Nobles        exp 3 armour 0 weapon_lvl 1
                unit        Noble Highland Archers    exp 1 armour 1 weapon_lvl 0
                unit        Noble Highland Archers    exp 1 armour 1 weapon_lvl 0
                unit        Noble Highland Archers    exp 1 armour 1 weapon_lvl 0
                unit        Highland Rabble        exp 3 armour 0 weapon_lvl 0
                unit        Highland Rabble        exp 3 armour 0 weapon_lvl 0
                unit        Highland Rabble        exp 4 armour 0 weapon_lvl 0
                unit        Highland Rabble        exp 4 armour 0 weapon_lvl 0
                unit        Border Horse        exp 2 armour 0 weapon_lvl 0
                unit        Border Horse        exp 2 armour 0 weapon_lvl 0
            end
            spawn_army
                faction scotland
                character    random_name, named character, age 26, x 55, y 253
                traits     MilitaryInclination 1, Military_Edu 2, NaturalMilitarySkill 2, GoodCommander 1, LoyaltyStarter 1, ReligionStarter 1, BattleChivalry 2, Loyal 2, Just 2, Rabblerouser 3, Hardened 1
                unit        Highland Nobles        exp 4 armour 0 weapon_lvl 1
                unit        Highland Nobles        exp 2 armour 0 weapon_lvl 1
                unit        Highlanders            exp 3 armour 1 weapon_lvl 1
                unit        Highlanders            exp 3 armour 1 weapon_lvl 1
                unit        Highlanders            exp 3 armour 1 weapon_lvl 1
                unit        Highland Pikemen        exp 4 armour 1 weapon_lvl 0
                unit        Highland Pikemen        exp 4 armour 1 weapon_lvl 0
                unit        Highland Pikemen        exp 3 armour 1 weapon_lvl 0
                unit        Highland Pikemen        exp 3 armour 1 weapon_lvl 0
                unit        Highland Nobles        exp 3 armour 0 weapon_lvl 1
                unit        Highland Nobles        exp 3 armour 0 weapon_lvl 1
                unit        Noble Highland Archers    exp 1 armour 1 weapon_lvl 0
                unit        Noble Highland Archers    exp 1 armour 1 weapon_lvl 0
                unit        Noble Highland Archers    exp 1 armour 1 weapon_lvl 0
                unit        Highland Rabble        exp 3 armour 0 weapon_lvl 0
                unit        Highland Rabble        exp 3 armour 0 weapon_lvl 0
                unit        Highland Rabble        exp 4 armour 0 weapon_lvl 0
                unit        Highland Rabble        exp 4 armour 0 weapon_lvl 0
                unit        Border Horse        exp 2 armour 0 weapon_lvl 0
                unit        Border Horse        exp 2 armour 0 weapon_lvl 0
            end
            historic_event scotland_wallace event/william_wallace.bik
            if I_IsFactionAIControlled scotland
            and I_SettlementOwner Edinburgh != scotland
            and ! I_SettlementUnderSiege Edinburgh
                siege_settlement scotland4wallace, Edinburgh, maintain
                if ! I_SettlementUnderSiege Edinburgh
                    reposition_character scotland4wallace, 55,253
                end_if
            end_if
         terminate_monitor
        end_if
    
        if I_CompareCounter wallace = 0
        and I_NumberOfSettlements scotland < 4
            if I_NumberOfSettlements scotland < 2
                set_counter wallace 1
            end_if
            if I_TurnNumber = 180
                set_counter wallace 1
            end_if
        end_if
    end_monitor

  2. #2

    Default Re: A fix for SS6.4's "William Wallace Uprising"

    But don't you also need another command to make the character assault the walls the next turn instead of keeping the siege until the settlement cannot hold any longer?

    or was this part of what caused problems and made it prone to CTDs?

  3. #3

    Default Re: A fix for SS6.4's "William Wallace Uprising"

    Quote Originally Posted by Melooo182 View Post
    But don't you also need another command to make the character assault the walls the next turn instead of keeping the siege until the settlement cannot hold any longer?
    or was this part of what caused problems and made it prone to CTDs?
    There is no need for a "siege_settlement attack" . If he doesn't instigate siege, I move him back where he started, so no CTD possible. If he instigates the siege, he builds the equipment in the same turn and next turn he attacks "if he's strong enough". Also, I want him to be able to lift the siege if he's not strong enough; that is, I want CAI to be able to move him out of the siege and not force suicidal attacks. Generally, I don't want to "break" CAI in this script.

    If you test the script in the first turns of a campaign, it is normal to see him passive, as there is the CAI that prevents such invasions in first turns (I had removed this code for my tests). But this invasion is to take place well after these turns. I have also prepared a script for "Bulgarian Uprising" (I'll write about it in Titaniums forum, as it requires the existence of a "spawnpool" faction, there is no other way), where, indeed, the besiegers were passive; but here this is not the case.

    The main cause of CTDs was that the "siege_settlement maintain" command could be issued multiple times. Since there was no condition to filter out cases that he had been bribed etc, this command, along with "siege_settlement attack", were responsible for causing CTDs.

  4. #4

    Default Re: A fix for SS6.4's "William Wallace Uprising"

    Ah, I see now, nice that everything is inside a single monitor as well
    I suppose updates to TO, mongols and timurids scripts are in order as well, i can try to make those in next days based on this sample.

    I'll include it in the bugfix comp 1.27, which will probably be the last for a very long time.

    EDIT:
    About the trait part thing, is that really necessary?

  5. #5

    Default Re: A fix for SS6.4's "William Wallace Uprising"

    I haven't tested on those factions. Their main difference is that for those emerging factions, the scripted sieges have to be performed "by all cost". If "Wallace" won't lay siege upon Edinburgh, it's not a big problem (I see the AI usually knows how to use him BTW). If the emerging TOs fail to start instigating sieges - taking settlements, they can be passive for the whole campaign (at least, this is something that happened to me a couple times).

  6. #6

    Default Re: A fix for SS6.4's "William Wallace Uprising"

    Code:
    ;============== William Wallace Uprising ================
    declare_counter wallace
    
    monitor_event GeneralCaptureSettlement FactionType england
        and TargetFactionType scotland
        and I_TurnNumber > 60
    
        if I_CompareCounter wallace > 0
         terminate_monitor
        end_if
        if I_TurnNumber > 130
            set_counter wallace 1
            terminate_monitor
        end_if
    end_monitor
    
    monitor_event FactionTurnStart FactionType scotland
        and I_TurnNumber > 60
    
        if I_CompareCounter wallace = 1
            spawn_army
                faction scotland
                character    William, named character, age 20, x 55, y 253, portrait wallace, battle_model wallace_general, label scotland4wallace
                traits     ScotlandHero 1, MilitaryInclination 1, Military_Edu 2, NaturalMilitarySkill 2, GoodCommander 1, LoyaltyStarter 1, ReligionStarter 1, BattleChivalry 2, Loyal 2, Just 2, Rabblerouser 3, Hardened 1
                unit        Highland Nobles        exp 4 armour 0 weapon_lvl 1
                unit        Highland Nobles        exp 2 armour 0 weapon_lvl 1
                unit        Highlanders            exp 3 armour 1 weapon_lvl 1
                unit        Highlanders            exp 3 armour 1 weapon_lvl 1
                unit        Highlanders            exp 3 armour 1 weapon_lvl 1
                unit        Highland Pikemen        exp 4 armour 1 weapon_lvl 0
                unit        Highland Pikemen        exp 4 armour 1 weapon_lvl 0
                unit        Highland Pikemen        exp 3 armour 1 weapon_lvl 0
                unit        Highland Pikemen        exp 3 armour 1 weapon_lvl 0
                unit        Highland Nobles        exp 3 armour 0 weapon_lvl 1
                unit        Highland Nobles        exp 3 armour 0 weapon_lvl 1
                unit        Noble Highland Archers    exp 1 armour 1 weapon_lvl 0
                unit        Noble Highland Archers    exp 1 armour 1 weapon_lvl 0
                unit        Noble Highland Archers    exp 1 armour 1 weapon_lvl 0
                unit        Highland Rabble        exp 3 armour 0 weapon_lvl 0
                unit        Highland Rabble        exp 3 armour 0 weapon_lvl 0
                unit        Highland Rabble        exp 4 armour 0 weapon_lvl 0
                unit        Highland Rabble        exp 4 armour 0 weapon_lvl 0
                unit        Border Horse        exp 2 armour 0 weapon_lvl 0
                unit        Border Horse        exp 2 armour 0 weapon_lvl 0
            end
            spawn_army
                faction scotland
                character    random_name, named character, age 26, x 55, y 253
                traits     MilitaryInclination 1, Military_Edu 2, NaturalMilitarySkill 2, GoodCommander 1, LoyaltyStarter 1, ReligionStarter 1, BattleChivalry 2, Loyal 2, Just 2, Rabblerouser 3, Hardened 1
                unit        Highland Nobles        exp 4 armour 0 weapon_lvl 1
                unit        Highland Nobles        exp 2 armour 0 weapon_lvl 1
                unit        Highlanders            exp 3 armour 1 weapon_lvl 1
                unit        Highlanders            exp 3 armour 1 weapon_lvl 1
                unit        Highlanders            exp 3 armour 1 weapon_lvl 1
                unit        Highland Pikemen        exp 4 armour 1 weapon_lvl 0
                unit        Highland Pikemen        exp 4 armour 1 weapon_lvl 0
                unit        Highland Pikemen        exp 3 armour 1 weapon_lvl 0
                unit        Highland Pikemen        exp 3 armour 1 weapon_lvl 0
                unit        Highland Nobles        exp 3 armour 0 weapon_lvl 1
                unit        Highland Nobles        exp 3 armour 0 weapon_lvl 1
                unit        Noble Highland Archers    exp 1 armour 1 weapon_lvl 0
                unit        Noble Highland Archers    exp 1 armour 1 weapon_lvl 0
                unit        Noble Highland Archers    exp 1 armour 1 weapon_lvl 0
                unit        Highland Rabble        exp 3 armour 0 weapon_lvl 0
                unit        Highland Rabble        exp 3 armour 0 weapon_lvl 0
                unit        Highland Rabble        exp 4 armour 0 weapon_lvl 0
                unit        Highland Rabble        exp 4 armour 0 weapon_lvl 0
                unit        Border Horse        exp 2 armour 0 weapon_lvl 0
                unit        Border Horse        exp 2 armour 0 weapon_lvl 0
            end
            historic_event scotland_wallace event/william_wallace.bik
            if I_IsFactionAIControlled scotland
            and I_SettlementOwner Edinburgh != scotland
            and ! I_SettlementUnderSiege Edinburgh
                siege_settlement scotland4wallace, Edinburgh, maintain
                if ! I_SettlementUnderSiege Edinburgh
                    reposition_character scotland4wallace, 55,253
                end_if
            end_if
         terminate_monitor
        end_if
    
        if I_CompareCounter wallace = 0
        and I_NumberOfSettlements scotland < 4
            if I_NumberOfSettlements scotland < 2
                set_counter wallace 1
            end_if
            if I_TurnNumber = 180
                set_counter wallace 1
            end_if
        end_if
    end_monitor
    shouldn't these "turn number requirements" be switched
    otherwise the last one is useless

  7. #7

    Default Re: A fix for SS6.4's "William Wallace Uprising"

    The first monitor and the "if" you have in red are two different "triggers" for the upring; the former is a GeneralCaptureSettlement monitor; the second is during FactionTurnStart.
    The first monitor will trigger the uprising if an english army captures a scottish settlement after turn 131.
    The last one with 180 is not useless; if Scotland has 3 settlements and England hasn't captured a scottish settlement during turns 132-181, this "if" will trigger the uprising (in next turn, if Scotland are still alive).

    EDIT:Also, checking if england captures a scottish settlement during only one specific turn isn't it a little meaningless?
    Last edited by gsthoed; January 02, 2015 at 06:59 PM.

  8. #8

    Default Re: A fix for SS6.4's "William Wallace Uprising"

    So would this have been causing the CTD that I have been experiencing?

  9. #9

    Default Re: A fix for SS6.4's "William Wallace Uprising"

    It might be, but we should better discuss it in the other thread. What I had in mind with this fix were bugs like english Wallace attacking english Edinburgh and like; since you're playing as England and the siege had been instigated, you would have noticed the cause of the bug.
    Last edited by gsthoed; January 03, 2015 at 05:23 PM.

Posting Permissions

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