• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Fixed CTD when trying to load a game when resurecting

The only time I ever get a crash there is if I get in a hurry and try to start over too soon. This makes the game try to do two things at once and of course it crashes. Now since you HAVE to exit the game completely and restart it seems that the crash is now hard coded in.
 
@Hylie Pistof: The idea is to force players to wait with loading their save until after the resurrecting process is complete.
That should prevent the game from having to do two things at the same time.
Does that sound like a sensible idea to you?

Note that the current solution doesn't work and needs to be changed anyway.
Probably what we'll have to do next is to prevent access to the main menu at all while you're being resurrected.
Which means that you won't be able to load a savegame until either you have finished the reload to the tavern OR you have fully died.

If you never want to be resurrected though, I recommend disabling that option in the game settings.
That saves a lot of trouble.
 
Last edited:
Yes, forcing players to NOT do stupid things is sensible. My complaint is about having to exit the game completely even after doing it correctly. I hope this gets fixed soon.
 
My complaint is about having to exit the game completely even after doing it correctly.
Why do you need to exit the game? Once the resurrection process has completed, everything goes back to normal.
So you just need to wait a little bit and then you are free to do what you want again. :confused:
 
Since @Hylie Pistof was asking about this, I spent some time to implement the alternate solution.
So now you won't be able to save, load or open the main menu while being resurrected.
But after a bit of patience, everything goes back to normal. And.... hopefully no CTDs anymore! :whipa
 
Perhaps I'm too impatient. Normally I set "Survival" to 130 so that there is no chance of resurrection, death means death, then I press F1 and reload the last saved game right away.

Or at least, I used to. Now there's a significant delay while the game decides that I'm really dead. Where is this block on the main menu implemented? I'd like to get rid of it in my own installation.
 
Or at least, I used to. Now there's a significant delay while the game decides that I'm really dead. Where is this block on the main menu implemented? I'd like to get rid of it in my own installation.
I cannot remember the exact code you need to look for, but it is referenced in seadogs.c . Search for "mainmenu".
It is probably something like "NoSave.Resurrect" or something like it.

Then seach the entire PROGRAM folder for instances of that. Somewhere in the LAi folder (I think) it gets added to the player upon dying.
That is the line you probably want to get rid of.

But rather than you editing your own game files, I'd rather see this sorted out PROPERLY.
I can think of two solutions:
1. Add an exception so if the "Survival chance" is exactly 130, then the attribute doesn't get added
2. Determine if you will be resurrected AT the point where that attribute gets added (instead of later) and add it ONLY if you are indeed being resurrected
 
Option 2, if practical, would be best. The original problem was CTD if you press F1 while resurrecting, so there's little point in causing trouble for anyone who isn't resurrecting, either because they set "Survival" to make it impossible or because they didn't pass the survival check.
 
Option 2, if practical, would be best. The original problem was CTD if you press F1 while resurrecting, so there's little point in causing trouble for anyone who isn't resurrecting, either because they set "Survival" to make it impossible or because they didn't pass the survival check.
I think option 2 can be arranged. I'd need to look into it.

But before doing all of this, I'd like to know if this indeed DOES prevent the CTDs.
Otherwise it becomes all a bit pointless.... :facepalm
 
@Grey Roger: I may have a simple and good solution for this one.
In PROGRAM\seadogs.c find:
Code:
   //ccc call original GameOver function / BF mar05
   if (rand(100) + (makeint(mc.skill.Sneak)*3) < DEATHRATE || CheckAttribute(mc,"killed")) { // SJG
     GameOverOrg(sName);
     return;
   }
Replace with:
Code:
   if (!CheckAttribute(mc, "NoSave.Resurrection")) { // PB: Check resurrection chance earlier in LAi_events.c
     GameOverOrg(sName);
     return;
   }

And in PROGRAM\Loc_ai\LAi_events.c find:
Code:
chr.NoSave.Resurrection = 1; // PB: Lock the main menu
Replace with:
Code:
     // PB: Immediately determine if you survive or die
     if (rand(100) + (makeint(chr.skill.Sneak)*3) >= DEATHRATE && !CheckAttribute(chr,"killed")) { // SJG
       chr.NoSave.Resurrection = 1; // PB: Lock the main menu
     }

If I didn't mess up my logic here, that should lock the main menu only IF you truly are being resurrected.
So if you actually die for good, you can immediately access the menu and load your savegame.

Please try and let me know if that seems to behave itself. :doff
 
Yes, that works - thanks! :onya

What doesn't work for me is resurrection. As a test I set "Survival" to 1, meaning automatic resurrection, and it didn't happen. I was stuck lying dead on the ground, the combat scene continued, and the new system meant I couldn't press F1 to quit and restart. I had to go to the Windows desktop, stop the game from "Task Manager", and then restart. Needless to say, I immediately put "Survival" back up to 130!
 
Yes, that works - thanks! :onya

What doesn't work for me is resurrection. As a test I set "Survival" to 1, meaning automatic resurrection, and it didn't happen. I was stuck lying dead on the ground, the combat scene continued, and the new system meant I couldn't press F1 to quit and restart. I had to go to the Windows desktop, stop the game from "Task Manager", and then restart. Needless to say, I immediately put "Survival" back up to 130!
So in other words.... no, it doesn't work. I'll see if I can fix the resurrecting this evening; that needs to work too.
 
What doesn't work for me is resurrection. As a test I set "Survival" to 1, meaning automatic resurrection, and it didn't happen. I was stuck lying dead on the ground, the combat scene continued, and the new system meant I couldn't press F1 to quit and restart. I had to go to the Windows desktop, stop the game from "Task Manager", and then restart. Needless to say, I immediately put "Survival" back up to 130!
Did you install the latest "Levis Fixes" as well by any chance? I just noticed that wasn't fully compatible with my change there.
When I tested it myself, it did actually work.

I'm still making some extra changes though, because you could still get some nonsense log messages.
Hopefully that will be ironed out for my next update too.

As far as I can tell, this behaves itself properly now.
 
Has anyone been dying and being resurrected in the game in the past three weeks?
Did you notice anything out of the ordinary?
 
Trying "Tales of a seahawk" the first french guards at Speightstown entrance don't seem drunk at all - they killed me no sweat twice - reload on resurrection blocked with message "can't save or load until officiant (well actually the NPC name) leaves" - or something like that. So this does seem to work. If you're quick on the trigger you can get the message whilst still at the death scene before the video plays but no real problem with that since you soon see her when the video stops.

Actually resurrection gets you past the guards, but I hope it isn't the only way for a novice without having to boost melee skill, get armour etc. Going to look at that code change for weakening the guards now
 
Thanks for trying, @pedrwyth!
Sounds like my Resurrection changes worked then.
Indeed you could get the message before the reload; I remember that from my own testing.
But that should be Ok. "Fixed" it is then!
 
Should I mention that when you die and start over you are stuck and need to hit F1 to get back into the game? This started happening within the last month.
 
Dying works! I know it does!

The only thing is that while you are in the process of being resurrected, you cannot open the main menu.
That is intentional to prevent the game crashing.

So I am not sure what you refer to here at all! :shock
Please give plenty details!!!
 
Back
Top