Update: Version 0.9.0 released (30.10.2007)[story of my life]
Hey everyone, long time no see.
I was around here some time ago with 'M4v3R' nickname, but I don't remember my password now and the it looks like that I don't have access to my previous mailbox (don't even know which one it was).
Nevertheless - I wrote few programs in Delphi for FF7 to help translating it to my native language (Polish). Sapphire - main program for translating dialogs was a bit buggy with some levels. Unfortunately (or fortunately
) I don't use Windows anymore so I can't fix it. So I've decided to write a new one - simpler one too so it would be less prone to errors. It's written in Mono C# (uses
.Net Framework version 1.1), works in Windows and Linux as well and is a command line tool.
[/story of my life]
FieldTool does two things:- Export function: it takes flevel.lgp archive, unpacks field files, extracts dialogues from them and puts the dialogues in nicely formatted txt files for you to read/modify.
- Import function: takes a directory with txt files created by export function and inserts the dialogues into field files, then repacks them to the flevel.lgp archive.
Usage is as follows:Usage: fieldtool.exe <MODE> <LGP-FILE> <TXT-DIR> [FILE(s)]
MODE - one of following:
e - export dialogues from archive
i - import dialogues to archive (not implemented yet)
LGP-FILE - lgp file to work on
TXT-DIR - output/input directory
FILE(s) (optional) - work only on these field files (separated by space)
For example if you have the program in your FF7 directory you could use it as follows (create the 'txt' directory first!) to extract dialogues:
E:\FF7\fieldtool.exe e data\field\flevel.lgp txt
Now you can modify dialogues in txt directory, and if you want, say, import only 'astage_b' file (because you were playing with Event Square dialogues):
E:\FF7\fieldtool.exe i data\field\flevel.lgp txt astage_b
The downloads:-
FieldTool v0.9.0 (9.7 kB)
-
FieldTool v0.9.0 source files (Monodevelop project) (14.5 kB)
Release notes for v0.8.1 - v0.9.0Coding late at night has its effects, v0.8 was very buggy when importing files to LGP. Fixed every one that I could find.
Import speed improved (see speed report in posts below).
Special characters handling improved.
Some random notes:- For decoding text it uses a separate file - 'fieldtool.tbl' - containing table with all possible characters (00 - FF) plus a few special ones (that are after 0xFE character).
- I've tested it with couple of level files, modifying texts (so size was bigger or smaller) and re-importing it. It worked, but I don't guarantee that it'll work correctly for You so please backup your flevel.lgp file before testing it! Knowing my (little) experience in writing programs for Square games there will be files that are buggy; maybe there are other bugs - I finished writing this after ~10 hours of coding in one day!
- Exporting works quite quick, whole archive under 20 secs on my 1.6GHz laptop; single files export is a fraction of second. Importing could use some speed up though (approx. 1 second for each file). I will work on it when I'll be certain that there are no major bugs.
- LZSS routines were written based on Qhimm's Garden sources. Thanks Qhimm!
. LZSS encode isn't as efficient as the original alghorithm though, so compressed files are ~10% bigger than original compressed ones.
- For speed purposes, files are put always at the end of LGP archive. It means that it'll grow bigger everytime you import a file to it.
- Quite a few files have an "akao [...]" dialogue at the end. It's a bug of Square it seems, but don't worry about it. Just don't touch this dialogue and it should be all right.
---
Comments are welcome
. Please note that this software comes without no guarantee -
backup your flevel.lgp file before playing with it!And to answer question "Why write another tool for FF7 Dialogues" - there is no single tool for this task that is bug-free. Cosmo has some weird bugs, Sapphire has them also. Loveless, latest program that I saw looks promising, but still as reported by my friend it likes to crash a lot, and doesn't support mass exporting/importing. So I try to fill that hole at last
.