Tribes: Vengeance: Difference between revisions

From LANCommander
(Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Irrational Games}} |Publishers = {{Game.InfoBox.Publisher|VU Games}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|October 5, 2004}} |Genres = {{Game.InfoBox.Genre|Sport}} {{Game.InfoBox.Genre|Shooter}} | PCGamingWiki = Tribes:_Vengeance }} {{Game.ActionBox |Actions = {{Game.ActionBox.Row|Name = Play|Path = TV_CD_DVD.exe|Arguments = |WorkingDirectory = {InstallDir}/Program/...")
 
No edit summary
 
Line 9: Line 9:
{{Game.InfoBox.ReleaseDate|Windows|October 5, 2004}}
{{Game.InfoBox.ReleaseDate|Windows|October 5, 2004}}
|Genres =
|Genres =
{{Game.InfoBox.Genre|Sport}}
{{Game.InfoBox.Genre|Sport}}{{Game.InfoBox.Genre|Shooter}}
{{Game.InfoBox.Genre|Shooter}}
|PCGamingWiki = Tribes:_Vengeance}}
| PCGamingWiki = Tribes:_Vengeance
}}


{{Game.ActionBox
{{Game.ActionBox
Line 19: Line 17:
}}
}}


{{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
# Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height
$Display = Get-PrimaryDisplay


function Write-ReplaceContentInFile([string]$Regex, [string]$Replacement, [string]$FilePath)
# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
{
Write-ReplaceContentInFile -Pattern '^FullscreenViewportX=(.+)' -Substitution "FullscreenViewportX=$($Display.Bounds.Width)" -FilePath "$InstallDirectory\System\tribesv.ini"
    $content = (Get-Content $FilePath) -replace $Regex, $Replacement
Write-ReplaceContentInFile -Pattern '^FullscreenViewportY=(.+)' -Substitution "FullscreenViewportY=$($Display.Bounds.Height)" -FilePath "$InstallDirectory\System\tribesv.ini"
    [IO.File]::WriteAllLines($FilePath, $content)
 
# 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
}
}


Copy-Item -Path "$InstallDir\Content\System\Profiles\Default.ini" -Destination "$InstallDir\Content\System\Profiles\PlayerProfile1.ini"
Write-ReplaceContentInFile -Pattern '^DesiredFOV=(.+)' -Substitution "DesiredFOV=$FOV" -FilePath "$InstallDirectory\System\User.ini"
Write-ReplaceContentInFile -Pattern '^DefaultFOV=(.+)' -Substitution "DefaultFOV=$FOV" -FilePath "$InstallDirectory\System\User.ini"
</syntaxhighlight>
}}
           
{{Game.Scripts.NameChange
|Name = Name Change Script
|Description =
|RequiresAdmin = False
|Contents =
<syntaxhighlight lang="powershell" line>
Copy-Item -Path "$InstallDirectory\Content\System\Profiles\Default.ini" -Destination "$InstallDirectory\Content\System\Profiles\PlayerProfile1.ini"


Write-ReplaceContentInFile -Regex '^Name=(.+)' -Replacement "Name=$NewName`r`nPlayerName=$NewName" -FilePath "$InstallDir\Content\System\Profiles\PlayerProfile1.ini"
Write-ReplaceContentInFile -Pattern '^Name=(.+)' -Substitution "Name=$NewPlayerAlias`r`nPlayerName=$NewPlayerAlias" -FilePath "$InstallDirectory\Content\System\Profiles\PlayerProfile1.ini"
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Latest revision as of 21:58, 8 January 2024

Developers
Irrational Games
Publishers
VU Games
Release Date
Windows: October 5, 2004
Genres
SportShooter
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play TV_CD_DVD.exe {InstallDir}/Program/Bin 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 '^FullscreenViewportX=(.+)' -Substitution "FullscreenViewportX=$($Display.Bounds.Width)" -FilePath "$InstallDirectory\System\tribesv.ini"
Write-ReplaceContentInFile -Pattern '^FullscreenViewportY=(.+)' -Substitution "FullscreenViewportY=$($Display.Bounds.Height)" -FilePath "$InstallDirectory\System\tribesv.ini"

# 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 '^DesiredFOV=(.+)' -Substitution "DesiredFOV=$FOV" -FilePath "$InstallDirectory\System\User.ini"
Write-ReplaceContentInFile -Pattern '^DefaultFOV=(.+)' -Substitution "DefaultFOV=$FOV" -FilePath "$InstallDirectory\System\User.ini"

Name Change Script

Copy-Item -Path "$InstallDirectory\Content\System\Profiles\Default.ini" -Destination "$InstallDirectory\Content\System\Profiles\PlayerProfile1.ini"

Write-ReplaceContentInFile -Pattern '^Name=(.+)' -Substitution "Name=$NewPlayerAlias`r`nPlayerName=$NewPlayerAlias" -FilePath "$InstallDirectory\Content\System\Profiles\PlayerProfile1.ini"