Jump to content

Discovering the secrets of the VEF file format


Recommended Posts

As the title implies, I'm trying to find out more about the obscure VEF file format. The description of the newly discovered IE file format (here and there) is somewhat vague or possibly inaccurate in some points.


For that reason I have put together a simple mini mod which executes a single VEF sequence on command. It doesn't modify existing game resources, so it is compatible with any mod that is already installed on your system. You also don't need to start a new game for it. The mod can be uninstalled afterwards without any trouble.


If you want to test it out, please tell me how the triggered animation sequence looks like. If everything goes well, there should be no overlappings or gaps between the animation segments.


Updated link to the mod: VEFTest.zip

Link to comment

Wonderful !!! ;)


I am playing with Wait() and SmallWait() actions to get the same result as you in my scripts and it is the pain in the ....

Without any waranty of success.


I was wondering if you could just write a few lines to explain how you did it : as there is no way of editing the vef files, I guess you used hex...

And I really don't know anything about it...


Any help and how-to would be welcome as you found a revolutionary way to code animations and play different sequences fluently.


Great job indeed ! :)

Link to comment

For the moment you have to use a hex editor to put your VEFs together. I have already submitted a patch to Wisp's fork of Near Infinity which provides VEF support. However, I don't know when he will publish an official version.


I haven't covered everything one can know about the format yet, but it is basically a way to trigger different sound or visual effect resources sequentially, using 'ticks' as a way to define a delay. A tick appears to be 1/30th of a second, so it is possible to delay the effects more accurate than in scripts (an AI update is only 1/15th of a second). You can trigger VEFs in spells too by using effect opcode #215 (Play 3D Effect), but it is limited to fixed locations only (i.e. param2=1 doesn't work).


I'll think about writing a short tutorial on how to use VEFs, but I will do it only after Near Infinity with VEF support has been released. Using a hex editor for everything is just too tedious.

Link to comment

Frame is much better indeed, since everyone is using ticks as the base time unit as animations rarely come up. The IESDP definition looks ok, though note that not all games have 6 second rounds — pst uses 5s, iwds 7s.

Link to comment

Great thanks for your tuto, Argent ! :)


It will spare me a lot af time of scripting to make transitions between 2 or more vvc files smoother and more fluent, and avoid me to make little fixes to my new bam files (add or remove a few frames) !

Link to comment

I've got another question regarding the BG:EE version of the game. Does it support the VEF format as well?

We are almost sure it is. By the way, IWD2 also supports vef/vvc/eff only .pro is missing.

Btw, I'm working on dltcep support.

Link to comment

@Gwendolyne: Thanks for the praise. And don't forget to share your knowledge if you find out something new. :)


@Avenger: That's good to hear! Creating new VEFs from scratch is the only issue that has to be solved yet.


VEF support in IWD2 sounds interesting, I've never coded for IWD2 however, so I can't help much in that regard.

Link to comment

There probably isn't much to add about the VEF file format.

The unused 0x4 in the Visual Effect extended header is supposed to be flags, but I don't think any of the flags are used. The Continuous Cycles at 0x18 of the same header is supposed to be 'special flags', but it doesn't like any other flags is used except continuous cycles. The larger unused segment is all padding.

Link to comment

Of course I will ! ;)


For the moment, I am just testing how to use them in trigger scripts.

Once I get used to them, I will test them with spells, even if I read that tou mentionned there are restrictions to use them with the 215 effect...

Link to comment


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

  • Create New...