Resource icon

Other Appearance Preset Extractor

Hello! Run into some problems but managed to surpass them.
I installed python 3.11 from official website and tried to run script through shell.
And it`s not worked out. And on one of the try and error windows opened Windows Store with Python 3.10 version. I installed that as well. And script go as intended (without tqdm).

In shell i go by that commands:
cd yourVAMpath
python3 extract_appearance.py "AddonPackages/*.var"

Don`t know exact reason why that happened, probably something with windows not getting path to 3.11 while though Store Installation it got it well.
Writing that for lammers like myself)
 
Hi, I've just tested the 2.0 and all the prior versions from version 1.0 and I have a problem with foreign characters in all of them.

Original file:

y2JQrVS.png


File converted with Preset Extractor:

l7hWdQm.png


Is there a way to address this? VAM can't find the file if it is not in original character set.

I may add that the original JSON file is in UTF-8 format.

Also, versions 1.0 and 1.1 had, in my opinion, better output filename handling than newer versions:

OLD (better):
Preset_A1X.FionaFiona.vap

NEW (confusing):
Preset_A1X.Fiona.2.FionaFiona.vap
 
Last edited:
To prevent the script to mess up the international characters in the output VAP files, just replace this line:

Python:
fp.write(json.dumps(preset, indent=3))
with this line:
Python:
fp.write(json.dumps(preset, indent=3, ensure_ascii=False))
 
Hi, I don't know how to use the --outfit code.

python3 extract_appearance.py "Saves/scene/*.json" "AddonPackages/*.var" --outfit
python3 extract_appearance.py --outfit "Saves/scene/*.json" "AddonPackages/*.var"

running either way give same results. Everything gets exported.
 
Hi, I don't know how to use the --outfit code.

python3 extract_appearance.py "Saves/scene/*.json" "AddonPackages/*.var" --outfit
python3 extract_appearance.py --outfit "Saves/scene/*.json" "AddonPackages/*.var"

running either way give same results. Everything gets exported.

If the outfits are being extracted with --outfit set, it's working as expected. Add --no-appearance to skip appearance extraction. See --help for more info.
 
Thanks. It was a case of not understanding a few things. Found the correct folder for clothes.
If the outfits are being extracted with --outfit set, it's working as expected. Add --no-appearance to skip appearance extraction. See --help for more info.
 
1. be sure to have pthon installed
2. copy the downloaded code and paste it in a blank file in your root VAM folder, and name it "extract_appearance.py"
3. open a powershell and type:
cd "your_VAM_directory"
py .\ extract_appearance.py "AddonPackages/*.var

you'll find a folder named "extracted" in custom/atom/person/apparences withn the looks of the scenes in addonpackages.
hope this helps

Not at all familiar with any of this. What happens with the carriage return between the cd and the py line? Do I hit "enter" there? I tried that and nothing happened after typing in the second line.

For instance, one error was:

Code:
py : The term 'py' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ py .\ extract_appearance.py "AddonPackages/*.var"
+ ~~
    + CategoryInfo          : ObjectNotFound: (py:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Another was:

Code:
Suggestion [3,General]: The command extract_appearance.py was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\extract_appearance.py". See "get-help about_Command_Precedence" for more details.
PS D:\VaM_Updater> .\ extract_appearance.py AddonPackages/*.var
 
Last edited:
Not at all familiar with any of this. What happens with the carriage return between the cd and the py line? Do I hit "enter" there? I tried that and nothing happened after typing in the second line.

There is an error in the instruction:

3. open a powershell and type:​
cd "your_VAM_directory"​
py .\ extract_appearance.py "AddonPackages/*.var​

You do NOT open PowerShell. You just open a command line in Windows (with admin rights). Make sure you have Python installed. Then, in command line, you just go to where you have your VARS installed with

cd "your_VAM_directory"​

and then:

python .\extract_appearance.py *.var​
or
python3 .\extract_appearance.py *.var​
Of course make sure your script name is extract_appearance.py. If it is different, the command is going to look different.
 
There is an error in the instruction:

3. open a powershell and type:​
cd "your_VAM_directory"​
py .\ extract_appearance.py "AddonPackages/*.var​

You do NOT open PowerShell. You just open a command line in Windows (with admin rights). Make sure you have Python installed. Then, in command line, you just go to where you have your VARS installed with

cd "your_VAM_directory"​

and then:

python .\extract_appearance.py *.var​
or
python3 .\extract_appearance.py *.var​
Of course make sure your script name is extract_appearance.py. If it is different, the command is going to look different.

For folks who, like me, didn't know, you need to use cd d\ if your vam directory is on a different drive. Other than that, this worked. Thanks for the help. This script is amazing. Took me about 5 minutes to make about 2,500 appearance presets for looks from all my favorite creators. Normally it would take about that long to open and create presets for 2-3 looks.
 
Wonderful Script. Took me about 30 min of youtube vids / reading the how to but got it working. Thank you
 
Do you think there an easy way to take a screenshot every time a look is loaded?

It would be very helpful to find which models are missing really needed dependencies.
 
I ran into an error that when googled said something about invalid characters. Anyone know a workaround?
 
Back
Top Bottom