docs/scripts: remove legacy scripts, add portable play-6gb launcher, and update README
CI / check (push) Canceled after 0s
CI / check (push) Canceled after 0s
This commit is contained in:
1 parent
5fff0f1fb7
commit
de86068a05
7 files changed
+363
-595
No files matched your search
@@ -0,0 +1,253 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Portable launcher tuned for 6-8 GB VRAM GPUs and 16 GB RAM PCs (windowed by default).
|
||||
.EXAMPLE
|
||||
powershell -ExecutionPolicy Bypass -File scripts\play-6gb.ps1 -Exe 'D:\Games\MyDump\game_scarlett_master.exe'
|
||||
.EXAMPLE
|
||||
powershell -ExecutionPolicy Bypass -File scripts\play-6gb.ps1 -Exe 'D:\Games\MyDump\game_scarlett_master.exe' -FrameGen -Output '1664x936'
|
||||
#>
|
||||
param(
|
||||
[string]$Exe = '',
|
||||
[ValidateSet('1080', '936', '720')][string]$Output = '1080',
|
||||
[ValidateSet('performance', 'balanced', 'quality', 'dlaa', 'off')][string]$Dlss = 'performance',
|
||||
[ValidateRange(0, 2)][int]$DropMips = 1,
|
||||
[switch]$FrameGen,
|
||||
[ValidateSet('fsr', 'dlss', 'auto')][string]$FgType = 'fsr',
|
||||
[ValidateRange(2, 6)][int]$FrameGenX = 2,
|
||||
[switch]$Preload,
|
||||
[string]$LogFile = ''
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Continue'
|
||||
$repo = Split-Path -Parent $PSScriptRoot
|
||||
$victory = Join-Path $repo 'target\release\victory.exe'
|
||||
$homeDir = if ($env:VICTORY_HOME) { $env:VICTORY_HOME } else { Join-Path $env:LOCALAPPDATA 'victory' }
|
||||
$cacheDir = Join-Path $homeDir 'cache'
|
||||
$dataDir = Join-Path $homeDir 'data'
|
||||
$menuFile = Join-Path $homeDir 'victory-settings.txt'
|
||||
$slDir = if ($env:VICTORY_STREAMLINE_DIR) { $env:VICTORY_STREAMLINE_DIR } else { Join-Path $repo 'nvidia-sdk\Streamline\bin\x64' }
|
||||
$fxDir = if ($env:VICTORY_FIDELITYFX_DIR) { $env:VICTORY_FIDELITYFX_DIR } else { Join-Path $repo 'amd-sdk\FidelityFX\bin' }
|
||||
|
||||
# Resolve title executable from -Exe, VICTORY_GAME_DIR, or victory.toml
|
||||
if (-not $Exe -and $env:VICTORY_GAME_DIR) {
|
||||
$Exe = Join-Path $env:VICTORY_GAME_DIR 'game_scarlett_master.exe'
|
||||
}
|
||||
if (-not $Exe) {
|
||||
$toml = Join-Path $repo 'victory.toml'
|
||||
if (Test-Path -LiteralPath $toml) {
|
||||
$m = Select-String -Path $toml -Pattern '^\s*game_dir\s*=\s*"([^"]+)"' | Select-Object -First 1
|
||||
if ($m) { $Exe = Join-Path $m.Matches[0].Groups[1].Value 'game_scarlett_master.exe' }
|
||||
}
|
||||
}
|
||||
if (-not $Exe -or -not (Test-Path -LiteralPath $Exe)) {
|
||||
Write-Host 'Title executable not found. Pass it with -Exe:'
|
||||
Write-Host " powershell -ExecutionPolicy Bypass -File scripts\play-6gb.ps1 -Exe 'C:\Path\To\game_scarlett_master.exe'"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Build release binary automatically on first run
|
||||
if (-not (Test-Path -LiteralPath $victory)) {
|
||||
Write-Host 'Building release binary (first run only, takes a few minutes)...'
|
||||
Push-Location $repo
|
||||
try {
|
||||
& cargo build --release --locked -j 4 -p victory
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
}
|
||||
|
||||
New-Item -ItemType Directory -Force $cacheDir | Out-Null
|
||||
New-Item -ItemType Directory -Force $dataDir | Out-Null
|
||||
|
||||
# Read saved F1 menu overrides
|
||||
$menu = [ordered]@{}
|
||||
if (Test-Path -LiteralPath $menuFile) {
|
||||
foreach ($line in Get-Content -LiteralPath $menuFile) {
|
||||
if ($line -match '^\s*(VICTORY_[A-Z0-9_]+)\s*=(.*)$') {
|
||||
$menu[$Matches[1]] = $Matches[2].Trim()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$seriesS = $true
|
||||
$res = '1080to1440'
|
||||
$sRes = '540'
|
||||
$dlssMode = $Dlss
|
||||
$fgOn = [bool]$FrameGen
|
||||
$timesWanted = $FrameGenX
|
||||
$fgKind = $FgType
|
||||
$fpsWanted = 1000
|
||||
|
||||
if ($menu.Contains('VICTORY_MENU_CONSOLE')) { $seriesS = $menu['VICTORY_MENU_CONSOLE'] -eq 'series-s' }
|
||||
if ($menu['VICTORY_MENU_RES'] -in '1440', '1080to1440', '4k') { $res = $menu['VICTORY_MENU_RES'] }
|
||||
if ($menu['VICTORY_MENU_S_RES'] -in '1080', '720', '626', '540') { $sRes = $menu['VICTORY_MENU_S_RES'] }
|
||||
if ($menu['VICTORY_MENU_DLSS'] -in 'off', 'dlaa', 'quality', 'balanced', 'performance') { $dlssMode = $menu['VICTORY_MENU_DLSS'] }
|
||||
if ($seriesS -and $dlssMode -ne 'off' -and $menu.Contains('VICTORY_MENU_S_RES')) {
|
||||
$sMap = @{ '1080' = 'dlaa'; '720' = 'quality'; '626' = 'balanced'; '540' = 'performance' }
|
||||
if ($sMap.ContainsKey($sRes)) { $dlssMode = $sMap[$sRes] }
|
||||
}
|
||||
if ($menu.Contains('VICTORY_MENU_FRAMEGEN')) {
|
||||
$fgOn = $menu['VICTORY_MENU_FRAMEGEN'] -match '^[1-6]$'
|
||||
if ($menu['VICTORY_MENU_FRAMEGEN'] -match '^[2-6]$') { $timesWanted = [int]$menu['VICTORY_MENU_FRAMEGEN'] }
|
||||
}
|
||||
if ($menu['VICTORY_MENU_FG_TYPE'] -in 'auto', 'dlss', 'fsr') { $fgKind = $menu['VICTORY_MENU_FG_TYPE'] }
|
||||
if ($menu['VICTORY_MENU_FPS'] -match '^\d+$' -and [int]$menu['VICTORY_MENU_FPS'] -ge 1 -and [int]$menu['VICTORY_MENU_FPS'] -le 1000) {
|
||||
$fpsWanted = [int]$menu['VICTORY_MENU_FPS']
|
||||
}
|
||||
|
||||
$settings = [ordered]@{
|
||||
VICTORY_CACHE_DIR = $cacheDir
|
||||
VICTORY_DATA_DIR = $dataDir
|
||||
VICTORY_LOG = 'info'
|
||||
|
||||
# CPU threading & submission (FAST_CORES=0 uses both P+E cores on hybrid CPUs)
|
||||
VICTORY_THIN = '0'
|
||||
VICTORY_ASYNC_SUBMIT = '1'
|
||||
VICTORY_JOIN_PARTS = '8'
|
||||
VICTORY_RELAY = '2'
|
||||
VICTORY_RELAY_COPY = '1'
|
||||
VICTORY_WIDE_BACK = '1'
|
||||
VICTORY_CARD_REHASH_RUNS = '1'
|
||||
VICTORY_JOIN_COPIES = '1'
|
||||
VICTORY_CARD_STEPS = '2'
|
||||
VICTORY_CARD_AWAKE = '1'
|
||||
VICTORY_CARD_BUFFERS_MIN_KB = '64'
|
||||
VICTORY_CARD_BUFFERS_MB = '1280'
|
||||
VICTORY_CARD_ROOM_FOR_TARGETS_MB = '1024'
|
||||
VICTORY_CARD_WINDOWS_MB = '0'
|
||||
VICTORY_PORT_CONSTANTS = '1'
|
||||
VICTORY_INDIRECT_WINDOW = '1'
|
||||
VICTORY_INDIRECT_BATCH = '2'
|
||||
VICTORY_UPLOAD_AHEAD = '1'
|
||||
VICTORY_SHOW_AFTER = '1'
|
||||
VICTORY_MAP_THREADS = '1'
|
||||
VICTORY_FAST_CORES = '0'
|
||||
VICTORY_INPLACE = '1'
|
||||
VICTORY_INPLACE_MB = '512'
|
||||
VICTORY_TEXSPK_PASS_MS = '8'
|
||||
VICTORY_PASSES_HOT = '1'
|
||||
VICTORY_HELPER_PRIORITY = '1'
|
||||
VICTORY_WC_NO_BACK = '1'
|
||||
VICTORY_WC_NO_BACK_MIN_KB = '1024'
|
||||
VICTORY_SOFT_VIEWS = 'copies'
|
||||
|
||||
# Texture streaming + 6 GB VRAM mip scale
|
||||
VICTORY_TEXTURE_POOL = '1'
|
||||
VICTORY_RIPE_BLOCKS = '0'
|
||||
VICTORY_TEXTURE_NO_WAIT = '1'
|
||||
VICTORY_TEXTURE_CATCHUP = '0'
|
||||
VICTORY_TEXTURE_STAGE_MS = '16'
|
||||
VICTORY_LEVELS_ON_DEMAND = '0'
|
||||
VICTORY_PRELUDE_UPLOADS = '1'
|
||||
VICTORY_SHOW_NEW_LATER = '1'
|
||||
VICTORY_POOL_SMALL = '0'
|
||||
VICTORY_TABLED_REREAD = '1'
|
||||
VICTORY_QUEUE_HOST_TEXTURES = '0'
|
||||
VICTORY_TEXTURE_DROP_MIPS = [string]$DropMips
|
||||
|
||||
# Descriptor heap fast sync
|
||||
VICTORY_HEAP_SYNC_FIRST = '1'
|
||||
VICTORY_SYNC_IN_PLACE = '1'
|
||||
VICTORY_SPANS_QUICK = '1'
|
||||
VICTORY_SYNC_FINE = '1'
|
||||
VICTORY_HEAP_SYNC_AT_SUBMIT = '1'
|
||||
|
||||
# Visuals (windowed by default; toggleable in F1 menu)
|
||||
VICTORY_AMBIENT = '0.8'
|
||||
VICTORY_AMBIENT_AIR = '1.5'
|
||||
VICTORY_AMBIENT_SPECULAR = '1'
|
||||
VICTORY_WATER_LIGHT = '1'
|
||||
VICTORY_EARLY_DEPTH = '1'
|
||||
VICTORY_LEAVE_OUT = '02384a60fda6f2d0,731a39171b568298'
|
||||
|
||||
# Pipeline caching + short wait cap to prevent 500 ms shader-compile freezes
|
||||
VICTORY_PIPELINE_BOOK = '1'
|
||||
VICTORY_PIPELINE_WAIT_MS = '50'
|
||||
|
||||
# Memory stack (SLOT_EVICT aligned above ROOM% to prevent eviction thrashing)
|
||||
VICTORY_SLOT_EVICT = '1'
|
||||
VICTORY_SLOT_EVICT_PERCENT = '92'
|
||||
VICTORY_SLOT_EVICT_LOW_PERCENT = '82'
|
||||
VICTORY_ALLOCATOR_TRIM = '1'
|
||||
VICTORY_BUDGET_PACK = '1'
|
||||
VICTORY_TEARING = '1'
|
||||
VICTORY_FPS_LINE = '1'
|
||||
}
|
||||
|
||||
if ($Output -eq '936') { $settings['VICTORY_OUTPUT'] = '1664x936' }
|
||||
elseif ($Output -eq '720') { $settings['VICTORY_OUTPUT'] = '1280x720' }
|
||||
|
||||
if (-not $seriesS) {
|
||||
if ($res -eq '1440') { $settings['VICTORY_NATIVE_1440P'] = '1' }
|
||||
elseif ($res -eq '1080to1440') { $settings['VICTORY_RENDER_1080P'] = '1' }
|
||||
}
|
||||
|
||||
if ($dlssMode -ne 'off' -and (Test-Path (Join-Path $slDir 'sl.interposer.dll'))) {
|
||||
$settings['VICTORY_DLSS'] = '1'
|
||||
$settings['VICTORY_DLSS_MODE'] = $dlssMode
|
||||
$settings['VICTORY_STREAMLINE_DIR'] = $slDir
|
||||
}
|
||||
|
||||
if ($dlssMode -ne 'off' -and $fgOn) {
|
||||
if ($fgKind -ne 'dlss' -and (Test-Path (Join-Path $fxDir 'amd_fidelityfx_framegeneration_dx12.dll'))) {
|
||||
$settings['VICTORY_FSR_FRAMEGEN'] = '1'
|
||||
$settings['VICTORY_FIDELITYFX_DIR'] = $fxDir
|
||||
$settings['VICTORY_FRAMEGEN_X'] = [string]$timesWanted
|
||||
$settings['VICTORY_TEXTURE_ROOM_PERCENT'] = '82'
|
||||
$settings['VICTORY_WINDOWS_BAR_MB'] = '128'
|
||||
} elseif ($fgKind -eq 'dlss') {
|
||||
$settings['VICTORY_FRAMEGEN'] = '1'
|
||||
$settings['VICTORY_FRAMEGEN_X'] = [string]$timesWanted
|
||||
$settings['VICTORY_TEXTURE_ROOM_PERCENT'] = '82'
|
||||
$settings['VICTORY_WINDOWS_BAR_MB'] = '128'
|
||||
}
|
||||
} else {
|
||||
$settings['VICTORY_TEXTURE_ROOM_PERCENT'] = '85'
|
||||
$settings['VICTORY_WINDOWS_BAR_MB'] = '256'
|
||||
}
|
||||
|
||||
$settings['VICTORY_FRAME_INTERVAL_US'] = [string][int][math]::Round(1000000 / $fpsWanted)
|
||||
|
||||
# Apply saved F1 menu overrides
|
||||
foreach ($k in $menu.Keys) {
|
||||
if ($k -like 'VICTORY_MENU_*') { continue }
|
||||
if ($menu[$k]) { $settings[$k] = $menu[$k] } else { $settings.Remove($k) }
|
||||
}
|
||||
|
||||
$console = if ($seriesS) { 'series-s' } else { 'series-x' }
|
||||
$settings['VICTORY_MENU_CONSOLE'] = $console
|
||||
$settings['VICTORY_MENU_RES'] = $res
|
||||
$settings['VICTORY_MENU_S_RES'] = $sRes
|
||||
$settings['VICTORY_MENU_DLSS'] = if ($settings.Contains('VICTORY_DLSS')) { $dlssMode } else { 'off' }
|
||||
$settings['VICTORY_MENU_FRAMEGEN'] = if ($settings.Contains('VICTORY_FSR_FRAMEGEN') -or $settings.Contains('VICTORY_FRAMEGEN')) { [string]$timesWanted } else { '0' }
|
||||
$settings['VICTORY_MENU_FG_TYPE'] = $fgKind
|
||||
$settings['VICTORY_MENU_FPS'] = [string]$fpsWanted
|
||||
$settings['VICTORY_MENU_FILE'] = $menuFile
|
||||
$settings['VICTORY_MENU_PLAY'] = $MyInvocation.MyCommand.Path
|
||||
$settings['VICTORY_MENU_ARGS'] = "-Exe '$($Exe -replace "'", "''")'"
|
||||
|
||||
Get-ChildItem Env:VICTORY_* -ErrorAction SilentlyContinue | ForEach-Object { Remove-Item "Env:$($_.Name)" }
|
||||
foreach ($k in $settings.Keys) { Set-Item "Env:$k" $settings[$k] }
|
||||
|
||||
Write-Host "Launching VIctory (6 GB VRAM / 16 GB RAM preset)..."
|
||||
Write-Host " Window: $(if ($settings['VICTORY_OUTPUT']) { $settings['VICTORY_OUTPUT'] } else { '1920x1080' }) | Console: $console | DLSS: $($settings['VICTORY_MENU_DLSS']) | FG: $($settings['VICTORY_MENU_FRAMEGEN'])x ($fgKind) | DropMips: $($settings['VICTORY_TEXTURE_DROP_MIPS'])"
|
||||
Write-Host " Home: $homeDir"
|
||||
Write-Host " Tip: Press F1 for Settings Menu, F3 for Stats Panel."
|
||||
Write-Host ""
|
||||
|
||||
Push-Location $repo
|
||||
try {
|
||||
if ($Preload) {
|
||||
Write-Host "Preloading shaders into $cacheDir..."
|
||||
& $victory preload ([IO.Path]::GetDirectoryName($Exe))
|
||||
}
|
||||
if ($LogFile) {
|
||||
& $victory run $Exe --console $console --execute 2> $LogFile
|
||||
} else {
|
||||
& $victory run $Exe --console $console --execute
|
||||
}
|
||||
exit $LASTEXITCODE
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
@@ -1,146 +0,0 @@
|
||||
# One-click GTA VI on trustno1-coder/VIctory-NVIDIA (foxhound base): DLSS Super Resolution + DLSS frame generation.
|
||||
# PLAY_FRAMEGEN.cmd runs this. What it does, in order:
|
||||
# 1. finds the game folder (game_dir.txt in the repository folder, else a search of every drive)
|
||||
# 2. backs up the saves (%LOCALAPPDATA%\victory\data\7952987A) and checks every file by SHA-256
|
||||
# 3. gets NVIDIA's DLSS files once (scripts\get-nvidia-sdks.ps1, from github.com/NVIDIA-RTX/Streamline)
|
||||
# 4. starts scripts\play-foxhound.ps1, which builds the layer the first time (a few minutes)
|
||||
# Modes: 1 Series X 1440p + DLSS Quality + frame generation 2x (default)
|
||||
# 2 same without frame generation
|
||||
# 3 Series S + DLSS Quality + frame generation 2x (faster, softer)
|
||||
# 4 Series X 1440p + DLSS Performance + frame generation 2x
|
||||
param(
|
||||
[ValidateSet('1', '2', '3', '4', '5', '6')][string]$Mode = '1',
|
||||
[string]$GameDir = '',
|
||||
[switch]$Check,
|
||||
[switch]$NoBackup
|
||||
)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$repo = Split-Path $PSScriptRoot -Parent
|
||||
|
||||
# A game folder holds the executable and its data (a lone copy of the exe does not count).
|
||||
function Test-GameDir([string]$d) {
|
||||
if (-not $d -or -not (Test-Path (Join-Path $d 'game_scarlett_master.exe'))) { return $false }
|
||||
return (Test-Path (Join-Path $d 'shaders.rpf')) -or (Test-Path (Join-Path $d 'MicrosoftGame.config'))
|
||||
}
|
||||
function Find-GameDir {
|
||||
$txt = Join-Path $repo 'game_dir.txt'
|
||||
if (Test-Path $txt) {
|
||||
$d = (Get-Content $txt -Encoding UTF8 -TotalCount 1).Trim().Trim('"')
|
||||
if (Test-GameDir $d) { return $d }
|
||||
}
|
||||
foreach ($drive in (Get-PSDrive -PSProvider FileSystem | Where-Object { $null -ne $_.Free })) {
|
||||
$cands = @(Get-ChildItem $drive.Root -Directory -ErrorAction SilentlyContinue)
|
||||
$cands += @($cands | ForEach-Object { Get-ChildItem $_.FullName -Directory -ErrorAction SilentlyContinue })
|
||||
foreach ($c in $cands) { if (Test-GameDir $c.FullName) { return $c.FullName } }
|
||||
}
|
||||
return $null
|
||||
}
|
||||
|
||||
if (-not $GameDir) { $GameDir = Find-GameDir }
|
||||
if (-not (Test-GameDir $GameDir)) {
|
||||
Write-Host 'Game folder not found. Put its full path on the first line of game_dir.txt in this folder.'
|
||||
exit 1
|
||||
}
|
||||
$gameExe = Join-Path $GameDir 'game_scarlett_master.exe'
|
||||
|
||||
switch ($Mode) {
|
||||
'1' { $opts = @{ FrameGen = $true }; $what = 'Series X 2560x1440, DLSS Quality, frame generation 2x' }
|
||||
'2' { $opts = @{}; $what = 'Series X 2560x1440, DLSS Quality, no frame generation' }
|
||||
'3' { $opts = @{ SeriesS = $true; FrameGen = $true }; $what = 'Series S, DLSS Quality, frame generation 2x' }
|
||||
'4' { $opts = @{ Dlss = 'performance'; FrameGen = $true }; $what = 'Series X 2560x1440, DLSS Performance, frame generation 2x' }
|
||||
'5' { $opts = @{ SeriesS = $true; Dlss = 'performance'; FrameGen = $true; Fps = 1000 }; $what = 'EXTREME: Series S, DLSS Performance, frame generation 2x, no cap, big pools, High priority' }
|
||||
'6' { $opts = @{ Dlss = 'performance'; FrameGen = $true; Fps = 1000 }; $what = 'EXTREME: Series X 2560x1440, DLSS Performance, frame generation 2x, no cap, big pools, High priority' }
|
||||
}
|
||||
$sl = Join-Path $repo 'nvidia-sdk\Streamline\bin\x64'
|
||||
$victory = Join-Path $repo 'target\release\victory.exe'
|
||||
$hags = (Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\GraphicsDrivers' -Name HwSchMode -ErrorAction SilentlyContinue).HwSchMode
|
||||
$isWin11 = [Environment]::OSVersion.Version.Build -ge 22000
|
||||
$hagsOff = ($hags -eq 1) -or ($null -eq $hags -and -not $isWin11)
|
||||
$hagsText = if ($hags -eq 2) {
|
||||
'on'
|
||||
} elseif ($null -eq $hags -and $isWin11) {
|
||||
'default (on in Windows 11)'
|
||||
} else {
|
||||
'off: frame generation needs it (Settings > Display > Graphics)'
|
||||
}
|
||||
|
||||
if ($Check) {
|
||||
Write-Host "repo: $repo"
|
||||
Write-Host "game: $gameExe"
|
||||
Write-Host "mode: $Mode ($what)"
|
||||
Write-Host "DLSS: $(if (Test-Path (Join-Path $sl 'sl.interposer.dll')) { 'present' } else { 'not yet (downloaded at first start)' })"
|
||||
Write-Host "built: $(if (Test-Path $victory) { 'yes' } else { 'no (built at first start)' })"
|
||||
Write-Host "HAGS: $hagsText"
|
||||
exit 0
|
||||
}
|
||||
if (Get-Process victory -ErrorAction SilentlyContinue) { Write-Host 'The game is already running. Close it first.'; exit 1 }
|
||||
|
||||
# 2. Saves backup, verified file by file.
|
||||
if (-not $NoBackup) {
|
||||
$src = Join-Path $env:LOCALAPPDATA 'victory\data\7952987A'
|
||||
if (Test-Path $src) {
|
||||
$root = if (Test-Path 'D:\') { 'D:\victory-save-backups' } else { Join-Path $env:USERPROFILE 'victory-save-backups' }
|
||||
$dst = Join-Path $root ('7952987A-{0:yyyyMMdd-HHmmss}-before-nvidia' -f (Get-Date))
|
||||
New-Item -ItemType Directory -Force $root | Out-Null
|
||||
Copy-Item $src $dst -Recurse -Force
|
||||
$files = @(Get-ChildItem $src -Recurse -File)
|
||||
$bad = 0
|
||||
foreach ($f in $files) {
|
||||
$t = Join-Path $dst $f.FullName.Substring($src.Length)
|
||||
try {
|
||||
if (-not (Test-Path $t) -or (Get-FileHash $f.FullName).Hash -ne (Get-FileHash $t).Hash) { $bad++ }
|
||||
} catch { $bad++ }
|
||||
}
|
||||
if ($bad) { Write-Host "Save backup check failed ($bad of $($files.Count) files). Not starting."; exit 1 }
|
||||
Write-Host "Saves backed up and checked: $dst ($($files.Count) files)"
|
||||
}
|
||||
}
|
||||
|
||||
# 3. NVIDIA's DLSS and frame generation files, once.
|
||||
if (-not (Test-Path (Join-Path $sl 'sl.interposer.dll'))) {
|
||||
Write-Host 'Getting NVIDIA DLSS files (about 70 MB, once) ...'
|
||||
try { & (Join-Path $PSScriptRoot 'get-nvidia-sdks.ps1') }
|
||||
catch { Write-Host "Could not get them ($($_.Exception.Message)): the game runs without DLSS and frame generation." }
|
||||
}
|
||||
if ($hagsOff) { Write-Host 'Hardware-accelerated GPU scheduling is off: frame generation will not work until it is on.' }
|
||||
|
||||
# 4. Start (play-foxhound.ps1 builds target\release\victory.exe the first time).
|
||||
if (-not (Test-Path $victory)) { Write-Host 'First start: building the layer, a few minutes ...' }
|
||||
Write-Host "Starting GTA VI: $what"
|
||||
Write-Host 'In the game: F1 settings menu, F3 stats panel. Keep this window open while playing.'
|
||||
$env:VICTORY_GAME_DIR = $GameDir
|
||||
$ErrorActionPreference = 'Continue'
|
||||
# foxhound reads these but play-foxhound.ps1 does not set them: AnyXboxX's worker pools for 16/24+ logical CPUs
|
||||
# (measured on an RTX 4070 SUPER: heavy scenes +22-29 %) and Vice-Tay's placed order. GTA6_NO_TUNE=1: leave them out.
|
||||
$cpus = [Environment]::ProcessorCount
|
||||
$more = @{ VICTORY_PLACED_ORDER = '1' }
|
||||
if ($cpus -ge 24) { $more.VICTORY_THIN_THREADS = '12'; $more.VICTORY_UNDER_THREADS = '8'; $more.VICTORY_LAND_THREADS = '8' }
|
||||
elseif ($cpus -ge 16) { $more.VICTORY_THIN_THREADS = '12'; $more.VICTORY_UNDER_THREADS = '8'; $more.VICTORY_LAND_THREADS = '6' }
|
||||
# Extreme: the landing pool sat full at 8 (x6.1-6.6 of 8 in AnyXboxX's heavy scenes), one more pipeline worker.
|
||||
if (($Mode -in @('5', '6')) -and $cpus -ge 24) { $more.VICTORY_LAND_THREADS = '12'; $more.VICTORY_PIPELINE_WORKERS = '4' }
|
||||
if ($env:GTA6_NO_TUNE -eq '1') { $more = @{}; Write-Host 'GTA6_NO_TUNE=1: foxhound defaults (no pool or placed-order tuning).' }
|
||||
else { Write-Host ("Tuning for {0} logical CPUs: {1}" -f $cpus, (($more.GetEnumerator() | Sort-Object Name | ForEach-Object { "$($_.Name)=$($_.Value)" }) -join ' ')) }
|
||||
$opts.More = $more
|
||||
# RTX 50 cards do multi frame generation: 4x there (the layer asks the driver and gives no more than it does).
|
||||
# GTA6_FRAMEGEN_X=2..6 overrides. RTX 40 stays at 2x.
|
||||
$gpuName = (Get-CimInstance Win32_VideoController -ErrorAction SilentlyContinue | Where-Object { $_.Name -match 'NVIDIA' } | Select-Object -First 1).Name
|
||||
if ($opts.FrameGen) {
|
||||
if ($env:GTA6_FRAMEGEN_X -match '^[2-6]$') { $opts.FrameGenX = [int]$env:GTA6_FRAMEGEN_X }
|
||||
elseif ($gpuName -match 'RTX\s*50\d\d') { $opts.FrameGenX = 4 }
|
||||
$fgx = if ($opts.FrameGenX) { $opts.FrameGenX } else { 2 }
|
||||
Write-Host ('GPU: {0}; frame generation {1}x' -f $gpuName, $fgx)
|
||||
}
|
||||
if ($Mode -in @('5', '6')) {
|
||||
# Raise the game to High priority once it is up (the submitting thread is the limit).
|
||||
$null = Start-Job -ArgumentList $repo -ScriptBlock {
|
||||
param($r)
|
||||
$end = (Get-Date).AddMinutes(15)
|
||||
while ((Get-Date) -lt $end) {
|
||||
$p = Get-Process victory -ErrorAction SilentlyContinue | Where-Object { $_.Path -like "$r*" }
|
||||
if ($p) { $p | ForEach-Object { $_.PriorityClass = 'High' }; break }
|
||||
Start-Sleep -Seconds 2
|
||||
}
|
||||
}
|
||||
Write-Host 'Extreme: the game process goes to High priority once it starts.'
|
||||
}
|
||||
& (Join-Path $PSScriptRoot 'play-foxhound.ps1') -Exe $gameExe -Build release @opts
|
||||
Reference in new issue
Block a user