Command & Conquer: Difference between revisions

From LANCommander
(Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Release Date = {{Game.InfoBox.ReleaseDate|Windows|August 31, 1995}} | PCGamingWiki = Command_%26_Conquer }} {{Game.ActionBox |Actions = {{Game.ActionBox.Row|Name = Play|Path = CnC95MPLauncher.exe|Arguments = |WorkingDirectory = |Primary = True}} }} {{Game.Scripts.NameChange |Name = Name Change Script |Description = |RequiresAdmin = False |Contents = <syntaxhighlight lang="powershell" line> $NewName = $args[0] $Ins...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
{{Game.InfoBox
{{Game.InfoBox
|Cover = cover.jpg
|Cover = cover.jpg
|Developers =
{{Game.InfoBox.Developer|Westwood Studios}}
|Publishers =
{{Game.InfoBox.Publisher|Virgin Interactive Entertainment (Europe) Ltd.}}{{Game.InfoBox.Publisher|Nintendo}}{{Game.InfoBox.Publisher|Gradiente}}{{Game.InfoBox.Publisher|Sega}}
|Release Date =
|Release Date =
{{Game.InfoBox.ReleaseDate|Windows|August 31, 1995}}
{{Game.InfoBox.ReleaseDate|Windows|September 26, 1995}}
| PCGamingWiki = Command_%26_Conquer
|Genres =
}}
{{Game.InfoBox.Genre|Real Time Strategy (RTS)}}{{Game.InfoBox.Genre|Strategy}}
|PCGamingWiki = Command_%26_Conquer}}


{{Game.ActionBox
{{Game.ActionBox
|Actions =  
|Actions =  
{{Game.ActionBox.Row|Name = Play|Path = CnC95MPLauncher.exe|Arguments = |WorkingDirectory = |Primary = True}}
{{Game.ActionBox.Row|Name = Play|Path = {InstallDir}\CnC95MPLauncher.exe|Arguments = |WorkingDirectory = |Primary = True}}
}}
}}


{{Game.Scripts.NameChange
{{Game.Scripts.NameChange
Line 16: 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 '^Nickname=(.+)' -Substitution "Nickname=$NewPlayerAlias" -FilePath "$InstallDirectory\cncnet5.ini"
 
function Write-ReplaceContentInFile([string]$Regex, [string]$Replacement, [string]$FilePath)
{
    $content = (Get-Content $FilePath) -replace $Regex, $Replacement
    [IO.File]::WriteAllLines($FilePath, $content)
}
 
Write-ReplaceContentInFile -Regex '^Nickname=(.+)' -Replacement "Nickname=$NewName" -FilePath "$InstallDir\cncnet5.ini"
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Latest revision as of 00:40, 22 February 2024

Developers
Westwood Studios
Publishers
Virgin Interactive Entertainment (Europe) Ltd.NintendoGradienteSega
Release Date
Windows: September 26, 1995
Genres
Real Time Strategy (RTS)Strategy
View at PCGamingWiki

Actions

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

Name Change Script

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