Author Topic: [FF7] LGP-Editor - Highwind (1.21) (Discontinued, use LGP/UNLGP)  (Read 57483 times)

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
THIS PROGRAM IS OUTDATED. USE AALI'S LGP/UNLGP INSTEAD
Download the program
---
Hy guys,
i have been working on a little program to view and edit the lgp-files (like LGP-Tools from ficedula) in .net. I have done the open-part (thanks to the wiki), but when saving the file there is a problem. I have used help of the wiki and made a method to save the lgp-file i opened/edited to the file but when i f.i. open & immediately save the menu-lgp and then run ff7, there are errors that ff7 cant read the files in the archives, even if my created file looks the same as the original file. The errors in App.log look like this:
Code: [Select]
OFFSET ERROR: usfont_a_l.TEX
ERROR: COULD NOT OPEN FILE usfont_a_l.TEX
ERROR: COULD NOT LOAD TEXTURE DATA FILE usfont_a_l.TEX
ERROR: COULD NOT LOAD TEXTURE DATA FILE usfont_a_l.tim
OFFSET ERROR: usfont_b_l.TEX
ERROR: COULD NOT OPEN FILE usfont_b_l.TEX
ERROR: COULD NOT LOAD TEXTURE DATA FILE usfont_b_l.TEX
ERROR: COULD NOT LOAD TEXTURE DATA FILE usfont_b_l.tim
OFFSET ERROR: btl_win_a_l.TEX
ERROR: COULD NOT OPEN FILE btl_win_a_l.TEX
ERROR: COULD NOT LOAD TEXTURE DATA FILE btl_win_a_l.TEX
ERROR: COULD NOT LOAD TEXTURE DATA FILE btl_win_a_l.tim
OFFSET ERROR: btl_win_a_l.TEX
...
...
But when i open the archives with my program or ficedulas lgp-tools, i see that the files are in the archives, the archives have even the same file size.
Could someone maybe tell me what problem i have if they know?

Thanks for all help,
Chris
« Last Edit: 2014-07-17 18:15:13 by Covarr »

_Ombra_

  • *
  • Posts: 110
    • View Profile
    • http://www.sadnescity.it
Re: Question about LGP-Archives
« Reply #1 on: 2007-01-13 02:08:12 »
Hey Christian,

nice to see all these programs popping up :D

You should compare with an hex editor the file created by your program and the original one to see if there are differences. Just by looking at the error log is hard to define the exact problem but looks like it's coming from the offset table at the start of the file.

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Re: Question about LGP-Archives
« Reply #2 on: 2007-01-13 10:46:27 »
OK, ive found the problem: In the 3-byte-long check code at the TOC i wrote the string "14 20 20" when it should've been "14 00 00".
Thanks for the help, ill be able to release the program soon.

One more question: How can i generate the crc-code between TOC and the data when creating a new file? the wiki didnt help very much...
« Last Edit: 2007-01-13 10:57:18 by Christian »

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Re: Question about LGP-Archives
« Reply #3 on: 2007-01-13 13:03:46 »
I don't think we know. We have always just "fooled" the CRC

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Re: Question about LGP-Archives
« Reply #4 on: 2007-01-13 14:12:25 »

The SaiNt

  • *
  • Posts: 1300
    • View Profile
Re: Question about LGP-Archives
« Reply #5 on: 2007-01-13 14:15:40 »
I can tell you.
It's not a CRC.
It's a hashtable lookup.
I haven't bothered to write it up on the wiki, I hate writing documentation.

_Ombra_

  • *
  • Posts: 110
    • View Profile
    • http://www.sadnescity.it
Re: Question about LGP-Archives
« Reply #6 on: 2007-01-13 17:46:58 »
And btw, you don't even need it, just stick with the data contained in the original files and you'll be good to go

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Re: Question about LGP-Archives
« Reply #7 on: 2007-01-14 19:45:50 »
Hey, i've finished the first version of my program. It can create and open LGPs and extract, replace, remove and add files. Be sure to save changes in the archive, it's not like LGP-tools that writes all changes instantly to LGPs. I hope i've done the crc/index-part correctly, ive tested creating menu_us.lgp and it worked with the game.
The problem is it's very slow when reading big archives, because it reads the whole file, not just the TOC.

Download

Please tell me if you find bugs or errors in the program!
« Last Edit: 2007-01-14 19:49:22 by Christian »

Braveheart

  • *
  • Posts: 35
    • View Profile
Re: Highwind - .net FF7 LGP-Editor
« Reply #8 on: 2007-01-15 01:21:16 »
nice work!!!!!!!!

take off the slow to load the big files like the flevel.lgp, is very good program

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Re: Highwind - .net FF7 LGP-Editor
« Reply #9 on: 2007-01-16 15:52:39 »
Hi, there's a new release, i have shorted down the loading times by not displaying all files at once in the archives.

Download

_Ombra_

  • *
  • Posts: 110
    • View Profile
    • http://www.sadnescity.it
Re: Highwind 1.02 - .net FF7 LGP-Editor
« Reply #10 on: 2007-01-17 00:47:24 »
Really nice program Christian,

i think the solution you used to cut down loading times is not the best one. Instead you should read only the index and verify the end of the file and size without reading the whole thing and use a buffer on file operations

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Re: Highwind 1.04 - .net FF7 LGP-Editor
« Reply #11 on: 2007-01-18 15:11:11 »
I made a new Version, it doesnt read the whole files now and its a bit faster. Download

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Highwind 1.04 - .net FF7 LGP-Editor
« Reply #12 on: 2007-01-18 20:34:07 »
Christian you probably should get a wiki account, and update your contribution on there.
This is the current page with it on (I put it in).

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Re: Highwind 1.04 - .net FF7 LGP-Editor
« Reply #13 on: 2007-01-18 21:11:02 »
OK, but how do I get an account at the wiki? Cant find any register-form there.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Highwind 1.04 - .net FF7 LGP-Editor
« Reply #14 on: 2007-01-18 21:58:15 »
OK, but how do I get an account at the wiki? Cant find any register-form there.
You must ask someone, Qhimm or halkun I believe can help you there. PM them (do not post to the forum like some have :D ).
Cyb

_Ombra_

  • *
  • Posts: 110
    • View Profile
    • http://www.sadnescity.it
Re: Highwind 1.04 - .net FF7 LGP-Editor
« Reply #15 on: 2007-01-19 03:39:23 »
Hey Christian,

i noticed something, now the program is way faster than the older version but it doesn't say the length of each file. Maybe you should jump to each offset and read only the length so you can have it on the list as well. It's gonna slow the program down a little bit but the difference should be minimal.

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Re: Highwind 1.05 - .net FF7 LGP-Editor
« Reply #16 on: 2007-01-20 15:55:17 »
First of all, Thanks for the answers.

_Ombra_: The new 1.05 version does read the lengths too and is nearly as fast as the old one. I changed the Style of the program a bit.

Download the new version here.

_Ombra_

  • *
  • Posts: 110
    • View Profile
    • http://www.sadnescity.it
Re: Highwind 1.05 - .net FF7 LGP-Editor
« Reply #17 on: 2007-01-21 01:32:39 »
Hey Christian,

i'm glad to help. The program is coming along nicely. I hope i'll have time to check it deeply in the near future.

Btw, a little graphical glitch. If you resize the window, the Add Foder button and the Extract Selected Files button resizes themselves too. Maybe you should fix a minimun size for the window and when you maximize it the buttons remain in place but the part with the file names, lenght, etc. adapts to the new size. (But is not really important since the program works great)

The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
Re: Highwind 1.05 - .net FF7 LGP-Editor
« Reply #18 on: 2007-01-21 11:02:18 »
Im impressed, not only does it load files very fast it look easy to use too!
I assume that the empty pane on the right it going to be a viewer/previewer?

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Re: Highwind 1.05 - .net FF7 LGP-Editor
« Reply #19 on: 2007-01-21 11:13:44 »
This panel can only display text files like hrc or src files. A viewer for other types (textures, backgrounds,...) will be implemented soon.

stormmedia

  • *
  • Posts: 503
    • View Profile
Re: Highwind 1.05 - .net FF7 LGP-Editor
« Reply #20 on: 2007-01-21 15:41:20 »
Hey Christian I just tested it (didn't have time before..) and it's very good ideed :-) keep this good work It's the faster LGP extractor I ever tested yet hehe.

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Re: Highwind 1.10 - .net FF7 LGP-Editor
« Reply #21 on: 2007-01-22 13:03:54 »
I've just finished the new version 1.10, with that you can open the texture files in the archives and replace them with other images (bmps) and save them as bitmaps.

Download

_Ombra_

  • *
  • Posts: 110
    • View Profile
    • http://www.sadnescity.it
Re: Highwind 1.10 - .net FF7 LGP-Editor
« Reply #22 on: 2007-01-22 13:30:44 »
Cool!

Just what LGP Tools was messing up all the time. I remember it had problems with TEX transparency and this one doesn't. This program is getting better every day.

Now, the usual bugs report:
-When you open a big TEX the Save File button moves to the right
-When opening aad.tex from world_us.lgp it crashes
-When you close the image editor without replacing the LGP reloads

Suggestions:
-The Open button in the image editor should be replaced with Import
-The Save File button in the image editor should be replaced with Export
-Have a border around the images and a little bigger window with maybe information on the file (X by Y, file size and stuff)
-I think that you should get rid of the JPG compression for exporting TEX because it is a loss compression, that means you are going to lose data during the compression. BMP is just fine.
-I think is time to get rid of the "Show files from/to" (with the new loading routine is pretty fast even with fleve.lgp)
-Change Pos. to Offset and show it in hex (example 0x12AB)
-Cahnge Len. to File Size
-Change No. to #
-Get rid of the right preview pane and use and extra window like the Image-Editor for the plain text files

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Re: Highwind 1.10 - .net FF7 LGP-Editor
« Reply #23 on: 2007-01-22 14:47:30 »
Thanks for your Support, Ombra. I've made some changes and fixed some things.

Quote
-When you open a big TEX the Save File button moves to the right

Thats OK, the Export button should do this.

Quote
-When opening aad.tex from world_us.lgp it crashes

Because i did not (yet) implement loading 16-bit textures.

Quote
-I think is time to get rid of the "Show files from/to" (with the new loading routine is pretty fast even with fleve.lgp)

Thats not a good example because flevel (only) contains 729 files. Open char.lgp with 13744 files and choose to display all files, youll see what happens.

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Re: Highwind 1.13 - .net FF7 LGP-Editor
« Reply #24 on: 2007-01-24 17:06:43 »
Uploaded a new version that can preview and im/export hrc and text files.

Download