Oh, you're with this project? Cool. :3
Yup :3 I'm the leader on that project. I've got it to a point where it works well for dumping/inserting on some of the files, so that's a huge plus. I'm still having to do them by hand, but it's much faster to do what I need to now. I spent a few hours this morning running through a single script in the game and got a decent amount of the unknown control codes figured out and documented so the dumped script is much cleaner now(love the linked entry function!).
Unfortunately, that really only works for one folder which is all just one person talking. The big problem is in the 2nd folder, which is dialogue between two characters. What I hadn't noticed before is that there's a pointer table at the beginning of each file. Since the script was linear, the first six bytes were just
which I would later figure out meant there was only 1 pointer(at 0x14,which is the beginning of the dialogue). Here's where the fun part comes in for me. The other folder with the two-person dialogue will have pointers to different sections of the code with the number determined by the first 2 bytes, followed by that many 4 byte pointers directly after. Now I don't think this effects the dumping/inserting TOO much, but they will have to be modified once the script is inserted to match up with the new positions. I'm trying to figure out if there's a way for the dumper to toss tags to those positions which will help me know where each different block is. Hopefully this can be done in a way where the inserter will ignore said tags.
There is one part I'm not sure how to handle though, which is the questions. In the two-person dialogue there will occasionally be questions, when answered it uses the pointers at top to determine which block of dialogue it sends you to. The problem is that the encoding switches here. The choices you're given are encoded in sjis instead of the remapped sjis used in the rest of the dialogue.
There is a control code for when these question blocks appear, but I'm unsure if there's any good way to handle this. The only thing I could think of would be to have two table files loaded and for that control code to switch table files in the dumper/inserter. Is there any reasonable way to handle this?