Dmxconvert
DMXconvert is a command-line SDK tool which converts DMX files. It can be found in all Source 2013 games, Counter-Strike: Global Offensive Authoring Tools , Left 4 Dead 2 Authoring Tools , Source Filmmaker , as well as in various Source 2 Workshop Tools.
An example usage is: converting regular DMX files using "encoding binary 3 format model 15"
into others, such as plain text "encoding keyvalues2 1 format dmx 15"
.
This new Keyvalues 2 DMX 15 version could then be used in Blender Source Tools advanced Flex properties tab to copy the face flex rules from.
Usage
dmxconvert -i <in file> [-ie <in encoding hint>] [-o <out file>] [-oe <out encoding>] [-of <out format>]
If no output file is specified, dmx to dmx conversion will overwrite the input
: -r argument does a recursive search if the in file specifies wildcards
: -upconvert will auto-check out the files. If -i is not specified, it will operate on all DMX files}}
Supported DMX file encodings:
- keyvalues
- keyvalues2
- keyvalues2_flat
- keyvalues2_noids
- binary
- binary_seqids
- actbusy
- commentary
- entitylayer (not in , )
- vmt
- vmf (not in )
- mks (in all games since )
- tex_source1 (in all games since )
Supported DMX file formats:
- dmx
- movieobjects
- sfm
- sfm_settings (in all games since )
- sfm_session
- sfm_trackgroup
- pcf
- gui
- schema
- preset
- facial_animation
- model
- ved
- mks (in all games since ) (not in )
- vmks
- mp_preprocess
- mp_root
- mp_model
- mp_anim
- mp_physics
- mp_hitbox
- mp_materialgroup
- mp_keyvalues
- mp_eyes
- mp_bonemask
- tex (in all games since ) (not in )
- vtex
- world (in all games since )
- worldnode (in all games since )
- virtualvolumetexture
- vmap
- vanim
- animflags
Simple Drag and Drop bat file
As is the case with many Command-Line only tools, usage might be confusing. So here is a simple Drag and Drop .bat file script which automatically converts whatever DMX you drop into the bat into a Keyvalues 2 DMX 15 version, creating a new DMX file with the _Keyvalues2 suffix.
::Game location that has the DMXconvert you want to use. Just main game folder.
SET Game_path=d:\programme\steam\steamapps\common\left 4 dead 2
::Don't change anything below here
"%Game_path%\bin\dmxconvert.exe" -i %1 -of dmx -oe keyvalues2 -o "%~dpn1_Keyvalues2.dmx"
Converting particles
Porting Particles from new games to old games (Csgo to Hl2) requires you to convert the pcf type.
As example, Counter-Strike: Global Offensive "Binary 5 PCF 2" to Half-Life 2 "Binary 2 PCF 1".
Sparc
It is a unitasker specifically made to convert PCF files. It creates folders with converted files wherever the .exe is located.
However, the drag-and drop bat file is a simpler version, where you can drag a pcf onto it, no matter where it is, and have the pcf be replaced with the version you want.Scalar Random
that old games do not have. In those cases you can try editing the particle to use simillar functions.You must use the new game's DMXConvert to turn the particle to raw text file. (DMX/PCF Keyvalues2)
Once that is done, the old game's DMXConvert can turn that raw text into the desired Binary and PCF version.
Save this bat file on your pc, and set the "dmxconv_from" and "dmxconv_to" values.
Then drag and drop your particle onto this bat file. It will convert to Keyvalues 2, wait five seconds and to convert to Binary 2 PCF 1 and then close automatically.
SET dmxconv_from=F:\Programme\SteamLibrary\steamapps\common\Counter-Strike Global Offensive
SET dmxconv_to=F:\Programme\SteamLibrary\steamapps\common\Half-Life 2
::Don't change anything below here
"%dmxconv_from%\bin\dmxconvert.exe" -i %1 -of pcf -oe keyvalues2
timeout 5
"%dmxconv_to%\bin\dmxconvert.exe" -i %1 -of pcf -oe binary
|