HRC Format - niemasd/PyFF7 GitHub Wiki

The Hierarchy (HRC) format is a plain-text format that stores information about the skeleton of a Final Fantasy VII field character model (i.e., the ones found in char.lgp).

Header Block

HRC files begin with a header block that provide general information about the file. The header seems to be able to be variable length, but it seems to be exactly 3 lines in every Final Fantasy VII HRC file.

Length of Header Block

The first line of the header block (and thus of the HRC file) designates the number of attributes in the header block. It is of the following format (where N denotes the number of attributes):

:HEADER_BLOCK N

For example, an HRC file with 2 attributes (such as seemingly all HRC files in Final Fantasy VII) would have the following:

:HEADER_BLOCK 2

Header Attributes

Recall that the header block length specified the number of header attributes (seemingly always 2 in Final Fantasy VII). For each of these, we have a line in the following format:

:KEY VALUE

In Final Fantasy VII, the attributes are typically the following:

:SKELETON NAME
:BONES N
  • NAME is the name of this skeleton
  • N is the number of bones in this skeleton

For example, the following shows the header attribute lines for a skeleton named n_cloud_sk with 21 bones:

:SKELETON n_cloud_sk
:BONES 21

Bones

Every bone consists of 4 lines in the following format:

NAME
PARENT_NAME
LENGTH
RSD_FILES
  • NAME designates the name of this bone
  • PARENT_NAME designates the name of the parent bone
    • The parent bone must already be listed above in the HRC file, or it can be root (origin)
  • LENGTH designates the length of this bone
  • RSD_FILES designates the RSD files that are aligned to this bone, and it can have one of the following formats:
    • 0 (i.e., just the integer 0)
      • This bone has no RSD files aligned to it
    • N RSD_1 ... (i.e., an integer N followed by a space-delimited list of RSD files)
      • This bone is aligned to N RSD files, which are RSD_1, ...

For example, the following shows the 4 lines for a bone named chest with a parent named hip with length 5.181539 and referencing a single RSD file named AAAD:

chest
hip
5.181539
1 AAAD

Summary

  • Header Block
    • Length of Header Block (nH)
    • Header Attribute 1 (name)
    • Header Attribute 2 (number of skeletons, nS)
    • ...
    • Header Attribute nH
  • Bones (nS entries)
    • Bone 1
      • Name
      • Parent Name
      • Length
      • RSD File List
    • ...
    • Bone nS
      • ...
⚠️ **GitHub.com Fallback** ⚠️