Author Topic: Looking for PSX FF7 Field animations  (Read 5830 times)

lasyan3

  • *
  • Posts: 76
    • View Profile
Looking for PSX FF7 Field animations
« on: 2010-01-29 06:41:28 »
Hello guys,
I'm working on the field animations opcodes (ANIMx and so on) and it seems that each field file has its own list of "allowed" animations for each entity loaded. But I could not find where exactly this information is (I'm not even sure it is contained in the DAT file).
I don't look for the animations for themselves, but for the information that indicates which animations can be used in a field file. Indeed, when I use an ANIM opcode and try different values, it seems that I can only use the animations that the character is using during "official gaming" (for example, in the screen when you first meet aerith, the cloud animations available are only the "turn", "think", "walk" and "run" ones).

Does anyone have any clue about where this information could be ?
Thanks.

Edit :
I have found this topic but it's different than what is in qhimmwiki (no information about this "HRC loader" thing).

Edit2 :
Quote from: Akari
Each BCX contains only 3 animation for character (stand walk and run). BSX contains additional animation used in field.
Ok so let's investigate about those BSX...
« Last Edit: 2010-01-29 09:44:15 by lasyan3 »

Akari

  • *
  • Posts: 766
    • View Profile
Re: Looking for PSX FF7 Field animations
« Reply #1 on: 2010-01-29 11:45:23 »
On field you can only use animation from BCX and BSX files. Animation opcode starts animation by index. It's always local.
For character models (cloud aeris and others) there are BCX files that has models and 3 animation (stand walk and run). All other models has their animation in BSX files.
By the way - there are number of animations in DAT file in 7 part of this file.

Code: [Select]
// 7 block in dat
+00 [][] size
+02 [][] number of models
// model data
+00 [] palette in global texture
+01 [] number of bones
+02 [] number of model parts
+03 [] number of animation
+04 [] we set model number (from now on used as model id) here or 0xff if model not enabled.
+05 [] enabled model or not.
+06 [] global model loaded
+07 [] global model

Akari

  • *
  • Posts: 766
    • View Profile
Re: Looking for PSX FF7 Field animations
« Reply #2 on: 2010-01-29 11:47:00 »
Sorry for double post but I can't delete it ><

If you are interested in BSX file the format are follows
Code: [Select]
// BSX model header
+
+ 4 [][][][] number of models.
+ 8 [][][][] offset to texture.
+ c [][][][] offset to something. We copy enviroment settings for models here.



// BSX model enviroment settings
+ 0
+ 2 [][]     scale (12 bix fixed point).
+ 4 [][][][] offset to something.
+ 8 []       R
+ 9 []       G
+ a []       B
+12 []       start index of additional bone.
+17 []       additional number of bones.
+1e []       start index of additional parts.
+23 []       additional number of parts.
+2a []       start index of additional animations.
+2f []       additional number of animations.
+30



// model parts header
+00 []       0 - not calculate stage lighting and color. 1 - calculate.
+01 []       bone to which this part attached to.
+02 []       number of vertex.
+03 []
+04 []       number of textured quads (Gourad Shading) (3C 3E).
+05 []       number of textured triangles (Gourad Shading) (34 36).
+06 []       number of textured quads (Flat Shading) (2C 2E).
+07 []       number of textured triangles (Flat Shading) (24 26).
+08 []       number of monochrome triangles (20).
+09 []       number of monochrome quads (28).
+0a []       number of gradated triangles (30).
+0b []       number of gradated quads (38).
+0c []       number of data in block 4.
+0d []
+0e [][]     offset to polygon block.
+10 [][]     offset to texture coordinates block (0x02 each).
+12 [][]     offset to 4th block.
+14 [][]     offset to 5th block.
+16 [][]     size of buffer for packet drafts.
+18 [][][][] offset to data block (vertex block first).
+1c [][][][] offset to precompiled packet draft (bone matrixes already skipped).

// start of data
+0 [][][][] some flag indicates that we applied scale. if 1 then we will not scale this parts.

// textured quads (Gourad Shading) data
+00 []       vertex 1 index
+01 []       vertex 2 index
+02 []       vertex 3 index
+03 []       vertex 4 index
+04 [][][]   BGR 1
+07 []       normal index 1
+08 [][][]   BGR 2
+0b []       normal index 2
+0c [][][]   BGR 3
+0f []       normal index 3
+10 [][][]   BGR 4
+13 []       normal index 4
+14 []       tex coord index for vertex 1
+15 []       tex coord index for vertex 2
+16 []       tex coord index for vertex 3
+17 []       tex coord index for vertex 4

// textured triangles (Gourad Shading) data
+00 []       vertex 1 index
+01 []       vertex 2 index
+02 []       vertex 3 index
+03 []
+04 [][][]   BGR 1
+07 []       normal index 1
+08 [][][]   BGR 2
+0b []       normal index 2
+0c [][][]   BGR 3
+0f []       normal index 3
+10 []       tex coord index for vertex 1
+11 []       tex coord index for vertex 2
+12 []       tex coord index for vertex 3
+13 []

// 4th block data
+0 [][][][] texture settings. Indexed by 5th block data.
            0x0000003f - 0 - if set we use global texture.
                         1 - if set we use global texture.
                         2 - if 2 then we use clut X and Y as defined. Add model_id to Y otherwise.
            0x000000c0 - clut type (4bpp, 8bpp, 15bpp)
            0x00000f00 - texture page X.
            0x00001000 - texture page Y.
            0x003f0000 - CLUT X.
            0x7fc00000 - CLUT Y.

// 5th block data
+0 []       one byte stream for every packet with texture.
            0x0f - index for 4th block data.
            0x10 - transparency on/off
            0x60 - blending type

// animation header
+00 [][]     number of frames.
+02 []       number of bones.
+03 []       number of frames translation sequenses (bones).
+04 []       number of static translation (bones).
+05 []       number of frames rotation sequenses (bones).
+06 [][]     local offset to frames translation.
+08 [][]     local offset to static translation.
+0a [][]     local offset to frames rotation.
+0c [][][][] offset to data block (static frames block first).

// animation data
+ 0 [][][][] some flag indicates that we applied scale. if 1 then we will not scale this animations.
// idle bone data
// for each bone
+ 0 [] mask byte that tells which rotation or translation is changed every frame (0 TZ TY TX 0 RZ RY RX)
+ 1 [] x rotation
+ 2 [] y rotation
+ 3 [] z rotation
+ 4 [] x translation start id
+ 5 [] y translation start id
+ 6 [] z translation start id
+ 7 [] unused

lasyan3

  • *
  • Posts: 76
    • View Profile
Re: Looking for PSX FF7 Field animations
« Reply #3 on: 2010-01-29 15:38:58 »
Thanks Akari, I will study those files and tell if I have others questions !

lasyan3

  • *
  • Posts: 76
    • View Profile
Re: Looking for PSX FF7 Field animations
« Reply #4 on: 2010-01-29 19:12:47 »
Damned, I don't get it  :?
I decompressed MD1_1.BSX and found some data you mention but not everything, I think I got it until the model environment settings (if eventually you could take a lookt at this :-D ) :
Code: [Select]
70 10 01 00 -- Size of file
4C 87 00 00 -- Size of first section
(0x874C-4 bytes) -- First section (unknown)

//BSX model header
07 00 00 00 -- Number of entities
80 09 00 00 -- Size of second section
38 B3 01 00 -- Unknown

//BSX model environment settings (7*0x30 bytes)
00 01 00 04 50 01 00 00 44 40 42 00 3E 0A BA F6 31 08 FF FF 6D 96 68 00 20 03 1C F5 AD F4 FF FF 95 95 93 00 56 F1 8C FC 7F 05 03 05 68 68 67 03
02 03 00 04 50 01 00 00 44 40 42 00 3E 0A BA F6 31 08 FF FF 6D 96 68 00 20 03 1C F5 AD F4 FF FF 95 95 93 00 56 F1 8C FC 7F 05 FF FF 68 68 67 00
0D 00 00 04 20 01 00 00 44 40 42 00 3E 0A BA F6 31 08 00 15 6D 96 68 16 20 03 1C F5 AD F4 00 0E 95 95 93 0F 56 F1 8C FC 7F 05 00 03 68 68 67 04
0C 00 00 04 68 03 00 00 44 40 42 00 3E 0A BA F6 31 08 00 15 6D 96 68 16 20 03 1C F5 AD F4 00 0E 95 95 93 0F 56 F1 8C FC 7F 05 00 05 68 68 67 06
12 00 00 04 D0 05 00 00 44 40 42 00 3E 0A BA F6 31 08 00 15 6D 96 68 16 20 03 1C F5 AD F4 00 0E 95 95 93 0F 56 F1 8C FC 7F 05 00 03 68 68 67 04
21 00 00 04 18 08 00 00 44 40 42 00 3E 0A BA F6 31 08 00 00 6D 96 68 01 20 03 1C F5 AD F4 00 00 95 95 93 01 56 F1 8C FC 7F 05 00 00 68 68 67 01
21 00 00 04 1C 08 00 00 44 40 42 00 3E 0A BA F6 31 08 00 00 6D 96 68 01 20 03 1C F5 AD F4 00 00 95 95 93 01 56 F1 8C FC 7F 05 00 00 68 68 67 01

// 0x0150 ? Model parts header ?
1E 00 16 00 02 16 B4 00 B4 00 B8 00 D0 5D 00 80
1E 00 16 00 02 01 B4 00 B4 00 B8 00 1C 61 00 80
3C 00 16 00 02 12 B4 00 B4 00 B8 00 F4 61 00 80
00 00 FF 00 00 00 00 01 CA FF 01 01 51 FF 02 01
CA FF 01 00 6D FF 04 00 BA FF 05 01 A9 FF 06 01 7E FF 07 01 CA FF 01 00 6D FF 09 00 BA FF 0A 01
A9 FF 0B 01 7E FF 0C 01 00 00 00 00 D0 FF 0E 01 5E FF 0F 01 44 FF 10 01 00 00 00 00 D0 FF 12 01
5E FF 13 01 44 FF 14 01 01 01 0E 00 00 00 00 00 00 00 04 0A 00 00 74 00 7C 01 7C 01 7C 01 D8 01
08 00 00 80 00 00 00 00 01 02 1A 00 00 00 00 00 00 00 06 15 00 00 D4 00 D8 02 D8 02 D8 02 9C 03
84 01 00 80 00 00 00 00 01 03 46 0C 02 02 00 00 00 00 4E 18 03 04 34 02 58 09 4C 09 70 09 A0 0C
5C 04 00 80 00 00 00 00 01 06 12 00 00 00 00 00 00 00 0B 0A 00 00 94 00 0C 02 0C 02 0C 02 9C 02
D0 0D 00 80 00 00 00 00 01 07 10 00 00 00 00 00 00 00 00 0E 00 00 84 00 9C 01 9C 01 9C 01 F8 01
DC 0F 00 80 00 00 00 00 01 08 08 00 00 00 00 00 00 00 00 06 00 00 44 00 BC 00 BC 00 BC 00 D8 00 78 11 00 80 00 00 00 00 01 0B 12 00 00 00 00 00
00 00 0B 0A 00 00 94 00 0C 02 0C 02 0C 02 9C 02 34 12 00 80 00 00 00 00 01 0C 10 00 00 00 00 00 00 00 00 0E 00 00 84 00 9C 01 9C 01 9C 01 F8 01
40 14 00 80 00 00 00 00 01 0D 08 00 00 00 00 00 00 00 00 06 00 00 44 00 BC 00 BC 00 BC 00 D8 00 DC 15 00 80 00 00 00 00 01 0F 08 00 00 00 00 00
00 00 04 04 00 00 44 00 D4 00 D4 00 D4 00 00 01 98 16 00 80 00 00 00 00 01 10 15 00 00 00 00 00 00 00 07 0B 00 00 AC 00 F8 01 F8 01 F8 01 50 02
6C 17 00 80 00 00 00 00 01 11 0A 00 00 00 00 00 00 00 02 07 00 00 54 00 00 01 00 01 00 01 34 01 64 19 00 80 00 00 00 00 01 13 08 00 00 00 00 00
00 00 04 04 00 00 44 00

// 0x0368 ? Model parts header ?
D4 00 D4 00 D4 00 00 01 64 1A 00 80 00 00 00 00 01 14 15 00 00 00 00 00 00 00 07 0B 00 00 AC 00 F8 01 F8 01 F8 01 50 02 38 1B 00 80 00 00 00 00
01 15 0A 00 00 00 00 00 00 00 02 07 00 00 54 00 00 01 00 01 00 01 34 01 30 1D 00 80 00 00 00 00 01 00 16 00 02 00 B4 00 B4 00 B8 00 E4 66 00 80
1E 00 16 01 01 1C B4 00 F0 00 F2 00 9C 67 00 80 0F 00 16 01 01 20 B4 00 D2 00 D4 00 D8 6B 00 80 14 00 16 02 00 20 B4 00 04 01 04 01 8C 6E 00 80
00 00 FF 00 00 00 00 01 AE FF 01 01 70 FF 02 01 AE FF 01 00 7C FF 04 00 CA FF 05 01 A3 FF 06 01 7A FF 07 01 AE FF 01 00 7C FF 09 00 CA FF 0A 01
A3 FF 0B 01 7A FF 0C 01 00 00 00 00 E0 FF 0E 01 5E FF 0F 01 58 FF 10 01 00 00 00 00 E0 FF 12 01 5E FF 13 01 58 FF 14 01 01 01 17 00 00 00 00 00
00 00 02 12 00 00 BC 00 44 02 44 02 44 02 C0 02 30 1E 00 80 00 00 00 00 01 02 1C 00 00 00 00 00 00 00 1A 0B 00 00 E4 00 60 03 60 03 60 03 64 04
74 20 00 80 00 00 00 00 01 03 4C 0C 02 02 00 00 00 00 4A 23 03 04 64 02 24 0A 18 0A 3C 0A BC 0D D4 23 00 80 00 00 00 00 01 06 10 00 00 00 00 00
00 00 00 0E 00 00 84 00 9C 01 9C 01 9C 01 F8 01 14 2E 00 80 00 00 00 00 01 07 10 00 00 00 00 00 00 00 00 0E 00 00 84 00 9C 01 9C 01 9C 01 F8 01
B0 2F 00 80 00 00 00 00 01 08 08 00 00 00 00 00 00 00 00 06 00 00 44 00 BC 00 BC 00 BC 00 D8 00 4C 31 00 80 00 00 00 00 01 0B 10 00 00 00 00 00
00 00 00 0E 00 00 84 00 9C 01 9C 01 9C 01 F8 01 08 32 00 80 00 00 00 00 01 0C 10 00 00 00 00 00 00 00 00 0E 00 00 84 00 9C 01 9C 01 9C 01 F8 01
00 00 06 00 00 44 00 BC 00 BC 00 BC 00 D8 00 FC 35 00 80 00 00 00 00 01 10 18 00 00 00 00 00 00 00 00 12 00 00 C4 00 2C 02 2C 02 2C 02 88 02 B8
36 00 80 00 00 00 00 01 11 0A 00 00 00 00 00 00 00 02 07 00 00 54 00 00 01 00 01 00 01 34 01 E4 38 00 80 00 00 00 00

// 0x05D0 ? Model parts header ?
01 13 08 00 00 00 00 00 00 00 00 06 00 00 44 00 BC 00 BC 00 BC 00 D8 00 E4 39 00 80 00 00 00 00 01 14 18 00 00 00 00 00 00 00 00 12 00 00 C4 00
2C 02 2C 02 2C 02 88 02 A0 3A 00 80 00 00 00 00 01 15 0A 00 00 00 00 00 00 00 02 07 00 00 54 00 00 01 00 01 00 01 34 01 CC 3C 00 80 00 00 00 00
01 00 16 00 02 00 B4 00 B4 00 B8 00 E4 66 00 80 1E 00 16 01 01 1C B4 00 F0 00 F2 00 9C 67 00 80 0F 00 16 01 01 20 B4 00 D2 00 D4 00 D8 6B 00 80
14 00 16 00 02 06 B4 00 B4 00 B8 00 10 72 00 80 0F 00 16 02 00 20 B4 00 F0 00 F0 00 40 73 00 80 14 00 16 02 00 22 B4 00 04 01 04 01 10 76 00 80
00 00 FF 00 00 00 00 01 BA FF 01 01 2B FF 02 01 BA FF 01 00 2C FF 04 00 B3 FF 05 01 B0 FF 06 01 6A FF 07 01 BA FF 01 00 2C FF 09 00 B3 FF 0A 01
B0 FF 0B 01 6A FF 0C 01 00 00 00 00 C7 FF 0E 01 6A FF 0F 01 5E FF 10 01 00 00 00 00 C7 FF 12 01 6A FF 13 01 5E FF 14 01 01 01 0E 00 00 00 00 00
00 00 04 0A 00 00 74 00 7C 01 7C 01 7C 01 D8 01 CC 3D 00 80 00 00 00 00 01 02 14 00 00 00 00 00 00 00 12 09 00 00 A4 00 78 02 78 02 78 02 3C 03
48 3F 00 80 00 00 00 00 01 03 49 0E 04 00 00 00 00 00 4A 23 03 04 4C 02 14 0A 08 0A 30 0A D4 0D C0 41 00 80 00 00 00 00 01 06 10 00 00 00 00 00
00 00 00 0E 00 00 84 00 9C 01 9C 01 9C 01 F8 01 F4 4B 00 80 00 00 00 00 01 07 10 00 00 00 00 00 00 00 00 0E 00 00 84 00 9C 01 9C 01 9C 01 F8 01
90 4D 00 80 00 00 00 00 01 08 08 00 00 00 00 00 00 00 00 06 00 00 44 00 BC 00 BC 00 BC 00 D8 00 2C 4F 00 80 00 00 00 00 01 0B 10 00 00 00 00 00
00 00 00 0E 00 00 84 00 9C 01 9C 01 9C 01 F8 01 E8 4F 00 80 00 00 00 00 01 0C 10 00 00 00 00 00 00 00 00 0E 00 00 84 00 9C 01 9C 01 9C 01 F8 01
84 51 00 80 00 00 00 00 01 0D 08 00 00 00 00 00 00 00 00 06 00 00 44 00 BC 00 BC 00 BC 00 D8 00 20 53 00 80 00 00 00 00 01 0F 0F 00 00 00 00 00
00 00 02 0C 00 00 7C 00

// 0x0818 ? Model parts header ?
8C 01 8C 01

// 0x081C ? Model parts header ?
8C 01 E8 01 DC 53 00 80 00 00 00 00 01 10 18 00 00 00 00 00 00 00 00 12 00 00 C4 00 2C 02 2C 02 2C 02 88 02 68 55 00 80 00 00 00 00 01 11 0A 00
00 00 00 00 00 00 02 07 00 00 54 00 00 01 00 01 00 01 34 01 94 57 00 80 00 00 00 00 01 13 0F 00 00 00 00 00 00 00 02 0C 00 00 7C 00 8C 01 8C 01
8C 01 E8 01 94 58 00 80 00 00 00 00 01 14 18 00 00 00 00 00 00 00 00 12 00 00 C4 00 2C 02 2C 02 2C 02 88 02 20 5A 00 80 00 00 00 00 01 15 0A 00
00 00 00 00 00 00 02 07 00 00 54 00 00 01 00 01 00 01 34 01 4C 5C 00 80 00 00 00 00 01 00 16 00 02 00 B4 00 B4 00 B8 00 E4 66 00 80 1E 00 16 01
01 1C B4 00 F0 00 F2 00 9C 67 00 80 0F 00 16 01 01 20 B4 00 D2 00 D4 00 D8 6B 00 80 50 00 16 02 00 25 B4 00 F4 01 F4 01 BC 79 00 80 00 00 FF 01
01 00 08 04 00 00 02 00 00 03 00 00 01 02 44 00 78 00 74 00 80 00 98 00 4C 5D 00 80 00 00 00 00 1E 00 01 00 00 00 0C 00 0C 00 0C 00 40 87 00 80
00 00 FF 01 01 00 08 04 00 00 02 00 00 03 00 00 01 02 44 00 78 00 74 00 80 00 98 00 4C 5D 00 80 00 00 00 00 1E 00 01 00 00 00 0C 00 0C 00 0C 00
40 87 00 80 A4 7F 00 00 02 00 00 00
(next section of the file)

Micky

  • *
  • Posts: 300
    • View Profile
Re: Looking for PSX FF7 Field animations
« Reply #5 on: 2010-01-30 11:16:02 »

lasyan3

  • *
  • Posts: 76
    • View Profile
Re: Looking for PSX FF7 Field animations
« Reply #6 on: 2010-02-16 15:48:31 »
Thanks Micky, your tool is exactly what I needed !

lasyan3

  • *
  • Posts: 76
    • View Profile
Re: Looking for PSX FF7 Field animations
« Reply #7 on: 2010-02-28 16:42:17 »
Hi again, I finally managed to do what I wanted, and I found out something new inside the DAT files of the field folder : the last section of the file contains informations about the models :
[Edit : nevermind, I should read entire topics before posting :p]
When adding animations or models inside BSX files, one must also update this information, or else he will not be able to use it.

I'd like to add this information inside the wiki, but it seems it's not possible to create an account...
« Last Edit: 2010-02-28 19:34:16 by lasyan3 »

Micky

  • *
  • Posts: 300
    • View Profile
Re: Looking for PSX FF7 Field animations
« Reply #8 on: 2010-02-28 21:14:36 »
I'd like to add this information inside the wiki, but it seems it's not possible to create an account...
I think you've got to PM Qhimm or Halkun.
Of course, you could just post it here, so people who search the forum find it.

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Re: Looking for PSX FF7 Field animations
« Reply #9 on: 2010-02-28 22:31:05 »
Yes, PM me with email user name and password. And ill add you

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Re: Looking for PSX FF7 Field animations
« Reply #10 on: 2010-03-04 02:55:50 »
Double-post with important info - You have been added lasyan, in case you didn't get my PM.