Results 1 to 4 of 4

Thread: Campaign Script Problems

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Campaign Script Problems

    Hi everyone,
    Until recently my script was working perfectly, then i massively overhauled it to increase its variety, basically make it less predictable to the player..

    I get a CTD without any error in the log.

    I have used the ; to block out what i think no longer works in M2TW-K 1.5.
    i.e move_character command.

    My script is attached, it is built based upon the TATW submod called Divide and Conquer.

    If anyone can help me find what i have done wrong i would be very appreciative! Beer will be your reward!

  2. #2
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Campaign Script Problems

    It would help to know when it CTDs. Before the campaign loads? At end turn? During the end turn cycle? If it's end turn cycle on which turn specifically? And if a specific faction then what is their name in the code(since it seems TA uses the vanilla names for factions)? As well, is your log set to absolute trace so it catches even the most seemingly meaningless things? I recommend using the following for best logging:
    [log]
    to=logs/auh.system.log.txt
    level =ai.ltgd trace
    level =game.script* trace
    level = * trace
    file = game.script* logs/mymod.script.log.txt
    file = ai.ltgd logs/mymod.ai.log.txt

    [ai]
    ltgd_logging = true
    I skimmed through it and nothing popped out at me. Maybe post the unedited version of the same script so I can get a better look at what it is exactly I'm looking at in WinMerge.

  3. #3

    Default Re: Campaign Script Problems

    Quote Originally Posted by Augustus Lucifer View Post
    It would help to know when it CTDs. Before the campaign loads? At end turn? During the end turn cycle? If it's end turn cycle on which turn specifically? And if a specific faction then what is their name in the code(since it seems TA uses the vanilla names for factions)? As well, is your log set to absolute trace so it catches even the most seemingly meaningless things? I recommend using the following for best logging:


    I skimmed through it and nothing popped out at me. Maybe post the unedited version of the same script so I can get a better look at what it is exactly I'm looking at in WinMerge.
    It 'hangs' on campaign load from the faction selection screen. then the windows error tells me that the .exe must close due to an unknown error.
    And the log tells me that game must close..

    I didn't know about these;
    Code:
    level =ai.ltgd trace
    level =game.script* trace
    I will try this and see what the log says. thank you!

    And as for the original 'working' code, I will need to speak to someone first, but should be able to post it here..

  4. #4

    Default Re: Campaign Script Problems

    @Augustus Lucifer,
    This is the old script;
    Code:
    declare_counter SpawnNagratAngmar
    set_counter SpawnNagratAngmar 0
    declare_counter SpawnNagratDolGuldur
    set_counter SpawnNagratDolGuldur 0
    
    
    monitor_event PreFactionTurnStart FactionIsLocal
        and    not I_SettlementOwner Carn-Dum = byzantium
        and I_SettlementOwner Gorgoroth = papal_states
        and not I_CharacterExists Nagrat Fugli
        set_counter SpawnNagratAngmar 1
    end_monitor
    
    monitor_event PreFactionTurnStart FactionIsLocal
        and    not I_SettlementOwner Deep-Mirkwood = poland
        and I_SettlementOwner Gorgoroth = papal_states
        and not I_CharacterExists Nagrat Ugli
        set_counter SpawnNagratDolGuldur 1
    end_monitor
    
    
    monitor_conditions I_CompareCounter SpawnNagratAngmar = 1
        spawn_army 
        faction byzantium
        character Nagrat Fugli, named character, age 30, x 151 , y 308 , family, direction N
        traits LoyaltyStarter 1 , GoodCommander 2 , ReligionStarter 1, Nagrat 1
            unit    Uruk Bodyguards    exp 2 armour 1 weapon_lvl 0
            unit    Mordor Catapult        exp 1 armour 0 weapon_lvl 0
        end
    set_counter SpawnNagratAngmar 2
    end_monitor
    
    monitor_conditions I_CompareCounter SpawnNagratDolGuldur = 1
        spawn_army 
        faction poland
        character Nagrat Ugli, named character, age 30, x 247 , y 210 , family, direction N
        traits LoyaltyStarter 1 , GoodCommander 2 , ReligionStarter 1, Nagrat 1
            unit    Uruk Bodyguards    exp 2 armour 1 weapon_lvl 0
            unit    Mordor Catapult     exp 1 armour 0 weapon_lvl 0
        end
        set_counter SpawnNagratDolGuldur 2
    end_monitor
    
    declare_counter attack_dol
    set_counter attack_dol 0
    
    monitor_event FactionTurnStart FactionType poland
        and not FactionIsLocal
        and I_CharacterExists Nagrat Ugli
    
        if I_CompareCounter attack_dol = 0
            siege_settlement Nagrat Ugli, Deep-Mirkwood, attack
            set_counter attack_dol 1
            terminate_monitor
        end_if
    end_monitor
        
    declare_counter attack_ang
    set_counter attack_ang 0
    
    monitor_event FactionTurnStart FactionType byzantium
        and not FactionIsLocal
        and I_CharacterExists Nagrat Fugli
    
        if I_CompareCounter attack_ang = 0
            siege_settlement Nagrat Fugli, Carn-Dum, attack
            set_counter attack_ang 1
            terminate_monitor
        end_if
    end_monitor
    It works perfectly as intended, but by comparing this with the one in my OP you can tell i am trying to add a level of randomness but it is proving the complexities are what's causing the issues..

Posting Permissions

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