This is a bulk VMAT Maker
As with any scripts grabbed from the internet, make sure to backup your texture files before running this, in the event anything goes wrong
Place the powershell script in your materials/foldername/ folder, alongside your texture files
The texture files must be named with sbox's preferred suffixes (_color, _rough, _selfillum, _metal, _trans)
The powershell script will search for texture files with the _color suffix
Once it finds something with that suffix it scans for other texture files with the same name, but with the additional suffixes
The vmat output will include all extra maps that are found
tl;dr: If the script finds texture_brick_color.png it will search for the _rough, _selfillum, _metal , and _trans suffixed texture files
if it finds them it will add them to the vmat in the appropriate place with default settings
Place this script file into your materials/basetexturefiles/ folder alongside your texture files
Run the script
The options are outlined below
This will create a VMAT file for every image file in the basetexturefiles folder
It create a vmat with the complex shader and uses the image file(s) for the "color" option
This will create VMAT files with color, metalness, normal, and metalness
This option expects all texture files to be the same file format
This option also expects the files to be named per the specifications of sbox (texturename_color, texturename_metal, texturename_normal, texturename_rough)
This option scans your vmat files and checks for vmat_c files
If it doesn't find a vmat_c file corresponding with the vmat file it will remove the vmat file
This option is mainly for cleaning up any unused materials from the final folder
Closes the script
This script has some basic error handling that should prevent it from running wild and going through multiple operations at once.