Here's my plan of attack to get things moving on this front again:
1) Translate the Terminus Traduction tools into English. I might leave most/all of the actual variables in French, and only translate comments, printed strings, and scripting commands. I've found their code to be really well organized/structured, and their tools more complete than the other sets. This also includes removing the French translation that sits in the Textes_Avant folder in the distributed version (so that extracting and reinserting does what you'd expect) and fixing the accent issue with script extraction. I'll try to write better documentation that provides instructions for the *order* of scripts to run.
2) Move utunnel's fieldscript decompiler (and compiler?) into the TT tools. That is, have the TT tools run the LZSS decompressor and fieldscript decompiler on file 0003 in each room, as part of its script extraction routine.
3) Rewrite/edit the decompiled fieldscript format to be more human-friendly / editable. This includes a few things:
- Remove the hexidecimal indexing at the start of each line, or at least make it optional.
- Change the format of decompiled IF statements to point to a marker in the code (e.g. LANDING_POINT(2)), not a hex reference. As is, all IF statements are decompiled literally, indicating the file position marker to jump to if the condition is/not met. This makes it difficult to add lines (or change a line to an opcode with a different byte length) to the fieldscript, as it requires the user to change *every* file position marker after the added lines.
- Make the IF statements more consistent. As others have noted, some of the IF-type opcodes seem to be upside down, or are phrased in the negative (e.g. IF_CHARACTER_NOT_IN_PARTY). As far as I can tell, all IF opcodes are most directly phrased as IF(condition) CONTINUE, ELSE GOTO(reference).
- Add metadata files for labeling entities and scripts at decompile time (add comments to individual entities and scripts). If the metadata file for a room doesn't exist when it is decompiled, the decompiler will make a "blank" or default file with the right number of entities and scripts per entity. A human can then edit that file to overwrite default names and descriptions, so it decompiles "nicer" next time.
4) Write a fieldscript compiler that's compatible with the new format, and have the TT tools recompress and insert it when the script is reinserted.
5) Make some sort of database / something of unknown opcodes (frequency, where they occur relative to other operations, etc), as a reference for trying to decipher them. Yes, this is vague.
---------------------------------
I'm going to do all of this in a public GitHub repo, both in order to generate a history of changes from code written by others that's publicly available and to (hopefully) foster collaboration with others. In particular, just about anyone should be able to contribute to the fieldscript metadata labeling, once those files exist-- no programming, just labeling.