Jump to content

VVC files


devSin

Recommended Posts

To avoid the wrath of igi:

 

It is possible to have three animations in a VVC, but it doesn't work as any sane person would expect. The value at offset 0x90 can be set to any animation existing in the referenced BAM, but the effects will vary: for duration animations, that play for a specified duration (think Blade Barrier, Fire Shield, or Spell Turning), this value appears to be ignored entirely (only the intro at offset 0x68, and the duration at offset 0x6c animations will be played). For most single-shot animations, the outro animation at offset 0x90 will be played, but it will play simultaneously with the duration animation at offset 0x68. In these cases, the duration animation has precedence, and will be drawn on top of the outro animation (leading to the rough formula that only n frames of the outro animation will play, where "n" is the number of frames of the outro animation minus the number of frames of the duration animation). So, it is possible that the outro animation does indeed play for VVCs with a specified duration, but the outro does not loop and is never actually visible.

 

BioWare attempted to use this in a few places (the Globe of Blades animation and the Project Image animation), but it only really works in the Project Image animation (SPPROIMG.VVC), where it appears entirely unnecessary (it could have just been done with two animations). There are also references to sound effects at offset 0x94 in a couple VVCs (the unused Comet explosion VVCs SPCOMEX1 and SPCOMEX2), so it is possible that you can specify a different sound effect for the third animation (this remains untested, however).

Link to comment

If 0x90 is a BAM resref, then it would overlap 0x94 which is allegedly a sound resref.

Hmm, please clarify the offsets.

Maybe something like this:

 

0x0078 8 (resref) resref to the WAVC file (usually from SFXSound.bif in BG2) - s

ound of starting sequences of animation

0x0080 8 (resref) resref to the WAVC file (usually from SFXSound.bif in BG2) - s

ound of animation in its duration

..

.. your data comes here...

Link to comment

The offset at 0x90 is an animation number, not a resref. As far as I know, there is no way to reference multiple BAM files from one VVC (BioWare never tried to do this anywhere in the existing game data files, so I imagine it's impossible).

Link to comment

You are right. Ok, the second question, how does the engine know if the value at 0x90 is a cycle number?

Is it normally 0xffff ?

Sorry, i'm lazy to check myself :bday:

 

I think the looping of the 3rd animation sequence could still be controlled in the sequence flags (0x20). I guess that is where you enable 3rd the sequence as well.

Now that i know what to look for, i'll add these fields to DLTCEP to help research.

Link to comment

I tried a bunch of values for the flags 0x20, with no difference in how the 3rd sequence is handled. It always plays for non-duration animations, and doesn't play (or isn't visible - I suspect that it plays but doesn't loop) for duration animations.

 

Everything after the duration (2nd) sound reference is usually NUL. In ToB, however, they sometimes have 1 for the first sequence, 0 for the second, and 2 for the 3rd sequence (at 0x90). In all these cases, the BAM referenced only has a single animation, so it looks like the game just ignores any invalid animation numbers.

 

It is possible that the engine iterates through each sequentially (if valid 1 -> if valid 2 -> if valid 3), or just looks for a non-null value at 0x90.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...