Results 1 to 6 of 6

Thread: Missions stop triggering after small change in campaign_script

  1. #1

    Default Missions stop triggering after small change in campaign_script

    As the title says, I've made some changes in the text file and it seem to prevent missions to triggers. It does that to every faction even though the modifications concern only the Cao clan.

    Here are the original lines first and then the modded one :

    Code:
        ; --- Vengeance in Xu Province ---
        monitor_event FactionTurnStart FactionIsLocal
            if I_EventCounter false_emperor > 0
                and I_SettlementOwner C-1303-b-ShouChun = england
                and I_SettlementOwner C-1307-b-HeFei = england
                and I_SettlementOwner C-0709-b-AnFeng = england
                and I_NumberOfSettlements scotland < 1
                if I_CharacterExists J-0401-LvBu
                    kill_character J-0401-LvBu
                end_if
                historic_event xu_vengeance true factions { england, }
                spawn_army
                    faction        france
                    character    J-0401-LvBu, named character, age 40, x 148, y 130, portrait A379, hero_ability Light_of_the_Faith, battle_model lvbu_general
                    traits JbAAAA0100 1 , LoyaltyStarter  1 , Lz-0401-0 2 , Jn1001 7 , Jn2000 3 , Jn3001 1 , Jn4001 2 , Jn5000 7 , JnA1000 3 , JnA2000 3 , JnA3000 1 , JnA4000 1 , JnA5000 2 , JnA6000 3 , JnA7000 6 , JnA8000 1 , JnA9000 1 , Jnxg4000 2 , Ch1000 1 , LvBu1100 1 , LvBu1200 1 , LvBu1300 1 , A1030JnSY-A 3 , C3080JnQJ-A 1 , C3160JnAY-A 1 , Jn-catholic 3
                    unit        JiangJun_ZhongYuan_Aa_0401-LvBu            exp 4 armour 0 weapon_lvl 0
                    unit        Xuangeqibin                    exp 3 armour 0 weapon_lvl 0
                    unit        ZYhan_medium_cav                exp 2 armour 0 weapon_lvl 0
                    unit        ZYhan_light_spear                exp 1 armour 0 weapon_lvl 0
                    unit        ZYhan_light_cross                exp 1 armour 0 weapon_lvl 0
                end
                inc_counter unitlimit_france 5
                console_command give_ancillary "J-0401-LvBu" 1dao-101
                console_command give_ancillary "J-0401-LvBu" 4ma-001
                console_command give_ancillary "J-0401-LvBu" 9wuman-401a
                snap_strat_camera 136, 110
                zoom_strat_camera 0.4
                reveal_tile 148, 130
                ui_indicator 0 arrow_down_left track_ground 149 131 colour 255 0 0 period 5 scale .7
                campaign_wait 4
                ui_indicator_remove 0
                terminate_monitor
            end_if
    Code:
        ; --- Vengeance in Xu Province ---
        monitor_event FactionTurnStart FactionIsLocal
            if I_EventCounter false_emperor > 0
                and I_SettlementOwner C-1303-b-ShouChun = england
                and I_SettlementOwner C-1307-b-HeFei = england
                and I_SettlementOwner C-0709-b-AnFeng = england
                and I_NumberOfSettlements scotland < 1
                if I_CharacterExists J-0401-LvBu
                    kill_character J-0401-LvBu
                end_if
                if I_CharacterExists J-0407-WeiXu
                    kill_character J-0407-WeiXu
                end_if
                if I_CharacterExists J-0408-SongXian
                    kill_character J-0408-SongXian
                end_if
                if I_CharacterExists J-0409-HouCheng
                    kill_character J-0409-HouCheng
                end_if
                historic_event xu_vengeance true factions { england, }
                spawn_army
                    faction        france
                    character    J-0401-LvBu, named character, age 40, x 148, y 130, portrait A379, hero_ability Light_of_the_Faith, battle_model lvbu_general
                    traits JbAAAA0100 1 , LoyaltyStarter  1 , Lz-0401-0 2 , Jn1001 7 , Jn2000 3 , Jn3001 1 , Jn4001 2 , Jn5000 7 , JnA1000 3 , JnA2000 3 , JnA3000 1 , JnA4000 1 , JnA5000 2 , JnA6000 3 , JnA7000 6 , JnA8000 1 , JnA9000 1 , Jnxg4000 2 , Ch1000 1 , LvBu1100 1 , LvBu1200 1 , LvBu1300 1 , A1030JnSY-A 3 , C3080JnQJ-A 1 , C3160JnAY-A 1 , Jn-catholic 3
                    unit        JiangJun_ZhongYuan_Aa_0401-LvBu            exp 4 armour 0 weapon_lvl 0
                    unit        Xuangeqibin                    exp 3 armour 0 weapon_lvl 0
                    unit        ZYhan_medium_cav                exp 2 armour 0 weapon_lvl 0
                    unit        ZYhan_light_spear                exp 1 armour 0 weapon_lvl 0
                    unit        ZYhan_light_cross                exp 1 armour 0 weapon_lvl 0
                end
                spawn_army
                    faction        france
                    character    J-0407-WeiXu, named character, male,  age 30, x 144, y 131, portrait A465
                    traits JbAAAA0100 1 , Lz-0407-0 1 , Jn1001 1 , Jn2000 4 , Jn3000 7 , Jn4000 8 , Jn5000 7 , JnA1000 3 , JnA2000 3 , JnA3000 3 , JnA4000 2 , JnA5000 1 , JnA6000 1 , JnA7000 6 , JnA8000 8 , JnA9000 2 , Jnxg6000 2 , Ch3000 4 , A1040JnQJ-A 2 , C3150JnBC-A 1 , Jn-catholic 2
                    unit        JiangJun_ZhongYuan_Aa_WeiXu        exp 2 armour 0 weapon_lvl 0
                end
                spawn_army
                    faction        france
                    character    J-0408-SongXian, named character, male,  age 29, x 146, y 128, portrait A041
                    traits JbAAAA0100 1 , Lz-0408-0 1 , Jn1000 9 , Jn2000 3 , Jn3000 6 , Jn4000 7 , Jn5000 5 , JnA1000 3 , JnA2000 2 , JnA3000 3 , JnA4000 1 , JnA5000 2 , JnA6000 2 , JnA7000 4 , JnA8000 4 , JnA9000 2 , Jnxg6000 2 , Ch3000 4 , A1040JnQJ-A 1 , Jn-catholic 2
                    unit        JiangJun_ZhongYuan_Aa_SongXian        exp 2 armour 0 weapon_lvl 0
                end
                spawn_army
                    faction        france
                    character    J-0409-HouCheng, named character, male,  age 28, x 153, y 131, portrait A254
                    traits JbAAAA0100 1 , Lz-0409-0 1 , Jn1000 9 , Jn2000 4 , Jn3000 6 , Jn4000 7 , Jn5000 6 , JnA1000 3 , JnA2000 2 , JnA3000 1 , JnA4000 2 , JnA5000 2 , JnA6000 1 , JnA7000 5 , JnA8000 5 , JnA9000 2 , Jnxg6000 2 , Ch3000 4 , A1040JnQJ-A 1 , C3050JnSJ-A 1 , Jn-catholic 2
                    unit        JiangJun_ZhongYuan_Aa_HouCheng        exp 2 armour 0 weapon_lvl 0
                end
                inc_counter unitlimit_france 8
                console_command give_ancillary "J-0401-LvBu" 1dao-101
                console_command give_ancillary "J-0401-LvBu" 4ma-001
                console_command give_ancillary "J-0401-LvBu" 9wuman-401a
                snap_strat_camera 136, 110
                zoom_strat_camera 0.4
                reveal_tile 148, 130
                ui_indicator 0 arrow_down_left track_ground 149 131 colour 255 0 0 period 5 scale .7
                campaign_wait 4
                ui_indicator_remove 0
                terminate_monitor
            end_if
    Thank you! Now I need a break, been working on my submod all day!

    PS : And in case you might wonder, I did add the names to the faction list of name.
    Last edited by R.P. Gryphus; March 14, 2020 at 08:18 PM.

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Missions stop triggering after small change in campaign_script

    Always get a warm, fuzzy feeling seeing my scripts being worked on

    The question here is: does the script run at all? The appearance of the radar map restriction would be an indication of that.
    If you set the log to trace you may get something useful by way of what was processed last.

    The bodyguard units are fine, the names are from the 'venice' faction so simply copying them to 'france' will suffice. Can't see anything obvious so I would suggest to comment out the trait lines to see if the issue lies there.










  3. #3

    Default Re: Missions stop triggering after small change in campaign_script

    "The appearance of the radar map restriction would be an indication of that."

    I'm sorry, I don't understand what you mean by that. ^^

    "comment out the trait lines"

    What do you mean by that exactly? ^^

    Here's is the log :

    Attachment 360918

  4. #4

    Default Re: Missions stop triggering after small change in campaign_script

    Oh, I must have miss it in the log, but it seems it's caused by the male attribute. It is used in descr_strat, not in campaign_script for family tree. ^^ When I find myself in these situation, I feel my avatar picture is most accurate.
    Last edited by R.P. Gryphus; March 15, 2020 at 04:02 PM.

  5. #5
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Missions stop triggering after small change in campaign_script

    Glad you found it.

    Just for info then: the radar map restriction is shown by default and requires a line in the script to remove it. Hence the appearance of that radar restriction indicates a failure of the script:



    'Commenting' is done by putting a semi-colon in front of a line of code, the semi-colon stops the game from reading anything beyond it. It is called 'commenting' as this method is used by coders\scripters to add information to their code\script.










  6. #6

    Default Re: Missions stop triggering after small change in campaign_script

    Oh that's what it means ^^ Yeah I have to do this quite a bit in the Campaign_Script. x)

Posting Permissions

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