Realm Wars: Difference between revisions
DoctorDalek (talk | contribs) (Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Release Date = {{Game.InfoBox.ReleaseDate|Windows|March 1, 2003}} }} {{Game.ActionBox |Actions = {{Game.ActionBox.Row|Name = Play|Path = RealmWars.exe|Arguments = |WorkingDirectory = |Primary = True}} }} {{Game.Scripts.Install |Name = Install Script |Description = |RequiresAdmin = False |Contents = <syntaxhighlight lang="powershell" line> $InstallDir = $PSScriptRoot Add-Type -AssemblyName System.Windows.Forms $Dis...") |
DoctorDalek (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
{{Game.InfoBox | {{Game.InfoBox | ||
|Cover = cover.jpg | |Cover = cover.jpg | ||
|Developers = | |||
|Publishers = | |||
|Release Date = | |Release Date = | ||
{{Game.InfoBox.ReleaseDate|Windows|March 1, 2003}} | {{Game.InfoBox.ReleaseDate|Windows|March 1, 2003}} | ||
|Genres = | |||
}} | }} | ||
{{Game.ActionBox | {{Game.ActionBox | ||
|Actions = | |Actions = | ||
{{Game.ActionBox.Row|Name = Play|Path = RealmWars.exe|Arguments = |WorkingDirectory = |Primary = True}} | {{Game.ActionBox.Row|Name = Play|Path = {InstallDir}\RealmWars.exe|Arguments = |WorkingDirectory = |Primary = True}} | ||
}} | }} | ||
{{Game.Scripts.Install | {{Game.Scripts.Install | ||
Line 15: | Line 22: | ||
|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 = | $Display = Get-PrimaryDisplay | ||
# Use regex to replace text within a file. Quotes are escaped by double quoting ("") | |||
Write-ReplaceContentInFile -Pattern '^\$pref::Server::Info = "(.+)";' -Substitution "`$pref::Server::Info = ""Older than your mother!"";" -FilePath "$InstallDirectory\common\client\prefs.cs" | |||
Write-ReplaceContentInFile -Pattern '^\$pref::Server::Name = "(.+)";' -Substitution "`$pref::Server::Name = ""Vintage"";" -FilePath "$InstallDirectory\common\client\prefs.cs" | |||
Write-ReplaceContentInFile -Pattern '^\$pref::Server::MaxPlayers = "(.+)";' -Substitution "`$pref::Server::MaxPlayers = ""16"";" -FilePath "$InstallDirectory\common\client\prefs.cs" | |||
Write-ReplaceContentInFile -Pattern '^\$pref::Video::displayDevice = "(.+)";' -Substitution "`$pref::Video::displayDevice = ""OpenGL"";" -FilePath "$InstallDirectory\common\client\prefs.cs" | |||
Write-ReplaceContentInFile -Pattern '^\$pref::Video::fullScreen = "(.+)";' -Substitution "`$pref::Video::fullScreen = ""1"";" -FilePath "$InstallDirectory\common\client\prefs.cs" | |||
Write-ReplaceContentInFile -Pattern '^\$pref::Video::resolution = "(.+)";' -Substitution "`$pref::Video::resolution = ""$($Display.Bounds.Width) $($Resolution.Height) 32"";" -FilePath "$InstallDirectory\common\client\prefs.cs" | |||
Write-ReplaceContentInFile -Pattern '^\$pref::Server::Info = "(.+)";' -Substitution "`$pref::Server::Info = ""Older than your mother!"";" -FilePath "$InstallDirectory\rw\client\prefs.cs" | |||
Write-ReplaceContentInFile - | Write-ReplaceContentInFile -Pattern '^\$pref::Server::Name = "(.+)";' -Substitution "`$pref::Server::Name = ""Vintage"";" -FilePath "$InstallDirectory\rw\client\prefs.cs" | ||
Write-ReplaceContentInFile - | Write-ReplaceContentInFile -Pattern '^\$pref::Server::MaxPlayers = "(.+)";' -Substitution "`$pref::Server::MaxPlayers = ""16"";" -FilePath "$InstallDirectory\rw\client\prefs.cs" | ||
Write-ReplaceContentInFile - | Write-ReplaceContentInFile -Pattern '^\$pref::Video::displayDevice = "(.+)";' -Substitution "`$pref::Video::displayDevice = ""OpenGL"";" -FilePath "$InstallDirectory\rw\client\prefs.cs" | ||
Write-ReplaceContentInFile - | Write-ReplaceContentInFile -Pattern '^\$pref::Video::fullScreen = "(.+)";' -Substitution "`$pref::Video::fullScreen = ""1"";" -FilePath "$InstallDirectory\rw\client\prefs.cs" | ||
Write-ReplaceContentInFile - | Write-ReplaceContentInFile -Pattern '^\$pref::Video::resolution = "(.+)";' -Substitution "`$pref::Video::resolution = ""$($Display.Bounds.Width) $($Display.Bounds.Height) 32"";" -FilePath "$InstallDirectory\rw\client\prefs.cs" | ||
Write-ReplaceContentInFile - | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} | ||
{{Game.Scripts.NameChange | {{Game.Scripts.NameChange | ||
|Name = Name Change Script | |Name = Name Change Script | ||
|Description = | |Description = | ||
|RequiresAdmin = False | |RequiresAdmin = False | ||
|Contents = <syntaxhighlight lang="powershell" line> | |Contents = | ||
<syntaxhighlight lang="powershell" line> | |||
Write-ReplaceContentInFile -Pattern '^\$pref::Player::Name = "(.+)";' -Substitution "`$pref::Player::Name = ""$NewPlayerAlias"";" -FilePath "$InstallDirectory\common\client\prefs.cs" | |||
Write-ReplaceContentInFile -Pattern '^\$pref::Player::Name = "(.+)";' -Substitution "`$pref::Player::Name = ""$NewPlayerAlias"";" -FilePath "$InstallDirectory\rw\client\prefs.cs" | |||
Write-ReplaceContentInFile - | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} |
Latest revision as of 21:55, 8 January 2024
Release Date | |
---|---|
Windows: March 1, 2003 | |
View at PCGamingWiki |
Actions
Name | Path | Arguments | Working Directory | Primary |
---|---|---|---|---|
Play | {InstallDir}\RealmWars.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 '^\$pref::Server::Info = "(.+)";' -Substitution "`$pref::Server::Info = ""Older than your mother!"";" -FilePath "$InstallDirectory\common\client\prefs.cs"
Write-ReplaceContentInFile -Pattern '^\$pref::Server::Name = "(.+)";' -Substitution "`$pref::Server::Name = ""Vintage"";" -FilePath "$InstallDirectory\common\client\prefs.cs"
Write-ReplaceContentInFile -Pattern '^\$pref::Server::MaxPlayers = "(.+)";' -Substitution "`$pref::Server::MaxPlayers = ""16"";" -FilePath "$InstallDirectory\common\client\prefs.cs"
Write-ReplaceContentInFile -Pattern '^\$pref::Video::displayDevice = "(.+)";' -Substitution "`$pref::Video::displayDevice = ""OpenGL"";" -FilePath "$InstallDirectory\common\client\prefs.cs"
Write-ReplaceContentInFile -Pattern '^\$pref::Video::fullScreen = "(.+)";' -Substitution "`$pref::Video::fullScreen = ""1"";" -FilePath "$InstallDirectory\common\client\prefs.cs"
Write-ReplaceContentInFile -Pattern '^\$pref::Video::resolution = "(.+)";' -Substitution "`$pref::Video::resolution = ""$($Display.Bounds.Width) $($Resolution.Height) 32"";" -FilePath "$InstallDirectory\common\client\prefs.cs"
Write-ReplaceContentInFile -Pattern '^\$pref::Server::Info = "(.+)";' -Substitution "`$pref::Server::Info = ""Older than your mother!"";" -FilePath "$InstallDirectory\rw\client\prefs.cs"
Write-ReplaceContentInFile -Pattern '^\$pref::Server::Name = "(.+)";' -Substitution "`$pref::Server::Name = ""Vintage"";" -FilePath "$InstallDirectory\rw\client\prefs.cs"
Write-ReplaceContentInFile -Pattern '^\$pref::Server::MaxPlayers = "(.+)";' -Substitution "`$pref::Server::MaxPlayers = ""16"";" -FilePath "$InstallDirectory\rw\client\prefs.cs"
Write-ReplaceContentInFile -Pattern '^\$pref::Video::displayDevice = "(.+)";' -Substitution "`$pref::Video::displayDevice = ""OpenGL"";" -FilePath "$InstallDirectory\rw\client\prefs.cs"
Write-ReplaceContentInFile -Pattern '^\$pref::Video::fullScreen = "(.+)";' -Substitution "`$pref::Video::fullScreen = ""1"";" -FilePath "$InstallDirectory\rw\client\prefs.cs"
Write-ReplaceContentInFile -Pattern '^\$pref::Video::resolution = "(.+)";' -Substitution "`$pref::Video::resolution = ""$($Display.Bounds.Width) $($Display.Bounds.Height) 32"";" -FilePath "$InstallDirectory\rw\client\prefs.cs"
Name Change Script
Write-ReplaceContentInFile -Pattern '^\$pref::Player::Name = "(.+)";' -Substitution "`$pref::Player::Name = ""$NewPlayerAlias"";" -FilePath "$InstallDirectory\common\client\prefs.cs"
Write-ReplaceContentInFile -Pattern '^\$pref::Player::Name = "(.+)";' -Substitution "`$pref::Player::Name = ""$NewPlayerAlias"";" -FilePath "$InstallDirectory\rw\client\prefs.cs"