Starsiege: Tribes: Difference between revisions

From LANCommander
(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}}...")
 
No edit summary
 
Line 9: Line 9:
{{Game.InfoBox.ReleaseDate|Windows|November 30, 1998}}
{{Game.InfoBox.ReleaseDate|Windows|November 30, 1998}}
|Genres =
|Genres =
{{Game.InfoBox.Genre|Shooter}}
{{Game.InfoBox.Genre|Shooter}}{{Game.InfoBox.Genre|Strategy}}
{{Game.InfoBox.Genre|Strategy}}
|PCGamingWiki = Starsiege:_Tribes}}
| PCGamingWiki = Starsiege:_Tribes
}}


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


{{Game.Scripts.NameChange
 
|Name = Name Change Script
{{Game.Scripts.Install
|Name = Install Script
|Description =  
|Description =  
|RequiresAdmin = False
|RequiresAdmin = False
|Contents = <syntaxhighlight lang="powershell" line>
|Contents =
$NewName = $args[0]
<syntaxhighlight lang="powershell" line>
$InstallDir = $PSScriptRoot
$Display = Get-PrimaryDisplay


function Write-ReplaceContentInFile([string]$Regex, [string]$Replacement, [string]$FilePath)
Write-ReplaceContentInFile -Pattern '\$pref::VideoFullScreenRes = "(.+)"' -Substitution "`$pref::VideoFullScreenRes = ""$($Display.Bounds.Width)x$($Display.Bounds.Height)""" -FilePath "$InstallDirectory\config\ClientPrefs.cs"
{
 
    $content = (Get-Content $FilePath) -replace $Regex, $Replacement
# Might need to set FOV
    [IO.File]::WriteAllLines($FilePath, $content)
$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 -Regex '\$PCFG::Name = (.+)' -Replacement "`$PCFG::Name = ""$NewName"";" -FilePath "$InstallDir\config\Players.cs"
Write-ReplaceContentInFile -Pattern '\$pref::PlayerFov = "(.+)"' -Substitution "`$pref::PlayerFov = ""$FOV""" -FilePath "$InstallDirectory\config\ClientPrefs.cs"
Write-ReplaceContentInFile -Regex '\$PCFG::Name0 = (.+)' -Replacement "`$PCFG::Name0 = ""$NewName"";" -FilePath "$InstallDir\config\Players.cs"
</syntaxhighlight>
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"
           
{{Game.Scripts.NameChange
|Name = Name Change Script
|Description =
|RequiresAdmin = False
|Contents =
<syntaxhighlight lang="powershell" line>
Write-ReplaceContentInFile -Pattern '\$PCFG::Name = (.+)' -Substitution "`$PCFG::Name = ""$NewPlayerAlias"";" -FilePath "$InstallDirectory\config\Players.cs"
Write-ReplaceContentInFile -Pattern '\$PCFG::Name0 = (.+)' -Substitution "`$PCFG::Name0 = ""$NewPlayerAlias"";" -FilePath "$InstallDirectory\config\Players.cs"
Write-ReplaceContentInFile -Pattern '\$PCFG::RealName = (.+)' -Substitution "`$PCFG::RealName = ""$NewPlayerAlias"";" -FilePath "$InstallDirectory\config\Players.cs"
Write-ReplaceContentInFile -Pattern '\$PCFG::RealName0 = (.+)' -Substitution "`$PCFG::RealName0 = ""$NewPlayerAlias"";" -FilePath "$InstallDirectory\config\Players.cs"
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Latest revision as of 21:58, 8 January 2024

Developers
Dynamix, Inc.
Publishers
Dynamix, Inc.
Release Date
Windows: November 30, 1998
Genres
ShooterStrategy
View at PCGamingWiki

Actions

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

Install Script

$Display = Get-PrimaryDisplay

Write-ReplaceContentInFile -Pattern '\$pref::VideoFullScreenRes = "(.+)"' -Substitution "`$pref::VideoFullScreenRes = ""$($Display.Bounds.Width)x$($Display.Bounds.Height)""" -FilePath "$InstallDirectory\config\ClientPrefs.cs"

# 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 '\$pref::PlayerFov = "(.+)"' -Substitution "`$pref::PlayerFov = ""$FOV""" -FilePath "$InstallDirectory\config\ClientPrefs.cs"

Name Change Script

Write-ReplaceContentInFile -Pattern '\$PCFG::Name = (.+)' -Substitution "`$PCFG::Name = ""$NewPlayerAlias"";" -FilePath "$InstallDirectory\config\Players.cs"
Write-ReplaceContentInFile -Pattern '\$PCFG::Name0 = (.+)' -Substitution "`$PCFG::Name0 = ""$NewPlayerAlias"";" -FilePath "$InstallDirectory\config\Players.cs"
Write-ReplaceContentInFile -Pattern '\$PCFG::RealName = (.+)' -Substitution "`$PCFG::RealName = ""$NewPlayerAlias"";" -FilePath "$InstallDirectory\config\Players.cs"
Write-ReplaceContentInFile -Pattern '\$PCFG::RealName0 = (.+)' -Substitution "`$PCFG::RealName0 = ""$NewPlayerAlias"";" -FilePath "$InstallDirectory\config\Players.cs"