Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Borde

Pages: [1]
Scripting and Reverse Engineering / The S Files (FF7 PC)
« on: 2013-01-07 13:27:05 »
Hello everyone.

I'm currently having a look at the S files stored at magic.lgp. It's obvious by now they define 2D animated sprites used during battles. I'm finding hard to understand how it all works, though. I'm starting this thread to compile the knowledge we currently have about them.

Based on Aali's and NFITC1 job, so far this is what I've got about the format:

Code: [Select]
File header:
   unsigned char FileType
   unsigned char Version
   unsigned short UnknownField_2
   unsigned int NumFrames

Frame header:
   unsigned short UnknownField_0
   unsigned short NumSprites

Sprite definition:
   unsigned int Flags
   signed short XTargetOffset
   signed short YTargetOffset
   short XSource
   short YSource
   unsigned short TexturePageIndex
   short UnknowField_E
   unsigned char SourceWidth
   unsigned char W2
   unsigned char SourceHeight
   unsigned char H2

The contents of the sprite is defined by the rectangle starting at (XSource, YSource) and with dimensions (SourceWidth, SourceHeight). These values aren't in standard texture coordinates, they are in pixels instead.

XTargetOffset and YTargetOffset define position of the first pixel of the image on the target surface (most likely a QUAD), being (0,0) the center of said surface.

Although usually these coordinates point directly to regions in TEX files (some are very easy to identify due to file names), sometimes they don't. My guess is here is what Aali called TexturePage comes into play. I think some of the TEX files are compiled by the engine in a single TexturePage (provably they have fixed dimensions, because they will be needed to generate texture coordinates). I don't know where these pages are defined though.

Attributes W2 and H2 are also pretty puzzling. They are usually equal or very similar to SourceWidth and SourceHeight, but sometimes their value is 0. Maybe their purpose is to stretch the sprites?

I hope someone around here can shed any light about this.


Hello everyone and Merry Christams.

Maybe this is old news and I just missed it, but I just noticed where limit break animations are stored and thought I'd share it just in case. They are in magic.lgp, as expected, in a collection of standard summon animation files. These are the files:
*Barret: limbr2.a00, limbr3.a00, limbr4.a00, limbr5.a00, limbr6.a00, limbr7.a00, hvshot.a00
*Cid: limcd1.a00, limcd2.a00, limcd3.a00, limcd4.a00, limcd5.a00, limcd6.a00
*Cloud: limcl2.a00, limcl3.a00, limcl4.a00, limcl5.a00, limcl6.a00, limcl7.a00, blaver.a00, kyou.a00
*Aerith: limea2.a00, limea3.a00, limea4.a00, limea5.a00, limea6.a00, limea7.a00, iyash.a00, kodo.a00
*Red XIII: limrd3.a00, limrd4.a00, limrd5.a00, limrd6.a00, limrd7.a00, limsled.a00
*Yuffie: limyf1.a00, limyf2.a00, limyf3.a00, limyf4.a00, limyf5.a00, limyf6.a00, limyf7.a00
*Tiffa: limfast.a00
*Cait Sith: dice.a00

 All limit animation packs have 8 body animations and 8 weapon animations (although most of them are empty).

Hello everyone.

I was wondering if there is any know way of detecting if an animation is used as loop by the game, both on battles and field. I guess at least there must be some sort of script code that sets the character animation and tells the engine wether they must loop or not. Is this system already known?


Hello everyone.

I've uploaded a little quick and dirty tool I coded to let you convert your 24 bits textures to the TEX format (as oposed to the 8 bits limitation we've had the last years). It should work with any BMP, JPG, GIF, ICO, WMF or EMF file. The original bitcount is respected. It can also save the textures as BMPs. I have barely tested it, so expect bugs.

Most of the credit should go to Aali for his specification of the TEX format and his help getting things working.

Have fun.

Binary (thanks to PitBrat for the mirror):

Lastest version uploaded on 2/8/2011

Hello everyone.

I was looking at the battle models and found those ??ba files. Biturn says they are FF8 models, but they obviously aren't. So I was wondering if anyone around here knows what they contain and what's their format.


Hello everyone.
I've been trying to use the algorithm suggested by L.Spiro and Qhimm (the same one that's currently referenced on the wiki) to decode FF7 Battle Animations and I can't seem to get anywhere. I can't even get to read the correct possition of the character for any frame but the 1st (obviously) and second one. So it's clear that I'm not even reading at the right offsets.
My cuestion is, does this algorithm really work? I know Mirex tried to use it and failed. Has anyone else tried?

Scripting and Reverse Engineering / Problems with fread
« on: 2007-05-03 23:48:42 »
Hello everyone.
I'm writting a little program and I found a big problem. When I try to execute this:
fread(Polygons,sizeof(s3DModelPolygon), NumPolys,is);
I get an error (fread returns 0 and errno is set to 22). Polygons is a dinamically allocated array created with malloc (it didn't returned NULL, so it should be correct, right?)
That makes a total of 12384 bytes.
Well, hope someone arround here has an answer. I've been googling for hours and I'm tired.
Must I surrender and read each polygon one by one?

EDIT: Never mind, I'll just stop using that crappy malloc. It works perfectly using new[].

General discussion / FF7 Remake comming closer?
« on: 2007-04-23 10:14:47 »
I visited today NGEmu and found a interesting post:
Looks like Square is interested in re-releasing some of their old tittles for new platforms. Time will tell if this is any good ...

Hello everyone.
Ice_col513 informed me lately that he has been unable to render field models transparent in FF7 PC. He created those models with PCreator. I remember I've seen screenshots posted by Reunion with a character holding a transparent sword. My question is, does the transparency level of a group have any meaning outside of battles?
Thanks for your time.

Hello everyone. This may have been discussed here already, but I never herad about it. So here I go.
Has anyone read the 2 "short novels" (well, they are less than 50 pages each) that float arround there?
Their titles are:
 - The maiden who travels the planet.
 - On the way to a smile.
Suposedly, both of them are accepted as official by SE. Have I been fooled?
The first one covers the adventures of Aeris... afters his death :-P. Can't say is very well done, but I found it quiet interesting.
I don't know anything about the second one though. I've got read it some day.

Scripting and Reverse Engineering / Need help with OpenGL
« on: 2006-09-10 16:59:46 »
Hello everyone.
Maybe you herad some time ago that I'm redoing Kimera (mostly) from scratch due to some crappy accident. Currently I'm trying to add new features. More specifically, I'm trying to add an option to move vertices freely draging them with the mouse. My problem is that I need to get the director vector from the ModelView Matrix.
Could somebody arround here tell me how to do it?
Thanks for your time.

Hello everyone. I've just seen Silent Hill the Movie. I've kept an eye on this movie since it came out in the US. The reviews I've been reading were incredibly varied ranging from those that called it a master piece to those that despised it.

Personally, I remember Silent Hill 1 as one of the best games I've ever played. The second and third were quiet good too, but the first was great. I've lost my faith on the games-movies adpatations long ago, but after reading the movie was mostly based on the first episode I regained some hope.

Well, now I've seen it and I'm... quiet pissed. The first half was great. I can't say it was scary at all, but It certainly captured the ambience of the game perfectly and the details taken directly from the game made me smile several times. But then... oh my... they certainly messed it. I can't see the point in changing the story to that extent contradicting the game so directly.

Anyway, that's just my opinion. I'd like to see what those of you who have seen it thought about it.

Completely unrelated / The importance of doing backups
« on: 2006-07-22 00:29:14 »
Hello everyone.
I was working on Kimera a few minutes ago until my computer sudenly froze. I rebooted my computer and found out that the main module of kimera has... well... vanished. I've been writing that file for over a year and now... it's lost. I thought I was safe after switching from the old nasty FAT32 system but you see, It looks like you are never safe.
I haven't got any copy of that damn file. It contained about 50% of the code, the most important functions. And now I must rewrite it from scratch...
So guys, learn from my mistake: never trust your filesystem. Make backups periodically.
I must... go to the bed. Tomorrow will be a new day.
See you.

Hello everyone.
I'm trying to make a patch to double the resolution of the backgrounds. I'm not really sure if I'll be able to finish it though. For now it's just an experiment.

In order to do it, I'm trying to get the backgrounds, double their resolution (turning 1 tile into 4), filtering and reinserting them into the field files. Of course I can see this won't look right in game because the image won't fit on the screen. I'd need to halve the size of the drawn tiles.
Thus It would be very helpful for me to know exactly where (offset) is the code that draws the backgrounds in the EXE. Yeah, you can call me lazy, but my hacking skills sucks and It would take me much more than waht you'd expect.

By the way, while I was trying to decode the images I used the information at GEARS.PDF. I found some information there that SEEMS (maybe I just didn't understand it well) incorrect. Particulary, I had to subrtact 50 bytes to the Raw Image data offset and add 2 bytes to find the correct Pallette entries. Am i doing something wrong or the information on the file is outdated?

Thanks for the help.

Scripting and Reverse Engineering / Does FF7 use OpenGL?
« on: 2006-04-03 21:20:29 »
Hello everyone.
I've been looking at FF7.EXE (1.02 version) using IDA Pro and found lots of calls to OpenGL  functions. I was pretty suprised as I've allways thought FF7 was purely D3D. I tried inserting break-points at some of those functions using the old SoftIce.  Extrangely enough, looks like all that code never gets to be executed (at least, I haven't found where it's used).
I supose several people here has already messed hundres of times with that file. Could someone tell me what happens with all those GL calls?

Troubleshooting / Does FF7 engine support shinniness?
« on: 2005-12-21 11:42:17 »
I've realized lastly that all models i do look matt. I don't remeber very well what happend with the original models (It's been a long time since the last time i played through the entier game). Is there any way of making a model "shinny" or the lighting engine simply doesn't support it?

Troubleshooting / New objects in the FF7 field
« on: 2005-11-08 12:52:30 »
Does anyone know how to insert new 3D objects at field locations in FF7?

FF7 Tools / [PC] HRC Resizer
« on: 2005-07-10 14:47:58 »
Well, while Reunion figures out how to solve the clipping problems with the hi-res models (or you want hi-res SD models like me :-P), you may use this program to adjust the size of the models in order for them to fit better on the background.
Here you have:

Updated with ice_cold513 FAQ. Thanks for writting it!

Are p colors and edges actually used for something in FF7?

I've got a little problem when using Palmer's head in a field model. The textures look black in-game (and even in Bitrun, in fact). The silhouette is rendered correctly, but inside it there is only blackness. What could be causing it?
Oh, one more thing: how can I use a custom texture in a model? I tried importing a BMP to TEX using Bitrun, but the game crashed when it tried to load the texture.
I'd like to thank you Mirex for your great program. It's comming very handy.

FF7 Tools / [PC] p model simple editor - Kimera (0.97b)
« on: 2005-05-31 22:45:14 »
I'm sorry for not answering my PMs. I haven't cheked this site in quiet a while...

Kimera is a small tool I started to code in 2005. It's purpose it's simple: view and edit the 3D models found in the PC version of Final Fantasy VII. It was created specifically to help working on the Phoenix Rejuvenction Project (known at first as NPC Reconstruction Project). A project I no longer work on.
What can it do exactly? Let's see...
-Display most of the 3D models found in the game. Field models and battle models including their animations. The minigames models should work as well.
-Supports editing the individual pieces that define the models (P files). Specifically, it can move vertices, change their color, erase, create and cut triangles. It can also erase groups present on a P file or change their opacity value (not tested). Standard geometrical transformations (rotate, resize and reposition) are also supported.
-Import 3Ds files.
-Add/Change/Remove textures (supports TEX, BMP, JPG, GIF and ICO files).
-Add pre-cooked lighting for a single part and for the whole model (with up to four ligth sources)
-Edit the bone lengths of a skeleton and attach and remove pieces to them.
-Field and battle animations can be edited, but the interface is rather unfriendly.

Please, read the included readme.txt file for further instructions.

Well, here you have a new version to fix the limits break mess:
Binary : Kimera_097b_bin.7z
Source (for Visual Basic 6): Kimera_097b_src.7z

If you are planning to work on the sourcecode, you will need the newer OpenGL definitions for VB6 and glExtensions. You can download them from this page:

Also, in case you're having trouble finding the right ogl.tlb, here you have it:
VB6 OpenGL.7z

Last update 01/10/2014 (0.97b)

Pages: [1]