Recoil

From LANCommander
Revision as of 21:55, 8 January 2024 by DoctorDalek (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Developers
Zipper Interactive
Publishers
Electronic Arts
Release Date
Windows: March 11, 1999
View at PCGamingWiki

Actions

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

Install Script

Creates the default values in the registry.

$Display = Get-PrimaryDisplay

New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper"
New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL"
New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0"
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "VMode" -Value 7 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "WOLPasswordFlag" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "Joystick" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "HWAPI" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "HUDType_HW" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "HUDType_SW" -Value 2 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "HUDFlag_HW" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "HUDFlag_SW" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "FullScreen" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "CDAudio" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "PlayerName" -PropertyType Binary -Value ([byte[]]@(
	0x56, 0x69, 0x6E, 0x74, 0x61, 0x67, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
)) -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "SoundAPI" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "SoundLOD" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "MuteSound" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "GameIntensity" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "GameCtlOptions" -Value 8 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "TextureMemory_HW" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "TextureMemory_SW" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "ObjectLOD_HW" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "ObjectLOD_SW" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "GfxFlags_HW" -Value 31 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "GfxFlags_SW" -Value 15 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "EffectsLevel_HW" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "EffectsLevel_SW" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "HWCardFlag" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "CmdMap" -PropertyType Binary -Value ([byte[]]@(
	0x00, 0x00, 0x00, 0x00, 0xD0, 0x00, 0x00, 0x00, 0xCB, 0x00, 0x00, 0x00, 0xCD, 0x00, 0x00, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x2E, 0x00, 0x80, 0x01
	0x2B, 0x00, 0x40, 0x01, 0x30, 0x00, 0x00, 0x00, 0x30, 0x02, 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x80, 0x08, 0x39, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x02, 0x00
	0x03, 0x80, 0x02, 0x00, 0x04, 0x88, 0x02, 0x00, 0x05, 0x58, 0x02, 0x00, 0x06, 0x60, 0x02, 0x00, 0x07, 0x68, 0x02, 0x00, 0x08, 0x38, 0x02, 0x00, 0x09, 0x40, 0x02, 0x00, 0x0A, 0x48, 0x02, 0x00
	0x18, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00
	0x3F, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x2D, 0x02, 0x00, 0x00, 0x18, 0x04, 0x00, 0x00, 0x3B, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x00, 0x00
	0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
)) -Force

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

Write-ReplaceContentInFile -Pattern '^Resolution (.+)' -Substitution "Resolution = h:$($Resolution.Width), v:$($Resolution.Height), refrate:60" -FilePath "$InstallDirectory\dgVoodoo.conf"

Uninstall Script

Removes the registry tree created by the installer

Remove-Item -Path "HKCU:\Software\Zipper\RECOIL" -Force -Recurse

Name Change Script

Player names are stored in the registry as a 22-byte, ASCII-encoded binary key.

$NewPlayerAliasHex = ConvertTo-StringBytes -Input $NewPlayerAlias -MaxLength 22 -MinLength 22

New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Zipper\RECOIL\1.0" -Name "PlayerName" -PropertyType Binary -Value $NewPlayerAliasHex -Force