Visual Effect File
Applies to:
BG2, BG2: ToB
General Description
Visual effects allow you to group other visual effects, animations, and sounds together and specify the timing with which each component plays. This is powerful in the sense that you can create a whole visual effect display with these files. VEF files can be used with the actions CreateVisualEffect(S:Object*,P:Location*) and CreateVisualEffectObject(S:Object*,O:Target*), and in effect opcode 215 (Graphics: Play 3D Effect).
Detailed Description
Header
The header is fixed at 0x18 bytes.
Offset Size (data type) Description
0x0000 4 (char array) Signature ('VEF ')
0x0004 4 (char array) Version ('')
No version is specified.
0x0008 4 (dword) Offset to visual effect components 1
0x000c 4 (dword) Number of visual effect components 1
0x0010 4 (dword) Offset to visual effect components 2
0x0014 4 (dword) Number of visual effect components 2
Note that regardless of which array the visual effect component is in, it is treated the same.
Visual effect components
Visual components can be VEF, VVC, BAM, or WAV. Support for VEF means that you can actually nest components within each other. Each visual effect entry has a fixed size of 0xe0 bytes. It is advisable not to use looping components because this will accumulate visual effect components and cause the game to grind to a halt.
Offset Size (data type) Description
0x0000 4 (dword) Ticks until start
How long (in AI updates) does the visual effect run before this component begins.
0x0004 4 (dword) Unused
0x0008 4 (dword) Ticks until loop
How long (in AI updates) does it take to run this component again. It is advisable to make sure this value is greater than the duration of the component, otherwise this component will accumulate and cause the game to grind to a halt.
0x000c 4 (dword) Resource type
Specifies the type of resource to load. If the first type does not exist, will try the next type, and so on.
0 = WAV
1 = VVC, then BAM
2 = VEF, then VVC, then BAM (also sends CMessage)
0x0010 8 (resref) Resource name
0x0018 4 (dword) Continuous cycles
Boolean. If set, will set the continuous cycles value for the component. Only applicable when the resource type is 1.
0x001c 124 (bytes) Unused
Unmarshalled but not used.
Edited by Ascension64, 16 June 2010 - 02:54 PM.














