F.E.A.R.

From LANCommander
Revision as of 00:43, 22 February 2024 by DoctorDalek (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Developers
Monolith Productions
Publishers
Sierra EntertainmentVivendi Universal Games
Release Date
Windows: October 17, 2005
Genres
Shooter
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Configuration Tool {InstallDir}\Config.exe False
Play F.E.A.R. {InstallDir}\FEARMP.exe True

Install Script

$Documents = [Environment]::GetFolderPath("CommonDocuments")
Copy-Item -Path "$InstallDirectory\Monolith Productions" -Destination "$Documents" -Recurse

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

# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Pattern '^"ScreenWidth" "(.+)"' -Substitution """ScreenWidth"" ""$($Display.Bounds.Width)""" -FilePath "$Documents\Monolith Productions\FEARCombat\Settings.cfg"
Write-ReplaceContentInFile -Pattern '^"ScreenHeight" "(.+)"' -Substitution """ScreenHeight"" ""$($Display.Bounds.Height)""" -FilePath "$Documents\Monolith Productions\FEARCombat\Settings.cfg"

Uninstall Script

$Documents = [Environment]::GetFolderPath("CommonDocuments")
Remove-Item -Path "$Documents\Monolith Productions" -Recurse -Force

Name Change Script

$Documents = [Environment]::GetFolderPath("CommonDocuments")

$bytes = ConvertTo-StringBytes -Input $NewPlayerAlias -Utf16 1 -MaxLength 15 -MinLength 15

Edit-PatchBinary -FilePath "$Documents\Monolith Productions\FEARCombat\Profiles\Profile000.gdb" -Offset 0x660 -Data $bytes

Key Change Script

$Documents = [Environment]::GetFolderPath("CommonDocuments")
Set-Content -Path "$Documents\Monolith Productions\FEARCombat\key.ini" -value "[FEAR]`nCDKey=$AllocatedKey" -Force