Qhimm.com Forums

Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: blackeyed_cn on 2004-08-15 07:02:52

Title: Need Help in FF7 files!!!
Post by: blackeyed_cn on 2004-08-15 07:02:52
My friends and I are trying to traslate FF7(PC) into Chinese
There are still some problem,plz help~

1 (http://photoimg4.qq.com/cgi-bin/load_pic?verify=uEN4lR58hsef0ohQjd6RoA%3D%3D)
No matter how I change the text,the SIZE of dialog never changed,But after translation,there will appear many blanks,it looks so bad.I wanne change the SIZE.
I think the SIZE of each dialog is fixed,and the SIZE data is saved in some files,but I can't find them.
Do you know where is the SIZE data?plz tell me,thx!

2 (http://photoimg1.qq.com/cgi-bin/load_pic?verify=sh467u3RfMkJU7WiGgc3%2Fg%3D%3D)
I know the placenames of small scenes are saved in Flevel.lgp.
But I can't find where the placename of big map is saved in. :(

many thx~
Title: Need Help in FF7 files!!!
Post by: mav on 2004-08-15 07:28:37
1. You need to alter game script. This is an area before dialogues in field file. There, you have to find window functions and message functions, they look like this:

Window func.
Code: [Select]
30 id xx yy hh ww

id - window id used in message function
xx - x position on screen
yy - y position on screen
hh - height of a window
ww - width of a window

Message func.
Code: [Select]
50 ?? id dd ...

The second byte is unknown
id - window id
dd - dialog id (it's number from the start)

Good luck :)
Title: Need Help in FF7 files!!!
Post by: blackeyed_cn on 2004-08-15 08:02:07
I can't catch you clearly...


in 'md1stin',
where is the window func,and where is the message func?
I only found three '30' in the area before text in this file,and they are not look like the window func you said
Title: Need Help in FF7 files!!!
Post by: mav on 2004-08-15 13:06:32
This functions were taken from the Gears project, but it seems they seems to be incorrect...or smth. I managed to find something myself and here's what I found:

In md1stin there's only one regular dialog and two 'notifications' used. They use other message definition, beginning with 40h:

Code: [Select]
0x4BD offset - 40 03 1E 01 - "C'mon newcomer, follow me"
0x73F offset - 40 00 06 82 - Received "Potion"!
0x762 offset - 40 00 06 82 - Received "Potion"!


Here, you have syntax:

Code: [Select]
40 ?? dd id

Where:
dd - Dialog number
id - Window id

For the first dialog, you can see that it uses 31th (1Eh + 1) dialog from dialog table (Which is - "C'mon newcomer, follow me") and window with id 01.
Second messege uses 7th (06h + 1) dialog, which is: Received "Potion"! And so...

Now, go to the first offset, 0x4BDh and go backwards 10 bytes. You can see there:

Code: [Select]
50 03 28 00 14 00 85 00 29 00
50 ?? xx xx yy yy ww ww hh hh


These are at 0x4B3.
?? - unknown
xx - 2 byte horizontal position
yy - 2 byte vertical position
ww - 2 byte width
hh - 2 byte height

To check if everything is ok, let's check another one. Go to 0x73F where you can find message func for "Received 'Potion'!". Now go 10 bytes backwards, to 0x735:

Code: [Select]
50 00 53 00 0a 00 8A 00 19 00
50 ?? xx xx yy yy ww ww hh hh


It's the same as above. And that concludes out lesson for today :).
Title: Need Help in FF7 files!!!
Post by: blackeyed_cn on 2004-08-15 14:31:14
thx again
still some question for your tomorrow lesson :)

Code: [Select]
0x4BD 0x73F 0x762
how could I know this three offset in 'md1stin' ?
and I wonder whether this method can be used in all the files or not?
what the window id do in the game?

and I guess that the '??'(unknown data) indicate the type of that dialog....
Title: Need Help in FF7 files!!!
Post by: mav on 2004-08-15 16:20:13
You'll need a hex editor. Translhextion is nice. www.google.pl :)

This method will not work for EVERY dialog, but for MOST of them. Still, there are some dialogs that have diffrent functions calling them, and that's what I don't know at the moment.
Title: Need Help in FF7 files!!!
Post by: blackeyed_cn on 2004-08-15 16:54:40
I have many hex editors....and my favorite one is hex shop :)
I mean,how to know the offset address?
how do you know that data is at '0x4BD 0x73F 0x762',not at other offset.
BTW:do you on the msn?if you do,just send me a 'Hi',OK?  :p
Title: Need Help in FF7 files!!!
Post by: Cyberman on 2004-08-15 23:58:56
Quote from: blackeyed_cn
I have many hex editors....and my favorite one is hex shop :)
I mean,how to know the offset address?
how do you know that data is at '0x4BD 0x73F 0x762',not at other offset.
BTW:do you on the msn?if you do,just send me a 'Hi',OK?  :p


Well Laysan3 has a nice extractor for the script. Script encoding is a different matter.  If I were you, I would worry less about the dialog boxs first and conern oneself with the actual dialog.  Sometime in the furture there should be a script editor and compilor.  If you desperately want to edit them, go for it. Is this for the PC FF7 or the PSX FF7? My guess is the PC version.

Cyb
Title: Need Help in FF7 files!!!
Post by: blackeyed_cn on 2004-08-16 04:34:48
Quote
Well Laysan3 has a nice extractor for the script. Script encoding is a different matter. If I were you, I would worry less about the dialog boxs first and conern oneself with the actual dialog. Sometime in the furture there should be a script editor and compilor. If you desperately want to edit them, go for it. Is this for the PC FF7 or the PSX FF7? My guess is the PC version.

Hi,I can't understand you very well....did you suggest me to work hard in translation instead of editing the dialog boxes?
We have a group to do this project,I take charge of write program,somebody do hack EXE,other people do translation and manual work.
all translation had finished,and had been import into the game.
The work left is that two points of my question and test the chinese FF7
Can u help me with the 2nd question? thx
Title: Need Help in FF7 files!!!
Post by: pennyliu123 on 2004-08-16 14:43:16
Quote from: blackeyed_cn
Quote

Can u help me with the 2nd question? thx


uh...The 2nd question is about "the world map"...

I'm a teammate of blackeyed.

We want to translate the name of each area in the world map, such as "gongaga"...

But we can't find it everywhere...

And there are some dialog in the world map mode, just like this:
(http://www.xufan.net/non-cgi/usr/1/1_27.jpg)

We can't find and translate it, either.

Thx!!!
Title: Need Help in FF7 files!!!
Post by: fuchisasquatch on 2004-08-16 14:56:09
extract the files from world_us.lgp from the folder /data/wm and look for a file called "mess" < it has no extension..heres an example of the data contained inside:

Code: [Select]

-IDGAR.!REA.'RASSLANDS.!REA.*UNON.!REA.#OREL.!REA.'OLD.3AUCER.!REA.'ONGAGA.!REA.#OSMO.!REA..IBEL.!REA.2OCKET.,AUNCH.0AD.!REA.7UTAI.!REA.7OODLANDS.!REA.)CICLE.!REA.-IDEEL.!REA..ORTH.#OREL.!REA.#ACTUS.)SLAND.'OBL


as you can see it has the world map areas..

and heres something similar to your thing

Code: [Select]

./K..#HOCOBO..).M.GONNA.............3END.YA.BACK.TO.THE.STABLES...........4URN.YA.LOOSE....
Title: Need Help in FF7 files!!!
Post by: blackeyed_cn on 2004-08-16 15:19:10
many many many many many thx!!!!!!!!!!!!!!!
Title: Need Help in FF7 files!!!
Post by: pennyliu123 on 2004-08-16 15:25:14
Quote from: fuchisasquatch
extract the files from world_us.lgp from the folder /data/wm and look for a file called "mess" < it has no extension..heres an example of the data contained inside:

Code: [Select]

-IDGAR.!REA.'RASSLANDS.!REA.*UNON.!REA.#OREL.!REA.'OLD.3AUCER.!REA.'ONGAGA.!REA.#OSMO.!REA..IBEL.!REA.2OCKET.,AUNCH.0AD.!REA.7UTAI.!REA.7OODLANDS.!REA.)CICLE.!REA.-IDEEL.!REA..ORTH.#OREL.!REA.#ACTUS.)SLAND.'OBL


as you can see it has the world map areas..

and heres something similar to your thing

Code: [Select]

./K..#HOCOBO..).M.GONNA.............3END.YA.BACK.TO.THE.STABLES...........4URN.YA.LOOSE....


Thank you very much!!
Title: Need Help in FF7 files!!!
Post by: fuchisasquatch on 2004-08-16 15:27:24
no problem... good luck with the rest of the project
Title: Need Help in FF7 files!!!
Post by: Cyberman on 2004-08-16 17:01:56
Looks like they are doing well too. Lots of work ahead but still they are probably having too much fun.

I assume this is all for the PC and not the playstation version?

Cyb
Title: Need Help in FF7 files!!!
Post by: blackeyed_cn on 2004-08-16 17:07:55
Quote from: Cyberman
Looks like they are doing well too. Lots of work ahead but still they are probably having too much fun.

I assume this is all for the PC and not the playstation version?

Cyb

Yes,it's all for the PC,because it's easy to hack EXE(PC) than to hack PSX...
We have to use 3000 Chinese words.... :(
Title: Need Help in FF7 files!!!
Post by: Micky on 2004-08-16 17:52:00
Quote from: blackeyed_cn
Hi,I can't understand you very well....did you suggest me to work hard in translation instead of editing the dialog boxes?

FF7 uses a special programming language to describe what happens during the game. The word for a programming language used to controlled another program is "script" as well.
This language has special codes to open a window and to put text into it, so what he suggests is finding the code that displays the text to identify the window used, and then trace back from there to find the command that opens the window.
Title: Need Help in FF7 files!!!
Post by: mav on 2004-08-16 17:53:54
Micky: I posted about these code few posts above, you can find codes and explanations there ;).
Title: Need Help in FF7 files!!!
Post by: sfx1999 on 2004-08-16 22:20:23
I have a question. Are the PSX version's formats in big-endian and the PCs in little-endian?
Title: Need Help in FF7 files!!!
Post by: Cyberman on 2004-08-17 20:45:49
Quote from: sfx1999
I have a question. Are the PSX version's formats in big-endian and the PCs in little-endian?

Little Endian as the MIPS processor can use little or big endian. In fact you can switch between those formats with a single instruction with it.  SGI has several patents reguarding this.

Cyb