I am looking for advice on the best way to handle a custom hex section of variable length when dumping script. More precisely, I have a Cartographer-Atlas set of commands & tables that works wonders for normal text (thanks to RedComet and Klarth for these great programs!), but I don't know how to handle the following.
The game has a script engine. In the script, I can clearly see the parts that introduce speech from the characters (with character ID), line break, prompt to wait for key press, and end of speech. Oh, and I have a proper (very long) table for the text itself, of course.
On top of these, there are longer series of bytes which I am still working at understanding.
But let us focus on the tag that introduces character's speech. It goes:
00 00 0z 00 xx 00 where xx=character ID on 1 byte, and z=0 for start of speech, 2 for reply.
Now with Cartographer I think can indicate this as:
which will result in 2 bytes being dumped every time this is seen. I assume I would then create a "post processor" that I run on the script resulting from Cartographer to customize the meaning of the character ID.
QUESTION 1: Is this the right way to go?
QUESTION 2: Is the source code from Cartographer available to try and extend / customize it to support that? If not, is there any source code you would recommend I use as a basis instead of reinventing the wheel?
Also to add to the question, there are "quite a few" bytes that are added in between script sessions, just before the 00000000 tags (and after the preceding 7F). Here are a couple of examples that show the flexibility needed:
I am not asking for an interpretation of these bytes - I want to work at it. But to help me with that, I would like to "raw dump" them in order to compare their different occurrences.
QUESTION 3: I don't believe Cartographer would support a variable-length dump, would it?
QUESTION 4: Apart from writing my own dumper (which would require table support since this is a Japanese game), is there an easier way forward?
I am OK with programming. just asking for advice on the "shorter" path forward.
Thanks in advance for any insights you may share.
By the way, the game is Super Robot Taisen Advance for the GBA. (No promises, this is more of a "how far can I go" self-challenge for now, but I would really like to at least get this to a stage where I can share the dumper-inserter. If not more. Well thus the "how far".
Have a nice day!
PS: Sorry for the long post.
EDIT: Going the "custom dumper-inserter" way.
Topic can be closed.