There is a patch to add subtitles to the English version of this game. https://www.thezorklibrary.com/installguides/znpatch.zip I would like to be able to adapt this patch to allow subtitles to be added to this game in other languages. The subtitles are included in the subpatch.zfs file. A bms script https://github.com/AlexKimov/heavygear-file-formats/blob/master/scripts/zfs.bms allows you to decompile it into many files (sub, txt, etc...=) The subtitles seem to be in some of the txt files but these files are not directly usable in a text editor. Is it possible to properly extract the text from these txt files, edit it and then reinsert it?
for k = 0 < SECTION_COUNT get HEADER_POS long get HPOS asize MEMORY_FILE append put HEADER_POS long MEMORY_FILE append XMath NUMBER "k + 1" if SECTION_COUNT == NUMBER math FILECOUNT = REMAINDER endif xmath OFFSET "OFFSET + 4 + FILECOUNT * 36" log MEMORY_FILE2 0 0 for i = 0 < FILECOUNT GetDString FILENAME 16 get POS long get unk1 long get SIZE long get unk2 long get unk3 long string NAME p "unpacked\%s" FILENAME open FDSE NAME 1 get SIZE asize 1 append PutDString FILENAME 16 MEMORY_FILE put OFFSET long MEMORY_FILE put unk1 long MEMORY_FILE put SIZE long MEMORY_FILE put unk2 long MEMORY_FILE put unk3 long MEMORY_FILE log MEMORY_FILE2 0 SIZE 1 append math OFFSET += SIZE next i get SIZE asize MEMORY_FILE2 append log MEMORY_FILE 0 SIZE MEMORY_FILE2 append get SIZE asize MEMORY_FILE putVarChr MEMORY_FILE HPOS SIZE long GoTo HEADER_POS next k
get SIZE asize MEMORY_FILE log "REPACKED.zfs" 0 SIZE MEMORY_FILE
Thank you for this script which allows me to recompile the zfs file. Unfortunately, I won't be able to use it if I can't modify the files containing the game's subtitles beforehand. Let's take for example the case of the file tb2el11c.txt which contains the text
<FONT "Arial" JUSTIFY center BOLD on POINT 18 RED 255 GREEN 255 BLUE 255> <FONT Arial BOLD on JUSTIFY center POINT 18 RED 211 GREEN 243 BLUE 245>Finally someone has come. <FONT Arial BOLD on JUSTIFY center POINT 18 RED 211 GREEN 243 BLUE 245>You've got to help us. <FONT Arial BOLD on JUSTIFY center POINT 18 RED 211 GREEN 243 BLUE 245>They're in the temple.
The file opened in Notepad++ looks like this: Each character is separated by NUL Editing is therefore impossible to achieve with the text in this form.