Skip to content

Commit 6bc36fd

Browse files
authored
Merge pull request #9 from ModByDaylight/dev
1.1.11.1
2 parents 6be246d + e5bbc6e commit 6bc36fd

3 files changed

Lines changed: 37 additions & 9 deletions

File tree

DownloadMods.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"DownloadMods": {
3+
"File": [
4+
{
5+
"Name": "Freecamera",
6+
"Version": "1.0.1",
7+
"Author": "shmoul",
8+
"Path": "https://cdn.discordapp.com/attachments/884966033595723827/936734340858126428/ShmoulFreecam.zip"
9+
},
10+
{
11+
"Name": "Tripwire Perk",
12+
"Version": "1.0.0",
13+
"Author": "Archengius",
14+
"Path": "https://cdn.discordapp.com/attachments/797693369307496498/932750554654978128/TripwirePerk.zip"
15+
}
16+
]
17+
}
18+
}

PrivateSeverLauncher.bat

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@echo off
2-
set version=1.1.11
2+
set version=1.1.11.1
3+
set branch=master
34
set pwsh=%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command
45
title DBD Private Server (%version%)
56
echo ___ ___ ___ ___ _ _ ___
@@ -9,7 +10,7 @@ echo ^|___/^|___/___/ ^|_^| ^|_^| ^|_^|\_/\__,_^|\__\___^| ^|___/\___^|_^| \_/
910
echo.
1011
echo DBD Private Server (%version%)
1112
echo.
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' '' } }"
1314
if exist gamepath.txt (
1415
set /p path=<gamepath.txt
1516
) else goto :paths
@@ -18,13 +19,15 @@ call :platformCheck
1819
echo [1]. Launch Live
1920
echo [2]. Launch Private Server
2021
echo [3]. Setup Private Server
22+
echo [4]. Install Mods
2123
echo.
2224
set launchOption=
2325
set /p launchOption="Select an option: "
2426
if not '%launchOption%'=='' set launchOption=%launchOption:~0,1%
2527
if '%launchOption%'=='1' goto :launchLive
2628
if '%launchOption%'=='2' goto :launchPrivate
2729
if '%launchOption%'=='3' goto :setupPrivate
30+
if '%launchOption%'=='4' goto :installMods
2831
echo "%launchOption%" is not valid, try again.
2932
echo.
3033
goto :start
@@ -56,30 +59,37 @@ echo Copying Private Server Executables...
5659
if exist "%path%\DeadByDaylight.exe" del "%path%\DeadByDaylight.exe"
5760
if exist "%path%\DeadByDaylight\Binaries\%executables%\DeadByDaylight-%executables%-Shipping.exe" del "%path%\DeadByDaylight\Binaries\%executables%\DeadByDaylight-%executables%-Shipping.exe"
5861
copy 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%'} }"
6065
echo Launching Private Server
6166
start %launch%
6267
goto :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
)
6873
echo %path%>gamepath.txt
6974
call :platformCheck
7075
echo Importing mods...
7176
if 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 }"
7479
if exist "%path%\DeadByDaylight.exe" del "%path%\DeadByDaylight.exe"
7580
if 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 }"
7883
echo Installing Private Server Executables...
7984
copy PrivateExecutables\DeadByDaylight.exe "%path%"
8085
copy PrivateExecutables\DeadByDaylight-%executables%-Shipping.exe "%path%\DeadByDaylight\Binaries\%executables%"
8186
echo Setup Complete!
8287
goto :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
8494
if exist "%path%\DeadByDaylight\Content\Paks\pakchunk0-WindowsNoEditor.pak" (
8595
set platform=WindowsNoEditor

info.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
latestVersion=1.1.11
1+
latestVersion=1.1.11.1
22
executablesPrivateWin64=https://cdn.discordapp.com/attachments/838158112749781000/935746796465049610/DBDModding-Steam.zip
33
executablesLiveWin64=https://cdn.discordapp.com/attachments/838158112749781000/935674737588326420/LiveExecutablesWin64.zip
44
executablesPrivateEGS=https://cdn.discordapp.com/attachments/838158112749781000/936418774276521984/PrivateExecutablesEGS.zip

0 commit comments

Comments
 (0)