Halo 2: Difference between revisions
DoctorDalek (talk | contribs) (Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Bungie}} |Publishers = {{Game.InfoBox.Publisher|Microsoft Game Studios}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|November 9, 2004}} |Genres = {{Game.InfoBox.Genre|Shooter}} | PCGamingWiki = Halo_2 }} {{Game.ActionBox |Actions = {{Game.ActionBox.Row|Name = Play|Path = halo2.exe|Arguments = |WorkingDirectory = |Primary = True}} }} {{Game.Scripts.NameChange |Name = Name...") |
DoctorDalek (talk | contribs) No edit summary |
||
Line 10: | Line 10: | ||
|Genres = | |Genres = | ||
{{Game.InfoBox.Genre|Shooter}} | {{Game.InfoBox.Genre|Shooter}} | ||
| PCGamingWiki = Halo_2 | |PCGamingWiki = Halo_2}} | ||
}} | |||
{{Game.ActionBox | {{Game.ActionBox | ||
|Actions = | |Actions = | ||
{{Game.ActionBox.Row|Name = Play|Path = halo2.exe|Arguments = |WorkingDirectory = |Primary = True}} | {{Game.ActionBox.Row|Name = Play|Path = {InstallDir}\halo2.exe|Arguments = |WorkingDirectory = |Primary = True}} | ||
}} | }} | ||
{{Game.Scripts. | |||
|Name = | {{Game.Scripts.Install | ||
|Description = | |Name = Install Script | ||
|Description = | |||
|RequiresAdmin = False | |RequiresAdmin = False | ||
|Contents = <syntaxhighlight lang="powershell" line> | |Contents = | ||
$ | <syntaxhighlight lang="powershell" line> | ||
$ | # Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height | ||
$Display = Get-PrimaryDisplay | |||
New-Item -ItemType Directory -Force -Path "$($env:LOCALAPPDATA)\Microsoft\Halo 2\Saved Games" | |||
Remove-Item "$($env:LOCALAPPDATA)\Microsoft\Halo 2\Saved Games\S0000000" -Recurse -ErrorAction Ignore | |||
Copy-Item -Path "$InstallDirectory\ProfileTemplate\S0000000" -Destination "$($env:LOCALAPPDATA)\Microsoft\Halo 2\Saved Games\S0000000" -Recurse | |||
New-Item -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2" | |||
New-Item -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Audio Settings" | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Audio Settings" -Name "ReverbEnable" -Value 0 -Force | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Audio Settings" -Name "LowPassEnable" -Value 0 -Force | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Audio Settings" -Name "MonoCount" -Value 36 -Force | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Audio Settings" -Name "StereoCount" -Value 36 -Force | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Audio Settings" -Name "Volume" -Value 0 -Force | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Audio Settings" -Name "SpeakerConfig" -Value 0 -Force | |||
New-Item -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "ScreenResX" -Value $Display.Bounds.Width -Force | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "ScreenResY" -Value $Display.Bounds.Height -Force | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "ScreenRefresh" -Value 60 -Force | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "AspectRatio" -Value 0 -Force | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "DisplayMode" -Value 0 -Force | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "Brightness" -Value 3 -Force | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "Gamma" -Value 2 -Force | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "AntiAliasing" -Value 0 -Force | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "HudSize" -Value 2 -Force | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "SafeArea" -Value 0 -Force | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "LevelOfDetail" -Value 0 -Force | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "@" -Value "hex(4):" -Force | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} | ||
{{Game.Scripts. | {{Game.Scripts.Uninstall | ||
|Name = | |Name = Uninstall Script | ||
|Description = | |Description = | ||
|RequiresAdmin = False | |RequiresAdmin = False | ||
|Contents = <syntaxhighlight lang="powershell" line> | |Contents = | ||
$ | <syntaxhighlight lang="powershell" line> | ||
Remove-Item -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2" -Recurse -Force | |||
Remove-Item "$($env:LOCALAPPDATA)\Microsoft\Halo 2" -Recurse -ErrorAction Ignore | |||
</syntaxhighlight> | |||
}} | |||
{{Game.Scripts.NameChange | |||
|Name = Name Change Script | |||
|Description = Names are stored in a `profile` and `savemeta.bin` file as an ASCII encoded string with 0x00 separating characters. Names can be a maximum of 16 characters. We force that to avoid any overflows / profile corruption. | |||
|RequiresAdmin = False | |||
|Contents = | |||
<syntaxhighlight lang="powershell" line> | |||
# Converts a string to a UTF16-encoded byte array. This looks like ASCII characters separated by 0x00 in most cases. | |||
$bytes = ConvertTo-StringBytes -Input $NewPlayerAlias -Utf16 1 -MaxLength 16 -MinLength 16 | |||
Remove-Item "$($env:LOCALAPPDATA)\Microsoft\Halo 2\Saved Games\S0000000" -Recurse -ErrorAction Ignore | Remove-Item "$($env:LOCALAPPDATA)\Microsoft\Halo 2\Saved Games\S0000000" -Recurse -ErrorAction Ignore | ||
Copy-Item -Path "$ | Copy-Item -Path "$InstallDirectory\ProfileTemplate\S0000000" -Destination "$($env:LOCALAPPDATA)\Microsoft\Halo 2\Saved Games\S0000000" -Recurse | ||
Edit-PatchBinary -FilePath "$($env:LOCALAPPDATA)\Microsoft\Halo 2\Saved Games\S0000000\profile" -Offset 8 -Data $bytes | |||
Edit-PatchBinary -FilePath "$($env:LOCALAPPDATA)\Microsoft\Halo 2\Saved Games\S0000000\savemeta.bin" -Offset 18 -Data $bytes | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} |
Latest revision as of 02:12, 6 January 2024
Developers | |
---|---|
Bungie | |
Publishers | |
Microsoft Game Studios | |
Release Date | |
Windows: November 9, 2004 | |
Genres | |
Shooter | |
View at PCGamingWiki |
Actions
Name | Path | Arguments | Working Directory | Primary |
---|---|---|---|---|
Play | {InstallDir}\halo2.exe | True |
Install Script
# Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height
$Display = Get-PrimaryDisplay
New-Item -ItemType Directory -Force -Path "$($env:LOCALAPPDATA)\Microsoft\Halo 2\Saved Games"
Remove-Item "$($env:LOCALAPPDATA)\Microsoft\Halo 2\Saved Games\S0000000" -Recurse -ErrorAction Ignore
Copy-Item -Path "$InstallDirectory\ProfileTemplate\S0000000" -Destination "$($env:LOCALAPPDATA)\Microsoft\Halo 2\Saved Games\S0000000" -Recurse
New-Item -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2"
New-Item -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Audio Settings"
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Audio Settings" -Name "ReverbEnable" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Audio Settings" -Name "LowPassEnable" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Audio Settings" -Name "MonoCount" -Value 36 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Audio Settings" -Name "StereoCount" -Value 36 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Audio Settings" -Name "Volume" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Audio Settings" -Name "SpeakerConfig" -Value 0 -Force
New-Item -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings"
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "ScreenResX" -Value $Display.Bounds.Width -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "ScreenResY" -Value $Display.Bounds.Height -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "ScreenRefresh" -Value 60 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "AspectRatio" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "DisplayMode" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "Brightness" -Value 3 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "Gamma" -Value 2 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "AntiAliasing" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "HudSize" -Value 2 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "SafeArea" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "LevelOfDetail" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2\Video Settings" -Name "@" -Value "hex(4):" -Force
Uninstall Script
Remove-Item -Path "registry::\HKEY_CURRENT_USER\Software\Microsoft\Halo 2" -Recurse -Force
Remove-Item "$($env:LOCALAPPDATA)\Microsoft\Halo 2" -Recurse -ErrorAction Ignore
Name Change Script
Names are stored in a `profile` and `savemeta.bin` file as an ASCII encoded string with 0x00 separating characters. Names can be a maximum of 16 characters. We force that to avoid any overflows / profile corruption.
# Converts a string to a UTF16-encoded byte array. This looks like ASCII characters separated by 0x00 in most cases.
$bytes = ConvertTo-StringBytes -Input $NewPlayerAlias -Utf16 1 -MaxLength 16 -MinLength 16
Remove-Item "$($env:LOCALAPPDATA)\Microsoft\Halo 2\Saved Games\S0000000" -Recurse -ErrorAction Ignore
Copy-Item -Path "$InstallDirectory\ProfileTemplate\S0000000" -Destination "$($env:LOCALAPPDATA)\Microsoft\Halo 2\Saved Games\S0000000" -Recurse
Edit-PatchBinary -FilePath "$($env:LOCALAPPDATA)\Microsoft\Halo 2\Saved Games\S0000000\profile" -Offset 8 -Data $bytes
Edit-PatchBinary -FilePath "$($env:LOCALAPPDATA)\Microsoft\Halo 2\Saved Games\S0000000\savemeta.bin" -Offset 18 -Data $bytes