Doom: Difference between revisions

From LANCommander
(Created new page for Doom)
 
No edit summary
 
Line 5: Line 5:
{{Game.InfoBox.Developer|id Software}}
{{Game.InfoBox.Developer|id Software}}
|Publishers =
|Publishers =
{{Game.InfoBox.Developer|Wiz Technology}}{{Game.InfoBox.Developer|id Software}}{{Game.InfoBox.Developer|Activision}}{{Game.InfoBox.Developer|GT Interactive Software}}
{{Game.InfoBox.Publisher|Wiz Technology}}{{Game.InfoBox.Publisher|id Software}}{{Game.InfoBox.Publisher|Activision}}{{Game.InfoBox.Publisher|GT Interactive Software}}
|Release Date =
|Release Date =
{{Game.InfoBox.ReleaseDate|Windows|December 10, 1993}}
{{Game.InfoBox.ReleaseDate|Windows|December 10, 1993}}
Line 14: Line 14:
{{Game.ActionBox
{{Game.ActionBox
|Actions =  
|Actions =  
{{Game.ActionBox.Row|Name = Play Doom|Path = {InstallDir}\zandronum.exe|Arguments = -iwad "{InstallDir}/doom.wad" -config zandronum.ini -savedir saves|WorkingDirectory = |Primary = True}}
}}
}}


Line 23: Line 24:
|Contents =
|Contents =
<syntaxhighlight lang="powershell" line>
<syntaxhighlight lang="powershell" line>
#Updates bat file launchers to the server address and correct ports
$Config = "$InstallDirectory\zandronum.ini"
######################################################################
$LauncherCoop = "$InstallDirectory\Doom.bat"
$LauncherDM = "$InstallDirectory\Doom_dm.bat"
$uri = New-Object System.Uri($ServerAddress)
$Server = $uri.Host
$Server_COOP = $Server + ":10666"
$Server_DM = $Server + ":10667"
# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Pattern '^zandronum.exe -connect (.+)' -Substitution "zandronum.exe -connect ""$Server_COOP"" -iwad ""doom.wad""" -FilePath "$LauncherCoop"
Write-ReplaceContentInFile -Pattern '^zandronum.exe -connect (.+)' -Substitution "zandronum.exe -connect ""$Server_DM"" -iwad ""doom.wad""" -FilePath -FilePath "$LauncherDM"
#######################################################################


#Updates Screen Resolution to match desktop resolution
# Updates Screen Resolution to match desktop resolution
#######################################################################
#######################################################################
$Username=$env:username
$Config = "$InstallDirectory\zandronum-$Username.ini"
Copy-Item -Path "$InstallDirectory\zandronum.ini" -Destination "$Config" -Recurse
# Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height
$Display = Get-PrimaryDisplay
$Display = Get-PrimaryDisplay


Line 51: Line 36:
Write-ReplaceContentInFile -Pattern '^vid_defwidth=(.+)' -Substitution "vid_defwidth=$($Display.Bounds.Width)" -FilePath "$Config"
Write-ReplaceContentInFile -Pattern '^vid_defwidth=(.+)' -Substitution "vid_defwidth=$($Display.Bounds.Width)" -FilePath "$Config"
#######################################################################
#######################################################################
</syntaxhighlight>
</syntaxhighlight>
}}
}}
Line 61: Line 45:
|Contents =
|Contents =
<syntaxhighlight lang="powershell" line>
<syntaxhighlight lang="powershell" line>
#Updates name= to the player who is on lan commander
Write-ReplaceContentInFile -Pattern '^name=(.+)' -Substitution "name=$NewPlayerAlias" -FilePath "$InstallDirectory\zandronum.ini"
#######################################################################
$Username=$env:username
$Config = "$InstallDirectory\zandronum-$Username.ini"
Write-ReplaceContentInFile -Pattern '^name=(.+)' -Substitution "name=$NewPlayerAlias" -FilePath "$Config"
#######################################################################
 
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Latest revision as of 00:42, 22 February 2024

Developers
id Software
Publishers
Wiz Technologyid SoftwareActivisionGT Interactive Software
Release Date
Windows: December 10, 1993
Genres
Shooter
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play Doom {InstallDir}\zandronum.exe -iwad "{InstallDir}/doom.wad" -config zandronum.ini -savedir saves True

Install Script

$Config = "$InstallDirectory\zandronum.ini"

# Updates Screen Resolution to match desktop resolution
#######################################################################
$Display = Get-PrimaryDisplay

# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Pattern '^con_virtualheight=(.+)' -Substitution "con_virtualheight=$($Display.Bounds.Height)" -FilePath "$Config"
Write-ReplaceContentInFile -Pattern '^con_virtualwidth=(.+)' -Substitution "con_virtualwidth=$($Display.Bounds.Width)" -FilePath "$Config"
Write-ReplaceContentInFile -Pattern '^vid_defheight=(.+)' -Substitution "vid_defheight=$($Display.Bounds.Height)" -FilePath "$Config"
Write-ReplaceContentInFile -Pattern '^vid_defwidth=(.+)' -Substitution "vid_defwidth=$($Display.Bounds.Width)" -FilePath "$Config"
#######################################################################

Name Change Script

Write-ReplaceContentInFile -Pattern '^name=(.+)' -Substitution "name=$NewPlayerAlias" -FilePath "$InstallDirectory\zandronum.ini"