Aliens versus Predator 2

From LANCommander
Revision as of 02:01, 6 January 2024 by DoctorDalek (talk | contribs) (Created new page for Aliens versus Predator 2)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Developers
Third Law InteractiveMonolith ProductionsThe Omni Group
Publishers
MacPlayFox Interactive
Release Date
Windows: October 22, 2001
Genres
Shooter
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play Aliens versus Predator 2: Primal Hunt {InstallDir}\Aliens versus Predator 2 - Primal Hunt\start.exe True
Play Aliens versus Predator 2 {InstallDir}\Aliens vs. Predator 2\start.exe True

Install Script

#$Display = Get-PrimaryDisplay

# Bounds accessible via $Resolution.Height, $Resolution.Width
#$Resolution = Convert-AspectRatio -Width $Display.Bounds.Width -Height $Display.Bounds.Height -AspectRatio (4 / 3)

#Write-ReplaceContentInFile -Pattern '^"SCREENWIDTH" "(.+)"' -Substitution """SCREENWIDTH"" ""$($Resolution.Width)""" -FilePath "$InstallDirectory\Aliens vs. Predator 2\autoexec.cfg"
#Write-ReplaceContentInFile -Pattern '^"GameScreenWidth" "(.+)"' -Substitution """GameScreenWidth"" ""$($Resolution.Width)""" -FilePath "$InstallDirectory\Aliens vs. Predator 2\autoexec.cfg"
#Write-ReplaceContentInFile -Pattern '^"SCREENHEIGHT" "(.+)"' -Substitution """SCREENHEIGHT"" ""$($Resolution.Height)""" -FilePath "$InstallDirectory\Aliens vs. Predator 2\autoexec.cfg"
#Write-ReplaceContentInFile -Pattern '^"GameScreenHeight" "(.+)"' -Substitution """GameScreenHeight"" ""$($Resolution.Height)""" -FilePath "$InstallDirectory\Aliens vs. Predator 2\autoexec.cfg"
#Write-ReplaceContentInFile -Pattern '^"SCREENWIDTH" "(.+)"' -Substitution """SCREENWIDTH"" ""$($Resolution.Width)""" -FilePath "$InstallDirectory\Aliens versus Predator 2 - Primal Hunt\autoexec.cfg"
#Write-ReplaceContentInFile -Pattern '^"GameScreenWidth" "(.+)"' -Substitution """GameScreenWidth"" ""$($Resolution.Width)""" -FilePath "$InstallDirectory\Aliens versus Predator 2 - Primal Hunt\autoexec.cfg"
#Write-ReplaceContentInFile -Pattern '^"SCREENHEIGHT" "(.+)"' -Substitution """SCREENHEIGHT"" ""$($Resolution.Height)""" -FilePath "$InstallDirectory\Aliens versus Predator 2 - Primal Hunt\autoexec.cfg"
#Write-ReplaceContentInFile -Pattern '^"GameScreenHeight" "(.+)"' -Substitution """GameScreenHeight"" ""$($Resolution.Height)""" -FilePath "$InstallDirectory\Aliens versus Predator 2 - Primal Hunt\autoexec.cfg"
# Define the path to the autoexec.cfg file
$filePath = "$InstallDirectory\Aliens versus Predator 2 - Primal Hunt\autoexec.cfg"

# Get the screen resolution
Add-Type -AssemblyName System.Windows.Forms
$screen = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Size
$width = $screen.Width
$height= $screen.Height

# Read the content of the file
$content = Get-Content -Path $filePath

# Loop through each line in the file
for ($i = 0; $i -lt $content.Count; $i++) {
    $line = $content[$i]

    # Check if the line contains "SCREENWIDTH" and "640"
    if ($line -like '*SCREENWIDTH*') {
        # Replace the line with the updated width
        $content[$i] = """SCREENWIDTH"" ""$width"""
    }
        if ($line -like '*GameScreenWidth*') {
        # Replace the line with the updated width
        $content[$i] = """GameScreenWidth"" ""$width"""
    }
     if ($line -like '*SCREENHEIGHT*') {
        # Replace the line with the updated height
        $content[$i] = """SCREENHEIGHT"" ""$height"""
    }
         if ($line -like '*GameScreenHeight*') {
       # Replace the line with the updated height
        $content[$i] = """GameScreenHeight"" ""$height"""
    }
}

# Save the updated content back to the file
$content | Set-Content -Path $filePath

Name Change Script

Write-ReplaceContentInFile -Pattern '^PlayerName = "(.+)"' -Substitution "PlayerName = ""$NewPlayerAlias""" -FilePath "$InstallDirectory\Aliens versus Predator 2 - Primal Hunt\Profiles\Player_0.txt"
Write-ReplaceContentInFile -Pattern '^PlayerName = "(.+)"' -Substitution "PlayerName = ""$NewPlayerAlias""" -FilePath "$InstallDirectory\Aliens vs. Predator 2\Profiles\Player_0.txt"