If you don't use vpk source has to spam operating system calls for every individual file. Every time the file is needed. Vpks load 1 time at startup. So if you just mod a few things using files is ok. But if you change a lot of things then vpk is best as it will free up some system resources.
Wait what? It won't keep the standard file open while in use? I know steam does that to vpk's even after empires is closed the VPK's remain locked and open by steam until you close steam itself not just the game.
so... C:\Program Files (x86)\Steam\SteamApps\common\Empires\hl2\*.vpk I can delete all that and not worry then? You are probably right about the GCF locking. I think I discovered that when I was testing what GCF's meant what error code when trying to get empires to start.
Oh Jesus fuck no, don't delete those. I was referring to the Empires-specific content; those VPKs contain the Source SDK 2013 assets. Anyway, the only major benefits to VPKs are organization and faster loading times. I'm not going to pack any of the Empires stuff into VPKs because the build process is *still* fucked up from the port and the decrease in load times would be negligible. Finally, Source doesn't keep file handles open for every damn file because there's this magical thing called a cache where it stores what it needs. You couldn't possibly have thought that the game loads a texture from disk and drops it right into the VRAM for every single surface that needs it. The initial load from a VPK is faster for a given file, but after that it's all RAM.
Ok, I get that your not going to pack empire's things into vpk's but, are you willing to add support to add custom content via VPK (or zip) or is that something that is already possible via editing the gameinfo.txt to look for it?
Source engine materials and models are stored in thousands of small files and it would be expensive to continuously open and close these files. The solution was the conception of the VPK file format which is used to store Left 4 Dead materials, models and particles in a handful of files which can be quickly accessed. https://developer.valvesoftware.com/wiki/VPK_File_Format
while you are at it, wheres all the textures i see in hammer? i know where the empires ones are, but the other ones? i dont have hl2 or lostcoast or whatever installed, yet i have those textures, where are they?
Hl2 vpks sdk vpks If you play any source game you get the basic materials. Installing sdk tools /hammer gives you the basic materials.
i dont have hl2 installed where are they? edit: well let me word it differently, theres hl2_textures##.vpks in a folder <SteamLibrary>\SteamApps\common\Empires\hl2 i use hammer out of the ..\bin folder. they are several hundred mb in explorer but in gfcscape they show no content.
Jesus, finally in front of a proper computer so I can type properly. It's not something I'd have to add support for because anything that involves content and File IO is entirely within and controlled by the engine (Literally, everything. At best, I can tell the game to precache some things and give it a few paths to save/find certain files like spray materials.) You might have to add something like |gameinfopath|/custom/<whateverthefuckyoucallyourfolder/vpkhere> to gameinfo.txt, but as far as I know, it's entirely plug 'n' play. Part of the port involved distributing the entire Source SDK 2013 Base (A.K.A. Source MP) with Empires (which caused fun times with the directory structure of the actual game no longer being a simple copy of the directory structure of the SVN.) The folder with Empires-specific content is steamapps/common/Empires/empires, but all the other subfolders in steamapps/common/Empires contain the Source 2013 content. If I remember correctly, there should be the hl2, hl2mp, platform and sourcetest folders that each contain the VPKs; a thorough list of everywhere Empires accesses to retrieve content is in your gameinfo.txt file. You need to hope the VPKs that end in "dir" and not in a number; those ones that end in "dir" contain the directory structure (because it's faster to parse a directory structure than actual directories) and the other ones contain the actual content. Finally, it really doesn't matter if you distribute custom content as a .vpk or as a .zip or something else that someone extracts and drops it. Admittedly, it's easier to distribute content with a .vpk because it's much more drag 'n' drop than even a .zip, but we're talking about the most miniscule gains in loading times here by using a .vpk over loose files unless you're considering of making a mod that overwrites every single bit of content that's already in Empires because the engine looks in the custom folder first and it'd load it from a .vpk if it's there. But because Empires doesn't use .vpk files at all for custom content, you're literally just replacing loose files with loose files = no reduction in loading times for using custom content. However, overwriting the Source MP content with loose files *will* increase loading times because then it loads from loose files over .vpks.
you have to open the ones called ***_dir.vpk They are the ones that contain the directory structure so to speak that show the contents of the rest of the similarly named files. hl2_sound_misc_000.vpk hl2_sound_misc_001.vpk hl2_sound_misc_002.vpk hl2_sound_misc_dir.vpk <-- open this to read the sound files
This is cool... next question. Is there a way to define load order of VPks other then adding an entry for each VPK in gameinfo.txt?
Nope, if I remember correctly. If you have any questions about how it's done, really, the best place to check is the gameinfo.txt file. However I did it in there is either the best way to do it, or the only way to do it, because I spent like two months learning everything I could about how that damn file and content mounting works.
Hmm we could create a sort of mod order loader. That edits the gameinfo.txt to create a load order if its possible to order it that way. Thus it wouldn't be necessary to manually edit the silly confusing gameinfo.txt file.
When you run the game it should check for vpks and auto add them to the gameinfo.txt They all load and if there is a conflict the official one would load so what do you mean by change the order? If you mean having like 2 different huds that wouldn't work unless Candles coded it. Or you scripted it. Be a little easier if a certain coder would add lua support into empires. Lua is perfect for that.
load order as in... if two vpk's had the same sound/gfx/vehicle/weapon to change, the one loaded last would always override it (as far as load ordered things generally go). If you wanted one of the others to load last you would have to find it and move it in the list. This way you can mix VPK's without having to grab some items out of one and make a new one.
alright thanks - i figured out the issue, i had gcfscape 1.82 installed, updated to 1.85 and now i can see content in the *_dir.vpks