-
Notifications
You must be signed in to change notification settings - Fork 15
VDM tutorial
VDM files are files which control the playback flow of a demo file. In a VDM file you can specify commands to be executed at specific moments of a certain demo file, and they will be executed every time you play that file.
The nature of the files makes it so that you can specify, for example, that the demo file should jump to a certain tick when it begins playback and start recording from there, only to stop at another tick, and then jump to yet another tick and repeat the process. Not only that, it is also possible to start playing a different demo from the first one. You can see how that is beneficial to movie makers, since it gives them the power to partially automate their workflow.
Well, first, you have to know how to create them. It can be done by hand, but they can be a little hard to understand and it's a very tedious process. The TF2 demoui comes with an editor that allows you to create and customize VDM files for a certain demo. It's really complete, but if you only want to record a set of clips, it can be also tedious and kind of complicated. That's where lawena comes in and saves the day:
Since version 3.0 lawena comes with a VDM file generator. It's located in a separate tab from the main settings, as can be seen here:
When you click the 'Browse...' button, you will be prompted to select one of the .dem
files in your tf
directory. Once you have done that, you just have to write a start and an end tick for the clip you wish to record, press 'Add' and the range will be added to the list. If you wish to record more clips from the same demo, just write different tick ranges and press 'Add'. Once you are done with that demo, you can simply select another one by pressing 'Browse...' and add tick ranges for the new demo. The list should look something like this:
Once you're done, you simply press 'Create VDM files', and the files will be generated for you. The good thing is that the files are linked together by playdemo
commands at the end, so now all you have to do is start TF2 through lawena, play the first demo in the list and voilá, all the clips from all the demos in the list will be recorded automatically with no downtime in between (the VDM files are made so every time a clip finishes recording, it skips to the next clip's first tick immediately). You can simply go take a walk and when you come back, all your clips will be recorded :D
Keep in mind that a VDM file with the same name as a .dem
file will be executed every time you play that demo, so with that in mind, I added a 'Clear VDM files' button to delete all VDM files in your tf
folder.
We designed this with the intent of making all video makers' life a lot easier, and really hope you use it and it works that way for you, because VDM files have saved us tons of times, and that was before lawena generated them automatically.