Aliens vs. Predator 2: Primal Hunt

From LANCommander
Revision as of 00:37, 22 February 2024 by DoctorDalek (talk | contribs) (Created new page for Aliens vs. Predator 2: Primal Hunt)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Developers
Third Law Entertainment
Publishers
Sierra Entertainment
Release Date
Windows: August 13, 2002
Genres
Shooter
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play Aliens vs. Predator 2: Primal Hunt {InstallDir}\lithtech.exe -cmdfile avp2cmds.txt True
Run Launcher {InstallDir}\PrimalHunt.exe False

Install Script

# Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height
$Display = Get-PrimaryDisplay

Write-ReplaceContentInFile -Pattern '^"SCREENWIDTH" "(.+)"' -Substitution """SCREENWIDTH"" ""$($Display.Bounds.Width)""" -FilePath "$InstallDirectory\autoexec.cfg"
Write-ReplaceContentInFile -Pattern '^"GameScreenWidth" "(.+)"' -Substitution """GameScreenWidth"" ""$($Display.Bounds.Width)""" -FilePath "$InstallDirectory\autoexec.cfg"
Write-ReplaceContentInFile -Pattern '^"SCREENHEIGHT" "(.+)"' -Substitution """SCREENHEIGHT"" ""$($Display.Bounds.Height)""" -FilePath "$InstallDirectory\autoexec.cfg"
Write-ReplaceContentInFile -Pattern '^"GameScreenHeight" "(.+)"' -Substitution """GameScreenHeight"" ""$($Display.Bounds.Height)""" -FilePath "$InstallDirectory\autoexec.cfg"

New-Item -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Third Law Interactive\Aliens versus Predator 2: Primal Hunt\1.0" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Third Law Interactive\Aliens versus Predator 2: Primal Hunt\1.0" -Name "InstallDir" -Value "$InstallDirectory" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Third Law Interactive\Aliens versus Predator 2: Primal Hunt\1.0" -Name "Language" -Value "English" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Third Law Interactive\Aliens versus Predator 2: Primal Hunt\1.0" -Name "Disable Hardware Cursor" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Third Law Interactive\Aliens versus Predator 2: Primal Hunt\1.0" -Name "Disable Joysticks" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Third Law Interactive\Aliens versus Predator 2: Primal Hunt\1.0" -Name "Disable Hardware Movies" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Third Law Interactive\Aliens versus Predator 2: Primal Hunt\1.0" -Name "Disable Hardware Music" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Third Law Interactive\Aliens versus Predator 2: Primal Hunt\1.0" -Name "Disable Hardware Sound" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Third Law Interactive\Aliens versus Predator 2: Primal Hunt\1.0" -Name "Disable Hardware Triple Buffering" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Third Law Interactive\Aliens versus Predator 2: Primal Hunt\1.0" -Name "Num Launcher Runs" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Third Law Interactive\Aliens versus Predator 2: Primal Hunt\1.0" -Name "PatchRez" -Value "-rez avp2p.rez -rez avp2p1.rez -rez avp2x.rez" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Third Law Interactive\Aliens versus Predator 2: Primal Hunt\1.0" -Name "Disable Movies" -Value 1 -Force

Uninstall Script

Remove-Item -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Third Law Interactive\Aliens versus Predator 2: Primal Hunt" -Force -Recurse

Name Change Script

Write-ReplaceContentInFile -Pattern '^PlayerName = "(.+)"' -Substitution "PlayerName = ""$NewPlayerAlias""" -FilePath "$InstallDirectory\Profiles\Player_0.txt"
Write-ReplaceContentInFile -Pattern '^PlayerName = "(.+)"' -Substitution "PlayerName = ""$NewPlayerAlias""" -FilePath "$InstallDirectory\Profiles\Player_0.txt"