The MP save game corruption has been the bane of our gaming over the last week, preventing our group from being able to get anywhere at all. After many restarts and investigations, I finally managed to write a GUI that helped me to have some feedback when a player’s PC had become “corrupted”. In my search for the problem, I managed to discover that the playerlist.ifo file within the MP save game directory was beginning to show two entries for one of the players. It was this double entry that was giving us so many problems even after the initial problems had been clearly resolved.
Within the file, I could see that the WAN player had two player character entries for himself: one with both the first and the last name, and another with just a first name. At this stage, I had no idea what was causing the sudden dropping of the last name. However, after doing some more testing, we discovered that the problem occurred in a fairly standard way when my wife joined as a second player. I then checked the code to determine if there were any scripts firing (by her) that may have had something to do with the last name. Then I found it! I had indeed, only in the last couple of weeks, made one minor tweak to the code with respect to deleting the last name of (what I thought was) creatures other than the PCs. Sadly, I had forgotten all about this, and even on first checking, it obviously bypassed companions. However, there was no check in place to ensure another player PC did not have their last name deleted!
That error was, in fact, in two places; and once the check against deleting a PC’s last name was put in place, the save games from that point onward were no longer corrupted. Evidence that such a small innocuous fix can have devastating consequences. Thankfully, that one now in the past!
I have been working in one or two other issues that have come up while testing:-
- DM map fixed. (Was not opening.)
- DM Examine fixed. (Was causing terrible issues with memory leaks and overflows.)
- Companion recovery after combat (with Companion Protector feat). If a party died and the player re-spawned and went on to defeat the enemy, the companions were not recovering. They do now.
- Turn-Based combat button is working better, and has GAME PAUSED fixed after usage.
- Trickster Jewellery (some items) had failed to register in the database. A check was removed (which appeared to not do as expected anyway), and the database now fills correctly.
- Ensured GetAPlayer home brew function does return a valid object, even if it is a DM.
More code tightening, especially on the “On Enter” scripts with respect to areas. Some routines that duplicated work have been removed, with respect to setting up the database.
Reduced the number of weather units created to help improve performance.
Ensured newly created PCs would no longer be forced to take the default package after the player had taken time to setup as they wanted. (This is the case for 1st level PCs anyway.)
As a result of the above, I have disabled the RECOMMEND button for CLASS SELECTION when clicking on the LEVEL UP button, as it crashes the client if this is done.
GRAB THE LATEST VERSION HERE: https://neverwintervault.org/project/nwn2/module/scroll