|
@echo off |
|
setlocal EnableDelayedExpansion |
|
@REM Author : GlaiveÐ |
|
@REM Discord : GlaiveÐ@8813 (replace `@` by `#`) |
|
@REM Github : Glaived |
|
@REM Source : https://gist.github.com/Glaived/8c5bad5d53542c146a8ff5febaa19a67 |
|
|
|
@REM PARAMETERS |
|
|
|
@REM you can change the path of each executable |
|
@REM DON'T FORGET TO ALWAYS SURROUND THE PATH WITH THE CHARACTER " |
|
|
|
@REM Path to xor.exe |
|
set path[0]="xor.exe" |
|
|
|
@REM Path to 7z.exe (7-Zip) |
|
set path[1]="7-Zip\7z.exe" |
|
|
|
@REM Path to quickbms.exe |
|
set path[2]="quickbms\quickbms.exe" |
|
|
|
@REM Path to fmod_extr.exe (fmod_extractors) |
|
@REM if you use a relative path, you must go back two folders upstream |
|
@REM e.g. : ..\..\fmod_extractors\fmod_extr.exe |
|
set path[3]="..\..\fmod_extractors\fmod_extr.exe" |
|
|
|
@REM Path to convert.exe (ImageMagick) |
|
set path[4]="ImageMagick\convert.exe" |
|
|
|
@REM For the OPT10 |
|
set ext1=(.adf .anim .cam .cut .gfx .hkt .jdf .model .model_data .pvr .shaderlib .swf) |
|
set ext2=(.vcolmesh .vlg .vmesh .vpfx .vprefab .vres .vscene .vshaderbin .vTransition .vzone .xml .zone) |
|
|
|
@REM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
|
@REM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DO NOT MODIFY ANYTHING BELOW !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
|
@REM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
|
|
|
if not exist "vFiles\" MD vFiles |
|
if not exist "ExtractedFiles\" MD ExtractedFiles |
|
|
|
goto menu |
|
|
|
@REM Deletes all the contents of the ExtractedFiles folder |
|
@REM Deletes all the contents of the vFiles folder except for the direct children of vFiles |
|
@REM e.g. : vFiles\data00.v is NOT deleted |
|
@REM vFiles\folder\file.txt is deleted |
|
@REM vFiles\folder\ is deleted |
|
:opt9 |
|
CLS |
|
echo. |
|
echo Deletes all the contents of the ExtractedFiles folder... |
|
echo. |
|
|
|
DEL /s /q ExtractedFiles\* > nul 2>&1 |
|
for /d %%f in (ExtractedFiles\*) do RD /s /q "%%f" > nul 2>&1 |
|
|
|
CLS |
|
echo. |
|
echo Deletes all the contents of the vFiles folder except for the direct children of vFiles... |
|
echo. |
|
|
|
for /d %%f in (vFiles\*) do DEL /s /q "%%f\*" > nul 2>&1 |
|
for /d %%d in (vFiles\*) do RD /s /q "%%d" > nul 2>&1 |
|
goto end |
|
|
|
@REM Deletes all files with the specific extension |
|
:opt10 |
|
for %%f in %ext1% do ( |
|
CLS |
|
echo. |
|
echo Deletes all %%f files... |
|
echo. |
|
echo This task may take a while... please wait... |
|
echo. |
|
|
|
DEL /s /q ExtractedFiles\*%%f > nul 2>&1 |
|
) |
|
for %%f in %ext2% do ( |
|
CLS |
|
echo. |
|
echo Deletes all %%f files... |
|
echo. |
|
echo This task may take a while... please wait... |
|
echo. |
|
|
|
DEL /s /q ExtractedFiles\*%%f > nul 2>&1 |
|
) |
|
goto end |
|
|
|
@REM Deletes all empty folders in vFiles and ExtractedFiles |
|
:opt11 |
|
CLS |
|
echo. |
|
echo Deletes all empty folders in vFiles... |
|
echo. |
|
for /f "delims=" %%d in ('dir vFiles /s /b /ad ^| sort /r') do RD "%%d" > nul 2>&1 |
|
|
|
CLS |
|
echo. |
|
echo Deletes all empty folders in ExtractedFiles... |
|
echo. |
|
for /f "delims=" %%d in ('dir ExtractedFiles /s /b /ad ^| sort /r') do RD "%%d" > nul 2>&1 |
|
goto end |
|
|
|
@REM Convert all .dds files to .png files |
|
:opt12 |
|
for /f "delims=" %%f in ('dir /s /b *.dds') do ( |
|
CLS |
|
echo. |
|
echo Convert all .dds files to .png files... |
|
echo. |
|
echo This task may take a while... please wait... |
|
echo. |
|
echo %%~nxf |
|
|
|
%path[4]% "%%f" "%%~dpnf.png" |
|
) |
|
goto end |
|
|
|
:menu |
|
CLS |
|
set userChoice1=2 |
|
echo. |
|
echo Choose an option |
|
echo. |
|
echo PRESETS |
|
echo. |
|
echo 1. Extract all files |
|
echo Option: 4, 5, 6, 7, 8 |
|
echo 2. Extract all files (textures, 3D models, icons...) but not audio files |
|
echo Option: 4, 5, 6 |
|
echo 3. Extract only audio files |
|
echo Option: 7, 8 |
|
echo. |
|
echo TASKS |
|
echo. |
|
echo 4. Converts all .v files to .zip files (this task may take a while) |
|
echo 5. Extracts all .zip files to the ExtractedFiles folder (this task may take a while) |
|
echo 6. Delete all .zip files |
|
echo 7. Converts all .vArc files to .fsb files (this task may take a while) |
|
echo 8. Converts all .fsb files to .wav files (this task may take a while) |
|
echo. |
|
echo 9. Deletes all the contents of the ExtractedFiles folder |
|
echo AND deletes all the contents of the vFiles folder except for the direct children of vFiles |
|
echo e.g. : vFiles\data00.v is NOT deleted |
|
echo 10. Deletes all files with the following extension : (this task may take a while) |
|
echo %ext1% |
|
echo %ext2% |
|
echo 11. Deletes all empty folders in vFiles and ExtractedFiles |
|
echo 12. Convert all .dds files to .png files (this task may take a while) |
|
echo. |
|
echo Press Q to exit this program |
|
echo. |
|
echo. |
|
set /p userChoice1=What do you want to do ? (default: 2) : |
|
echo. |
|
if /i '%userChoice1%'=='' set userChoice1=2 |
|
|
|
if /i '%userChoice1%'=='1' goto warning |
|
if /i '%userChoice1%'=='2' goto opt4 |
|
if /i '%userChoice1%'=='3' goto warning |
|
if /i '%userChoice1%'=='4' goto opt4 |
|
if /i '%userChoice1%'=='5' goto opt5 |
|
if /i '%userChoice1%'=='6' goto opt6 |
|
if /i '%userChoice1%'=='7' goto warning |
|
if /i '%userChoice1%'=='8' goto warning |
|
if /i '%userChoice1%'=='9' goto opt9 |
|
if /i '%userChoice1%'=='10' goto warning |
|
if /i '%userChoice1%'=='11' goto opt11 |
|
if /i '%userChoice1%'=='12' goto warning |
|
if /i '%userChoice1%'=='e' goto quit |
|
if /i '%userChoice1%'=='q' goto quit |
|
if /i '%userChoice1%'=='quit' goto quit |
|
if /i '%userChoice1%'=='exit' goto quit |
|
if /i '%userChoice1%'=='0' goto quit |
|
goto menu |
|
|
|
:warning |
|
CLS |
|
echo. |
|
echo. |
|
echo. |
|
echo WARNING ^^! |
|
echo. |
|
echo THIS OPERATION CAN TAKE A LOT OF TIME ^^! |
|
echo THIS OPERATION CAN TAKE A LOT OF DISK SPACE IN THE CASE OF THE OPTION : |
|
echo 1, 3, 8, 12 |
|
echo. |
|
echo Your option : %userChoice1% |
|
echo. |
|
echo. |
|
echo. |
|
|
|
set userChoice2=n |
|
|
|
set /p userChoice2=Do you want to continue ? [y/N] : |
|
echo. |
|
if /i '%userChoice2%'=='y' (set userChoice2=n) else (goto menu) |
|
|
|
set /p userChoice2=REALLY ?^^! [y/N] : |
|
echo. |
|
if /i '%userChoice2%'=='y' (set userChoice2=n) else (goto menu) |
|
|
|
if /i '%userChoice1%'=='3' goto opt7 |
|
if /i '%userChoice1%'=='7' goto opt7 |
|
if /i '%userChoice1%'=='8' goto opt8 |
|
if /i '%userChoice1%'=='10' goto opt10 |
|
if /i '%userChoice1%'=='12' goto opt12 |
|
|
|
@REM Converts all .v files to .zip files |
|
:opt4 |
|
for /r %%f in (vFiles\*.v) do ( |
|
CLS |
|
echo. |
|
echo Converts all .v files to .zip files... |
|
echo. |
|
echo This task may take a while... please wait... |
|
echo. |
|
echo %%~nf.v |
|
|
|
%path[0]% "%%f" "vFiles\%%~nf.zip" 0x55 > nul 2>&1 |
|
) |
|
if /i '%userChoice1%'=='4' goto end |
|
|
|
@REM Extracts all .zip files to the ExtractedFiles folder |
|
:opt5 |
|
for /r %%f in (vFiles\*.zip) do ( |
|
CLS |
|
echo. |
|
echo Extracts all .zip files to the ExtractedFiles folder... |
|
echo. |
|
echo This task may take a while... please wait... |
|
echo. |
|
echo %%~nf.zip |
|
|
|
set pzip= |
|
|
|
@REM GLOBAL VERSION |
|
if /i '%%~nf'=='data04' ( |
|
set pzip=dfi104TeErdfjkajds |
|
) else if /i '%%~nf'=='data09' ( |
|
set pzip=qAASDfei5409dfiSdf |
|
) else if /i '%%~nf'=='data11' ( |
|
@REM set pzip=ea11sf*()epdlTj13102 |
|
set pzip=ea11sf*^(^)epdlTj13102 |
|
) else if /i '%%~nf'=='data13' ( |
|
set pzip=Tdkajfi123vdEtsdeiF |
|
) else if /i '%%~nf'=='data24' ( |
|
set pzip=2afe24DtedafieAafVcZ |
|
) else if /i '%%~nf'=='data25' ( |
|
set pzip=Tau25dkdafiefcx23df |
|
) else if /i '%%~nf'=='data26' ( |
|
set pzip=26DgeAdfZZcdfXfkvcxcD |
|
) else if /i '%%~nf'=='data27' ( |
|
set pzip=Uc27QsdZOPoiWqqfcsa |
|
) else if /i '%%~nf'=='data28' ( |
|
set pzip=a2AStrUdie421sdfawd |
|
) else if /i '%%~nf'=='data47' ( |
|
set pzip=ddafe4Kkuiif7Zdeefac |
|
) else if /i '%%~nf'=='data60' ( |
|
set pzip=De60accvdkjfiAQwdcx |
|
) |
|
|
|
@REM JPN VERSION |
|
@REM if /i '%%~nf'=='data02' ( |
|
@REM set pzip=edc#cvxzEdsa?SS1234 |
|
@REM ) else if /i '%%~nf'=='data12' ( |
|
@REM set pzip=fvf?GgD832d?1DSFes |
|
@REM ) else if /i '%%~nf'=='data13' ( |
|
@REM @REM ee^V-6LqVp+#Bk8NHp |
|
@REM set pzip=ee^^V-6LqVp+#Bk8NHp |
|
@REM ) else if /i '%%~nf'=='data73' ( |
|
@REM set pzip=P8s8JKPnRc@6-HKP |
|
@REM ) |
|
|
|
%path[1]% x vFiles\%%~nf.zip -oExtractedFiles\%%~nf -aoa -p!pzip! > nul 2>&1 |
|
) |
|
if /i '%userChoice1%'=='5' goto end |
|
|
|
@REM Delete all .zip files |
|
:opt6 |
|
for /r %%f in (vFiles\*.zip) do ( |
|
CLS |
|
echo. |
|
echo Delete all .zip files... |
|
echo. |
|
echo %%~nf.zip |
|
|
|
DEL /q "%%f" > nul 2>&1 |
|
) |
|
if /i '%userChoice1%'=='6' goto end |
|
if /i '%userChoice1%'=='2' goto end |
|
|
|
@REM Converts all .vArc files to .fsb files |
|
:opt7 |
|
for /r %%f in (vFiles\*.vArc) do ( |
|
CLS |
|
echo. |
|
echo Converts all .vArc files to .fsb files... |
|
echo. |
|
echo This task may take a while... please wait... |
|
echo. |
|
echo %%~nf.vArc |
|
|
|
%path[2]% -k -Y quickbms\varc.bms "%%f" "vFiles\%%~nf" > nul 2>&1 |
|
) |
|
if /i '%userChoice1%'=='7' goto end |
|
|
|
@REM Create a folder for each .vArc file |
|
@REM Go to the folder created |
|
@REM Converts all .fsb files to .wav files |
|
:opt8 |
|
for /r %%f in (vFiles\*.vArc) do ( |
|
CLS |
|
echo. |
|
echo Converts all .fsb files to .wav files... |
|
echo. |
|
echo This task may take a while... please wait... |
|
echo. |
|
echo %%~nf.vArc |
|
|
|
MD ExtractedFiles\%%~nf |
|
cd ExtractedFiles\%%~nf |
|
for /r %%i in (..\..\vFiles\%%~nf\Sounds\*.fsb) do %path[3]% "%%i" > nul 2>&1 |
|
cd ..\.. |
|
) |
|
if /i '%userChoice1%'=='3' goto end |
|
if /i '%userChoice1%'=='8' goto end |
|
|
|
:end |
|
CLS |
|
echo. |
|
echo. |
|
echo. |
|
echo. |
|
echo db db d88888b .d8888. .o88b. .d8b. .d8888. d88888b db db |
|
echo `8b d8' 88' 88' YP d8P Y8 d8' `8b 88' YP 88' `8b d8' |
|
echo `8bd8' 88ooooo `8bo. 8P 88ooo88 `8bo. 88ooooo `8bd8' |
|
echo 88 88~~~~~ `Y8b. 8b 88~~~88 `Y8b. 88~~~~~ 88 |
|
echo 88 88. db 8D Y8b d8 88 88 db 8D 88. 88 |
|
echo YP Y88888P `8888Y' `Y88P' YP YP `8888Y' Y88888P YP |
|
echo. |
|
echo. |
|
echo. |
|
echo. |
|
echo THE JOB IS DONE ^^! |
|
echo. |
|
echo Your option : %userChoice1% |
|
echo. |
|
|
|
rundll32.exe cmdext.dll,MessageBeepStub |
|
|
|
pause |
|
goto menu |
|
|
|
:quit |
|
exit |
Now compatible with the KR version