How does it resolve dependencies? Does it first grab raw assets or does it try to find the dependent vars first and unpack from those? Also, how does it deal with recursive dependencies? Like VAR A depends on VAR B which depends on VAR C. Does all the content from VAR A, B, and C get unpacked into the target VAM folder?
Would you be able to provide the same function, except with keeping the VAR files intact?
OK - first: it doesn't fix VAR dependencies. The first two Vamifiers did, but since I got wise that VARs are shit and don't do anything good - it doesn't. So if you're asking about VARs - the code is commented out, might be brought back, but I really don't think VARs are worth it. They're basically a waste of your disk space. But talking about recursive dependencies - it didn't matter, as Vamifier just went through all the VARs, didn't follow dependencies manifest. But again - VARs are fundamentally broken concept, they create more problems than they solve.
What Vamifier does it puts single instance of EACH component: morphs, hair, clothes (including their textures, presets, etc - anything mentioned in their JSON files) into a "cleaned" dir and then resolves dependencies in scene, json or vap file using ONLY those cleaned components, using various tricks, so i.e. if there was a look with very common faceD.jpg (you have many of them, and there's a chance that each one is different), it will query the db for this exact file by its path, obtain its hash and check if a file with such hash was already "cleaned", if not - this one will be copied over and marked to cleaned and used when same hash will be ever reqired. It never extracts any VARs, if it requires a file from a VAR, it just extracts the single file into cleaned dir. So your VAR files are indeed intact. Vamifier doesn't touch anything in your "source" directory, only writes to "cleaned".