Unreal Tournament 2004: Difference between revisions
DoctorDalek (talk | contribs) (Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Epic Games}} |Publishers = {{Game.InfoBox.Publisher|Epic Games}} {{Game.InfoBox.Publisher|MacSoft Games}} {{Game.InfoBox.Publisher|Atari}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|March 16, 2004}} |Genres = {{Game.InfoBox.Genre|Shooter}} | PCGamingWiki = Unreal_Tournament_2004 }} {{Game.ActionBox |Actions = {{Game.ActionBox.Row|Name = Play|Path = System/UT2004.exe|Argu...") |
DoctorDalek (talk | contribs) No edit summary |
||
Line 5: | Line 5: | ||
{{Game.InfoBox.Developer|Epic Games}} | {{Game.InfoBox.Developer|Epic Games}} | ||
|Publishers = | |Publishers = | ||
{{Game.InfoBox.Publisher| | {{Game.InfoBox.Publisher|Atari, Inc.}}{{Game.InfoBox.Publisher|Epic Games}}{{Game.InfoBox.Publisher|MacSoft Games}} | ||
{{Game.InfoBox.Publisher| | |||
{{Game.InfoBox.Publisher| | |||
|Release Date = | |Release Date = | ||
{{Game.InfoBox.ReleaseDate|Windows|March 16, 2004}} | {{Game.InfoBox.ReleaseDate|Windows|March 16, 2004}} | ||
|Genres = | |Genres = | ||
{{Game.InfoBox.Genre|Shooter}} | {{Game.InfoBox.Genre|Shooter}} | ||
| PCGamingWiki = Unreal_Tournament_2004 | |PCGamingWiki = Unreal_Tournament_2004}} | ||
}} | |||
{{Game.ActionBox | {{Game.ActionBox | ||
|Actions = | |Actions = | ||
{{Game.ActionBox.Row|Name = Play|Path = System/UT2004.exe|Arguments = |WorkingDirectory = |Primary = True}} | {{Game.ActionBox.Row|Name = Play|Path = {InstallDir}\System/UT2004.exe|Arguments = |WorkingDirectory = |Primary = True}} | ||
}} | }} | ||
{{Game.Scripts. | |||
|Name = | {{Game.Scripts.Install | ||
|Name = Install Script | |||
|Description = | |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 | |||
# Use regex to replace text within a file. Quotes are escaped by double quoting ("") | |||
Write-ReplaceContentInFile -Pattern '^FullscreenViewportX=(.+)' -Substitution "FullscreenViewportX=$($Display.Bounds.Width)" -FilePath "$InstallDirectory\System\ut2004.ini" | |||
Write-ReplaceContentInFile -Pattern '^FullscreenViewportY=(.+)' -Substitution "FullscreenViewportY=$($Display.Bounds.Height)" -FilePath "$InstallDirectory\System\ut2004.ini" | |||
# Might need to set FOV | |||
$FOV = 90 | |||
if (($Display.Bounds.Width / $Display.Bounds.Height) -eq (16 / 9)) { | |||
$FOV = 106 | |||
} elseif (($Display.Bounds.Width / $Display.Bounds.Height) -eq (16 / 10)) { | |||
$FOV = 100 | |||
} | } | ||
Write-ReplaceContentInFile - | Write-ReplaceContentInFile -Pattern '^DesiredFOV=(.+)' -Substitution "DesiredFOV=$FOV" -FilePath "$InstallDirectory\System\User.ini" | ||
Write-ReplaceContentInFile -Pattern '^DefaultFOV=(.+)' -Substitution "DefaultFOV=$FOV" -FilePath "$InstallDirectory\System\User.ini" | |||
</syntaxhighlight> | |||
}} | |||
{{Game.Scripts.NameChange | |||
|Name = Name Change Script | |||
|Description = | |||
|RequiresAdmin = False | |||
|Contents = | |||
<syntaxhighlight lang="powershell" line> | |||
Write-ReplaceContentInFile -Pattern 'Name=(.+)' -Substitution "Name=$NewPlayerAlias" -FilePath "$InstallDirectory\System\User.ini" | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} |
Revision as of 21:58, 8 January 2024
Developers | |
---|---|
Epic Games | |
Publishers | |
Atari, Inc.Epic GamesMacSoft Games | |
Release Date | |
Windows: March 16, 2004 | |
Genres | |
Shooter | |
View at PCGamingWiki |
Actions
Name | Path | Arguments | Working Directory | Primary |
---|---|---|---|---|
Play | {InstallDir}\System/UT2004.exe | True |
Install Script
# Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height
$Display = Get-PrimaryDisplay
# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Pattern '^FullscreenViewportX=(.+)' -Substitution "FullscreenViewportX=$($Display.Bounds.Width)" -FilePath "$InstallDirectory\System\ut2004.ini"
Write-ReplaceContentInFile -Pattern '^FullscreenViewportY=(.+)' -Substitution "FullscreenViewportY=$($Display.Bounds.Height)" -FilePath "$InstallDirectory\System\ut2004.ini"
# Might need to set FOV
$FOV = 90
if (($Display.Bounds.Width / $Display.Bounds.Height) -eq (16 / 9)) {
$FOV = 106
} elseif (($Display.Bounds.Width / $Display.Bounds.Height) -eq (16 / 10)) {
$FOV = 100
}
Write-ReplaceContentInFile -Pattern '^DesiredFOV=(.+)' -Substitution "DesiredFOV=$FOV" -FilePath "$InstallDirectory\System\User.ini"
Write-ReplaceContentInFile -Pattern '^DefaultFOV=(.+)' -Substitution "DefaultFOV=$FOV" -FilePath "$InstallDirectory\System\User.ini"
Name Change Script
Write-ReplaceContentInFile -Pattern 'Name=(.+)' -Substitution "Name=$NewPlayerAlias" -FilePath "$InstallDirectory\System\User.ini"