11@ echo off
2- set version = 1.1.11
2+ set version = 1.1.11.1
3+ set branch = master
34set pwsh = %SYSTEMROOT% \System32\WindowsPowerShell\v1.0\powershell.exe -Command
45title DBD Private Server (%version% )
56echo ___ ___ ___ ___ _ _ ___
@@ -9,7 +10,7 @@ echo ^|___/^|___/___/ ^|_^| ^|_^| ^|_^|\_/\__,_^|\__\___^| ^|___/\___^|_^| \_/
910echo .
1011echo DBD Private Server (%version% )
1112echo .
12- %pwsh% " & {$webRequest = Invoke-WebRequest https://raw.githubusercontent.com/ModByDaylight/PrivateServer/master /info.txt -UseBasicParsing; $paths = ConvertFrom-StringData -StringData $webRequest.Content; if ( $paths['latestVersion'] -gt '%version% ' ) { 'Update available. Please download the latest version. ' + '(' + $paths['latestVersion'] + ')'; echo 'https://github.com/ModByDaylight/PrivateServer/releases/latest' '' } }"
13+ %pwsh% " & {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webRequest = Invoke-WebRequest https://raw.githubusercontent.com/ModByDaylight/PrivateServer/%branch% /info.txt -UseBasicParsing; $paths = ConvertFrom-StringData -StringData $webRequest.Content; if ( $paths['latestVersion'] -gt '%version% ' ) { 'Update available. Please download the latest version. ' + '(' + $paths['latestVersion'] + ')'; echo 'https://github.com/ModByDaylight/PrivateServer/releases/latest' '' } }"
1314if exist gamepath.txt (
1415 set /p path = < gamepath.txt
1516) else goto :paths
@@ -18,13 +19,15 @@ call :platformCheck
1819echo [1]. Launch Live
1920echo [2]. Launch Private Server
2021echo [3]. Setup Private Server
22+ echo [4]. Install Mods
2123echo .
2224set launchOption =
2325set /p launchOption = " Select an option: "
2426if not '%launchOption% '== '' set launchOption = %launchOption:~0 ,1 %
2527if '%launchOption% '== '1' goto :launchLive
2628if '%launchOption% '== '2' goto :launchPrivate
2729if '%launchOption% '== '3' goto :setupPrivate
30+ if '%launchOption% '== '4' goto :installMods
2831echo " %launchOption% " is not valid, try again.
2932echo .
3033goto :start
@@ -56,30 +59,37 @@ echo Copying Private Server Executables...
5659if exist " %path% \DeadByDaylight.exe" del " %path% \DeadByDaylight.exe"
5760if exist " %path% \DeadByDaylight\Binaries\%executables% \DeadByDaylight-%executables% -Shipping.exe" del " %path% \DeadByDaylight\Binaries\%executables% \DeadByDaylight-%executables% -Shipping.exe"
5861copy PrivateExecutables\DeadByDaylight.exe " %path% "
59- copy PrivateExecutables\DeadByDaylight-%executables% -Shipping.exe " %path% \DeadByDaylight\Binaries\%executables% "
62+ copy PrivateExecutables\DeadByDaylight-%executables% -Shipping.exe " %path% \DeadByDaylight\Binaries\%executables% "
63+ echo Checking mod compatibility...
64+ %pwsh% " & {Get-ChildItem -Path 'temp\*' -Include *.pak, *.sig -Recurse | Rename-Item -NewName {$_.name -replace 'WindowsNoEditor','%platform% '} }"
6065echo Launching Private Server
6166start %launch%
6267goto :end
6368:setupPrivate
64- if not exist " %path% \DeadByDaylight .exe" (
69+ if not exist " %path% \EasyAntiCheat\EasyAntiCheat_Setup .exe" (
6570 echo Invalid directory, try again.
6671 goto :dbdlocation
6772)
6873echo %path% > gamepath.txt
6974call :platformCheck
7075echo Importing mods...
7176if not exist " %path% \DeadByDaylight\Content\Paks\~mods" md " %path% \DeadByDaylight\Content\Paks\~mods"
72- %pwsh% " & {$webRequest = Invoke-WebRequest https://raw.githubusercontent.com/ModByDaylight/PrivateServer/dev /DefaultMods.json -UseBasicParsing; $Data = ConvertFrom-Json $webRequest.Content; $Data.DefaultMods.File | ForEach-Object { 'Downloading' + ' ' + $_.Name + ' ' + '(' + $_.Version + ')' + ' ' + 'by' + ' ' + $_.Author; Invoke-WebRequest -Uri $_.Path -OutFile 'Mods.zip'; Expand-Archive -Path 'Mods.zip' -DestinationPath 'temp' -Force; Remove-Item -Path 'Mods.zip' -Force } }"
73- %pwsh% " & {ls 'temp\*.pak' | Rename-Item -NewName {$_.name -replace 'WindowsNoEditor','%platform% '}; ls 'temp\*.sig' | Rename-Item -NewName {$_.name -replace 'WindowsNoEditor',' %platform% '}; Move-Item 'temp\*' -Destination '%path% \DeadByDaylight\Content\Paks\~mods' -Force; Remove-Item -Path 'temp' -Force }"
77+ %pwsh% " & {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webRequest = Invoke-WebRequest https://raw.githubusercontent.com/ModByDaylight/PrivateServer/%branch% /DefaultMods.json -UseBasicParsing; $Data = ConvertFrom-Json $webRequest.Content; $Data.DefaultMods.File | ForEach-Object { 'Downloading' + ' ' + $_.Name + ' ' + '(' + $_.Version + ')' + ' ' + 'by' + ' ' + $_.Author; Invoke-WebRequest -Uri $_.Path -OutFile 'Mods.zip'; Expand-Archive -Path 'Mods.zip' -DestinationPath 'temp' -Force; Remove-Item -Path 'Mods.zip' -Force } }"
78+ %pwsh% " & {Get-ChildItem -Path 'temp\*' -Include * .pak, *.sig -Recurse | Rename-Item -NewName {$_.name -replace 'WindowsNoEditor','%platform% '}; Get-ChildItem -Path 'temp\*' -Include *.pak, *.sig -Recurse | Move-Item -Destination '%path% \DeadByDaylight\Content\Paks\~mods' -Force; Remove-Item -Path 'temp' -Force -Recurse }"
7479if exist " %path% \DeadByDaylight.exe" del " %path% \DeadByDaylight.exe"
7580if exist " %path% \DeadByDaylight\Binaries\%executables% \DeadByDaylight-%executables% -Shipping.exe" del " %path% \DeadByDaylight\Binaries\%executables% \DeadByDaylight-%executables% -Shipping.exe"
76- %pwsh% " & {'Downloading Private Server Executables...'; $webRequest = Invoke-WebRequest https://raw.githubusercontent.com/ModByDaylight/PrivateServer/master /info.txt -UseBasicParsing; $paths = ConvertFrom-StringData -StringData $webRequest.Content; Invoke-WebRequest -Uri $paths['executablesPrivate%executables% '] -OutFile 'PrivateExecutables.zip'; Expand-Archive -Path 'PrivateExecutables.zip' -DestinationPath 'PrivateExecutables' -Force; Remove-Item -Path 'PrivateExecutables.zip' -Force }"
77- %pwsh% " & {'Downloading Live Executables...'; $webRequest = Invoke-WebRequest https://raw.githubusercontent.com/ModByDaylight/PrivateServer/master /info.txt -UseBasicParsing; $paths = ConvertFrom-StringData -StringData $webRequest.Content; Invoke-WebRequest -Uri $paths['executablesLive%executables% '] -OutFile 'LiveExecutables.zip'; Expand-Archive -Path 'LiveExecutables.zip' -DestinationPath 'LiveExecutables' -Force; Remove-Item -Path 'LiveExecutables.zip' -Force }"
81+ %pwsh% " & {'Downloading Private Server Executables...'; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webRequest = Invoke-WebRequest https://raw.githubusercontent.com/ModByDaylight/PrivateServer/%branch% /info.txt -UseBasicParsing; $paths = ConvertFrom-StringData -StringData $webRequest.Content; Invoke-WebRequest -Uri $paths['executablesPrivate%executables% '] -OutFile 'PrivateExecutables.zip'; Expand-Archive -Path 'PrivateExecutables.zip' -DestinationPath 'PrivateExecutables' -Force; Remove-Item -Path 'PrivateExecutables.zip' -Force }"
82+ %pwsh% " & {'Downloading Live Executables...'; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webRequest = Invoke-WebRequest https://raw.githubusercontent.com/ModByDaylight/PrivateServer/%branch% /info.txt -UseBasicParsing; $paths = ConvertFrom-StringData -StringData $webRequest.Content; Invoke-WebRequest -Uri $paths['executablesLive%executables% '] -OutFile 'LiveExecutables.zip'; Expand-Archive -Path 'LiveExecutables.zip' -DestinationPath 'LiveExecutables' -Force; Remove-Item -Path 'LiveExecutables.zip' -Force }"
7883echo Installing Private Server Executables...
7984copy PrivateExecutables\DeadByDaylight.exe " %path% "
8085copy PrivateExecutables\DeadByDaylight-%executables% -Shipping.exe " %path% \DeadByDaylight\Binaries\%executables% "
8186echo Setup Complete!
8287goto :end
88+ :installMods
89+ %pwsh% " & {''; 'Installed Mods:'; ''; Get-ChildItem '%path% \DeadByDaylight\Content\Paks\~mods\*.pak' -Name -Recurse }"
90+ %pwsh% " & {$webRequest = Invoke-WebRequest https://raw.githubusercontent.com/ModByDaylight/PrivateServer/%branch% /DownloadMods.json -UseBasicParsing; $Data = ConvertFrom-Json $webRequest.Content; $number=0; ''; 'Available Mods:'; ''; $Data.DownloadMods.File | ForEach-Object { $number=$number+1; '[' + $number + ']. ' + $_.Name + ' ' + '(' + $_.Version + ')' + ' ' + 'by' + ' ' + $_.Author }; ''; $ErrorActionPreference = 'SilentlyContinue'; $input=Read-Host 'Select an option'; $Data.DownloadMods.File[$input-1] | ForEach-Object { ''; 'Downloading' + ' ' + $_.Name + ' ' + '(' + $_.Version + ')' + ' ' + 'by' + ' ' + $_.Author; ''; Invoke-WebRequest -Uri $_.Path -OutFile 'Mods.zip'; Expand-Archive -Path 'Mods.zip' -DestinationPath 'temp' -Force; Remove-Item -Path 'Mods.zip' -Force } }"
91+ %pwsh% " & {Get-ChildItem -Path 'temp\*' -Include *.pak, *.sig -Recurse | Rename-Item -NewName {$_.name -replace 'WindowsNoEditor','%platform% '}; Get-ChildItem -Path 'temp\*' -Include *.pak, *.sig -Recurse | Move-Item -Destination '%path% \DeadByDaylight\Content\Paks\~mods' -Force; Remove-Item -Path 'temp' -Force -Recurse }"
92+ goto :end
8393:platformCheck
8494if exist " %path% \DeadByDaylight\Content\Paks\pakchunk0-WindowsNoEditor.pak" (
8595 set platform = WindowsNoEditor
0 commit comments