Quake II: Difference between revisions

From LANCommander
(Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|id Software}} {{Game.InfoBox.Developer|Hammerhead}} |Publishers = {{Game.InfoBox.Publisher|Activision}} {{Game.InfoBox.Publisher|TecToy}} {{Game.InfoBox.Publisher|Macmillan Digital Publishing}} {{Game.InfoBox.Publisher|Hyperion Entertainment}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|December 9, 1997}} |Genres = {{Game.InfoBox.Genre|Shooter}} | PCGamingWiki = Quake_II }}...")
 
No edit summary
 
Line 3: Line 3:
|Cover = cover.jpg
|Cover = cover.jpg
|Developers =
|Developers =
{{Game.InfoBox.Developer|id Software}}
{{Game.InfoBox.Developer|id Software}}{{Game.InfoBox.Developer|Hammerhead}}
{{Game.InfoBox.Developer|Hammerhead}}
|Publishers =
|Publishers =
{{Game.InfoBox.Publisher|Activision}}
{{Game.InfoBox.Publisher|Activision}}{{Game.InfoBox.Publisher|TecToy}}{{Game.InfoBox.Publisher|Macmillan Digital Publishing}}{{Game.InfoBox.Publisher|Hyperion Entertainment}}
{{Game.InfoBox.Publisher|TecToy}}
{{Game.InfoBox.Publisher|Macmillan Digital Publishing}}
{{Game.InfoBox.Publisher|Hyperion Entertainment}}
|Release Date =
|Release Date =
{{Game.InfoBox.ReleaseDate|Windows|December 9, 1997}}
{{Game.InfoBox.ReleaseDate|Windows|December 9, 1997}}
|Genres =
|Genres =
{{Game.InfoBox.Genre|Shooter}}
{{Game.InfoBox.Genre|Shooter}}
| PCGamingWiki = Quake_II
|PCGamingWiki = Quake_II}}
}}


{{Game.ActionBox
{{Game.ActionBox
|Actions =  
|Actions =  
{{Game.ActionBox.Row|Name = Play|Path = yquake2.exe|Arguments = -portable|WorkingDirectory = |Primary = True}}
{{Game.ActionBox.Row|Name = Play|Path = {InstallDir}\q2pro.exe|Arguments = |WorkingDirectory = |Primary = True}}
}}
}}


{{Game.Scripts.NameChange
{{Game.Scripts.NameChange
Line 26: Line 22:
|Description =  
|Description =  
|RequiresAdmin = False
|RequiresAdmin = False
|Contents = <syntaxhighlight lang="powershell" line>
|Contents =
$NewName = $args[0]
<syntaxhighlight lang="powershell" line>
$InstallDir = $PSScriptRoot
Write-ReplaceContentInFile -Pattern '^seta name (.+)' -Substitution "seta name ""$NewPlayerAlias""" -FilePath "$InstallDirectory\baseq2\q2config.cfg"
 
function Write-ReplaceContentInFile([string]$Regex, [string]$Replacement, [string]$FilePath)
{
    $content = (Get-Content $FilePath) -replace $Regex, $Replacement
    [IO.File]::WriteAllLines($FilePath, $content)
}
 
Write-ReplaceContentInFile -Regex '^set name (.+)' -Replacement "set name ""$NewName""" -FilePath "$InstallDir\baseq2\config.cfg"
</syntaxhighlight>
}}
 
{{Game.Scripts.Install
|Name = Install Script
|Description =
|RequiresAdmin = False
|Contents = <syntaxhighlight lang="powershell" line>
$NewName = $args[0]
$InstallDir = $PSScriptRoot
Add-Type -AssemblyName System.Windows.Forms
$Display = [System.Windows.Forms.Screen]::AllScreens | Where-Object Primary | Select Bounds
 
function Write-ReplaceContentInFile([string]$Regex, [string]$Replacement, [string]$FilePath)
{
    $content = (Get-Content $FilePath) -replace $Regex, $Replacement
    [IO.File]::WriteAllLines($FilePath, $content)
}
 
$X = $Display.Width
$Y = $Display.Height
 
Write-ReplaceContentInFile -Regex 'set r_customheight = (.+)' -Replacement "set r_customheight = ""$Y""" -FilePath "$InstallDir\baseq2\config.cfg"
Write-ReplaceContentInFile -Regex 'set r_customwidth = (.+)' -Replacement "set r_customwidth = ""$X""" -FilePath "$InstallDir\baseq2\config.cfg"
Write-ReplaceContentInFile -Regex 'set vid_fullscreen = (.+)' -Replacement "set vid_fullscreen = ""1""" -FilePath "$InstallDir\baseq2\config.cfg"
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Latest revision as of 21:55, 8 January 2024

Developers
id SoftwareHammerhead
Publishers
ActivisionTecToyMacmillan Digital PublishingHyperion Entertainment
Release Date
Windows: December 9, 1997
Genres
Shooter
View at PCGamingWiki

Actions

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

Name Change Script

Write-ReplaceContentInFile -Pattern '^seta name (.+)' -Substitution "seta name ""$NewPlayerAlias""" -FilePath "$InstallDirectory\baseq2\q2config.cfg"