Results 1 to 15 of 15

Thread: Random crash?

  1. #1

    Default Random crash?

    I think this one is the weirdest crash I've ever experienced in a TW game...

    My game was fully functional and good until yesterday, when it suddenly started crashing when I tried to start a new campaign. However, it doesn't always crash at the same moment. Sometimes, it crashes right after I skip the faction intro movie, as soon as I have a brief glimpse of the loading screen. Sometimes, the campaign finishes loading and I get to the strat map, but it crashes when I click on a city or general. Sometimes, it doesn't crash at all during my turn, but does during the AI's turn as soon as I pass mine. And there is even a chance that the game will survive the entire first turn, just to crash at the end of the rebel faction's turn, when turn two is about to start.

    I clearly remember that the only thing I did before this crash started happening was delete a few unused custom campaigns from my world folder, and then delete their corresponding text files (those that give the names of cities and regions to each map). After that, my game went crazy.

    I can also recall that, shortly before that, I had been messing with .CAS files in descr_model_strat. I heard those are troublesome, so I find it worthy to mention them, even though I don't believe they are the cause because I remember the game was still working after I messed with them.

    Every time the crash occurs, I get the same old "Medieval II has found an unspecified error" message. The error log says nothing worthwhile for the most part, except if I try loading a particular campaign which contains a script with mission triggering commands. In this particular case, my error log says that the game couldn't find the mission IDs (I know this message is nonsense because I haven't changed anything mission-related for a long time, and my missions worked fine before).

    Is there a chance that someone knows how to help me, please?
    Last edited by es157; September 11, 2021 at 02:43 PM.

  2. #2

    Default Re: Random crash?

    Nothing? Really, this is driving me crazy already...

  3. #3
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: Random crash?

    Missing\invalid CAS files most likely.

    mission ID - a mission reference in descr_missions that you use in the campaign script, like the teutonic crusader missions.










  4. #4

    Default Re: Random crash?

    Quote Originally Posted by Gigantus View Post
    Missing\invalid CAS files most likely.

    mission ID - a mission reference in descr_missions that you use in the campaign script, like the teutonic crusader missions.
    Hello. I've apparently managed to outflank the problem, though I must still keep a close eye to see if the solution will last or if I'm just getting lucky.

    About the reference to mission IDs in the error log, I don't get it... There is nothing wrong with my missions as far as I can tell. Why is the log telling me that it can't find the mission ID if the same mission is being issued normally?

  5. #5
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: Random crash?

    I am assuming that the script initiates a mission, instead of the descr_mission file. In that case the mission requires a custom ID, hence my mentioning of the crusader missions in the teutonic campaign. The error won't be fatal but the mission will not execute.










  6. #6

    Default Re: Random crash?

    Quote Originally Posted by Gigantus View Post
    I am assuming that the script initiates a mission, instead of the descr_mission file. In that case the mission requires a custom ID, hence my mentioning of the crusader missions in the teutonic campaign. The error won't be fatal but the mission will not execute.
    How do I get a custom ID? Is it simply the one that is written after the mission type line in descr_missions?

  7. #7
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: Random crash?

    Here are lines from the teutonic campaign script:
    monitor_event MissionFinished MissionID adventure_crusader
    create_mission adventure_crusader teutonic_order crus3

    And this is the related mission in descr_missions: mission adventure_crusader

    Your log should show in which line the mission error occurred. Check the entry and look for a counterpart in the mod's descr_missions file.










  8. #8
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: Random crash?

    Yea missionID is the mission name, usually subname (as usually you use a new/modified mission). Its also possible to use paybackID, then you obviously write the name of the payback.

    It sounds like the mission is issued by a script, and it cant find it (would help if you showed the log entry), otherwise i dont see a reason it would report it.

    If you imported some kingdoms scripts without importing kingdoms missions, i assume it could happen... nevertheless, is there any create mission line in your script? Then just remove it?

    Afaik, i had some crashes with issuing capture settlement mission via script when there was no suitable settlement, not sure if this type of error could cause a crash. Tho perhaps if you dont have crus3 character, it might...


    Anyways, it sounds like you got several other sources of crashes, missions could possibly cause only the ones between turns... in case when they are scripted. Otherwise only at beginnings of your turns, as AI dont receive missions

  9. #9

    Default Re: Random crash?

    I fixed the crash by overwriting the base game with the mod files. I still don't know why the game suddenly started crashing to begin with, but as the issue is settled, I'm willing to move on...

    As for the mission ID error, this is what my log says:

    08:36:04.023 [game.script] [error] Condition parsing error in mods/FireAndBlood2.2/data/world/maps/campaign/custom/K.War_of_Five_Kings/campaign_script.txt, at line 3623, column 32
    Mission id is not specified
    08:36:04.023 [game.script] [error] Condition parsing error in mods/FireAndBlood2.2/data/world/maps/campaign/custom/K.War_of_Five_Kings/campaign_script.txt, at line 3651, column 32
    Mission id is not specified
    08:36:04.023 [game.script] [error] Condition parsing error in mods/FireAndBlood2.2/data/world/maps/campaign/custom/K.War_of_Five_Kings/campaign_script.txt, at line 3675, column 32
    Mission id is not specified
    08:36:04.024 [game.script] [error] Condition parsing error in mods/FireAndBlood2.2/data/world/maps/campaign/custom/K.War_of_Five_Kings/campaign_script.txt, at line 3703, column 32
    Mission id is not specified
    08:36:04.024 [game.script] [error] Condition parsing error in mods/FireAndBlood2.2/data/world/maps/campaign/custom/K.War_of_Five_Kings/campaign_script.txt, at line 3727, column 32
    Mission id is not specified
    08:36:04.024 [game.script] [error] Condition parsing error in mods/FireAndBlood2.2/data/world/maps/campaign/custom/K.War_of_Five_Kings/campaign_script.txt, at line 3752, column 32
    Mission id is not specified
    I can attest that, despite this error message, the missions work as intended, even by script.

    Besides, the lines mentioned in the log refer to the bolded line in the script:

    monitor_event FactionTurnStart FactionIsLocal
    and not DiplomaticStanceFromFaction venice = Allied
    and not I_PlayerHasMission
    and I_CharacterExists CerseiLannister
    and I_NumberOfSettlements byzantium > 6
    and I_TurnNumber > 31
    and RandomPercent < 8


    if I_LocalFaction moors
    create_mission assassinate_leader_dany moors CerseiLannister
    end_if


    if I_LocalFaction milan
    create_mission assassinate_leader_dany milan CerseiLannister
    end_if


    terminate_monitor
    end_monitor
    Last edited by es157; September 19, 2021 at 03:56 PM.

  10. #10
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: Random crash?

    I_PlayerHasMission - requires a mission to be specified. Simply add the mission name that is in the sections below, I am assuming that was intended anyhow.










  11. #11
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: Random crash?

    Quote Originally Posted by es157 View Post
    I fixed the crash by overwriting the base game with the mod files. I still don't know why the game suddenly started crashing to begin with, but as the issue is settled, I'm willing to move on...
    Well, if that was truly what fixed it, it would still not fix it for people when they play your mod once you release it

    Quote Originally Posted by Gigantus View Post
    I_PlayerHasMission - requires a mission to be specified. Simply add the mission name that is in the sections below, I am assuming that was intended anyhow.
    Yea, I assume what es wanted is to make sure that the playes doesnt have other mission in the moment. Im rather using "and not I_PlayerHasMissionType missionsource", as that lets you cover a lot of/most missions, or you could also use it several times to cover all your missions types
    Last edited by Jadli; September 29, 2021 at 10:36 AM.

  12. #12
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: Random crash?

    There seem to be several mission scripts looking at the log errors, so your approach is most likely better in it's blanket approach. I suppose in this case it would be "not I_PlayerHasMissionType assassinate_leader"? Just asking because in the sample the mission is called assassinate_leader_dany.










  13. #13
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: Random crash?

    The MissionType in I_PlayerHasMissionType means a mission source, not a mission type (yea, the name of the condition is quite confusing here). Therefore for example POPE_MISSION, COUNCIL_MISSION and so on. So whoever is issuing the assassination of Danny (I guess Cersei does) is the source, or whatever other source under which did es put it

  14. #14

    Default Re: Random crash?

    I understand. I was intending for the player to only get one mission at a time, but on a second thought, this is not really necessary to stand. I think I'll remove the problematic line altogether.

  15. #15

    Default Re: Random crash?

    Quote Originally Posted by Jadli View Post
    Well, if that was truly what fixed it, it would still not fix it for people when they play your mod once you release it
    It turns out that using the batch file also solved the problem without me overwriting anything. Previously, I had been using the crusades folder to launch the mod instead of using a separate folder. It had never caused problems to me until it suddenly did.

Posting Permissions

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