Yay, hard stuff…
So, the next part is going to be pretty tough, and take probably a lot of time. Throughout the text there are codes that cause something to happen (when experimenting, I changed one and instead of bringing up a portrait and the next line of text, it switched out to a completely different section of the game and then restarted), and to keep them from messing with the actual script text, I need to isolate them so they get dumped along with the script text. This is actually pretty important, and definitely tedious.
The first thing I successfully isolated are codes that call a portrait, so you know who in the game is speaking (at least when it’s a main character) and what kind of mood they’re in. But, like with everything else in this game, nothing is simple. It’s a set of 4 bytes; the first says “display a portrait,” the seconds says “display THIS one,” the third says “at this X location,” and the fourth says “at this Y location.” That layout is simple enough, but I need to have added to my table (the thing that has a listing of what bytes mean what letters/other stuff) each combination of character portraits and locations they can appear. Fun times. Sheesh.