mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 15:08:47 -07:00
4edf25b2d5
Targets Rec Room 2020.12.18 client.
Re-import after adding:
- DorkNet.ClientMod/dorknet-clientmod.json.template — config schema
the launcher's manifest-driven patcher renders into UserData/.
- tools/build-patcher-zip.ps1 — produces the dorknet-clientpatch-{key}.zip
Release asset the launcher fetches.
- .github/workflows/release.yml — auto-publishes both Release assets
on v1-december-* tag push.
Scrubbed via maintainer-side scrub-for-public.ps1: same drop rules as
the prior import, plus build-patcher-zip.ps1 added to the tools/
allow-list so it survives the scrub.
132 lines
5.2 KiB
PowerShell
132 lines
5.2 KiB
PowerShell
<#
|
|
.SYNOPSIS
|
|
Disable Easy Anti-Cheat in a Rec Room 2020.12+ install so MelonLoader /
|
|
Harmony patches can attach.
|
|
|
|
.DESCRIPTION
|
|
The 2020.12+ Steam builds ship EAC, but the integration is the standard
|
|
EAC-launcher-wrapper model — NOT in-process anti-cheat in the game
|
|
binary itself.
|
|
|
|
Files in a 2020.12 install:
|
|
|
|
RecRoom.exe (~650 KB) The actual Unity game binary.
|
|
No SteamStub, no EAC strings.
|
|
Recroom_Release.exe (~1.2 MB) The EAC launcher front-end. Steam
|
|
launches this; it reads
|
|
EasyAntiCheat/Launcher/Settings.json,
|
|
talks to the EAC service, then
|
|
spawns RecRoom.exe under EAC.
|
|
EasyAntiCheat/ EAC service binaries + the launcher's
|
|
Settings.json.
|
|
|
|
EAC blocks foreign DLL injection (MelonLoader's version.dll proxy,
|
|
Harmony hooks, etc.), which makes a normal Steam launch unrunnable for
|
|
the modded client. The fix is simple: skip the EAC launcher entirely
|
|
and run RecRoom.exe directly. EAC is never loaded into the process,
|
|
no patching of any binary required.
|
|
|
|
This script just writes Launch-DorkNet.bat at the install root that
|
|
starts RecRoom.exe directly with any flags you pass through. The
|
|
EasyAntiCheat/ folder and Recroom_Release.exe are left in place —
|
|
they're harmless when nothing invokes them, and leaving them avoids
|
|
tripping unrelated existence checks.
|
|
|
|
Designed for use with a DorkNet private server only — EAC's whole
|
|
point is the official live game. On a self-hosted server where every
|
|
client talks to YOUR backend, EAC isn't doing anything useful.
|
|
|
|
.PARAMETER RecRoomDir
|
|
The Rec Room install root (the folder containing RecRoom.exe,
|
|
EasyAntiCheat/, RecRoom_Data/).
|
|
|
|
.PARAMETER Revert
|
|
Remove the Launch-DorkNet.bat shortcut. (There's nothing else to
|
|
undo — the script never touches the game files.)
|
|
|
|
.PARAMETER WhatIf
|
|
Show what would be done without touching the filesystem.
|
|
|
|
.EXAMPLE
|
|
# Set up direct launch on a 2020.12 install
|
|
.\tools\remove-eac.ps1 -RecRoomDir 'C:\Games\RecRoom'
|
|
|
|
.EXAMPLE
|
|
# Tear it down
|
|
.\tools\remove-eac.ps1 -RecRoomDir 'C:\Games\RecRoom' -Revert
|
|
#>
|
|
|
|
[CmdletBinding(SupportsShouldProcess = $true)]
|
|
param(
|
|
[Parameter(Mandatory)] [string] $RecRoomDir,
|
|
[switch] $Revert
|
|
)
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
Set-StrictMode -Version Latest
|
|
|
|
function Write-Step($msg) { Write-Host ('> ' + $msg) -ForegroundColor Cyan }
|
|
function Write-OK($msg) { Write-Host ('+ ' + $msg) -ForegroundColor Green }
|
|
function Write-Warn2($msg){ Write-Host ('! ' + $msg) -ForegroundColor Yellow }
|
|
function Write-Err($msg) { Write-Host ('x ' + $msg) -ForegroundColor Red }
|
|
|
|
$resolved = Resolve-Path -LiteralPath $RecRoomDir -ErrorAction SilentlyContinue
|
|
if (-not $resolved) { Write-Err "RecRoomDir '$RecRoomDir' does not exist."; exit 1 }
|
|
$RecRoomDir = $resolved.Path
|
|
|
|
$GameExe = Join-Path $RecRoomDir 'RecRoom.exe'
|
|
$BootBat = Join-Path $RecRoomDir 'Launch-DorkNet.bat'
|
|
|
|
if ($Revert) {
|
|
Write-Step 'Reverting — removing Launch-DorkNet.bat.'
|
|
if (Test-Path -LiteralPath $BootBat) {
|
|
if ($PSCmdlet.ShouldProcess($BootBat, 'remove launch shortcut')) {
|
|
Remove-Item -LiteralPath $BootBat
|
|
Write-OK 'Removed Launch-DorkNet.bat'
|
|
}
|
|
} else {
|
|
Write-Warn2 'No Launch-DorkNet.bat present — already reverted.'
|
|
}
|
|
Write-OK 'Done. Steam launch path is unchanged (the script never touched it).'
|
|
exit 0
|
|
}
|
|
|
|
if (-not (Test-Path -LiteralPath $GameExe -PathType Leaf)) {
|
|
Write-Err "RecRoom.exe not found in '$RecRoomDir'."
|
|
Write-Host ' This script targets 2020.12+ installs. For 2020.03.10 there' -ForegroundColor DarkGray
|
|
Write-Host ' is no EAC; just run Recroom_Release.exe directly.' -ForegroundColor DarkGray
|
|
exit 1
|
|
}
|
|
|
|
Write-Step "Setting up direct-launch in $RecRoomDir"
|
|
|
|
$batBody = @"
|
|
@echo off
|
|
REM Launch Rec Room 2020.12+ directly, bypassing the EAC launcher
|
|
REM (Recroom_Release.exe). Used with a DorkNet private server.
|
|
REM
|
|
REM RecRoom.exe is the real Unity game binary; the EAC launcher is only
|
|
REM responsible for starting it under EAC's process protection. Running
|
|
REM the game binary directly means EAC is never loaded into the process,
|
|
REM so MelonLoader / Harmony patches attach cleanly.
|
|
REM
|
|
REM Generated by tools/remove-eac.ps1 -- re-run that script with -Revert
|
|
REM to delete this shortcut.
|
|
|
|
pushd "%~dp0"
|
|
start "" "RecRoom.exe" %*
|
|
popd
|
|
"@
|
|
if ($PSCmdlet.ShouldProcess($BootBat, 'write Launch-DorkNet.bat')) {
|
|
Set-Content -LiteralPath $BootBat -Value $batBody -Encoding ASCII
|
|
Write-OK "Wrote $BootBat"
|
|
}
|
|
|
|
Write-Host ''
|
|
Write-OK 'EAC bypass ready.'
|
|
Write-Host ' - Launch with: ' -NoNewline; Write-Host $BootBat -ForegroundColor White
|
|
Write-Host ' - Or run RecRoom.exe directly.' -ForegroundColor DarkGray
|
|
Write-Host ' - Do NOT launch Recroom_Release.exe -- that is the EAC launcher.' -ForegroundColor DarkGray
|
|
Write-Host ' - Steam "Play" will still try to start Recroom_Release.exe; avoid it.' -ForegroundColor DarkGray
|
|
Write-Host ' - To undo: ' -NoNewline; Write-Host '.\tools\remove-eac.ps1 -RecRoomDir "<path>" -Revert' -ForegroundColor White
|