EDIT - Fixed jar
You must be registered to see the links
INSTRUCTIONS
OK. So about my VAM cleaning tool. Its main purpose is to fix missing references in such fields:
"url", "uid", "id", "assetUrl", "presetFilePath", "storePath",
"faceGlossUrl", "torsoGlossUrl", "limbsGlossUrl", "genitalsGlossUrl",
"faceSpecularUrl", "torsoSpecularUrl", "limbsSpecularUrl", "genitalsSpecularUrl",
"faceNormalUrl", "torsoNormalUrl", "limbsNormalUrl", "genitalsNormalUrl",
"faceDiffuseUrl", "torsoDiffuseUrl", "limbsDiffuseUrl", "genitalsDiffuseUrl",
"faceDecalUrl", "torsoDecalUrl", "limbsDecalUrl", "genitalDecalUrl",
"customTexture_MainTex", "customTexture_SpecTex", "customTexture_GlossTex",
"customTexture_AlphaTex", "customTexture_BumpMap", "customTexture_DecalTex"
inside files with following extensions:
"json", "vap", "vaj", "vmi", "vam"
It does this by indexing and hashing files with following extensions:
"cs",
"cslist",
"jpg",
"jpeg",
"dll",
"png",
"tif",
"tiff",
"vmb",
"vap",
"vaj",
"vmi",
"vam",
"vac",
"assetbundle",
"mp3",
"wav",
"ogg",
"json"
It does this for all files inside your VAM instalation, including files inside VARs.
How to use it?
Vamifier is able to fix missing dependencies by copying from a second directory you put aside. It has to have the same structure as main VAM directory. I call it the "repo".
To start the script, be sure you have java available from your command line and run:
java -jar vamifier.jar [options - see below]
On first run it will pop a requester to get root path of your game and then the repo directory. Navigate into the directories that contains "Custom", "Saves" and "Addon Packages". Going through all saves, customs and VARs takes A LOT. So be patient.
I did all my best to ensure no file is touched unless you use this option:
"--write" description = "SWITCH: Commit changes - without this option no changes will be made to your VAM"
but there's a tiny-small chance I've overlooked something, so be warned.
"-rd", "--refresh-db" description = "DATABASE: Force rescan of VAM directory" - when you added content to your main directory
"-rr", "--refresh-repo" description = "DATABASE: Force rescan of repository directory"
"-a", "--fix-all" description = "FIXES: Run all possible fixes" - below
"-s", "--fix-siblings" description = "FIXES: Fix missing vmb-vmi or vab-vaj-vam (or delete them if unfixable!)" - I had a lot of orphan vmb or vmi files. They don't work alone, so they are either fixed or deleted.
"-r", "--fix-save-refs" description = "FIXES: Point missing references in saves to existing files" - Fix refs in loose files inside "Custom" and "Saves" directories.
"-rv", "--fix-var-refs" description = "FIXES: Point missing references in packages (VAR) to dependant packages or loose files" - Fix refs inside VARs
"-dd", "--deduplicate" description = "FIXES: Remove duplicates (by MD5), run fix refs when done" - not doing anything yet
"-cr", "--clean-repo" description = "FIXES: Remove repo files that are present in main game dir" - why clutter your disk, you don't need two copies!
"-t", "--autoimport-textures" description = "FIXES: Create auto-importable textures (interactive)" - this is a little helper for renaming textures to be auto-importable. It tries to make some educated guesses about what name it should choose, but asks for user input when nothing works.
"-lm", "--list-mocaps" description = "INFO: List modules with mocaps"
"-ls", "--list-scripts" description = "INFO: List scripts"
Note: Because the script works by pointing missing references to existing files of the same name, there's a chance it will point a ref to wrong file in case there's a lot of files with the exact name (think about torsoD.jpg). I'm in the course of fixing it by marking files with same name and different hash as "ambigious". But currently it's too slow to use.
The script will dump a CSV log to its directory, so if you want to give it a try, just run:
java -jar vamifier.jar --fix-all
It won't touch your files, but everything it WOULD do if you append "--write" option will be shown. You can filter the log by the first column.