Results 1 to 7 of 7

Thread: Random CTD during AI turn (random faction, random turns)

  1. #1

    Icon1 Random CTD during AI turn (random faction, random turns)

    I started my mod without the papal_states faction and therefore no crusade mechanic. However, I've recently decided to activate the mechanic for "venice" (heavily modified), changed the descr_sm_factions file and the faction standings so that it reflects venice and not papal_states, and venice's leader is stated as the Pope in descr_strat, etc. Ever since, the game will crash at random during the AI's turn without an trace in the logs. It can happen at turn 1 or at turn 130, and the faction is also random or at least it looks like so to me, as it has happened with Spain, the HRE, and France so far. Moreover, I can load the autosave of that same turn and it won't crash that time. The Crusade mechanic works and all.

    What can cause this? I haven't touched the cardinal models or really anything crusade related as I didn't use it until now. I even checked other unrelated things like the characters names, using the Name Verifier tool, character traits and ancillaries but I haven't found anything wrong with it and the logs don't mention any errors either. I've commented out the special_faction_type now from venice and I've gone over 200 turns without crashing, so it has to be something related to it.

  2. #2

    Default Re: Random CTD during AI turn (random faction, random turns)

    Where does the log terminate? That can tell you what was parsing when the game crashed.

    The crash happens on a random turn number and you can get past it by loading a save and trying again. This tells us it is likely a trigger with a random chance of firing per turn. My mod has a similar crash that goes away when I delete the triggers in export_descr_character_traits, the log terminates reading that file but it's impossible to say which trigger is at fault. I plan on eventually rewriting all of those triggers. There are conditions related to the papal_faction that could be used in triggers for traits, ancillaries, standings, etc.

  3. #3

    Default Re: Random CTD during AI turn (random faction, random turns)

    It often ends in triggers for ancillaries or character traits, though they seem random as it's often the trigger for the translator ancillary or the harsh_lifestyle2 and 3 triggers(all being fired without errors), none which have anything to do with the pope or anything I've modded. I deleted all my modded triggers for both traits and ancillaries to test this and the game still crashed the same. The only way that it doesn't crash is disabling the whole papal faction mechanics from venice. And yeah I've ctrl+f'd the papal_states in many of those files and replaced stuff accordingly but I must've missed some file, I guess. I really don't know what it might be.

  4. #4

    Default Re: Random CTD during AI turn (random faction, random turns)

    The triggers at the end of your log aren't the problem because the log annoyingly doesn't show the trigger it got stuck on. But that the log terminates in the midst of trait/anc triggers is confirmation of my suspicion. Compare the trait/anc triggers in the log when there is no crash against the triggers you see when there is a crash, looking at the total number of triggers firing on average. If you see that only a fraction of the triggers that normally fire are getting to fire before the crash, that's convincing evidence that the problem is in trait/anc triggers. Try deleting all EDCT and then all EDA triggers including any vanilla ones still in your mod - the problem isn't necessarily in your modded triggers.

    There's nothing special about the faction name "papal_states" but there are a bunch of conditions that involve "pope" or "papal" that you can search in the docudemons. Check all instances of those in your trigger files.

    Btw, have you seen this thread?

  5. #5

    Default Re: Random CTD during AI turn (random faction, random turns)

    I hadn't seen your thread, it's very helpful. I noticed that I haven't seen a single inquisitor in my tests, though they're enabled as in vanilla in the campaign_db. I checked the descr_model_strat and the inquisitor model only had the papal_states texture and was missing the entry for venice. Could that be it? It still doesn't have to do anything with triggers, right?
    Last edited by Tristannis; April 14, 2022 at 04:09 AM.

  6. #6

    Default Re: Random CTD during AI turn (random faction, random turns)

    The missing texture probably isn't causing your crash, but you should definitely go ahead and fix it. If you intend for inquisitors to spawn then you should be sure they have all assets set up (portraits, models, textures, animations, audio). The inquisitor parameters are in descr_campaign_db under the 'religion' section. I think there may be other parameters not listed in this file that influence spawn chance such as religion %s in various regions. You can try spawning inquisitors in descr_strat or campaign_script for venice to see if they show up correctly - that would rule them out as the cause of the crash. I still suspect the problem is a trigger with a random chance per turn.

  7. #7

    Default Re: Random CTD during AI turn (random faction, random turns)

    I went on ahead and fixed it earlier, the inquisitors started spawning and it hasn't crashed ever since. For now I'll assume that fixed it.

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
  •