set startpath=%cd%
del mods.txt
del mod.txt
del prioritys.txt
del desiredmodname.txt
type NUL > prioritys.txt
cls
set /p w3folder=<w3folder.txt
if not exist "%w3folder%\content\content0" (goto choosew3folder) else goto askmodkitfolder
:choosew3folder
OpenFolderBox.exe C:\ "Appears only on first start or path edit - Please choose your The Witcher 3 Wild Hunt Directory" > w3folder.txt
set /p w3folder=<w3folder.txt
:askmodkitfolder
set /p modkitfolder=<modkitfolder.txt
if not exist "%modkitfolder%\bin\config\base" (goto choosemodkitfolder) else goto askbasefolder
:choosemodkitfolder
OpenFolderBox.exe C:\ "Appears only on first start or path edit - Please choose your Official ModKit Directory" > modkitfolder.txt
set /p modkitfolder=<modkitfolder.txt
:askbasefolder
set /p w3basefolder=<w3basefolder.txt
if not exist "%w3basefolder%\gameplay\community" (goto choosebasefolder) else goto :selectmods
:choosebasefolder
MessageBox.exe "In the next Window you have to select your uncooked base game folder - click on cancel if u dont have it or if u dont know what im talking about :D" "First start/Changed base folder" "OK" "Information" "Button1" "None" "30"
OpenFolderBox.exe C:\ "choose game base folder-cancel to uncook base game" > w3basefolder.txt
set /p w3basefolder=<w3basefolder.txt
Call notEmpty.bat w3basefolder.txt
If %errorlevel% EQU 0 (goto selectmods) Else (goto uncookbase)
:uncookbase
MKDIR "%startpath%\base"
cd "%w3folder%\xTcTools\bin\x64\"
call wcc_lite.exe uncook -indir="%w3folder%\content" -outdir="%startpath%\base"
call wcc_lite.exe uncook -indir="%w3folder%\DLC" -outdir="%startpath%\base"
set w3basefolder="%startpath%\base"
:selectmods
cd "%startpath%"
del mod.txt
del modname.txt
type NUL > mod.txt
type NUL > modname.txt
call OpenFolderBox.exe "%w3folder%\mods" "Choose next mod - press cancel to uncook selected mods" >> mod.txt
Call notEmpty.bat mod.txt
If %errorlevel% EQU 0 (goto findrepl) Else (goto uncookmods)
:findrepl
set /p mod=< mod.txt
call modname.bat "%mod%"
cd "%startpath%"
echo %modname% >> prioritys.txt
timeout 1
type "mod.txt"|findrepl /i /o:1:1 >>"mods.txt"
goto selectmods
:uncookmods
set /p uncookmod=< mods.txt
call modname.bat "%uncookmod%"
cd "%modkitfolder%\bin\x64\"
call wcc_lite.exe uncook -indir="%uncookmod%" -outdir="%startpath%\mods\%modname%"
if not exist "%startpath%\%modname%" (goto quickbms) else goto askmod
:quickbms
cd "%startpath%"
call quickbms.exe -d -o -Y "%startpath%\witcher3.bms" "%uncookmod%\content\blob0.bundle" "%startpath%\%modname%"
call quickbms.exe -d -o -Y "%startpath%\witcher3.bms" "%uncookmod%\content\blob1.bundle" "%startpath%\%modname%"
call quickbms.exe -d -o -Y "%startpath%\witcher3.bms" "%uncookmod%\content\blob2.bundle" "%startpath%\%modname%"
call quickbms.exe -d -o -Y "%startpath%\witcher3.bms" "%uncookmod%\content\buffers0.bundle" "%startpath%\%modname%"
call quickbms.exe -d -o -Y "%startpath%\witcher3.bms" "%uncookmod%\content\buffers1.bundle" "%startpath%\%modname%"
call quickbms.exe -d -o -Y "%startpath%\witcher3.bms" "%uncookmod%\content\buffers2.bundle" "%startpath%\%modname%"
Robocopy.exe /MOVE /S /E "%startpath%\%modname%\blob0.bundle" "%startpath%\mods\%modname%"
Robocopy.exe /MOVE /S /E "%startpath%\%modname%\blob1.bundle" "%startpath%\mods\%modname%"
Robocopy.exe /MOVE /S /E "%startpath%\%modname%\blob2.bundle" "%startpath%\mods\%modname%"
Robocopy.exe /MOVE /S /E "%startpath%\%modname%\buffers0.bundle" "%startpath%\mods\%modname%"
Robocopy.exe /MOVE /S /E "%startpath%\%modname%\buffers1.bundle" "%startpath%\mods\%modname%"
Robocopy.exe /MOVE /S /E "%startpath%\%modname%\buffers2.bundle" "%startpath%\mods\%modname%"
rd /s /q "%startpath%\%modname%"
:askmod
MKDIR "%w3folder%\mods\00_MergedMods"
move "%uncookmod%" "%w3folder%\mods\00_MergedMods"
cd "%startpath%"
timeout 1
type "mods.txt"|findrepl /v /o:1:1 >"mods.txt"
Call notEmpty.bat mods.txt
If %errorlevel% EQU 0 (goto uncookmods) Else (goto editfiles)
:editfiles
DROPDOWNBOX.exe "Edit Load Order;Edit Files;Build Mod" "What you like to do?" "Option" /RI /C:23 >NUL
SET ReturnCode=%ErrorLevel%
IF "%ReturnCode%"=="0" goto editfiles
IF "%ReturnCode%"=="1" cmd /c "prioritys.txt"
IF "%ReturnCode%"=="2" %SystemRoot%\explorer.exe "%startpath%\mods"
IF "%ReturnCode%"=="3" goto robocopy
goto editfiles
:robocopy
set /p modtocopy=< prioritys.txt
echo %modtocopy% >> IncludedMods.txt
Robocopy.exe /MOVE /S /E "%startpath%\mods\%modtocopy%" "%startpath%\uncook"
timeout 1
type "prioritys.txt"|findrepl /v /o:1:1 >"prioritys.txt"
Call notEmpty.bat prioritys.txt
If %errorlevel% EQU 0 (goto robocopy) Else (goto build)
:build
rd /s /q "%startpath%\mods"
InputBox.exe "Enter Name to start building Mod" "Enter Name and Build Mod" "mod" > desiredmodname.txt
set /p desiredmodname=< desiredmodname.txt
MKDIR "%startpath%\%desiredmodname%\content"
MKDIR "%startpath%\cooked"
cd "%modkitfolder%\bin\x64\"
call wcc_lite.exe cook -platform=pc -mod="%startpath%\uncook" -basedir="D:\Spiele\Witcher3Mods\Base" -outdir="%startpath%\cooked"
call wcc_lite.exe buildcache textures -basedir="%startpath%\uncook" -platform=pc -db="%startpath%\cooked\cook.db" -out="%startpath%\%desiredmodname%\content\texture.cache"
call wcc_lite.exe pack -dir="%startpath%\cooked" -outdir="%startpath%\%desiredmodname%\content"
call wcc_lite.exe metadatastore -path="%startpath%\%desiredmodname%\content"
cd "%startpath%"
rd /s /q "%startpath%\cooked"
rd /s /q "%startpath%\uncook"
move "IncludedMods.txt" "%startpath%\%desiredmodname%"
del mods.txt
del mod.txt
del modname.txt
del prioritys.txt
del desiredmodname.txt
move "%startpath%\%desiredmodname%" "%w3folder%\mods"
MessageBox.exe "All Done enjoy Witcher 3 Wild Hunt now!" "Mod Build Success" "OK" "Information" "Button1" "None" "10"
exit
これは私のコードです。すべてうまく動作します。今editlines部分で私はこのようになりますロード順のファイルを編集するための選択肢を与える:テキストファイルのバッチスクリプトの内容の読み込み順序が変更され、再度読み込まれる
modWEATHER
modInventoryBackground
modTest1
modTest2
modTest3
modTest4
modTest5
私のような1,2,3を通常のprioritysをしたいので、(このファイルを逆にするバッチ内の方法があります、4,5,6,7などがありますが、スクリプトは後でそれを逆にする必要があります。なぜなら、最後にロードされたファイルが最初に読み込まれたファイルを置き換えることができるからです。このloadorder.txtファイルを元に戻して、ユーザーに何かを変えさせてからもう一度やり直す方法はありますか?
そして84行目で私はこのローダーを渡しますerファイルをユーザーに送っても、彼の標準的なテキストエディタで開くことができます。ユーザーがこのテキストファイルのロードオーダーを変更できるようにする小さなツールはありますか? ご理解いただければ幸いです。
loadorderファイルには、スペースを含まない各行に1つの名前があります。それは上記のように見えます。 – xTcisloVe