vpk.exe batch file samples (superfluous)
1 Attachment(s)
Response File
vpk a <vpkfile> @<filename>
Add files listed in a response file.
Response file filename.txt construct Code:
This\source\address\to\file\is\the\same\destination\address into\VPK\filename.vtf
...game/custom/vpk_tool_@response_file.bat
Drag & drop "mod" folder onto batch file: It collects certain files from certain folders inside "mod" and adds them in response file @<modfoldername>.txt materials=*.vmt;*.vtf models=*.mdl;*.phy;*.ani;*.vtx;*.vvd sound=*.wav;*.mp3 particles=*.pcf;*.txt scripts=*.res;*.txt classes=*.res shaders=*.vcs - If batch file locate in right place (custom folder) and it find vpk.exe tool, it start create VPK by response file. VPK files are created actually inside "mod" folder and batch file copy all vpk files from there to custom folder. This add and update files inside previous VPK build, not remove files from VPK. If you want remove some files from previous VPK, go delete manually VPK files inside "mod" folder. - If you have both "key" files inside custom folder with base name "my", batch start sign your VPK - If previous response file found, it rename that file before new one with timestamp [email protected] (you can delete those old files) Code: PHP Code:
Keyvalues Control File
vpk k <vpkfile> <keyvalues_filename>
Add files listed in a keyvalues control file.
keyvalues control file keyvalues_filename.txt construct Code:
"source\address\to\file.vtf"
...game/custom/vpk_tool_keyvalues_file.bat
Drag & drop "mod" folder onto batch file: It collects certain files from certain folders inside "mod" and adds them in keyvalues control file <modfoldername>.kv.txt materials=*.vmt;*.vtf models=*.mdl;*.phy;*.ani;*.vtx;*.vvd sound=*.wav;*.mp3 particles=*.pcf;*.txt scripts=*.res;*.txt classes=*.res shaders=*.vcs - If batch file locate in right place (custom folder) and it find vpk.exe tool, it start create VPK by KV file. This add and update files inside previous VPK build, not remove files from VPK. If you want remove some files from previous VPK, delete manually VPK files. - If you have both "key" files inside custom folder with base name "my", batch start sign your VPK - If previous KV file found, it rename that file before new one with timestamp 20133004-135658mod.kv.txt (you can delete those old files) Code: PHP Code:
-P Use SteamPipe-friendly incremental build algorithm. You more likely not need ever use this method. This is for heavy users. (I think)
vpk -P k <vpkfile> <keyvalues_filename>
Use SteamPipe-friendly incremental build algorithm.
Use with 'k' command. For optimal incremental build performance, the control file used for the previous build should exist and be named the same as the input control file, with '.bak' appended, and each file entry should have an 'md5' value. The 'md5' field need not be the actual MD5 of the file contents, it is just a unique identifier that will be compared to determine if the file contents has changed between builds. This option implies -M keyvalues control file keyvalues_filename.txt construct and previous VPK build keyvalues_filename.txt.bak Code:
"source\address\to\file.vtf"
...game/custom/vpk_tool_-P_keyvalues_file.bat
Download program http://sourceforge.net/projects/swis...wissfileknife/ and rename it sfk.exe and place in custom folder to get files MD5 checksum. This SteamPipe-friendly incremental method is more likely to heavy users who have BIG project and VPK file (100MB or over)! Let's say your mod size is 130MB and we chop it to 10MB size VPK files pieces (-c 10), just for that players not need download whole 130MB VPK everytime when it is updated. When in your project have a tiny change in just one file, MD5 checksum helps update your VPK's if file size not differs. Then vpk.exe update just one of those VPK's files where your change have made. Players now need only download 10MB update instead 130MB :bee: To upload/update players VPKs files is whole different story, I don't know how to do that. Ask from Valve/Steam. Batch create KV file list files inside mod folder and create new VPK when previous not exist. And rename kv file after packing to mod.kv.txt.bak file. <- Remember keep this file with same VPK file. Next time you pack this same mod and you have previous build VPK file and BAK file. It check and compare KV files and make updates if have to. Batch throw old bak file inside OLDKVFILE folder with timestamp and rename new KV file to BAK which match now your current VPK file. PHP Code:
|
Re: vpk.exe batch file samples (superfluous)
Very nice.
|
Re: vpk.exe batch file samples (superfluous)
Some C++ developer could make a moar simple program to do these same things.
I start hate batch files ^^, annoying |
Re: vpk.exe batch file samples (superfluous)
would be nice if servers could allow clients to download and load vpks if they are signed and trusted by said server.
Guess this won't be supported since valve doesn't flush models/materials in memory once it's loaded, so if you go from one server to another, and something is in the same path, it won't know what to do with itself. |
| All times are GMT -4. The time now is 18:29. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.