Starsiege: Tribes

From LANCommander
Revision as of 01:37, 1 August 2023 by DoctorDalek (talk | contribs) (Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Dynamix, Inc.}} |Publishers = {{Game.InfoBox.Publisher|Dynamix, Inc.}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|November 30, 1998}} |Genres = {{Game.InfoBox.Genre|Shooter}} {{Game.InfoBox.Genre|Strategy}} | PCGamingWiki = Starsiege:_Tribes }} {{Game.ActionBox |Actions = {{Game.ActionBox.Row|Name = Play|Path = Tribes.exe|Arguments = |WorkingDirectory = |Primary = True}}...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Developers
Dynamix, Inc.
Publishers
Dynamix, Inc.
Release Date
Windows: November 30, 1998
Genres
Shooter

Strategy

View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play Tribes.exe True

Name Change Script

$NewName = $args[0]
$InstallDir = $PSScriptRoot

function Write-ReplaceContentInFile([string]$Regex, [string]$Replacement, [string]$FilePath)
{
    $content = (Get-Content $FilePath) -replace $Regex, $Replacement
    [IO.File]::WriteAllLines($FilePath, $content)
}

Write-ReplaceContentInFile -Regex '\$PCFG::Name = (.+)' -Replacement "`$PCFG::Name = ""$NewName"";" -FilePath "$InstallDir\config\Players.cs"
Write-ReplaceContentInFile -Regex '\$PCFG::Name0 = (.+)' -Replacement "`$PCFG::Name0 = ""$NewName"";" -FilePath "$InstallDir\config\Players.cs"
Write-ReplaceContentInFile -Regex '\$PCFG::RealName = (.+)' -Replacement "`$PCFG::RealName = ""$NewName"";" -FilePath "$InstallDir\config\Players.cs"
Write-ReplaceContentInFile -Regex '\$PCFG::RealName0 = (.+)' -Replacement "`$PCFG::RealName0 = ""$NewName"";" -FilePath "$InstallDir\config\Players.cs"