Hexen II

From LANCommander
Revision as of 02:13, 6 January 2024 by DoctorDalek (talk | contribs) (Created new page for Hexen II)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Developers
Raven Software
Publishers
id Software
Release Date
Windows: September 11, 1997
Genres
AdventureShooterRole-playing (RPG)
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play {InstallDir}\glh2.exe True

Install Script

Changes the display resolution to the primary display's resolution. Also updated the bit depth to 32bpp and scales the UI correctly.

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

$X = $Display.Bounds.Width
$Y = $Display.Bounds.Height

# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Pattern '^vid_config_glx "(.+)"' -Substitution "vid_config_glx ""$X""" -FilePath "$InstallDirectory\data1\Config.cfg"
Write-ReplaceContentInFile -Pattern '^vid_config_gly "(.+)"' -Substitution "vid_config_gly ""$X""" -FilePath "$InstallDirectory\data1\Config.cfg"
Write-ReplaceContentInFile -Pattern '^vid_config_bpp "(.+)"' -Substitution "vid_config_bpp ""32""" -FilePath "$InstallDirectory\data1\Config.cfg"
Write-ReplaceContentInFile -Pattern '^vid_config_consize "(.+)"' -Substitution "vid_config_consize ""752""" -FilePath "$InstallDirectory\data1\Config.cfg"

Name Change Script

# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Pattern '^_cl_name "(.+)"' -Substitution "cl_name ""$NewPlayerAlias""" -FilePath "$InstallDirectory\data1\Config.cfg"