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 ?

    I'm interesting to know if you have discovered something new about this ctd caused by scripted army spawns.
    We are using in lotr-tw a lot of army spawns, mostly using generals (not family memebers) and we do have some random ctds during ai turn that could be caused by the scripts. I'd like to know if it could be related to the command spawn army.

    These are the only ctd causes that I have noticed using "spawn army":
    -wrong general name (or not allowed for this faction)
    -wrong unit name (or unit not allowed to this faction)
    -it seems it is not possible to spawn naval units with this command: when you choose character type=admiral, and general unit=naval unit, and the position= sea tile, the army is still spawned as a land unit and this will cause ctds when some other army tries to attack it.

    -once, we found a ctd caused by a wrong name in the names.txt that became much more frecuent when we used the scripts: since the scripts creates a lot of armies and the ai tends to split them, they need to use a lot of random names from the name pool of the faction and the ctds are more often if there is a misspelled name in the names.txt.
    Maybe you have some kind of similar ctd here ??.
    Last edited by Bardo; 01-31-2008 at 18:12.

  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 ?

    I'm afraid I got very fed up with testing it so didn't come up with anymore of a conclusive answer. It seems happy with the version with spawns not using named characters, is released and I'm not getting any reports of random looking CTD's.


    Dol Guldur did spot for me later that I had some duplicate names for trait triggers which might have been adding to problem. Though I can't think of logical reason why it would only have crashed with script due to those.....

    bad name, again I would expect to crash occasionally without script and I did spend hours/days running the damn thing with/without script and it refused ever to CTD without.


    The suggestion Anallein made to me which made me consider again the spawns being possible source of problem was to do with the FOW problem you get if your faction acquires a spawned army for your faction out of your line of sight. The new army doesn't reset the FOW and is only selectable via the army list and not on the map. I was wondering if that might form some part of problem for AI, or whether spawned characters that don't get added to family tree can cause confusion later.


    Does yours go frequently enough that you can get any sort of with / without scripted spawns comparison on -ai ?
    (can't remember if you can get year-jump to work on Alex, that's faster if you can)
    Not used mods before? Looking for something small and fun?!
    Download the:

  3. #3
    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 ?

    Question about the possible fow issue, first if my knowledge isn't totally wrong you should be able to turn it on and then off again in your script, if you can do that and you do that does it correctly set the FOW for out of sight spawned armies?

    -Trait/Ancillary/Building Editor

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

  4. #4

    Default Re: Ways to make CTD with script ?

    Afaik resetting the FOW does not help with the problem.
    The scripted armies also seem to 'swallow up' the FOW under certain conditions (to long ago to remember it all - will need to try out again) - for example if a scripted army was inside a city which was not 'lighted up' by a surrounding city or real army then the city itself becomes unavailable to select as well via the campaign map.

  5. #5
    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 ?

    Well, there are two orders in which you can do the turn on, turn off of the FoW, and you might get different behaviour.

    1) Spawn Army
    Turn FoW Off
    Turn FoW On

    2) Turn FoW Off
    Spawn Army
    Turn FoW On

    I'd figure the second way wouldn't cause any problems, because there would be no FoW to 'swallow up', and then putting it back 'should' not cause any problems.

    -Trait/Ancillary/Building Editor

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

  6. #6

    Default Re: Ways to make CTD with script ?

    Vaya! I didn't know anything about this problem between spawned armies and the FOW.
    Squid's solution looks ok, but I have never noticed this bug so I don't think I'll be able to verify the solution.
    Just one think, this method would let the player to see all the map for a moment everytime the script spawns a new army, doesn't it?. I wonder if it would be enough to use the command "reveal_tile x,y" with the same tile than the spawned army. Do you know if the bug is related to the "fog of war" of the player or if it is related to the "field of view" of the faction that receives the army?


    Does yours go frequently enough that you can get any sort of with / without scripted spawns comparison on -ai ?
    I have used the comparison with -ai hundreds of times, but the results has changed with the diferent versions of the mod.
    I have been using spawned armies since the beginning (2 years ago) and then I was able to play hundreds of turn without any ctd, so I'm almost sure that spawned armies can be used without causing ctds. These are things that I'm sure you can do without ctds:
    -to use spawned armies including named characters (I have been using this to respawn the Nazguls for long time without any ctd).
    -to spawn armies for the ai, out of the FOW of the player, and then these armies are properly used by the AI without ctds.
    But I'm not sure if I have ever spawned armies out of the field of view of the faction who receives the army.

    Currently, we have some random ctds, and they appear both with and without scripts activated, so I can't help much with testing. But it seems than the frecuency of our ctds are slightly more often with scripts (about 1 ctd every 50 turns or so). However, we use a big ammount of scripts, so there are many possible causes, I'm just trying to reduce the possibilities.

  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 ?

    I had missed reveal_tile, but you may still have the same problem because depending on where an army is spawned as to how many times would need to be revealed. As for the player being able to see the entire map every time FoW was toggled, I'd think the toggle should happen quick enough that at most you'd see a flicker, but probably nothing at all.

    -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