I can duplicate the elevator bug every time now if I complete the levels in a certain order, and the glitch always starts happening after I complete level 21 (Research & Development Sphere). So I have been trying to figure out what is different about that level. Seemingly nothing, so out of desperation just trying to rule out every variable I could think of, I tried swapping its level name and entry text with another level (I inserted the pointers for Main Engineering). I have a saved game file I've been using for testing where I enter Research & Development Sphere and then F10-E to complete it and then I backtrack to the elevators, and consistently every time the elevator bug would happen when I tried to enter the 1st elevator to back track back to the first floor. But after doing this pointer swap, the bug did not happen! Then, if I change the level entry/name pointers back, the bug happens again!
So what's weird about the pointers for this level? Well, at about this point in the game, because I added so many extra levels over the regular keen 5, I was running out of text space for level names and entrances. So, to save room, I started combining them. The level entrance texts always contain the name of the level anyway, so I patched in the entrance text as normal, and then decided for the level name, I would have the pointer just point to the start of the name, within the entry text.
So here would be the entrance text, patched into the level entry section as normal:
Code: Select all
%patch $20471 "Keen slithers through" $0A "the Research &" $0A "Development Sphere" $00
My level name pointer was $2000048BRL so it points to where the word Research starts within the level entry text.
I thought this was a clever way to save space, I was able to get the entrance text and name I wanted using only one text string. I guess the game doesn't like this. I'm a noob at patching, just trying to figure things out and learning as I go so I don't really understand why this is a problem, but maybe someone can enlighten me. Or if this explanation makes no sense then please correct me, but I do think this is the cause of the bug, I can switch the pointers for this level to other level texts (where the name and entrance string are separate as normal) and then bug will not happen. Switch it back and the bug happens again on the same save file.
So, if this is my problem, then I guess I now have the task ahead of me of redoing a portion of my level names and entrance texts to try and make it all fit without combining them (I used this trick on several of the later levels, which again seems to explain why the elevator bug only starts happening late in the game). I believe I will have to shorten some of names and/or entrances texts because they won't all fit otherwise.
K1n9_Duk3 and or other experienced patchers, please let me know your thoughts on this, if what I've said makes any sense or not. I'd hate to go and redo all my level name and entrance string for nothing