Модлоадер RustexRemake: агент, патч лаунчера, установщик и сборка
Моды грузятся через -javaagent, game.jar не патчится, переживают ре-обфускацию. Что внутри: - агент rsx-bridge.jar: профиль сборки игры, патчи A2/A6, загрузка модов через родной загрузчик игры (ilxq -> special.Main) - патч лаунчера: окно выбора «С модами / Ванилла» по кнопке «Играть» и защита от автоапдейта лаунчера - install/uninstall: всё ставится в %LOCALAPPDATA%\rsx-mod, пути не хардкодятся - build: три готовых артефакта в dist, нужен только JDK - testserver: локальный сервер, принимает любой ник и токен Проверено на живом клиенте: мод грузится и выполняется в игровом потоке, в логе видно игрока и мир.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# Points the vendor's hardcoded server address at this machine so the client
|
||||
# reaches the local stand-in server instead of the real one.
|
||||
#
|
||||
# The client keeps 185.207.214.85 inside its own code (both the /server-ping
|
||||
# URL and the connect target), so there is no in-game switch for it - the only
|
||||
# way is a hosts entry. Run this once from an elevated prompt.
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$hosts = Join-Path $env:SystemRoot 'System32\drivers\etc\hosts'
|
||||
$marker = '# rsx modloader test server'
|
||||
$line = '127.0.0.1 185.207.214.85'
|
||||
|
||||
$id = [Security.Principal.WindowsIdentity]::GetCurrent()
|
||||
$isAdmin = (New-Object Security.Principal.WindowsPrincipal($id)).IsInRole(
|
||||
[Security.Principal.WindowsBuiltInRole]::Administrator)
|
||||
if (-not $isAdmin) {
|
||||
Write-Host ' Нужны права администратора: запусти PowerShell от администратора.' -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
$content = @(Get-Content -LiteralPath $hosts |
|
||||
Where-Object { $_ -notmatch [regex]::Escape($marker) -and
|
||||
$_ -notmatch '^\s*127\.0\.0\.1\s+185\.207\.214\.85' })
|
||||
|
||||
Set-Content -LiteralPath $hosts -Encoding ASCII -Value ($content + "$line $marker")
|
||||
Write-Host ' Готово: 185.207.214.85 теперь указывает на 127.0.0.1.' -ForegroundColor Green
|
||||
Write-Host ' Запусти testserver\start.cmd, потом play.cmd -> 1 (с модами).'
|
||||
Write-Host ' Обратно: uninstall-hosts.ps1 (или netsh int ip reset).'
|
||||
Reference in New Issue
Block a user