diff --git a/README.md b/README.md index 198e226..6bf1617 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ For full deploy details, the Inno Setup installer, and gotchas, see [`BUILD.md`] - `docs/ACCLIENT_HOOK_INVENTORY.md` — hook target inventory against the user's live `acclient.exe` - `docs/PLUGIN_HOOK_MATRIX.md` — clean-room hook surface matrix - `docs/LEGAL_COMPATIBILITY.md` — project policy on Decal/VTank compatibility +- `installer/HEADLESS-README.md` — players' guide to the experimental Headless mode (installed as `Headless\README.md`) - `docs/archive/` — archived plans and one-off utilities ## Repository notes diff --git a/RynthCore.sln b/RynthCore.sln index e450961..2fb4d0c 100644 --- a/RynthCore.sln +++ b/RynthCore.sln @@ -31,6 +31,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RynthCore.HookResolver.UI", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RynthCore.DecalBridge", "src\RynthCore.DecalBridge\RynthCore.DecalBridge.csproj", "{44C8CF3A-3011-4C80-BDEE-1414B3D6CFAE}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RynthCore.Headless", "src\RynthCore.Headless\RynthCore.Headless.csproj", "{88A03697-4463-4F1B-90DC-8FFAAD37912D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RynthCore.Headless.Cli", "src\RynthCore.Headless.Cli\RynthCore.Headless.Cli.csproj", "{2E2B5C60-7B36-4974-B379-B4FD982F59A3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RynthCore.Geometry", "src\RynthCore.Geometry\RynthCore.Geometry.csproj", "{982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x86 = Debug|x86 @@ -185,18 +191,57 @@ Global {44C8CF3A-3011-4C80-BDEE-1414B3D6CFAE}.Release|Any CPU.Build.0 = Release|Any CPU {44C8CF3A-3011-4C80-BDEE-1414B3D6CFAE}.Release|x64.ActiveCfg = Release|Any CPU {44C8CF3A-3011-4C80-BDEE-1414B3D6CFAE}.Release|x64.Build.0 = Release|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Debug|x86.ActiveCfg = Debug|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Debug|x86.Build.0 = Debug|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Debug|x64.ActiveCfg = Debug|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Debug|x64.Build.0 = Debug|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Release|x86.ActiveCfg = Release|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Release|x86.Build.0 = Release|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Release|Any CPU.Build.0 = Release|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Release|x64.ActiveCfg = Release|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Release|x64.Build.0 = Release|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Debug|x86.ActiveCfg = Debug|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Debug|x86.Build.0 = Debug|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Debug|x64.ActiveCfg = Debug|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Debug|x64.Build.0 = Debug|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Release|x86.ActiveCfg = Release|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Release|x86.Build.0 = Release|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Release|Any CPU.Build.0 = Release|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Release|x64.ActiveCfg = Release|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Release|x64.Build.0 = Release|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Debug|x86.ActiveCfg = Debug|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Debug|x86.Build.0 = Debug|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Debug|x64.ActiveCfg = Debug|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Debug|x64.Build.0 = Debug|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Release|x86.ActiveCfg = Release|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Release|x86.Build.0 = Release|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Release|Any CPU.Build.0 = Release|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Release|x64.ActiveCfg = Release|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {D1E2F3A4-5678-4ABC-8DEF-1234567890AB} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} {2B283E05-12BB-45F9-B8E5-8F53C1FAB737} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} {BB0C5CB5-6C75-4C17-9348-5CA0C481B65C} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} {A72E31D3-5D91-4C39-A30C-A96A492BBE82} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {D1E2F3A4-5678-4ABC-8DEF-1234567890AB} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} {C1A2B3D4-0007-0007-0007-000000000007} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} {C1A2B3D4-0008-0008-0008-000000000008} = {52D7C9F1-3A4E-4B11-9C2D-7E1A8C3F4D89} {C1A2B3D4-0009-0009-0009-000000000009} = {52D7C9F1-3A4E-4B11-9C2D-7E1A8C3F4D89} {44C8CF3A-3011-4C80-BDEE-1414B3D6CFAE} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} + {88A03697-4463-4F1B-90DC-8FFAAD37912D} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} + {2E2B5C60-7B36-4974-B379-B4FD982F59A3} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} EndGlobalSection EndGlobal diff --git a/docs/STATUS_AGENT.md b/docs/STATUS_AGENT.md index cb7f552..28431a1 100644 --- a/docs/STATUS_AGENT.md +++ b/docs/STATUS_AGENT.md @@ -7,9 +7,11 @@ into the PC. It is built in two deliberately separated halves: -1. **Engine status export** — opt-in, **default OFF**. When enabled, the engine - writes a small **local** JSON file per client. It never opens a network - connection. +1. **Status export** — opt-in, **default OFF**. The private **RynthRemote** + plugin (loaded only by you) writes a small **local** JSON file per client; + the engine itself writes none. A headless character (`rynth-headless`, see + [HEADLESS.md](HEADLESS.md)) writes the same files from its own process. + Neither opens a network connection for this. 2. **`RynthCore.StatusAgent.exe`** — a separate, optional program that runs **on your own PC**, reads those local files, and forwards a rolled-up payload to **an endpoint you configure**. It is not injected into the game, not in the @@ -23,11 +25,12 @@ This feature is designed so that distributing RynthCore to other people changes nothing for them unless they explicitly turn it on, and even then nothing leaves their machine: -- **Default off.** With `EnableStatusExport` absent or `false`, the engine writes - no status file and behaves exactly as before. -- **No telemetry from the game.** `acclient.exe` / the engine never opens a - socket for this feature. The most it ever does is write a local file under - `C:\Games\RynthCore\Logs\status\`, right next to the logs it already writes. +- **Default off.** Without the RynthRemote plugin loaded, no game client writes a + status file and everything behaves exactly as before. (Headless characters + write theirs by default, see below.) +- **No telemetry from the game.** `acclient.exe` / the engine / the plugin never + open a socket for this feature. The most they do is write a local file under + `C:\Games\RynthCore\Logs\status\`, right next to the logs already written. - **The network half runs on the operator's PC, by the operator.** Only `RynthCore.StatusAgent.exe` makes outbound requests, only to the URL **you** put in **your** config, and only while you choose to run it. With no URL set it @@ -41,25 +44,33 @@ agent — there is no path by which your build reaches into their PC. ## Turning it on (operator setup) -### 1. Enable the engine status export +### 1. Load the RynthRemote plugin -Add to **your** `%APPDATA%\RynthCore\engine.json`: - -```json -{ - "EnableStatusExport": true -} -``` - -(Or set the env var `RYNTHCORE_STATUS_EXPORT=1` before launching AC for a -one-session test without editing the file.) Picked up on next client launch. - -The engine then writes, once per second, per running client: +(The engine's own `EnableStatusExport` switch is gone; the files come from the +plugin now.) Add the RynthRemote plugin to the launcher's plugin list. It then +writes, once per second, per running client (plus `.inventory`, `.settings` and +`.character` files next to it), and drains the phone's commands from +`Logs\status\commands\RynthCore..*.cmd.json`: ``` C:\Games\RynthCore\Logs\status\RynthCore..status.json ``` +**Headless characters.** `rynth-headless` writes the same four files and drains +the same command files for each character it hosts. One process hosts several +characters, so `` is a per-character **client id** (odd, above a billion, +never a real process id), and the status carries `"headless": true`, +`"hostPid"` and `"hostProcess": "rynth-headless"`. The agent checks that the +host process is up and named rynth-headless, where for a retail client it checks +that `` is an `acclient`. Its status folder is the run config's +`statusDir` (the launcher's `HeadlessStatusDir`); by default it is +`C:\Games\RynthCore\Logs\status\`, the agent's default `StatusDirectory`, so +both kinds show together. `"statusDir": ""` turns its status files off. Unlike a +game client, a headless character writes them without RynthRemote; they stay +local files like the others. A headless character has no window, so screen streaming, clicks, +`closeClient`, travel and raise are not available for it. Movement, assess and +every RynthAi command work as they do on a retail client. + ### 2. Build and run the agent ```powershell diff --git a/installer/Build-Installer.ps1 b/installer/Build-Installer.ps1 index cbd1010..8cc0b84 100644 --- a/installer/Build-Installer.ps1 +++ b/installer/Build-Installer.ps1 @@ -14,6 +14,11 @@ - the CoreCLR engine loads them - until the update feed can carry a managed plugin's dependency DLLs) 5. Publishes the Loot Editor + 5b. The headless client (docs/HEADLESS.md, experimental): rynth-headless.exe, a self-contained + win-x64 publish of src\RynthCore.Headless.Cli, into {app}\Headless, and the 64-bit managed + RynthAi it runs into {app}\Headless\plugins\RynthAi (with its dependencies beside it). The + launcher loads those when its HeadlessPluginPaths list is empty. Nothing here touches the + x86 plugins in C:\Games\RynthSuite. 6. Stages all output under installer\staging\app\, plus the hand-built RynthCore.SehTrampoline.dll and the Decal bridge (DecalBridge\RynthCore.DecalBridge.dll, built here against Decal's reference assemblies), and checks every required file is there @@ -94,17 +99,25 @@ $EngineProject = "$RepoRoot\src\RynthCore.Engine\RynthCore.Engine.csproj" $LoaderProject = "$RepoRoot\src\RynthCore.Loader\RynthCore.Loader.csproj" $PluginProject = "$RynthSuiteRoot\Plugins\RynthCore.Plugin.RynthAi\RynthCore.Plugin.RynthAi.csproj" $LootEditorProject = "$RynthSuiteRoot\Tools\RynthCore.LootEditor\RynthCore.LootEditor.csproj" +$HeadlessProject = "$RepoRoot\src\RynthCore.Headless.Cli\RynthCore.Headless.Cli.csproj" $LauncherPublish = "$RepoRoot\src\RynthCore.App.Avalonia\bin\$Configuration\net10.0-windows7.0\win-x86\publish" $EnginePublish = "$RepoRoot\src\RynthCore.Engine\bin\$Configuration\net10.0-windows\win-x86\publish" $LoaderPublish = "$RepoRoot\src\RynthCore.Loader\bin\$Configuration\net10.0-windows\win-x86\publish" $PluginPublish = "$RynthSuiteRoot\Plugins\RynthCore.Plugin.RynthAi\bin\$Configuration\net10.0-windows\win-x86\publish" $LootEditorPublish = "$RynthSuiteRoot\Tools\RynthCore.LootEditor\bin\$Configuration\net10.0\win-x86\publish" +# The headless builds (x64) keep their intermediates in their own artifacts folders, apart from the +# x86 builds of the same projects (RynthCore.PluginSdk, RynthAi), and publish here (artifacts\ is ignored). +$HeadlessBuildRoot = "$RepoRoot\artifacts\headless" +$HeadlessPublish = "$HeadlessBuildRoot\rynth-headless" +$HeadlessPluginsPublish = "$HeadlessBuildRoot\plugins" +# The 64-bit plugins the headless client gets: -> project. Only RynthAi for now. +$HeadlessPlugins = [ordered]@{ RynthAi = $PluginProject } $StagingDir = "$ScriptDir\staging\app" # ── Validate projects ─────────────────────────────────────────────────────── -foreach ($p in @($LauncherProject, $EngineProject, $PluginProject, $LootEditorProject) + @(if ($NativeAot) { $LoaderProject })) { +foreach ($p in @($LauncherProject, $EngineProject, $PluginProject, $LootEditorProject, $HeadlessProject) + @(if ($NativeAot) { $LoaderProject })) { if (-not (Test-Path $p)) { throw "Project not found: $p`nUpdate paths in Build-Installer.ps1 if your repo layout differs." } @@ -145,6 +158,23 @@ if (-not $SkipBuild) { Write-Host "[5/5] Publishing Loot Editor (self-contained, x86)..." -ForegroundColor Cyan dotnet publish $LootEditorProject -c $Configuration -r win-x86 --self-contained true @VersionArgs if ($LASTEXITCODE -ne 0) { throw "Loot Editor publish failed (exit $LASTEXITCODE)" } + + # ── 5b. Headless client (self-contained x64) + its 64-bit plugins ───────── + # rynth-headless is a 64-bit process with its own .NET runtime (Runtime\dotnet is x86). The + # plugins it hosts are managed x64 builds of the release plugins, made with command-line + # overrides only (docs/HEADLESS.md, "Running RynthAi"); each gets its dependencies beside it. + Write-Host "" + Write-Host "[5b/5] Publishing the headless client (self-contained, x64) and its x64 plugins..." -ForegroundColor Cyan + if (Test-Path $HeadlessBuildRoot) { Remove-Item $HeadlessBuildRoot -Recurse -Force } + dotnet publish $HeadlessProject -c $Configuration -r win-x64 --self-contained true ` + --artifacts-path "$HeadlessBuildRoot\art-cli" -o $HeadlessPublish -nologo -v q @VersionArgs + if ($LASTEXITCODE -ne 0) { throw "Headless client publish failed (exit $LASTEXITCODE)" } + foreach ($name in $HeadlessPlugins.Keys) { + dotnet publish $HeadlessPlugins[$name] -c $Configuration "-p:PublishAot=false" "-p:NativeLib=" "-p:SelfContained=false" ` + "-p:PlatformTarget=x64" "-p:RuntimeIdentifier=win-x64" "-p:Platforms=x64" "-p:GenerateRuntimeConfigurationFiles=false" ` + "-p:RynthPluginSharedSdk=true" --artifacts-path "$HeadlessBuildRoot\art-$name" -o "$HeadlessPluginsPublish\$name" -nologo -v q @VersionArgs + if ($LASTEXITCODE -ne 0) { throw "Headless (x64) $name publish failed (exit $LASTEXITCODE)" } + } } # ── Stage ──────────────────────────────────────────────────────────────────── @@ -245,6 +275,35 @@ foreach ($dir in (Get-ChildItem "$LootEditorPublish" -Directory)) { Get-ChildItem "$StagingDir\Tools\LootEditor\$($dir.Name)" -Recurse -File -Filter '*.pdb' | Remove-Item -Force } +# Headless client (experimental, docs/HEADLESS.md): {app}\Headless\rynth-headless.exe with its own +# x64 runtime, and {app}\Headless\plugins\\ (RynthCore.Plugin..dll and its dependencies), +# which the launcher's HeadlessLaunch.DefaultPluginPaths finds. The publish folders are copied whole +# (the plugins' Data\ subfolders too); pdbs stay, for line numbers in the headless logs. +if (-not (Test-Path "$HeadlessPublish\rynth-headless.exe")) { throw "Headless client publish not found at: $HeadlessPublish" } +New-Item -ItemType Directory -Path "$StagingDir\Headless\plugins" -Force | Out-Null +Copy-Item "$HeadlessPublish\*" "$StagingDir\Headless\" -Recurse -Force +foreach ($name in $HeadlessPlugins.Keys) { + $src = "$HeadlessPluginsPublish\$name" + if (-not (Test-Path "$src\RynthCore.Plugin.$name.dll")) { throw "Headless (x64) $name publish not found at: $src" } + Copy-Item $src "$StagingDir\Headless\plugins\" -Recurse -Force +} +# The plugin builds must really be 64-bit: an x86 one (wrong overrides, a stale publish) fails to load +# in rynth-headless with BadImageFormatException, only once a player launches. +# The PE header's machine field: an IL assembly built for x64 says AMD64 (0x8664); x86 and AnyCPU say I386 (0x14C). +function Get-PeMachine([string]$path) { + $b = [System.IO.File]::ReadAllBytes($path) + return [BitConverter]::ToUInt16($b, [BitConverter]::ToInt32($b, 0x3C) + 4) +} +foreach ($name in $HeadlessPlugins.Keys) { + $machine = Get-PeMachine "$StagingDir\Headless\plugins\$name\RynthCore.Plugin.$name.dll" + if ($machine -ne 0x8664) { throw ("Headless plugin {0} is not an x64 build (PE machine 0x{1:X})" -f $name, $machine) } +} +if ((Get-PeMachine "$StagingDir\Headless\rynth-headless.exe") -ne 0x8664) { throw "rynth-headless.exe is not an x64 build" } +# The players' guide to Headless mode, beside the exe. +Copy-Item "$ScriptDir\HEADLESS-README.md" "$StagingDir\Headless\README.md" -Force +$headlessMb = [math]::Round((Get-ChildItem "$StagingDir\Headless" -Recurse -File | Measure-Object Length -Sum).Sum / 1MB, 1) +Write-Host " Headless: $((Get-ChildItem "$StagingDir\Headless" -Recurse -File).Count) file(s), ${headlessMb} MB (plugins: $($HeadlessPlugins.Keys -join ', '))" + # Decal bridge (docs/DECAL_BRIDGE_PLAN.md, experimental): the net48 x86 Decal network filter # goes to {app}\DecalBridge\, the folder the launcher registers for "Decal + RynthCore" # accounts (and only for those). Built against Decal's public reference assemblies, so the @@ -289,8 +348,13 @@ $required = @( "$StagingDir\Runtime\RynthCore.SehTrampoline.dll", "$StagingDir\Runtime\minhook.x86.dll", "$StagingDir\Runtime\cimgui.dll", - "$pluginStagingDir\RynthAi\RynthCore.Plugin.RynthAi.dll" + "$pluginStagingDir\RynthAi\RynthCore.Plugin.RynthAi.dll", + "$StagingDir\Headless\rynth-headless.exe", + "$StagingDir\Headless\rynth-headless.dll", + "$StagingDir\Headless\coreclr.dll", + "$StagingDir\Headless\RynthCore.Headless.dll" ) +foreach ($name in $HeadlessPlugins.Keys) { $required += "$StagingDir\Headless\plugins\$name\RynthCore.Plugin.$name.dll" } if (-not $NativeAot) { $required += @( "$StagingDir\Runtime\RynthCore.Shim.dll", diff --git a/installer/HEADLESS-README.md b/installer/HEADLESS-README.md new file mode 100644 index 0000000..8c5fa31 --- /dev/null +++ b/installer/HEADLESS-README.md @@ -0,0 +1,62 @@ +# Headless mode (experimental) + +Headless runs an account with **no game window**. Instead of starting the Asheron's Call +client, the launcher starts `rynth-headless.exe`, RynthCore's own client. It logs the +character in and runs RynthAi, the way RynthAi runs inside the game, but nothing is drawn +on screen. Use it for a bot character you don't need to watch. + +It is experimental: it may stop, get stuck or do something the game client wouldn't. Try it +on a character you can afford to lose time with, and check on it. + +## What it can and can't do + +- **ACE servers only.** The launcher refuses to start a Headless account on a GDLE server. +- **No game window and no in-game screens.** There is no RynthCore bar, no RynthAi window + and no chat window. You give RynthAi its orders with commands (see below). +- **Which plugins run:** only 64-bit plugins. By default that is the RynthAi that comes with + RynthCore (in `Headless\plugins\RynthAi` in the RynthCore folder). The plugins in the + launcher's Plugins tab, Decal and Decal plugins (VTank, UtilityBelt and the rest) do not + run in a headless client. +- **It walks on the game's own maps** (it reads your AC client's files), but it can't jump + or swim. +- **One character per account.** As in the game, an account can have only one character in + the world. Don't start the same account in a game client as well: the server drops one. +- **64-bit Windows only.** + +## Setting it up + +1. Install or update RynthCore as usual. The headless client comes with it. +2. In the launcher, set the account's injection method to **Headless (experimental)**. +3. Pick the character the same way as for any account. With none set, the first character + on the account logs in. +4. Click the account's **OnLogin** button and add the commands RynthAi should get once the + character is in the world, for example `/ra start` to start the macro. RynthAi uses the + profiles, metas and loot profiles in its headless folder (below), not the ones your game + clients use, so copy the ones you want there first. +5. Launch the account as usual. + +## Where its files are + +- **RynthAi's files for headless characters:** `%LOCALAPPDATA%\RynthCore\headless\RynthAi\` + (settings and loot profiles, metas, navs). Copy profiles from `C:\Games\RynthSuite\RynthAi\` + into the same subfolders to use them headless. +- **Log:** `%LOCALAPPDATA%\RynthCore\headless\headless-.log`, one per account (what + the character and its plugins did, and what the server refused). RynthAi's own logs are + in `RynthAi\Logs` there. +- **Status files** (for status tools that read them): `C:\Games\RynthCore\Logs\status\`. + +## Seeing it and stopping it + +- The account shows in the launcher like any running client. +- To stop a headless client, use **Runtime > Headless client > Log out headless clients**. It + asks every headless client to log its character out and close (it is closed after 20 seconds + if it doesn't). With AutoLaunch on, uncheck the account first, or the launcher starts it again. + +## Settings (Runtime tab, Headless client) + +- **rynth-headless.exe:** leave it empty to use the one that comes with RynthCore. +- **Headless plugins:** leave it empty to use the RynthAi that comes with RynthCore. To list + your own, give one 64-bit plugin DLL per line; never the ones from the Plugins tab, which + are 32-bit and can't load in it. + +To go back, set the account's injection method to **RynthCore** again. diff --git a/installer/Publish-Update.ps1 b/installer/Publish-Update.ps1 index 8e13b4d..9efbaa2 100644 --- a/installer/Publish-Update.ps1 +++ b/installer/Publish-Update.ps1 @@ -368,6 +368,17 @@ if (-not $?) { throw "Build-Installer.ps1 failed" } $bridgeStaged = Join-Path $ScriptDir "staging\app\DecalBridge\RynthCore.DecalBridge.dll" if (-not (Test-Path $bridgeStaged)) { throw "The installer was built without the Decal bridge ($bridgeStaged missing) - not publishing." } Write-Host " Decal bridge in the installer: $((Get-Item $bridgeStaged).VersionInfo.FileVersion)" +# The headless client ships in every release too (experimental, opt-in per account): rynth-headless with its +# own x64 runtime, and the x64 RynthAi it loads when the launcher's HeadlessPluginPaths is empty. Its +# plugins come with the core installer only; the feed's plugin entries stay the x86 game-client builds. +foreach ($f in "Headless\rynth-headless.exe", "Headless\plugins\RynthAi\RynthCore.Plugin.RynthAi.dll") { + if (-not (Test-Path (Join-Path $ScriptDir "staging\app\$f"))) { throw "The installer was built without $f - not publishing." } +} +foreach ($f in "Headless\rynth-headless.dll", "Headless\plugins\RynthAi\RynthCore.Plugin.RynthAi.dll") { + $fv = (Get-Item (Join-Path $ScriptDir "staging\app\$f")).VersionInfo.FileVersion + if ($fv -ne $Version) { throw "The installer's $f is version $fv, not $Version (stale build?) - not publishing." } +} +Write-Host " headless client in the installer: rynth-headless and the x64 RynthAi, both $Version" Copy-Item (Join-Path $ScriptDir "Output\RynthCore-Setup.exe") "$rel\RynthCore-Setup.exe" Copy-Item (Join-Path $ScriptDir "staging\plugins\RynthAi\RynthCore.Plugin.RynthAi.dll") "$rel\plugins\" foreach ($name in $suitePlugins + $serverPlugins) { diff --git a/installer/RynthCore.iss b/installer/RynthCore.iss index 473bc27..1c21008 100644 --- a/installer/RynthCore.iss +++ b/installer/RynthCore.iss @@ -44,6 +44,9 @@ Name: desktopicon; Description: "Create a &desktop shortcut"; GroupDescription: ; overwritereadonly: a file left read-only on the player's PC is replaced without a question ; (a /SILENT update can't answer one); the build clears ReadOnly on everything staged, and Setup ; doesn't give installed files any attributes, so nothing lands read-only. +; This includes {app}\Headless (experimental): rynth-headless.exe with its own 64-bit .NET runtime and +; Headless\plugins\\ (the 64-bit plugin builds it runs), staged by Build-Installer.ps1. Nothing +; there is ever loaded by a game client; the x86 plugins below are unchanged. Source: "staging\app\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs overwritereadonly ; Plugin DLL goes to its canonical home next to plugin data dirs. diff --git a/src/RynthCore.App.Avalonia/CrashDumpWriters.cs b/src/RynthCore.App.Avalonia/CrashDumpWriters.cs index bb7c775..541c74c 100644 --- a/src/RynthCore.App.Avalonia/CrashDumpWriters.cs +++ b/src/RynthCore.App.Avalonia/CrashDumpWriters.cs @@ -71,7 +71,7 @@ internal static class CrashDumpWriters return result; } - private static string? TryGetCommandLine(int pid) + internal static string? TryGetCommandLine(int pid) { IntPtr h = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, false, pid); if (h == IntPtr.Zero) return null; diff --git a/src/RynthCore.App.Avalonia/MainWindow.axaml b/src/RynthCore.App.Avalonia/MainWindow.axaml index c8876c1..804bc37 100644 --- a/src/RynthCore.App.Avalonia/MainWindow.axaml +++ b/src/RynthCore.App.Avalonia/MainWindow.axaml @@ -390,6 +390,24 @@ ToolTip.Tip="Added to the end of every launch's command line, after the account, password and server the profiles set. It can't contain -a, -v, -h, -p or -rodat: set those in the account and server profiles. One line." AcceptsReturn="False" TextWrapping="Wrap" /> + + + + + + +