Qhimm.com Forums
Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: mav on 2002-12-01 14:25:41
-
Hello. I want to translate FF7 to Polish language. I'm using Ficedula's Cosmo program. However, I have several problems that I can't fix alone. Maybe You can help me... Here is a short list of them:
- Music in Field/Battles is mixed up,
- When you try to go to sleep, there is diffrent music than the 'sleep' one, that hangs the game (because other mids keep playing forever).
- Some locations are mixed up when I'm trying to translate them, for example: tin_1, del2.
- I can't find text's in battles...
Is anyone out there who can help me?? :).
-
I don't wanna say that ficedula made a mistake... but... i'm translating the game in italian... First we started the translation with ficedula's tools... but after a while we figured out that the compression routine used by him (LZW i think) wasn't correct enough to proprely recompress the levels (since is a variant of LZss)... anyway ficedula's work is GREAT, i think that without his great help we couldn't even start the traslation. Actualy we are working with a compressor / decompressor made by ourself that recompress the levels perfectly and there are no more problems with messed up music and stuff like that. btw, the decomp. routine is ok.
For the in-battle text... i can't find it either :P
I hope one day ficedula will fix the compression routine because his program is great.
-
Oh, that's great :). I have a question: Cay You help me with this compression routine ?? Send me som tool or smth ?? I would be very happy :D.
Edit: Yeah, Ficedula's program is really, really good. Without it, translation of FF7 would be nearly impossible. Ficedula: Help us with that compression! :wink:
-
http://www.sadnes.emuita.it/backup/ombra/ff7/tools/FF7LZss%20PSX-PC%20Graph.zip
There you go... it's simple to use. Extract the levels in flevel.lgp with LGP Tools but without decompress them. Then put the lzss.exe in the same folder of the extracted files. The type:
lzss.exe d xxx xxx.dec //to decompress
lzss.exe e xxx.dec xxx //to compress
where xxx is the name of the file.
When the level is compressed just insert it with LGP Tools.
Personaly i use another program to manage LGP beacause LGP Tools, when a file is bigger than the original, use to put the new one at the end and change the index to the new position. LGP Tools works perfectly but the file size increase too much when you replace 700 translated files :P
Bye
- Edit By Alhexx -
Corrected URL syntax :)
-
_Ombra_ : That's why I don't use Spaces in the names of the file I want to host... :P
- Alhexx
- edit -
Well, there *should* be a quite fine alternative, if you don't want to create a LGP patch:
You can simply decompress all files, translate the speech files and simply build up a complete new LGP archive... however, you will have to share the whole lgp then and not only a patch...
-
Thanks man for the link :P
By the way... i wasn't talking about the patch system... that's another point... Patch system in LGP tools doesn't work. For now we r using a program called Clickteam Patch Maker. Actualy that type of patcher is not like PPF/IPS (search for differences and replace those bytes) but it's an "intelligent" patcher (like the compare function in Hex Workshop).
My idea was to create a patch system like the one created by ficedula in LGP Tools, but stand-alone. The idea was... extract all the files from the LGP, decompress, patch, compress, create new LGP and that's it.
-
But the patching system in Cosmo works ;). By the way, if you make something, let me know, ok? Oh, and thanks for prog :D.
-
_Ombra_ : It doesn't matter which patcher you use. However, if you don't use a simple byte-patcher, that might work. Well, I think we (or M4v3r) should translate the game first and after that we can care about the patching...
- Alhexx
-
u telling me this thing will decompress psx archives on the ff7 psx too?
-
As i wrote in another post, the PC version of FF7 is a conversion of FF7 PSX and the compression routine is EXACTLY the same, so this tool decompress files for the PC version end PSX version. The files to decompress in the PSX version are in the directoty \FIELD\ and have .DAT extension.
In the PSX version there are 3 for each level. A .DAT, a .BSX and a .MIM.
Actualy i don't know how this work but i know for sure that the text is stored in .DAT files.
For the gfx the story change but is not important right now... if you want to know more about it, just ask ;)
@Alhexx: you are translating the game too ?
-
Yeah, it works :). Finally i can nearly fully translate FF7 :D. Thanks dude :). But i have one more thing: I've translated 25% of dialogs. What can i do to repair music in them ?? Decompress them with your prog and compress to lgp ?? Give me a clue :).
EDIT: I've maked a patch with Clickteam Patch maker and... i'm shoked :). The exe file has 140Mb :p. Is it normal ?? :D.
-
1. For the levels... you need to retranslate them... there's no way to repair them... just copy the translated text to a new clean file.
Btw... what program are you using to translate the texts ? We are using a custom made program or Thingy.
2. For the patch... that problem is caused by the fact that LGP Tools reinsert the files that are bigger that the original one at the end of the LGP file. If you notice, the original flevel.lgp is about 122 mb... your file maybe is 200 mb :P. With our (command-line) program we are able to reinsert the files in the exact place where the original file is. That way we get a file that is about 2/3 mb bigger than the original, result, a patch of 4 mb (with 300 levels translated)
btw, we started the translation with ficedula's tools and after about 2 years we are using custom made tools after restarting the translation 5 times :-?
Anyting you need, just ask :wink:
-
(Hmm ... I've come in a bit late to this topic...)
Well, if you check my site you'll find I've just uploaded an update to Cosmo which enables the original LZSS compression routine, so that problem is 'fixed'. (However, as I've said before, I've done testing myself and using Haruhiko [the original LZSS] compression didn't fix Cosmo's problems. I still say the problem is with Cosmo's editing, not with the compression ... but in either case, it's good to have the option there for another type of compression, right?).
Ombra: Well, the problem with reinserting files in the same place is what do you do when they're bigger? You mess up the archive. Even if you're using LZSS/Haruhiko compression, the files can come out bigger - your new text might not compress as well as the original did. I /thought/ LGP Tools would insert the file in the same place if it was exactly the same size ... if it doesn't, please tell me and I'll fix it - that's something that (like adding LZSS compression to Cosmo) I can do in the small amounts of time I have available to program now... ;)
Update: Oh, I should mention that my own LZS tool (should) support LZSS compression too, and has done for a while ... it accepts wildcards too, so you can compress whole folders full of files at once... </plug> :D
Update 2: Damn, but I feel stupid. I've had a version of LZS that did that on my disk for weeks (months?) and never uploaded it to my site. Done now... :/
-
M4v3r, _Ombra_, ficedula:
That's what was talking about. You should translate the files and compress them to a new,clean archive. Then you won't get 200mb files... :P
Oh, and no, I'm not going to translate it, too. My polish grammar is too bad for this... since I live for almost 14 years in Germany...
fice: check your private messages :)
- Alhexx
-
Ok, ok, there i go again... we have to clear a bit our ideas... seems that there's a little missunderstand with everyone :P.
1. I told ficedula that his compression routine was not perfect because when you extract and recompress a file WITHOUT touching it in any way the file size increase. With the compression routine i use in the command-line program in the second post the compressed file is exactly the same as the original.
2. When i modify a files is normal that it change, but the routine is still the same as the original. In the way the text is changed is better for the compression, we'll have a smaller file else, the file will be bigger. But the IMPORTANT THING is that the compression is the same as the one used by the game.
3. We coded a little program that manage lgp. It inserts files in the same place as the original ones, changing the whole index if is necesary. That way the flevel.lgp file size doesn't increase too much.
4. If the files are same size or smaller LGP tools reinsert them correctly... the problem is that most of the times they are bigger :P
btw, ficedula, as you know i've done a lot of work with ff7 and i know (almost) exactly where the problems in your programs are. You know that if you need help to fix them (not programming :P) you know where to find me ;)
-
Oh, right, I see; you mean if your file is bigger it rewrites the whole LGP to make room for it...? If so, yeah, that works of course but is slow (rewriting the whole LGP for flevel ... ouch).
LGP Tools *can* do that, kind of; just use the Pack command and it moves everything up so there's no unused space/old data there...
With the compression, the old compression didn't compress as WELL as LZSS/Haruhiko, but it was still *compatible*. Think of the LZSS compression and being like ZIP on maximum, and mine as being like ZIPping files on one notch down. Doesn't compress as well - but anything that reads them will still decompress them to the same data, which is what counts. Of course, compressing them as much as possible is always good, which is why Cosmo now has the support for LZSS/Haruhiko... ;)
-
That's right ficedula... but i'm in romhacking since 1998 and i know for sure that a game compression / decompression routine NEED to be exactly like the original because the game "suppose" that the compression used is at level 9... not 8 or 7 (i'm using your winzip example)
You want the test ? Ok, there you go:
There is a shop in Wutai with a box. That's the level you need to test. When you open the box you got a materia but all of a sudden Yuffie came out and stole you the materia. The level name is uta_im
http://www.sadnes.emuita.it/backup/ombra/ff7/wutai.ff7
That's the save exactly out of the shop.
TEST1: Use Cosmo with your old compression method and modify A LETTER of the text and save it. Now try to open the box in the shop...
TEST2: extract a file, decompress it with my tool, open it with an hex editor and modify text randomly. Compress it with my tool and insert it with LGP Tools and now try to open the box again...
*since you added LZSS to Cosmo you can try test2 with cosmo and the "new" compression.
btw the compression method you'r using is not from Haruhiko Okumura. We used a standard compression / decompression method written by that guy and changed it to work with FF7... so just call it "FF7 Original Routine" in Cosmo :P
-
What a discussion, wow. Then i'll list my thoughts too :)
1. I use the Translhextion tool, which can be found here:
http://m4v3r.host.sk/ff7pl/v2/download/translhextion.zip
It's very good tool, because it support's Thingy Table's and the Thingy IME function that can insert ASCII text into file with convertion to Thingy format (I said it right?? :) ). Also it has the Scan and Search Relative function, Hex Dump and much more :).
2. If I get you right, you say that I can use Cosmo now an' it no longer mess my level files. Am I right??
3. Alhexx: we have a lot people which want to translate FF7 to Polish, and we don't need more help :D.
4. Ficedula: I've downloaded your LGP Tools (new version). And... in reactor, in location when there's an animation, I see a green boxes (colour of the mako). Animation is good, but the shape of it is wrong. Or Am I wrong ?? :D.
-
2. Maybe. *IF* it was the compression that was messed up, that's fixed. Please try it - but I *suspect* it wasn't just the compression that stopped things from working. I may be able to work out another fix...
4. Animation is still experimental (I coded it for the Remake; putting it into LGP Tools was kind of just a test.) *Most* stuff works, but not all, by a long way. If you tell me which file, I can take a look at it...
-
2. I'll check it ;).
4. I've looked in smkin files (all of them).
-
A lot of the problems with transparencies can be fixed by changing the blendoffset code to '-1' and reloading the level. That tells it to try and autodetect all the transparency codes, which doesn't *always* work, but it's fairly good. Try that.
-
I mostly agree with everything ficedula has said here, apart from some earlier bugs the LZS compression routines we use do produce compatible files (or FF7 wouldn't load at all). Any errors found (especially specific ones such as th Wutai shop script issue) is far more likely to be a problem with the editor itself.
fice: I was wondering why you called it Haruhiko...
_Ombra_: Since the FF7 LZS compression has no levels of compression, your last argument is a bit redundant. The fact that FF7 even accepts the files and shows the correct scene is proof enough of compatibility in this case. However, the preferable choice for this sort of game hacking is always to use the exact same compression algorithm used by the original. The advantages over my own implementation is unknown, but one could always hope for a speed increase in FF7's file loading (my own implementation tends to produce significantly slower-loading files for some reason). How is the speed of the compression itself though? (looks reasonably fast because of tree handling, but one never knows... :) )
-
Well... "zip" theory or not, the compression is like the original and fast, so, stop talking about it :P
I think you'r right Qhimm, you got the point, but r u sure is always compatible? Well, it doesn't matter... it works :D
btw i think you'r right... i was checking again the Wutai thing and others... probably is a problem of the editor but anyway i'm using a custom editor that we made especialy for editing the text (doesn't look cool like Cosmo and is in LibertyBasic... there's no backgroud preview or realy cool things like that, but works at the moment :P)
ficedula, why did you called it Haruhiko ?? if i'm not too curious :P
-
Ombra: Maybe you share with me this editor ?? :). I would be glad :D.
Fice & Qhimm: Problems with locations like Wutai, Midgar Train or Costa del Sol lies in their construction (i think), which isn't compatible with Cosmo. Maybe that files was created with some diffrent, or something. And Maybe if you try to Debug Cosmo, when it open these files and when it tries to save, you'll find an answer.
And for background viewer: Ok, everything seems to be OK, but one more thing. What are these black dots ?? There are a 'unpainted' pixels or something in each level. It can be see very clearly in smkin_3. You know how to fix it Fice?
-
The black dots you are referring to was a constant pain in the you-know-what when I first made the background viewer for Gast. I never could find a suitable answer, and hypothesized that these pixels might be covered by some of the effects layers I couldn't decode at that time. Ficedula should know much more about the format and its quirks than me now, though.
-
Firstly; I call the compression Haruhiko because (as Ombra noted), the LZSS compression was originally devised by Haruhiko Okumura, so far as I can tell. I don't call it LZSS compression because *all* the compression algorithms output LZSS files - Haruhiko's algorithm just outputs better compressed LZSS then ours do ;) So, since the algorithm Cosmo uses is essentially a direct port of Haruhiko's code, I call it LZSS/Haruhiko compression.
Qhimm: The Haruhiko code compresses very fast - it uses fixed trees, and so the speed seems *comparable* to your own. I haven't benchmarked it in any way, but for FF7 purposes, if it compresses a level in less than a second, you're happy enough, regardless of small differences...
M4v3r: Yes, the problem is that Cosmo is 'too clever'. If you change the length of a piece of text, it tries to rewrite all the pointers in the level to accomodate the new size. When it works, that's really funky. Unfortunately, when it doesn't, it corrupts the level file. Even worse, sometimes (I don't know why) it thinks you've changed the length when you haven't, which is obviously worse still...
The black dots: Yes, they're still a pain in the proverbial. Unfortunately, I've pretty much now decoded about 95%+ of the background (see latest LGP Tools for working-in-many-locations animations and transparencies) and they don't change a thing at all - quite a few of the black dots appear in locations that aren't covered by animations or transparencies at all, so it's a more basic problem than that.
I've developed one or two simple filters that try to eradicate them, but they're less than totally effective...LGP Tools has a checkbox to enable the filter; you can see the difference by loading a level with the filter off, turning it on then clicking 'Reload'. Sometimes it works really well and eliminates lots of the dots. Often it doesn't. If I were to actually pay attention to some of my lectures at uni, I might be able to develop a better filter... ;)
(Actually, I really should see what's on my departments pages about this sort of application. There's a surprising amount of code and information available if you know where to look, although I'm not sure how useful it'd be for this. I suspect the format of having some sort of horrible quirks that you'd only discover by guesswork.)
-
interesting,
looks like this may have kickstarted something good :D
-
1. I think that 'black pixel problem' is a palette problem, because, when you load a palette from that level, there is some black pixels in there. Maybe this will help you:
http://members.xoom.it/m4v3r/screen.zip
You have here a screenshot from the game, and the same location in cosmo (320x200 converted).
2. Why in LGP Tools 1.55 there is no Export to BMP function ?
3. I've looked for battle texts in LGP's and I have a question. Are the files in battle.lgp compressed ? Because when I select extract all fuction, there is no dialog like 'files seems to be compressed. decompress them? [Yes/No/All]' like in flevel.lgp files.
-
I think I've mentioned that before ... no the files in the battle.lgp are not compressed (at least to my knowledge)
- Alhexx
- edit -
...and like I said before: I doubt that you will find any texts in the Battle.lgp, since there are only battle character models and the battle locations... so keep on searchin' anywhere else
-
M4v3R: The link is not working...
By the way... i was thinking... it's possible that the game use a color for the background ? maybe those black pixels are filled with a background color... i'm just wondering :P (maybe is just a stupid theory :P)
-
No, I've checked it, these pixels has diffrent colors.
Edit: I've updated that link. :roll:
-
Now it comes to my mind that battle texts could be pictures ... i haven't checked it out yet .. so try looking at the battle model textures ......
-
mirex, i don't think is graphics beacause the font is the same as the in-game text...
-
Hm.. Mirex, good point ;). I've decompressed every file from the game and searched only one word from the battle texts (counterattack as I recall) in them with no result, so it can be true :). But that's a wacked theory :D.
-
The in battle texts are overlayed exactly like the "assistance" text stuff you can activate by hitting select, just on the top of the screen instead. So, I'd think they'd be stored similarly, and not as graphics.
-
I've checked Kernel folder and there's nothing there...
-
Seeaaa~~~rchi~~~ng,
Seek and...
...translate! :D
- Alhexx
-
Um.... What ?? :D