Command & Conquer: Tiberian Sun: Difference between revisions

From LANCommander
(Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Release Date = {{Game.InfoBox.ReleaseDate|Windows|August 20, 1999}} | PCGamingWiki = Command_%26_Conquer:_Tiberian_Sun }} {{Game.ActionBox |Actions = {{Game.ActionBox.Row|Name = Play|Path = TSMPLauncher.exe|Arguments = |WorkingDirectory = |Primary = True}} }} {{Game.Scripts.NameChange |Name = Name Change Script |Description = |RequiresAdmin = False |Contents = <syntaxhighlight lang="powershell" line> $NewName = $a...")
 
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|Electronic Arts}}
|Release Date =
|Release Date =
{{Game.InfoBox.ReleaseDate|Windows|August 20, 1999}}
{{Game.InfoBox.ReleaseDate|Windows|August 20, 1999}}
| PCGamingWiki = Command_%26_Conquer:_Tiberian_Sun
|Genres =
}}
{{Game.InfoBox.Genre|Real Time Strategy (RTS)}}{{Game.InfoBox.Genre|Strategy}}
|PCGamingWiki = Command_%26_Conquer:_Tiberian_Sun}}


{{Game.ActionBox
{{Game.ActionBox
|Actions =  
|Actions =  
{{Game.ActionBox.Row|Name = Play|Path = TSMPLauncher.exe|Arguments = |WorkingDirectory = |Primary = True}}
{{Game.ActionBox.Row|Name = Play|Path = {InstallDir}\TSMPLauncher.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
Electronic Arts
Release Date
Windows: August 20, 1999
Genres
Real Time Strategy (RTS)Strategy
View at PCGamingWiki

Actions

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

Name Change Script

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