Results 1 to 22 of 22

Thread: Ways to make CTD with script ?

Hybrid View

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

    Default Re: Ways to make CTD with script ?

    Quote Originally Posted by Makanyane
    Have been through large chunk of script setting all the spawns and create_units to definitely happen within first 6 turns in hope of finding problem. Now have an occasional CTD happening at about turn 11 - which would be useful finding except I didn't set anything to happen that late
    Was the script the only thing you changed? If so, could you post it or, better yet, can you make a separate txt from it to download?

    I'm no expert but I'll be glad to help.

  2. #2
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Ways to make CTD with script ?

    Thanks for the offer

    The script was the only thing that I changed that moved the date of the CTD (changes also made it more frequent). I've got as far as narrowing it down to a set of spawns for one of the factions (by deleting big chunks of the script so that's all that's in it and its still crashing) it definitely doesn't occur on the exact turn they spawn but a while afterwards, so I think my hypothesis about it relating to getting two armies on same spot and problems when AI moves them might be right. Think I'm getting close to answer so will keep testing for a bit (then probably ask for help again!).
    Not used mods before? Looking for something small and fun?!
    Download the:

  3. #3
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Ways to make CTD with script ?

    Very much simplified script - simple three spawns on same tile on subsequent turns results in randomly occuring CTD a random number of turns after last spawn. Can't duplicate reason when playing one of the spawned factions but stopping them spawning on same spot seems to stop problem (so far so good).

    So need to try and add a check to see if anyone is on tile before spawning:

    Code:
      if whatever_conditions
    
    ;sets counter to stop spawn
       if I_CharacterTypeNearTile alemanni general, 0 97,121
    	set_counter nospawn 2
       end_if
       if I_CharacterTypeNearTile alemanni family, 0 97,121
    	set_counter nospawn 2
       end_if
    
    ;only triggers if army not on tile
    	if I_CompareCounter nospawn < 2
             spawn_army
                faction slave
                character Moireabh, named character, command 1, influence 1, management 1, subterfuge 0, age 23, x 97, y 121
                unit souleatergeneral, exp 1 armour 0 weapon_lvl 0
             end
            end_if
    
    ;reset for other if/monitors
        if I_CompareCounter nospawn = 2
           set_counter nospawn 0
        end_if
    
    ; terminate_monitor
     end_if
    seems to work to just stop them spawning on exact same tile as alemanni, but would need same entry for all factions, luckily I haven't got full set of factions in use, but wonder if anyone knows of way of wording that for 'any faction' on tile that's shorter....?

    Any other advice on lines of 'Scripters Guide to CTD's' might also be useful in-case there is anything else causing problem.
    Not used mods before? Looking for something small and fun?!
    Download the:

  4. #4
    Shaidar Haran Senior Member SAM Site Champion Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    5,752

    Default Re: Ways to make CTD with script ?

    Maybe use true_condition?

    Just a wild guess

  5. #5
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Ways to make CTD with script ?

    I did try TrueCondition at one point and it show_err'd unknown faction - though I might have missed correct way of phrasing...

    anyway, I changed all spawns so they can't occur on occupied tile, which fixes the problem I induced by making all possible spawns happen in first few goes.
    It doesn't however fix my random late stage CTD when used in script with proper triggers reinstated..

    Trying to isolate it is driving me slightly barmy.. Script is split basically into 5 sections with garrison and spawns for areas of map occupied by four main factions and then section for slave areas. If I run full script it CTD's fairly regularly somewhere around 150 turns in when playing via year jump started as two of the factions.

    So I think ahha remove one of the 5 sections relating to specific area of map completely and test.... lo, it doesn't CTD, so I make revised version of script with just the one suspect section I just removed in it, so I can proceed to isolate problem further..... but, the one suspect section on its own doesn't CTD either.

    If you don't see me for a while its because I've thrown something heavy at computer



    Does anyone have any experience or any ideas at all about obscure hard to find ways of making script crash game???
    Last edited by Makanyane; 12-11-2007 at 00:47.
    Not used mods before? Looking for something small and fun?!
    Download the:

  6. #6
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: Ways to make CTD with script ?

    Turn back from the Dark Side, Mak. Event scripts are evil....it's not too late...turn back now...or EoD will never be stable again...
    "One of the most sophisticated Total War mods ever developed..."

  7. #7
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: Ways to make CTD with script ?

    Silly question, but you're only checking for generals and family could other character types be causing the problem? If so maybe just check for the character type all.

    As for the factions have you tried all for the factions you want to catch instead of doing it one faction at a time. Incidentally I have no idea if all would work or not, but it might be worth a try.

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO