Results 1 to 10 of 10

Thread: New advice thread trigger causes crash (prev. Campaign Script Doesn't Run)

  1. #1

    Default New advice thread trigger causes crash (prev. Campaign Script Doesn't Run)

    Hi all,
    I'm wondering if anyone knows why a campaign script might not trigger.

    I'm working on my mod and previous to my latest changes the script ran fine, but now it doesn't. I just recently made many changes to the map, but the script was still running even with those changes. The only thing I can think of is that I've made a typo in descr_strat and that is causing the problem.

    Anyway, I'll post as much as I can here and upload descr_strat and the campaign script.

    Campaign Script (titled XGM-XC_Campaign_Script):
    Spoiler Alert, click show to read: 
    Code:
     XGM-XC Campaign Script
    ; Balances AI factions
    
    script
        suspend_during_battle on
    ....
        if I_LocalFaction greek_cities
    
            console_command diplomatic_stance greek_cities macedon war
            console_command create_building Sparta monument_player
    
        end_if
    ....
    More of the same, lots of conditions, console commands, and a few spawn armies.
    ....
    ....
        
        if I_LocalFaction spain
    
            console_command create_building Tyde monument_player
        
        end_if
    
        if not I_LocalFaction romans_julii
        
            console_command diplomatic_stance romans_julii slavs allied
        
        end_if
    
        ;console_command toggle_perfect_spy
        
    terminate_script


    Descr_strat:
    Spoiler Alert, click show to read: 
    Code:
    ; XGM-XC Mundus Magnus unified rome
    
    campaign        barbarian_invasion
    options bi
    playable
        romans_julii    ;Rome
        egypt        ;The Ptolemaic Empire
        seleucid    ;The Seleucid Empire
        carthage    ;Carthage
        gauls        ;Gauls
        germans        ;Germania
        greek_cities    ;The Greek City States
        macedon        ;Macedon
        pontus        ;Pontus
        armenia        ;Armenia
        spain        ;Iberia
        thrace        ;Thrace
        britons        ;Bactria
        dacia        ;Saba
    end
    unlockable
    end
    nonplayable
        parthia        ;Parthia
        scythia        ;Scythia
        romans_brutii    ;Independent Greek Cities
        romans_scipii    ;Roman Rebels
        numidia        ;Eastern Kingdoms
        slavs        ;Celts
        slave        ;Slaves and rebels
    end
    
    
    start_date    -280 summer
    end_date    14 summer
    
    rebelling_characters_active
    gladiator_uprising_disabled
    night_battles_enabled
    brigand_spawn_value 15
    pirate_spawn_value 32
    ...
    Resources
    ...
    Factions
    ...
    Diplomacy
    ...
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; Minor Settlements-Watchtowers ala BI
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    region Crete
    famine_threat 0
    watchtower     153 93
    ...
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; Script
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    script
    XGM-XC_Campaign_Script.txt


    So, in summary, previously my campaign script would trigger and run. Now it won't.
    Last edited by CaesarVincens; July 24, 2009 at 05:29 PM. Reason: New title

    Expand your borders, a mod based on XGM 5.

  2. #2

    Default Re: Campaign Script Doesn't Run

    can't spot anything obvious on quick skim - suggestions:

    when you load game check your last listed rebel army
    ;Aemona / Illyria
    character sub_faction slavs, Dejotarus, named character, age 20, , x 105, y 147
    is actually present on the map - if he isn't you've got typo somewhere above that point in descr_strat..

    if he is there make a simplified campaign script - just

    script
    console_command add_money slavs, 10000
    terminate_script

    or something really simple to see if that works on its own, which would mean problem is in script somewhere....

  3. #3
    MasterOfNone's Avatar RTW Modder 2004-2015
    Join Date
    May 2005
    Location
    England
    Posts
    16,707

    Default Re: Campaign Script Doesn't Run

    Coding the diplomacy section wrongly is a campaign-script stopper - even though the game works fine. Check that that watchtower at the end is appearing - if it is then the problem is related to the script file itself.
    "One of the most sophisticated Total War mods ever developed..."
    The Fourth Age: Total War - The Dominion of Men

  4. #4

    Default Re: Campaign Script Doesn't Run

    Yeah, my campaign script didnt run too when there was something wrong with this:

    Spoiler Alert, click show to read: 

    region xxx
    famine_threat 0
    watchtower xxx xx


    I found out that I had misspelled the region name.

  5. #5

    Default Re: Campaign Script Doesn't Run

    Thanks for the help, everyone. I'll let you know how it turns out.

    Edit:
    Thank you all. As it turns out, Praefectus praetorio had it. I had changed the internal name of a region, but forgot to change it's corresponding watchtower entry.
    Last edited by CaesarVincens; July 22, 2009 at 04:42 PM.

    Expand your borders, a mod based on XGM 5.

  6. #6

    Default Re: Campaign Script Doesn't Run

    glad to see you've found a solution...

    btw, what the hell is that famine_threat entry?


  7. #7

    Default Re: Campaign Script Doesn't Run

    Left overs from BI; it may be dead code. I have no idea what it does, and it can be left out if you like.

    Expand your borders, a mod based on XGM 5.

  8. #8

    Default Re: Campaign Script Doesn't Run

    I see..thx for clarification!


  9. #9

    Default New advice causes crash

    Rather than open a new thread I'll just work here.

    I'm getting an error when loading RTW.

    Script Error in xc/data/export_desc_advice.txt, at ine 28167, column 5.

    Unknown identifier for trigger(XC18_Syracuse_Start_Trigger) when expecting WhenToTest.
    Here is the relevant code, it doesn't matter what the trigger name is. And I've tried SettlementTurnStart and got the same error as well. The file is encoded in ANSI. And this time, I literally just copied the previous trigger, renamed it and gave it a new advice thread.
    Code:
    ;------------------------------------------
    Trigger XC17_Syracuse_Start_Trigger
        WhenToTest FactionTurnStart
    
        Condition FactionIsLocal
        and FactionType greek_cities
            and I_MapName xc/data/world/maps/campaign/custom/Syracuse/descr_strat.txt
        and I_TurnNumber = 0
    
        AdviceThread Syracuse_Start_Thread  1
    
    ;------------------------------------------
    Trigger XC18_Syracuse_Start_Trigger
        WhenToTest FactionTurnStart
    
        Condition FactionIsLocal
        and FactionType greek_cities
            and I_MapName xc/data/world/maps/campaign/custom/Syracuse/descr_strat.txt
        and I_TurnNumber = 0
    
        AdviceThread Bactrians_Emerge_Thread  1
    Code:
    ;------------------------------------------
    AdviceThread Bactrians_Emerge_Thread
        GameArea Campaign
    
        Item Bactrians_Emerge_Text_01
            Suppressible n
            Uninhibitable
            Verbosity  0
            Threshold  1
            MaxRepeats  0
            RepeatInterval  1
            Attitude Normal
            Presentation Default
            Title Bactrians_Emerge_Text_01_Title
            Text Bactrians_Emerge_Text_01_Text1
    The game works fine except with this new trigger.

    Expand your borders, a mod based on XGM 5.

  10. #10

    Default Re: New advice causes crash (prev. Campaign Script Doesn't Run)

    Well, that issue seems to have resolved itself. The game loads, but now the advice thread doesn't seem to want to run.

    Expand your borders, a mod based on XGM 5.

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
  •