|
|
Line 14: |
Line 14: |
| {{Game.ActionBox | | {{Game.ActionBox |
| |Actions = | | |Actions = |
| | {{Game.ActionBox.Row|Name = Play|Path = {InstallDir}\hl.exe|Arguments = -game tfc -noextracds -lw {DisplayWidth} -lh {DisplayHeight} -32bpp|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"
| |
| New-Item -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life"
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life" -Name "Full Name" -Value "Half-Life" -Force
| |
|
| |
| New-Item -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Recent File List"
| |
|
| |
| New-Item -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings"
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "EngineDLL" -Value "hw.dll" -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "User Token 2" -Value "" -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "User Token 3" -Value "" -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "ScreenWindowed" -Value 0 -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "CrashInitializingVideoMode" -Value 0 -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "DisplayWidth" -Value $Display.Bounds.Width -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "DisplayHeight" -Value $Display.Bounds.Height -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "DisplayBPP" -Value 32 -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "Version" -Value 1 -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "LauncherBPP" -Value 32 -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "LauncherWidth" -Value $Display.Bounds.Width -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "LauncherHeight" -Value $Display.Bounds.Height -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "EngineGLDriver" -Value "Default" -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "EngineD3DDevice" -Value "Default" -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "EngineType" -Value 2 -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "EngineModeW" -Value $Display.Bounds.Width -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "EngineModeH" -Value $Display.Bounds.Height -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "EngineModeBPP" -Value 32 -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "EngineModeCaptured" -Value 1 -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "A3D Support" -Value 0 -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "EngineModeWindowed" -Value 0 -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "CPUMHZ" -Value 0 -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "Key" -Value "2335402628334" -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "Mod Sort Order" -Value "1;" -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "EngineMode" -Value 26 -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "3DWarning" -Value 1 -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "Logo" -Value "8ball1.bmp" -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "Logo Color" -Value "Orange" -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "Net Sort Order" -Value "1;" -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings" -Name "LAN Sort Order" -Value "1;" -Force
| |
|
| |
| New-Item -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\valve"
| |
|
| |
| New-Item -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\valve\Settings"
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\valve\Settings" -Name "User Token 2" -Value "" -Force
| |
| New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Valve\Half-Life\valve\Settings" -Name "User Token 3" -Value "" -Force
| |
| </syntaxhighlight>
| |
| }}
| |
|
| |
| {{Game.Scripts.NameChange | | {{Game.Scripts.NameChange |
| |Name = Name Change Script | | |Name = Name Change Script |
Line 77: |
Line 24: |
| |Contents = | | |Contents = |
| <syntaxhighlight lang="powershell" line> | | <syntaxhighlight lang="powershell" line> |
| Write-ReplaceContentInFile -Pattern '^name "(.+)"' -Substitution "name ""$NewPlayerAlias""" -FilePath "$InstallDirectory\valve\config.cfg" | | Write-ReplaceContentInFile -Pattern '^name "(.+)"' -Substitution "name ""$NewPlayerAlias""" -FilePath "$InstallDirectory\tfc\config.cfg" |
| </syntaxhighlight> | | </syntaxhighlight> |
| }} | | }} |