05-25-2015, 09:10 AM
(05-25-2015, 04:48 AM)ThatTrueStruggle Wrote: A batch script
I wrote a batch script to semi-automate the model ripping process, should make it easier for people
Thanks, this is much more easier than I trying to rips my own Lost World models. Especially .bat file you made.
Copy .MODEL and .SKL.HKX to your "source" folder. Runs .bat, type "source", enter. (Some reason .skl.hkx file got deleted itself while run the .bat, its happens for me. So I'd just make a separate folder instead and type [character folder] while cmd ask you a folder name), wait until done. As for texture, you seems forget to writing .bat cmd ask you for texture lol. Then its ask you for skeleton file, type [FILE NAME] without file extension, and enter.
Somehow those .exe on strange behaviors keep crashing only for me? So be careful.
I'm fix the .bat for you.
Code:
@echo off
IF EXIST asset-cced\*.hkx (del asset-cced\*.hkx)
IF EXIST output\*.hkx (del output\*.hkx)
IF EXIST source\*.hkx (del source\*.hkx)
set /p folderName=What is the folder name? :Type a folder where is original .skl.hkx is:
copy /y %folderName%\*.skl.hkx source\
for %%f in ("source/*.hkx") do HkxConverterMsvc source/%%f output/%%f
for %%f in ("output/*.hkx") do assetcc2 --rules4101 --strip output/%%f asset-cced/%%f
copy /y output\*.skl.hkx %folderName%\
set /p folderName=What is the Texture folder? :Type a folder where is .dds Texture is:
IF EXIST Convert\*.gtx (del Convert\*.gtx)
IF EXIST OutDDS_Lossless\*.dds (del OutDDS_Lossless\*.dds)
rename %folderName%\*.dds *.gtx
copy /y %folderName%\*.gtx Convert\
for %%f in (Convert/*.gtx) do texconv2 -i Convert/%%f -f GX2_SURFACE_FORMAT_TCS_R8_G8_B8_A8_UNORM -o OutDDS_Lossless/%%~nf.gtx
for %%f in (OutDDS_Lossless/*.gtx) do texconv2 -i OutDDS_Lossless/%%f -o OutDDS_Lossless/%%~nf.dds
cd OutDDS_Lossless
del *.gtx
cd..
copy /y OutDDS_Lossless\*.dds %folderName%\
set /p skeleton=What is the name of the skeleton file? :Type a file where is of convert of .skl.hkx:
modelfbx %folderName%\%skeleton%.model %folderName%\%skeleton%.skl.hkx %skeleton%
move %folderName%\%skeleton%.model.fbx %skeleton%.fbx
pause