Half-Life 2: Deathmatch: Difference between revisions

From LANCommander
(Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Valve}} |Publishers = {{Game.InfoBox.Publisher|Valve}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|November 30, 2004}} |Genres = {{Game.InfoBox.Genre|Shooter}} | PCGamingWiki = Half-Life_2:_Deathmatch }} {{Game.ActionBox |Actions = {{Game.ActionBox.Row|Name = Play|Path = Half-Life 2 Deathmatch.exe|Arguments = |WorkingDirectory = |Primary = True}} }} {{Game.Scripts.NameCh...")
 
No edit summary
Line 10: Line 10:
|Genres =
|Genres =
{{Game.InfoBox.Genre|Shooter}}
{{Game.InfoBox.Genre|Shooter}}
| PCGamingWiki = Half-Life_2:_Deathmatch
|PCGamingWiki = Half-Life_2:_Deathmatch}}
}}


{{Game.ActionBox
{{Game.ActionBox
|Actions =  
|Actions =  
{{Game.ActionBox.Row|Name = Play|Path = Half-Life 2 Deathmatch.exe|Arguments = |WorkingDirectory = |Primary = True}}
{{Game.ActionBox.Row|Name = Play|Path = {InstallDir}\Half-Life 2 Deathmatch.exe|Arguments = |WorkingDirectory = |Primary = True}}
}}
}}


{{Game.Scripts.Install
|Name = Install Script
|Description =
|RequiresAdmin = False
|Contents =
<syntaxhighlight lang="powershell" line>
$Display = Get-PrimaryDisplay
New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "AutoConfigVersion" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "ScreenWidth" -Value $Display.Bounds.Width -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "ScreenHeight" -Value $Display.Bounds.Height -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "ScreenWindowed" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "ScreenMSAA" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "ScreenMSAAQuality" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "MotionBlur" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "ShadowDepthTexture" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "VRModeAdapter" -Value -1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "ScreenMonitorGamma" -Value "2.2" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_forceaniso" -Value 2 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_picmip" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_trilinear" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_vsync" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_forcehardwaresync" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_parallaxmap" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_reducefillrate" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "r_shadowrendertotexture" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "r_rootlod" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "r_waterforceexpensive" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "r_waterforcereflectentities" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_antialias" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_aaquality" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_specular" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_bumpmap" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_hdr_level" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_colorcorrection" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "VendorID" -Value 32902 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "DeviceID" -Value 6422 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "DXLevel_V1" -Value 90 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "User Token 2" -Value """ -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "User Token 3" -Value """ -Force
</syntaxhighlight>
}}
           
{{Game.Scripts.NameChange
{{Game.Scripts.NameChange
|Name = Key Change Script
|Name = Name Change Script
|Description =  
|Description =  
|RequiresAdmin = False
|RequiresAdmin = False
|Contents = <syntaxhighlight lang="powershell" line>
|Contents =
$NewName = $args[0]
<syntaxhighlight lang="powershell" line>
$InstallDir = $PSScriptRoot
Write-ReplaceContentInFile -Pattern 'PlayerName=(.+)' -Substitution "PlayerName=$NewPlayerAlias" -FilePath "$InstallDirectory\rev.ini"
 
Write-ReplaceContentInFile -Pattern 'ClanTag=(.+)' -Substitution "ClanTag=" -FilePath "$InstallDirectory\rev.ini"
function Write-ReplaceContentInFile([string]$Regex, [string]$Replacement, [string]$FilePath)
Write-ReplaceContentInFile -Pattern '^name "(.+)"' -Substitution "name ""$NewName""" -FilePath "$InstallDirectory\cfg\config.cfg"
{
    $content = (Get-Content $FilePath) -replace $Regex, $Replacement
    [IO.File]::WriteAllLines($FilePath, $content)
}
 
Write-ReplaceContentInFile -Regex 'PlayerName=(.+)' -Replacement "PlayerName=$NewName" -FilePath "$InstallDir\rev.ini"
Write-ReplaceContentInFile -Regex 'ClanTag=(.+)' -Replacement "ClanTag=" -FilePath "$InstallDir\rev.ini"
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Revision as of 02:12, 6 January 2024

Developers
Valve
Publishers
Valve
Release Date
Windows: November 30, 2004
Genres
Shooter
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play {InstallDir}\Half-Life 2 Deathmatch.exe True

Install Script

$Display = Get-PrimaryDisplay

New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "AutoConfigVersion" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "ScreenWidth" -Value $Display.Bounds.Width -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "ScreenHeight" -Value $Display.Bounds.Height -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "ScreenWindowed" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "ScreenMSAA" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "ScreenMSAAQuality" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "MotionBlur" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "ShadowDepthTexture" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "VRModeAdapter" -Value -1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "ScreenMonitorGamma" -Value "2.2" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_forceaniso" -Value 2 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_picmip" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_trilinear" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_vsync" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_forcehardwaresync" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_parallaxmap" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_reducefillrate" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "r_shadowrendertotexture" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "r_rootlod" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "r_waterforceexpensive" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "r_waterforcereflectentities" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_antialias" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_aaquality" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_specular" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_bumpmap" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_hdr_level" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "mat_colorcorrection" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "VendorID" -Value 32902 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "DeviceID" -Value 6422 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "DXLevel_V1" -Value 90 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "User Token 2" -Value """ -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Valve\Source\hl2mp\Settings" -Name "User Token 3" -Value """ -Force

Name Change Script

Write-ReplaceContentInFile -Pattern 'PlayerName=(.+)' -Substitution "PlayerName=$NewPlayerAlias" -FilePath "$InstallDirectory\rev.ini"
Write-ReplaceContentInFile -Pattern 'ClanTag=(.+)' -Substitution "ClanTag=" -FilePath "$InstallDirectory\rev.ini"
Write-ReplaceContentInFile -Pattern '^name "(.+)"' -Substitution "name ""$NewName""" -FilePath "$InstallDirectory\cfg\config.cfg"