LGP Tools v1.51 --------------- Coded by Ficedula (ficedula@lycos.co.uk). Other programs by me: -Cosmo: FF7 Text Editor - edit text, dialogue, sounds, from in game. -FF7MIDI: Music editing aid for FF7. -FF8Configurator update: Allows you to use high-quality soundfonts with FF8 & SB Live. -FF7Music: Replace FF7's midi music with MP3s! -Cetra: Patch FF7 to run in a window or in 32-bit colour! -FFLZS,FFLGP,FFTEXT - command line editing tools for Final Fantasy files. How To Use ---------- This is actually easy to use unlike some of my other progs :) To extract files from an LGP archive, click File/Open and select the LGP file. Then, to extract one file, choose it in the list and click "File/Extract". Select where to save it to. To extract multiple files, Shift-Click or Control-Click them, then use File/Extract. To extract every file, click "File/Extract All" and select a folder to extract them to. If an archive has >1000 files in it, only 1000 are displayed at a time. Use the dropdown list to choose -which- 1000 are listed (1-1000,1001-2000, etc). (Extract All extracts every file in the archive, BTW: not just the currently displayed bunch). You can change how many files are displayed at once using the "Options/Set Block Size" menu item. This chooses how many items are displayed in each "block". The change doesn't take effect until you restart the program. Why change it? The more files you display at once, the slower it is to fill the list. Of course, if you display too few then you might not find the one you're looking for. It's a tradeoff. If you double-click on a filename in the list, certain file types can be previewed. From the preview you can export the file. This is different to extracting it; Export may convert the file to a different format (example: Exporting a texture, it's converted to a standard windows BMP file). To CREATE an archive: --------------------- Make sure all the files to go in the archive are in one folder (and no other files are in there!) Click File/Create, and choose that folder. Choose a filename for your new LGP archive. A few seconds later it should be done! NB: You can only create archives with standard headers. One archive (MAGIC.LGP) has a different structure to the others; don't know why, but I *suspect* you'd have trouble trying to create a replacement for it. You can only create archives with the "right" number of files in them. (EG: AWE.LGP for FF7 had 95 files in it, so you can create an LGP file with 95 files in it. But you can't create an LGP containing 100 files, because no FF7 archive contained 100 files). (This shouldn't be a problem - why would you need to include more files? The game wouldn't use them). Make sure you aren't creating the LGP file in the same folder as the source files (otherwise it'd try to include itself in the archive and it fails). OTHER COMMANDS -------------- Repair Archive - this re-writes the table of contents (TOC) at the start of an archive. Basically, it makes each entry point to the first block of data it finds with the same filename. If you've been appending files in the advanced editor, updating using the command-line tools, or editing with a program like Cosmo, these are all repairable changes (since they'll often just "tag" their new versions onto the end of the archive and leave the original data untouched). It isn't guaranteed to fix anything though, and you can lose changes that have been made to the file! Also, a Packed archive is unrepairable. Pack Archive - this removes old/unused data from the file. As explained in the Repair summary, editing an archive can lead to changes being added on to the end of the archive, so it just grows bigger, and bigger, and bigger... Pack archive removes every version of a file except the current one, making the archive smaller again. Replace file - this replaces the file you've selected with another one from disk. So, say you've extracted a file from an archive and edited it. You'd then use Replace to put the changed version back into the archive so FF7 will use it. Most files are added "as-is", ie. the editor doesn't change them, EXCEPT if you're replacing a .TEX file with a .BMP file. The editor will then convert the BMP to a 256-colour TEX before writing it into the LGP. Note that this means you should make sure any graphics you're adding into the archive are 256-colour BMP's, otherwise the colours will get messed up... Find - look for files in the archive matching a particular criteria (of a certain size, with a certain name, etc.) ADVANCED EDITING ---------------- Advanced edit breaks some of the rules above. For example, you can have any number of files whatsoever in an archive. But not all of them will be "active" at once. Confused? An example: AWE.LGP had 95 files in it originally. So your new version of AWE.LGP must have at least 95 files in it, with the same name as the original 95 - otherwise the game wouldn't find all the files it needed. With advanced edit, you can add additional files onto the end of the LGP archive, and set them to "override" or replace the files already in there. Only 95 files are usable at once, but you can change which files are "active" without having to extract them all and create a new archive. Also - importantly - the original data isn't overwritten, so you can switch back to that original file, even if you forgot to keep a backup. The "Repair Archive" option on the main menu does just this - it tries to automatically switch all the files back to their original data. You can do it yourself using the Advanced Editor, too. Don't worry if you don't understand this section, it's called advanced for a reason, k? LGP PATCHES ----------- Once you've edited the files in an archive (graphics, music, text, whatever - and you DO know LGP Tools won't edit the files for you, just extract them?) you might want to send the files to someone else. That's OK for the music archives (1-1.5MB each) but doesn't work too well for the Location archive (140MB?). The solution: An LGP patch. The patch basically lists the changes between the original version of the archive and the new one. On top of that, if a file in the archive that's changed has only changed a bit, it will try to list only the changes within that file - so that patch can be very small. The resulting patch files are compressed into one FFPATCH file. Choose Options/Create Patch to open the Create Patch window. Choose a SOURCE LGP (this is the original, unedited version of the file. If you haven't kept a backup copy, you might need to dig out your install/game CD). Next, choose the PATCH SOURCE. This is where *your* versions of the files are. It can either be a folder, with the extracted files in there, or another LGP with updated files in it. Then, start it off, and choose the filename to save your patch under! (Patches are saved with extension .FFPATCH) You'll also need some free disk space in your temp folder. How much depends on the size of the patch ... if only a few files have changed, you'll need at most space equal to the size of those files, hopefully a lot less. Whoever downloads the patch is gonna need a way to install it. This LGP Tools package can obviously install patches (that's what it does!). Or, if you go to Options/Patch Converter in the program, you can convert a .LGP patch into a self-installing patch! The self-installer only adds to the size a bit; the small (non-visual/command-line) installer adds 55KB to the file size; the larger (visual) installer adds 130KB to the size. Both do the same thing, the larger one just looks nicer and is easier to use. -Offer to Pack, means that after the patch is applied, the patch will offer to repack all the archives. Probably best to leave this on since editing archives makes them grow a LOT in size. PREVIEWING ---------- If you doubleclick on a file in the main window, the editor will try and preview it. If it can't work out what the file type is, you can specify what type of file to try and view it as. Currently previewing is supported for the current file types: .TEX : Custom PSX texture format (ie. bitmap graphics) .RSD,.TXT : Plain text .HRC : Skeleton hierarchy (editor will read associated RSD's for you to find out what files are used) .P : 3d Polygon Data - : Field backgrounds Note if you try and view a file as the wrong type the editor could crash ... I take no responsibilities! For all file types but .P, right-click on the preview to save the preview (Text as .TXT files, Graphics as .BMP files). Hierarchies can be saved as text, or you can export the whole skeleton. This basically just extracts all the .P files used by the skeleton in one go, saving you from having to track them down. Optionally, it will also export all the textures used by the model and convert them to BMP's as well. In the 3d preview, there are 3 viewing modes: Spin: The model spins around slowly Free rotate: Click and drag the mouse to rotate the model however you want (try both left & right buttons). Free move: Click and drag the mouse to rotate your "eye" position and move around. (again, use both buttons). Note that for some models, my other FF7 Model Viewer (Ifalna) can view the *whole* model at once - not just a single body part - and will also animate it! This is of course much better than the limited preview LGP Tools can provide ;) CREDITS ------- Thanks to: Jordan Russell (Author of Toolbar97) Edison Mera Menéndez (Author of Delphi bzip2 streams; used for compressing patches) Srethron and Skillster for the many suggestions and bug reports! Qhimm (www.qhimm.com) for the file formats Phew! All done. Any comments? Bugs? Email me! ficedula@lycos.co.uk Updates at http://ficedula.cjb.net