Qhimm.com Forums

Final Fantasy 7 => FF7 Tools => Topic started by: Chrisu on 2007-01-12 21:47:24

Title: [FF7] LGP-Editor - Highwind (1.21) (Discontinued, use LGP/UNLGP)
Post by: Chrisu on 2007-01-12 21:47:24
THIS PROGRAM IS OUTDATED. USE AALI'S LGP/UNLGP INSTEAD
Download the program (http://christian59.ch.funpic.de/html/highwind.htm)
---
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
Title: Re: Question about LGP-Archives
Post by: _Ombra_ 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.
Title: Re: Question about LGP-Archives
Post by: Chrisu 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...
Title: Re: Question about LGP-Archives
Post by: halkun on 2007-01-13 13:03:46
I don't think we know. We have always just "fooled" the CRC
Title: Re: Question about LGP-Archives
Post by: dziugo on 2007-01-13 14:12:25
Link (http://www.sylphds.net/f2k3/docs/lgpspec.txt).
Title: Re: Question about LGP-Archives
Post by: The SaiNt 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.
Title: Re: Question about LGP-Archives
Post by: _Ombra_ 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
Title: Re: Question about LGP-Archives
Post by: Chrisu 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 (http://christian59.ch.funpic.de/Programmiern/Highwind.rar)

Please tell me if you find bugs or errors in the program!
Title: Re: Highwind - .net FF7 LGP-Editor
Post by: Braveheart 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
Title: Re: Highwind - .net FF7 LGP-Editor
Post by: Chrisu 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 (http://christian59.ch.funpic.de/Programmiern/Highwind 1.02.rar)
Title: Re: Highwind 1.02 - .net FF7 LGP-Editor
Post by: _Ombra_ 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
Title: Re: Highwind 1.04 - .net FF7 LGP-Editor
Post by: Chrisu 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 (http://christian59.ch.funpic.de/Programmiern/Highwind%201.04.rar)
Title: Re: Highwind 1.04 - .net FF7 LGP-Editor
Post by: Cyberman 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  (http://wiki.qhimm.com/FF7/Technical/Customising)(I put it in).
Title: Re: Highwind 1.04 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-01-18 21:11:02
OK, but how do I get an account at the wiki? Cant find any register-form there.
Title: Re: Highwind 1.04 - .net FF7 LGP-Editor
Post by: Cyberman 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
Title: Re: Highwind 1.04 - .net FF7 LGP-Editor
Post by: _Ombra_ 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.
Title: Re: Highwind 1.05 - .net FF7 LGP-Editor
Post by: Chrisu 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 (http://christian59.ch.funpic.de/Programmiern/Highwind 1.05.rar) the new version here.
Title: Re: Highwind 1.05 - .net FF7 LGP-Editor
Post by: _Ombra_ 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)
Title: Re: Highwind 1.05 - .net FF7 LGP-Editor
Post by: The Skillster 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?
Title: Re: Highwind 1.05 - .net FF7 LGP-Editor
Post by: Chrisu 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.
Title: Re: Highwind 1.05 - .net FF7 LGP-Editor
Post by: stormmedia 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.
Title: Re: Highwind 1.10 - .net FF7 LGP-Editor
Post by: Chrisu 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 (http://christian59.ch.funpic.de/Programmiern/Highwind%201.10.rar)
Title: Re: Highwind 1.10 - .net FF7 LGP-Editor
Post by: _Ombra_ 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
Title: Re: Highwind 1.10 - .net FF7 LGP-Editor
Post by: Chrisu 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.
Title: Re: Highwind 1.13 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-01-24 17:06:43
Uploaded a new version that can preview and im/export hrc and text files.

Download (http://christian59.ch.funpic.de/Programmiern/Highwind%201.13.rar)
Title: Re: Highwind 1.13 - .net FF7 LGP-Editor
Post by: _Ombra_ on 2007-01-24 17:37:43
Hey Christian,

it is looking great! I see you left the export to JPEG feature. I just wanna remember that even at maximum size it is not a lossless compression. It could cause troubles to somebody that don't know that. Now:

-The file size is cut off by the scrollbar
-The change and apply button uses smaller text then other buttons (btw... i still don't know what change is for :P)
-Now the program is fast so i think you can show at least 1000 files (i tried with char.lgp... it takes a while :P)
-Offset all in uppercase looks better xD
-When you double click unknown file formats the preview pane still opens up
-Text in the Fileinfos area is unalligned

Everything else looks fine. If you want i'll give it a shot at redesigning the icons for the buttons ;)
Title: Re: Highwind 1.13 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-01-24 17:50:01
Thanks for your help, ombra, ill see what i can do

Hey Christian,

it is looking great! I see you left the export to JPEG feature. I just wanna remember that even at maximum size it is not a lossless compression. It could cause troubles to somebody that don't know that. Now:

-The file size is cut off by the scrollbar -> Ill fix that
-The change and apply button uses smaller text then other buttons (btw... i still don't know what change is for :P) -> thats ok, change is to save the lgp to a different file
-Now the program is fast so i think you can show at least 1000 files (i tried with char.lgp... it takes a while :P)
-Offset all in uppercase looks better xD  -> ill do that
-When you double click unknown file formats the preview pane still opens up -> ill show that open with-dialog
-Text in the Fileinfos area is unalligned -> what you mean?

Everything else looks fine. If you want i'll give it a shot at redesigning the icons for the buttons ;) -> Ok show me your versions.

EDIT:
Ive uploaded a new version, its a bit faster because of less big columns, and some of your suggestions are implemented.
Title: Re: Highwind 1.13 - .net FF7 LGP-Editor
Post by: _Ombra_ on 2007-01-25 03:17:44
Quote
Everything else looks fine. If you want i'll give it a shot at redesigning the icons for the buttons Wink -> Ok show me your versions.

Ok, i'll give it a shot.

Quote
-Text in the Fileinfos area is unalligned -> what you mean?

(http://www.sadnescity.it/backup/ombra/highwind_all.gif)

That's what i mean

EDIT: Here are some icons... it's not really my work but i modified a couple of them to match the buttons on the program. They are a little bigger but you can resize the buttons and maybe make the words shorter, like: Open, Add File, Add Folder, Delete, New, Save, Replace, Extract Selected, Extract All

Hope you like them
Icons 32x32 (http://www.sadnescity.it/backup/ombra/highwind_icons_32.zip)
Title: Re: Highwind 1.13 - .net FF7 LGP-Editor
Post by: _Ombra_ on 2007-01-29 18:28:18
This silence is killing me xD

This probably means 2 things... or a well deserved pause or a new version coming up with great features :D

We'll see ;)
Title: Re: Highwind 1.13 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-01-29 18:56:54
Thanks for your icons _Ombra_, but i'll just be using them resized to 16x16, because i would have to change the look of the whole program, and i dont like very big buttons.
Title: Re: Highwind 1.13 - .net FF7 LGP-Editor
Post by: _Ombra_ on 2007-01-30 05:29:02
That's ok, anyway if you need them 16x16 let me know and i can redo them.
Title: Re: Highwind 1.13 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-01-30 12:50:58
That would be cool, if you arent too busy you could do that for me :)
Title: Re: Highwind 1.13 - .net FF7 LGP-Editor
Post by: _Ombra_ on 2007-01-30 21:29:58
Here you go,

Icons 32x32/24x24/16x16 (http://www.sadnescity.it/backup/ombra/highwind_icons_v2.zip)

I even did 24x24, only 4 of them are straight conversions from the 32x32 ones
Title: Re: Highwind 1.13 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-01-31 18:36:30
@Wiki-Mods: Could someone change the download link for Highwind to "http://christian59.ch.funpic.de/Programmiern/Highwind.rar", because thats allways the newest version. Thx  :-D

EDIT: The current version is 1.13, not 1.04  :-D
Title: Re: Highwind 1.15 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-05-18 14:03:39
Hi, i'm back with a new version, it's 1.15 and in fact there's just one important change: The last files in the archives didnt get proper index entrys and so FF7 couldn't find them.
And there's a hex-editor to edit lgp-content that's not really good, just for testing  :-)
Some other small bugs were fixed too.
Maybe i'll do more changes soon.  :roll:
Title: Re: Highwind 1.15 - .net FF7 LGP-Editor
Post by: _Ombra_ on 2007-05-20 14:11:48
Great man! It's nice to see that you are still working on this great program.

Btw, the window caption still says 1.13 and the link on the first page of the post is missing (and points to version 1.13)
Title: Re: Highwind 1.16 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-05-20 16:07:00
Hi Ombra!  :-)

I fixed that with the link and now the editor can preview the 16bit-textures as well.

PS: I'll be away for a week now, so no updates  :cry:
---
Hi, i've made another new version. I have implemented LZS-Decompression (just when extracting a file atm.).
Maybe someone could test it for me if the LZS thing works because i dont know if it really works correctly  8-)
A Compression implementation will be implemented soon ;)
---
I uploaded a new version.
There was a bug inside the decompression, now its exactly correct i hope Smiley
I also added a decompress function to the contextmenu.
How do i prove if a file is LZS-compressed? My method says that they're compressed even to some non-compressed file, does someone know an easy algorithm for this?
Title: Re: Highwind 1.18 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-05-26 23:58:48
... [Can't i delete my own posts?]
Title: Re: Highwind 1.20 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-06-16 21:19:17
...[Can't find a function to delete]
Title: Re: Highwind 1.20 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-07-04 21:56:10
Hey guys, i'm working on a LZS-Compression-Algorithm at the moment and theres one problem:
When decoding the lzs-Files i get the real_offset with this formula: real_offset = tail - ((tail - 18 - raw_offset) mod 4096)
but how do i reverse that when compressing, i've got the real_offset and want to get the raw_OFFSET:
Title: Re: Highwind 1.20 - .net FF7 LGP-Editor
Post by: kruci on 2007-07-17 20:14:49
Hi, I little tested Highwind 1.20, but looks like it crash the game.
I have created char.lpg with lpgtool1.60 containing NPC Reconstruction, looks like its works normaly.
So I extracted all files from this char.lpg using Highwind, and created new char.lpg with Highwind. But this new char.lpg crash game. Not immediately, I can little play.
Button new archive give me unhandle exception.
System.IO.FileNotFoundException: Could not find file 'C:\Dokumenty\asd.lgp
so Highwind cant create new file. If I create new file myself, its works, Its ask replace, I give OK, and then no exception.
Title: Re: [Release] Highwind 1.20 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-07-18 16:20:27
Hello kruci, thanks for your bug report.
Can you tell me, did you modify the files of the char.lgp before making the new archive that crashed the game?
And, when did the game crash?
Are you playing with FF7Music enabled? Because if yes, you could look in its log (when its still running after the game crashed) which file was not found / corrupted / whatever.
And, When do you get the exception by pressing new archive? Is it right after you start the program?
Christian

EDIT: The bug with the "New Archive"-Button is now fixed (Download the new build) and i'll try fixing the other bug when you report when it happens and which file was corrupted ;)
Title: Re: [Release] Highwind 1.20 - .net FF7 LGP-Editor
Post by: kruci on 2007-07-18 17:52:21
Can you tell me, did you modify the files of the char.lgp before making the new archive that crashed the game?
And, when did the game crash?
Are you playing with FF7Music enabled?
I didnt change char.lgp, I only recreate working one(but not original, containg NPCrec)
Game crashed during testing in cosmo canyon, when I go out, left-down from savepoint, and then enter back, game crashed. Old char.lgp worked.
I didnt use FF7music.

EDIT:
I forget to say.
I extracted flevel.lgp with lgptool1.60 with decomresing all files. Then I wanted create flevel.lpg with Highwind, but Highwind crashed in about 75% of creating file.
Cosme can create new flevel from these, but game then dont work(if I dont unpack files, than it works)

Maybe good function could be multi replace.
Title: Re: [Release] Highwind 1.20 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-07-18 19:06:59
It didtn work with the uncompressed files because FF7 tried to uncompress them but they werent compressed.
Ill try to check the bug in highwind on weekend.
Title: Re: [Release] Highwind 1.20 - .net FF7 LGP-Editor
Post by: kruci on 2007-07-18 21:22:07
EDITED:
same error as cosmo, when I set locale to English and create, archive looks like working fine. If I create archive with my original locale(we have "ch" afer "h"), game crash.

If I give export all, so I can select folder, but I cant create new folder,so I must create it manualy.

Cant open archive from emerald, lgp created with cosmo with uncopressed levels, crash without warning/error message.
Cant create archive with files from flevel.lgp uncompresd with cosmo. Crash.
Title: Re: [Release] Highwind 1.20 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-07-19 14:17:08
Thanks for your bug reports.
I will try to remove the bugs, maybe this weekend.

If I give export all, so I can select folder, but I cant create new folder,so I must create it manualy.

Yeah thats a pre-built FolderBrowserDialog, i cant change that.
Try installing the newest .net Framework or something, because when i click that "export all", there's a button "Create new folder" in the bottom left corner of the dialog.

EDIT: I tried extracting all files from flevel.lgp with Highwind and uncompress them at the same time, then make a new archive with those files, and Highwind did not get an exception.
EDIT2: Theres no crash for me when extracting flevel with lgptools and decompressing and then creating an archive with those files with highwind.
But i didnt try if the game works now, i think it will crash because it looks for compressed files.
EDIT3: Yes, FF7 cant load the field backgrounds when they are uncompressed in flevel.lgp, ive checked that.
Title: Re: [Release] Highwind 1.20 - .net FF7 LGP-Editor
Post by: kruci on 2007-07-19 20:27:07
I am wondering why it cant create archiv from these on my PC, becouse creating char.lpg looks like works normaly(except locale depending bug). Maybe I have some old version of .NET, or its system dependant(win98SE).
I am wandering why its crash without warning too.

I maybe do some more tests.
Title: Re: [Release] Highwind 1.20 - .net FF7 LGP-Editor
Post by: kruci on 2007-07-20 13:29:01
Now it throwed excetption System.OutOfMemoryException, but before not(about 5 tries). Next try it didnt throw exception and crashed.
Out of memory could explain crashes.
Title: Re: [Release] Highwind 1.20 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-07-21 11:01:44
Now it throwed excetption System.OutOfMemoryException, but before not(about 5 tries). Next try it didnt throw exception and crashed.
Out of memory could explain crashes.
That could be because you added files that are bigget than your System Memory (RAM). Highwind loads all files you add into the RAM, try adding not all files at once, than save the LGP, then open it new (important!) and than add some more files.
Title: Re: [Release] Highwind 1.20 - .net FF7 LGP-Editor
Post by: kruci on 2007-07-21 15:25:05
I did as you say, created first archive with about 100M of data, close, open, then adding next 100MB of date, but with adding second 100MB of data it creashed.
I have 128MB RAM.

I got strange exception(created 3 archives, 3 times happend)
This ocur only if I give new archive first(no direct add folder, and then save)
I was load about 100M of data, then I clicked save and exception ocured(uncheched backup)
System.ArgumentNullException: Value cannot be null.
I give not quit during exception, I gave continue, checked create backup, and it saved file(saved it to file l.lgp11, but If I am not wrong, its showed patch to file l.lgp).
But before, this was not happen.

Next exception, acces denied, but this I got with other program too, and I really dont know what it do. It began with work with TEX files and replacing them in lgp archives(and using preview).
Title: Re: [Release] Highwind 1.20 - .net FF7 LGP-Editor
Post by: kruci on 2007-07-23 14:28:43
I am found that higwind can export/import TEX files and looks like with right transparency(Yeah a few post above its saying:P), but looks like it do some mess with palette and file size(pictures still looks same).
Firstl I couldnt find preview, I didnt find it before becouse I was usualy clicked to blank space behind file name, and I must click on name, or where some text is.

And why PNG files have in the end BMP insted PNG?

I cant sort files, only sorting possible is compressed/uncompressed.

Title: Re: [Release] Highwind 1.20 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-07-23 14:42:52
I think my program can only handle .tex and .bmp images.
The sorting should be disabled at all, the sorting for compressed/uncompressed is a bug.
When sorted, i think the programm would extract the wrong files and so on, would you mind try that for me?
Title: Re: [Release] Highwind 1.20 - .net FF7 LGP-Editor
Post by: kruci on 2007-07-23 15:24:36
If I export bitmap, it save PNG file, but give BMP insted PNG on the end.

I can test it.
Title: Re: [Release] Highwind 1.21 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-07-27 13:19:17
Hi, i've uploaded a new version, 1.21, i fixed some problems with the texture-editor.
Now you can select which file type the extracted image has.

Please, tell me when you find bugs because im sure it hase some!
Title: Re: [Release] Highwind 1.21 - .net FF7 LGP-Editor
Post by: kruci on 2007-07-28 09:59:37
TEX looks like he doesnt know 4bit color, or just say what is max number of colors. I thought that it use 4bit colors, but TEX never does. But documentation to TEX say that it can 4bit color, but it still use 1Byte for 1pixel. Thus preview/export use of 4bit TEX files use real 4bit colors, not 1Byte color and are messed.
Export to GIF doesnt work right, it doesnt use original palate, it use some kind of own palete. After export to GIF picture lose colors (exported BMP has 256 color, GIF has 56 color).
Export to BMP have always 24bit colors(good if find 16bit TEX?).

Only little sugestion, if I export image file, I must write name of file, but better is if it use TEX file name as default.

Edit:And TEX files use allways 256 palette entries?
Title: Re: [Release] Highwind 1.21 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-07-28 11:49:25
So the 4 bit color depth of tex files doesnt really make any compression compared to 8 bit?

About the GIFs, i think i cant change how much colors they have, thats a pre-built method i call.

The TEXs of FF7 always have 8bit color depth, i think.
Title: Re: [Release] Highwind 1.21 - .net FF7 LGP-Editor
Post by: kruci on 2007-07-28 12:27:39
So the 4 bit color depth of tex files doesnt really make any compression compared to 8 bit?
TEX created by Highwind, 4bit has ~33k, original TEX 4bit has 66k

About the GIFs, i think i cant change how much colors they have, thats a pre-built method i call.
I was wondering that GIF "destroy" colors. I think that GIF use some default palete, instead of creating new, or getting it from original.

The TEXs of FF7 always have 8bit color depth, i think.
Some files(their previews) are saying that they are 4bit.
http://wiki.qhimm.com/FF7/TEX_format (http://wiki.qhimm.com/FF7/TEX_format) says that 4bit TEX exist. But not use 4bits per pixel. So its not pixel size but max color?
Title: Re: [Release] Highwind 1.21 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-07-28 12:45:37
I have uploaded a newer version, with the 4bit support FF7 needs.
About the GIFs, the current format is all i can do.
Title: Re: [Release] Highwind 1.21 - .net FF7 LGP-Editor
Post by: Cyberman on 2007-07-28 17:03:13
All right if you are dealing with character textures you will have some technical difficulties.
The textures for characters are mostly 4 bit.  However they have multiple palettes.  Editing this is likely to create some problems.
Cloud I think has 3 or 4 palettes alone.  When I was making something to view the battle models the only way I could extract the textures was to iterate through every textured polygon and plot it's area onto a bitmap using the fixed palette that polygon selected. That sounds great and easy save when you reverse the process.
The PS1 stores the textures with the battle model. The PC variant uses it's own texture system (mutter).  So if you wish to 'reverse' the model information and modified textures on a model you will need to keep this in mind.

For field backgrounds there is ONLY one size for the palettes these are 256 colors per set of blocks.  Some scenes have as many as 30 palettes.
I don't know why they picked such an overly complicated scheme (FF9 uses a much simpler and more efficient one).
If you need to figure out these things ask there are some OLD FF7 abusers still listening in ;)

Cyb
Title: Re: [Release] Highwind 1.21 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-07-28 20:58:15
Yeah, thanks for your explanation, Cyberman.

But does this really make a difference when converting bmp/jpg/gif... to tex and vice versa?
Each texture has one single and own palette, or did i misunderstand something?
Title: Re: [Release] Highwind 1.21 - .net FF7 LGP-Editor
Post by: kruci on 2007-08-09 10:11:36
Higwind create biger TEX file than original TEX, example, exported from original TEX(size 66796) to created by Highwind TEX(size 131072). Files are some, except that on the end (after 66796) are all zero.
Title: Re: [Release] Highwind 1.21 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-08-09 19:55:36
Higwind create biger TEX file than original TEX, example, exported from original TEX(size 66796) to created by Highwind TEX(size 131072). Files are some, except that on the end (after 66796) are all zero.
You mean it makes the correct files, but there are just 00 in the end?
OK, im gonna fix it, strange that i didnt notice that until now  :-D
Title: Re: [Release] Highwind 1.21 - .net FF7 LGP-Editor
Post by: kruci on 2007-08-10 09:36:11
Yes correct, but with a lot of 00 in the and.
strange that i didnt notice(or post) that until now:P
Title: Re: [Release] Highwind 1.21 - .net FF7 LGP-Editor
Post by: Chrisu on 2007-08-10 11:33:20
Yes correct, but with a lot of 00 in the and.
strange that i didnt notice(or post) that until now:P
I found the bug, the calculating of the filesize of the tex files was wrong, i fixed that. (I havent uploaded the new version yet)
Title: Re: [Release] Highwind 1.21 - .net FF7 LGP-Editor
Post by: pyrahedh on 2011-08-03 08:48:14
Hello!
I'm new to this moding of the FF games. I've got a problem with the Highwind tool. When I try to make a new archive and when I want to save the changes after I've added a folder I get the following error (It dosn't matter what verson of the program I'm using).

Unhandled exception has occurred in your application. If you clock Continue, the application will ognore this error and attempt to continue. If you click Quit, the application will close immediately.
Unable to read beuond the end of the stream.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
   at System.IO.__Error.EndOfFile()
   at System.IO.BinaryReader.FillBuffer(Int32 numBytes)
   at System.IO.BinaryReader.ReadInt32()
   at Utilities.Util.ReadLGPElement(BinaryReader reader, Int64 dataPos, Int64& fileLen)
   at LGPTools.LGPElement.get_Data()
   at LGPTools.LGPFile.SaveToFile(ProgressBar bar)
   at LGPTools.LGPViewer.save_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4961 (win7RTMGDR.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Highwind
    Assembly Version: 1.2.0.0
    Win32 Version: 1.2.0.0
    CodeBase: file:///C:/Users/ze0154/Desktop/Highwind/Highwind.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4961 (win7RTMGDR.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4957 (win7RTMGDR.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
ChrisiTools
    Assembly Version: 1.2.0.0
    Win32 Version: 1.2.0.0
    CodeBase: file:///C:/Users/ze0154/Desktop/Highwind/ChrisiTools.DLL
----------------------------------------
ChrisiUtilities
    Assembly Version: 1.1.4.0
    Win32 Version: 1.1.4.0
    CodeBase: file:///C:/Users/ze0154/Desktop/Highwind/ChrisiUtilities.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

When I press continue nothing happens.

Thanks in advance.
~pyra

Title: Re: [Release] Highwind 1.21 - .net FF7 LGP-Editor
Post by: DarkFang on 2011-08-03 09:32:40
Three year old thread, and this program is really outdated. Use Aali's lgp command line tool.
http://forums.qhimm.com/index.php?topic=8641.0