XIV Dev Wiki
Search…
AVFX Files
This page contains the file structure itself. What each of the structures listed here are used for can be on other pages.
AVFX files are organized as a nested series of blocks, with each block following the format:
1
Name: 4 bytes
2
Size: 4 bytes
3
Contents: [Size] bytes
Copied!
The contents of a block can further contain other blocks. It is also worth noting that the name of a block is reversed from its actual meaning. For example, the "top-level" block for an AVFX file is "XFVA"(AVFX reversed). Names which are fewer than 4 character are also padded out to 4 bytes. Blocks are also padded out to be 4-aligned, so even if Sizeis 3, there will be an extra 00 before the next block starts.

Overview

Note: the names of the blocks are reversed for readability. Also, the notation TmLn[], for example, simply means several sequential TmLn blocks, one directly after the other. There is no "list" structure in AVFX files.
The structure is also abridged for brevity, the full list of parameters can be found at the link below.
1
AVFX:
2
Ver: the AVFX version used?
3
4
...parameters....
5
6
ScCn: number of schedulers in this file (always 1)
7
TlCn: number of timelines
8
EmCn: number of emitters
9
PrCn: number of particles
10
EfCn: number of effectors
11
BdCn: number of binders
12
TxCn: number of textures
13
MdCn: number of models
14
15
Schd: a scheduler block
16
TmLn[]: a list of timeline blocks
17
Emit[]: a list of emitter blocks
18
Ptcl[]: a list of particle blocks
19
Efct[]: a list of effector blocks
20
Bind[]: a list of binder blocks
21
Tex[]: a list of texture blocks
22
Modl[]: a list of model blocks
Copied!

Scheduler (Schd)

1
Schd:
2
ItCn: item count
3
TrCn: trigger count, always 12
4
Item[]: a list of items
5
Trgr[]: a list of triggers, always 12 Trgr blocks
Copied!

Items and Triggers

The way Item and Trgr blocks are organized is somewhat unintuitive. Both of them have an identical structure:
1
Item or Trgr:
2
bEna: enabled
3
StTm: start time
4
TlNo: timeline index
Copied!
However, each subsequent Item/Trgr will have the data of the previous appended to it. For example:
1
Item:
2
bEna
3
StTm
4
TlNo
5
6
Item:
7
bEna : from item #0
8
StTm : from item #0
9
TlNo : from item #0
10
bEna
11
StTm
12
TlNo
13
14
Item:
15
bEna : from item #0
16
StTm : from item #0
17
TlNo : from item #0
18
bEna : from item #1
19
StTm : from item #1
20
TlNo : from item #1
21
bEna
22
StTm
23
TlNo
Copied!
For this reason, the easiest way to read a list of Item is to take the last one, and split it into 3-block chunks.

Timeline (TmLn)

1
TmLn:
2
...parameters...
3
4
TICn: number of items
5
CpCn: number of clips
6
7
Item[]: list of item blocks
8
Clip[]: list of clip blocks
Copied!

Timeline Items

Timeline items have this structure, and are similar to scheduler items in that each item contains the data of the previous ones as well.

Timeline clips

Timeline clips are different in that the data they contain is not organized into blocks, but is rather one continuous 164-byte:
1
4-byte string, reversed
2
4 4-byte ints
3
4 4-byte floats
4
4 32-byte strings
Copied!

Emitter (Emit)

1
Emit:
2
SdNm: the path to a sound file (.sdm)
3
4
...parameters....
5
6
PrCn: number of particles
7
EmCn: number of emitters
8
9
...animation curves...
10
11
ItEm[]: list of emitter items
12
ItPr[]: list of particles items
13
14
Data: depends on the emitter type
Copied!
The Data block contains information relevant to the emitter's type (specified in the EVT parameter). Depending on the type, the Data block may not exist at all (structures).

Emitter/Particle Items

ItEm and ItPr blocks share the same basic structure, but follow the same pattern as items and triggers within schedulers, where previous items' data is appended to each subsequent one. However, in an emitter, all of the ItEm data is included in the ItPr data. As an example:
1
ItEm:
2
[ItEm data #0]
3
4
ItEm:
5
[ItEm data #0]
6
[ItEm data #1]
7
8
ItEm:
9
[ItEm data #0]
10
[ItEm data #1]
11
[ItEm data #2]
12
13
ItPr:
14
[ItEm data #0]
15
[ItEm data #1]
16
[ItEm data #2]
17
[ItPr data #0]
18
19
ItPr:
20
[ItEm data #0]
21
[ItEm data #1]
22
[ItEm data #2]
23
[ItPr data #0]
24
[ItPr data #1]
Copied!

Particle (Ptcl)

1
Ptcl:
2
3
...parameters...
4
5
UvSN: number of UV Sets
6
7
...more parameters...
8
9
...animation curves...
10
11
Smpl: Simple animations (optional)
12
13
UVSet[]: a list of UVSet blocks
14
15
Data: depends on particle type
16
17
TC1: texture color 1
18
TC2: texture color 2 (optional)
19
TC3: (optional)
20
TC4: (optional)
21
TN: texture normal
22
TR: texture reflection
23
TD: texture distortion
24
TP: texture palette
Copied!
Like with emitters, the contents of the Data block depends on the particle type (parameter PrVT ). Some particle types do not contain a Data block (structures).

Particle Simple Animations

The Smpl block contains 2 unique parameters: Cols and Frms. Cols is 16 bytes, where each 4 bytes represent an rgba color (each byte is one channel). Frms is 8 bytes, where each 2 bytes is an integer.

Effector (Efct)

1
Efct:
2
...parameters...
3
4
Data
Copied!
As with emitters and particles, the Data block (structures) depends on the type of effector, and may not exist.

Binder (Bind)

1
Bind:
2
...parameters...
3
4
PrpS: Start binder properties
5
Prp1: binder properties 1
6
Prp2: binder properties 2
7
PrpG: Goal binder properties
8
9
Data
Copied!
Data is, once again, dependent on the type of binder, and may not exist (structures). Each of the binder properties have this structure.

Texture (Tex)

Texture blocks are simply paths to atex files within the game's internal file structure.

Model (Modl)

The embedded models have 4 possible blocks within them: VNum , VDrw , VEmt, and VIdx . All 4 of the blocks can be in the same model, however VNum and VEmt are always paired, as are VIdx and VDrw .

VIdx

This is a list of 2-byte integers, where each 3 integers represents a triangle in the model. The integers themselves are the indexes of vertices within VDrw .

VDrw

VDrw is a list of vertices, where each vertex is 36 bytes long with the following format:
1
4 2-byte floats: position
2
4 1-byte ints: normal
3
4 1-byte ints: tangent
4
4 1-byte ints: color
5
4 2-byte floats: uv1
6
4 2-byte floats: uv2
Copied!

VEmt

This is a list of 28-byte vertices, with the following format:
1
3 4-byte floats: position
2
3 4-byte floats: normal
3
4 1-byte ints: color
Copied!

VNum

This is a list of 2-byte integers, where each integer corresponds to a vertex in VEmt (so the length of elements in VNum always equals the number in VEmt).

Curves

Curves have the following structure:
1
[Curve Name]:
2
....parameters...
3
4
Keys
Copied!
The name of a curve varies, but some examples are X ,RGB , SclA , etc. They are used to animate motion over time. Keys is a single block which contains the information on the shape of the curve. Every 16 bytes in Keys corresponds to a single keyframe, with the following format:
1
2-byte integer: time
2
2-byte integer: type
3
4-byte float: X
4
4-byte float: Y
5
4-byte float: Z
Copied!
Last modified 10mo ago